HIToolbar.pas 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413
  1. {
  2. File: HIToolbox/HIToolbar.h
  3. Contains: Toolbar and Toolbar Item API
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { File: HIToolbar.p(.pas) }
  11. { }
  12. { Contains: CodeWarrior Pascal(GPC) translation of Apple's Mac OS X 10.2 introduced HIToolbar.h. }
  13. { Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
  14. { is linkable with Mac OS X 10.2.x or higher CFM CarbonLib and the GPC translation is }
  15. { linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. For the 10.3 }
  16. { available APIs, the CodeWarrior Pascal translation is only selectively linkable with }
  17. { Mac OS X 10.3.x or higher CFM CarbonLib and the GPC translation is linkable with Mac }
  18. { OS X 10.3.x or higher Mach-O Carbon.framework. }
  19. { }
  20. { Version: 1.1 }
  21. { }
  22. { Pascal Translation: Gale Paeper, <[email protected]>, 2004 }
  23. { }
  24. { Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
  25. { translation as you deem fit. }
  26. { }
  27. { Bugs?: This is an AS IS translation with no express guarentees of any kind. }
  28. { If you do find a bug, please help out the Macintosh Pascal programming community by }
  29. { reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
  30. { or a posting to the MacPascal mailing list. }
  31. { }
  32. {
  33. Change History (most recent first):
  34. <4> 5/8/04 GRP Completed new additions from HIToolbar.h, version HIToolbox-145.33~1.
  35. <3> ?/?/04 PNL Added most new additions from HIToolbar.h, version HIToolbox-145.33~1.
  36. <2> 10/02/04 GRP Added support for GPC as well as CodeWarrior Pascal.
  37. <1> 9/8/03 GRP First Pascal translation of HIToolbar.h, version HIToolbox-123.6~10.
  38. }
  39. { Translation assisted by: }
  40. {This file was processed by Dan's Source Converter}
  41. {version 1.3 (this version modified by Ingemar Ragnemalm)}
  42. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  43. {
  44. Modified for use with Free Pascal
  45. Version 200
  46. Please report any bugs to <[email protected]>
  47. }
  48. {$mode macpas}
  49. {$packenum 1}
  50. {$macro on}
  51. {$inline on}
  52. {$CALLING MWPASCAL}
  53. unit HIToolbar;
  54. interface
  55. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  56. {$setc GAP_INTERFACES_VERSION := $0200}
  57. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  58. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  59. {$endc}
  60. {$ifc defined CPUPOWERPC and defined CPUI386}
  61. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  62. {$endc}
  63. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  64. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  65. {$endc}
  66. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  67. {$setc __ppc__ := 1}
  68. {$elsec}
  69. {$setc __ppc__ := 0}
  70. {$endc}
  71. {$ifc not defined __i386__ and defined CPUI386}
  72. {$setc __i386__ := 1}
  73. {$elsec}
  74. {$setc __i386__ := 0}
  75. {$endc}
  76. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  77. {$error Conflicting definitions for __ppc__ and __i386__}
  78. {$endc}
  79. {$ifc defined __ppc__ and __ppc__}
  80. {$setc TARGET_CPU_PPC := TRUE}
  81. {$setc TARGET_CPU_X86 := FALSE}
  82. {$elifc defined __i386__ and __i386__}
  83. {$setc TARGET_CPU_PPC := FALSE}
  84. {$setc TARGET_CPU_X86 := TRUE}
  85. {$elsec}
  86. {$error Neither __ppc__ nor __i386__ is defined.}
  87. {$endc}
  88. {$setc TARGET_CPU_PPC_64 := FALSE}
  89. {$ifc defined FPC_BIG_ENDIAN}
  90. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  91. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  92. {$elifc defined FPC_LITTLE_ENDIAN}
  93. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  94. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  95. {$elsec}
  96. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  97. {$endc}
  98. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  99. {$setc CALL_NOT_IN_CARBON := FALSE}
  100. {$setc OLDROUTINENAMES := FALSE}
  101. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  102. {$setc OPAQUE_UPP_TYPES := TRUE}
  103. {$setc OTCARBONAPPLICATION := TRUE}
  104. {$setc OTKERNEL := FALSE}
  105. {$setc PM_USE_SESSION_APIS := TRUE}
  106. {$setc TARGET_API_MAC_CARBON := TRUE}
  107. {$setc TARGET_API_MAC_OS8 := FALSE}
  108. {$setc TARGET_API_MAC_OSX := TRUE}
  109. {$setc TARGET_CARBON := TRUE}
  110. {$setc TARGET_CPU_68K := FALSE}
  111. {$setc TARGET_CPU_MIPS := FALSE}
  112. {$setc TARGET_CPU_SPARC := FALSE}
  113. {$setc TARGET_OS_MAC := TRUE}
  114. {$setc TARGET_OS_UNIX := FALSE}
  115. {$setc TARGET_OS_WIN32 := FALSE}
  116. {$setc TARGET_RT_MAC_68881 := FALSE}
  117. {$setc TARGET_RT_MAC_CFM := FALSE}
  118. {$setc TARGET_RT_MAC_MACHO := TRUE}
  119. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  120. {$setc TYPE_BOOL := FALSE}
  121. {$setc TYPE_EXTENDED := FALSE}
  122. {$setc TYPE_LONGLONG := TRUE}
  123. uses MacTypes,CFArray,CFBase,CGImage,Icons,Menus,HIObjectCore,Quickdraw;
  124. {$ALIGN POWER}
  125. type
  126. HIToolbarRef = HIObjectRef;
  127. type
  128. HIToolbarItemRef = HIObjectRef;
  129. {----------------------------------------------------------------------------------}
  130. { Config data keys used in HIToolbarSetItemsWithIdentifiers }
  131. {----------------------------------------------------------------------------------}
  132. {$ifc USE_CFSTR_CONSTANT_MACROS}
  133. {$definec kHIToolbarIdentifierKey CFSTRP('identifier')}
  134. {$endc}
  135. {$ifc USE_CFSTR_CONSTANT_MACROS}
  136. {$definec kHIToolbarDataKey CFSTRP('data')}
  137. {$endc}
  138. {----------------------------------------------------------------------------------}
  139. { Standard Toolbox-provided item identifiers }
  140. {----------------------------------------------------------------------------------}
  141. {$ifc USE_CFSTR_CONSTANT_MACROS}
  142. {$definec kHIToolbarSeparatorIdentifier CFSTRP('com.apple.hitoolbox.toolbar.separator')}
  143. {$endc}
  144. {$ifc USE_CFSTR_CONSTANT_MACROS}
  145. {$definec kHIToolbarSpaceIdentifier CFSTRP('com.apple.hitoolbox.toolbar.space')}
  146. {$endc}
  147. {$ifc USE_CFSTR_CONSTANT_MACROS}
  148. {$definec kHIToolbarFlexibleSpaceIdentifier CFSTRP('com.apple.hitoolbox.toolbar.flexiblespace')}
  149. {$endc}
  150. {$ifc USE_CFSTR_CONSTANT_MACROS}
  151. {$definec kHIToolbarCustomizeIdentifier CFSTRP('com.apple.hitoolbox.toolbar.customize')}
  152. {$endc}
  153. {$ifc USE_CFSTR_CONSTANT_MACROS}
  154. {$definec kHIToolbarPrintItemIdentifier CFSTRP('com.apple.hitoolbox.toolbar.print')}
  155. {$endc}
  156. {$ifc USE_CFSTR_CONSTANT_MACROS}
  157. {$definec kHIToolbarFontsItemIdentifier CFSTRP('com.apple.hitoolbox.toolbar.fonts')}
  158. {$endc}
  159. {
  160. * Summary:
  161. * Toolbar Display Mode
  162. }
  163. const
  164. {
  165. * This indicates to use the default display mode. Currently, this is
  166. * defined as being both icon and label, but could change in the
  167. * future.
  168. }
  169. kHIToolbarDisplayModeDefault = 0;
  170. {
  171. * This indicates to display the image as well as the label of the
  172. * toolbar items.
  173. }
  174. kHIToolbarDisplayModeIconAndLabel = 1;
  175. {
  176. * This indicates that only the image should be shown.
  177. }
  178. kHIToolbarDisplayModeIconOnly = 2;
  179. {
  180. * This indicates that only the label should be shown.
  181. }
  182. kHIToolbarDisplayModeLabelOnly = 3;
  183. type
  184. HIToolbarDisplayMode = UInt32;
  185. {
  186. * Summary:
  187. * Toolbar Display Size
  188. }
  189. const
  190. {
  191. * This indicates to use the default display size. Currently, this is
  192. * defined as using 32 x 32 icons ("normal" size).
  193. }
  194. kHIToolbarDisplaySizeDefault = 0;
  195. {
  196. * This size uses a larger text and icon size.
  197. }
  198. kHIToolbarDisplaySizeNormal = 1;
  199. {
  200. * This size uses a smaller text and icon size.
  201. }
  202. kHIToolbarDisplaySizeSmall = 2;
  203. type
  204. HIToolbarDisplaySize = UInt32;
  205. {
  206. * Summary:
  207. * Toolbar Attributes
  208. }
  209. const
  210. {
  211. * Pass this to indicate no attributes at all.
  212. }
  213. kHIToolbarNoAttributes = 0;
  214. {
  215. * Pass this attribute to allow the toolbar to save its configuration
  216. * automatically to your application's preferences. You must make
  217. * sure to synchronize the prefs at some point to ensure it gets
  218. * written to disk. The toolbar will also read its config from the
  219. * prefs if this attribute is set.
  220. }
  221. kHIToolbarAutoSavesConfig = 1 shl 0;
  222. {
  223. * This attribute indicates that the toolbar is configurable, i.e.
  224. * the user can drag items around and bring up the configuration
  225. * palette, etc.
  226. }
  227. kHIToolbarIsConfigurable = 1 shl 1;
  228. kHIToolbarValidAttrs = kHIToolbarAutoSavesConfig or kHIToolbarIsConfigurable;
  229. {
  230. * Summary:
  231. * Toolbar Commands
  232. }
  233. const
  234. {
  235. * Sending this to a window with a toolbar will cause the
  236. * configuration sheet to appear. You can set a menu item's command
  237. * to this command ID and it will be handled and updated
  238. * automatically for you.
  239. }
  240. kHICommandCustomizeToolbar = $74636667 (* 'tcfg' *);
  241. {
  242. * This command causes a window's toolbar to be shown. You can set a
  243. * menu item's command to this ID and it will be handled and updated
  244. * automatically for you.
  245. }
  246. kHICommandShowToolbar = $74627368 (* 'tbsh' *);
  247. {
  248. * This command causes a window's toolbar to be hidden. You can set a
  249. * menu item's command to this ID and it will be handled and updated
  250. * automatically for you.
  251. }
  252. kHICommandHideToolbar = $74626864 (* 'tbhd' *);
  253. {
  254. * This command, when specified as a toolbar itemÕs command ID, will
  255. * cause a kEventToolbarItemPerformAction event to be generated when
  256. * the toolbar itemÕs menu item in the toolbar overflow menu is
  257. * selected. If the item has any other command ID, a
  258. * kEventCommandProcess event will be generated instead, containing
  259. * the itemÕs command ID.
  260. }
  261. kHIToolbarCommandPressAction = $74627072 (* 'tbpr' *);
  262. {
  263. kEventClassToolbar quick reference:
  264. kEventToolbarGetDefaultIdentifiers = 1,
  265. kEventToolbarGetAllowedIdentifiers = 2,
  266. kEventToolbarCreateItemWithIdentifier = 3,
  267. kEventToolbarCreateItemFromDrag = 4,
  268. kEventToolbarItemAdded = 5,
  269. kEventToolbarItemRemoved = 6,
  270. kEventToolbarDisplayModeChanged = 7,
  271. kEventToolbarDisplaySizeChanged = 8,
  272. kEventToolbarLayoutChanged = 9,
  273. kEventToolbarGetSelectableIdentifiers = 10,
  274. kEventToolbarBeginMultiChange = 12,
  275. kEventToolbarEndMultiChange = 13
  276. }
  277. { Toolbar event parameters and types}
  278. const
  279. kEventParamToolbar = $74626172 (* 'tbar' *); { typeHIToolbarRef}
  280. kEventParamToolbarItem = $74626974 (* 'tbit' *); { typeHIToolbarItemRef}
  281. kEventParamToolbarItemIdentifier = $74626969 (* 'tbii' *); { typeCFStringRef}
  282. kEventParamToolbarItemConfigData = $74626964 (* 'tbid' *); { typeCFTypeRef}
  283. typeHIToolbarRef = $74626172 (* 'tbar' *); { HIToolbarRef}
  284. typeHIToolbarItemRef = $74626974 (* 'tbit' *); { HIToolbarItemRef}
  285. {
  286. * kEventClassToolbar / kEventToolbarGetDefaultIdentifiers
  287. *
  288. * Summary:
  289. * This event is sent to the delegate to get a list of all of the
  290. * default item identifiers that should be created for a toolbar.
  291. *
  292. * Mac OS X threading:
  293. * Not thread safe
  294. *
  295. * Parameters:
  296. *
  297. * --> kEventParamToolbar (in, typeHIToolbarRef)
  298. * The toolbar for which to retrieve identifiers.
  299. *
  300. * --> kEventParamMutableArray (in, typeCFMutableArrayRef)
  301. * A mutable array to fill in with the identifiers.
  302. *
  303. * Availability:
  304. * Mac OS X: in version 10.2 and later in Carbon.framework
  305. * CarbonLib: not available
  306. }
  307. const
  308. kEventToolbarGetDefaultIdentifiers = 1;
  309. {
  310. * kEventClassToolbar / kEventToolbarGetAllowedIdentifiers
  311. *
  312. * Summary:
  313. * This event is sent to the delegate to get a list of all the items
  314. * which could possibly be added to the toolbar. This is sent out
  315. * when the configuration sheet is about to be displayed. You are
  316. * passed a mutable array to fill in with the identifiers.
  317. *
  318. * Mac OS X threading:
  319. * Not thread safe
  320. *
  321. * Parameters:
  322. *
  323. * --> kEventParamToolbar (in, typeHIToolbarRef)
  324. * The toolbar for which to retrieve identifiers.
  325. *
  326. * --> kEventParamMutableArray (in, typeCFMutableArrayRef)
  327. * A mutable array to fill in with the identifiers.
  328. *
  329. * Availability:
  330. * Mac OS X: in version 10.2 and later in Carbon.framework
  331. * CarbonLib: not available
  332. }
  333. const
  334. kEventToolbarGetAllowedIdentifiers = 2;
  335. {
  336. * kEventClassToolbar / kEventToolbarGetSelectableIdentifiers
  337. *
  338. * Summary:
  339. * This event is sent to the delegate to get a list of all the items
  340. * which can acquire a selection highlight when clicked. This is
  341. * sent out after a toolbar item is clicked by the user. You are
  342. * passed a mutable array to fill in with the identifiers. If you
  343. * pass back a non-empty array, and the clicked item's identifier
  344. * matches one of the identifiers that is in the list, then the
  345. * toolbar will automatically draw that item with a selected
  346. * highlight, and unhighlight the previously selected item. Note
  347. * that the selection will only change in the clicked window; it
  348. * will not change in other windows that share the same toolbar. To
  349. * share the selection across all windows that use the same toolbar,
  350. * you will need to manually change the kHIToolbarItemSelected
  351. * attribute for the clicked item using
  352. * HIToolbarItemChangeAttributes; in this case, you should not
  353. * handle the kEventToolbarGetSelectableIdentifiers event.
  354. *
  355. * Mac OS X threading:
  356. * Not thread safe
  357. *
  358. * Parameters:
  359. *
  360. * --> kEventParamToolbar (in, typeHIToolbarRef)
  361. * The toolbar for which to retrieve identifiers.
  362. *
  363. * --> kEventParamMutableArray (in, typeCFMutableArrayRef)
  364. * A mutable array to fill in with the identifiers.
  365. *
  366. * Availability:
  367. * Mac OS X: in version 10.4 and later in Carbon.framework
  368. * CarbonLib: not available
  369. }
  370. const
  371. kEventToolbarGetSelectableIdentifiers = 10;
  372. {
  373. * kEventClassToolbar / kEventToolbarCreateItemWithIdentifier
  374. *
  375. * Summary:
  376. * This event is sent to the delegate when we need to create an item
  377. * from an identifier.
  378. *
  379. * Mac OS X threading:
  380. * Not thread safe
  381. *
  382. * Parameters:
  383. *
  384. * --> kEventParamToolbar (in, typeHIToolbarRef)
  385. * The toolbar for which to create an item.
  386. *
  387. * --> kEventParamToolbarItemIdentifier (in, typeCFStringRef)
  388. * The toolbar item identifier.
  389. *
  390. * --> kEventParamToolbarItemConfigData (in, typeCFTypeRef)
  391. * The toolbar item configuration data. This parameter is
  392. * optional and may not be present in all instances of this
  393. * event.
  394. *
  395. * <-- kEventParamToolbarItem (out, typeHIToolbarItemRef)
  396. * On exit, contains the new toolbar item.
  397. *
  398. * Availability:
  399. * Mac OS X: in version 10.2 and later in Carbon.framework
  400. * CarbonLib: not available
  401. }
  402. const
  403. kEventToolbarCreateItemWithIdentifier = 3;
  404. {
  405. * kEventClassToolbar / kEventToolbarCreateItemFromDrag
  406. *
  407. * Summary:
  408. * This event is sent to the delegate to when we need to create an
  409. * item from a drag.
  410. *
  411. * Discussion:
  412. * This event allows you to be able to drag items into a toolbar
  413. * that arenÕt normal toolbar items. You might use this to allow
  414. * your toolbar to accept file system items, for example.
  415. *
  416. * Mac OS X threading:
  417. * Not thread safe
  418. *
  419. * Parameters:
  420. *
  421. * --> kEventParamDragRef (in, typeDragRef)
  422. * The DragRef with information about the drag.
  423. *
  424. * <-- kEventParamToolbarItem (out, typeHIToolbarItemRef)
  425. * On exit, contains the new toolbar item.
  426. *
  427. * Availability:
  428. * Mac OS X: in version 10.2 and later in Carbon.framework
  429. * CarbonLib: not available
  430. }
  431. const
  432. kEventToolbarCreateItemFromDrag = 4;
  433. {
  434. * kEventClassToolbar / kEventToolbarItemAdded
  435. *
  436. * Summary:
  437. * Sent to interested parties when an item is added to the toolbar.
  438. * The toolbar object sends this event to itself, so you'd need to
  439. * install a handler on the toolbar to receive this event.
  440. *
  441. * Mac OS X threading:
  442. * Not thread safe
  443. *
  444. * Parameters:
  445. *
  446. * --> kEventParamToolbarItem (in, typeHIToolbarItemRef)
  447. * The item that was just added.
  448. *
  449. * --> kEventParamIndex (in, typeCFIndex)
  450. * The index at which the item now exists.
  451. *
  452. * Availability:
  453. * Mac OS X: in version 10.2 and later in Carbon.framework
  454. * CarbonLib: not available
  455. }
  456. const
  457. kEventToolbarItemAdded = 5;
  458. {
  459. * kEventClassToolbar / kEventToolbarItemRemoved
  460. *
  461. * Summary:
  462. * Sent to interested parties when an item is removed from toolbar.
  463. * It is called after the item has already been removed. The toolbar
  464. * object sends this event to itself, so you'd need to install a
  465. * handler on the toolbar to receive this event.
  466. *
  467. * Mac OS X threading:
  468. * Not thread safe
  469. *
  470. * Parameters:
  471. *
  472. * --> kEventParamToolbarItem (in, typeHIToolbarItemRef)
  473. * The item that was just removed.
  474. *
  475. * Availability:
  476. * Mac OS X: in version 10.2 and later in Carbon.framework
  477. * CarbonLib: not available
  478. }
  479. const
  480. kEventToolbarItemRemoved = 6;
  481. {
  482. * kEventClassToolbar / kEventToolbarDisplayModeChanged
  483. *
  484. * Summary:
  485. * Sent to interested parties when an the display mode is changed
  486. * for a toolbar. The toolbar object sends this event to itself, so
  487. * you'd need to install a handler on the toolbar to receive this
  488. * event.
  489. *
  490. * Mac OS X threading:
  491. * Not thread safe
  492. *
  493. * Availability:
  494. * Mac OS X: in version 10.2 and later in Carbon.framework
  495. * CarbonLib: not available
  496. }
  497. const
  498. kEventToolbarDisplayModeChanged = 7;
  499. {
  500. * kEventClassToolbar / kEventToolbarDisplaySizeChanged
  501. *
  502. * Summary:
  503. * Sent to interested parties when an the display size is changed
  504. * for a toolbar. The toolbar object sends this event to itself, so
  505. * you'd need to install a handler on the toolbar to receive this
  506. * event.
  507. *
  508. * Mac OS X threading:
  509. * Not thread safe
  510. *
  511. * Availability:
  512. * Mac OS X: in version 10.2 and later in Carbon.framework
  513. * CarbonLib: not available
  514. }
  515. const
  516. kEventToolbarDisplaySizeChanged = 8;
  517. {
  518. * kEventClassToolbar / kEventToolbarLayoutChanged
  519. *
  520. * Summary:
  521. * Sent to interested parties when the layout of a toolbar changes
  522. * (either an item has been moved, or the entire contents have been
  523. * replaced). Basically it is sent for changes which would require a
  524. * total resync with the current state of things. The toolbar object
  525. * sends this event to itself, so you'd need to install a handler on
  526. * the toolbar to receive this event.
  527. *
  528. * Mac OS X threading:
  529. * Not thread safe
  530. *
  531. * Availability:
  532. * Mac OS X: in version 10.2 and later in Carbon.framework
  533. * CarbonLib: not available
  534. }
  535. const
  536. kEventToolbarLayoutChanged = 9;
  537. {
  538. * kEventClassToolbar / kEventToolbarBeginMultiChange
  539. *
  540. * Summary:
  541. * Sent to interested parties when multiple attributes are going to
  542. * be changed at once. For example, it is possible for the display
  543. * mode and size to change at the same time. When this happens,
  544. * instead of reacting two times (one for display mode changed and
  545. * one for display size changed), you can listen to see if we are
  546. * going to change multiple attributes and hold off on doing any
  547. * relayout, etc. until the EndMultiChange event comes in. The
  548. * toolbar object sends this event to itself, so you'd need to
  549. * install a handler on the toolbar to receive this event.
  550. *
  551. * Mac OS X threading:
  552. * Not thread safe
  553. *
  554. * Availability:
  555. * Mac OS X: in version 10.2 and later in Carbon.framework
  556. * CarbonLib: not available
  557. }
  558. const
  559. kEventToolbarBeginMultiChange = 12;
  560. {
  561. * kEventClassToolbar / kEventToolbarEndMultiChange
  562. *
  563. * Summary:
  564. * Sent to interested parties when the toolbar is done adjusting
  565. * multiple attributes. See kEventToolbarBeginMultiChange for more
  566. * information. The toolbar object sends this event to itself, so
  567. * you'd need to install a handler on the toolbar to receive this
  568. * event.
  569. *
  570. * Mac OS X threading:
  571. * Not thread safe
  572. *
  573. * Availability:
  574. * Mac OS X: in version 10.2 and later in Carbon.framework
  575. * CarbonLib: not available
  576. }
  577. const
  578. kEventToolbarEndMultiChange = 13;
  579. {
  580. kEventClassToolbarItem quick reference:
  581. kEventToolbarItemImageChanged = 1,
  582. kEventToolbarItemLabelChanged = 2,
  583. kEventToolbarItemHelpTextChanged = 3,
  584. kEventToolbarItemCommandIDChanged = 4,
  585. kEventToolbarItemGetPersistentData = 5,
  586. kEventToolbarItemCreateCustomView = 6,
  587. kEventToolbarItemEnabledStateChanged = 7,
  588. kEventToolbarItemPerformAction = 8,
  589. kEventToolbarItemWouldAcceptDrop = 10,
  590. kEventToolbarItemAcceptDrop = 11,
  591. kEventToolbarItemSelectedStateChanged = 12
  592. }
  593. {
  594. * kEventClassToolbarItem / kEventToolbarItemImageChanged
  595. *
  596. * Summary:
  597. * This event is sent to the item (itself) when the image changes.
  598. * Any interested parties can install handlers on the toolbar item
  599. * to receive notifications.
  600. *
  601. * Mac OS X threading:
  602. * Not thread safe
  603. *
  604. * Availability:
  605. * Mac OS X: in version 10.2 and later in Carbon.framework
  606. * CarbonLib: not available
  607. }
  608. const
  609. kEventToolbarItemImageChanged = 1;
  610. {
  611. * kEventClassToolbarItem / kEventToolbarItemLabelChanged
  612. *
  613. * Summary:
  614. * This event is sent to the item (itself) when the label changes.
  615. * Any interested parties can install handlers on the toolbar item
  616. * to receive notifications.
  617. *
  618. * Mac OS X threading:
  619. * Not thread safe
  620. *
  621. * Availability:
  622. * Mac OS X: in version 10.2 and later in Carbon.framework
  623. * CarbonLib: not available
  624. }
  625. const
  626. kEventToolbarItemLabelChanged = 2;
  627. {
  628. * kEventClassToolbarItem / kEventToolbarItemHelpTextChanged
  629. *
  630. * Summary:
  631. * This event is sent to the item (itself) when the help text
  632. * changes. Any interested parties can install handlers on the
  633. * toolbar item to receive notifications.
  634. *
  635. * Mac OS X threading:
  636. * Not thread safe
  637. *
  638. * Availability:
  639. * Mac OS X: in version 10.2 and later in Carbon.framework
  640. * CarbonLib: not available
  641. }
  642. const
  643. kEventToolbarItemHelpTextChanged = 3;
  644. {
  645. * kEventClassToolbarItem / kEventToolbarItemCommandIDChanged
  646. *
  647. * Summary:
  648. * This event is sent to the item (itself) when the command ID
  649. * changes. Any interested parties can install handlers on the
  650. * toolbar item to receive notifications.
  651. *
  652. * Mac OS X threading:
  653. * Not thread safe
  654. *
  655. * Availability:
  656. * Mac OS X: in version 10.2 and later in Carbon.framework
  657. * CarbonLib: not available
  658. }
  659. const
  660. kEventToolbarItemCommandIDChanged = 4;
  661. {
  662. * kEventClassToolbarItem / kEventToolbarItemGetPersistentData
  663. *
  664. * Summary:
  665. * This event is sent to the item (itself) when the toolbar is going
  666. * to write out the configuration information for the item. Any
  667. * custom items can listen for this event and add any extra
  668. * information to what is written out into the config so that it can
  669. * be reanimated later on from the same config data. Typically,
  670. * you'd not need to handle this event.
  671. *
  672. * Mac OS X threading:
  673. * Not thread safe
  674. *
  675. * Parameters:
  676. *
  677. * <-- kEventParamToolbarItemConfigData (out, typeCFTypeRef)
  678. * On exit, contains configuration information for the item.
  679. *
  680. * Availability:
  681. * Mac OS X: in version 10.2 and later in Carbon.framework
  682. * CarbonLib: not available
  683. }
  684. const
  685. kEventToolbarItemGetPersistentData = 5;
  686. {
  687. * kEventClassToolbarItem / kEventToolbarItemCreateCustomView
  688. *
  689. * Summary:
  690. * This event is sent to the toolbar item when it is time to create
  691. * a view for it to display its contents. Implementors of custom
  692. * toolbar items can install a handler for this event to create
  693. * their own custom views for their items.
  694. *
  695. * Mac OS X threading:
  696. * Not thread safe
  697. *
  698. * Parameters:
  699. *
  700. * <-- kEventParamControlRef (out, typeControlRef)
  701. * On exit, contains the itemÕs custom view.
  702. *
  703. * Availability:
  704. * Mac OS X: in version 10.2 and later in Carbon.framework
  705. * CarbonLib: not available
  706. }
  707. const
  708. kEventToolbarItemCreateCustomView = 6;
  709. {
  710. * kEventClassToolbarItem / kEventToolbarItemEnabledStateChanged
  711. *
  712. * Summary:
  713. * This event is sent to the item (itself) when the enabled state
  714. * changes. Any interested parties can install handlers on the
  715. * toolbar item to receive notifications.
  716. *
  717. * Mac OS X threading:
  718. * Not thread safe
  719. *
  720. * Availability:
  721. * Mac OS X: in version 10.3 and later in Carbon.framework
  722. * CarbonLib: not available
  723. }
  724. const
  725. kEventToolbarItemEnabledStateChanged = 7;
  726. {
  727. * kEventClassToolbarItem / kEventToolbarItemSelectedStateChanged
  728. *
  729. * Summary:
  730. * This event is sent to the item (itself) when the selected state
  731. * changes. Any interested parties can install handlers on the
  732. * toolbar item to receive notifications.
  733. *
  734. * Mac OS X threading:
  735. * Not thread safe
  736. *
  737. * Parameters:
  738. *
  739. * --> kEventParamWindowRef (in, typeWindowRef)
  740. * The window in which the item is changing state. This
  741. * parameter is optional and may not be present in all
  742. * instances of this event. If not present, the item is
  743. * changing state across all windows that share the same
  744. * toolbar.
  745. *
  746. * Availability:
  747. * Mac OS X: in version 10.4 and later in Carbon.framework
  748. * CarbonLib: not available
  749. }
  750. const
  751. kEventToolbarItemSelectedStateChanged = 12;
  752. {
  753. * kEventClassToolbarItem / kEventToolbarItemPerformAction
  754. *
  755. * Summary:
  756. * This event is sent when a toolbar item is clicked. Subclasses of
  757. * toolbar items can choose to do special actions by overriding this
  758. * event. If this event is unhandled, the default action of sending
  759. * a command event will occur.
  760. *
  761. * Mac OS X threading:
  762. * Not thread safe
  763. *
  764. * Availability:
  765. * Mac OS X: in version 10.2 and later in Carbon.framework
  766. * CarbonLib: not available
  767. }
  768. const
  769. kEventToolbarItemPerformAction = 8;
  770. {
  771. * kEventClassToolbarItem / kEventToolbarItemWouldAcceptDrop
  772. *
  773. * Summary:
  774. * This event is sent when a drag enters a toolbar item. If the
  775. * toolbar item wants to accept drags (like finder items can when
  776. * they represent containers), simply respond to this event and
  777. * return true in the kEventParamResult parameter. The toolbar item
  778. * will hilite appropriately. If you are using a custom view, you do
  779. * not need to respond to this, since you'll have full drag and drop
  780. * capability via the view system. This is to support custom items
  781. * which are using the standard view.
  782. *
  783. * Mac OS X threading:
  784. * Not thread safe
  785. *
  786. * Parameters:
  787. *
  788. * --> kEventParamDragRef (in, typeDragRef)
  789. * The drag to test for tastiness of flavors.
  790. *
  791. * <-- kEventParamResult (out, typeBoolean)
  792. * A boolean value representing whether the drag was something
  793. * the item wants to accept (true) or not (false). If this
  794. * parameter does not exist or is false, we do not consult any
  795. * other parameters in this event.
  796. *
  797. * Availability:
  798. * Mac OS X: in version 10.3 and later in Carbon.framework
  799. * CarbonLib: not available
  800. }
  801. const
  802. kEventToolbarItemWouldAcceptDrop = 10;
  803. {
  804. * kEventClassToolbarItem / kEventToolbarItemAcceptDrop
  805. *
  806. * Summary:
  807. * If you responded to kEventToolbarItemLikesDrag and returned true
  808. * in the kEventParamResult parameter, and the user drops the drag
  809. * onto your item, you will be called with this event.
  810. *
  811. * Mac OS X threading:
  812. * Not thread safe
  813. *
  814. * Parameters:
  815. *
  816. * --> kEventParamDragRef (in, typeDragRef)
  817. * The drag that was just dropped.
  818. *
  819. * Availability:
  820. * Mac OS X: in version 10.3 and later in Carbon.framework
  821. * CarbonLib: not available
  822. }
  823. const
  824. kEventToolbarItemAcceptDrop = 11;
  825. {
  826. kEventClassToolbarItemView quick reference:
  827. kEventToolbarItemViewConfigForMode = 3,
  828. kEventToolbarItemViewConfigForSize = 4,
  829. kEventToolbarItemViewEnterConfigMode = 5,
  830. kEventToolbarItemViewExitConfigMode = 6
  831. }
  832. const
  833. kEventParamToolbarDisplayMode = $7462646D (* 'tbdm' *); { typeHIToolbarDisplayMode}
  834. kEventParamToolbarDisplaySize = $74626473 (* 'tbds' *); { typeHIToolbarDisplaySize}
  835. typeHIToolbarDisplayMode = $7462646D (* 'tbdm' *); { HIToolbarDisplayMode}
  836. typeHIToolbarDisplaySize = $74626473 (* 'tbds' *); { HIToolbarDisplaySize}
  837. {
  838. * kEventClassToolbarItemView / kEventToolbarItemViewConfigForMode
  839. *
  840. * Summary:
  841. * Notifies a toolbar item view that the toolbar's display mode has
  842. * changed.
  843. *
  844. * Discussion:
  845. * Notifies a toolbar item view that the toolbar's display mode has
  846. * changed. A custom toolbar item view can respond to this in any
  847. * way it sees fit. Most times, responding to this is not necessary
  848. * Ñ when the toolbar goes from icon to text only, for example, the
  849. * view is automatically hidden, so there is not much to do. It is
  850. * here for informational purposes only.
  851. *
  852. * Mac OS X threading:
  853. * Not thread safe
  854. *
  855. * Parameters:
  856. *
  857. * --> kEventParamToolbarDisplayMode (in, typeHIToolbarDisplayMode)
  858. * The toolbar item view's new display mode.
  859. *
  860. * Availability:
  861. * Mac OS X: in version 10.3 and later in Carbon.framework
  862. * CarbonLib: not available
  863. }
  864. const
  865. kEventToolbarItemViewConfigForMode = 3;
  866. {
  867. * kEventClassToolbarItemView / kEventToolbarItemViewConfigForSize
  868. *
  869. * Summary:
  870. * Notifies a toolbar item view that the toolbar's display size has
  871. * changed.
  872. *
  873. * Discussion:
  874. * Notifies a toolbar item view that the toolbar's display size has
  875. * changed. A custom toolbar item view can respond to this in any
  876. * way it sees fit. Most times, responding to this is not necessary.
  877. * However, some custom views might need to flush metrics caches
  878. * when the display size changes.
  879. *
  880. * Mac OS X threading:
  881. * Not thread safe
  882. *
  883. * Parameters:
  884. *
  885. * --> kEventParamToolbarDisplaySize (in, typeHIToolbarDisplaySize)
  886. * The toolbar item view's new display size.
  887. *
  888. * Availability:
  889. * Mac OS X: in version 10.3 and later in Carbon.framework
  890. * CarbonLib: not available
  891. }
  892. const
  893. kEventToolbarItemViewConfigForSize = 4;
  894. {
  895. * kEventClassToolbarItemView / kEventToolbarItemViewEnterConfigMode
  896. *
  897. * Summary:
  898. * Notifies a toolbar item view that we've entered configure mode.
  899. *
  900. * Discussion:
  901. * Notifies a toolbar item view that we've entered configure mode. A
  902. * custom toolbar item view can respond to this in any way it sees
  903. * fit. For example, the space and flexible space mark themselves to
  904. * draw a rectangle and merely invalidate so they get redrawn so you
  905. * can see them during configure.
  906. *
  907. * Mac OS X threading:
  908. * Not thread safe
  909. *
  910. * Availability:
  911. * Mac OS X: in version 10.3 and later in Carbon.framework
  912. * CarbonLib: not available
  913. }
  914. const
  915. kEventToolbarItemViewEnterConfigMode = 5;
  916. {
  917. * kEventClassToolbarItemView / kEventToolbarItemViewExitConfigMode
  918. *
  919. * Summary:
  920. * Notifies a toolbar item view that we've finished with configure
  921. * mode.
  922. *
  923. * Discussion:
  924. * Notifies a toolbar item view that we're now out of configure
  925. * mode. A custom toolbar item view can respond to this in any way
  926. * it sees fit.
  927. *
  928. * Mac OS X threading:
  929. * Not thread safe
  930. *
  931. * Availability:
  932. * Mac OS X: in version 10.3 and later in Carbon.framework
  933. * CarbonLib: not available
  934. }
  935. const
  936. kEventToolbarItemViewExitConfigMode = 6;
  937. {
  938. * Summary:
  939. * Toolbar Item Attributes
  940. }
  941. const
  942. {
  943. * Pass this to indicate no attributes at all.
  944. }
  945. kHIToolbarItemNoAttributes = 0;
  946. {
  947. * This indicates that an item can have more than one instance of
  948. * itself in the toolbar. If this is not set, only one can be
  949. * present. By default, the determining factor for what determines if
  950. * two items are identical is the toolbar identifier. Subclasses of
  951. * HIToolbarItem can specify more elaborate equality.
  952. }
  953. kHIToolbarItemAllowDuplicates = 1 shl 0;
  954. {
  955. * This item can be rearranged, but it cannot be removed from the
  956. * Toolbar by the user.
  957. }
  958. kHIToolbarItemCantBeRemoved = 1 shl 1;
  959. {
  960. * This item cannot be moved at all by the user. It is anchored to
  961. * the left of the toolbar. It is important that there not be any
  962. * unanchored items to the left of this item, else dragging items
  963. * around will be a bit wacky. It is up you you, the home viewer, to
  964. * make sure that anchored items are all on the left. This allows you
  965. * to do toolbars like the the one in the System Preferences app,
  966. * where the first couple of items are stuck in place.
  967. }
  968. kHIToolbarItemAnchoredLeft = 1 shl 2;
  969. {
  970. * This indicates the item acts as a separator. This means two things
  971. * at present. First, it means that it automatically shows up as a
  972. * divider line in a menu representation of the toolbar, and second
  973. * it means the view that represents this item can draw in the full
  974. * top to bottom space that the toolbar item occupies in the toolbar.
  975. }
  976. kHIToolbarItemIsSeparator = 1 shl 3;
  977. {
  978. * If this attribute bit is set, the command that gets sent out will
  979. * be directed at the user focus instead of at the window the toolbar
  980. * is attached to.
  981. }
  982. kHIToolbarItemSendCmdToUserFocus = 1 shl 4;
  983. {
  984. * If this attribute bit is set, clicking on the label of an item
  985. * does nothing. This attribute is ONLY considered when a custom view
  986. * is present. What it really does is make the toolbar item view dead
  987. * to clicks while still allowing clicks to be sent to the custom
  988. * view. When the toolbar is in text-only mode and this attribute is
  989. * set, it displays the label in a disabled (grayed) appearance. You
  990. * might want to change this attribute when switching between display
  991. * modes. For example, the view switcher in finder does not allow
  992. * clicks on the label when in icon and text mode, but it does
  993. * respond to clicks when in text only mode. To change this on the
  994. * fly, you should listen for kEventToolbarItemViewConfigForMode in
  995. * your custom view and adjust this attribute as you desire. This
  996. * attribute is available in Mac OS X 10.3 and later.
  997. }
  998. kHIToolbarItemLabelDisabled = 1 shl 5;
  999. {
  1000. * This item is disabled. Setting this attribute is the same as
  1001. * calling HIToolbarItemSetEnabled( item, false ). Available on Mac
  1002. * OS X 10.4 and later.
  1003. }
  1004. kHIToolbarItemDisabled = 1 shl 6;
  1005. {
  1006. * This item is drawn with a selected appearance. Available on Mac OS
  1007. * X 10.4 and later.
  1008. }
  1009. kHIToolbarItemSelected = 1 shl 7;
  1010. {
  1011. * The set of all valid toolbar item attributes.
  1012. }
  1013. kHIToolbarItemValidAttrs = kHIToolbarItemAllowDuplicates or kHIToolbarItemIsSeparator or kHIToolbarItemCantBeRemoved or kHIToolbarItemAnchoredLeft or kHIToolbarItemSendCmdToUserFocus or kHIToolbarItemLabelDisabled or kHIToolbarItemDisabled or kHIToolbarItemSelected;
  1014. {
  1015. * The set of toolbar item attributes that can be changed with
  1016. * HIToolbarItemChangeAttributes.
  1017. }
  1018. kHIToolbarItemMutableAttrs = kHIToolbarItemCantBeRemoved or kHIToolbarItemAnchoredLeft or kHIToolbarItemLabelDisabled or kHIToolbarItemDisabled or kHIToolbarItemSelected;
  1019. {======================================================================================}
  1020. { FUNCTIONS }
  1021. {======================================================================================}
  1022. {
  1023. * HIToolbarCreate()
  1024. *
  1025. * Discussion:
  1026. * Creates a toolbar. After creating a toolbar, one would normally
  1027. * attach it to a window using SetWindowToolbar, described in
  1028. * MacWindows.h. Since the toolbar is merely the model (as opposed
  1029. * to the view), there are no routines to hide/show it here. Please
  1030. * look to MacWindows.h for the routines ShowHideWindowToolbar and
  1031. * IsWindowToolbarVisible there for more information.
  1032. *
  1033. * Mac OS X threading:
  1034. * Not thread safe
  1035. *
  1036. * Parameters:
  1037. *
  1038. * inIdentifier:
  1039. * The identifier of the toolbar. If you specify that the toolbar
  1040. * auto-saves its configuration, this identifier is used to mark
  1041. * the config info in your application's preferences. You must
  1042. * specify an identifier.
  1043. *
  1044. * inAttributes:
  1045. * Any attributes you wish to specify.
  1046. *
  1047. * outToolbar:
  1048. * The toolbar reference to your shiny new toolbar.
  1049. *
  1050. * Result:
  1051. * An operating system result code.
  1052. *
  1053. * Availability:
  1054. * Mac OS X: in version 10.2 and later in Carbon.framework
  1055. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1056. * Non-Carbon CFM: not available
  1057. }
  1058. function HIToolbarCreate( inIdentifier: CFStringRef; inAttributes: OptionBits; var outToolbar: HIToolbarRef ): OSStatus; external name '_HIToolbarCreate';
  1059. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1060. {
  1061. * HIToolbarGetAttributes()
  1062. *
  1063. * Discussion:
  1064. * Returns the attributes for the given toolbar.
  1065. *
  1066. * Mac OS X threading:
  1067. * Not thread safe
  1068. *
  1069. * Parameters:
  1070. *
  1071. * inToolbar:
  1072. * The toolbar whose attributes you desire.
  1073. *
  1074. * outAttributes:
  1075. * The attributes.
  1076. *
  1077. * Result:
  1078. * An operating system result code.
  1079. *
  1080. * Availability:
  1081. * Mac OS X: in version 10.2 and later in Carbon.framework
  1082. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1083. * Non-Carbon CFM: not available
  1084. }
  1085. function HIToolbarGetAttributes( inToolbar: HIToolbarRef; var outAttributes: OptionBits ): OSStatus; external name '_HIToolbarGetAttributes';
  1086. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1087. {
  1088. * HIToolbarChangeAttributes()
  1089. *
  1090. * Discussion:
  1091. * Changes the attributes of a toolbar.
  1092. *
  1093. * Mac OS X threading:
  1094. * Not thread safe
  1095. *
  1096. * Parameters:
  1097. *
  1098. * inToolbar:
  1099. * The toolbar whose attributes you want to change.
  1100. *
  1101. * inAttrsToSet:
  1102. * The attributes you wish to set/enable.
  1103. *
  1104. * inAttrsToClear:
  1105. * The attributes you wish to clear/disable.
  1106. *
  1107. * Result:
  1108. * An operating system result code.
  1109. *
  1110. * Availability:
  1111. * Mac OS X: in version 10.2 and later in Carbon.framework
  1112. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1113. * Non-Carbon CFM: not available
  1114. }
  1115. function HIToolbarChangeAttributes( inToolbar: HIToolbarRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIToolbarChangeAttributes';
  1116. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1117. {
  1118. * HIToolbarGetDisplayMode()
  1119. *
  1120. * Discussion:
  1121. * Returns the current display mode of a toolbar.
  1122. *
  1123. * Mac OS X threading:
  1124. * Not thread safe
  1125. *
  1126. * Parameters:
  1127. *
  1128. * inToolbar:
  1129. * The toolbar whose display mode you wish to receive.
  1130. *
  1131. * outDisplayMode:
  1132. * The display mode.
  1133. *
  1134. * Result:
  1135. * An operating system result code.
  1136. *
  1137. * Availability:
  1138. * Mac OS X: in version 10.2 and later in Carbon.framework
  1139. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1140. * Non-Carbon CFM: not available
  1141. }
  1142. function HIToolbarGetDisplayMode( inToolbar: HIToolbarRef; var outDisplayMode: HIToolbarDisplayMode ): OSStatus; external name '_HIToolbarGetDisplayMode';
  1143. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1144. {
  1145. * HIToolbarSetDisplayMode()
  1146. *
  1147. * Discussion:
  1148. * Sets the current display mode of a toolbar.
  1149. *
  1150. * Mac OS X threading:
  1151. * Not thread safe
  1152. *
  1153. * Parameters:
  1154. *
  1155. * inToolbar:
  1156. * The toolbar whose display mode you wish to set.
  1157. *
  1158. * inDisplayMode:
  1159. * The display mode. If the toolbar is visible, it will be redrawn.
  1160. *
  1161. * Result:
  1162. * An operating system result code.
  1163. *
  1164. * Availability:
  1165. * Mac OS X: in version 10.2 and later in Carbon.framework
  1166. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1167. * Non-Carbon CFM: not available
  1168. }
  1169. function HIToolbarSetDisplayMode( inToolbar: HIToolbarRef; inDisplayMode: HIToolbarDisplayMode ): OSStatus; external name '_HIToolbarSetDisplayMode';
  1170. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1171. {
  1172. * HIToolbarGetDisplaySize()
  1173. *
  1174. * Discussion:
  1175. * Gets the current display size of a toolbar.
  1176. *
  1177. * Mac OS X threading:
  1178. * Not thread safe
  1179. *
  1180. * Parameters:
  1181. *
  1182. * inToolbar:
  1183. * The toolbar whose display size you wish to get.
  1184. *
  1185. * outSize:
  1186. * The display size.
  1187. *
  1188. * Result:
  1189. * An operating system result code.
  1190. *
  1191. * Availability:
  1192. * Mac OS X: in version 10.2 and later in Carbon.framework
  1193. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1194. * Non-Carbon CFM: not available
  1195. }
  1196. function HIToolbarGetDisplaySize( inToolbar: HIToolbarRef; var outSize: HIToolbarDisplaySize ): OSStatus; external name '_HIToolbarGetDisplaySize';
  1197. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1198. {
  1199. * HIToolbarSetDisplaySize()
  1200. *
  1201. * Discussion:
  1202. * Sets the current display size of a toolbar.
  1203. *
  1204. * Mac OS X threading:
  1205. * Not thread safe
  1206. *
  1207. * Parameters:
  1208. *
  1209. * inToolbar:
  1210. * The toolbar whose display size you wish to set.
  1211. *
  1212. * inSize:
  1213. * The display size. If the toolbar is visible, it will be redrawn.
  1214. *
  1215. * Result:
  1216. * An operating system result code.
  1217. *
  1218. * Availability:
  1219. * Mac OS X: in version 10.2 and later in Carbon.framework
  1220. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1221. * Non-Carbon CFM: not available
  1222. }
  1223. function HIToolbarSetDisplaySize( inToolbar: HIToolbarRef; inSize: HIToolbarDisplaySize ): OSStatus; external name '_HIToolbarSetDisplaySize';
  1224. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1225. {
  1226. * HIToolbarCopyIdentifier()
  1227. *
  1228. * Discussion:
  1229. * Returns the identifier for a toolbar.
  1230. *
  1231. * Mac OS X threading:
  1232. * Not thread safe
  1233. *
  1234. * Parameters:
  1235. *
  1236. * inToolbar:
  1237. * The toolbar whose identifier you wish to get.
  1238. *
  1239. * outIdentifier:
  1240. * The identifier. You must release it when you are finished with
  1241. * it.
  1242. *
  1243. * Result:
  1244. * An operating system result code.
  1245. *
  1246. * Availability:
  1247. * Mac OS X: in version 10.2 and later in Carbon.framework
  1248. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1249. * Non-Carbon CFM: not available
  1250. }
  1251. function HIToolbarCopyIdentifier( inToolbar: HIToolbarRef; var outIdentifier: CFStringRef ): OSStatus; external name '_HIToolbarCopyIdentifier';
  1252. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1253. {
  1254. * HIToolbarSetItemsWithIdentifiers()
  1255. *
  1256. * Discussion:
  1257. * Allows you to set a toolbar's items all at once. The array
  1258. * contains either CFStringRefs of item identifiers, or a small
  1259. * CFDictionaryRef containing the identifier string, and the config
  1260. * data (if the item requires it). The key for the identifier string
  1261. * is kHIToolbarIdentifierKey and the key for the config data string
  1262. * is kHIToolbarDataKey.
  1263. *
  1264. * Mac OS X threading:
  1265. * Not thread safe
  1266. *
  1267. * Parameters:
  1268. *
  1269. * inToolbar:
  1270. * The toolbar whose items you wish to set.
  1271. *
  1272. * inArray:
  1273. * The array of toolbar items to create.
  1274. *
  1275. * Result:
  1276. * An operating system result code.
  1277. *
  1278. * Availability:
  1279. * Mac OS X: in version 10.3 and later in Carbon.framework
  1280. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1281. * Non-Carbon CFM: not available
  1282. }
  1283. function HIToolbarSetItemsWithIdentifiers( inToolbar: HIToolbarRef; inArray: CFArrayRef ): OSStatus; external name '_HIToolbarSetItemsWithIdentifiers';
  1284. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1285. {
  1286. * HIToolbarCopyItems()
  1287. *
  1288. * Discussion:
  1289. * Returns the array of toolbar items for a toolbar.
  1290. *
  1291. * Mac OS X threading:
  1292. * Not thread safe
  1293. *
  1294. * Parameters:
  1295. *
  1296. * inToolbar:
  1297. * The toolbar whose items you wish to receive.
  1298. *
  1299. * outItems:
  1300. * The array of toolbar items owned by the toolbar. You must
  1301. * release the array when you are finished with it.
  1302. *
  1303. * Result:
  1304. * An operating system result code.
  1305. *
  1306. * Availability:
  1307. * Mac OS X: in version 10.2 and later in Carbon.framework
  1308. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1309. * Non-Carbon CFM: not available
  1310. }
  1311. function HIToolbarCopyItems( inToolbar: HIToolbarRef; var outItems: CFArrayRef ): OSStatus; external name '_HIToolbarCopyItems';
  1312. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1313. {
  1314. * HIToolbarCreateItemWithIdentifier()
  1315. *
  1316. * Discussion:
  1317. * Creates an item specified by a particular identifier. Using this
  1318. * function allows you to create any item a delegate supports by
  1319. * naming its identifier. It also allows you to create standard
  1320. * items supplied by the Toolbox, such as the separator item.
  1321. *
  1322. * Mac OS X threading:
  1323. * Not thread safe
  1324. *
  1325. * Parameters:
  1326. *
  1327. * inToolbar:
  1328. * The toolbar you are adding to.
  1329. *
  1330. * inIdentifier:
  1331. * The identifier of the item you wish to add.
  1332. *
  1333. * inConfigData:
  1334. * Any config data required by the item to safely construct.
  1335. * Standard items do not require any extra data, so NULL can be
  1336. * passed.
  1337. *
  1338. * outItem:
  1339. * The newly created toolbar item.
  1340. *
  1341. * Result:
  1342. * An operating system result code.
  1343. *
  1344. * Availability:
  1345. * Mac OS X: in version 10.2 and later in Carbon.framework
  1346. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1347. * Non-Carbon CFM: not available
  1348. }
  1349. function HIToolbarCreateItemWithIdentifier( inToolbar: HIToolbarRef; inIdentifier: CFStringRef; inConfigData: CFTypeRef { can be NULL }; var outItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarCreateItemWithIdentifier';
  1350. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1351. {
  1352. * HIToolbarInsertItemAtIndex()
  1353. *
  1354. * Discussion:
  1355. * Inserts a toolbar item at a given index into a toolbar.
  1356. * Generally, you should always add items via identifier, and not
  1357. * with this routine.
  1358. *
  1359. * Mac OS X threading:
  1360. * Not thread safe
  1361. *
  1362. * Parameters:
  1363. *
  1364. * inToolbar:
  1365. * The toolbar to receive the new item.
  1366. *
  1367. * inItem:
  1368. * The item reference of the toolbar item you are adding.
  1369. *
  1370. * inIndex:
  1371. * The index you wish to add the item at. This index is zero-based.
  1372. *
  1373. * Result:
  1374. * An operating system result code.
  1375. *
  1376. * Availability:
  1377. * Mac OS X: in version 10.2 and later in Carbon.framework
  1378. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1379. * Non-Carbon CFM: not available
  1380. }
  1381. function HIToolbarInsertItemAtIndex( inToolbar: HIToolbarRef; inItem: HIToolbarItemRef; inIndex: CFIndex ): OSStatus; external name '_HIToolbarInsertItemAtIndex';
  1382. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1383. {
  1384. * HIToolbarAppendItem()
  1385. *
  1386. * Discussion:
  1387. * Appends an item to the end of a toolbar. Generally, you should
  1388. * always add items via identifier, and not with this routine.
  1389. *
  1390. * Mac OS X threading:
  1391. * Not thread safe
  1392. *
  1393. * Parameters:
  1394. *
  1395. * inToolbar:
  1396. * The toolbar to receive the new item.
  1397. *
  1398. * inItem:
  1399. * The item reference of the toolbar item you are adding.
  1400. *
  1401. * Result:
  1402. * An operating system result code.
  1403. *
  1404. * Availability:
  1405. * Mac OS X: in version 10.2 and later in Carbon.framework
  1406. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1407. * Non-Carbon CFM: not available
  1408. }
  1409. function HIToolbarAppendItem( inToolbar: HIToolbarRef; inItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarAppendItem';
  1410. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1411. {
  1412. * HIToolbarRemoveItemAtIndex()
  1413. *
  1414. * Discussion:
  1415. * Removes an item at a given index from a toolbar.
  1416. *
  1417. * Mac OS X threading:
  1418. * Not thread safe
  1419. *
  1420. * Parameters:
  1421. *
  1422. * inToolbar:
  1423. * The toolbar you are removing the item from.
  1424. *
  1425. * inIndex:
  1426. * The index of the item to remove. This index is zero-based.
  1427. *
  1428. * Result:
  1429. * An operating system result code.
  1430. *
  1431. * Availability:
  1432. * Mac OS X: in version 10.2 and later in Carbon.framework
  1433. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1434. * Non-Carbon CFM: not available
  1435. }
  1436. function HIToolbarRemoveItemAtIndex( inToolbar: HIToolbarRef; inIndex: CFIndex ): OSStatus; external name '_HIToolbarRemoveItemAtIndex';
  1437. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1438. {
  1439. * HIToolbarSetDelegate()
  1440. *
  1441. * Discussion:
  1442. * Sets the delegate event target for a toolbar. This is necessary
  1443. * for a toolbar to work properly if it wants items of its own. The
  1444. * delegate is who is asked to create toolbar items. If the delegate
  1445. * does not respond, the toolbar will attempt to create a toolbar
  1446. * item, but it can only create the standard items defined at the
  1447. * top of this header.
  1448. *
  1449. * Mac OS X threading:
  1450. * Not thread safe
  1451. *
  1452. * Parameters:
  1453. *
  1454. * inToolbar:
  1455. * The toolbar whose delegate you want to set.
  1456. *
  1457. * inDelegate:
  1458. * The HIObjectRef to act as the delegate.
  1459. *
  1460. * Result:
  1461. * An operating system result code.
  1462. *
  1463. * Availability:
  1464. * Mac OS X: in version 10.2 and later in Carbon.framework
  1465. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1466. * Non-Carbon CFM: not available
  1467. }
  1468. function HIToolbarSetDelegate( inToolbar: HIToolbarRef; inDelegate: HIObjectRef ): OSStatus; external name '_HIToolbarSetDelegate';
  1469. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1470. {
  1471. * HIToolbarGetDelegate()
  1472. *
  1473. * Discussion:
  1474. * Returns the current delegate in use by a toolbar.
  1475. *
  1476. * Mac OS X threading:
  1477. * Not thread safe
  1478. *
  1479. * Parameters:
  1480. *
  1481. * inToolbar:
  1482. * The toolbar you want the delegate from.
  1483. *
  1484. * Result:
  1485. * An HIObjectRef.
  1486. *
  1487. * Availability:
  1488. * Mac OS X: in version 10.2 and later in Carbon.framework
  1489. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1490. * Non-Carbon CFM: not available
  1491. }
  1492. function HIToolbarGetDelegate( inToolbar: HIToolbarRef ): HIObjectRef; external name '_HIToolbarGetDelegate';
  1493. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1494. {==========================================================================}
  1495. { HITOOLBARITEM }
  1496. {==========================================================================}
  1497. { The HIObject class ID for the ToolbarItem class. }
  1498. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1499. {$definec kHIToolbarItemClassID CFSTRP('com.apple.hitoolbaritem')}
  1500. {$endc}
  1501. { Required construction parameters }
  1502. { You must pass these parameters in the initialization event if you are }
  1503. { subclassing the toolbar item }
  1504. { kEventParamToolbarItemIdentifier typeCFStringRef }
  1505. { kEventParamAttibutes typeUInt32 }
  1506. {
  1507. * HIToolbarItemCreate()
  1508. *
  1509. * Discussion:
  1510. * Creates a toolbar item for use in a toolbar. Typically, you would
  1511. * create toolbar items in your delegate. When a toolbar needs to
  1512. * create an item with a given identifier, your delegate is asked to
  1513. * create it.
  1514. *
  1515. * Mac OS X threading:
  1516. * Not thread safe
  1517. *
  1518. * Parameters:
  1519. *
  1520. * inIdentifier:
  1521. * The identifier of the item in question.
  1522. *
  1523. * inOptions:
  1524. * Any options for the item.
  1525. *
  1526. * outItem:
  1527. * The item you created.
  1528. *
  1529. * Result:
  1530. * An operating system result code.
  1531. *
  1532. * Availability:
  1533. * Mac OS X: in version 10.2 and later in Carbon.framework
  1534. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1535. * Non-Carbon CFM: not available
  1536. }
  1537. function HIToolbarItemCreate( inIdentifier: CFStringRef; inOptions: OptionBits; var outItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarItemCreate';
  1538. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1539. // #define _HIToolbarItemCopyIdentifier HIToolbarItemCopyIdentifier
  1540. {
  1541. * HIToolbarItemCopyIdentifier()
  1542. *
  1543. * Discussion:
  1544. * Returns the identifier of the given item. The toolbar uses this
  1545. * identifier when writing the config information to the preferences
  1546. * (if set up for auto-config).
  1547. *
  1548. * Mac OS X threading:
  1549. * Not thread safe
  1550. *
  1551. * Parameters:
  1552. *
  1553. * inItem:
  1554. * The item in question.
  1555. *
  1556. * outIdentifier:
  1557. * The identifier of the item. You should release this string when
  1558. * you are finished with it.
  1559. *
  1560. * Result:
  1561. * An operating system result code.
  1562. *
  1563. * Availability:
  1564. * Mac OS X: in version 10.2 and later in Carbon.framework
  1565. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1566. * Non-Carbon CFM: not available
  1567. }
  1568. function HIToolbarItemCopyIdentifier( inItem: HIToolbarItemRef; var outIdentifier: CFStringRef ): OSStatus; external name '_HIToolbarItemCopyIdentifier';
  1569. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1570. {
  1571. * HIToolbarItemGetAttributes()
  1572. *
  1573. * Discussion:
  1574. * Returns the attributes of the given item.
  1575. *
  1576. * Mac OS X threading:
  1577. * Not thread safe
  1578. *
  1579. * Parameters:
  1580. *
  1581. * inItem:
  1582. * The item in question.
  1583. *
  1584. * outAttributes:
  1585. * The attributes of the item.
  1586. *
  1587. * Result:
  1588. * An operating system result code.
  1589. *
  1590. * Availability:
  1591. * Mac OS X: in version 10.2 and later in Carbon.framework
  1592. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1593. * Non-Carbon CFM: not available
  1594. }
  1595. function HIToolbarItemGetAttributes( inItem: HIToolbarItemRef; var outAttributes: OptionBits ): OSStatus; external name '_HIToolbarItemGetAttributes';
  1596. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1597. {
  1598. * HIToolbarItemChangeAttributes()
  1599. *
  1600. * Discussion:
  1601. * Changes the attributes of a toolbar item. Only those attributes
  1602. * defined by the kHIToolbarItemMutableAttrs can be passed into this
  1603. * API. All other options can only be specified at creation.
  1604. *
  1605. * Mac OS X threading:
  1606. * Not thread safe
  1607. *
  1608. * Parameters:
  1609. *
  1610. * inItem:
  1611. * The item in question.
  1612. *
  1613. * inAttrsToSet:
  1614. * The attributes to set on the item. This value can be
  1615. * kHIToolbarItemNoAttributes if you are only clearing attributes.
  1616. *
  1617. * inAttrsToClear:
  1618. * The attributes to clear on the item. This value can be
  1619. * kHIToolbarItemNoAttributes if you are only setting attributes.
  1620. *
  1621. * Result:
  1622. * An operating system result code.
  1623. *
  1624. * Availability:
  1625. * Mac OS X: in version 10.2 and later in Carbon.framework
  1626. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1627. * Non-Carbon CFM: not available
  1628. }
  1629. function HIToolbarItemChangeAttributes( inItem: HIToolbarItemRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIToolbarItemChangeAttributes';
  1630. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1631. {
  1632. * HIToolbarItemGetAttributesInWindow()
  1633. *
  1634. * Summary:
  1635. * Returns the attributes of the given item in a given window, and
  1636. * information about which attributes are overridden for that window.
  1637. *
  1638. * Discussion:
  1639. * The HIToolbarItemGetAttributesInWindow returns the combined
  1640. * attributes that control a toolbar item view in a specific window.
  1641. * It also returns a bitmask of toolbar item attributes indicating
  1642. * which attributes are overridden for this particular window, and
  1643. * which are inherited from the non-window-specific toolbar item
  1644. * attributes.
  1645. *
  1646. * Mac OS X threading:
  1647. * Not thread safe
  1648. *
  1649. * Parameters:
  1650. *
  1651. * inItem:
  1652. * The item in question.
  1653. *
  1654. * inWindow:
  1655. * The window containing the item. Passing NULL is equivalent to
  1656. * calling HIToolbarItemGetAttributes; it returns the
  1657. * non-window-specific attributes for the item with no per-window
  1658. * modifications.
  1659. *
  1660. * outOverriddenAttributes:
  1661. * On exit, contains a bitmask indicating which attributes are
  1662. * overridden for this particular window. May be NULL if you don't
  1663. * need this information.
  1664. *
  1665. * outCombinedAttributes:
  1666. * On exit, contains the effective attributes for this item in
  1667. * this window, produced by combining the item's
  1668. * non-window-specific attributes with the overridden attributes
  1669. * for this window. May be NULL if you don't need this information.
  1670. *
  1671. * Result:
  1672. * An operating system result code.
  1673. *
  1674. * Availability:
  1675. * Mac OS X: in version 10.4 and later in Carbon.framework
  1676. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1677. * Non-Carbon CFM: not available
  1678. }
  1679. function HIToolbarItemGetAttributesInWindow( inItem: HIToolbarItemRef; inWindow: WindowRef { can be NULL }; outOverriddenAttributes: OptionBitsPtr { can be NULL }; outCombinedAttributes: OptionBitsPtr { can be NULL } ): OSStatus; external name '_HIToolbarItemGetAttributesInWindow';
  1680. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1681. {
  1682. * HIToolbarItemChangeAttributesInWindow()
  1683. *
  1684. * Summary:
  1685. * Changes the attributes of a toolbar item in a specific window.
  1686. *
  1687. * Discussion:
  1688. * The HIToolbarItemChangeAttributesInWindow API allows the
  1689. * attributes of a toolbar item to be overridden on a per-window
  1690. * basis. The attributes used to draw a toolbar item view in a
  1691. * particular window are determined by combining the
  1692. * non-window-specific attributes for the item (set by
  1693. * HIToolbarItemChangeAttributes) with the window-specific
  1694. * attributes (set by HIToolbarItemChangeAttributesInWindow). For
  1695. * example, your application might have a toolbar that is shared
  1696. * across several windows, but in some windows a toolbar item might
  1697. * be enabled, and in other windows the same item might be disabled.
  1698. *
  1699. *
  1700. * Whenever HIToolbarChangeAttributesInWindow is used to set or
  1701. * clear attributes, the toolbar item adds the modified attributes
  1702. * to a bitmask of attributes recording which attributes are
  1703. * overridden for that particular window. Once an attribute is
  1704. * overridden for a window (whether it is set or cleared), the
  1705. * attribute remains overridden for that window until
  1706. * HIToolbarItemChangeAttributesInWindow is called with that
  1707. * attribute specified in the inAttrsToNoLongerOverride parameter.
  1708. * The attributes specified in that parameter will be removed from
  1709. * the override mask for the toolbar item in the specified window.
  1710. * The effective value of attributes removed from the override mask
  1711. * will then revert back to the non-window- specific value of the
  1712. * attributes for the toolbar item.
  1713. *
  1714. * Only those attributes defined by the kHIToolbarItemMutableAttrs
  1715. * can be passed into this API. All other options can only be
  1716. * specified at creation.
  1717. *
  1718. * The per-window attributes for an item are not saved in the
  1719. * toolbar preferences.
  1720. *
  1721. * Mac OS X threading:
  1722. * Not thread safe
  1723. *
  1724. * Parameters:
  1725. *
  1726. * inItem:
  1727. * The item in question.
  1728. *
  1729. * inWindow:
  1730. * The window containing the item. Passing NULL is equivalent to
  1731. * calling HIToolbarItemChangeAttributes; the item's
  1732. * non-window-specific attributes will be changed, rather than its
  1733. * per-window attributes.
  1734. *
  1735. * inAttrsToSet:
  1736. * The attributes to set on the item. Pass
  1737. * kHIToolbarItemNoAttributes if you are only clearing attributes.
  1738. * These attributes will be added to the overridden attribute mask
  1739. * associated with this item in this window.
  1740. *
  1741. * inAttrsToClear:
  1742. * The attributes to clear on the item. Pass
  1743. * kHIToolbarItemNoAttributes if you are only setting attributes.
  1744. * These attributes will be added to the overridden attribute mask
  1745. * associated with this item in this window.
  1746. *
  1747. * inAttrsToNoLongerOverride:
  1748. * The attributes that should no longer be overridden at the
  1749. * per-window level for this toolbar item; pass
  1750. * kHIToolbarItemNoAttributes if all attributes should remain
  1751. * overridden. If an attribute is in both this parameter and
  1752. * either the inAttrsToSet or inAttrsToClear parameters, the
  1753. * attribute will no longer be overridden. If the inWindow
  1754. * parameter is NULL, this parameter must be
  1755. * kHIToolbarItemNoAttributes; if not, paramErr will be returned.
  1756. *
  1757. * Result:
  1758. * An operating system result code.
  1759. *
  1760. * Availability:
  1761. * Mac OS X: in version 10.4 and later in Carbon.framework
  1762. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1763. * Non-Carbon CFM: not available
  1764. }
  1765. function HIToolbarItemChangeAttributesInWindow( inItem: HIToolbarItemRef; inWindow: WindowRef { can be NULL }; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits; inAttrsToNoLongerOverride: OptionBits ): OSStatus; external name '_HIToolbarItemChangeAttributesInWindow';
  1766. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1767. {
  1768. * HIToolbarGetSelectedItemInWindow()
  1769. *
  1770. * Summary:
  1771. * Returns the toolbar item that is selected in a given window.
  1772. *
  1773. * Discussion:
  1774. * Each window that shares a toolbar may have a different selected
  1775. * item. This API returns the selected item in a particular window.
  1776. *
  1777. * Mac OS X threading:
  1778. * Not thread safe
  1779. *
  1780. * Parameters:
  1781. *
  1782. * inToolbar:
  1783. * The toolbar in question.
  1784. *
  1785. * inWindow:
  1786. * A window containing the toolbar.
  1787. *
  1788. * outItem:
  1789. * On exit, contains the toolbar item that is selected in the
  1790. * specified window, or NULL if there is no selected item.
  1791. *
  1792. * Result:
  1793. * An operating system result code.
  1794. *
  1795. * Availability:
  1796. * Mac OS X: in version 10.4 and later in Carbon.framework
  1797. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1798. * Non-Carbon CFM: not available
  1799. }
  1800. function HIToolbarGetSelectedItemInWindow( inToolbar: HIToolbarRef; inWindow: WindowRef; var outItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarGetSelectedItemInWindow';
  1801. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1802. {
  1803. * HIToolbarItemSetLabel()
  1804. *
  1805. * Discussion:
  1806. * Sets the label of a toolbar item. This is what the toolbar view
  1807. * will display underneath the image. It is also used in the
  1808. * configuration palette for configurable toolbars.
  1809. *
  1810. * Mac OS X threading:
  1811. * Not thread safe
  1812. *
  1813. * Parameters:
  1814. *
  1815. * inItem:
  1816. * The item in question.
  1817. *
  1818. * inLabel:
  1819. * The label. The toolbox will copy the string passed in.
  1820. *
  1821. * Result:
  1822. * An operating system result code.
  1823. *
  1824. * Availability:
  1825. * Mac OS X: in version 10.2 and later in Carbon.framework
  1826. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1827. * Non-Carbon CFM: not available
  1828. }
  1829. function HIToolbarItemSetLabel( inItem: HIToolbarItemRef; inLabel: CFStringRef ): OSStatus; external name '_HIToolbarItemSetLabel';
  1830. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1831. {
  1832. * HIToolbarItemCopyLabel()
  1833. *
  1834. * Discussion:
  1835. * Returns the label of a toolbar item.
  1836. *
  1837. * Mac OS X threading:
  1838. * Not thread safe
  1839. *
  1840. * Parameters:
  1841. *
  1842. * inItem:
  1843. * The item in question.
  1844. *
  1845. * outLabel:
  1846. * The label of the item. You should release this when you are
  1847. * finished with it.
  1848. *
  1849. * Result:
  1850. * An operating system result code.
  1851. *
  1852. * Availability:
  1853. * Mac OS X: in version 10.2 and later in Carbon.framework
  1854. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1855. * Non-Carbon CFM: not available
  1856. }
  1857. function HIToolbarItemCopyLabel( inItem: HIToolbarItemRef; var outLabel: CFStringRef ): OSStatus; external name '_HIToolbarItemCopyLabel';
  1858. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1859. {
  1860. * HIToolbarItemSetHelpText()
  1861. *
  1862. * Discussion:
  1863. * Sets the text used for help tags for a toolbar item.
  1864. *
  1865. * Mac OS X threading:
  1866. * Not thread safe
  1867. *
  1868. * Parameters:
  1869. *
  1870. * inItem:
  1871. * The item in question.
  1872. *
  1873. * inShortText:
  1874. * The short help text. This is what is displayed normally by the
  1875. * help tag system when the user hovers over the toolbar item with
  1876. * the mouse.
  1877. *
  1878. * inLongText:
  1879. * The long help text. This is what is displayed by the help tag
  1880. * system when the user hovers over the toolbar item with the
  1881. * mouse and holds the command key down. This parameter is
  1882. * optional, you may pass NULL.
  1883. *
  1884. * Result:
  1885. * An operating system result code.
  1886. *
  1887. * Availability:
  1888. * Mac OS X: in version 10.2 and later in Carbon.framework
  1889. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1890. * Non-Carbon CFM: not available
  1891. }
  1892. function HIToolbarItemSetHelpText( inItem: HIToolbarItemRef; inShortText: CFStringRef; inLongText: CFStringRef { can be NULL } ): OSStatus; external name '_HIToolbarItemSetHelpText';
  1893. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1894. {
  1895. * HIToolbarItemCopyHelpText()
  1896. *
  1897. * Discussion:
  1898. * Returns the text used for help tags for a toolbar item.
  1899. *
  1900. * Mac OS X threading:
  1901. * Not thread safe
  1902. *
  1903. * Parameters:
  1904. *
  1905. * inItem:
  1906. * The item in question.
  1907. *
  1908. * outShortText:
  1909. * The short help text. This is what is displayed normally by the
  1910. * help tag system when the user hovers over the toolbar item with
  1911. * the mouse. You should release this string when you are finished
  1912. * with it. If you do not wish to receive the short help text,
  1913. * pass NULL for this parameter.
  1914. *
  1915. * outLongText:
  1916. * The long help text. This is what is displayed by the help tag
  1917. * system when the user hovers over the toolbar item with the
  1918. * mouse and holds the command key down. You should release this
  1919. * string when you are finished with it. If you do not wish to
  1920. * receive the long help text, pass NULL for this parameter.
  1921. *
  1922. * Result:
  1923. * An operating system result code.
  1924. *
  1925. * Availability:
  1926. * Mac OS X: in version 10.2 and later in Carbon.framework
  1927. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1928. * Non-Carbon CFM: not available
  1929. }
  1930. function HIToolbarItemCopyHelpText( inItem: HIToolbarItemRef; outShortText: CFStringRefPtr { can be NULL }; outLongText: CFStringRefPtr { can be NULL } ): OSStatus; external name '_HIToolbarItemCopyHelpText';
  1931. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1932. {
  1933. * HIToolbarItemSetCommandID()
  1934. *
  1935. * Discussion:
  1936. * Sets the command ID of a toolbar item. When an toolbar item is
  1937. * clicked, the default behavior is to send out the command assigned
  1938. * to the item. This API lets you set that command ID. The command
  1939. * is sent out via the ProcessHICommand API, so it uses Carbon
  1940. * Events.
  1941. *
  1942. * Mac OS X threading:
  1943. * Not thread safe
  1944. *
  1945. * Parameters:
  1946. *
  1947. * inItem:
  1948. * The item in question.
  1949. *
  1950. * inCommandID:
  1951. * The command ID.
  1952. *
  1953. * Result:
  1954. * An operating system result code.
  1955. *
  1956. * Availability:
  1957. * Mac OS X: in version 10.2 and later in Carbon.framework
  1958. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1959. * Non-Carbon CFM: not available
  1960. }
  1961. function HIToolbarItemSetCommandID( inItem: HIToolbarItemRef; inCommandID: MenuCommand ): OSStatus; external name '_HIToolbarItemSetCommandID';
  1962. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1963. {
  1964. * HIToolbarItemGetCommandID()
  1965. *
  1966. * Discussion:
  1967. * Gets the command ID of a toolbar item.
  1968. *
  1969. * Mac OS X threading:
  1970. * Not thread safe
  1971. *
  1972. * Parameters:
  1973. *
  1974. * inItem:
  1975. * The item in question.
  1976. *
  1977. * outCommandID:
  1978. * The command ID.
  1979. *
  1980. * Result:
  1981. * An operating system result code.
  1982. *
  1983. * Availability:
  1984. * Mac OS X: in version 10.2 and later in Carbon.framework
  1985. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  1986. * Non-Carbon CFM: not available
  1987. }
  1988. function HIToolbarItemGetCommandID( inItem: HIToolbarItemRef; var outCommandID: MenuCommand ): OSStatus; external name '_HIToolbarItemGetCommandID';
  1989. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  1990. {
  1991. * HIToolbarItemSetIconRef()
  1992. *
  1993. * Discussion:
  1994. * Sets the icon for a toolbar item.
  1995. *
  1996. * Mac OS X threading:
  1997. * Not thread safe
  1998. *
  1999. * Parameters:
  2000. *
  2001. * inItem:
  2002. * The item in question.
  2003. *
  2004. * inIcon:
  2005. * The icon ref. The toolbar will create an appropriate CGImageRef
  2006. * for the icon passed in. The icon can be released after this API
  2007. * is called.
  2008. *
  2009. * Result:
  2010. * An operating system result code.
  2011. *
  2012. * Availability:
  2013. * Mac OS X: in version 10.2 and later in Carbon.framework
  2014. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2015. * Non-Carbon CFM: not available
  2016. }
  2017. function HIToolbarItemSetIconRef( inItem: HIToolbarItemRef; inIcon: IconRef ): OSStatus; external name '_HIToolbarItemSetIconRef';
  2018. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2019. {
  2020. * HIToolbarItemSetImage()
  2021. *
  2022. * Discussion:
  2023. * Sets the image for a toolbar item. Currently, the image should be
  2024. * no higher than 32 pixels. This image is used both in the toolbar
  2025. * as well as the configuration sheet, if the toolbar is
  2026. * configurable.
  2027. *
  2028. * Mac OS X threading:
  2029. * Not thread safe
  2030. *
  2031. * Parameters:
  2032. *
  2033. * inItem:
  2034. * The item in question.
  2035. *
  2036. * inImage:
  2037. * The image. This image is retained by the toolbar item. You may
  2038. * release it after calling this API.
  2039. *
  2040. * Result:
  2041. * An operating system result code.
  2042. *
  2043. * Availability:
  2044. * Mac OS X: in version 10.2 and later in Carbon.framework
  2045. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2046. * Non-Carbon CFM: not available
  2047. }
  2048. function HIToolbarItemSetImage( inItem: HIToolbarItemRef; inImage: CGImageRef ): OSStatus; external name '_HIToolbarItemSetImage';
  2049. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2050. {
  2051. * HIToolbarItemCopyImage()
  2052. *
  2053. * Discussion:
  2054. * Returns the image for a toolbar item. This image is already
  2055. * retained by the time you receive it, so you can release it when
  2056. * you are done with it.
  2057. *
  2058. * Mac OS X threading:
  2059. * Not thread safe
  2060. *
  2061. * Parameters:
  2062. *
  2063. * inItem:
  2064. * The item in question.
  2065. *
  2066. * outImage:
  2067. * The retained image. You should release it when finished with it.
  2068. *
  2069. * Result:
  2070. * An operating system result code.
  2071. *
  2072. * Availability:
  2073. * Mac OS X: in version 10.2 and later in Carbon.framework
  2074. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2075. * Non-Carbon CFM: not available
  2076. }
  2077. function HIToolbarItemCopyImage( inItem: HIToolbarItemRef; var outImage: CGImageRef ): OSStatus; external name '_HIToolbarItemCopyImage';
  2078. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2079. {
  2080. * HIToolbarItemSetMenu()
  2081. *
  2082. * Discussion:
  2083. * Sets the submenu for a toolbar item. Normally, items do not have
  2084. * a submenu. You can attach one with this API. The submenu will, by
  2085. * default, show up in the 'more items' indicator popup, as a
  2086. * submenu of the menu item corresponding to the toolbar item. It
  2087. * will also appear if the toolbar is in text only mode and the
  2088. * label is clicked. You should attach a Carbon Event handler to the
  2089. * menu to handle updating the menu items as appropriate before the
  2090. * menu is displayed.
  2091. *
  2092. * Mac OS X threading:
  2093. * Not thread safe
  2094. *
  2095. * Parameters:
  2096. *
  2097. * inItem:
  2098. * The item in question.
  2099. *
  2100. * inMenu:
  2101. * The menu. It is retained by the toolbar item, so you can safely
  2102. * release it after calling this API. On Mac OS X 10.3 and later,
  2103. * you can pass NULL for this parameter to remove and release any
  2104. * menu that might be attached.
  2105. *
  2106. * Result:
  2107. * An operating system result code.
  2108. *
  2109. * Availability:
  2110. * Mac OS X: in version 10.2 and later in Carbon.framework
  2111. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2112. * Non-Carbon CFM: not available
  2113. }
  2114. function HIToolbarItemSetMenu( inItem: HIToolbarItemRef; inMenu: MenuRef { can be NULL } ): OSStatus; external name '_HIToolbarItemSetMenu';
  2115. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2116. {
  2117. * HIToolbarItemCopyMenu()
  2118. *
  2119. * Discussion:
  2120. * Gets the submenu for a toolbar item.
  2121. *
  2122. * Mac OS X threading:
  2123. * Not thread safe
  2124. *
  2125. * Parameters:
  2126. *
  2127. * inItem:
  2128. * The item in question.
  2129. *
  2130. * outMenu:
  2131. * The retained menu. You should release it when you are finished
  2132. * with it.
  2133. *
  2134. * Result:
  2135. * An operating system result code.
  2136. *
  2137. * Availability:
  2138. * Mac OS X: in version 10.2 and later in Carbon.framework
  2139. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2140. * Non-Carbon CFM: not available
  2141. }
  2142. function HIToolbarItemCopyMenu( inItem: HIToolbarItemRef; var outMenu: MenuRef ): OSStatus; external name '_HIToolbarItemCopyMenu';
  2143. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2144. {
  2145. * HIToolbarItemGetToolbar()
  2146. *
  2147. * Discussion:
  2148. * Gets the toolbar a toolbar item is attached to.
  2149. *
  2150. * Mac OS X threading:
  2151. * Not thread safe
  2152. *
  2153. * Parameters:
  2154. *
  2155. * inItem:
  2156. * The item in question.
  2157. *
  2158. * Result:
  2159. * The toolbar item reference of the toolbar this item is bound to,
  2160. * or NULL if this toolbar item is not attached to any toolbar.
  2161. *
  2162. * Availability:
  2163. * Mac OS X: in version 10.2 and later in Carbon.framework
  2164. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2165. * Non-Carbon CFM: not available
  2166. }
  2167. function HIToolbarItemGetToolbar( inItem: HIToolbarItemRef ): HIToolbarRef; external name '_HIToolbarItemGetToolbar';
  2168. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2169. {
  2170. * HIToolbarItemIsEnabled()
  2171. *
  2172. * Discussion:
  2173. * Used to determine if a toolbar item is enabled.
  2174. *
  2175. * Mac OS X threading:
  2176. * Not thread safe
  2177. *
  2178. * Parameters:
  2179. *
  2180. * inItem:
  2181. * The item in question.
  2182. *
  2183. * Result:
  2184. * A boolean result.
  2185. *
  2186. * Availability:
  2187. * Mac OS X: in version 10.2 and later in Carbon.framework
  2188. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2189. * Non-Carbon CFM: not available
  2190. }
  2191. function HIToolbarItemIsEnabled( inItem: HIToolbarItemRef ): Boolean; external name '_HIToolbarItemIsEnabled';
  2192. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2193. {
  2194. * HIToolbarItemSetEnabled()
  2195. *
  2196. * Discussion:
  2197. * Enables or disables a toolbar item.
  2198. *
  2199. * Mac OS X threading:
  2200. * Not thread safe
  2201. *
  2202. * Parameters:
  2203. *
  2204. * inItem:
  2205. * The item in question.
  2206. *
  2207. * inEnabled:
  2208. * The new enabled state.
  2209. *
  2210. * Result:
  2211. * An operating system result code.
  2212. *
  2213. * Availability:
  2214. * Mac OS X: in version 10.2 and later in Carbon.framework
  2215. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2216. * Non-Carbon CFM: not available
  2217. }
  2218. function HIToolbarItemSetEnabled( inItem: HIToolbarItemRef; inEnabled: Boolean ): OSStatus; external name '_HIToolbarItemSetEnabled';
  2219. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2220. {
  2221. * HIToolbarItemConfigDataChanged()
  2222. *
  2223. * Discussion:
  2224. * Informs the toolbar that the config data for a toolbar item has
  2225. * changed and should be written to the toolbar config prefs. This
  2226. * is used when a custom toolbar item has extra data (config data)
  2227. * that has changed (perhaps you've changed an alias that a toolbar
  2228. * item points to, for example). This function does nothing if the
  2229. * toolbar is not set to auto save its configuration.
  2230. *
  2231. * Mac OS X threading:
  2232. * Not thread safe
  2233. *
  2234. * Parameters:
  2235. *
  2236. * inItem:
  2237. * The item whose information has changed.
  2238. *
  2239. * Result:
  2240. * An operating system result code.
  2241. *
  2242. * Availability:
  2243. * Mac OS X: in version 10.3 and later in Carbon.framework
  2244. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2245. * Non-Carbon CFM: not available
  2246. }
  2247. function HIToolbarItemConfigDataChanged( inItem: HIToolbarItemRef ): OSStatus; external name '_HIToolbarItemConfigDataChanged';
  2248. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2249. end.