Mercurial > projects > dstep
comparison dstep/coreservices/carboncore/Finder.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 | 19885b43130e |
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.Finder; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.coreservices.carboncore.MacTypes; | |
11 import dstep.objc.bridge.TypeEncoding; | |
12 | |
13 alias CustomBadgeResource* CustomBadgeResourcePtr; | |
14 alias CustomBadgeResourcePtr* CustomBadgeResourceHandle; | |
15 alias RoutingResourceEntry* RoutingResourcePtr; | |
16 alias RoutingResourcePtr* RoutingResourceHandle; | |
17 | |
18 // This is needed otherwise the enums will fail compiling with gdc | |
19 version (GNU) | |
20 { | |
21 private | |
22 { | |
23 const __kClippingCreator = getOSType!("drag"); | |
24 const __kClippingPictureType = getOSType!("clpp"); | |
25 const __kClippingTextType = getOSType!("clpt"); | |
26 const __kClippingSoundType = getOSType!("clps"); | |
27 const __kClippingUnknownType = getOSType!("clpu"); | |
28 | |
29 } | |
30 } | |
31 | |
32 // This is needed otherwise the enums will fail compiling with gdc | |
33 version (GNU) | |
34 { | |
35 private | |
36 { | |
37 const __kInternetLocationCreator = getOSType!("drag"); | |
38 const __kInternetLocationHTTP = getOSType!("ilht"); | |
39 const __kInternetLocationFTP = getOSType!("ilft"); | |
40 const __kInternetLocationFile = getOSType!("ilfi"); | |
41 const __kInternetLocationMail = getOSType!("ilma"); | |
42 const __kInternetLocationNNTP = getOSType!("ilnw"); | |
43 const __kInternetLocationAFP = getOSType!("ilaf"); | |
44 const __kInternetLocationAppleTalk = getOSType!("ilat"); | |
45 const __kInternetLocationNSL = getOSType!("ilns"); | |
46 const __kInternetLocationGeneric = getOSType!("ilge"); | |
47 | |
48 } | |
49 } | |
50 | |
51 // This is needed otherwise the enums will fail compiling with gdc | |
52 version (GNU) | |
53 { | |
54 private | |
55 { | |
56 const __kCustomBadgeResourceType = getOSType!("badg"); | |
57 const __kCustomBadgeResourceID = getOSType!("CustomIconResourc"); | |
58 const __kCustomBadgeResourceVersion = getOSType!(""); | |
59 | |
60 } | |
61 } | |
62 | |
63 // This is needed otherwise the enums will fail compiling with gdc | |
64 version (GNU) | |
65 { | |
66 private | |
67 { | |
68 const __kRoutingResourceType = getOSType!("rout"); | |
69 const __kRoutingResourceID = getOSType!(""); | |
70 | |
71 } | |
72 } | |
73 | |
74 // This is needed otherwise the enums will fail compiling with gdc | |
75 version (GNU) | |
76 { | |
77 private | |
78 { | |
79 const __kContainerFolderAliasType = getOSType!("fdrp"); | |
80 const __kContainerTrashAliasType = getOSType!("trsh"); | |
81 const __kContainerHardDiskAliasType = getOSType!("hdsk"); | |
82 const __kContainerFloppyAliasType = getOSType!("flpy"); | |
83 const __kContainerServerAliasType = getOSType!("srvr"); | |
84 const __kApplicationAliasType = getOSType!("adrp"); | |
85 const __kContainerAliasType = getOSType!("drop"); | |
86 const __kDesktopPrinterAliasType = getOSType!("dtpa"); | |
87 const __kContainerCDROMAliasType = getOSType!("cddr"); | |
88 const __kApplicationCPAliasType = getOSType!("acdp"); | |
89 const __kApplicationDAAliasType = getOSType!("addp"); | |
90 const __kPackageAliasType = getOSType!("fpka"); | |
91 const __kAppPackageAliasType = getOSType!("fapa"); | |
92 | |
93 } | |
94 } | |
95 | |
96 // This is needed otherwise the enums will fail compiling with gdc | |
97 version (GNU) | |
98 { | |
99 private | |
100 { | |
101 const __kSystemFolderAliasType = getOSType!("fasy"); | |
102 const __kAppleMenuFolderAliasType = getOSType!("faam"); | |
103 const __kStartupFolderAliasType = getOSType!("fast"); | |
104 const __kPrintMonitorDocsFolderAliasType = getOSType!("fapn"); | |
105 const __kPreferencesFolderAliasType = getOSType!("fapf"); | |
106 const __kControlPanelFolderAliasType = getOSType!("fact"); | |
107 const __kExtensionFolderAliasType = getOSType!("faex"); | |
108 | |
109 } | |
110 } | |
111 | |
112 // This is needed otherwise the enums will fail compiling with gdc | |
113 version (GNU) | |
114 { | |
115 private | |
116 { | |
117 const __kExportedFolderAliasType = getOSType!("faet"); | |
118 const __kDropFolderAliasType = getOSType!("fadr"); | |
119 const __kSharedFolderAliasType = getOSType!("fash"); | |
120 const __kMountedFolderAliasType = getOSType!("famn"); | |
121 | |
122 } | |
123 } | |
124 | |
125 // This is needed otherwise the enums will fail compiling with gdc | |
126 version (GNU) | |
127 { | |
128 private | |
129 { | |
130 const __kFirstMagicBusyFiletype = getOSType!("bzy "); | |
131 const __kLastMagicBusyFiletype = getOSType!("bzy?"); | |
132 | |
133 } | |
134 } | |
135 | |
136 enum | |
137 { | |
138 kClippingCreator = getOSType!("drag"), | |
139 kClippingPictureType = getOSType!("clpp"), | |
140 kClippingTextType = getOSType!("clpt"), | |
141 kClippingSoundType = getOSType!("clps"), | |
142 kClippingUnknownType = getOSType!("clpu") | |
143 } | |
144 | |
145 enum | |
146 { | |
147 kInternetLocationCreator = getOSType!("drag"), | |
148 kInternetLocationHTTP = getOSType!("ilht"), | |
149 kInternetLocationFTP = getOSType!("ilft"), | |
150 kInternetLocationFile = getOSType!("ilfi"), | |
151 kInternetLocationMail = getOSType!("ilma"), | |
152 kInternetLocationNNTP = getOSType!("ilnw"), | |
153 kInternetLocationAFP = getOSType!("ilaf"), | |
154 kInternetLocationAppleTalk = getOSType!("ilat"), | |
155 kInternetLocationNSL = getOSType!("ilns"), | |
156 kInternetLocationGeneric = getOSType!("ilge") | |
157 } | |
158 | |
159 enum | |
160 { | |
161 kCustomIconResource = -16455 | |
162 } | |
163 | |
164 enum | |
165 { | |
166 kCustomBadgeResourceType = getOSType!("badg"), | |
167 kCustomBadgeResourceID = kCustomIconResource, | |
168 kCustomBadgeResourceVersion = 0 | |
169 } | |
170 | |
171 enum | |
172 { | |
173 kRoutingResourceType = getOSType!("rout"), | |
174 kRoutingResourceID = 0 | |
175 } | |
176 | |
177 enum | |
178 { | |
179 kContainerFolderAliasType = getOSType!("fdrp"), | |
180 kContainerTrashAliasType = getOSType!("trsh"), | |
181 kContainerHardDiskAliasType = getOSType!("hdsk"), | |
182 kContainerFloppyAliasType = getOSType!("flpy"), | |
183 kContainerServerAliasType = getOSType!("srvr"), | |
184 kApplicationAliasType = getOSType!("adrp"), | |
185 kContainerAliasType = getOSType!("drop"), | |
186 kDesktopPrinterAliasType = getOSType!("dtpa"), | |
187 kContainerCDROMAliasType = getOSType!("cddr"), | |
188 kApplicationCPAliasType = getOSType!("acdp"), | |
189 kApplicationDAAliasType = getOSType!("addp"), | |
190 kPackageAliasType = getOSType!("fpka"), | |
191 kAppPackageAliasType = getOSType!("fapa") | |
192 } | |
193 | |
194 enum | |
195 { | |
196 kSystemFolderAliasType = getOSType!("fasy"), | |
197 kAppleMenuFolderAliasType = getOSType!("faam"), | |
198 kStartupFolderAliasType = getOSType!("fast"), | |
199 kPrintMonitorDocsFolderAliasType = getOSType!("fapn"), | |
200 kPreferencesFolderAliasType = getOSType!("fapf"), | |
201 kControlPanelFolderAliasType = getOSType!("fact"), | |
202 kExtensionFolderAliasType = getOSType!("faex") | |
203 } | |
204 | |
205 enum | |
206 { | |
207 kExportedFolderAliasType = getOSType!("faet"), | |
208 kDropFolderAliasType = getOSType!("fadr"), | |
209 kSharedFolderAliasType = getOSType!("fash"), | |
210 kMountedFolderAliasType = getOSType!("famn") | |
211 } | |
212 | |
213 enum | |
214 { | |
215 kIsOnDesk = 0x0001, | |
216 kColor = 0x000E, | |
217 kIsShared = 0x0040, | |
218 kHasNoINITs = 0x0080, | |
219 kHasBeenInited = 0x0100, | |
220 kHasCustomIcon = 0x0400, | |
221 kIsStationery = 0x0800, | |
222 kNameLocked = 0x1000, | |
223 kHasBundle = 0x2000, | |
224 kIsInvisible = 0x4000, | |
225 kIsAlias = 0x8000 | |
226 } | |
227 | |
228 enum | |
229 { | |
230 fOnDesk = kIsOnDesk, | |
231 fHasBundle = kHasBundle, | |
232 fInvisible = kIsInvisible | |
233 } | |
234 | |
235 enum | |
236 { | |
237 fTrash = -3, | |
238 fDesktop = -2, | |
239 fDisk = 0 | |
240 } | |
241 | |
242 enum | |
243 { | |
244 kExtendedFlagsAreInvalid = 0x8000, | |
245 kExtendedFlagHasCustomBadge = 0x0100, | |
246 kExtendedFlagObjectIsBusy = 0x0080, | |
247 kExtendedFlagHasRoutingInfo = 0x0004 | |
248 } | |
249 | |
250 enum | |
251 { | |
252 kFirstMagicBusyFiletype = getOSType!("bzy "), | |
253 kLastMagicBusyFiletype = getOSType!("bzy?") | |
254 } | |
255 | |
256 enum | |
257 { | |
258 kMagicBusyCreationDate = 0x4F3AFDB0 | |
259 } | |
260 | |
261 struct CustomBadgeResource | |
262 { | |
263 short version_; | |
264 short customBadgeResourceID; | |
265 uint customBadgeType; | |
266 uint customBadgeCreator; | |
267 uint windowBadgeType; | |
268 uint windowBadgeCreator; | |
269 uint overrideType; | |
270 uint overrideCreator; | |
271 } | |
272 | |
273 | |
274 struct RoutingResourceEntry | |
275 { | |
276 uint creator; | |
277 uint fileType; | |
278 uint targetFolder; | |
279 uint destinationFolder; | |
280 uint reservedField; | |
281 } | |
282 | |
283 | |
284 struct FileInfo | |
285 { | |
286 uint fileType; | |
287 uint fileCreator; | |
288 ushort finderFlags; | |
289 Point location; | |
290 ushort reservedField; | |
291 } | |
292 | |
293 | |
294 struct FolderInfo | |
295 { | |
296 Rect windowBounds; | |
297 ushort finderFlags; | |
298 Point location; | |
299 ushort reservedField; | |
300 } | |
301 | |
302 | |
303 struct ExtendedFileInfo | |
304 { | |
305 SInt16* reserved1; | |
306 ushort extendedFinderFlags; | |
307 short reserved2; | |
308 int putAwayFolderID; | |
309 } | |
310 | |
311 | |
312 struct ExtendedFolderInfo | |
313 { | |
314 Point scrollPosition; | |
315 int reserved1; | |
316 ushort extendedFinderFlags; | |
317 short reserved2; | |
318 int putAwayFolderID; | |
319 } | |
320 | |
321 | |
322 struct FInfo | |
323 { | |
324 uint fdType; | |
325 uint fdCreator; | |
326 ushort fdFlags; | |
327 Point fdLocation; | |
328 short fdFldr; | |
329 } | |
330 | |
331 | |
332 struct FXInfo | |
333 { | |
334 short fdIconID; | |
335 SInt16* fdReserved; | |
336 byte fdScript; | |
337 byte fdXFlags; | |
338 short fdComment; | |
339 int fdPutAway; | |
340 } | |
341 | |
342 | |
343 struct DInfo | |
344 { | |
345 Rect frRect; | |
346 ushort frFlags; | |
347 Point frLocation; | |
348 short frView; | |
349 } | |
350 | |
351 | |
352 struct DXInfo | |
353 { | |
354 Point frScroll; | |
355 int frOpenChain; | |
356 byte frScript; | |
357 byte frXFlags; | |
358 short frComment; | |
359 int frPutAway; | |
360 } | |
361 |