]> gitweb @ CieloNegro.org - bindings-CarbonCore.git/blobdiff - Bindings/CoreServices/CarbonCore/OSUtils.hsc
OSUtils.h
[bindings-CarbonCore.git] / Bindings / CoreServices / CarbonCore / OSUtils.hsc
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