Mercurial > projects > dstep
comparison dstep/coreservices/carboncore/Folders.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.Folders; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.coreservices.carboncore.Files; | |
11 import dstep.coreservices.carboncore.MacTypes; | |
12 import dstep.coreservices.carboncore.MixedMode; | |
13 import dstep.objc.bridge.TypeEncoding; | |
14 | |
15 alias uint FolderDescFlags; | |
16 alias uint FolderClass; | |
17 alias uint FolderType; | |
18 alias uint FolderLocation; | |
19 alias FolderDesc* FolderDescPtr; | |
20 alias uint RoutingFlags; | |
21 alias FolderRouting* FolderRoutingPtr; | |
22 alias FolderManagerNotificationProcPtr FolderManagerNotificationUPP; | |
23 | |
24 extern (C) | |
25 { | |
26 alias int function (uint, void*, void*) FolderManagerNotificationProcPtr; | |
27 } | |
28 | |
29 // This is needed otherwise the enums will fail compiling with gdc | |
30 version (GNU) | |
31 { | |
32 private | |
33 { | |
34 const __kDesktopFolderType = getOSType!("desk"); | |
35 const __kTrashFolderType = getOSType!("trsh"); | |
36 const __kWhereToEmptyTrashFolderType = getOSType!("empt"); | |
37 const __kFontsFolderType = getOSType!("font"); | |
38 const __kPreferencesFolderType = getOSType!("pref"); | |
39 const __kSystemPreferencesFolderType = getOSType!("sprf"); | |
40 const __kTemporaryFolderType = getOSType!("temp"); | |
41 const __kChewableItemsFolderType = getOSType!("flnt"); | |
42 const __kTemporaryItemsInCacheDataFolderType = getOSType!("vtmp"); | |
43 const __kApplicationsFolderType = getOSType!("apps"); | |
44 const __kVolumeRootFolderType = getOSType!("root"); | |
45 const __kDomainTopLevelFolderType = getOSType!("dtop"); | |
46 const __kDomainLibraryFolderType = getOSType!("dlib"); | |
47 const __kUsersFolderType = getOSType!("usrs"); | |
48 const __kCurrentUserFolderType = getOSType!("cusr"); | |
49 const __kSharedUserDataFolderType = getOSType!("sdat"); | |
50 | |
51 } | |
52 } | |
53 | |
54 // This is needed otherwise the enums will fail compiling with gdc | |
55 version (GNU) | |
56 { | |
57 private | |
58 { | |
59 const __kDocumentsFolderType = getOSType!("docs"); | |
60 const __kPictureDocumentsFolderType = getOSType!("pdoc"); | |
61 const __kMovieDocumentsFolderType = getOSType!("mdoc"); | |
62 const __kMusicDocumentsFolderType = getOSType!("xB5646F6"); | |
63 const __kInternetSitesFolderType = getOSType!("site"); | |
64 const __kPublicFolderType = getOSType!("pubb"); | |
65 | |
66 } | |
67 } | |
68 | |
69 // This is needed otherwise the enums will fail compiling with gdc | |
70 version (GNU) | |
71 { | |
72 private | |
73 { | |
74 const __kVoicesFolderType = getOSType!("fvoc"); | |
75 const __kUtilitiesFolderType = getOSType!("x757469C"); | |
76 const __kThemesFolderType = getOSType!("thme"); | |
77 const __kFavoritesFolderType = getOSType!("favs"); | |
78 const __kInternetSearchSitesFolderType = getOSType!("issf"); | |
79 const __kInstallerLogsFolderType = getOSType!("ilgf"); | |
80 const __kScriptsFolderType = getOSType!("x736372C"); | |
81 const __kFolderActionsFolderType = getOSType!("fasf"); | |
82 const __kSpeakableItemsFolderType = getOSType!("spki"); | |
83 const __kKeychainFolderType = getOSType!("kchn"); | |
84 | |
85 } | |
86 } | |
87 | |
88 // This is needed otherwise the enums will fail compiling with gdc | |
89 version (GNU) | |
90 { | |
91 private | |
92 { | |
93 const __kColorSyncFolderType = getOSType!("sync"); | |
94 const __kColorSyncCMMFolderType = getOSType!("ccmm"); | |
95 const __kColorSyncScriptingFolderType = getOSType!("cscr"); | |
96 const __kPrintersFolderType = getOSType!("impr"); | |
97 const __kSpeechFolderType = getOSType!("spch"); | |
98 const __kCarbonLibraryFolderType = getOSType!("carb"); | |
99 const __kDocumentationFolderType = getOSType!("info"); | |
100 const __kISSDownloadsFolderType = getOSType!("issd"); | |
101 const __kUserSpecificTmpFolderType = getOSType!("utmp"); | |
102 const __kCachedDataFolderType = getOSType!("cach"); | |
103 const __kFrameworksFolderType = getOSType!("fram"); | |
104 const __kPrivateFrameworksFolderType = getOSType!("pfrm"); | |
105 const __kClassicDesktopFolderType = getOSType!("sdsk"); | |
106 const __kSystemSoundsFolderType = getOSType!("ssnd"); | |
107 const __kComponentsFolderType = getOSType!("cmpd"); | |
108 const __kQuickTimeComponentsFolderType = getOSType!("wcmp"); | |
109 const __kCoreServicesFolderType = getOSType!("csrv"); | |
110 const __kAudioSupportFolderType = getOSType!("adio"); | |
111 const __kAudioPresetsFolderType = getOSType!("apst"); | |
112 const __kAudioSoundsFolderType = getOSType!("asnd"); | |
113 const __kAudioSoundBanksFolderType = getOSType!("bank"); | |
114 const __kAudioAlertSoundsFolderType = getOSType!("alrt"); | |
115 const __kAudioPlugInsFolderType = getOSType!("aplg"); | |
116 const __kAudioComponentsFolderType = getOSType!("acmp"); | |
117 const __kKernelExtensionsFolderType = getOSType!("kext"); | |
118 const __kDirectoryServicesFolderType = getOSType!("dsrv"); | |
119 const __kDirectoryServicesPlugInsFolderType = getOSType!("dplg"); | |
120 const __kInstallerReceiptsFolderType = getOSType!("rcpt"); | |
121 const __kFileSystemSupportFolderType = getOSType!("fsys"); | |
122 const __kAppleShareSupportFolderType = getOSType!("shar"); | |
123 const __kAppleShareAuthenticationFolderType = getOSType!("auth"); | |
124 const __kMIDIDriversFolderType = getOSType!("midi"); | |
125 const __kKeyboardLayoutsFolderType = getOSType!("klay"); | |
126 const __kIndexFilesFolderType = getOSType!("indx"); | |
127 const __kFindByContentIndexesFolderType = getOSType!("fbcx"); | |
128 const __kManagedItemsFolderType = getOSType!("mang"); | |
129 const __kBootTimeStartupItemsFolderType = getOSType!("empz"); | |
130 const __kAutomatorWorkflowsFolderType = getOSType!("flow"); | |
131 const __kAutosaveInformationFolderType = getOSType!("asav"); | |
132 const __kSpotlightSavedSearchesFolderType = getOSType!("spot"); | |
133 const __kSpotlightImportersFolderType = getOSType!("simp"); | |
134 const __kSpotlightMetadataCacheFolderType = getOSType!("scch"); | |
135 const __kInputManagersFolderType = getOSType!("inpt"); | |
136 const __kInputMethodsFolderType = getOSType!("inpf"); | |
137 const __kLibraryAssistantsFolderType = getOSType!("astl"); | |
138 const __kAudioDigidesignFolderType = getOSType!("adig"); | |
139 const __kAudioVSTFolderType = getOSType!("avst"); | |
140 const __kColorPickersFolderType = getOSType!("cpkr"); | |
141 const __kCompositionsFolderType = getOSType!("cmps"); | |
142 const __kFontCollectionsFolderType = getOSType!("fncl"); | |
143 const __kiMovieFolderType = getOSType!("imov"); | |
144 const __kiMoviePlugInsFolderType = getOSType!("impi"); | |
145 const __kiMovieSoundEffectsFolderType = getOSType!("imse"); | |
146 const __kDownloadsFolderType = getOSType!("down"); | |
147 | |
148 } | |
149 } | |
150 | |
151 // This is needed otherwise the enums will fail compiling with gdc | |
152 version (GNU) | |
153 { | |
154 private | |
155 { | |
156 const __kColorSyncProfilesFolderType = getOSType!("prof"); | |
157 const __kApplicationSupportFolderType = getOSType!("asup"); | |
158 const __kTextEncodingsFolderType = getOSType!("xC474657"); | |
159 const __kPrinterDescriptionFolderType = getOSType!("ppdf"); | |
160 const __kPrinterDriverFolderType = getOSType!("xC470726"); | |
161 const __kScriptingAdditionsFolderType = getOSType!("xC473637"); | |
162 | |
163 } | |
164 } | |
165 | |
166 // This is needed otherwise the enums will fail compiling with gdc | |
167 version (GNU) | |
168 { | |
169 private | |
170 { | |
171 const __kClassicPreferencesFolderType = getOSType!("cprf"); | |
172 | |
173 } | |
174 } | |
175 | |
176 // This is needed otherwise the enums will fail compiling with gdc | |
177 version (GNU) | |
178 { | |
179 private | |
180 { | |
181 const __kSystemFolderType = getOSType!("macs"); | |
182 const __kSystemDesktopFolderType = getOSType!("sdsk"); | |
183 const __kSystemTrashFolderType = getOSType!("strs"); | |
184 const __kPrintMonitorDocsFolderType = getOSType!("prnt"); | |
185 const __kALMModulesFolderType = getOSType!("walk"); | |
186 const __kALMPreferencesFolderType = getOSType!("trip"); | |
187 const __kALMLocationsFolderType = getOSType!("fall"); | |
188 const __kAppleExtrasFolderType = getOSType!("x616578C"); | |
189 const __kContextualMenuItemsFolderType = getOSType!("cmnu"); | |
190 const __kMacOSReadMesFolderType = getOSType!("x6D6F72C"); | |
191 const __kStartupFolderType = getOSType!("strt"); | |
192 const __kShutdownFolderType = getOSType!("shdf"); | |
193 const __kAppleMenuFolderType = getOSType!("amnu"); | |
194 const __kControlPanelFolderType = getOSType!("ctrl"); | |
195 const __kSystemControlPanelFolderType = getOSType!("sctl"); | |
196 const __kExtensionFolderType = getOSType!("extn"); | |
197 const __kExtensionDisabledFolderType = getOSType!("extD"); | |
198 const __kControlPanelDisabledFolderType = getOSType!("ctrD"); | |
199 const __kSystemExtensionDisabledFolderType = getOSType!("macD"); | |
200 const __kStartupItemsDisabledFolderType = getOSType!("strD"); | |
201 const __kShutdownItemsDisabledFolderType = getOSType!("shdD"); | |
202 const __kAssistantsFolderType = getOSType!("x617374C"); | |
203 const __kStationeryFolderType = getOSType!("odst"); | |
204 const __kOpenDocFolderType = getOSType!("odod"); | |
205 const __kOpenDocShellPlugInsFolderType = getOSType!("odsp"); | |
206 const __kEditorsFolderType = getOSType!("oded"); | |
207 const __kOpenDocEditorsFolderType = getOSType!("xC46F646"); | |
208 const __kOpenDocLibrariesFolderType = getOSType!("odlb"); | |
209 const __kGenEditorsFolderType = getOSType!("xC465646"); | |
210 const __kHelpFolderType = getOSType!("xC4686C7"); | |
211 const __kInternetPlugInFolderType = getOSType!("xC46E657"); | |
212 const __kModemScriptsFolderType = getOSType!("xC46D6F6"); | |
213 const __kControlStripModulesFolderType = getOSType!("sdev"); | |
214 const __kInternetFolderType = getOSType!("x696E74C"); | |
215 const __kAppearanceFolderType = getOSType!("appr"); | |
216 const __kSoundSetsFolderType = getOSType!("snds"); | |
217 const __kDesktopPicturesFolderType = getOSType!("x647470C"); | |
218 const __kFindSupportFolderType = getOSType!("fnds"); | |
219 const __kRecentApplicationsFolderType = getOSType!("rapp"); | |
220 const __kRecentDocumentsFolderType = getOSType!("rdoc"); | |
221 const __kRecentServersFolderType = getOSType!("rsvr"); | |
222 const __kLauncherItemsFolderType = getOSType!("laun"); | |
223 const __kQuickTimeExtensionsFolderType = getOSType!("qtex"); | |
224 const __kDisplayExtensionsFolderType = getOSType!("dspl"); | |
225 const __kMultiprocessingFolderType = getOSType!("mpxf"); | |
226 const __kPrintingPlugInsFolderType = getOSType!("pplg"); | |
227 const __kAppleshareAutomountServerAliasesFolderType = getOSType!("x737276C"); | |
228 const __kVolumeSettingsFolderType = getOSType!("vsfd"); | |
229 const __kPreMacOS91ApplicationsFolderType = getOSType!("x8C70707"); | |
230 const __kPreMacOS91InstallerLogsFolderType = getOSType!("x946C676"); | |
231 const __kPreMacOS91AssistantsFolderType = getOSType!("x8C7374C"); | |
232 const __kPreMacOS91UtilitiesFolderType = getOSType!("x9F7469C"); | |
233 const __kPreMacOS91AppleExtrasFolderType = getOSType!("x8C6578C"); | |
234 const __kPreMacOS91MacOSReadMesFolderType = getOSType!("xB56F72C"); | |
235 const __kPreMacOS91InternetFolderType = getOSType!("x946E74C"); | |
236 const __kPreMacOS91AutomountedServersFolderType = getOSType!("xA77276C"); | |
237 const __kPreMacOS91StationeryFolderType = getOSType!("xBF64737"); | |
238 const __kLocalesFolderType = getOSType!("xC46C6F6"); | |
239 const __kFindByContentPluginsFolderType = getOSType!("fbcp"); | |
240 const __kFindByContentFolderType = getOSType!("fbcf"); | |
241 | |
242 } | |
243 } | |
244 | |
245 // This is needed otherwise the enums will fail compiling with gdc | |
246 version (GNU) | |
247 { | |
248 private | |
249 { | |
250 const __kMagicTemporaryItemsFolderType = getOSType!("mtmp"); | |
251 const __kTemporaryItemsInUserDomainFolderType = getOSType!("temq"); | |
252 const __kCurrentUserRemoteFolderLocation = getOSType!("rusf"); | |
253 const __kCurrentUserRemoteFolderType = getOSType!("rusr"); | |
254 | |
255 } | |
256 } | |
257 | |
258 // This is needed otherwise the enums will fail compiling with gdc | |
259 version (GNU) | |
260 { | |
261 private | |
262 { | |
263 const __kDeveloperDocsFolderType = getOSType!("ddoc"); | |
264 const __kDeveloperHelpFolderType = getOSType!("devh"); | |
265 const __kDeveloperFolderType = getOSType!("devf"); | |
266 const __kDeveloperApplicationsFolderType = getOSType!("dapp"); | |
267 | |
268 } | |
269 } | |
270 | |
271 // This is needed otherwise the enums will fail compiling with gdc | |
272 version (GNU) | |
273 { | |
274 private | |
275 { | |
276 const __kRelativeFolder = getOSType!("relf"); | |
277 const __kRedirectedRelativeFolder = getOSType!("rrel"); | |
278 const __kSpecialFolder = getOSType!("spcf"); | |
279 | |
280 } | |
281 } | |
282 | |
283 // This is needed otherwise the enums will fail compiling with gdc | |
284 version (GNU) | |
285 { | |
286 private | |
287 { | |
288 const __kBlessedFolder = getOSType!("blsf"); | |
289 const __kRootFolder = getOSType!("rotf"); | |
290 | |
291 } | |
292 } | |
293 | |
294 // This is needed otherwise the enums will fail compiling with gdc | |
295 version (GNU) | |
296 { | |
297 private | |
298 { | |
299 const __kCurrentUserFolderLocation = getOSType!("cusf"); | |
300 | |
301 } | |
302 } | |
303 | |
304 // This is needed otherwise the enums will fail compiling with gdc | |
305 version (GNU) | |
306 { | |
307 private | |
308 { | |
309 const __kDictionariesFolderType = getOSType!("dict"); | |
310 const __kLogsFolderType = getOSType!("logs"); | |
311 const __kPreferencePanesFolderType = getOSType!("ppan"); | |
312 | |
313 } | |
314 } | |
315 | |
316 // This is needed otherwise the enums will fail compiling with gdc | |
317 version (GNU) | |
318 { | |
319 private | |
320 { | |
321 const __kWidgetsFolderType = getOSType!("wdgt"); | |
322 const __kScreenSaversFolderType = getOSType!("scrn"); | |
323 | |
324 } | |
325 } | |
326 | |
327 enum | |
328 { | |
329 kOnSystemDisk = -32768L, | |
330 kOnAppropriateDisk = -32767, | |
331 kSystemDomain = -32766, | |
332 kLocalDomain = -32765, | |
333 kNetworkDomain = -32764, | |
334 kUserDomain = -32763, | |
335 kClassicDomain = -32762, | |
336 kFolderManagerLastDomain = -32760 | |
337 } | |
338 | |
339 enum | |
340 { | |
341 kLastDomainConstant = -32760 | |
342 } | |
343 | |
344 enum | |
345 { | |
346 kCreateFolder = 1, | |
347 kDontCreateFolder = 0 | |
348 } | |
349 | |
350 enum | |
351 { | |
352 kDesktopFolderType = getOSType!("desk"), | |
353 kTrashFolderType = getOSType!("trsh"), | |
354 kWhereToEmptyTrashFolderType = getOSType!("empt"), | |
355 kFontsFolderType = getOSType!("font"), | |
356 kPreferencesFolderType = getOSType!("pref"), | |
357 kSystemPreferencesFolderType = getOSType!("sprf"), | |
358 kTemporaryFolderType = getOSType!("temp"), | |
359 kChewableItemsFolderType = getOSType!("flnt"), | |
360 kTemporaryItemsInCacheDataFolderType = getOSType!("vtmp"), | |
361 kApplicationsFolderType = getOSType!("apps"), | |
362 kVolumeRootFolderType = getOSType!("root"), | |
363 kDomainTopLevelFolderType = getOSType!("dtop"), | |
364 kDomainLibraryFolderType = getOSType!("dlib"), | |
365 kUsersFolderType = getOSType!("usrs"), | |
366 kCurrentUserFolderType = getOSType!("cusr"), | |
367 kSharedUserDataFolderType = getOSType!("sdat") | |
368 } | |
369 | |
370 enum | |
371 { | |
372 kDocumentsFolderType = getOSType!("docs"), | |
373 kPictureDocumentsFolderType = getOSType!("pdoc"), | |
374 kMovieDocumentsFolderType = getOSType!("mdoc"), | |
375 kMusicDocumentsFolderType = getOSType!("xB5646F6"), | |
376 kInternetSitesFolderType = getOSType!("site"), | |
377 kPublicFolderType = getOSType!("pubb") | |
378 } | |
379 | |
380 enum | |
381 { | |
382 kSharedLibrariesFolderType = 0xC46C6962, | |
383 kVoicesFolderType = getOSType!("fvoc"), | |
384 kUtilitiesFolderType = getOSType!("x757469C"), | |
385 kThemesFolderType = getOSType!("thme"), | |
386 kFavoritesFolderType = getOSType!("favs"), | |
387 kInternetSearchSitesFolderType = getOSType!("issf"), | |
388 kInstallerLogsFolderType = getOSType!("ilgf"), | |
389 kScriptsFolderType = getOSType!("x736372C"), | |
390 kFolderActionsFolderType = getOSType!("fasf"), | |
391 kSpeakableItemsFolderType = getOSType!("spki"), | |
392 kKeychainFolderType = getOSType!("kchn") | |
393 } | |
394 | |
395 enum | |
396 { | |
397 kColorSyncFolderType = getOSType!("sync"), | |
398 kColorSyncCMMFolderType = getOSType!("ccmm"), | |
399 kColorSyncScriptingFolderType = getOSType!("cscr"), | |
400 kPrintersFolderType = getOSType!("impr"), | |
401 kSpeechFolderType = getOSType!("spch"), | |
402 kCarbonLibraryFolderType = getOSType!("carb"), | |
403 kDocumentationFolderType = getOSType!("info"), | |
404 kISSDownloadsFolderType = getOSType!("issd"), | |
405 kUserSpecificTmpFolderType = getOSType!("utmp"), | |
406 kCachedDataFolderType = getOSType!("cach"), | |
407 kFrameworksFolderType = getOSType!("fram"), | |
408 kPrivateFrameworksFolderType = getOSType!("pfrm"), | |
409 kClassicDesktopFolderType = getOSType!("sdsk"), | |
410 kSystemSoundsFolderType = getOSType!("ssnd"), | |
411 kComponentsFolderType = getOSType!("cmpd"), | |
412 kQuickTimeComponentsFolderType = getOSType!("wcmp"), | |
413 kCoreServicesFolderType = getOSType!("csrv"), | |
414 kAudioSupportFolderType = getOSType!("adio"), | |
415 kAudioPresetsFolderType = getOSType!("apst"), | |
416 kAudioSoundsFolderType = getOSType!("asnd"), | |
417 kAudioSoundBanksFolderType = getOSType!("bank"), | |
418 kAudioAlertSoundsFolderType = getOSType!("alrt"), | |
419 kAudioPlugInsFolderType = getOSType!("aplg"), | |
420 kAudioComponentsFolderType = getOSType!("acmp"), | |
421 kKernelExtensionsFolderType = getOSType!("kext"), | |
422 kDirectoryServicesFolderType = getOSType!("dsrv"), | |
423 kDirectoryServicesPlugInsFolderType = getOSType!("dplg"), | |
424 kInstallerReceiptsFolderType = getOSType!("rcpt"), | |
425 kFileSystemSupportFolderType = getOSType!("fsys"), | |
426 kAppleShareSupportFolderType = getOSType!("shar"), | |
427 kAppleShareAuthenticationFolderType = getOSType!("auth"), | |
428 kMIDIDriversFolderType = getOSType!("midi"), | |
429 kKeyboardLayoutsFolderType = getOSType!("klay"), | |
430 kIndexFilesFolderType = getOSType!("indx"), | |
431 kFindByContentIndexesFolderType = getOSType!("fbcx"), | |
432 kManagedItemsFolderType = getOSType!("mang"), | |
433 kBootTimeStartupItemsFolderType = getOSType!("empz"), | |
434 kAutomatorWorkflowsFolderType = getOSType!("flow"), | |
435 kAutosaveInformationFolderType = getOSType!("asav"), | |
436 kSpotlightSavedSearchesFolderType = getOSType!("spot"), | |
437 kSpotlightImportersFolderType = getOSType!("simp"), | |
438 kSpotlightMetadataCacheFolderType = getOSType!("scch"), | |
439 kInputManagersFolderType = getOSType!("inpt"), | |
440 kInputMethodsFolderType = getOSType!("inpf"), | |
441 kLibraryAssistantsFolderType = getOSType!("astl"), | |
442 kAudioDigidesignFolderType = getOSType!("adig"), | |
443 kAudioVSTFolderType = getOSType!("avst"), | |
444 kColorPickersFolderType = getOSType!("cpkr"), | |
445 kCompositionsFolderType = getOSType!("cmps"), | |
446 kFontCollectionsFolderType = getOSType!("fncl"), | |
447 kiMovieFolderType = getOSType!("imov"), | |
448 kiMoviePlugInsFolderType = getOSType!("impi"), | |
449 kiMovieSoundEffectsFolderType = getOSType!("imse"), | |
450 kDownloadsFolderType = getOSType!("down") | |
451 } | |
452 | |
453 enum | |
454 { | |
455 kColorSyncProfilesFolderType = getOSType!("prof"), | |
456 kApplicationSupportFolderType = getOSType!("asup"), | |
457 kTextEncodingsFolderType = getOSType!("xC474657"), | |
458 kPrinterDescriptionFolderType = getOSType!("ppdf"), | |
459 kPrinterDriverFolderType = getOSType!("xC470726"), | |
460 kScriptingAdditionsFolderType = getOSType!("xC473637") | |
461 } | |
462 | |
463 enum | |
464 { | |
465 kClassicPreferencesFolderType = getOSType!("cprf") | |
466 } | |
467 | |
468 enum | |
469 { | |
470 kSystemFolderType = getOSType!("macs"), | |
471 kSystemDesktopFolderType = getOSType!("sdsk"), | |
472 kSystemTrashFolderType = getOSType!("strs"), | |
473 kPrintMonitorDocsFolderType = getOSType!("prnt"), | |
474 kALMModulesFolderType = getOSType!("walk"), | |
475 kALMPreferencesFolderType = getOSType!("trip"), | |
476 kALMLocationsFolderType = getOSType!("fall"), | |
477 kAppleExtrasFolderType = getOSType!("x616578C"), | |
478 kContextualMenuItemsFolderType = getOSType!("cmnu"), | |
479 kMacOSReadMesFolderType = getOSType!("x6D6F72C"), | |
480 kStartupFolderType = getOSType!("strt"), | |
481 kShutdownFolderType = getOSType!("shdf"), | |
482 kAppleMenuFolderType = getOSType!("amnu"), | |
483 kControlPanelFolderType = getOSType!("ctrl"), | |
484 kSystemControlPanelFolderType = getOSType!("sctl"), | |
485 kExtensionFolderType = getOSType!("extn"), | |
486 kExtensionDisabledFolderType = getOSType!("extD"), | |
487 kControlPanelDisabledFolderType = getOSType!("ctrD"), | |
488 kSystemExtensionDisabledFolderType = getOSType!("macD"), | |
489 kStartupItemsDisabledFolderType = getOSType!("strD"), | |
490 kShutdownItemsDisabledFolderType = getOSType!("shdD"), | |
491 kAssistantsFolderType = getOSType!("x617374C"), | |
492 kStationeryFolderType = getOSType!("odst"), | |
493 kOpenDocFolderType = getOSType!("odod"), | |
494 kOpenDocShellPlugInsFolderType = getOSType!("odsp"), | |
495 kEditorsFolderType = getOSType!("oded"), | |
496 kOpenDocEditorsFolderType = getOSType!("xC46F646"), | |
497 kOpenDocLibrariesFolderType = getOSType!("odlb"), | |
498 kGenEditorsFolderType = getOSType!("xC465646"), | |
499 kHelpFolderType = getOSType!("xC4686C7"), | |
500 kInternetPlugInFolderType = getOSType!("xC46E657"), | |
501 kModemScriptsFolderType = getOSType!("xC46D6F6"), | |
502 kControlStripModulesFolderType = getOSType!("sdev"), | |
503 kInternetFolderType = getOSType!("x696E74C"), | |
504 kAppearanceFolderType = getOSType!("appr"), | |
505 kSoundSetsFolderType = getOSType!("snds"), | |
506 kDesktopPicturesFolderType = getOSType!("x647470C"), | |
507 kFindSupportFolderType = getOSType!("fnds"), | |
508 kRecentApplicationsFolderType = getOSType!("rapp"), | |
509 kRecentDocumentsFolderType = getOSType!("rdoc"), | |
510 kRecentServersFolderType = getOSType!("rsvr"), | |
511 kLauncherItemsFolderType = getOSType!("laun"), | |
512 kQuickTimeExtensionsFolderType = getOSType!("qtex"), | |
513 kDisplayExtensionsFolderType = getOSType!("dspl"), | |
514 kMultiprocessingFolderType = getOSType!("mpxf"), | |
515 kPrintingPlugInsFolderType = getOSType!("pplg"), | |
516 kAppleshareAutomountServerAliasesFolderType = getOSType!("x737276C"), | |
517 kVolumeSettingsFolderType = getOSType!("vsfd"), | |
518 kPreMacOS91ApplicationsFolderType = getOSType!("x8C70707"), | |
519 kPreMacOS91InstallerLogsFolderType = getOSType!("x946C676"), | |
520 kPreMacOS91AssistantsFolderType = getOSType!("x8C7374C"), | |
521 kPreMacOS91UtilitiesFolderType = getOSType!("x9F7469C"), | |
522 kPreMacOS91AppleExtrasFolderType = getOSType!("x8C6578C"), | |
523 kPreMacOS91MacOSReadMesFolderType = getOSType!("xB56F72C"), | |
524 kPreMacOS91InternetFolderType = getOSType!("x946E74C"), | |
525 kPreMacOS91AutomountedServersFolderType = getOSType!("xA77276C"), | |
526 kPreMacOS91StationeryFolderType = getOSType!("xBF64737"), | |
527 kLocalesFolderType = getOSType!("xC46C6F6"), | |
528 kFindByContentPluginsFolderType = getOSType!("fbcp"), | |
529 kFindByContentFolderType = getOSType!("fbcf") | |
530 } | |
531 | |
532 enum | |
533 { | |
534 kMagicTemporaryItemsFolderType = getOSType!("mtmp"), | |
535 kTemporaryItemsInUserDomainFolderType = getOSType!("temq"), | |
536 kCurrentUserRemoteFolderLocation = getOSType!("rusf"), | |
537 kCurrentUserRemoteFolderType = getOSType!("rusr") | |
538 } | |
539 | |
540 enum | |
541 { | |
542 kDeveloperDocsFolderType = getOSType!("ddoc"), | |
543 kDeveloperHelpFolderType = getOSType!("devh"), | |
544 kDeveloperFolderType = getOSType!("devf"), | |
545 kDeveloperApplicationsFolderType = getOSType!("dapp") | |
546 } | |
547 | |
548 enum | |
549 { | |
550 kCreateFolderAtBoot = 0x00000002, | |
551 kCreateFolderAtBootBit = 1, | |
552 kFolderCreatedInvisible = 0x00000004, | |
553 kFolderCreatedInvisibleBit = 2, | |
554 kFolderCreatedNameLocked = 0x00000008, | |
555 kFolderCreatedNameLockedBit = 3, | |
556 kFolderCreatedAdminPrivs = 0x00000010, | |
557 kFolderCreatedAdminPrivsBit = 4 | |
558 } | |
559 | |
560 enum | |
561 { | |
562 kFolderInUserFolder = 0x00000020, | |
563 kFolderInUserFolderBit = 5, | |
564 kFolderTrackedByAlias = 0x00000040, | |
565 kFolderTrackedByAliasBit = 6, | |
566 kFolderInRemoteUserFolderIfAvailable = 0x00000080, | |
567 kFolderInRemoteUserFolderIfAvailableBit = 7, | |
568 kFolderNeverMatchedInIdentifyFolder = 0x00000100, | |
569 kFolderNeverMatchedInIdentifyFolderBit = 8, | |
570 kFolderMustStayOnSameVolume = 0x00000200, | |
571 kFolderMustStayOnSameVolumeBit = 9, | |
572 kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledMask = 0x00000400, | |
573 kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledBit = 10, | |
574 kFolderInLocalOrRemoteUserFolder = kFolderInUserFolder | kFolderInRemoteUserFolderIfAvailable, | |
575 kFolderManagerNotCreatedOnRemoteVolumesBit = 11, | |
576 kFolderManagerNotCreatedOnRemoteVolumesMask = (1 << kFolderManagerNotCreatedOnRemoteVolumesBit), | |
577 kFolderManagerNewlyCreatedFolderIsLocalizedBit = 12, | |
578 kFolderManagerNewlyCreatedFolderShouldHaveDotLocalizedCreatedWithinMask = (1 << kFolderManagerNewlyCreatedFolderIsLocalizedBit) | |
579 } | |
580 | |
581 enum | |
582 { | |
583 kRelativeFolder = getOSType!("relf"), | |
584 kRedirectedRelativeFolder = getOSType!("rrel"), | |
585 kSpecialFolder = getOSType!("spcf") | |
586 } | |
587 | |
588 enum | |
589 { | |
590 kBlessedFolder = getOSType!("blsf"), | |
591 kRootFolder = getOSType!("rotf") | |
592 } | |
593 | |
594 enum | |
595 { | |
596 kCurrentUserFolderLocation = getOSType!("cusf") | |
597 } | |
598 | |
599 enum | |
600 { | |
601 kDictionariesFolderType = getOSType!("dict"), | |
602 kLogsFolderType = getOSType!("logs"), | |
603 kPreferencePanesFolderType = getOSType!("ppan") | |
604 } | |
605 | |
606 enum | |
607 { | |
608 kWidgetsFolderType = getOSType!("wdgt"), | |
609 kScreenSaversFolderType = getOSType!("scrn") | |
610 } | |
611 | |
612 struct FolderDesc | |
613 { | |
614 int descSize; | |
615 uint foldType; | |
616 uint flags; | |
617 uint foldClass; | |
618 uint foldLocation; | |
619 uint badgeSignature; | |
620 uint badgeType; | |
621 uint reserved; | |
622 ubyte[64] name; | |
623 } | |
624 | |
625 | |
626 struct FolderRouting | |
627 { | |
628 int descSize; | |
629 uint fileType; | |
630 uint routeFromFolder; | |
631 uint routeToFolder; | |
632 uint flags; | |
633 } | |
634 | |
635 extern (C) | |
636 { | |
637 short FindFolder (short vRefNum, uint folderType, ubyte createFolder, FSVolumeRefNum* foundVRefNum, SInt32* foundDirID); | |
638 short ReleaseFolder (short vRefNum, uint folderType); | |
639 short FSFindFolder (short vRefNum, uint folderType, ubyte createFolder, FSRef* foundRef); | |
640 short AddFolderDescriptor (uint foldType, uint flags, uint foldClass, uint foldLocation, uint badgeSignature, uint badgeType, char* name, ubyte replaceFlag); | |
641 short GetFolderTypes (uint requestedTypeCount, UInt32* totalTypeCount, FolderType* theTypes); | |
642 short RemoveFolderDescriptor (uint foldType); | |
643 int GetFolderNameUnicode (short vRefNum, uint foldType, FSVolumeRefNum* foundVRefNum, HFSUniStr255* name); | |
644 short InvalidateFolderDescriptorCache (short vRefNum, int dirID); | |
645 short IdentifyFolder (short vRefNum, int dirID, FolderType* foldType); | |
646 short FSDetermineIfRefIsEnclosedByFolder (short domainOrVRefNum, uint folderType, FSRef* inRef, char* outResult); | |
647 short DetermineIfPathIsEnclosedByFolder (short domainOrVRefNum, uint folderType, char* utf8Path, ubyte pathIsRealPath, char* outResult); | |
648 FolderManagerNotificationUPP NewFolderManagerNotificationUPP (FolderManagerNotificationProcPtr userRoutine); | |
649 void DisposeFolderManagerNotificationUPP (FolderManagerNotificationUPP userUPP); | |
650 int InvokeFolderManagerNotificationUPP (uint message, void* arg, void* userRefCon, FolderManagerNotificationUPP userUPP); | |
651 } |