Icons.pas 71 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064
  1. {
  2. File: Icons.p
  3. Contains: Icon Utilities and Icon Services Interfaces.
  4. Version: Technology: Mac OS 9.x
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 1990-2002 by Apple Computer, Inc. All rights reserved
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. { Pascal Translation Updated: Gale R Paeper, <[email protected]>, 2006 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 200
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$CALLING MWPASCAL}
  22. unit Icons;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  25. {$setc GAP_INTERFACES_VERSION := $0200}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __i386__ and defined CPUI386}
  41. {$setc __i386__ := 1}
  42. {$elsec}
  43. {$setc __i386__ := 0}
  44. {$endc}
  45. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  46. {$error Conflicting definitions for __ppc__ and __i386__}
  47. {$endc}
  48. {$ifc defined __ppc__ and __ppc__}
  49. {$setc TARGET_CPU_PPC := TRUE}
  50. {$setc TARGET_CPU_X86 := FALSE}
  51. {$elifc defined __i386__ and __i386__}
  52. {$setc TARGET_CPU_PPC := FALSE}
  53. {$setc TARGET_CPU_X86 := TRUE}
  54. {$elsec}
  55. {$error Neither __ppc__ nor __i386__ is defined.}
  56. {$endc}
  57. {$setc TARGET_CPU_PPC_64 := FALSE}
  58. {$ifc defined FPC_BIG_ENDIAN}
  59. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  60. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  61. {$elifc defined FPC_LITTLE_ENDIAN}
  62. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  63. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  64. {$elsec}
  65. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  66. {$endc}
  67. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  68. {$setc CALL_NOT_IN_CARBON := FALSE}
  69. {$setc OLDROUTINENAMES := FALSE}
  70. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  71. {$setc OPAQUE_UPP_TYPES := TRUE}
  72. {$setc OTCARBONAPPLICATION := TRUE}
  73. {$setc OTKERNEL := FALSE}
  74. {$setc PM_USE_SESSION_APIS := TRUE}
  75. {$setc TARGET_API_MAC_CARBON := TRUE}
  76. {$setc TARGET_API_MAC_OS8 := FALSE}
  77. {$setc TARGET_API_MAC_OSX := TRUE}
  78. {$setc TARGET_CARBON := TRUE}
  79. {$setc TARGET_CPU_68K := FALSE}
  80. {$setc TARGET_CPU_MIPS := FALSE}
  81. {$setc TARGET_CPU_SPARC := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_UNIX := FALSE}
  84. {$setc TARGET_OS_WIN32 := FALSE}
  85. {$setc TARGET_RT_MAC_68881 := FALSE}
  86. {$setc TARGET_RT_MAC_CFM := FALSE}
  87. {$setc TARGET_RT_MAC_MACHO := TRUE}
  88. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  89. {$setc TYPE_BOOL := FALSE}
  90. {$setc TYPE_EXTENDED := FALSE}
  91. {$setc TYPE_LONGLONG := TRUE}
  92. uses MacTypes,CFBase,CGGeometry,Quickdraw,Files,CodeFragments,CGContext;
  93. {$ALIGN MAC68K}
  94. { The following are icons for which there are both icon suites and SICNs. }
  95. { Avoid using icon resources if possible. Use IconServices instead. }
  96. const
  97. kGenericDocumentIconResource = -4000;
  98. kGenericStationeryIconResource = -3985;
  99. kGenericEditionFileIconResource = -3989;
  100. kGenericApplicationIconResource = -3996;
  101. kGenericDeskAccessoryIconResource = -3991;
  102. kGenericFolderIconResource = -3999;
  103. kPrivateFolderIconResource = -3994;
  104. kFloppyIconResource = -3998;
  105. kTrashIconResource = -3993;
  106. kGenericRAMDiskIconResource = -3988;
  107. kGenericCDROMIconResource = -3987;
  108. { The following are icons for which there are SICNs only. }
  109. { Avoid using icon resources if possible. Use IconServices instead. }
  110. kDesktopIconResource = -3992;
  111. kOpenFolderIconResource = -3997;
  112. kGenericHardDiskIconResource = -3995;
  113. kGenericFileServerIconResource = -3972;
  114. kGenericSuitcaseIconResource = -3970;
  115. kGenericMoverObjectIconResource = -3969;
  116. { The following are icons for which there are icon suites only. }
  117. { Avoid using icon resources if possible. Use IconServices instead. }
  118. kGenericPreferencesIconResource = -3971;
  119. kGenericQueryDocumentIconResource = -16506;
  120. kGenericExtensionIconResource = -16415;
  121. kSystemFolderIconResource = -3983;
  122. kHelpIconResource = -20271;
  123. kAppleMenuFolderIconResource = -3982;
  124. { Obsolete. Use named constants defined above. }
  125. genericDocumentIconResource = -4000;
  126. genericStationeryIconResource = -3985;
  127. genericEditionFileIconResource = -3989;
  128. genericApplicationIconResource = -3996;
  129. genericDeskAccessoryIconResource = -3991;
  130. genericFolderIconResource = -3999;
  131. privateFolderIconResource = -3994;
  132. floppyIconResource = -3998;
  133. trashIconResource = -3993;
  134. genericRAMDiskIconResource = -3988;
  135. genericCDROMIconResource = -3987;
  136. desktopIconResource = -3992;
  137. openFolderIconResource = -3997;
  138. genericHardDiskIconResource = -3995;
  139. genericFileServerIconResource = -3972;
  140. genericSuitcaseIconResource = -3970;
  141. genericMoverObjectIconResource = -3969;
  142. genericPreferencesIconResource = -3971;
  143. genericQueryDocumentIconResource = -16506;
  144. genericExtensionIconResource = -16415;
  145. systemFolderIconResource = -3983;
  146. appleMenuFolderIconResource = -3982;
  147. { Avoid using icon resources if possible. Use IconServices instead. }
  148. kStartupFolderIconResource = -3981;
  149. kOwnedFolderIconResource = -3980;
  150. kDropFolderIconResource = -3979;
  151. kSharedFolderIconResource = -3978;
  152. kMountedFolderIconResource = -3977;
  153. kControlPanelFolderIconResource = -3976;
  154. kPrintMonitorFolderIconResource = -3975;
  155. kPreferencesFolderIconResource = -3974;
  156. kExtensionsFolderIconResource = -3973;
  157. kFontsFolderIconResource = -3968;
  158. kFullTrashIconResource = -3984;
  159. { Obsolete. Use named constants defined above. }
  160. startupFolderIconResource = -3981;
  161. ownedFolderIconResource = -3980;
  162. dropFolderIconResource = -3979;
  163. sharedFolderIconResource = -3978;
  164. mountedFolderIconResource = -3977;
  165. controlPanelFolderIconResource = -3976;
  166. printMonitorFolderIconResource = -3975;
  167. preferencesFolderIconResource = -3974;
  168. extensionsFolderIconResource = -3973;
  169. fontsFolderIconResource = -3968;
  170. fullTrashIconResource = -3984;
  171. { The following icon types can only be used as an icon element }
  172. { inside a 'icns' icon family }
  173. kIconServices256PixelDataARGB = $69633038 (* 'ic08' *);
  174. kThumbnail32BitData = $69743332 (* 'it32' *);
  175. kThumbnail8BitMask = $74386D6B (* 't8mk' *);
  176. kHuge1BitMask = $69636823 (* 'ich#' *);
  177. kHuge4BitData = $69636834 (* 'ich4' *);
  178. kHuge8BitData = $69636838 (* 'ich8' *);
  179. kHuge32BitData = $69683332 (* 'ih32' *);
  180. kHuge8BitMask = $68386D6B (* 'h8mk' *);
  181. { The following icon types can be used as a resource type }
  182. { or as an icon element type inside a 'icns' icon family }
  183. kLarge1BitMask = $49434E23 (* 'ICN#' *);
  184. kLarge4BitData = $69636C34 (* 'icl4' *);
  185. kLarge8BitData = $69636C38 (* 'icl8' *);
  186. kLarge32BitData = $696C3332 (* 'il32' *);
  187. kLarge8BitMask = $6C386D6B (* 'l8mk' *);
  188. kSmall1BitMask = $69637323 (* 'ics#' *);
  189. kSmall4BitData = $69637334 (* 'ics4' *);
  190. kSmall8BitData = $69637338 (* 'ics8' *);
  191. kSmall32BitData = $69733332 (* 'is32' *);
  192. kSmall8BitMask = $73386D6B (* 's8mk' *);
  193. kMini1BitMask = $69636D23 (* 'icm#' *);
  194. kMini4BitData = $69636D34 (* 'icm4' *);
  195. kMini8BitData = $69636D38 (* 'icm8' *);
  196. { Icon Variants }
  197. { These can be used as an element of an 'icns' icon family }
  198. { or as a parameter to GetIconRefVariant }
  199. kTileIconVariant = $74696C65 (* 'tile' *);
  200. kRolloverIconVariant = $6F766572 (* 'over' *);
  201. kDropIconVariant = $64726F70 (* 'drop' *);
  202. kOpenIconVariant = $6F70656E (* 'open' *);
  203. kOpenDropIconVariant = $6F647270 (* 'odrp' *);
  204. { Obsolete. Use names defined above. }
  205. large1BitMask = $49434E23 (* 'ICN#' *);
  206. large4BitData = $69636C34 (* 'icl4' *);
  207. large8BitData = $69636C38 (* 'icl8' *);
  208. small1BitMask = $69637323 (* 'ics#' *);
  209. small4BitData = $69637334 (* 'ics4' *);
  210. small8BitData = $69637338 (* 'ics8' *);
  211. mini1BitMask = $69636D23 (* 'icm#' *);
  212. mini4BitData = $69636D34 (* 'icm4' *);
  213. mini8BitData = $69636D38 (* 'icm8' *);
  214. { Alignment type values. }
  215. kAlignNone = $00;
  216. kAlignVerticalCenter = $01;
  217. kAlignTop = $02;
  218. kAlignBottom = $03;
  219. kAlignHorizontalCenter = $04;
  220. kAlignAbsoluteCenter = $05;
  221. kAlignCenterTop = $06;
  222. kAlignCenterBottom = $07;
  223. kAlignLeft = $08;
  224. kAlignCenterLeft = $09;
  225. kAlignTopLeft = $0A;
  226. kAlignBottomLeft = $0B;
  227. kAlignRight = $0C;
  228. kAlignCenterRight = $0D;
  229. kAlignTopRight = $0E;
  230. kAlignBottomRight = $0F;
  231. { Obsolete. Use names defined above. }
  232. atNone = $00;
  233. atVerticalCenter = $01;
  234. atTop = $02;
  235. atBottom = $03;
  236. atHorizontalCenter = $04;
  237. atAbsoluteCenter = $05;
  238. atCenterTop = $06;
  239. atCenterBottom = $07;
  240. atLeft = $08;
  241. atCenterLeft = $09;
  242. atTopLeft = $0A;
  243. atBottomLeft = $0B;
  244. atRight = $0C;
  245. atCenterRight = $0D;
  246. atTopRight = $0E;
  247. atBottomRight = $0F;
  248. type
  249. IconAlignmentType = SInt16;
  250. { Transform type values. }
  251. const
  252. kTransformNone = $00;
  253. kTransformDisabled = $01;
  254. kTransformOffline = $02;
  255. kTransformOpen = $03;
  256. kTransformLabel1 = $0100;
  257. kTransformLabel2 = $0200;
  258. kTransformLabel3 = $0300;
  259. kTransformLabel4 = $0400;
  260. kTransformLabel5 = $0500;
  261. kTransformLabel6 = $0600;
  262. kTransformLabel7 = $0700;
  263. kTransformSelected = $4000;
  264. kTransformSelectedDisabled = $4001;
  265. kTransformSelectedOffline = $4002;
  266. kTransformSelectedOpen = $4003;
  267. { Obsolete. Use names defined above. }
  268. ttNone = $00;
  269. ttDisabled = $01;
  270. ttOffline = $02;
  271. ttOpen = $03;
  272. ttLabel1 = $0100;
  273. ttLabel2 = $0200;
  274. ttLabel3 = $0300;
  275. ttLabel4 = $0400;
  276. ttLabel5 = $0500;
  277. ttLabel6 = $0600;
  278. ttLabel7 = $0700;
  279. ttSelected = $4000;
  280. ttSelectedDisabled = $4001;
  281. ttSelectedOffline = $4002;
  282. ttSelectedOpen = $4003;
  283. type
  284. IconTransformType = SInt16;
  285. { Selector mask values. }
  286. const
  287. kSelectorLarge1Bit = $00000001;
  288. kSelectorLarge4Bit = $00000002;
  289. kSelectorLarge8Bit = $00000004;
  290. kSelectorLarge32Bit = $00000008;
  291. kSelectorLarge8BitMask = $00000010;
  292. kSelectorSmall1Bit = $00000100;
  293. kSelectorSmall4Bit = $00000200;
  294. kSelectorSmall8Bit = $00000400;
  295. kSelectorSmall32Bit = $00000800;
  296. kSelectorSmall8BitMask = $00001000;
  297. kSelectorMini1Bit = $00010000;
  298. kSelectorMini4Bit = $00020000;
  299. kSelectorMini8Bit = $00040000;
  300. kSelectorHuge1Bit = $01000000;
  301. kSelectorHuge4Bit = $02000000;
  302. kSelectorHuge8Bit = $04000000;
  303. kSelectorHuge32Bit = $08000000;
  304. kSelectorHuge8BitMask = $10000000;
  305. kSelectorAllLargeData = $000000FF;
  306. kSelectorAllSmallData = $0000FF00;
  307. kSelectorAllMiniData = $00FF0000;
  308. kSelectorAllHugeData = $FF000000;
  309. kSelectorAll1BitData = $01010101;
  310. kSelectorAll4BitData = $02020202;
  311. kSelectorAll8BitData = $04040404;
  312. kSelectorAll32BitData = $08000808;
  313. kSelectorAllAvailableData = $FFFFFFFF;
  314. { Obsolete. Use names defined above. }
  315. svLarge1Bit = $00000001;
  316. svLarge4Bit = $00000002;
  317. svLarge8Bit = $00000004;
  318. svSmall1Bit = $00000100;
  319. svSmall4Bit = $00000200;
  320. svSmall8Bit = $00000400;
  321. svMini1Bit = $00010000;
  322. svMini4Bit = $00020000;
  323. svMini8Bit = $00040000;
  324. svAllLargeData = $000000FF;
  325. svAllSmallData = $0000FF00;
  326. svAllMiniData = $00FF0000;
  327. svAll1BitData = $01010101;
  328. svAll4BitData = $02020202;
  329. svAll8BitData = $04040404;
  330. svAllAvailableData = $FFFFFFFF;
  331. type
  332. IconSelectorValue = UInt32;
  333. {$ifc TYPED_FUNCTION_POINTERS}
  334. IconActionProcPtr = function(theType: ResType; var theIcon: Handle; yourDataPtr: UnivPtr): OSErr;
  335. {$elsec}
  336. IconActionProcPtr = ProcPtr;
  337. {$endc}
  338. {$ifc TYPED_FUNCTION_POINTERS}
  339. IconGetterProcPtr = function(theType: ResType; yourDataPtr: UnivPtr): Handle;
  340. {$elsec}
  341. IconGetterProcPtr = ProcPtr;
  342. {$endc}
  343. {$ifc OPAQUE_UPP_TYPES}
  344. IconActionUPP = ^SInt32; { an opaque UPP }
  345. {$elsec}
  346. IconActionUPP = UniversalProcPtr;
  347. {$endc}
  348. {$ifc OPAQUE_UPP_TYPES}
  349. IconGetterUPP = ^SInt32; { an opaque UPP }
  350. {$elsec}
  351. IconGetterUPP = UniversalProcPtr;
  352. {$endc}
  353. const
  354. uppIconActionProcInfo = $00000FE0;
  355. uppIconGetterProcInfo = $000003F0;
  356. {
  357. * NewIconActionUPP()
  358. *
  359. * Availability:
  360. * Non-Carbon CFM: available as macro/inline
  361. * CarbonLib: in CarbonLib 1.0 and later
  362. * Mac OS X: in version 10.0 and later
  363. }
  364. function NewIconActionUPP(userRoutine: IconActionProcPtr): IconActionUPP; external name '_NewIconActionUPP'; { old name was NewIconActionProc }
  365. {
  366. * NewIconGetterUPP()
  367. *
  368. * Availability:
  369. * Non-Carbon CFM: available as macro/inline
  370. * CarbonLib: in CarbonLib 1.0 and later
  371. * Mac OS X: in version 10.0 and later
  372. }
  373. function NewIconGetterUPP(userRoutine: IconGetterProcPtr): IconGetterUPP; external name '_NewIconGetterUPP'; { old name was NewIconGetterProc }
  374. {
  375. * DisposeIconActionUPP()
  376. *
  377. * Availability:
  378. * Non-Carbon CFM: available as macro/inline
  379. * CarbonLib: in CarbonLib 1.0 and later
  380. * Mac OS X: in version 10.0 and later
  381. }
  382. procedure DisposeIconActionUPP(userUPP: IconActionUPP); external name '_DisposeIconActionUPP';
  383. {
  384. * DisposeIconGetterUPP()
  385. *
  386. * Availability:
  387. * Non-Carbon CFM: available as macro/inline
  388. * CarbonLib: in CarbonLib 1.0 and later
  389. * Mac OS X: in version 10.0 and later
  390. }
  391. procedure DisposeIconGetterUPP(userUPP: IconGetterUPP); external name '_DisposeIconGetterUPP';
  392. {
  393. * InvokeIconActionUPP()
  394. *
  395. * Availability:
  396. * Non-Carbon CFM: available as macro/inline
  397. * CarbonLib: in CarbonLib 1.0 and later
  398. * Mac OS X: in version 10.0 and later
  399. }
  400. function InvokeIconActionUPP(theType: ResType; var theIcon: Handle; yourDataPtr: UnivPtr; userRoutine: IconActionUPP): OSErr; external name '_InvokeIconActionUPP'; { old name was CallIconActionProc }
  401. {
  402. * InvokeIconGetterUPP()
  403. *
  404. * Availability:
  405. * Non-Carbon CFM: available as macro/inline
  406. * CarbonLib: in CarbonLib 1.0 and later
  407. * Mac OS X: in version 10.0 and later
  408. }
  409. function InvokeIconGetterUPP(theType: ResType; yourDataPtr: UnivPtr; userRoutine: IconGetterUPP): Handle; external name '_InvokeIconGetterUPP'; { old name was CallIconGetterProc }
  410. type
  411. IconGetter = IconGetterProcPtr;
  412. IconAction = IconActionProcPtr;
  413. { CIconHandle, GetCIcon(), PlotCIcon(), and DisposeCIcon() moved here from Quickdraw.h }
  414. CIconPtr = ^CIcon;
  415. CIcon = record
  416. iconPMap: PixMap; { the icon's pixMap }
  417. iconMask: BitMap; { the icon's mask }
  418. iconBMap: BitMap; { the icon's bitMap }
  419. iconData: Handle; { the icon's data }
  420. iconMaskData: array [0..0] of SInt16; { icon's mask and BitMap data }
  421. end;
  422. CIconHandle = ^CIconPtr;
  423. CIconHandle_fix = CIconHandle; { used as field type when a record declaration contains a CIconHandle field identifier }
  424. {
  425. * GetCIcon()
  426. *
  427. * Availability:
  428. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  429. * CarbonLib: in CarbonLib 1.0 and later
  430. * Mac OS X: in version 10.0 and later
  431. }
  432. function GetCIcon(iconID: SInt16): CIconHandle; external name '_GetCIcon';
  433. {
  434. * PlotCIcon()
  435. *
  436. * Availability:
  437. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  438. * CarbonLib: in CarbonLib 1.0 and later
  439. * Mac OS X: in version 10.0 and later
  440. }
  441. procedure PlotCIcon(const (*var*) theRect: Rect; theIcon: CIconHandle); external name '_PlotCIcon';
  442. {
  443. * DisposeCIcon()
  444. *
  445. * Availability:
  446. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  447. * CarbonLib: in CarbonLib 1.0 and later
  448. * Mac OS X: in version 10.0 and later
  449. }
  450. procedure DisposeCIcon(theIcon: CIconHandle); external name '_DisposeCIcon';
  451. { GetIcon and PlotIcon moved here from ToolUtils }
  452. {
  453. * GetIcon()
  454. *
  455. * Availability:
  456. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  457. * CarbonLib: in CarbonLib 1.0 and later
  458. * Mac OS X: in version 10.0 and later
  459. }
  460. function GetIcon(iconID: SInt16): Handle; external name '_GetIcon';
  461. {
  462. * PlotIcon()
  463. *
  464. * Availability:
  465. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  466. * CarbonLib: in CarbonLib 1.0 and later
  467. * Mac OS X: in version 10.0 and later
  468. }
  469. procedure PlotIcon(const (*var*) theRect: Rect; theIcon: Handle); external name '_PlotIcon';
  470. {
  471. Note: IconSuiteRef and IconCacheRef should be an abstract types,
  472. but too much source code already relies on them being of type Handle.
  473. }
  474. type
  475. IconSuiteRef = Handle;
  476. IconCacheRef = Handle;
  477. { IconRefs are 32-bit values identifying cached icon data. IconRef 0 is invalid. }
  478. IconRef = ^SInt32; { an opaque 32-bit type }
  479. IconRef_fix = IconRef; { used as field type when a record declaration contains a IconRef field identifier }
  480. IconRefPtr = ^IconRef; { when a var xx:IconRef parameter can be nil, it is changed to xx: IconRefPtr }
  481. {
  482. * PlotIconID()
  483. *
  484. * Availability:
  485. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  486. * CarbonLib: in CarbonLib 1.0 and later
  487. * Mac OS X: in version 10.0 and later
  488. }
  489. function PlotIconID(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theResID: SInt16): OSErr; external name '_PlotIconID';
  490. {
  491. * NewIconSuite()
  492. *
  493. * Availability:
  494. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  495. * CarbonLib: in CarbonLib 1.0 and later
  496. * Mac OS X: in version 10.0 and later
  497. }
  498. function NewIconSuite(var theIconSuite: IconSuiteRef): OSErr; external name '_NewIconSuite';
  499. {
  500. * AddIconToSuite()
  501. *
  502. * Availability:
  503. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  504. * CarbonLib: in CarbonLib 1.0 and later
  505. * Mac OS X: in version 10.0 and later
  506. }
  507. function AddIconToSuite(theIconData: Handle; theSuite: IconSuiteRef; theType: ResType): OSErr; external name '_AddIconToSuite';
  508. {
  509. * GetIconFromSuite()
  510. *
  511. * Availability:
  512. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  513. * CarbonLib: in CarbonLib 1.0 and later
  514. * Mac OS X: in version 10.0 and later
  515. }
  516. function GetIconFromSuite(var theIconData: Handle; theSuite: IconSuiteRef; theType: ResType): OSErr; external name '_GetIconFromSuite';
  517. {
  518. * ForEachIconDo()
  519. *
  520. * Availability:
  521. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  522. * CarbonLib: in CarbonLib 1.0 and later
  523. * Mac OS X: in version 10.0 and later
  524. }
  525. function ForEachIconDo(theSuite: IconSuiteRef; selector: IconSelectorValue; action: IconActionUPP; yourDataPtr: UnivPtr): OSErr; external name '_ForEachIconDo';
  526. {
  527. * GetIconSuite()
  528. *
  529. * Availability:
  530. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  531. * CarbonLib: in CarbonLib 1.0 and later
  532. * Mac OS X: in version 10.0 and later
  533. }
  534. function GetIconSuite(var theIconSuite: IconSuiteRef; theResID: SInt16; selector: IconSelectorValue): OSErr; external name '_GetIconSuite';
  535. {
  536. * DisposeIconSuite()
  537. *
  538. * Availability:
  539. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  540. * CarbonLib: in CarbonLib 1.0 and later
  541. * Mac OS X: in version 10.0 and later
  542. }
  543. function DisposeIconSuite(theIconSuite: IconSuiteRef; disposeData: boolean): OSErr; external name '_DisposeIconSuite';
  544. {
  545. * PlotIconSuite()
  546. *
  547. * Availability:
  548. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  549. * CarbonLib: in CarbonLib 1.0 and later
  550. * Mac OS X: in version 10.0 and later
  551. }
  552. function PlotIconSuite(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconSuite: IconSuiteRef): OSErr; external name '_PlotIconSuite';
  553. {
  554. * MakeIconCache()
  555. *
  556. * Availability:
  557. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  558. * CarbonLib: in CarbonLib 1.0 and later
  559. * Mac OS X: in version 10.0 and later
  560. }
  561. function MakeIconCache(var theCache: IconCacheRef; makeIcon: IconGetterUPP; yourDataPtr: UnivPtr): OSErr; external name '_MakeIconCache';
  562. {
  563. * LoadIconCache()
  564. *
  565. * Availability:
  566. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  567. * CarbonLib: in CarbonLib 1.0 and later
  568. * Mac OS X: in version 10.0 and later
  569. }
  570. function LoadIconCache(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconCache: IconCacheRef): OSErr; external name '_LoadIconCache';
  571. {
  572. * PlotIconMethod()
  573. *
  574. * Availability:
  575. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  576. * CarbonLib: in CarbonLib 1.0 and later
  577. * Mac OS X: in version 10.0 and later
  578. }
  579. function PlotIconMethod(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): OSErr; external name '_PlotIconMethod';
  580. {
  581. * GetLabel()
  582. *
  583. * Availability:
  584. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  585. * CarbonLib: in CarbonLib 1.0 and later
  586. * Mac OS X: in version 10.0 and later
  587. }
  588. function GetLabel(labelNumber: SInt16; var labelColor: RGBColor; var labelString: Str255): OSErr; external name '_GetLabel';
  589. {
  590. * PtInIconID()
  591. *
  592. * Availability:
  593. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  594. * CarbonLib: in CarbonLib 1.0 and later
  595. * Mac OS X: in version 10.0 and later
  596. }
  597. function PtInIconID(testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; iconID: SInt16): boolean; external name '_PtInIconID';
  598. {
  599. * PtInIconSuite()
  600. *
  601. * Availability:
  602. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  603. * CarbonLib: in CarbonLib 1.0 and later
  604. * Mac OS X: in version 10.0 and later
  605. }
  606. function PtInIconSuite(testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconSuite: IconSuiteRef): boolean; external name '_PtInIconSuite';
  607. {
  608. * PtInIconMethod()
  609. *
  610. * Availability:
  611. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  612. * CarbonLib: in CarbonLib 1.0 and later
  613. * Mac OS X: in version 10.0 and later
  614. }
  615. function PtInIconMethod(testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): boolean; external name '_PtInIconMethod';
  616. {
  617. * RectInIconID()
  618. *
  619. * Availability:
  620. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  621. * CarbonLib: in CarbonLib 1.0 and later
  622. * Mac OS X: in version 10.0 and later
  623. }
  624. function RectInIconID(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; iconID: SInt16): boolean; external name '_RectInIconID';
  625. {
  626. * RectInIconSuite()
  627. *
  628. * Availability:
  629. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  630. * CarbonLib: in CarbonLib 1.0 and later
  631. * Mac OS X: in version 10.0 and later
  632. }
  633. function RectInIconSuite(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconSuite: IconSuiteRef): boolean; external name '_RectInIconSuite';
  634. {
  635. * RectInIconMethod()
  636. *
  637. * Availability:
  638. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  639. * CarbonLib: in CarbonLib 1.0 and later
  640. * Mac OS X: in version 10.0 and later
  641. }
  642. function RectInIconMethod(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): boolean; external name '_RectInIconMethod';
  643. {
  644. * IconIDToRgn()
  645. *
  646. * Availability:
  647. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  648. * CarbonLib: in CarbonLib 1.0 and later
  649. * Mac OS X: in version 10.0 and later
  650. }
  651. function IconIDToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; iconID: SInt16): OSErr; external name '_IconIDToRgn';
  652. {
  653. * IconSuiteToRgn()
  654. *
  655. * Availability:
  656. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  657. * CarbonLib: in CarbonLib 1.0 and later
  658. * Mac OS X: in version 10.0 and later
  659. }
  660. function IconSuiteToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconSuite: IconSuiteRef): OSErr; external name '_IconSuiteToRgn';
  661. {
  662. * IconMethodToRgn()
  663. *
  664. * Availability:
  665. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  666. * CarbonLib: in CarbonLib 1.0 and later
  667. * Mac OS X: in version 10.0 and later
  668. }
  669. function IconMethodToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; theMethod: IconGetterUPP; yourDataPtr: UnivPtr): OSErr; external name '_IconMethodToRgn';
  670. {
  671. * SetSuiteLabel()
  672. *
  673. * Availability:
  674. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  675. * CarbonLib: in CarbonLib 1.0 and later
  676. * Mac OS X: in version 10.0 and later
  677. }
  678. function SetSuiteLabel(theSuite: IconSuiteRef; theLabel: SInt16): OSErr; external name '_SetSuiteLabel';
  679. {
  680. * GetSuiteLabel()
  681. *
  682. * Availability:
  683. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  684. * CarbonLib: in CarbonLib 1.0 and later
  685. * Mac OS X: in version 10.0 and later
  686. }
  687. function GetSuiteLabel(theSuite: IconSuiteRef): SInt16; external name '_GetSuiteLabel';
  688. {
  689. * GetIconCacheData()
  690. *
  691. * Availability:
  692. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  693. * CarbonLib: in CarbonLib 1.0 and later
  694. * Mac OS X: in version 10.0 and later
  695. }
  696. function GetIconCacheData(theCache: IconCacheRef; var theData: UnivPtr): OSErr; external name '_GetIconCacheData';
  697. {
  698. * SetIconCacheData()
  699. *
  700. * Availability:
  701. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  702. * CarbonLib: in CarbonLib 1.0 and later
  703. * Mac OS X: in version 10.0 and later
  704. }
  705. function SetIconCacheData(theCache: IconCacheRef; theData: UnivPtr): OSErr; external name '_SetIconCacheData';
  706. {
  707. * GetIconCacheProc()
  708. *
  709. * Availability:
  710. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  711. * CarbonLib: in CarbonLib 1.0 and later
  712. * Mac OS X: in version 10.0 and later
  713. }
  714. function GetIconCacheProc(theCache: IconCacheRef; var theProc: IconGetterUPP): OSErr; external name '_GetIconCacheProc';
  715. {
  716. * SetIconCacheProc()
  717. *
  718. * Availability:
  719. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  720. * CarbonLib: in CarbonLib 1.0 and later
  721. * Mac OS X: in version 10.0 and later
  722. }
  723. function SetIconCacheProc(theCache: IconCacheRef; theProc: IconGetterUPP): OSErr; external name '_SetIconCacheProc';
  724. {
  725. * PlotIconHandle()
  726. *
  727. * Availability:
  728. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  729. * CarbonLib: in CarbonLib 1.0 and later
  730. * Mac OS X: in version 10.0 and later
  731. }
  732. function PlotIconHandle(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIcon: Handle): OSErr; external name '_PlotIconHandle';
  733. {
  734. * PlotSICNHandle()
  735. *
  736. * Availability:
  737. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  738. * CarbonLib: in CarbonLib 1.0 and later
  739. * Mac OS X: in version 10.0 and later
  740. }
  741. function PlotSICNHandle(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theSICN: Handle): OSErr; external name '_PlotSICNHandle';
  742. {
  743. * PlotCIconHandle()
  744. *
  745. * Availability:
  746. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  747. * CarbonLib: in CarbonLib 1.0 and later
  748. * Mac OS X: in version 10.0 and later
  749. }
  750. function PlotCIconHandle(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theCIcon: CIconHandle): OSErr; external name '_PlotCIconHandle';
  751. {
  752. IconServices is an efficient mechanism to share icon data amongst multiple
  753. clients. It avoids duplication of data; it provides efficient caching,
  754. releasing memory when the icon data is no longer needed; it can provide
  755. the appropriate icon for any filesystem object; it can provide commonly
  756. used icons (caution, note, help...); it is Appearance-savvy: the icons
  757. are switched when appropriate.
  758. IconServices refer to cached icon data using IconRef, a 32-bit opaque
  759. value. IconRefs are reference counted. When there are no more "owners"
  760. of an IconRef, the memory used by the icon bitmap is disposed of.
  761. Two files of same type and creator with no custom icon will have the same IconRef.
  762. Files with custom icons will have their own IconRef.
  763. }
  764. {
  765. Use the special creator kSystemIconsCreator to get "standard" icons
  766. that are not associated with a file, such as the help icon.
  767. Note that all lowercase creators are reserved by Apple.
  768. }
  769. const
  770. kSystemIconsCreator = $6D616373 (* 'macs' *);
  771. {
  772. Type of the predefined/generic icons. For example, the call:
  773. err = GetIconRef(kOnSystemDisk, kSystemIconsCreator, kHelpIcon, &iconRef);
  774. will retun in iconRef the IconRef for the standard help icon.
  775. }
  776. { Generic Finder icons }
  777. kClipboardIcon = $434C4950 (* 'CLIP' *);
  778. kClippingUnknownTypeIcon = $636C7075 (* 'clpu' *);
  779. kClippingPictureTypeIcon = $636C7070 (* 'clpp' *);
  780. kClippingTextTypeIcon = $636C7074 (* 'clpt' *);
  781. kClippingSoundTypeIcon = $636C7073 (* 'clps' *);
  782. kDesktopIcon = $6465736B (* 'desk' *);
  783. kFinderIcon = $464E4452 (* 'FNDR' *);
  784. kComputerIcon = $726F6F74 (* 'root' *);
  785. kFontSuitcaseIcon = $4646494C (* 'FFIL' *);
  786. kFullTrashIcon = $66747268 (* 'ftrh' *);
  787. kGenericApplicationIcon = $4150504C (* 'APPL' *);
  788. kGenericCDROMIcon = $63646472 (* 'cddr' *);
  789. kGenericControlPanelIcon = $41505043 (* 'APPC' *);
  790. kGenericControlStripModuleIcon = $73646576 (* 'sdev' *);
  791. kGenericComponentIcon = $74686E67 (* 'thng' *);
  792. kGenericDeskAccessoryIcon = $41505044 (* 'APPD' *);
  793. kGenericDocumentIcon = $646F6375 (* 'docu' *);
  794. kGenericEditionFileIcon = $65647466 (* 'edtf' *);
  795. kGenericExtensionIcon = $494E4954 (* 'INIT' *);
  796. kGenericFileServerIcon = $73727672 (* 'srvr' *);
  797. kGenericFontIcon = $6666696C (* 'ffil' *);
  798. kGenericFontScalerIcon = $73636C72 (* 'sclr' *);
  799. kGenericFloppyIcon = $666C7079 (* 'flpy' *);
  800. kGenericHardDiskIcon = $6864736B (* 'hdsk' *);
  801. kGenericIDiskIcon = $6964736B (* 'idsk' *);
  802. kGenericRemovableMediaIcon = $726D6F76 (* 'rmov' *);
  803. kGenericMoverObjectIcon = $6D6F7672 (* 'movr' *);
  804. kGenericPCCardIcon = $70636D63 (* 'pcmc' *);
  805. kGenericPreferencesIcon = $70726566 (* 'pref' *);
  806. kGenericQueryDocumentIcon = $71657279 (* 'qery' *);
  807. kGenericRAMDiskIcon = $72616D64 (* 'ramd' *);
  808. kGenericSharedLibaryIcon = $73686C62 (* 'shlb' *);
  809. kGenericStationeryIcon = $73646F63 (* 'sdoc' *);
  810. kGenericSuitcaseIcon = $73756974 (* 'suit' *);
  811. kGenericURLIcon = $6775726C (* 'gurl' *);
  812. kGenericWORMIcon = $776F726D (* 'worm' *);
  813. kInternationalResourcesIcon = $6966696C (* 'ifil' *);
  814. kKeyboardLayoutIcon = $6B66696C (* 'kfil' *);
  815. kSoundFileIcon = $7366696C (* 'sfil' *);
  816. kSystemSuitcaseIcon = $7A737973 (* 'zsys' *);
  817. kTrashIcon = $74727368 (* 'trsh' *);
  818. kTrueTypeFontIcon = $7466696C (* 'tfil' *);
  819. kTrueTypeFlatFontIcon = $73666E74 (* 'sfnt' *);
  820. kTrueTypeMultiFlatFontIcon = $74746366 (* 'ttcf' *);
  821. kUserIDiskIcon = $7564736B (* 'udsk' *);
  822. kUnknownFSObjectIcon = $756E6673 (* 'unfs' *);
  823. kInternationResourcesIcon = $6966696C (* 'ifil' *); { old misspelling }
  824. { Internet locations }
  825. kInternetLocationHTTPIcon = $696C6874 (* 'ilht' *);
  826. kInternetLocationFTPIcon = $696C6674 (* 'ilft' *);
  827. kInternetLocationAppleShareIcon = $696C6166 (* 'ilaf' *);
  828. kInternetLocationAppleTalkZoneIcon = $696C6174 (* 'ilat' *);
  829. kInternetLocationFileIcon = $696C6669 (* 'ilfi' *);
  830. kInternetLocationMailIcon = $696C6D61 (* 'ilma' *);
  831. kInternetLocationNewsIcon = $696C6E77 (* 'ilnw' *);
  832. kInternetLocationNSLNeighborhoodIcon = $696C6E73 (* 'ilns' *);
  833. kInternetLocationGenericIcon = $696C6765 (* 'ilge' *);
  834. { Folders }
  835. kGenericFolderIcon = $666C6472 (* 'fldr' *);
  836. kDropFolderIcon = $64626F78 (* 'dbox' *);
  837. kMountedFolderIcon = $6D6E7464 (* 'mntd' *);
  838. kOpenFolderIcon = $6F666C64 (* 'ofld' *);
  839. kOwnedFolderIcon = $6F776E64 (* 'ownd' *);
  840. kPrivateFolderIcon = $70727666 (* 'prvf' *);
  841. kSharedFolderIcon = $7368666C (* 'shfl' *);
  842. { Sharing Privileges icons }
  843. kSharingPrivsNotApplicableIcon = $73686E61 (* 'shna' *);
  844. kSharingPrivsReadOnlyIcon = $7368726F (* 'shro' *);
  845. kSharingPrivsReadWriteIcon = $73687277 (* 'shrw' *);
  846. kSharingPrivsUnknownIcon = $7368756B (* 'shuk' *);
  847. kSharingPrivsWritableIcon = $77726974 (* 'writ' *);
  848. { Users and Groups icons }
  849. kUserFolderIcon = $75666C64 (* 'ufld' *);
  850. kWorkgroupFolderIcon = $77666C64 (* 'wfld' *);
  851. kGuestUserIcon = $67757372 (* 'gusr' *);
  852. kUserIcon = $75736572 (* 'user' *);
  853. kOwnerIcon = $73757372 (* 'susr' *);
  854. kGroupIcon = $67727570 (* 'grup' *);
  855. { Special folders }
  856. kAppearanceFolderIcon = $61707072 (* 'appr' *);
  857. kAppleExtrasFolderIcon = $616578C6 (* 'aexÄ' *);
  858. kAppleMenuFolderIcon = $616D6E75 (* 'amnu' *);
  859. kApplicationsFolderIcon = $61707073 (* 'apps' *);
  860. kApplicationSupportFolderIcon = $61737570 (* 'asup' *);
  861. kAssistantsFolderIcon = $617374C6 (* 'astÄ' *);
  862. kColorSyncFolderIcon = $70726F66 (* 'prof' *);
  863. kContextualMenuItemsFolderIcon = $636D6E75 (* 'cmnu' *);
  864. kControlPanelDisabledFolderIcon = $63747244 (* 'ctrD' *);
  865. kControlPanelFolderIcon = $6374726C (* 'ctrl' *);
  866. kControlStripModulesFolderIcon = $736476C6 (* 'sdvÄ' *);
  867. kDocumentsFolderIcon = $646F6373 (* 'docs' *);
  868. kExtensionsDisabledFolderIcon = $65787444 (* 'extD' *);
  869. kExtensionsFolderIcon = $6578746E (* 'extn' *);
  870. kFavoritesFolderIcon = $66617673 (* 'favs' *);
  871. kFontsFolderIcon = $666F6E74 (* 'font' *);
  872. kHelpFolderIcon = $C692686C (* 'Ählp' *);
  873. kInternetFolderIcon = $696E74C6 (* 'intÄ' *);
  874. kInternetPlugInFolderIcon = $C6926E65 (* 'Änet' *);
  875. kInternetSearchSitesFolderIcon = $69737366 (* 'issf' *);
  876. kLocalesFolderIcon = $C6926C6F (* 'Äloc' *);
  877. kMacOSReadMeFolderIcon = $6D6F72C6 (* 'morÄ' *);
  878. kPublicFolderIcon = $70756266 (* 'pubf' *);
  879. kPreferencesFolderIcon = $707266C6 (* 'prfÄ' *);
  880. kPrinterDescriptionFolderIcon = $70706466 (* 'ppdf' *);
  881. kPrinterDriverFolderIcon = $C6927072 (* 'Äprd' *);
  882. kPrintMonitorFolderIcon = $70726E74 (* 'prnt' *);
  883. kRecentApplicationsFolderIcon = $72617070 (* 'rapp' *);
  884. kRecentDocumentsFolderIcon = $72646F63 (* 'rdoc' *);
  885. kRecentServersFolderIcon = $72737276 (* 'rsrv' *);
  886. kScriptingAdditionsFolderIcon = $C6927363 (* 'Äscr' *);
  887. kSharedLibrariesFolderIcon = $C6926C69 (* 'Älib' *);
  888. kScriptsFolderIcon = $736372C6 (* 'scrÄ' *);
  889. kShutdownItemsDisabledFolderIcon = $73686444 (* 'shdD' *);
  890. kShutdownItemsFolderIcon = $73686466 (* 'shdf' *);
  891. kSpeakableItemsFolder = $73706B69 (* 'spki' *);
  892. kStartupItemsDisabledFolderIcon = $73747244 (* 'strD' *);
  893. kStartupItemsFolderIcon = $73747274 (* 'strt' *);
  894. kSystemExtensionDisabledFolderIcon = $6D616344 (* 'macD' *);
  895. kSystemFolderIcon = $6D616373 (* 'macs' *);
  896. kTextEncodingsFolderIcon = $C6927465 (* 'Ätex' *);
  897. kUsersFolderIcon = $757372C6 (* 'usrÄ' *);
  898. kUtilitiesFolderIcon = $757469C6 (* 'utiÄ' *);
  899. kVoicesFolderIcon = $66766F63 (* 'fvoc' *);
  900. kSystemFolderXIcon = $6D616378 (* 'macx' *);
  901. { Badges }
  902. kAppleScriptBadgeIcon = $73637270 (* 'scrp' *);
  903. kLockedBadgeIcon = $6C626467 (* 'lbdg' *);
  904. kMountedBadgeIcon = $6D626467 (* 'mbdg' *);
  905. kSharedBadgeIcon = $73626467 (* 'sbdg' *);
  906. kAliasBadgeIcon = $61626467 (* 'abdg' *);
  907. kAlertCautionBadgeIcon = $63626467 (* 'cbdg' *);
  908. { Alert icons }
  909. kAlertNoteIcon = $6E6F7465 (* 'note' *);
  910. kAlertCautionIcon = $63617574 (* 'caut' *);
  911. kAlertStopIcon = $73746F70 (* 'stop' *);
  912. { Networking icons }
  913. kAppleTalkIcon = $61746C6B (* 'atlk' *);
  914. kAppleTalkZoneIcon = $61747A6E (* 'atzn' *);
  915. kAFPServerIcon = $61667073 (* 'afps' *);
  916. kFTPServerIcon = $66747073 (* 'ftps' *);
  917. kHTTPServerIcon = $68747073 (* 'htps' *);
  918. kGenericNetworkIcon = $676E6574 (* 'gnet' *);
  919. kIPFileServerIcon = $69737276 (* 'isrv' *);
  920. { Toolbar icons }
  921. kToolbarCustomizeIcon = $74637573 (* 'tcus' *);
  922. kToolbarDeleteIcon = $7464656C (* 'tdel' *);
  923. kToolbarFavoritesIcon = $74666176 (* 'tfav' *);
  924. kToolbarHomeIcon = $74686F6D (* 'thom' *);
  925. { Other icons }
  926. kAppleLogoIcon = $6361706C (* 'capl' *);
  927. kAppleMenuIcon = $7361706C (* 'sapl' *);
  928. kBackwardArrowIcon = $6261726F (* 'baro' *);
  929. kFavoriteItemsIcon = $66617672 (* 'favr' *);
  930. kForwardArrowIcon = $6661726F (* 'faro' *);
  931. kGridIcon = $67726964 (* 'grid' *);
  932. kHelpIcon = $68656C70 (* 'help' *);
  933. kKeepArrangedIcon = $61726E67 (* 'arng' *);
  934. kLockedIcon = $6C6F636B (* 'lock' *);
  935. kNoFilesIcon = $6E66696C (* 'nfil' *);
  936. kNoFolderIcon = $6E666C64 (* 'nfld' *);
  937. kNoWriteIcon = $6E777274 (* 'nwrt' *);
  938. kProtectedApplicationFolderIcon = $70617070 (* 'papp' *);
  939. kProtectedSystemFolderIcon = $70737973 (* 'psys' *);
  940. kRecentItemsIcon = $72636E74 (* 'rcnt' *);
  941. kShortcutIcon = $73687274 (* 'shrt' *);
  942. kSortAscendingIcon = $61736E64 (* 'asnd' *);
  943. kSortDescendingIcon = $64736E64 (* 'dsnd' *);
  944. kUnlockedIcon = $756C636B (* 'ulck' *);
  945. kConnectToIcon = $636E6374 (* 'cnct' *);
  946. kGenericWindowIcon = $6777696E (* 'gwin' *);
  947. kQuestionMarkIcon = $71756573 (* 'ques' *);
  948. kDeleteAliasIcon = $64616C69 (* 'dali' *);
  949. kEjectMediaIcon = $656A6563 (* 'ejec' *);
  950. kBurningIcon = $6275726E (* 'burn' *);
  951. kRightContainerArrowIcon = $72636172 (* 'rcar' *);
  952. { IconServicesUsageFlags }
  953. type
  954. IconServicesUsageFlags = UInt32;
  955. const
  956. kIconServicesNormalUsageFlag = $00000000;
  957. kIconServicesNoBadgeFlag = $00000001; // available on Panther and later
  958. kIconServicesUpdateIfNeededFlag = $00000002; // available on Panther and later
  959. {
  960. kIconServicesCatalogInfoMask - Minimal bitmask for use with
  961. GetIconRefFromFileInfo(). Use this mask with FSGetCatalogInfo
  962. before calling GetIconRefFromFileInfo().
  963. }
  964. kIconServicesCatalogInfoMask = $0008181E;
  965. {
  966. * PlotIconRefFlags
  967. *
  968. * Discussion:
  969. * Flags that can be passed to the PlotIconRefInContext routine.
  970. }
  971. type
  972. PlotIconRefFlags = UInt32;
  973. const
  974. kPlotIconRefNormalFlags = 0;
  975. kPlotIconRefNoImage = $02;
  976. kPlotIconRefNoMask = $04;
  977. {
  978. IconFamily 'icns' resources contain an entire IconFamily (all sizes and depths).
  979. For custom icons, icns IconFamily resources of the custom icon resource ID are fetched first before
  980. the classic custom icons (individual 'ics#, ICN#, etc) are fetched. If the fetch of the icns resource
  981. succeeds then the icns is looked at exclusively for the icon data.
  982. For custom icons, new icon features such as 32-bit deep icons are only fetched from the icns resource.
  983. This is to avoid incompatibilities with cut & paste of new style icons with an older version of the
  984. MacOS Finder.
  985. DriverGestalt is called with code kdgMediaIconSuite by IconServices after calling FSM to determine a
  986. driver icon for a particular device. The result of the kdgMediaIconSuite call to DriverGestalt should
  987. be a pointer an an IconFamily. In this manner driver vendors can provide rich, detailed drive icons
  988. instead of the 1-bit variety previously supported.
  989. }
  990. kIconFamilyType = $69636E73 (* 'icns' *);
  991. type
  992. IconFamilyElementPtr = ^IconFamilyElement;
  993. IconFamilyElement = record
  994. elementType: OSType; { 'ICN#', 'icl8', etc... }
  995. elementSize: Size; { Size of this element }
  996. elementData: SInt8;
  997. end;
  998. IconFamilyResourcePtr = ^IconFamilyResource;
  999. IconFamilyResource = record
  1000. resourceType: OSType; { Always 'icns' }
  1001. resourceSize: Size; { Total size of this resource }
  1002. elements: array [0..0] of IconFamilyElement;
  1003. end;
  1004. IconFamilyPtr = ^IconFamilyResource;
  1005. IconFamilyHandle = ^IconFamilyPtr;
  1006. {
  1007. ==============================================================================
  1008. Initialization and Termination
  1009. ==============================================================================
  1010. }
  1011. {
  1012. IconServicesInit
  1013. Call this routine once per classic 68K application initialization.
  1014. This routine does not need to be called at boot time.
  1015. }
  1016. {$ifc CALL_NOT_IN_CARBON}
  1017. {
  1018. * IconServicesInit()
  1019. *
  1020. * Availability:
  1021. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1022. * CarbonLib: not available
  1023. * Mac OS X: not available
  1024. }
  1025. function IconServicesInit(initBlockPtr: CFragInitBlockPtr): OSErr; external name '_IconServicesInit';
  1026. {
  1027. IconServicesTerminate:
  1028. Call this routine once from the termination of a classic 68K application.
  1029. This routine does not need to be called at boot time.
  1030. }
  1031. {
  1032. * IconServicesTerminate()
  1033. *
  1034. * Availability:
  1035. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1036. * CarbonLib: not available
  1037. * Mac OS X: not available
  1038. }
  1039. procedure IconServicesTerminate; external name '_IconServicesTerminate';
  1040. {$endc} {CALL_NOT_IN_CARBON}
  1041. {
  1042. ==============================================================================
  1043. Converting data structures
  1044. ==============================================================================
  1045. }
  1046. {
  1047. IconRefToIconFamily
  1048. This routines returns a new IconFamily that contains the data corresponding
  1049. to the specified IconRef.
  1050. }
  1051. {
  1052. * IconRefToIconFamily()
  1053. *
  1054. * Availability:
  1055. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1056. * CarbonLib: in CarbonLib 1.0 and later
  1057. * Mac OS X: in version 10.0 and later
  1058. }
  1059. function IconRefToIconFamily(theIconRef: IconRef; whichIcons: IconSelectorValue; var iconFamily: IconFamilyHandle): OSErr; external name '_IconRefToIconFamily';
  1060. {
  1061. IconFamilyToIconSuite
  1062. This routine transfers the data from an icon family handle into an icon suite.
  1063. }
  1064. {
  1065. * IconFamilyToIconSuite()
  1066. *
  1067. * Availability:
  1068. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1069. * CarbonLib: in CarbonLib 1.0 and later
  1070. * Mac OS X: in version 10.0 and later
  1071. }
  1072. function IconFamilyToIconSuite(iconFamily: IconFamilyHandle; whichIcons: IconSelectorValue; var iconSuite: IconSuiteRef): OSErr; external name '_IconFamilyToIconSuite';
  1073. {
  1074. IconSuiteToIconFamily
  1075. This routine transfers the data in an icon suite into an icon family.
  1076. }
  1077. {
  1078. * IconSuiteToIconFamily()
  1079. *
  1080. * Availability:
  1081. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1082. * CarbonLib: in CarbonLib 1.0 and later
  1083. * Mac OS X: in version 10.0 and later
  1084. }
  1085. function IconSuiteToIconFamily(iconSuite: IconSuiteRef; whichIcons: IconSelectorValue; var iconFamily: IconFamilyHandle): OSErr; external name '_IconSuiteToIconFamily';
  1086. {
  1087. SetIconFamilyData
  1088. Change the data of an icon family. The data is copied.
  1089. The type can be one of the icon type, or 'PICT'.
  1090. The data will be compressed if needed.
  1091. }
  1092. {
  1093. * SetIconFamilyData()
  1094. *
  1095. * Availability:
  1096. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1097. * CarbonLib: in CarbonLib 1.0 and later
  1098. * Mac OS X: in version 10.0 and later
  1099. }
  1100. function SetIconFamilyData(iconFamily: IconFamilyHandle; iconType: OSType; h: Handle): OSErr; external name '_SetIconFamilyData';
  1101. {
  1102. GetIconFamilyData
  1103. Return a copy of the data in the icon family.
  1104. The type can be one of the icon type, or 'PICT'
  1105. The data will be returned uncompressed.
  1106. The handle (h) will be resized as appropriate. If no data of the
  1107. requested type is present, the handle size will be set to 0.
  1108. }
  1109. {
  1110. * GetIconFamilyData()
  1111. *
  1112. * Availability:
  1113. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1114. * CarbonLib: in CarbonLib 1.0 and later
  1115. * Mac OS X: in version 10.0 and later
  1116. }
  1117. function GetIconFamilyData(iconFamily: IconFamilyHandle; iconType: OSType; h: Handle): OSErr; external name '_GetIconFamilyData';
  1118. {
  1119. ==============================================================================
  1120. Reference counting
  1121. ==============================================================================
  1122. }
  1123. {
  1124. GetIconRefOwners
  1125. This routine returns the reference count for the IconRef, or number of owners.
  1126. A valid IconRef always has at least one owner.
  1127. }
  1128. {
  1129. * GetIconRefOwners()
  1130. *
  1131. * Availability:
  1132. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1133. * CarbonLib: in CarbonLib 1.0 and later
  1134. * Mac OS X: in version 10.0 and later
  1135. }
  1136. function GetIconRefOwners(theIconRef: IconRef; var owners: UInt16): OSErr; external name '_GetIconRefOwners';
  1137. {
  1138. AcquireIconRef
  1139. This routine increments the reference count for the IconRef
  1140. }
  1141. {
  1142. * AcquireIconRef()
  1143. *
  1144. * Availability:
  1145. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1146. * CarbonLib: in CarbonLib 1.0 and later
  1147. * Mac OS X: in version 10.0 and later
  1148. }
  1149. function AcquireIconRef(theIconRef: IconRef): OSErr; external name '_AcquireIconRef';
  1150. {
  1151. ReleaseIconRef
  1152. This routine decrements the reference count for the IconRef.
  1153. When the reference count reaches 0, all memory allocated for the icon
  1154. is disposed. Any subsequent use of the IconRef is invalid.
  1155. }
  1156. {
  1157. * ReleaseIconRef()
  1158. *
  1159. * Availability:
  1160. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1161. * CarbonLib: in CarbonLib 1.0 and later
  1162. * Mac OS X: in version 10.0 and later
  1163. }
  1164. function ReleaseIconRef(theIconRef: IconRef): OSErr; external name '_ReleaseIconRef';
  1165. {
  1166. ==============================================================================
  1167. Getting an IconRef
  1168. ==============================================================================
  1169. }
  1170. {
  1171. GetIconRefFromFile
  1172. This routine returns an icon ref for the specified file, folder or volume.
  1173. The label information is provided separately, since two files with the same icon
  1174. but a different label would share the same iconRef. The label can be used in
  1175. PlotIconRef() for example.
  1176. Use this routine if you have no information about the file system object. If
  1177. you have already done a GetCatInfo on the file and want to save some I/O,
  1178. call GetIconRefFromFolder() if you know it's a folder with no custom icon or
  1179. call GetIconRef() if it's a file with no custom icon.
  1180. This routine increments the reference count of the returned IconRef. Call
  1181. ReleaseIconRef() when you're done with it.
  1182. }
  1183. {
  1184. * GetIconRefFromFile()
  1185. *
  1186. * Availability:
  1187. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1188. * CarbonLib: in CarbonLib 1.0 and later
  1189. * Mac OS X: in version 10.0 and later
  1190. }
  1191. function GetIconRefFromFile(const (*var*) theFile: FSSpec; var theIconRef: IconRef; var theLabel: SInt16): OSErr; external name '_GetIconRefFromFile';
  1192. {
  1193. GetIconRef
  1194. This routine returns an icon ref for an icon in the desktop database or
  1195. for a registered icon.
  1196. The system registers a set of icon such as the help icon with the creator
  1197. code kSystemIconsCreator. See above for a list of the registered system types.
  1198. The vRefNum is used as a hint on where to look for the icon first. Use
  1199. kOnSystemDisk if you don't know what to pass.
  1200. This routine increments the reference count of the returned IconRef. Call
  1201. ReleaseIconRef() when you're done with it.
  1202. }
  1203. {
  1204. * GetIconRef()
  1205. *
  1206. * Availability:
  1207. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1208. * CarbonLib: in CarbonLib 1.0 and later
  1209. * Mac OS X: in version 10.0 and later
  1210. }
  1211. function GetIconRef(vRefNum: SInt16; creator: OSType; iconType: OSType; var theIconRef: IconRef): OSErr; external name '_GetIconRef';
  1212. {
  1213. GetIconRefFromFolder
  1214. This routine returns an icon ref for a folder with no custom icon.
  1215. Use the more generic, but slightly slower, GetIconRefFromFile() if
  1216. you don't already have the necessary info about the file.
  1217. Attributes should be CInfoPBRec.dirInfo.ioFlAttrib for this folder.
  1218. Access privileges should be CInfoPBRec.dirInfo.ioACUser for this folder.
  1219. This routine increments the reference count of the IconRef. Call ReleaseIconRef()
  1220. when you're done with it.
  1221. }
  1222. {
  1223. * GetIconRefFromFolder()
  1224. *
  1225. * Availability:
  1226. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1227. * CarbonLib: in CarbonLib 1.0 and later
  1228. * Mac OS X: in version 10.0 and later
  1229. }
  1230. function GetIconRefFromFolder(vRefNum: SInt16; parentFolderID: SInt32; folderID: SInt32; attributes: SInt8; accessPrivileges: SInt8; var theIconRef: IconRef): OSErr; external name '_GetIconRefFromFolder';
  1231. { GetIconRefFromFileInfo }
  1232. {
  1233. * GetIconRefFromFileInfo()
  1234. *
  1235. * Summary:
  1236. * This routine returns an IconRef for a file with minimal file I/O.
  1237. *
  1238. * Discussion:
  1239. * To minimize file operations, FSGetCatalogInfo should be called
  1240. * prior to calling this routine. The FSCatalogInfo should
  1241. * correspond to kIconServicesCatalogInfoMask The name should be
  1242. * fetched and passed in. If either the name or the correct catalog
  1243. * info is not passed in, this routine will do file operations for
  1244. * this information instead.
  1245. *
  1246. * Parameters:
  1247. *
  1248. * inRef:
  1249. * An FSRef for the target file
  1250. *
  1251. * inFileNameLength:
  1252. * The length of the name of the target file
  1253. *
  1254. * inFileName:
  1255. * The name of the target file
  1256. *
  1257. * inWhichInfo:
  1258. * The mask of file info already acquired.
  1259. *
  1260. * inCatalogInfo:
  1261. * The catalog info already acquired.
  1262. *
  1263. * inUsageFlags:
  1264. * The usage flags for this call (use
  1265. * kIconServicesNormalUsageFlag).
  1266. *
  1267. * outIconRef:
  1268. * The output IconRef for the routine.
  1269. *
  1270. * outLabel:
  1271. * The output label for the icon/file.
  1272. *
  1273. * Availability:
  1274. * Non-Carbon CFM: not available
  1275. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1276. * Mac OS X: in version 10.1 and later
  1277. }
  1278. function GetIconRefFromFileInfo(const (*var*) inRef: FSRef; inFileNameLength: UniCharCount; inFileName: UniCharPtr; inWhichInfo: FSCatalogInfoBitmap; inCatalogInfo: {Const}FSCatalogInfoPtr; inUsageFlags: IconServicesUsageFlags; var outIconRef: IconRef; var outLabel: SInt16): OSStatus; external name '_GetIconRefFromFileInfo';
  1279. { GetIconRefFromTypeInfo}
  1280. {
  1281. * GetIconRefFromTypeInfo()
  1282. *
  1283. * Summary:
  1284. * Create an IconRef for a type information.
  1285. *
  1286. * Discussion:
  1287. * Creates IconRef based on provided type info. Any of the input
  1288. * parameters can be zero (meaning it is unknown). Returns generic
  1289. * document icon in case if all parameters are zeroes. Calling the
  1290. * routine with non zero inCreator and inType and zero inExtension
  1291. * and inMIMEType is equivalent to GetIconRef(kOnSystemDisk,
  1292. * inCreator, inType).
  1293. *
  1294. * Mac OS X threading:
  1295. * Not thread safe
  1296. *
  1297. * Parameters:
  1298. *
  1299. * inCreator:
  1300. * The creator.
  1301. *
  1302. * inType:
  1303. * The type.
  1304. *
  1305. * inExtension:
  1306. * The extension.
  1307. *
  1308. * inMIMEType:
  1309. * The MIME type.
  1310. *
  1311. * inUsageFlags:
  1312. * The usage flags for this call (use
  1313. * kIconServicesNormalUsageFlag).
  1314. *
  1315. * outIconRef:
  1316. * The output IconRef for the routine.
  1317. *
  1318. * Availability:
  1319. * Mac OS X: in version 10.3 and later in ApplicationServices.framework
  1320. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1321. * Non-Carbon CFM: not available
  1322. }
  1323. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  1324. function GetIconRefFromTypeInfo( inCreator: OSType; inType: OSType; inExtension: CFStringRef; inMIMEType: CFStringRef; inUsageFlags: IconServicesUsageFlags; var outIconRef: IconRef ): OSErr; external name '_GetIconRefFromTypeInfo';
  1325. { GetIconRefFromIconFamilyPtr}
  1326. {
  1327. * GetIconRefFromIconFamilyPtr()
  1328. *
  1329. * Summary:
  1330. * Create an IconRef for the IconFamilyPtr.
  1331. *
  1332. * Discussion:
  1333. * This routine creates IconRef for the IconFamilyPtr.
  1334. *
  1335. * Mac OS X threading:
  1336. * Not thread safe
  1337. *
  1338. * Parameters:
  1339. *
  1340. * inIconFamilyPtr:
  1341. * The icon data
  1342. *
  1343. * inSize:
  1344. * The icon data size
  1345. *
  1346. * outIconRef:
  1347. * The output IconRef for the routine.
  1348. *
  1349. * Availability:
  1350. * Mac OS X: in version 10.3 and later in ApplicationServices.framework
  1351. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1352. * Non-Carbon CFM: not available
  1353. }
  1354. // AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER
  1355. function GetIconRefFromIconFamilyPtr( const (*var*) inIconFamilyPtr: IconFamilyResource; inSize: Size; var outIconRef: IconRef ): OSStatus; external name '_GetIconRefFromIconFamilyPtr';
  1356. {
  1357. ==============================================================================
  1358. Adding and modifying IconRef
  1359. ==============================================================================
  1360. }
  1361. {
  1362. RegisterIconRefFromIconFamily
  1363. This routine adds a new entry to the IconRef registry. Other clients will be
  1364. able to access it using the (creator, iconType) pair specified here.
  1365. Lower-case creators are reserved for the system.
  1366. Consider using RegisterIconRefFromResource() if possible, since the data
  1367. registered using RegisterIconRefFromFamily() cannot be purged.
  1368. The iconFamily data is copied and the caller is reponsible for disposing of it.
  1369. This routine increments the reference count of the IconRef. Call ReleaseIconRef()
  1370. when you're done with it.
  1371. }
  1372. {
  1373. * RegisterIconRefFromIconFamily()
  1374. *
  1375. * Availability:
  1376. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1377. * CarbonLib: in CarbonLib 1.0 and later
  1378. * Mac OS X: in version 10.0 and later
  1379. }
  1380. function RegisterIconRefFromIconFamily(creator: OSType; iconType: OSType; iconFamily: IconFamilyHandle; var theIconRef: IconRef): OSErr; external name '_RegisterIconRefFromIconFamily';
  1381. {
  1382. RegisterIconRefFromResource
  1383. Registers an IconRef from a resouce file.
  1384. Lower-case creators are reserved for the system.
  1385. The icon data to be fetched is either classic icon data or an icon family.
  1386. The 'icns' icon family is searched for before the classic icon data.
  1387. This routine increments the reference count of the IconRef. Call ReleaseIconRef()
  1388. when you're done with it.
  1389. }
  1390. {
  1391. * RegisterIconRefFromResource()
  1392. *
  1393. * Availability:
  1394. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1395. * CarbonLib: in CarbonLib 1.0 and later
  1396. * Mac OS X: in version 10.0 and later
  1397. }
  1398. function RegisterIconRefFromResource(creator: OSType; iconType: OSType; const (*var*) resourceFile: FSSpec; resourceID: SInt16; var theIconRef: IconRef): OSErr; external name '_RegisterIconRefFromResource';
  1399. { RegisterIconRefFromFSRef }
  1400. {
  1401. * RegisterIconRefFromFSRef()
  1402. *
  1403. * Discussion:
  1404. * This routine registers an IconRef from a ".icns" file and
  1405. * associates it with a creator/type pair.
  1406. *
  1407. * Parameters:
  1408. *
  1409. * creator:
  1410. * The creator code for the icns file.
  1411. *
  1412. * iconType:
  1413. * The type code for the icns file
  1414. *
  1415. * iconFile:
  1416. * The FSRef of the icns file.
  1417. *
  1418. * theIconRef:
  1419. * The output IconRef for the routine.
  1420. *
  1421. * Availability:
  1422. * Non-Carbon CFM: not available
  1423. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1424. * Mac OS X: in version 10.1 and later
  1425. }
  1426. function RegisterIconRefFromFSRef(creator: OSType; iconType: OSType; const (*var*) iconFile: FSRef; var theIconRef: IconRef): OSStatus; external name '_RegisterIconRefFromFSRef';
  1427. {
  1428. UnregisterIconRef
  1429. Removes the specified icon from the icon cache (if there are no users of it).
  1430. If some clients are using this iconRef, then the IconRef will be removed when the
  1431. last user calls ReleaseIconRef.
  1432. }
  1433. {
  1434. * UnregisterIconRef()
  1435. *
  1436. * Availability:
  1437. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1438. * CarbonLib: in CarbonLib 1.0 and later
  1439. * Mac OS X: in version 10.0 and later
  1440. }
  1441. function UnregisterIconRef(creator: OSType; iconType: OSType): OSErr; external name '_UnregisterIconRef';
  1442. {
  1443. UpdateIconRef
  1444. Call this routine to force an update of the data for iconRef.
  1445. For example after changing an icon in the desktop database or changing the custom
  1446. icon of a file. Note that after _adding_ a custom icon to file or folder, you
  1447. need to call GetIconRefFromFile() to get a new IconRef specific to this file.
  1448. This routine does nothing if the IconRef is a registered icon.
  1449. }
  1450. {
  1451. * UpdateIconRef()
  1452. *
  1453. * Availability:
  1454. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1455. * CarbonLib: in CarbonLib 1.0 and later
  1456. * Mac OS X: in version 10.0 and later
  1457. }
  1458. function UpdateIconRef(theIconRef: IconRef): OSErr; external name '_UpdateIconRef';
  1459. {
  1460. OverrideIconRefFromResource
  1461. This routines replaces the bitmaps of the specified IconRef with the ones
  1462. in the specified resource file.
  1463. }
  1464. {
  1465. * OverrideIconRefFromResource()
  1466. *
  1467. * Availability:
  1468. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1469. * CarbonLib: in CarbonLib 1.0 and later
  1470. * Mac OS X: in version 10.0 and later
  1471. }
  1472. function OverrideIconRefFromResource(theIconRef: IconRef; const (*var*) resourceFile: FSSpec; resourceID: SInt16): OSErr; external name '_OverrideIconRefFromResource';
  1473. {
  1474. OverrideIconRef
  1475. This routines replaces the bitmaps of the specified IconRef with the ones
  1476. from the new IconRef.
  1477. }
  1478. {
  1479. * OverrideIconRef()
  1480. *
  1481. * Availability:
  1482. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1483. * CarbonLib: in CarbonLib 1.0 and later
  1484. * Mac OS X: in version 10.0 and later
  1485. }
  1486. function OverrideIconRef(oldIconRef: IconRef; newIconRef: IconRef): OSErr; external name '_OverrideIconRef';
  1487. {
  1488. RemoveIconRefOverride
  1489. This routine remove an override if one was applied to the icon and
  1490. reverts back to the original bitmap data.
  1491. }
  1492. {
  1493. * RemoveIconRefOverride()
  1494. *
  1495. * Availability:
  1496. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1497. * CarbonLib: in CarbonLib 1.0 and later
  1498. * Mac OS X: in version 10.0 and later
  1499. }
  1500. function RemoveIconRefOverride(theIconRef: IconRef): OSErr; external name '_RemoveIconRefOverride';
  1501. {
  1502. ==============================================================================
  1503. Creating composite IconRef
  1504. ==============================================================================
  1505. }
  1506. {
  1507. CompositeIconRef
  1508. Superimposes an IconRef on top of another one
  1509. }
  1510. {
  1511. * CompositeIconRef()
  1512. *
  1513. * Availability:
  1514. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1515. * CarbonLib: in CarbonLib 1.0 and later
  1516. * Mac OS X: in version 10.0 and later
  1517. }
  1518. function CompositeIconRef(backgroundIconRef: IconRef; foregroundIconRef: IconRef; var compositeIconRef: IconRef): OSErr; external name '_CompositeIconRef';
  1519. {
  1520. IsIconRefComposite
  1521. Indicates if a given icon ref is a composite of two other icon refs (and which ones)
  1522. If it isn't a composite, backgroundIconRef and foreGroundIconRef will be 0.
  1523. }
  1524. {
  1525. * IsIconRefComposite()
  1526. *
  1527. * Availability:
  1528. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1529. * CarbonLib: in CarbonLib 1.0 and later
  1530. * Mac OS X: in version 10.0 and later
  1531. }
  1532. function IsIconRefComposite(compositeIconRef: IconRef; var backgroundIconRef: IconRef; var foregroundIconRef: IconRef): OSErr; external name '_IsIconRefComposite';
  1533. {
  1534. ==============================================================================
  1535. Using IconRef
  1536. ==============================================================================
  1537. }
  1538. {
  1539. IsValidIconRef
  1540. Return true if the iconRef passed in is a valid icon ref
  1541. }
  1542. {
  1543. * IsValidIconRef()
  1544. *
  1545. * Availability:
  1546. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1547. * CarbonLib: in CarbonLib 1.0 and later
  1548. * Mac OS X: in version 10.0 and later
  1549. }
  1550. function IsValidIconRef(theIconRef: IconRef): boolean; external name '_IsValidIconRef';
  1551. {
  1552. PlotIconRef
  1553. This routine plots the IconRef. It mostly takes the same parameters as
  1554. PlotIconSuite. Pass kIconServicesNormalUsageFlag as a default value for
  1555. IconServicesUsageFlags.
  1556. }
  1557. {
  1558. * PlotIconRef()
  1559. *
  1560. * Availability:
  1561. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1562. * CarbonLib: in CarbonLib 1.0 and later
  1563. * Mac OS X: in version 10.0 and later
  1564. }
  1565. function PlotIconRef(const (*var*) theRect: Rect; align: IconAlignmentType; transform: IconTransformType; theIconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_PlotIconRef';
  1566. { PlotIconRefInContext }
  1567. {
  1568. * PlotIconRefInContext()
  1569. *
  1570. * Discussion:
  1571. * This routines plots an IconRef using Quartz/CoreGraphics.
  1572. *
  1573. * Parameters:
  1574. *
  1575. * inContext:
  1576. * The graphics context to use.
  1577. *
  1578. * inRect:
  1579. * The rect to plot the icon in.
  1580. *
  1581. * inAlign:
  1582. * The icon alignment.
  1583. *
  1584. * inTransform:
  1585. * The icon transform.
  1586. *
  1587. * inLabelColor:
  1588. * The icon label color.
  1589. *
  1590. * inFlags:
  1591. * The drawing flags to use (usually kPlotIconRefNormalFlags).
  1592. *
  1593. * inIconRef:
  1594. * The IconRef to plot.
  1595. *
  1596. * Availability:
  1597. * Non-Carbon CFM: not available
  1598. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1599. * Mac OS X: in version 10.1 and later
  1600. }
  1601. function PlotIconRefInContext(inContext: CGContextRef; const (*var*) inRect: CGRect; inAlign: IconAlignmentType; inTransform: IconTransformType; inLabelColor: RGBColorPtr; inFlags: PlotIconRefFlags; inIconRef: IconRef): OSStatus; external name '_PlotIconRefInContext';
  1602. {
  1603. PtInIconRef
  1604. This routine indicates if testPt would hit the icon designated by iconRef.
  1605. It mostly takes the same parameters as PtInIconSuite.
  1606. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
  1607. }
  1608. {
  1609. * PtInIconRef()
  1610. *
  1611. * Availability:
  1612. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1613. * CarbonLib: in CarbonLib 1.0 and later
  1614. * Mac OS X: in version 10.0 and later
  1615. }
  1616. function PtInIconRef(const (*var*) testPt: Point; const (*var*) iconRect: Rect; align: IconAlignmentType; theIconServicesUsageFlags: IconServicesUsageFlags; theIconRef: IconRef): boolean; external name '_PtInIconRef';
  1617. {
  1618. RectInIconRef
  1619. This routine indicates if testRect would intersect the icon designated by iconRef.
  1620. It mostly takes the same parameters as RectInIconSuite.
  1621. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
  1622. }
  1623. {
  1624. * RectInIconRef()
  1625. *
  1626. * Availability:
  1627. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1628. * CarbonLib: in CarbonLib 1.0 and later
  1629. * Mac OS X: in version 10.0 and later
  1630. }
  1631. function RectInIconRef(const (*var*) testRect: Rect; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): boolean; external name '_RectInIconRef';
  1632. {
  1633. IconRefToRgn
  1634. This routine returns a region for the icon.
  1635. It mostly takes the same parameters as IconSuiteToRgn.
  1636. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
  1637. }
  1638. {
  1639. * IconRefToRgn()
  1640. *
  1641. * Availability:
  1642. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1643. * CarbonLib: in CarbonLib 1.0 and later
  1644. * Mac OS X: in version 10.0 and later
  1645. }
  1646. function IconRefToRgn(theRgn: RgnHandle; const (*var*) iconRect: Rect; align: IconAlignmentType; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_IconRefToRgn';
  1647. {
  1648. GetIconSizesFromIconRef
  1649. This routine returns an IconSelectorValue indicating the depths and sizes of
  1650. icon data which are actually available. It takes an IconSelectorValue
  1651. indicating which sizes/depths the caller is interested and returns an
  1652. IconSelectorValue indicating which sizes/depths exist.
  1653. Caution:
  1654. This is potentially an extremely expensive call as IconServices may be forced
  1655. to attempt fetching the data for the IconRef's sizes/depths which may result
  1656. in hitting the local disk or even the network to obtain the data to determine
  1657. which sizes/depths actually exist.
  1658. Pass kIconServicesNormalUsageFlag as a default value for IconServicesUsageFlags.
  1659. This call is deprecated. Please use IsDataAvailableInIconRef() instead.
  1660. }
  1661. {
  1662. * GetIconSizesFromIconRef() *** DEPRECATED ***
  1663. *
  1664. * Mac OS X threading:
  1665. * Not thread safe
  1666. *
  1667. * Availability:
  1668. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1669. * CarbonLib: in CarbonLib 1.0 and later
  1670. * Mac OS X: in version 10.0 and later
  1671. }
  1672. function GetIconSizesFromIconRef(iconSelectorInput: IconSelectorValue; var iconSelectorOutputPtr: IconSelectorValue; iconServicesUsageFlags_: IconServicesUsageFlags; theIconRef: IconRef): OSErr; external name '_GetIconSizesFromIconRef';
  1673. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  1674. { IsDataAvailableInIconRef}
  1675. {
  1676. * IsDataAvailableInIconRef()
  1677. *
  1678. * Summary:
  1679. * Check if IconRef has specific data.
  1680. *
  1681. * Discussion:
  1682. * This routine returns true if inIconKind icon data is availabe or
  1683. * can be created.
  1684. *
  1685. * Mac OS X threading:
  1686. * Not thread safe
  1687. *
  1688. * Parameters:
  1689. *
  1690. * inIconKind:
  1691. * The icon data kind
  1692. *
  1693. * inIconRef:
  1694. * The IconRef to test.
  1695. *
  1696. * Availability:
  1697. * Mac OS X: in version 10.3 and later in ApplicationServices.framework
  1698. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1699. * Non-Carbon CFM: not available
  1700. }
  1701. function IsDataAvailableInIconRef( inIconKind: OSType; inIconRef: IconRef ): Boolean; external name '_IsDataAvailableInIconRef';
  1702. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1703. {
  1704. ==============================================================================
  1705. Flushing IconRef data
  1706. ==============================================================================
  1707. }
  1708. {
  1709. FlushIconRefs
  1710. Making this call will dispose of all the data for the specified icons if
  1711. the data can be reacquired, for example if the data is provided from a resource.
  1712. '****' is a wildcard for all types or all creators.
  1713. }
  1714. {
  1715. * FlushIconRefs() *** DEPRECATED ***
  1716. *
  1717. * Mac OS X threading:
  1718. * Thread safe since version 10.2
  1719. *
  1720. * Availability:
  1721. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
  1722. * CarbonLib: in CarbonLib 1.0 and later
  1723. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1724. }
  1725. function FlushIconRefs(creator: OSType; iconType: OSType): OSErr; external name '_FlushIconRefs';
  1726. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  1727. {
  1728. FlushIconRefsByVolume
  1729. This routine disposes of the data for the icons related to the indicated volume
  1730. if this data can be reacquired, for example if the data is provided from a
  1731. resource.
  1732. }
  1733. {
  1734. * FlushIconRefsByVolume() *** DEPRECATED ***
  1735. *
  1736. * Mac OS X threading:
  1737. * Thread safe since version 10.2
  1738. *
  1739. * Availability:
  1740. * Mac OS X: in version 10.0 and later in ApplicationServices.framework but deprecated in 10.3
  1741. * CarbonLib: in CarbonLib 1.0 and later
  1742. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1743. }
  1744. function FlushIconRefsByVolume(vRefNum: SInt16): OSErr; external name '_FlushIconRefsByVolume';
  1745. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  1746. {
  1747. ==============================================================================
  1748. Controling custom icons
  1749. ==============================================================================
  1750. }
  1751. {
  1752. SetCustomIconsEnabled
  1753. Enable or disable custom icons on the specified volume.
  1754. }
  1755. {
  1756. * SetCustomIconsEnabled()
  1757. *
  1758. * Availability:
  1759. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1760. * CarbonLib: in CarbonLib 1.0 and later
  1761. * Mac OS X: in version 10.0 and later
  1762. }
  1763. function SetCustomIconsEnabled(vRefNum: SInt16; enableCustomIcons: boolean): OSErr; external name '_SetCustomIconsEnabled';
  1764. {
  1765. GetCustomIconsEnabled
  1766. Return true if custom icons are enabled on the specified volume, false otherwise.
  1767. }
  1768. {
  1769. * GetCustomIconsEnabled()
  1770. *
  1771. * Availability:
  1772. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1773. * CarbonLib: in CarbonLib 1.0 and later
  1774. * Mac OS X: in version 10.0 and later
  1775. }
  1776. function GetCustomIconsEnabled(vRefNum: SInt16; var customIconsEnabled: boolean): OSErr; external name '_GetCustomIconsEnabled';
  1777. {
  1778. IsIconRefMaskEmpty
  1779. Returns true if the mask for this icon is blank
  1780. }
  1781. {
  1782. * IsIconRefMaskEmpty()
  1783. *
  1784. * Availability:
  1785. * Non-Carbon CFM: in IconServicesLib 8.5 and later
  1786. * CarbonLib: in CarbonLib 1.0 and later
  1787. * Mac OS X: in version 10.0 and later
  1788. }
  1789. function IsIconRefMaskEmpty(iconRef_: IconRef): boolean; external name '_IsIconRefMaskEmpty';
  1790. {
  1791. GetIconRefVariant
  1792. Icon variants allows different images to be used with different icon state.
  1793. For example, the 'open' variant for a folder could be represented with
  1794. an open folder.
  1795. Given an icon ref and a desired variant, this routine returns an icon
  1796. ref (which may be the same as the input icon ref) and a transformation
  1797. which should be used with PlotIconRef() to render the icon appropriately.
  1798. The returned icon ref should be used to do hit-testing.
  1799. }
  1800. {
  1801. * GetIconRefVariant()
  1802. *
  1803. * Availability:
  1804. * Non-Carbon CFM: in IconServicesLib 9.0 and later
  1805. * CarbonLib: in CarbonLib 1.0 and later
  1806. * Mac OS X: in version 10.0 and later
  1807. }
  1808. function GetIconRefVariant(inIconRef: IconRef; inVariant: OSType; var outTransform: IconTransformType): IconRef; external name '_GetIconRefVariant';
  1809. {
  1810. ==============================================================================
  1811. Icon files (.icns files)
  1812. ==============================================================================
  1813. }
  1814. {
  1815. RegisterIconRefFromIconFile
  1816. This routine adds a new entry to the IconRef registry. Other clients will be
  1817. able to access it using the (creator, iconType) pair specified here.
  1818. Lower-case creators are reserved for the system.
  1819. If the creator is kSystemIconsCreator and the iconType is 0, a new IconRef
  1820. is always returned. Otherwise, if the creator and type have already been
  1821. registered, the previously registered IconRef is returned.
  1822. This routine increments the reference count of the IconRef. Call ReleaseIconRef()
  1823. when you're done with it.
  1824. }
  1825. {
  1826. * RegisterIconRefFromIconFile()
  1827. *
  1828. * Availability:
  1829. * Non-Carbon CFM: in IconServicesLib 9.0 and later
  1830. * CarbonLib: in CarbonLib 1.0 and later
  1831. * Mac OS X: in version 10.0 and later
  1832. }
  1833. function RegisterIconRefFromIconFile(creator: OSType; iconType: OSType; const (*var*) iconFile: FSSpec; var theIconRef: IconRef): OSErr; external name '_RegisterIconRefFromIconFile';
  1834. {
  1835. ReadIconFile
  1836. Read the specified icon file into the icon family handle.
  1837. The caller is responsible for disposing the iconFamily
  1838. }
  1839. {
  1840. * ReadIconFile()
  1841. *
  1842. * Availability:
  1843. * Non-Carbon CFM: in IconServicesLib 9.0 and later
  1844. * CarbonLib: in CarbonLib 1.0 and later
  1845. * Mac OS X: in version 10.0 and later
  1846. }
  1847. function ReadIconFile(const (*var*) iconFile: FSSpec; var iconFamily: IconFamilyHandle): OSErr; external name '_ReadIconFile';
  1848. { ReadIconFromFSRef }
  1849. {
  1850. * ReadIconFromFSRef()
  1851. *
  1852. * Discussion:
  1853. * This routine reads an icon (icns) file into memory.
  1854. *
  1855. * Parameters:
  1856. *
  1857. * ref:
  1858. * The FSRef for the icon file.
  1859. *
  1860. * iconFamily:
  1861. * The handle for the icon family.
  1862. *
  1863. * Availability:
  1864. * Non-Carbon CFM: not available
  1865. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1866. * Mac OS X: in version 10.1 and later
  1867. }
  1868. function ReadIconFromFSRef(const (*var*) ref: FSRef; var iconFamily: IconFamilyHandle): OSStatus; external name '_ReadIconFromFSRef';
  1869. {
  1870. WriteIconFile
  1871. Write the iconFamily handle to the specified file
  1872. }
  1873. {
  1874. * WriteIconFile()
  1875. *
  1876. * Availability:
  1877. * Non-Carbon CFM: in IconServicesLib 9.0 and later
  1878. * CarbonLib: in CarbonLib 1.0 and later
  1879. * Mac OS X: in version 10.0 and later
  1880. }
  1881. function WriteIconFile(iconFamily: IconFamilyHandle; const (*var*) iconFile: FSSpec): OSErr; external name '_WriteIconFile';
  1882. {$ALIGN MAC68K}
  1883. end.