]> gitweb @ CieloNegro.org - bindings-CarbonCore.git/blob - Bindings/CoreServices/CarbonCore/OSUtils.hsc
OSUtils.h
[bindings-CarbonCore.git] / Bindings / CoreServices / CarbonCore / OSUtils.hsc
1 #include <bindings.dsl.h>
2 #include <CoreServices/CoreServices.h>
3
4 module Bindings.CoreServices.CarbonCore.OSUtils where
5 #strict_import
6 import Bindings.CoreServices.CarbonCore.MacTypes
7
8 #num sortsBefore
9 #num sortsEqual
10 #num sortsAfter
11
12 #num dummyType
13 #num vType
14 #num ioQType
15 #num drvQType
16 #num evType
17 #num fsQType
18 #num sIQType
19 #num dtQType
20 #num nmType
21
22 #synonym_t QTypes, <SignedByte>
23
24 #starttype struct QElem
25 #  field qLink, Ptr <QElem>
26 #  field qType, CShort
27 #  array_field qData, CShort
28 #stoptype
29 #synonym_t QElemPtr, Ptr <QElem>
30
31 #starttype struct QHdr
32 #  field qFlags, CShort
33 #  field qHead , <QElemPtr>
34 #  field qTail , <QElemPtr>
35 #stoptype
36 #synonym_t QHdrPtr, Ptr <QHdr>
37
38 #starttype struct MachineLocation
39 #  field latitude , <Fract>
40 #  field longitude, <Fract>
41 #  if TARGET_RT_BIG_ENDIAN
42 #    union_field u.dlsDelta, <SInt8>
43 #  endif
44 #  union_field u.gmtDelta, CLong
45 #  if TARGET_RT_LITTLE_ENDIAN
46 #    array_field u.dls.pad, <SInt8>
47 #  endif
48 #  field u.dls.Delta, <SInt8>
49 #stoptype
50
51 #ccall IsMetric, IO <Boolean>
52 #ccall Delay   , CULong -> Ptr CULong -> IO ()
53 #ccall Enqueue , <QElemPtr> -> <QHdrPtr> -> IO ()
54 #ccall Dequeue , <QElemPtr> -> <QHdrPtr> -> IO <OSErr>
55
56 #if !__LP64__
57 #  ccall MakeDataExecutable, Ptr () -> CULong -> IO ()
58 #endif
59
60 #ccall ReadLocation     , Ptr <MachineLocation> -> IO ()
61 #ccall TickCount        , IO <UInt32>
62 #ccall CSCopyUserName   , <Boolean> -> IO <CFStringRef>
63 #ccall CSCopyMachineName, IO <CFStringRef>
64
65 #num useFree
66 #num useATalk
67 #num useAsync
68 #num useExtClk
69 #num useMIDI
70
71 #num false32b
72 #num true32b
73
74 #synonym_t SysPPtr, Ptr ()
75
76 #if !__LP64__
77 #  ccall GetSysPPtr, IO <SysPPtr>
78 #endif
79
80 #callback  DeferredTaskProcPtr, CLong -> IO ()
81 #synonym_t DeferredTaskUPP, <DeferredTaskProcPtr>
82
83 #starttype struct DeferredTask
84 #  field qLink     , <QElemPtr>
85 #  field qType     , CShort
86 #  field dtFlags   , CShort
87 #  field dtAddr    , <DeferredTaskUPP>
88 #  field dtParam   , CLong
89 #  field dtReserved, CLong
90 #stoptype
91 #synonym_t DeferredTaskPtr, Ptr <DeferredTask>
92
93 #if !__LP64__
94 #  ccall DTInstall    , <DeferredTaskPtr> -> IO <OSErr>
95 #  ccall DTUninstall  , <DeferredTaskPtr> -> IO <OSErr>
96 #  ccall SetCurrentA5 , IO CLong
97 #  ccall SetA5        , CLong -> IO CLong
98 #  ccall InitUtil     , IO <OSErr>
99 #  ccall WriteParam   , IO <OSErr>
100 #  ccall WriteLocation, Ptr <MachineLocation> -> IO ()
101 #endif