]> gitweb @ CieloNegro.org - bindings-CarbonCore.git/commitdiff
OSUtils.h
authorPHO <pho@cielonegro.org>
Thu, 14 Oct 2010 16:34:13 +0000 (01:34 +0900)
committerPHO <pho@cielonegro.org>
Thu, 14 Oct 2010 16:34:13 +0000 (01:34 +0900)
Bindings/CoreServices/CarbonCore/Files.hsc
Bindings/CoreServices/CarbonCore/OSUtils.hsc [new file with mode: 0644]
bindings-carbon-core.cabal

index df6bdcd0b108a20689fcbff498847bba1330b07c..0a8f481d33899f147ed5af043afc83f8a27580dd 100644 (file)
@@ -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 , <UInt16>
@@ -1603,8 +1605,9 @@ import Bindings.CoreServices.CarbonCore.MacTypes
 #ccall FSFileSecuritySetOwnerUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
 #ccall FSFileSecurityGetGroupUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
 #ccall FSFileSecuritySetGroupUUID   , <FSFileSecurityRef> -> Ptr <CFUUIDBytes> -> IO <OSStatus>
-#ccall FSFileSecurityCopyAccessControlList, <FSFileSecurityRef> -> <acl_t> -> IO <OSStatus>
-#ccall FSFileSecuritySetAccessControlList , <FSFileSecurityRef> -> <acl_t> -> IO <OSStatus>
+-- FIXME: acl_t
+-- #ccall FSFileSecurityCopyAccessControlList, <FSFileSecurityRef> -> CACL -> IO <OSStatus>
+-- #ccall FSFileSecuritySetAccessControlList , <FSFileSecurityRef> -> CACL -> IO <OSStatus>
 #ccall FSFileSecurityGetOwner       , <FSFileSecurityRef> -> Ptr <UInt32> -> IO <OSStatus>
 #ccall FSFileSecuritySetOwner       , <FSFileSecurityRef> -> <UInt32> -> IO <OSStatus>
 #ccall FSFileSecurityGetGroup       , <FSFileSecurityRef> -> Ptr <UInt32> -> IO <OSStatus>
diff --git a/Bindings/CoreServices/CarbonCore/OSUtils.hsc b/Bindings/CoreServices/CarbonCore/OSUtils.hsc
new file mode 100644 (file)
index 0000000..3cc500d
--- /dev/null
@@ -0,0 +1,101 @@
+#include <bindings.dsl.h>
+#include <CoreServices/CoreServices.h>
+
+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, <SignedByte>
+
+#starttype struct QElem
+#  field qLink, Ptr <QElem>
+#  field qType, CShort
+#  array_field qData, CShort
+#stoptype
+#synonym_t QElemPtr, Ptr <QElem>
+
+#starttype struct QHdr
+#  field qFlags, CShort
+#  field qHead , <QElemPtr>
+#  field qTail , <QElemPtr>
+#stoptype
+#synonym_t QHdrPtr, Ptr <QHdr>
+
+#starttype struct MachineLocation
+#  field latitude , <Fract>
+#  field longitude, <Fract>
+#  if TARGET_RT_BIG_ENDIAN
+#    union_field u.dlsDelta, <SInt8>
+#  endif
+#  union_field u.gmtDelta, CLong
+#  if TARGET_RT_LITTLE_ENDIAN
+#    array_field u.dls.pad, <SInt8>
+#  endif
+#  field u.dls.Delta, <SInt8>
+#stoptype
+
+#ccall IsMetric, IO <Boolean>
+#ccall Delay   , CULong -> Ptr CULong -> IO ()
+#ccall Enqueue , <QElemPtr> -> <QHdrPtr> -> IO ()
+#ccall Dequeue , <QElemPtr> -> <QHdrPtr> -> IO <OSErr>
+
+#if !__LP64__
+#  ccall MakeDataExecutable, Ptr () -> CULong -> IO ()
+#endif
+
+#ccall ReadLocation     , Ptr <MachineLocation> -> IO ()
+#ccall TickCount        , IO <UInt32>
+#ccall CSCopyUserName   , <Boolean> -> IO <CFStringRef>
+#ccall CSCopyMachineName, IO <CFStringRef>
+
+#num useFree
+#num useATalk
+#num useAsync
+#num useExtClk
+#num useMIDI
+
+#num false32b
+#num true32b
+
+#synonym_t SysPPtr, Ptr ()
+
+#if !__LP64__
+#  ccall GetSysPPtr, IO <SysPPtr>
+#endif
+
+#callback  DeferredTaskProcPtr, CLong -> IO ()
+#synonym_t DeferredTaskUPP, <DeferredTaskProcPtr>
+
+#starttype struct DeferredTask
+#  field qLink     , <QElemPtr>
+#  field qType     , CShort
+#  field dtFlags   , CShort
+#  field dtAddr    , <DeferredTaskUPP>
+#  field dtParam   , CLong
+#  field dtReserved, CLong
+#stoptype
+#synonym_t DeferredTaskPtr, Ptr <DeferredTask>
+
+#if !__LP64__
+#  ccall DTInstall    , <DeferredTaskPtr> -> IO <OSErr>
+#  ccall DTUninstall  , <DeferredTaskPtr> -> IO <OSErr>
+#  ccall SetCurrentA5 , IO CLong
+#  ccall SetA5        , CLong -> IO CLong
+#  ccall InitUtil     , IO <OSErr>
+#  ccall WriteParam   , IO <OSErr>
+#  ccall WriteLocation, Ptr <MachineLocation> -> IO ()
+#endif
index d23bd3af7a975f01c6cb856ae1a11205b0fa318a..a59a27d785d18beab3fbb631204e95b3587e873a 100644 (file)
@@ -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: