Mercurial > projects > dstep
comparison dstep/coreservices/launchservices/IconsCore.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 22, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.coreservices.launchservices.IconsCore; | |
8 | |
9 //import dstep.AvailabilityMacros; | |
10 import dstep.coreservices.carboncore.CarbonCore; | |
11 import dstep.coreservices.osservices.OSServices; | |
12 import dstep.internal.Version; | |
13 import dstep.objc.bridge.TypeEncoding; | |
14 | |
15 struct OpaqueIconRef; | |
16 | |
17 alias OpaqueIconRef* IconRef; | |
18 alias uint IconServicesUsageFlags; | |
19 | |
20 // This is needed otherwise the enums will fail compiling with gdc | |
21 version (GNU) | |
22 { | |
23 private | |
24 { | |
25 const __kSystemIconsCreator = getOSType!("macs"); | |
26 const __kClipboardIcon = getOSType!("CLIP"); | |
27 const __kClippingUnknownTypeIcon = getOSType!("clpu"); | |
28 const __kClippingPictureTypeIcon = getOSType!("clpp"); | |
29 const __kClippingTextTypeIcon = getOSType!("clpt"); | |
30 const __kClippingSoundTypeIcon = getOSType!("clps"); | |
31 const __kDesktopIcon = getOSType!("desk"); | |
32 const __kFinderIcon = getOSType!("FNDR"); | |
33 const __kComputerIcon = getOSType!("root"); | |
34 const __kFontSuitcaseIcon = getOSType!("FFIL"); | |
35 const __kFullTrashIcon = getOSType!("ftrh"); | |
36 const __kGenericApplicationIcon = getOSType!("APPL"); | |
37 const __kGenericCDROMIcon = getOSType!("cddr"); | |
38 const __kGenericControlPanelIcon = getOSType!("APPC"); | |
39 const __kGenericControlStripModuleIcon = getOSType!("sdev"); | |
40 const __kGenericComponentIcon = getOSType!("thng"); | |
41 const __kGenericDeskAccessoryIcon = getOSType!("APPD"); | |
42 const __kGenericDocumentIcon = getOSType!("docu"); | |
43 const __kGenericEditionFileIcon = getOSType!("edtf"); | |
44 const __kGenericExtensionIcon = getOSType!("INIT"); | |
45 const __kGenericFileServerIcon = getOSType!("srvr"); | |
46 const __kGenericFontIcon = getOSType!("ffil"); | |
47 const __kGenericFontScalerIcon = getOSType!("sclr"); | |
48 const __kGenericFloppyIcon = getOSType!("flpy"); | |
49 const __kGenericHardDiskIcon = getOSType!("hdsk"); | |
50 const __kGenericIDiskIcon = getOSType!("idsk"); | |
51 const __kGenericRemovableMediaIcon = getOSType!("rmov"); | |
52 const __kGenericMoverObjectIcon = getOSType!("movr"); | |
53 const __kGenericPCCardIcon = getOSType!("pcmc"); | |
54 const __kGenericPreferencesIcon = getOSType!("pref"); | |
55 const __kGenericQueryDocumentIcon = getOSType!("qery"); | |
56 const __kGenericRAMDiskIcon = getOSType!("ramd"); | |
57 const __kGenericSharedLibaryIcon = getOSType!("shlb"); | |
58 const __kGenericStationeryIcon = getOSType!("sdoc"); | |
59 const __kGenericSuitcaseIcon = getOSType!("suit"); | |
60 const __kGenericURLIcon = getOSType!("gurl"); | |
61 const __kGenericWORMIcon = getOSType!("worm"); | |
62 const __kInternationalResourcesIcon = getOSType!("ifil"); | |
63 const __kKeyboardLayoutIcon = getOSType!("kfil"); | |
64 const __kSoundFileIcon = getOSType!("sfil"); | |
65 const __kSystemSuitcaseIcon = getOSType!("zsys"); | |
66 const __kTrashIcon = getOSType!("trsh"); | |
67 const __kTrueTypeFontIcon = getOSType!("tfil"); | |
68 const __kTrueTypeFlatFontIcon = getOSType!("sfnt"); | |
69 const __kTrueTypeMultiFlatFontIcon = getOSType!("ttcf"); | |
70 const __kUserIDiskIcon = getOSType!("udsk"); | |
71 const __kUnknownFSObjectIcon = getOSType!("unfs"); | |
72 const __kInternetLocationHTTPIcon = getOSType!("ilht"); | |
73 const __kInternetLocationFTPIcon = getOSType!("ilft"); | |
74 const __kInternetLocationAppleShareIcon = getOSType!("ilaf"); | |
75 const __kInternetLocationAppleTalkZoneIcon = getOSType!("ilat"); | |
76 const __kInternetLocationFileIcon = getOSType!("ilfi"); | |
77 const __kInternetLocationMailIcon = getOSType!("ilma"); | |
78 const __kInternetLocationNewsIcon = getOSType!("ilnw"); | |
79 const __kInternetLocationNSLNeighborhoodIcon = getOSType!("ilns"); | |
80 const __kInternetLocationGenericIcon = getOSType!("ilge"); | |
81 const __kGenericFolderIcon = getOSType!("fldr"); | |
82 const __kDropFolderIcon = getOSType!("dbox"); | |
83 const __kMountedFolderIcon = getOSType!("mntd"); | |
84 const __kOpenFolderIcon = getOSType!("ofld"); | |
85 const __kOwnedFolderIcon = getOSType!("ownd"); | |
86 const __kPrivateFolderIcon = getOSType!("prvf"); | |
87 const __kSharedFolderIcon = getOSType!("shfl"); | |
88 const __kSharingPrivsNotApplicableIcon = getOSType!("shna"); | |
89 const __kSharingPrivsReadOnlyIcon = getOSType!("shro"); | |
90 const __kSharingPrivsReadWriteIcon = getOSType!("shrw"); | |
91 const __kSharingPrivsUnknownIcon = getOSType!("shuk"); | |
92 const __kSharingPrivsWritableIcon = getOSType!("writ"); | |
93 const __kUserFolderIcon = getOSType!("ufld"); | |
94 const __kWorkgroupFolderIcon = getOSType!("wfld"); | |
95 const __kGuestUserIcon = getOSType!("gusr"); | |
96 const __kUserIcon = getOSType!("user"); | |
97 const __kOwnerIcon = getOSType!("susr"); | |
98 const __kGroupIcon = getOSType!("grup"); | |
99 const __kAppearanceFolderIcon = getOSType!("appr"); | |
100 const __kAppleMenuFolderIcon = getOSType!("amnu"); | |
101 const __kApplicationsFolderIcon = getOSType!("apps"); | |
102 const __kApplicationSupportFolderIcon = getOSType!("asup"); | |
103 const __kColorSyncFolderIcon = getOSType!("prof"); | |
104 const __kContextualMenuItemsFolderIcon = getOSType!("cmnu"); | |
105 const __kControlPanelDisabledFolderIcon = getOSType!("ctrD"); | |
106 const __kControlPanelFolderIcon = getOSType!("ctrl"); | |
107 const __kDocumentsFolderIcon = getOSType!("docs"); | |
108 const __kExtensionsDisabledFolderIcon = getOSType!("extD"); | |
109 const __kExtensionsFolderIcon = getOSType!("extn"); | |
110 const __kFavoritesFolderIcon = getOSType!("favs"); | |
111 const __kFontsFolderIcon = getOSType!("font"); | |
112 const __kInternetSearchSitesFolderIcon = getOSType!("issf"); | |
113 const __kPublicFolderIcon = getOSType!("pubf"); | |
114 const __kPrinterDescriptionFolderIcon = getOSType!("ppdf"); | |
115 const __kPrintMonitorFolderIcon = getOSType!("prnt"); | |
116 const __kRecentApplicationsFolderIcon = getOSType!("rapp"); | |
117 const __kRecentDocumentsFolderIcon = getOSType!("rdoc"); | |
118 const __kRecentServersFolderIcon = getOSType!("rsrv"); | |
119 const __kShutdownItemsDisabledFolderIcon = getOSType!("shdD"); | |
120 const __kShutdownItemsFolderIcon = getOSType!("shdf"); | |
121 const __kSpeakableItemsFolder = getOSType!("spki"); | |
122 const __kStartupItemsDisabledFolderIcon = getOSType!("strD"); | |
123 const __kStartupItemsFolderIcon = getOSType!("strt"); | |
124 const __kSystemExtensionDisabledFolderIcon = getOSType!("macD"); | |
125 const __kSystemFolderIcon = getOSType!("macs"); | |
126 const __kVoicesFolderIcon = getOSType!("fvoc"); | |
127 const __kAppleScriptBadgeIcon = getOSType!("scrp"); | |
128 const __kLockedBadgeIcon = getOSType!("lbdg"); | |
129 const __kMountedBadgeIcon = getOSType!("mbdg"); | |
130 const __kSharedBadgeIcon = getOSType!("sbdg"); | |
131 const __kAliasBadgeIcon = getOSType!("abdg"); | |
132 const __kAlertCautionBadgeIcon = getOSType!("cbdg"); | |
133 const __kAlertNoteIcon = getOSType!("note"); | |
134 const __kAlertCautionIcon = getOSType!("caut"); | |
135 const __kAlertStopIcon = getOSType!("stop"); | |
136 const __kAppleTalkIcon = getOSType!("atlk"); | |
137 const __kAppleTalkZoneIcon = getOSType!("atzn"); | |
138 const __kAFPServerIcon = getOSType!("afps"); | |
139 const __kFTPServerIcon = getOSType!("ftps"); | |
140 const __kHTTPServerIcon = getOSType!("htps"); | |
141 const __kGenericNetworkIcon = getOSType!("gnet"); | |
142 const __kIPFileServerIcon = getOSType!("isrv"); | |
143 const __kToolbarCustomizeIcon = getOSType!("tcus"); | |
144 const __kToolbarDeleteIcon = getOSType!("tdel"); | |
145 const __kToolbarFavoritesIcon = getOSType!("tfav"); | |
146 const __kToolbarHomeIcon = getOSType!("thom"); | |
147 const __kAppleLogoIcon = getOSType!("capl"); | |
148 const __kAppleMenuIcon = getOSType!("sapl"); | |
149 const __kBackwardArrowIcon = getOSType!("baro"); | |
150 const __kFavoriteItemsIcon = getOSType!("favr"); | |
151 const __kForwardArrowIcon = getOSType!("faro"); | |
152 const __kGridIcon = getOSType!("grid"); | |
153 const __kHelpIcon = getOSType!("help"); | |
154 const __kKeepArrangedIcon = getOSType!("arng"); | |
155 const __kLockedIcon = getOSType!("lock"); | |
156 const __kNoFilesIcon = getOSType!("nfil"); | |
157 const __kNoFolderIcon = getOSType!("nfld"); | |
158 const __kNoWriteIcon = getOSType!("nwrt"); | |
159 const __kProtectedApplicationFolderIcon = getOSType!("papp"); | |
160 const __kProtectedSystemFolderIcon = getOSType!("psys"); | |
161 const __kRecentItemsIcon = getOSType!("rcnt"); | |
162 const __kShortcutIcon = getOSType!("shrt"); | |
163 const __kSortAscendingIcon = getOSType!("asnd"); | |
164 const __kSortDescendingIcon = getOSType!("dsnd"); | |
165 const __kUnlockedIcon = getOSType!("ulck"); | |
166 const __kConnectToIcon = getOSType!("cnct"); | |
167 const __kGenericWindowIcon = getOSType!("gwin"); | |
168 const __kQuestionMarkIcon = getOSType!("ques"); | |
169 const __kDeleteAliasIcon = getOSType!("dali"); | |
170 const __kEjectMediaIcon = getOSType!("ejec"); | |
171 const __kBurningIcon = getOSType!("burn"); | |
172 const __kRightContainerArrowIcon = getOSType!("rcar"); | |
173 } | |
174 } | |
175 | |
176 enum | |
177 { | |
178 kGenericDocumentIconResource = -4000, | |
179 kGenericStationeryIconResource = -3985, | |
180 kGenericEditionFileIconResource = -3989, | |
181 kGenericApplicationIconResource = -3996, | |
182 kGenericDeskAccessoryIconResource = -3991, | |
183 kGenericFolderIconResource = -3999, | |
184 kPrivateFolderIconResource = -3994, | |
185 kFloppyIconResource = -3998, | |
186 kTrashIconResource = -3993, | |
187 kGenericRAMDiskIconResource = -3988, | |
188 kGenericCDROMIconResource = -3987 | |
189 } | |
190 | |
191 enum | |
192 { | |
193 kDesktopIconResource = -3992, | |
194 kOpenFolderIconResource = -3997, | |
195 kGenericHardDiskIconResource = -3995, | |
196 kGenericFileServerIconResource = -3972, | |
197 kGenericSuitcaseIconResource = -3970, | |
198 kGenericMoverObjectIconResource = -3969 | |
199 } | |
200 | |
201 enum | |
202 { | |
203 kGenericPreferencesIconResource = -3971, | |
204 kGenericQueryDocumentIconResource = -16506, | |
205 kGenericExtensionIconResource = -16415, | |
206 kSystemFolderIconResource = -3983, | |
207 kHelpIconResource = -20271, | |
208 kAppleMenuFolderIconResource = -3982 | |
209 } | |
210 | |
211 enum | |
212 { | |
213 genericDocumentIconResource = kGenericDocumentIconResource, | |
214 genericStationeryIconResource = kGenericStationeryIconResource, | |
215 genericEditionFileIconResource = kGenericEditionFileIconResource, | |
216 genericApplicationIconResource = kGenericApplicationIconResource, | |
217 genericDeskAccessoryIconResource = kGenericDeskAccessoryIconResource, | |
218 genericFolderIconResource = kGenericFolderIconResource, | |
219 privateFolderIconResource = kPrivateFolderIconResource, | |
220 floppyIconResource = kFloppyIconResource, | |
221 trashIconResource = kTrashIconResource, | |
222 genericRAMDiskIconResource = kGenericRAMDiskIconResource, | |
223 genericCDROMIconResource = kGenericCDROMIconResource, | |
224 desktopIconResource = kDesktopIconResource, | |
225 openFolderIconResource = kOpenFolderIconResource, | |
226 genericHardDiskIconResource = kGenericHardDiskIconResource, | |
227 genericFileServerIconResource = kGenericFileServerIconResource, | |
228 genericSuitcaseIconResource = kGenericSuitcaseIconResource, | |
229 genericMoverObjectIconResource = kGenericMoverObjectIconResource, | |
230 genericPreferencesIconResource = kGenericPreferencesIconResource, | |
231 genericQueryDocumentIconResource = kGenericQueryDocumentIconResource, | |
232 genericExtensionIconResource = kGenericExtensionIconResource, | |
233 systemFolderIconResource = kSystemFolderIconResource, | |
234 appleMenuFolderIconResource = kAppleMenuFolderIconResource | |
235 } | |
236 | |
237 enum | |
238 { | |
239 kStartupFolderIconResource = -3981, | |
240 kOwnedFolderIconResource = -3980, | |
241 kDropFolderIconResource = -3979, | |
242 kSharedFolderIconResource = -3978, | |
243 kMountedFolderIconResource = -3977, | |
244 kControlPanelFolderIconResource = -3976, | |
245 kPrintMonitorFolderIconResource = -3975, | |
246 kPreferencesFolderIconResource = -3974, | |
247 kExtensionsFolderIconResource = -3973, | |
248 kFontsFolderIconResource = -3968, | |
249 kFullTrashIconResource = -3984 | |
250 } | |
251 | |
252 enum | |
253 { | |
254 startupFolderIconResource = kStartupFolderIconResource, | |
255 ownedFolderIconResource = kOwnedFolderIconResource, | |
256 dropFolderIconResource = kDropFolderIconResource, | |
257 sharedFolderIconResource = kSharedFolderIconResource, | |
258 mountedFolderIconResource = kMountedFolderIconResource, | |
259 controlPanelFolderIconResource = kControlPanelFolderIconResource, | |
260 printMonitorFolderIconResource = kPrintMonitorFolderIconResource, | |
261 preferencesFolderIconResource = kPreferencesFolderIconResource, | |
262 extensionsFolderIconResource = kExtensionsFolderIconResource, | |
263 fontsFolderIconResource = kFontsFolderIconResource, | |
264 fullTrashIconResource = kFullTrashIconResource | |
265 } | |
266 | |
267 enum | |
268 { | |
269 kSystemIconsCreator = getOSType!("macs") | |
270 } | |
271 | |
272 enum | |
273 { | |
274 kClipboardIcon = getOSType!("CLIP"), | |
275 kClippingUnknownTypeIcon = getOSType!("clpu"), | |
276 kClippingPictureTypeIcon = getOSType!("clpp"), | |
277 kClippingTextTypeIcon = getOSType!("clpt"), | |
278 kClippingSoundTypeIcon = getOSType!("clps"), | |
279 kDesktopIcon = getOSType!("desk"), | |
280 kFinderIcon = getOSType!("FNDR"), | |
281 kComputerIcon = getOSType!("root"), | |
282 kFontSuitcaseIcon = getOSType!("FFIL"), | |
283 kFullTrashIcon = getOSType!("ftrh"), | |
284 kGenericApplicationIcon = getOSType!("APPL"), | |
285 kGenericCDROMIcon = getOSType!("cddr"), | |
286 kGenericControlPanelIcon = getOSType!("APPC"), | |
287 kGenericControlStripModuleIcon = getOSType!("sdev"), | |
288 kGenericComponentIcon = getOSType!("thng"), | |
289 kGenericDeskAccessoryIcon = getOSType!("APPD"), | |
290 kGenericDocumentIcon = getOSType!("docu"), | |
291 kGenericEditionFileIcon = getOSType!("edtf"), | |
292 kGenericExtensionIcon = getOSType!("INIT"), | |
293 kGenericFileServerIcon = getOSType!("srvr"), | |
294 kGenericFontIcon = getOSType!("ffil"), | |
295 kGenericFontScalerIcon = getOSType!("sclr"), | |
296 kGenericFloppyIcon = getOSType!("flpy"), | |
297 kGenericHardDiskIcon = getOSType!("hdsk"), | |
298 kGenericIDiskIcon = getOSType!("idsk"), | |
299 kGenericRemovableMediaIcon = getOSType!("rmov"), | |
300 kGenericMoverObjectIcon = getOSType!("movr"), | |
301 kGenericPCCardIcon = getOSType!("pcmc"), | |
302 kGenericPreferencesIcon = getOSType!("pref"), | |
303 kGenericQueryDocumentIcon = getOSType!("qery"), | |
304 kGenericRAMDiskIcon = getOSType!("ramd"), | |
305 kGenericSharedLibaryIcon = getOSType!("shlb"), | |
306 kGenericStationeryIcon = getOSType!("sdoc"), | |
307 kGenericSuitcaseIcon = getOSType!("suit"), | |
308 kGenericURLIcon = getOSType!("gurl"), | |
309 kGenericWORMIcon = getOSType!("worm"), | |
310 kInternationalResourcesIcon = getOSType!("ifil"), | |
311 kKeyboardLayoutIcon = getOSType!("kfil"), | |
312 kSoundFileIcon = getOSType!("sfil"), | |
313 kSystemSuitcaseIcon = getOSType!("zsys"), | |
314 kTrashIcon = getOSType!("trsh"), | |
315 kTrueTypeFontIcon = getOSType!("tfil"), | |
316 kTrueTypeFlatFontIcon = getOSType!("sfnt"), | |
317 kTrueTypeMultiFlatFontIcon = getOSType!("ttcf"), | |
318 kUserIDiskIcon = getOSType!("udsk"), | |
319 kUnknownFSObjectIcon = getOSType!("unfs"), | |
320 kInternationResourcesIcon = kInternationalResourcesIcon | |
321 } | |
322 | |
323 enum | |
324 { | |
325 kInternetLocationHTTPIcon = getOSType!("ilht"), | |
326 kInternetLocationFTPIcon = getOSType!("ilft"), | |
327 kInternetLocationAppleShareIcon = getOSType!("ilaf"), | |
328 kInternetLocationAppleTalkZoneIcon = getOSType!("ilat"), | |
329 kInternetLocationFileIcon = getOSType!("ilfi"), | |
330 kInternetLocationMailIcon = getOSType!("ilma"), | |
331 kInternetLocationNewsIcon = getOSType!("ilnw"), | |
332 kInternetLocationNSLNeighborhoodIcon = getOSType!("ilns"), | |
333 kInternetLocationGenericIcon = getOSType!("ilge") | |
334 } | |
335 | |
336 enum | |
337 { | |
338 kGenericFolderIcon = getOSType!("fldr"), | |
339 kDropFolderIcon = getOSType!("dbox"), | |
340 kMountedFolderIcon = getOSType!("mntd"), | |
341 kOpenFolderIcon = getOSType!("ofld"), | |
342 kOwnedFolderIcon = getOSType!("ownd"), | |
343 kPrivateFolderIcon = getOSType!("prvf"), | |
344 kSharedFolderIcon = getOSType!("shfl") | |
345 } | |
346 | |
347 enum | |
348 { | |
349 kSharingPrivsNotApplicableIcon = getOSType!("shna"), | |
350 kSharingPrivsReadOnlyIcon = getOSType!("shro"), | |
351 kSharingPrivsReadWriteIcon = getOSType!("shrw"), | |
352 kSharingPrivsUnknownIcon = getOSType!("shuk"), | |
353 kSharingPrivsWritableIcon = getOSType!("writ") | |
354 } | |
355 | |
356 enum | |
357 { | |
358 kUserFolderIcon = getOSType!("ufld"), | |
359 kWorkgroupFolderIcon = getOSType!("wfld"), | |
360 kGuestUserIcon = getOSType!("gusr"), | |
361 kUserIcon = getOSType!("user"), | |
362 kOwnerIcon = getOSType!("susr"), | |
363 kGroupIcon = getOSType!("grup") | |
364 } | |
365 | |
366 static if (D_LP64) | |
367 { | |
368 enum : long | |
369 { | |
370 kAppearanceFolderIcon = getOSType!("appr"), | |
371 kAppleExtrasFolderIcon = 0x616578C4, | |
372 kAppleMenuFolderIcon = getOSType!("amnu"), | |
373 kApplicationsFolderIcon = getOSType!("apps"), | |
374 kApplicationSupportFolderIcon = getOSType!("asup"), | |
375 kAssistantsFolderIcon = 0x617374C4, | |
376 kColorSyncFolderIcon = getOSType!("prof"), | |
377 kContextualMenuItemsFolderIcon = getOSType!("cmnu"), | |
378 kControlPanelDisabledFolderIcon = getOSType!("ctrD"), | |
379 kControlPanelFolderIcon = getOSType!("ctrl"), | |
380 kControlStripModulesFolderIcon = 0x736476C4, | |
381 kDocumentsFolderIcon = getOSType!("docs"), | |
382 kExtensionsDisabledFolderIcon = getOSType!("extD"), | |
383 kExtensionsFolderIcon = getOSType!("extn"), | |
384 kFavoritesFolderIcon = getOSType!("favs"), | |
385 kFontsFolderIcon = getOSType!("font"), | |
386 kHelpFolderIcon = 0xC4686C70, | |
387 kInternetFolderIcon = 0x696E74C4, | |
388 kInternetPlugInFolderIcon = 0xC46E6574, | |
389 kInternetSearchSitesFolderIcon = getOSType!("issf"), | |
390 kLocalesFolderIcon = 0xC46C6F63, | |
391 kMacOSReadMeFolderIcon = 0x6D6F72C4, | |
392 kPublicFolderIcon = getOSType!("pubf"), | |
393 kPreferencesFolderIcon = 0x707266C4, | |
394 kPrinterDescriptionFolderIcon = getOSType!("ppdf"), | |
395 kPrinterDriverFolderIcon = 0xC4707264, | |
396 kPrintMonitorFolderIcon = getOSType!("prnt"), | |
397 kRecentApplicationsFolderIcon = getOSType!("rapp"), | |
398 kRecentDocumentsFolderIcon = getOSType!("rdoc"), | |
399 kRecentServersFolderIcon = getOSType!("rsrv"), | |
400 kScriptingAdditionsFolderIcon = 0xC4736372, | |
401 kSharedLibrariesFolderIcon = 0xC46C6962, | |
402 kScriptsFolderIcon = 0x736372C4, | |
403 kShutdownItemsDisabledFolderIcon = getOSType!("shdD"), | |
404 kShutdownItemsFolderIcon = getOSType!("shdf"), | |
405 kSpeakableItemsFolder = getOSType!("spki"), | |
406 kStartupItemsDisabledFolderIcon = getOSType!("strD"), | |
407 kStartupItemsFolderIcon = getOSType!("strt"), | |
408 kSystemExtensionDisabledFolderIcon = getOSType!("macD"), | |
409 kSystemFolderIcon = getOSType!("macs"), | |
410 kTextEncodingsFolderIcon = 0xC4746578, | |
411 kUsersFolderIcon = 0x757372C4, | |
412 kUtilitiesFolderIcon = 0x757469C4, | |
413 kVoicesFolderIcon = getOSType!("fvoc") | |
414 } | |
415 } | |
416 | |
417 else | |
418 { | |
419 enum | |
420 { | |
421 kAppearanceFolderIcon = getOSType!("appr"), | |
422 kAppleExtrasFolderIcon = 0x616578C4, | |
423 kAppleMenuFolderIcon = getOSType!("amnu"), | |
424 kApplicationsFolderIcon = getOSType!("apps"), | |
425 kApplicationSupportFolderIcon = getOSType!("asup"), | |
426 kAssistantsFolderIcon = 0x617374C4, | |
427 kColorSyncFolderIcon = getOSType!("prof"), | |
428 kContextualMenuItemsFolderIcon = getOSType!("cmnu"), | |
429 kControlPanelDisabledFolderIcon = getOSType!("ctrD"), | |
430 kControlPanelFolderIcon = getOSType!("ctrl"), | |
431 kControlStripModulesFolderIcon = 0x736476C4, | |
432 kDocumentsFolderIcon = getOSType!("docs"), | |
433 kExtensionsDisabledFolderIcon = getOSType!("extD"), | |
434 kExtensionsFolderIcon = getOSType!("extn"), | |
435 kFavoritesFolderIcon = getOSType!("favs"), | |
436 kFontsFolderIcon = getOSType!("font"), | |
437 kHelpFolderIcon = 0xC4686C70, | |
438 kInternetFolderIcon = 0x696E74C4, | |
439 kInternetPlugInFolderIcon = 0xC46E6574, | |
440 kInternetSearchSitesFolderIcon = getOSType!("issf"), | |
441 kLocalesFolderIcon = 0xC46C6F63, | |
442 kMacOSReadMeFolderIcon = 0x6D6F72C4, | |
443 kPublicFolderIcon = getOSType!("pubf"), | |
444 kPreferencesFolderIcon = 0x707266C4, | |
445 kPrinterDescriptionFolderIcon = getOSType!("ppdf"), | |
446 kPrinterDriverFolderIcon = 0xC4707264, | |
447 kPrintMonitorFolderIcon = getOSType!("prnt"), | |
448 kRecentApplicationsFolderIcon = getOSType!("rapp"), | |
449 kRecentDocumentsFolderIcon = getOSType!("rdoc"), | |
450 kRecentServersFolderIcon = getOSType!("rsrv"), | |
451 kScriptingAdditionsFolderIcon = 0xC4736372, | |
452 kSharedLibrariesFolderIcon = 0xC46C6962, | |
453 kScriptsFolderIcon = 0x736372C4, | |
454 kShutdownItemsDisabledFolderIcon = getOSType!("shdD"), | |
455 kShutdownItemsFolderIcon = getOSType!("shdf"), | |
456 kSpeakableItemsFolder = getOSType!("spki"), | |
457 kStartupItemsDisabledFolderIcon = getOSType!("strD"), | |
458 kStartupItemsFolderIcon = getOSType!("strt"), | |
459 kSystemExtensionDisabledFolderIcon = getOSType!("macD"), | |
460 kSystemFolderIcon = getOSType!("macs"), | |
461 kTextEncodingsFolderIcon = 0xC4746578, | |
462 kUsersFolderIcon = 0x757372C4, | |
463 kUtilitiesFolderIcon = 0x757469C4, | |
464 kVoicesFolderIcon = getOSType!("fvoc") | |
465 } | |
466 } | |
467 | |
468 enum | |
469 { | |
470 kAppleScriptBadgeIcon = getOSType!("scrp"), | |
471 kLockedBadgeIcon = getOSType!("lbdg"), | |
472 kMountedBadgeIcon = getOSType!("mbdg"), | |
473 kSharedBadgeIcon = getOSType!("sbdg"), | |
474 kAliasBadgeIcon = getOSType!("abdg"), | |
475 kAlertCautionBadgeIcon = getOSType!("cbdg") | |
476 } | |
477 | |
478 enum | |
479 { | |
480 kAlertNoteIcon = getOSType!("note"), | |
481 kAlertCautionIcon = getOSType!("caut"), | |
482 kAlertStopIcon = getOSType!("stop") | |
483 } | |
484 | |
485 enum | |
486 { | |
487 kAppleTalkIcon = getOSType!("atlk"), | |
488 kAppleTalkZoneIcon = getOSType!("atzn"), | |
489 kAFPServerIcon = getOSType!("afps"), | |
490 kFTPServerIcon = getOSType!("ftps"), | |
491 kHTTPServerIcon = getOSType!("htps"), | |
492 kGenericNetworkIcon = getOSType!("gnet"), | |
493 kIPFileServerIcon = getOSType!("isrv") | |
494 } | |
495 | |
496 enum | |
497 { | |
498 kToolbarCustomizeIcon = getOSType!("tcus"), | |
499 kToolbarDeleteIcon = getOSType!("tdel"), | |
500 kToolbarFavoritesIcon = getOSType!("tfav"), | |
501 kToolbarHomeIcon = getOSType!("thom") | |
502 } | |
503 | |
504 enum | |
505 { | |
506 kAppleLogoIcon = getOSType!("capl"), | |
507 kAppleMenuIcon = getOSType!("sapl"), | |
508 kBackwardArrowIcon = getOSType!("baro"), | |
509 kFavoriteItemsIcon = getOSType!("favr"), | |
510 kForwardArrowIcon = getOSType!("faro"), | |
511 kGridIcon = getOSType!("grid"), | |
512 kHelpIcon = getOSType!("help"), | |
513 kKeepArrangedIcon = getOSType!("arng"), | |
514 kLockedIcon = getOSType!("lock"), | |
515 kNoFilesIcon = getOSType!("nfil"), | |
516 kNoFolderIcon = getOSType!("nfld"), | |
517 kNoWriteIcon = getOSType!("nwrt"), | |
518 kProtectedApplicationFolderIcon = getOSType!("papp"), | |
519 kProtectedSystemFolderIcon = getOSType!("psys"), | |
520 kRecentItemsIcon = getOSType!("rcnt"), | |
521 kShortcutIcon = getOSType!("shrt"), | |
522 kSortAscendingIcon = getOSType!("asnd"), | |
523 kSortDescendingIcon = getOSType!("dsnd"), | |
524 kUnlockedIcon = getOSType!("ulck"), | |
525 kConnectToIcon = getOSType!("cnct"), | |
526 kGenericWindowIcon = getOSType!("gwin"), | |
527 kQuestionMarkIcon = getOSType!("ques"), | |
528 kDeleteAliasIcon = getOSType!("dali"), | |
529 kEjectMediaIcon = getOSType!("ejec"), | |
530 kBurningIcon = getOSType!("burn"), | |
531 kRightContainerArrowIcon = getOSType!("rcar") | |
532 } | |
533 | |
534 enum | |
535 { | |
536 kIconServicesNormalUsageFlag = 0x00000000, | |
537 kIconServicesNoBadgeFlag = 0x00000001, | |
538 kIconServicesUpdateIfNeededFlag = 0x00000002 | |
539 } | |
540 | |
541 enum | |
542 { | |
543 kIconServicesCatalogInfoMask = (kFSCatInfoNodeID | kFSCatInfoParentDirID | kFSCatInfoVolume | kFSCatInfoNodeFlags | kFSCatInfoFinderInfo | kFSCatInfoFinderXInfo | kFSCatInfoUserAccess | kFSCatInfoPermissions | kFSCatInfoContentMod) | |
544 } | |
545 | |
546 extern (C) | |
547 { | |
548 short GetIconRefOwners (IconRef theIconRef, UInt16* owners); | |
549 short AcquireIconRef (IconRef theIconRef); | |
550 short ReleaseIconRef (IconRef theIconRef); | |
551 short GetIconRef (short vRefNum, uint creator, uint iconType, IconRef* theIconRef); | |
552 short GetIconRefFromFolder (short vRefNum, int parentFolderID, int folderID, byte attributes, byte accessPrivileges, IconRef* theIconRef); | |
553 int GetIconRefFromFileInfo (FSRef* inRef, uint inFileNameLength, wchar* inFileName, uint inWhichInfo, FSCatalogInfo* inCatalogInfo, uint inUsageFlags, IconRef* outIconRef, SInt16* outLabel); | |
554 short GetIconRefFromTypeInfo (uint inCreator, uint inType, CFStringRef inExtension, CFStringRef inMIMEType, uint inUsageFlags, IconRef* outIconRef); | |
555 int GetIconRefFromIconFamilyPtr (IconFamilyResource* inIconFamilyPtr, int inSize, IconRef* outIconRef); | |
556 int GetIconRefFromComponent (Component inComponent, IconRef* outIconRef); | |
557 short RegisterIconRefFromIconFamily (uint creator, uint iconType, IconFamilyHandle iconFamily, IconRef* theIconRef); | |
558 int RegisterIconRefFromFSRef (uint creator, uint iconType, FSRef* iconFile, IconRef* theIconRef); | |
559 short UnregisterIconRef (uint creator, uint iconType); | |
560 short UpdateIconRef (IconRef theIconRef); | |
561 short OverrideIconRef (IconRef oldIconRef, IconRef newIconRef); | |
562 short RemoveIconRefOverride (IconRef theIconRef); | |
563 short CompositeIconRef (IconRef backgroundIconRef, IconRef foregroundIconRef, IconRef* compositeIconRef); | |
564 short IsIconRefComposite (IconRef compositeIconRef, IconRef* backgroundIconRef, IconRef* foregroundIconRef); | |
565 ubyte IsValidIconRef (IconRef theIconRef); | |
566 ubyte IsDataAvailableInIconRef (uint inIconKind, IconRef inIconRef); | |
567 short SetCustomIconsEnabled (short vRefNum, ubyte enableCustomIcons); | |
568 short GetCustomIconsEnabled (short vRefNum, char* customIconsEnabled); | |
569 int ReadIconFromFSRef (FSRef* ref_, IconFamilyHandle* iconFamily); | |
570 } |