From: PHO Date: Thu, 14 Oct 2010 16:34:13 +0000 (+0900) Subject: OSUtils.h X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=bindings-CarbonCore.git;a=commitdiff_plain;h=eef5c86f6f74abc3d6b9c8e411db4a96db83844d OSUtils.h --- diff --git a/Bindings/CoreServices/CarbonCore/Files.hsc b/Bindings/CoreServices/CarbonCore/Files.hsc index df6bdcd..0a8f481 100644 --- a/Bindings/CoreServices/CarbonCore/Files.hsc +++ b/Bindings/CoreServices/CarbonCore/Files.hsc @@ -6,6 +6,8 @@ module Bindings.CoreServices.CarbonCore.Files where #strict_import import Bindings.CoreServices.CarbonCore.Finder import Bindings.CoreServices.CarbonCore.MacTypes +import Bindings.CoreServices.CarbonCore.OSUtils +import System.Posix.Types #starttype struct HFSUniStr255 # field length , @@ -1603,8 +1605,9 @@ import Bindings.CoreServices.CarbonCore.MacTypes #ccall FSFileSecuritySetOwnerUUID , -> Ptr -> IO #ccall FSFileSecurityGetGroupUUID , -> Ptr -> IO #ccall FSFileSecuritySetGroupUUID , -> Ptr -> IO -#ccall FSFileSecurityCopyAccessControlList, -> -> IO -#ccall FSFileSecuritySetAccessControlList , -> -> IO +-- FIXME: acl_t +-- #ccall FSFileSecurityCopyAccessControlList, -> CACL -> IO +-- #ccall FSFileSecuritySetAccessControlList , -> CACL -> IO #ccall FSFileSecurityGetOwner , -> Ptr -> IO #ccall FSFileSecuritySetOwner , -> -> IO #ccall FSFileSecurityGetGroup , -> Ptr -> IO diff --git a/Bindings/CoreServices/CarbonCore/OSUtils.hsc b/Bindings/CoreServices/CarbonCore/OSUtils.hsc new file mode 100644 index 0000000..3cc500d --- /dev/null +++ b/Bindings/CoreServices/CarbonCore/OSUtils.hsc @@ -0,0 +1,101 @@ +#include +#include + +module Bindings.CoreServices.CarbonCore.OSUtils where +#strict_import +import Bindings.CoreServices.CarbonCore.MacTypes + +#num sortsBefore +#num sortsEqual +#num sortsAfter + +#num dummyType +#num vType +#num ioQType +#num drvQType +#num evType +#num fsQType +#num sIQType +#num dtQType +#num nmType + +#synonym_t QTypes, + +#starttype struct QElem +# field qLink, Ptr +# field qType, CShort +# array_field qData, CShort +#stoptype +#synonym_t QElemPtr, Ptr + +#starttype struct QHdr +# field qFlags, CShort +# field qHead , +# field qTail , +#stoptype +#synonym_t QHdrPtr, Ptr + +#starttype struct MachineLocation +# field latitude , +# field longitude, +# if TARGET_RT_BIG_ENDIAN +# union_field u.dlsDelta, +# endif +# union_field u.gmtDelta, CLong +# if TARGET_RT_LITTLE_ENDIAN +# array_field u.dls.pad, +# endif +# field u.dls.Delta, +#stoptype + +#ccall IsMetric, IO +#ccall Delay , CULong -> Ptr CULong -> IO () +#ccall Enqueue , -> -> IO () +#ccall Dequeue , -> -> IO + +#if !__LP64__ +# ccall MakeDataExecutable, Ptr () -> CULong -> IO () +#endif + +#ccall ReadLocation , Ptr -> IO () +#ccall TickCount , IO +#ccall CSCopyUserName , -> IO +#ccall CSCopyMachineName, IO + +#num useFree +#num useATalk +#num useAsync +#num useExtClk +#num useMIDI + +#num false32b +#num true32b + +#synonym_t SysPPtr, Ptr () + +#if !__LP64__ +# ccall GetSysPPtr, IO +#endif + +#callback DeferredTaskProcPtr, CLong -> IO () +#synonym_t DeferredTaskUPP, + +#starttype struct DeferredTask +# field qLink , +# field qType , CShort +# field dtFlags , CShort +# field dtAddr , +# field dtParam , CLong +# field dtReserved, CLong +#stoptype +#synonym_t DeferredTaskPtr, Ptr + +#if !__LP64__ +# ccall DTInstall , -> IO +# ccall DTUninstall , -> IO +# ccall SetCurrentA5 , IO CLong +# ccall SetA5 , CLong -> IO CLong +# ccall InitUtil , IO +# ccall WriteParam , IO +# ccall WriteLocation, Ptr -> IO () +#endif diff --git a/bindings-carbon-core.cabal b/bindings-carbon-core.cabal index d23bd3a..a59a27d 100644 --- a/bindings-carbon-core.cabal +++ b/bindings-carbon-core.cabal @@ -35,6 +35,7 @@ Library Bindings.CoreServices.CarbonCore.Files Bindings.CoreServices.CarbonCore.Finder Bindings.CoreServices.CarbonCore.MacTypes + Bindings.CoreServices.CarbonCore.OSUtils Bindings.CoreServices.CarbonCore.UTCUtils C-Sources: