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