Mercurial > projects > dstep
comparison dstep/coreservices/carboncore/MacTypes.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 21, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.coreservices.carboncore.MacTypes; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.coreservices.carboncore.ConditionalMacros; | |
11 import dstep.internal.Types; | |
12 //import dstep.stdbool; | |
13 //import dstep.sys.types; | |
14 | |
15 struct TimeBaseRecord; | |
16 | |
17 alias ubyte UInt8; | |
18 alias byte SInt8; | |
19 alias ushort UInt16; | |
20 alias short SInt16; | |
21 alias uint UInt32; | |
22 alias int SInt32; | |
23 alias long SInt64; | |
24 alias ulong UInt64; | |
25 alias int Fixed; | |
26 alias Fixed* FixedPtr; | |
27 alias int Fract; | |
28 alias Fract* FractPtr; | |
29 alias uint UnsignedFixed; | |
30 alias UnsignedFixed* UnsignedFixedPtr; | |
31 alias short ShortFixed; | |
32 alias ShortFixed* ShortFixedPtr; | |
33 alias float Float32; | |
34 alias double Float64; | |
35 alias char* Ptr; | |
36 alias Ptr* Handle; | |
37 alias int Size; | |
38 alias short OSErr; | |
39 alias int OSStatus; | |
40 alias void* LogicalAddress; | |
41 alias void* ConstLogicalAddress; | |
42 alias void* PhysicalAddress; | |
43 alias char* BytePtr; | |
44 alias uint ByteCount; | |
45 alias uint ByteOffset; | |
46 alias int Duration; | |
47 alias UnsignedWide AbsoluteTime; | |
48 alias uint OptionBits; | |
49 alias uint ItemCount; | |
50 alias uint PBVersion; | |
51 alias short ScriptCode; | |
52 alias short LangCode; | |
53 alias short RegionCode; | |
54 alias uint FourCharCode; | |
55 alias uint OSType; | |
56 alias uint ResType; | |
57 alias OSType* OSTypePtr; | |
58 alias ResType* ResTypePtr; | |
59 alias bool Boolean; | |
60 alias ProcPtr UniversalProcPtr; | |
61 alias ProcPtr* ProcHandle; | |
62 alias UniversalProcPtr* UniversalProcHandle; | |
63 alias void* PRefCon; | |
64 alias void* URefCon; | |
65 alias void* SRefCon; | |
66 alias uint UnicodeScalarValue; | |
67 alias dchar UTF32Char; | |
68 alias wchar UniChar; | |
69 alias wchar UTF16Char; | |
70 alias char UTF8Char; | |
71 alias wchar* UniCharPtr; | |
72 alias c_ulong UniCharCount; | |
73 alias UniCharCount* UniCharCountPtr; | |
74 alias char[256] Str255; | |
75 alias char[64] Str63; | |
76 alias char[33] Str32; | |
77 alias char[32] Str31; | |
78 alias char[28] Str28; | |
79 alias char[16] Str15; | |
80 alias Str63 StrFileName; | |
81 alias char* StringPtr; | |
82 alias StringPtr* StringHandle; | |
83 alias char* ConstStringPtr; | |
84 alias char* ConstStr255Param; | |
85 alias char* ConstStr63Param; | |
86 alias char* ConstStr32Param; | |
87 alias char* ConstStr31Param; | |
88 alias char* ConstStr27Param; | |
89 alias char* ConstStr15Param; | |
90 alias char* ConstStrFileNameParam; | |
91 alias ProcessSerialNumber* ProcessSerialNumberPtr; | |
92 alias Point* PointPtr; | |
93 alias Rect* RectPtr; | |
94 alias short CharParameter; | |
95 alias ubyte Style; | |
96 alias short StyleParameter; | |
97 alias ubyte StyleField; | |
98 alias int TimeValue; | |
99 alias int TimeScale; | |
100 alias wide CompTimeValue; | |
101 alias long TimeValue64; | |
102 alias TimeBaseRecord* TimeBase; | |
103 alias NumVersionVariant* NumVersionVariantPtr; | |
104 alias NumVersionVariantPtr* NumVersionVariantHandle; | |
105 alias VersRec* VersRecPtr; | |
106 alias VersRecPtr* VersRecHndl; | |
107 alias ubyte Byte; | |
108 alias byte SignedByte; | |
109 alias wide* WidePtr; | |
110 alias UnsignedWide* UnsignedWidePtr; | |
111 alias Float80[] extended80; | |
112 alias Float96[][] extended96; | |
113 alias byte VHSelect; | |
114 | |
115 extern (C) | |
116 { | |
117 alias c_long function () Register68kProcPtr; | |
118 alias void function () ProcPtr; | |
119 } | |
120 | |
121 enum | |
122 { | |
123 noErr = 0 | |
124 } | |
125 | |
126 enum | |
127 { | |
128 kNilOptions = 0 | |
129 } | |
130 | |
131 enum | |
132 { | |
133 kVariableLengthArray = 1 | |
134 } | |
135 | |
136 enum | |
137 { | |
138 kUnknownType = 0x3F3F3F3F | |
139 } | |
140 | |
141 enum | |
142 { | |
143 normal = 0, | |
144 bold = 1, | |
145 italic = 2, | |
146 underline = 4, | |
147 outline = 8, | |
148 shadow = 0x10, | |
149 condense = 0x20, | |
150 extend = 0x40 | |
151 } | |
152 | |
153 enum | |
154 { | |
155 developStage = 0x20, | |
156 alphaStage = 0x40, | |
157 betaStage = 0x60, | |
158 finalStage = 0x80 | |
159 } | |
160 | |
161 union NumVersionVariant | |
162 { | |
163 NumVersion parts; | |
164 uint whole; | |
165 } | |
166 | |
167 struct wide | |
168 { | |
169 uint lo; | |
170 int hi; | |
171 } | |
172 | |
173 | |
174 struct UnsignedWide | |
175 { | |
176 uint lo; | |
177 uint hi; | |
178 } | |
179 | |
180 | |
181 struct Float80 | |
182 { | |
183 short exp; | |
184 UInt16* man; | |
185 } | |
186 | |
187 | |
188 struct Float96 | |
189 { | |
190 SInt16* exp; | |
191 UInt16* man; | |
192 } | |
193 | |
194 | |
195 struct Float32Point | |
196 { | |
197 float x; | |
198 float y; | |
199 } | |
200 | |
201 | |
202 struct ProcessSerialNumber | |
203 { | |
204 uint highLongOfPSN; | |
205 uint lowLongOfPSN; | |
206 } | |
207 | |
208 | |
209 struct Point | |
210 { | |
211 short v; | |
212 short h; | |
213 } | |
214 | |
215 | |
216 struct Rect | |
217 { | |
218 short top; | |
219 short left; | |
220 short bottom; | |
221 short right; | |
222 } | |
223 | |
224 | |
225 struct FixedPoint | |
226 { | |
227 int x; | |
228 int y; | |
229 } | |
230 | |
231 | |
232 struct FixedRect | |
233 { | |
234 int left; | |
235 int top; | |
236 int right; | |
237 int bottom; | |
238 } | |
239 | |
240 | |
241 struct TimeRecord | |
242 { | |
243 CompTimeValue value; | |
244 int scale; | |
245 TimeBase base; | |
246 } | |
247 | |
248 | |
249 struct NumVersion | |
250 { | |
251 ubyte nonRelRev; | |
252 ubyte stage; | |
253 ubyte minorAndBugRev; | |
254 ubyte majorRev; | |
255 } | |
256 | |
257 | |
258 struct VersRec | |
259 { | |
260 NumVersion numericVersion; | |
261 short countryCode; | |
262 ubyte[256] shortVersion; | |
263 ubyte[256] reserved; | |
264 } | |
265 | |
266 extern (C) | |
267 { | |
268 void Debugger (); | |
269 void DebugStr (char* debuggerMsg); | |
270 void SysBreak (); | |
271 void SysBreakStr (char* debuggerMsg); | |
272 void SysBreakFunc (char* debuggerMsg); | |
273 } |