1 {
2      File:       HIToolbox/Dialogs.h
3 
4      Contains:   Dialog Manager interfaces.
5 
6      Version:    HIToolbox-624~3
7 
8      Copyright:  � 1985-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 {       Pascal Translation Updated:  Peter N Lewis, <peter@stairways.com.au>, August 2005 }
17 {       Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2009 }
18 {       Pascal Translation Updated:  Gorazd Krosl, <gorazd_1957@yahoo.ca>, October 2009 }
19 {       Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
20 {
21     Modified for use with Free Pascal
22     Version 308
23     Please report any bugs to <gpc@microbizz.nl>
24 }
25 
26 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
27 {$mode macpas}
28 {$modeswitch cblocks}
29 {$packenum 1}
30 {$macro on}
31 {$inline on}
32 {$calling mwpascal}
33 
34 unit Dialogs;
35 interface
36 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
37 {$setc GAP_INTERFACES_VERSION := $0308}
38 
39 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
40     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
41 {$endc}
42 
43 {$ifc defined CPUPOWERPC and defined CPUI386}
44 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
45 {$endc}
46 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
47 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
48 {$endc}
49 
50 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
51 	{$setc __ppc__ := 1}
52 {$elsec}
53 	{$setc __ppc__ := 0}
54 {$endc}
55 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
56 	{$setc __ppc64__ := 1}
57 {$elsec}
58 	{$setc __ppc64__ := 0}
59 {$endc}
60 {$ifc not defined __i386__ and defined CPUI386}
61 	{$setc __i386__ := 1}
62 {$elsec}
63 	{$setc __i386__ := 0}
64 {$endc}
65 {$ifc not defined __x86_64__ and defined CPUX86_64}
66 	{$setc __x86_64__ := 1}
67 {$elsec}
68 	{$setc __x86_64__ := 0}
69 {$endc}
70 {$ifc not defined __arm__ and defined CPUARM}
71 	{$setc __arm__ := 1}
72 {$elsec}
73 	{$setc __arm__ := 0}
74 {$endc}
75 {$ifc not defined __arm64__ and defined CPUAARCH64}
76   {$setc __arm64__ := 1}
77 {$elsec}
78   {$setc __arm64__ := 0}
79 {$endc}
80 
81 {$ifc defined cpu64}
82   {$setc __LP64__ := 1}
83 {$elsec}
84   {$setc __LP64__ := 0}
85 {$endc}
86 
87 
88 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
89 	{$error Conflicting definitions for __ppc__ and __i386__}
90 {$endc}
91 
92 {$ifc defined __ppc__ and __ppc__}
93 	{$setc TARGET_CPU_PPC := TRUE}
94 	{$setc TARGET_CPU_PPC64 := FALSE}
95 	{$setc TARGET_CPU_X86 := FALSE}
96 	{$setc TARGET_CPU_X86_64 := FALSE}
97 	{$setc TARGET_CPU_ARM := FALSE}
98 	{$setc TARGET_CPU_ARM64 := FALSE}
99 	{$setc TARGET_OS_MAC := TRUE}
100 	{$setc TARGET_OS_IPHONE := FALSE}
101 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
102 	{$setc TARGET_OS_EMBEDDED := FALSE}
103 {$elifc defined __ppc64__ and __ppc64__}
104 	{$setc TARGET_CPU_PPC := FALSE}
105 	{$setc TARGET_CPU_PPC64 := TRUE}
106 	{$setc TARGET_CPU_X86 := FALSE}
107 	{$setc TARGET_CPU_X86_64 := FALSE}
108 	{$setc TARGET_CPU_ARM := FALSE}
109 	{$setc TARGET_CPU_ARM64 := FALSE}
110 	{$setc TARGET_OS_MAC := TRUE}
111 	{$setc TARGET_OS_IPHONE := FALSE}
112 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
113 	{$setc TARGET_OS_EMBEDDED := FALSE}
114 {$elifc defined __i386__ and __i386__}
115 	{$setc TARGET_CPU_PPC := FALSE}
116 	{$setc TARGET_CPU_PPC64 := FALSE}
117 	{$setc TARGET_CPU_X86 := TRUE}
118 	{$setc TARGET_CPU_X86_64 := FALSE}
119 	{$setc TARGET_CPU_ARM := FALSE}
120 	{$setc TARGET_CPU_ARM64 := FALSE}
121 {$ifc defined iphonesim}
122  	{$setc TARGET_OS_MAC := FALSE}
123 	{$setc TARGET_OS_IPHONE := TRUE}
124 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
125 {$elsec}
126 	{$setc TARGET_OS_MAC := TRUE}
127 	{$setc TARGET_OS_IPHONE := FALSE}
128 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
129 {$endc}
130 	{$setc TARGET_OS_EMBEDDED := FALSE}
131 {$elifc defined __x86_64__ and __x86_64__}
132 	{$setc TARGET_CPU_PPC := FALSE}
133 	{$setc TARGET_CPU_PPC64 := FALSE}
134 	{$setc TARGET_CPU_X86 := FALSE}
135 	{$setc TARGET_CPU_X86_64 := TRUE}
136 	{$setc TARGET_CPU_ARM := FALSE}
137 	{$setc TARGET_CPU_ARM64 := FALSE}
138 {$ifc defined iphonesim}
139  	{$setc TARGET_OS_MAC := FALSE}
140 	{$setc TARGET_OS_IPHONE := TRUE}
141 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
142 {$elsec}
143 	{$setc TARGET_OS_MAC := TRUE}
144 	{$setc TARGET_OS_IPHONE := FALSE}
145 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
146 {$endc}
147 	{$setc TARGET_OS_EMBEDDED := FALSE}
148 {$elifc defined __arm__ and __arm__}
149 	{$setc TARGET_CPU_PPC := FALSE}
150 	{$setc TARGET_CPU_PPC64 := FALSE}
151 	{$setc TARGET_CPU_X86 := FALSE}
152 	{$setc TARGET_CPU_X86_64 := FALSE}
153 	{$setc TARGET_CPU_ARM := TRUE}
154 	{$setc TARGET_CPU_ARM64 := FALSE}
155 	{$setc TARGET_OS_MAC := FALSE}
156 	{$setc TARGET_OS_IPHONE := TRUE}
157 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
158 	{$setc TARGET_OS_EMBEDDED := TRUE}
159 {$elifc defined __arm64__ and __arm64__}
160 	{$setc TARGET_CPU_PPC := FALSE}
161 	{$setc TARGET_CPU_PPC64 := FALSE}
162 	{$setc TARGET_CPU_X86 := FALSE}
163 	{$setc TARGET_CPU_X86_64 := FALSE}
164 	{$setc TARGET_CPU_ARM := FALSE}
165 	{$setc TARGET_CPU_ARM64 := TRUE}
166 {$ifc defined ios}
167 	{$setc TARGET_OS_MAC := FALSE}
168 	{$setc TARGET_OS_IPHONE := TRUE}
169 	{$setc TARGET_OS_EMBEDDED := TRUE}
170 {$elsec}
171 	{$setc TARGET_OS_MAC := TRUE}
172 	{$setc TARGET_OS_IPHONE := FALSE}
173 	{$setc TARGET_OS_EMBEDDED := FALSE}
174 {$endc}
175 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
176 {$elsec}
177 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
178 {$endc}
179 
180 {$ifc defined __LP64__ and __LP64__ }
181   {$setc TARGET_CPU_64 := TRUE}
182 {$elsec}
183   {$setc TARGET_CPU_64 := FALSE}
184 {$endc}
185 
186 {$ifc defined FPC_BIG_ENDIAN}
187 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
188 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
189 {$elifc defined FPC_LITTLE_ENDIAN}
190 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
191 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
192 {$elsec}
193 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
194 {$endc}
195 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
196 {$setc CALL_NOT_IN_CARBON := FALSE}
197 {$setc OLDROUTINENAMES := FALSE}
198 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
199 {$setc OPAQUE_UPP_TYPES := TRUE}
200 {$setc OTCARBONAPPLICATION := TRUE}
201 {$setc OTKERNEL := FALSE}
202 {$setc PM_USE_SESSION_APIS := TRUE}
203 {$setc TARGET_API_MAC_CARBON := TRUE}
204 {$setc TARGET_API_MAC_OS8 := FALSE}
205 {$setc TARGET_API_MAC_OSX := TRUE}
206 {$setc TARGET_CARBON := TRUE}
207 {$setc TARGET_CPU_68K := FALSE}
208 {$setc TARGET_CPU_MIPS := FALSE}
209 {$setc TARGET_CPU_SPARC := FALSE}
210 {$setc TARGET_OS_UNIX := FALSE}
211 {$setc TARGET_OS_WIN32 := FALSE}
212 {$setc TARGET_RT_MAC_68881 := FALSE}
213 {$setc TARGET_RT_MAC_CFM := FALSE}
214 {$setc TARGET_RT_MAC_MACHO := TRUE}
215 {$setc TYPED_FUNCTION_POINTERS := TRUE}
216 {$setc TYPE_BOOL := FALSE}
217 {$setc TYPE_EXTENDED := FALSE}
218 {$setc TYPE_LONGLONG := TRUE}
219 uses MacTypes,CFBase,CarbonEventsCore,QuickdrawTypes,Events,IconsCore,TextEdit,HIObject;
220 {$endc} {not MACOSALLINCLUDE}
221 
222 
223 {$ifc TARGET_OS_MAC}
224 
225 {$ALIGN MAC68K}
226 
227 const
228 { new, more standard names for dialog item types}
229 	kControlDialogItem = 4;
230 	kButtonDialogItem = kControlDialogItem or 0;
231 	kCheckBoxDialogItem = kControlDialogItem or 1;
232 	kRadioButtonDialogItem = kControlDialogItem or 2;
233 	kResourceControlDialogItem = kControlDialogItem or 3;
234 	kStaticTextDialogItem = 8;
235 	kEditTextDialogItem = 16;
236 	kIconDialogItem = 32;
237 	kPictureDialogItem = 64;
238 	kUserDialogItem = 0;
239 	kHelpDialogItem = 1;
240 	kItemDisableBit = 128;
241 
242 const
243 { old names for dialog item types}
244 	ctrlItem = 4;
245 	btnCtrl = 0;
246 	chkCtrl = 1;
247 	radCtrl = 2;
248 	resCtrl = 3;
249 	statText = 8;
250 	editText = 16;
251 	iconItem = 32;
252 	picItem = 64;
253 	userItem = 0;
254 	itemDisable = 128;
255 
256 const
257 { standard dialog item numbers}
258 	kStdOkItemIndex = 1;
259 	kStdCancelItemIndex = 2;    { old names}
260 	ok = kStdOkItemIndex;
261 	cancel = kStdCancelItemIndex;
262 
263 const
264 { standard icon resource id's    }
265 	kStopIcon = 0;
266 	kNoteIcon = 1;
267 	kCautionIcon = 2;    { old names}
268 	stopIcon = kStopIcon;
269 	noteIcon = kNoteIcon;
270 	cautionIcon = kCautionIcon;
271 
272 
273 {  Dialog Item List Manipulation Constants }
274 type
275 	DITLMethod = SInt16;
276 const
277 	overlayDITL = 0;
278 	appendDITLRight = 1;
279 	appendDITLBottom = 2;
280 
281 type
282 	StageList = SInt16;
283 { DialogPtr is obsolete. Use DialogRef instead.}
284 type
285 	DialogRef = DialogPtr;
286 
287 type
288 	DialogTemplatePtr = ^DialogTemplate;
289 	DialogTemplate = record
290 		boundsRect: Rect;
291 		procID: SInt16;
292 		visible: Boolean;
293 		filler1: Boolean;
294 		goAwayFlag: Boolean;
295 		filler2: Boolean;
296 		refCon: SInt32;
297 		itemsID: SInt16;
298 		title: Str255;
299 	end;
300 type
301 	DialogTPtr = DialogTemplatePtr;
302 type
303 	DialogTHndl = ^DialogTPtr;
304 type
305 	AlertTemplatePtr = ^AlertTemplate;
306 	AlertTemplate = record
307 		boundsRect: Rect;
308 		itemsID: SInt16;
309 		stages: StageList;
310 	end;
311 type
312 	AlertTPtr = AlertTemplatePtr;
313 type
314 	AlertTHndl = ^AlertTPtr;
315 { new type abstractions for the dialog manager }
316 type
317 	DialogItemIndexZeroBased = SInt16;
318 	DialogItemIndex = SInt16;
319 	DialogItemIndexPtr = ^DialogItemIndex;
320 	DialogItemType = SInt16;
321 	DialogItemTypePtr = ^DialogItemType;
322 { dialog manager callbacks }
323 type
324 	SoundProcPtr = procedure( soundNumber: SInt16 );
theDialognull325 	ModalFilterProcPtr = function( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: DialogItemIndex ): Boolean;
326 { ModalFilterYDProcPtr was previously in StandardFile.h }
327 type
theDialognull328 	ModalFilterYDProcPtr = function( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; yourDataPtr: UnivPtr ): Boolean;
329 	UserItemProcPtr = procedure( theDialog: DialogRef; itemNo: DialogItemIndex );
330 	SoundUPP = SoundProcPtr;
331 	ModalFilterUPP = ModalFilterProcPtr;
332 	ModalFilterYDUPP = ModalFilterYDProcPtr;
333 	UserItemUPP = UserItemProcPtr;
334 {
335  *  NewSoundUPP()
336  *
337  *  Availability:
338  *    Mac OS X:         not available
339  *    CarbonLib:        not available
340  *    Non-Carbon CFM:   available as macro/inline
341  }
342 
343 {
344  *  NewModalFilterUPP()
345  *
346  *  Availability:
347  *    Mac OS X:         in version 10.0 and later in Carbon.framework
348  *    CarbonLib:        in CarbonLib 1.0 and later
349  *    Non-Carbon CFM:   available as macro/inline
350  }
NewModalFilterUPPnull351 function NewModalFilterUPP( userRoutine: ModalFilterProcPtr ): ModalFilterUPP; external name '_NewModalFilterUPP';
352 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
353 
354 {
355  *  NewModalFilterYDUPP()
356  *
357  *  Availability:
358  *    Mac OS X:         in version 10.0 and later in Carbon.framework
359  *    CarbonLib:        in CarbonLib 1.0.2 and later
360  *    Non-Carbon CFM:   available as macro/inline
361  }
NewModalFilterYDUPPnull362 function NewModalFilterYDUPP( userRoutine: ModalFilterYDProcPtr ): ModalFilterYDUPP; external name '_NewModalFilterYDUPP';
363 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
364 
365 {
366  *  NewUserItemUPP()
367  *
368  *  Availability:
369  *    Mac OS X:         in version 10.0 and later in Carbon.framework
370  *    CarbonLib:        in CarbonLib 1.0 and later
371  *    Non-Carbon CFM:   available as macro/inline
372  }
NewUserItemUPPnull373 function NewUserItemUPP( userRoutine: UserItemProcPtr ): UserItemUPP; external name '_NewUserItemUPP';
374 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
375 
376 {
377  *  DisposeSoundUPP()
378  *
379  *  Availability:
380  *    Mac OS X:         not available
381  *    CarbonLib:        not available
382  *    Non-Carbon CFM:   available as macro/inline
383  }
384 
385 {
386  *  DisposeModalFilterUPP()
387  *
388  *  Availability:
389  *    Mac OS X:         in version 10.0 and later in Carbon.framework
390  *    CarbonLib:        in CarbonLib 1.0 and later
391  *    Non-Carbon CFM:   available as macro/inline
392  }
393 procedure DisposeModalFilterUPP( userUPP: ModalFilterUPP ); external name '_DisposeModalFilterUPP';
394 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
395 
396 {
397  *  DisposeModalFilterYDUPP()
398  *
399  *  Availability:
400  *    Mac OS X:         in version 10.0 and later in Carbon.framework
401  *    CarbonLib:        in CarbonLib 1.0.2 and later
402  *    Non-Carbon CFM:   available as macro/inline
403  }
404 procedure DisposeModalFilterYDUPP( userUPP: ModalFilterYDUPP ); external name '_DisposeModalFilterYDUPP';
405 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
406 
407 {
408  *  DisposeUserItemUPP()
409  *
410  *  Availability:
411  *    Mac OS X:         in version 10.0 and later in Carbon.framework
412  *    CarbonLib:        in CarbonLib 1.0 and later
413  *    Non-Carbon CFM:   available as macro/inline
414  }
415 procedure DisposeUserItemUPP( userUPP: UserItemUPP ); external name '_DisposeUserItemUPP';
416 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
417 
418 {
419  *  InvokeSoundUPP()
420  *
421  *  Availability:
422  *    Mac OS X:         not available
423  *    CarbonLib:        not available
424  *    Non-Carbon CFM:   available as macro/inline
425  }
426 
427 {
428  *  InvokeModalFilterUPP()
429  *
430  *  Availability:
431  *    Mac OS X:         in version 10.0 and later in Carbon.framework
432  *    CarbonLib:        in CarbonLib 1.0 and later
433  *    Non-Carbon CFM:   available as macro/inline
434  }
InvokeModalFilterUPPnull435 function InvokeModalFilterUPP( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: DialogItemIndex; userUPP: ModalFilterUPP ): Boolean; external name '_InvokeModalFilterUPP';
436 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
437 
438 {
439  *  InvokeModalFilterYDUPP()
440  *
441  *  Availability:
442  *    Mac OS X:         in version 10.0 and later in Carbon.framework
443  *    CarbonLib:        in CarbonLib 1.0.2 and later
444  *    Non-Carbon CFM:   available as macro/inline
445  }
InvokeModalFilterYDUPPnull446 function InvokeModalFilterYDUPP( theDialog: DialogRef; var theEvent: EventRecord; var itemHit: SInt16; yourDataPtr: UnivPtr; userUPP: ModalFilterYDUPP ): Boolean; external name '_InvokeModalFilterYDUPP';
447 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
448 
449 {
450  *  InvokeUserItemUPP()
451  *
452  *  Availability:
453  *    Mac OS X:         in version 10.0 and later in Carbon.framework
454  *    CarbonLib:        in CarbonLib 1.0 and later
455  *    Non-Carbon CFM:   available as macro/inline
456  }
457 procedure InvokeUserItemUPP( theDialog: DialogRef; itemNo: DialogItemIndex; userUPP: UserItemUPP ); external name '_InvokeUserItemUPP';
458 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
459 
460 
461 {
462   ���������������������������������������������������������������������������������������������������������
463     � Following types are valid with Appearance 1.0 and later
464   ���������������������������������������������������������������������������������������������������������
465 }
466 const
467 { Alert types to pass into StandardAlert }
468 	kAlertStopAlert = 0;
469 	kAlertNoteAlert = 1;
470 	kAlertCautionAlert = 2;
471 	kAlertPlainAlert = 3;
472 
473 type
474 	AlertType = SInt16;
475 const
476 	kAlertDefaultOKText = -1;   { "OK"}
477 	kAlertDefaultCancelText = -1;   { "Cancel"}
478 	kAlertDefaultOtherText = -1;    { "Don't Save"}
479 
480 { StandardAlert alert button numbers }
481 const
482 	kAlertStdAlertOKButton = 1;
483 	kAlertStdAlertCancelButton = 2;
484 	kAlertStdAlertOtherButton = 3;
485 	kAlertStdAlertHelpButton = 4;
486 
487 
488 {
489  *  Dialog feature flags
490  *
491  *  Summary:
492  *    These feature flags can be used in a 'dlgx' resource or in the
493  *    inFlags parameter to NewFeaturesDialog.
494  }
495 const
496 {
497    * Requests the Dialog Manager to set the dialog box�s background
498    * color or pattern, and to use Appearance Manager APIs to draw the
499    * dialog frame.
500    }
501 	kDialogFlagsUseThemeBackground = 1 shl 0;
502 
503   {
504    * Requests the Dialog Manager to create a root control in the dialog
505    * window and establish a control embedding hierarchy. Any dialog
506    * items become controls once the embedding hierarchy is established.
507    }
508 	kDialogFlagsUseControlHierarchy = 1 shl 1;
509 
510   {
511    * Requests the Dialog Manager to automatically handle movable modal
512    * behavior such as dragging a dialog window by its title bar.
513    }
514 	kDialogFlagsHandleMovableModal = 1 shl 2;
515 
516   {
517    * On Mac OS 8.x and 9.x, requests the Dialog Manager to create
518    * Appearance-compliant controls in the dialog window. Otherwise,
519    * push buttons, checkboxes, and radio buttons are displayed in their
520    * pre-Appearance forms when systemwide Appearance is off. On Mac OS
521    * X, this flag is ignored; dialogs always use controls to implement
522    * standard dialog items.
523    }
524 	kDialogFlagsUseThemeControls = 1 shl 3;
525 
526   {
527    * Requests the Dialog Manager to create a compositing window to
528    * contain the dialog items. The window will also use the standard
529    * window event handler and will have live resize enabled. Available
530    * in Mac OS X 10.5 and later.
531    }
532 	kDialogFlagsUseCompositing = 1 shl 8;
533 
534 
535 {
536  *  Alert feature flags
537  *
538  *  Summary:
539  *    These feature flags can be used in a 'alrx' resource.
540  }
541 const
542 { Alert Flags for use in alrx resource }
543 
544   {
545    * Requests the Dialog Manager to set the alert�s background color or
546    * pattern, and to use Appearance Manager APIs to draw the alert
547    * frame.
548    }
549 	kAlertFlagsUseThemeBackground = 1 shl 0;
550 
551   {
552    * Requests the Dialog Manager to create a root control in the alert
553    * window and establish a control embedding hierarchy. Any alert
554    * items become controls once the embedding hierarchy is established.
555    }
556 	kAlertFlagsUseControlHierarchy = 1 shl 1;
557 
558   {
559    * Requests the Dialog Manager to make the alert window movable, and
560    * to automatically handle dragging the alert by its title bar.
561    }
562 	kAlertFlagsAlertIsMovable = 1 shl 2;
563 
564   {
565    * On Mac OS 8.x and 9.x, requests the Dialog Manager to create
566    * Appearance-compliant controls in the alert window. Otherwise, push
567    * buttons, checkboxes, and radio buttons are displayed in their
568    * pre-Appearance forms when systemwide Appearance is off. On Mac OS
569    * X, this flag is ignored; alerts always use controls to implement
570    * standard alert items.
571    }
572 	kAlertFlagsUseThemeControls = 1 shl 3;
573 
574   {
575    * Requests the Dialog Manager to create a compositing window to
576    * contain the alert items. The window will also use the standard
577    * window event handler. Available in Mac OS X 10.5 and later.
578    }
579 	kAlertFlagsUseCompositing = 1 shl 8;
580 
581 { For dftb resource }
582 const
583 	kDialogFontNoFontStyle = 0;
584 	kDialogFontUseFontMask = $0001;
585 	kDialogFontUseFaceMask = $0002;
586 	kDialogFontUseSizeMask = $0004;
587 	kDialogFontUseForeColorMask = $0008;
588 	kDialogFontUseBackColorMask = $0010;
589 	kDialogFontUseModeMask = $0020;
590 	kDialogFontUseJustMask = $0040;
591 	kDialogFontUseAllMask = $00FF;
592 	kDialogFontAddFontSizeMask = $0100;
593 	kDialogFontUseFontNameMask = $0200;
594 	kDialogFontAddToMetaFontMask = $0400;
595 
596 { Also for dftb resource. This one is available in Mac OS X or later. }
597 { It corresponds directly to kControlUseThemeFontIDMask from Controls.h. }
598 const
599 	kDialogFontUseThemeFontIDMask = $0080;
600 
601 
602 {
603  *  AlertStdAlertParamRec
604  *
605  *  Summary:
606  *    AlertStdCFStringAlertParamRec is preferred.
607  *
608  *  Discussion:
609  *    As of Mac OS X 10.5, defaultButton can be the same as the
610  *    cancelButton. Prior to Mac OS X 10.5, having cancelButton and
611  *    defaultButton the same will cause a paramErr.
612  }
613 type
614 	AlertStdAlertParamRec = record
615 {
616    * Is the alert movable? This parameter is ignored on Mac OS X; all
617    * standard alerts are movable.
618    }
619 		movable: Boolean;
620 
621   {
622    * Is there a help button?
623    }
624 		helpButton: Boolean;
625 
626   {
627    * The event filter to be used.
628    }
629 		filterProc: ModalFilterUPP;
630 
631   {
632    * Text for the button in the OK position. kAlertDefaultOKText can be
633    * used for the system standard text.
634    }
635 		defaultText: ConstStringPtr;
636 
637   {
638    * Text for the button in the Cancel position.
639    * kAlertDefaultCancelText can be used for the system standard text.
640    }
641 		cancelText: ConstStringPtr;
642 
643   {
644    * Text for the button in the leftmost position.
645    * kAlertDefaultOtherText can be used for the system standard text.
646    }
647 		otherText: ConstStringPtr;
648 
649   {
650    * Which button is default, i.e. activated by pressing Return. Prior
651    * to Mac OS X 10.5, this field must be set to a non-zero value in
652    * the range kAlertStdAlertOKButton..kAlertStdAlertOtherButton, and
653    * your alert will always have a default button. In Mac OS X 10.5 and
654    * later, you may set this field to zero to request no default button.
655    }
656 		defaultButton: SInt16;
657 
658   {
659    * Which button is default for cancelling, i.e. activated by pressing
660    * Escape. May be zero to request no cancel button; otherwise, must
661    * be in the range kAlertStdAlertOKButton..kAlertStdAlertOtherButton.
662    }
663 		cancelButton: SInt16;
664 
665   {
666    * Where to position the alert. kWindowDefaultPosition is the default
667    * and is equal to kWindowAlertPositionParentWindowScreen.
668    }
669 		position: UInt16;
670 	end;
671 type
672 	AlertStdAlertParamRecPtr = ^AlertStdAlertParamRec;
673 const
674 	kHICommandOther = FourCharCode('othr'); { sent by standard sheet dialogs when the "other" button is pressed }
675 
676 
677 const
678 {
679    * AlertStdCFStringAlertParamRec version prior to Mac OS X 10.5.
680    }
681 	kStdCFStringAlertVersionOne = 1;
682 
683   {
684    * AlertStdCFStringAlertParamRec version for Mac OS X 10.5 and later.
685    * When using this version, you must set the icon field of the
686    * structure to NULL or a valid IconRef.
687    }
688 	kStdCFStringAlertVersionTwo = 2;
689 
690 
691 {
692  *  Summary:
693  *    Flags to CreateStandardAlert that are specified in the
694  *    AlertStdCFStringAlertParamRec.flags field.
695  }
696 const
697 {
698    * Applies to StandardSheet only. Do not dispose of the sheet window
699    * after closing it; allows the sheet to be re-used again in a later
700    * call to ShowSheetWindow.
701    }
702 	kStdAlertDoNotDisposeSheet = 1 shl 0;
703 
704   {
705    * Applies to StandardSheet only. Causes the sheet window to be
706    * hidden immediately without animation effects when the default
707    * button is chosen by the user.
708    }
709 	kStdAlertDoNotAnimateOnDefault = 1 shl 1;
710 
711   {
712    * Applies to StandardSheet only. Causes the sheet window to be
713    * hidden immediately without animation effects when the cancel
714    * button is chosen by the user.
715    }
716 	kStdAlertDoNotAnimateOnCancel = 1 shl 2;
717 
718   {
719    * Applies to StandardSheet only. Causes the sheet window to be
720    * hidden immediately without animation effects when the other button
721    * is chosen by the user.
722    }
723 	kStdAlertDoNotAnimateOnOther = 1 shl 3;
724 
725   {
726    * Allows dialog to stay up even after clicking the Help button.
727    * Normally, it would close immediately. It is not necessary to set
728    * this option for sheets, as they merely send the HICommandHelp
729    * command to the target provided. RunStandardAlert will return with
730    * the help button item in the itemHit parameter, but the window will
731    * remain up. You can then perform whatever help function you wish
732    * and then call RunStandardAlert again. This option is available in
733    * Mac OS X 10.4 or later.
734    }
735 	kStdAlertDoNotCloseOnHelp = 1 shl 4;
736 
737 
738 {
739  *  AlertStdCFStringAlertParamRec
740  *
741  *  Summary:
742  *    A CFString variant of AlertStdAlertParamRec. CFStrings are
743  *    preferred.
744  *
745  *  Discussion:
746  *    As of Mac OS X 10.5, defaultButton can be the same as the
747  *    cancelButton. Prior to Mac OS X 10.5, having cancelButton and
748  *    defaultButton the same will cause a paramErr.
749  }
750 type
751 	AlertStdCFStringAlertParamRec = record
752 {
753    * The version of the structure. Prior to Mac OS X 10.5, you must use
754    * kStdCFStringAlertVersionOne. In Mac OS X 10.5 or later, you may
755    * use either VersionOne or VersionTwo. If you use VersionTwo, you
756    * must set the icon field to NULL or a valid IconRef.
757    }
758 		version: UInt32;
759 
760   {
761    * Is the alert movable? This parameter is ignored on Mac OS X; all
762    * standard alerts are movable.
763    }
764 		movable: Boolean;
765 
766   {
767    * Is there a help button?
768    }
769 		helpButton: Boolean;
770 
771   {
772    * Text for the button in the OK position.
773    }
774 		defaultText: CFStringRef;
775 
776   {
777    * Text for the button in the Cancel position.
778    }
779 		cancelText: CFStringRef;
780 
781   {
782    * Text for the button in the leftmost/help position.
783    }
784 		otherText: CFStringRef;
785 
786   {
787    * Which button is default, i.e. activated by pressing Return. Prior
788    * to Mac OS X 10.5, this field must be set to a non-zero value in
789    * the range kAlertStdAlertOKButton..kAlertStdAlertOtherButton, and
790    * your alert will always have a default button. In Mac OS X 10.5 and
791    * later, you may set this field to zero to request no default button.
792    }
793 		defaultButton: SInt16;
794 
795   {
796    * Which button is default for cancelling, i.e. activated by pressing
797    * Escape. May be zero to request no cancel button; otherwise, must
798    * be in the range kAlertStdAlertOKButton..kAlertStdAlertOtherButton.
799    }
800 		cancelButton: SInt16;
801 
802   {
803    * Where to position the alert. kWindowDefaultPosition is the default
804    * and is equal to kWindowAlertPositionParentWindowScreen.
805    }
806 		position: UInt16;
807 
808   {
809    * Options for the behavior of the alert or sheet.
810    }
811 		flags: OptionBits;
812 
813   {
814    * Custom icon for display in the alert. Available on Mac OS X 10.5
815    * and later when the version field is set to
816    * kStdCFStringAlertVersionTwo.
817    }
818 		icon: IconRef;
819 	end;
820 type
821 	AlertStdCFStringAlertParamPtr = ^AlertStdCFStringAlertParamRec;
822 { ��� end Appearance 1.0 or later stuff}
823 
824 
825 {$ifc not TARGET_CPU_64}
826 {
827  *  NewDialog()
828  *
829  *  Mac OS X threading:
830  *    Not thread safe
831  *
832  *  Availability:
833  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
834  *    CarbonLib:        in CarbonLib 1.0 and later
835  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
836  }
NewDialognull837 function NewDialog( dStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SRefCon; items: Handle ): DialogRef; external name '_NewDialog';
838 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
839 
840 
841 {
842  *  GetNewDialog()
843  *
844  *  Mac OS X threading:
845  *    Not thread safe
846  *
847  *  Availability:
848  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
849  *    CarbonLib:        in CarbonLib 1.0 and later
850  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
851  }
GetNewDialognull852 function GetNewDialog( dialogID: SInt16; dStorage: UnivPtr; behind: WindowRef ): DialogRef; external name '_GetNewDialog';
853 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
854 
855 
856 {
857  *  NewColorDialog()
858  *
859  *  Mac OS X threading:
860  *    Not thread safe
861  *
862  *  Availability:
863  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
864  *    CarbonLib:        in CarbonLib 1.0 and later
865  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
866  }
NewColorDialognull867 function NewColorDialog( dStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SRefCon; items: Handle ): DialogRef; external name '_NewColorDialog';
868 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
869 
870 
871 {
872  *  DisposeDialog()
873  *
874  *  Mac OS X threading:
875  *    Not thread safe
876  *
877  *  Availability:
878  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
879  *    CarbonLib:        in CarbonLib 1.0 and later
880  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
881  }
882 procedure DisposeDialog( theDialog: DialogRef ); external name '_DisposeDialog';
883 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
884 
885 
886 {
887  *  ModalDialog()
888  *
889  *  Mac OS X threading:
890  *    Not thread safe
891  *
892  *  Availability:
893  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
894  *    CarbonLib:        in CarbonLib 1.0 and later
895  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
896  }
897 procedure ModalDialog( modalFilter: ModalFilterUPP; var itemHit: DialogItemIndex ); external name '_ModalDialog';
898 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
899 
900 
901 {
902  *  IsDialogEvent()
903  *
904  *  Mac OS X threading:
905  *    Not thread safe
906  *
907  *  Availability:
908  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
909  *    CarbonLib:        in CarbonLib 1.0 and later
910  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
911  }
IsDialogEventnull912 function IsDialogEvent( const (*var*) theEvent: EventRecord ): Boolean; external name '_IsDialogEvent';
913 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
914 
915 
916 {
917  *  DialogSelect()
918  *
919  *  Mac OS X threading:
920  *    Not thread safe
921  *
922  *  Availability:
923  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
924  *    CarbonLib:        in CarbonLib 1.0 and later
925  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
926  }
DialogSelectnull927 function DialogSelect( const (*var*) theEvent: EventRecord; var theDialog: DialogRef; var itemHit: DialogItemIndex ): Boolean; external name '_DialogSelect';
928 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
929 
930 
931 {
932  *  DrawDialog()
933  *
934  *  Mac OS X threading:
935  *    Not thread safe
936  *
937  *  Availability:
938  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
939  *    CarbonLib:        in CarbonLib 1.0 and later
940  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
941  }
942 procedure DrawDialog( theDialog: DialogRef ); external name '_DrawDialog';
943 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
944 
945 
946 {
947  *  UpdateDialog()
948  *
949  *  Mac OS X threading:
950  *    Not thread safe
951  *
952  *  Availability:
953  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
954  *    CarbonLib:        in CarbonLib 1.0 and later
955  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
956  }
957 procedure UpdateDialog( theDialog: DialogRef; updateRgn: RgnHandle ); external name '_UpdateDialog';
958 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
959 
960 
961 {
962  *  HideDialogItem()
963  *
964  *  Mac OS X threading:
965  *    Not thread safe
966  *
967  *  Availability:
968  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
969  *    CarbonLib:        in CarbonLib 1.0 and later
970  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
971  }
972 procedure HideDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex ); external name '_HideDialogItem';
973 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
974 
975 
976 {
977  *  ShowDialogItem()
978  *
979  *  Mac OS X threading:
980  *    Not thread safe
981  *
982  *  Availability:
983  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
984  *    CarbonLib:        in CarbonLib 1.0 and later
985  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
986  }
987 procedure ShowDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex ); external name '_ShowDialogItem';
988 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
989 
990 
991 {
992  *  FindDialogItem()
993  *
994  *  Mac OS X threading:
995  *    Not thread safe
996  *
997  *  Availability:
998  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
999  *    CarbonLib:        in CarbonLib 1.0 and later
1000  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1001  }
FindDialogItemnull1002 function FindDialogItem( theDialog: DialogRef; thePt: Point ): DialogItemIndexZeroBased; external name '_FindDialogItem';
1003 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1004 
1005 
1006 {$endc} {not TARGET_CPU_64}
1007 
1008 {$ifc not TARGET_CPU_64}
1009 {
1010  *  DialogCut()
1011  *
1012  *  Mac OS X threading:
1013  *    Not thread safe
1014  *
1015  *  Availability:
1016  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1017  *    CarbonLib:        in CarbonLib 1.0 and later
1018  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1019  }
1020 procedure DialogCut( theDialog: DialogRef ); external name '_DialogCut';
1021 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1022 
1023 
1024 {
1025  *  DialogPaste()
1026  *
1027  *  Mac OS X threading:
1028  *    Not thread safe
1029  *
1030  *  Availability:
1031  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1032  *    CarbonLib:        in CarbonLib 1.0 and later
1033  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1034  }
1035 procedure DialogPaste( theDialog: DialogRef ); external name '_DialogPaste';
1036 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1037 
1038 
1039 {
1040  *  DialogCopy()
1041  *
1042  *  Mac OS X threading:
1043  *    Not thread safe
1044  *
1045  *  Availability:
1046  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1047  *    CarbonLib:        in CarbonLib 1.0 and later
1048  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1049  }
1050 procedure DialogCopy( theDialog: DialogRef ); external name '_DialogCopy';
1051 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1052 
1053 
1054 {
1055  *  DialogDelete()
1056  *
1057  *  Mac OS X threading:
1058  *    Not thread safe
1059  *
1060  *  Availability:
1061  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1062  *    CarbonLib:        in CarbonLib 1.0 and later
1063  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1064  }
1065 procedure DialogDelete( theDialog: DialogRef ); external name '_DialogDelete';
1066 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1067 
1068 
1069 {$endc} {not TARGET_CPU_64}
1070 
1071 {$ifc not TARGET_CPU_64}
1072 {
1073  *  Alert()
1074  *
1075  *  Mac OS X threading:
1076  *    Not thread safe
1077  *
1078  *  Availability:
1079  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1080  *    CarbonLib:        in CarbonLib 1.0 and later
1081  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1082  }
Alertnull1083 function Alert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_Alert';
1084 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1085 
1086 
1087 {
1088  *  StopAlert()
1089  *
1090  *  Mac OS X threading:
1091  *    Not thread safe
1092  *
1093  *  Availability:
1094  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1095  *    CarbonLib:        in CarbonLib 1.0 and later
1096  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1097  }
StopAlertnull1098 function StopAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_StopAlert';
1099 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1100 
1101 
1102 {
1103  *  NoteAlert()
1104  *
1105  *  Mac OS X threading:
1106  *    Not thread safe
1107  *
1108  *  Availability:
1109  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1110  *    CarbonLib:        in CarbonLib 1.0 and later
1111  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1112  }
NoteAlertnull1113 function NoteAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_NoteAlert';
1114 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1115 
1116 
1117 {
1118  *  CautionAlert()
1119  *
1120  *  Mac OS X threading:
1121  *    Not thread safe
1122  *
1123  *  Availability:
1124  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1125  *    CarbonLib:        in CarbonLib 1.0 and later
1126  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1127  }
CautionAlertnull1128 function CautionAlert( alertID: SInt16; modalFilter: ModalFilterUPP ): DialogItemIndex; external name '_CautionAlert';
1129 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1130 
1131 
1132 {
1133  *  GetDialogItem()
1134  *
1135  *  Mac OS X threading:
1136  *    Not thread safe
1137  *
1138  *  Availability:
1139  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1140  *    CarbonLib:        in CarbonLib 1.0 and later
1141  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1142  }
1143 procedure GetDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex; var itemType: DialogItemType; var item: Handle; var box: Rect ); external name '_GetDialogItem';
1144 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1145 
1146 
1147 {
1148  *  SetDialogItem()
1149  *
1150  *  Mac OS X threading:
1151  *    Not thread safe
1152  *
1153  *  Availability:
1154  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1155  *    CarbonLib:        in CarbonLib 1.0 and later
1156  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1157  }
1158 procedure SetDialogItem( theDialog: DialogRef; itemNo: DialogItemIndex; itemType: DialogItemType; item: Handle; const (*var*) box: Rect ); external name '_SetDialogItem';
1159 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1160 
1161 
1162 {
1163  *  ParamText()
1164  *
1165  *  Mac OS X threading:
1166  *    Not thread safe
1167  *
1168  *  Availability:
1169  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1170  *    CarbonLib:        in CarbonLib 1.0 and later
1171  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1172  }
1173 procedure ParamText( const (*var*) param0: Str255; const (*var*) param1: Str255; const (*var*) param2: Str255; const (*var*) param3: Str255 ); external name '_ParamText';
1174 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1175 
1176 
1177 {
1178  *  SelectDialogItemText()
1179  *
1180  *  Mac OS X threading:
1181  *    Not thread safe
1182  *
1183  *  Availability:
1184  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1185  *    CarbonLib:        in CarbonLib 1.0 and later
1186  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1187  }
1188 procedure SelectDialogItemText( theDialog: DialogRef; itemNo: DialogItemIndex; strtSel: SInt16; endSel: SInt16 ); external name '_SelectDialogItemText';
1189 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1190 
1191 
1192 {
1193  *  GetDialogItemText()
1194  *
1195  *  Mac OS X threading:
1196  *    Not thread safe
1197  *
1198  *  Availability:
1199  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1200  *    CarbonLib:        in CarbonLib 1.0 and later
1201  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1202  }
1203 procedure GetDialogItemText( item: Handle; var text: Str255 ); external name '_GetDialogItemText';
1204 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1205 
1206 
1207 {
1208  *  SetDialogItemText()
1209  *
1210  *  Mac OS X threading:
1211  *    Not thread safe
1212  *
1213  *  Availability:
1214  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1215  *    CarbonLib:        in CarbonLib 1.0 and later
1216  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1217  }
1218 procedure SetDialogItemText( item: Handle; const (*var*) text: Str255 ); external name '_SetDialogItemText';
1219 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1220 
1221 
1222 {
1223  *  GetAlertStage()
1224  *
1225  *  Mac OS X threading:
1226  *    Not thread safe
1227  *
1228  *  Availability:
1229  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1230  *    CarbonLib:        in CarbonLib 1.0 and later
1231  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1232  }
GetAlertStagenull1233 function GetAlertStage: SInt16; external name '_GetAlertStage';
1234 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1235 
1236 
1237 {
1238  *  SetDialogFont()
1239  *
1240  *  Mac OS X threading:
1241  *    Not thread safe
1242  *
1243  *  Availability:
1244  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1245  *    CarbonLib:        in CarbonLib 1.0 and later
1246  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1247  }
1248 procedure SetDialogFont( fontNum: SInt16 ); external name '_SetDialogFont';
1249 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1250 
1251 
1252 {
1253  *  ResetAlertStage()
1254  *
1255  *  Mac OS X threading:
1256  *    Not thread safe
1257  *
1258  *  Availability:
1259  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1260  *    CarbonLib:        in CarbonLib 1.0 and later
1261  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1262  }
1263 procedure ResetAlertStage; external name '_ResetAlertStage';
1264 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1265 
1266 
1267 { APIs in Carbon}
1268 {
1269  *  GetParamText()
1270  *
1271  *  Mac OS X threading:
1272  *    Not thread safe
1273  *
1274  *  Availability:
1275  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1276  *    CarbonLib:        in CarbonLib 1.0 and later
1277  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later
1278  }
1279 procedure GetParamText( param0: StringPtr; param1: StringPtr; param2: StringPtr; param3: StringPtr ); external name '_GetParamText';
1280 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1281 
1282 
1283 {
1284  *  AppendDITL()
1285  *
1286  *  Mac OS X threading:
1287  *    Not thread safe
1288  *
1289  *  Availability:
1290  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1291  *    CarbonLib:        in CarbonLib 1.0 and later
1292  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1293  }
1294 procedure AppendDITL( theDialog: DialogRef; theHandle: Handle; method: DITLMethod ); external name '_AppendDITL';
1295 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1296 
1297 
1298 {
1299  *  CountDITL()
1300  *
1301  *  Mac OS X threading:
1302  *    Not thread safe
1303  *
1304  *  Availability:
1305  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1306  *    CarbonLib:        in CarbonLib 1.0 and later
1307  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1308  }
CountDITLnull1309 function CountDITL( theDialog: DialogRef ): DialogItemIndex; external name '_CountDITL';
1310 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1311 
1312 
1313 {
1314  *  ShortenDITL()
1315  *
1316  *  Mac OS X threading:
1317  *    Not thread safe
1318  *
1319  *  Availability:
1320  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1321  *    CarbonLib:        in CarbonLib 1.0 and later
1322  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1323  }
1324 procedure ShortenDITL( theDialog: DialogRef; numberItems: DialogItemIndex ); external name '_ShortenDITL';
1325 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1326 
1327 
1328 {
1329  *  InsertDialogItem()
1330  *
1331  *  Mac OS X threading:
1332  *    Not thread safe
1333  *
1334  *  Availability:
1335  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1336  *    CarbonLib:        in CarbonLib 1.0 and later
1337  *    Non-Carbon CFM:   not available
1338  }
InsertDialogItemnull1339 function InsertDialogItem( theDialog: DialogRef; afterItem: DialogItemIndex; itemType: DialogItemType; itemHandle: Handle; const (*var*) box: Rect ): OSStatus; external name '_InsertDialogItem';
1340 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1341 
1342 
1343 {
1344  *  RemoveDialogItems()
1345  *
1346  *  Mac OS X threading:
1347  *    Not thread safe
1348  *
1349  *  Availability:
1350  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1351  *    CarbonLib:        in CarbonLib 1.0 and later
1352  *    Non-Carbon CFM:   not available
1353  }
RemoveDialogItemsnull1354 function RemoveDialogItems( theDialog: DialogRef; itemNo: DialogItemIndex; amountToRemove: DialogItemIndex; disposeItemData: Boolean ): OSStatus; external name '_RemoveDialogItems';
1355 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1356 
1357 
1358 {$endc} {not TARGET_CPU_64}
1359 
1360 {$ifc not TARGET_CPU_64}
1361 {
1362  *  StdFilterProc()
1363  *
1364  *  Mac OS X threading:
1365  *    Not thread safe
1366  *
1367  *  Availability:
1368  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1369  *    CarbonLib:        in CarbonLib 1.0 and later
1370  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1371  }
StdFilterProcnull1372 function StdFilterProc( theDialog: DialogRef; var event: EventRecord; var itemHit: DialogItemIndex ): Boolean; external name '_StdFilterProc';
1373 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1374 
1375 
1376 {$endc} {not TARGET_CPU_64}
1377 
1378 {$ifc not TARGET_CPU_64}
1379 {
1380  *  GetStdFilterProc()
1381  *
1382  *  Mac OS X threading:
1383  *    Not thread safe
1384  *
1385  *  Availability:
1386  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1387  *    CarbonLib:        in CarbonLib 1.0 and later
1388  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1389  }
GetStdFilterProcnull1390 function GetStdFilterProc( var theProc: ModalFilterUPP ): OSErr; external name '_GetStdFilterProc';
1391 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1392 
1393 
1394 {
1395  *  SetDialogDefaultItem()
1396  *
1397  *  Mac OS X threading:
1398  *    Not thread safe
1399  *
1400  *  Availability:
1401  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1402  *    CarbonLib:        in CarbonLib 1.0 and later
1403  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1404  }
SetDialogDefaultItemnull1405 function SetDialogDefaultItem( theDialog: DialogRef; newItem: DialogItemIndex ): OSErr; external name '_SetDialogDefaultItem';
1406 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1407 
1408 
1409 {
1410  *  SetDialogCancelItem()
1411  *
1412  *  Mac OS X threading:
1413  *    Not thread safe
1414  *
1415  *  Availability:
1416  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1417  *    CarbonLib:        in CarbonLib 1.0 and later
1418  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1419  }
SetDialogCancelItemnull1420 function SetDialogCancelItem( theDialog: DialogRef; newItem: DialogItemIndex ): OSErr; external name '_SetDialogCancelItem';
1421 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1422 
1423 
1424 {
1425  *  SetDialogTracksCursor()
1426  *
1427  *  Mac OS X threading:
1428  *    Not thread safe
1429  *
1430  *  Availability:
1431  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1432  *    CarbonLib:        in CarbonLib 1.0 and later
1433  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1434  }
SetDialogTracksCursornull1435 function SetDialogTracksCursor( theDialog: DialogRef; tracks: Boolean ): OSErr; external name '_SetDialogTracksCursor';
1436 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1437 
1438 
1439 {
1440   ���������������������������������������������������������������������������������������������������������
1441     � Appearance Dialog Routines (available only with Appearance 1.0 and later)
1442   ���������������������������������������������������������������������������������������������������������
1443 }
1444 
1445 {
1446  *  NewFeaturesDialog()
1447  *
1448  *  Mac OS X threading:
1449  *    Not thread safe
1450  *
1451  *  Availability:
1452  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1453  *    CarbonLib:        in CarbonLib 1.0 and later
1454  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
1455  }
NewFeaturesDialognull1456 function NewFeaturesDialog( inStorage: UnivPtr; const (*var*) inBoundsRect: Rect; const (*var*) inTitle: Str255; inIsVisible: Boolean; inProcID: SInt16; inBehind: WindowRef; inGoAwayFlag: Boolean; inRefCon: SRefCon; inItemListHandle: Handle; inFlags: UInt32 ): DialogRef; external name '_NewFeaturesDialog';
1457 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1458 
1459 
1460 {
1461  *  AutoSizeDialog()
1462  *
1463  *  Mac OS X threading:
1464  *    Not thread safe
1465  *
1466  *  Availability:
1467  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1468  *    CarbonLib:        in CarbonLib 1.0 and later
1469  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
1470  }
AutoSizeDialognull1471 function AutoSizeDialog( inDialog: DialogRef ): OSErr; external name '_AutoSizeDialog';
1472 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1473 
1474 
1475 {
1476     Regarding StandardAlert and constness:
1477     Even though the inAlertParam parameter is marked const here, there was
1478     a chance Dialog Manager would modify it on versions of Mac OS prior to 9.
1479 }
1480 {
1481  *  StandardAlert()
1482  *
1483  *  Mac OS X threading:
1484  *    Not thread safe
1485  *
1486  *  Availability:
1487  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1488  *    CarbonLib:        in CarbonLib 1.0 and later
1489  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
1490  }
StandardAlertnull1491 function StandardAlert( inAlertType: AlertType; const (*var*) inError: Str255; const (*var*) inExplanation: Str255; {const} inAlertParam: AlertStdAlertParamRecPtr { can be NULL }; var outItemHit: SInt16 ): OSErr; external name '_StandardAlert';
1492 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1493 
1494 
1495 { CFString-based StandardAlert and StandardSheet APIs are only available on Mac OS X and later}
1496 
1497 {
1498  *  GetStandardAlertDefaultParams()
1499  *
1500  *  Summary:
1501  *    Fills out an AlertStdCFStringAlertParamRec with default
1502  *    values:
1503  *    -   movable
1504  *    -   no help button
1505  *    -   default button with title kAlertDefaultOKText
1506  *    -   no cancel or other buttons
1507  *
1508  *  Mac OS X threading:
1509  *    Not thread safe
1510  *
1511  *  Parameters:
1512  *
1513  *    param:
1514  *      The parameter block to initialize.
1515  *
1516  *    version:
1517  *      The parameter block version; pass kStdCFStringAlertVersionOne.
1518  *
1519  *  Availability:
1520  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1521  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1522  *    Non-Carbon CFM:   not available
1523  }
GetStandardAlertDefaultParamsnull1524 function GetStandardAlertDefaultParams( param: AlertStdCFStringAlertParamPtr; version: UInt32 ): OSStatus; external name '_GetStandardAlertDefaultParams';
1525 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1526 
1527 
1528 {
1529  *  CreateStandardAlert()
1530  *
1531  *  Summary:
1532  *    Creates an alert containing standard elements and using standard
1533  *    formatting rules.
1534  *
1535  *  Discussion:
1536  *    CreateStandardAlert should be used in conjunction with
1537  *    RunStandardAlert. After CreateStandardAlert returns, the alert is
1538  *    still invisible. RunStandardAlert will show the alert and run a
1539  *    modal dialog loop to process events in the alert.
1540  *
1541  *    The strings passed to this API in the error, explanation, and
1542  *    AlertStdCFStringAlertParamRec button title parameters will all be
1543  *    retained during the creation of the alert, and released when the
1544  *    alert is disposed by RunStandardAlert. There is no net change to
1545  *    the refcount of these strings across CreateStandardAlert and
1546  *    RunStandardAlert.
1547  *
1548  *  Mac OS X threading:
1549  *    Not thread safe
1550  *
1551  *  Parameters:
1552  *
1553  *    alertType:
1554  *      The type of alert to create.
1555  *
1556  *    error:
1557  *      The error string to display. CreateStandardAlert increments the
1558  *      refcount on this string, so you may release it after
1559  *      CreateStandardAlert returns if you don't need it later.
1560  *
1561  *    explanation:
1562  *      The explanation string to display. May be NULL or empty to
1563  *      display no explanation. CreateStandardAlert increments the
1564  *      refcount on this string, so you may release it after
1565  *      CreateStandardAlert returns if you don't need it later.
1566  *
1567  *    param:
1568  *      The parameter block describing how to create the alert. May be
1569  *      NULL. CreateStandardAlert increments the refcount on the button
1570  *      title strings in the parameter block, so you may release them
1571  *      after CreateStandardAlert returns if you don't need them later.
1572  *
1573  *    outAlert:
1574  *      On exit, contains the new alert.
1575  *
1576  *  Availability:
1577  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1578  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1579  *    Non-Carbon CFM:   not available
1580  }
CreateStandardAlertnull1581 function CreateStandardAlert( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; var outAlert: DialogRef ): OSStatus; external name '_CreateStandardAlert';
1582 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1583 
1584 
1585 {
1586  *  RunStandardAlert()
1587  *
1588  *  Summary:
1589  *    Shows, runs, and destroys a standard alert using a modal dialog
1590  *    loop.
1591  *
1592  *  Discussion:
1593  *    RunStandardAlert displays and runs an alert created by
1594  *    CreateStandardAlert. It handles all user interaction with the
1595  *    alert. After the user has dismissed the alert, RunStandardAlert
1596  *    destroys the alert dialog; the DialogRef will be invalid after
1597  *    RunStandardAlert returns. DO NOT call DisposeDialog.
1598  *
1599  *    NOTE: DO NOT call this function for a dialog that was not created
1600  *    with CreateStandardAlert! You will sorely regret it, I promise
1601  *    you.
1602  *
1603  *  Mac OS X threading:
1604  *    Not thread safe
1605  *
1606  *  Parameters:
1607  *
1608  *    inAlert:
1609  *      The alert to display.
1610  *
1611  *    filterProc:
1612  *      An event filter function for handling events that do not apply
1613  *      to the alert. May be NULL.
1614  *
1615  *    outItemHit:
1616  *      On exit, contains the item index of the button that was pressed
1617  *      to close the alert.
1618  *
1619  *  Availability:
1620  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1621  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1622  *    Non-Carbon CFM:   not available
1623  }
RunStandardAlertnull1624 function RunStandardAlert( inAlert: DialogRef; filterProc: ModalFilterUPP { can be NULL }; var outItemHit: DialogItemIndex ): OSStatus; external name '_RunStandardAlert';
1625 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1626 
1627 
1628 {
1629  *  CreateStandardSheet()
1630  *
1631  *  Summary:
1632  *    Creates an alert containing standard elements and using standard
1633  *    formatting rules, and prepares it to be displayed as a sheet.
1634  *
1635  *  Discussion:
1636  *    CreateStandardSheet should be used in conjunction with
1637  *    ShowSheetWindow. After CreateStandardSheet returns, the alert is
1638  *    still invisible. ShowSheetWindow will show the alert and then
1639  *    return. Events in the sheet are handled asynchronously; the
1640  *    application should be prepared for the sheet window to be part of
1641  *    its windowlist while running its own event loop. When a button in
1642  *    the sheet is pressed, the EventTargetRef passed to
1643  *    CreateStandardSheet will receive a command event with one of the
1644  *    command IDs kHICommandOK, kHICommandCancel, or kHICommandOther.
1645  *    The sheet is hidden and the sheet dialog destroyed before the
1646  *    command is sent; the caller does not have to call HideSheetWindow
1647  *    or DisposeDialog.
1648  *
1649  *    If the caller needs to destroy the sheet before showing it, then
1650  *    it is sufficient to call DisposeDialog on the sheet. This is the
1651  *    only case in which the caller would need to destroy the sheet
1652  *    explicitly.
1653  *
1654  *    The strings passed to this API in the error, explanation, and
1655  *    AlertStdCFStringAlertParamRec button title parameters will all be
1656  *    retained during the creation of the sheet, and released when the
1657  *    sheet is disposed. There is no net change to the refcount of
1658  *    these strings across CreateStandardSheet and sheet destruction.
1659  *
1660  *  Mac OS X threading:
1661  *    Not thread safe
1662  *
1663  *  Parameters:
1664  *
1665  *    alertType:
1666  *      The type of alert to create.
1667  *
1668  *    error:
1669  *      The error string to display. CreateStandardSheet increments the
1670  *      refcount on this string, so you may release it after
1671  *      CreateStandardSheet returns if you don't need it later.
1672  *
1673  *    explanation:
1674  *      The explanation string to display. May be NULL or empty to
1675  *      display no explanation. CreateStandardSheet increments the
1676  *      refcount on this string, so you may release it after
1677  *      CreateStandardSheet returns if you don't need it later.
1678  *
1679  *    param:
1680  *      The parameter block describing how to create the alert. May be
1681  *      NULL. CreateStandardSheet increments the refcount on the button
1682  *      title strings in the parameter block, so you may release them
1683  *      after CreateStandardSheet returns if you don't need them later.
1684  *
1685  *    notifyTarget:
1686  *      The event target to be notified when the sheet is closed. The
1687  *      caller should install an event handler on this target for the
1688  *      [kEventClassCommand, kEventProcessCommand] event. May be NULL
1689  *      if the caller does not need the command event to be sent to any
1690  *      target.
1691  *
1692  *      Typically, this will be the event target for the parent window
1693  *      of the sheet; a standard practice is to install a handler on
1694  *      the parent window just before showing the sheet window, and to
1695  *      remove the handler from the parent window after the sheet has
1696  *      been closed. It is also possible to install a handler on the
1697  *      sheet window itself, in which case you would pass NULL for this
1698  *      parameter, since the command event is automatically sent to the
1699  *      sheet window already. If you install a handler on the sheet
1700  *      itself, make sure to return eventNotHandledErr from your
1701  *      handler, because CreateStandardSheet installs its own handler
1702  *      on the sheet and that handler must be allowed to run to close
1703  *      the sheet window and release the DialogRef.
1704  *
1705  *    outSheet:
1706  *      On exit, contains the new alert.
1707  *
1708  *  Availability:
1709  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1710  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1711  *    Non-Carbon CFM:   not available
1712  }
CreateStandardSheetnull1713 function CreateStandardSheet( alertType_: AlertType; error: CFStringRef; explanation: CFStringRef { can be NULL }; {const} param: AlertStdCFStringAlertParamPtr { can be NULL }; notifyTarget: EventTargetRef { can be NULL }; var outSheet: DialogRef ): OSStatus; external name '_CreateStandardSheet';
1714 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1715 
1716 
1717 {
1718  *  CloseStandardSheet()
1719  *
1720  *  Summary:
1721  *    Closes a standard sheet dialog and releases the dialog data
1722  *    structures.
1723  *
1724  *  Discussion:
1725  *    CloseStandardSheet is meant to be used when you need to remove a
1726  *    sheet because of a higher-priority request to close the sheet's
1727  *    document window. For example, you might have a Save Changes sheet
1728  *    open on a document window. Meanwhile, the user drags the document
1729  *    into the trash. When your application sees that the document has
1730  *    been moved to the trash, it knows that it should close the
1731  *    document window, but first it needs to close the sheet.
1732  *
1733  *    CloseStandardSheet should not be used by your Carbon event
1734  *    handler in response to a click in one of the sheet buttons; the
1735  *    Dialog Manager will close the sheet automatically in that case.
1736  *
1737  *
1738  *    If kStdAlertDoNotDisposeSheet was specified when the sheet was
1739  *    created, the sheet dialog will be hidden but not released, and
1740  *    you can reuse the sheet later.
1741  *
1742  *  Mac OS X threading:
1743  *    Not thread safe
1744  *
1745  *  Parameters:
1746  *
1747  *    inSheet:
1748  *      The sheet to close.
1749  *
1750  *    inResultCommand:
1751  *      This command, if not zero, will be sent to the EventTarget
1752  *      specified when the sheet was created.
1753  *
1754  *  Availability:
1755  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1756  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1757  *    Non-Carbon CFM:   not available
1758  }
CloseStandardSheetnull1759 function CloseStandardSheet( inSheet: DialogRef; inResultCommand: UInt32 ): OSStatus; external name '_CloseStandardSheet';
1760 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1761 
1762 
1763 {
1764  *  GetDialogItemAsControl()
1765  *
1766  *  Mac OS X threading:
1767  *    Not thread safe
1768  *
1769  *  Availability:
1770  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1771  *    CarbonLib:        in CarbonLib 1.0 and later
1772  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
1773  }
GetDialogItemAsControlnull1774 function GetDialogItemAsControl( inDialog: DialogRef; inItemNo: DialogItemIndex; var outControl: ControlRef ): OSErr; external name '_GetDialogItemAsControl';
1775 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1776 
1777 
1778 {
1779  *  MoveDialogItem()
1780  *
1781  *  Mac OS X threading:
1782  *    Not thread safe
1783  *
1784  *  Availability:
1785  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1786  *    CarbonLib:        in CarbonLib 1.0 and later
1787  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
1788  }
MoveDialogItemnull1789 function MoveDialogItem( inDialog: DialogRef; inItemNo: DialogItemIndex; inHoriz: SInt16; inVert: SInt16 ): OSErr; external name '_MoveDialogItem';
1790 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1791 
1792 
1793 {
1794  *  SizeDialogItem()
1795  *
1796  *  Mac OS X threading:
1797  *    Not thread safe
1798  *
1799  *  Availability:
1800  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1801  *    CarbonLib:        in CarbonLib 1.0 and later
1802  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
1803  }
SizeDialogItemnull1804 function SizeDialogItem( inDialog: DialogRef; inItemNo: DialogItemIndex; inWidth: SInt16; inHeight: SInt16 ): OSErr; external name '_SizeDialogItem';
1805 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1806 
1807 
1808 {
1809  *  AppendDialogItemList()
1810  *
1811  *  Mac OS X threading:
1812  *    Not thread safe
1813  *
1814  *  Availability:
1815  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1816  *    CarbonLib:        in CarbonLib 1.0 and later
1817  *    Non-Carbon CFM:   in DialogsLib 8.5 and later
1818  }
AppendDialogItemListnull1819 function AppendDialogItemList( dialog: DialogRef; ditlID: SInt16; method: DITLMethod ): OSErr; external name '_AppendDialogItemList';
1820 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1821 
1822 
1823 {
1824   ���������������������������������������������������������������������������������������������������������
1825     � Dialog Routines available only with Appearance 1.1 (Mac OS 8.5) and later
1826   ���������������������������������������������������������������������������������������������������������
1827 }
1828 
1829 {
1830  *  SetDialogTimeout()
1831  *
1832  *  Summary:
1833  *    Sets the timeout for a modal dialog.
1834  *
1835  *  Discussion:
1836  *    SetDialogTimeout sets the delay after which a dialog will be
1837  *    automatically dismissed. When SetDialogTimeout is called, the
1838  *    Dialog Manager takes the current time, adds the timeout to it,
1839  *    and stores the result as the time to dismiss the dialog. If the
1840  *    dismissal time is reached, the dialog is automatically closed and
1841  *    the specified dialog item index is returned from ModalDialog in
1842  *    the itemHit parameter. If the user moves the mouse or presses a
1843  *    key, the dismissal time is reset by adding the original timeout
1844  *    to the time of the event. Only the ModalDialog API observes the
1845  *    timeout value; if you are handling events in a modeless dialog or
1846  *    sheet using IsDialogEvent and DialogSelect, the timeout will be
1847  *    ignored.
1848  *
1849  *  Mac OS X threading:
1850  *    Not thread safe
1851  *
1852  *  Parameters:
1853  *
1854  *    inDialog:
1855  *      The dialog on which to set a timeout.
1856  *
1857  *    inButtonToPress:
1858  *      The dialog item index that should be returned from ModalDialog
1859  *      when the timeout expires.
1860  *
1861  *    inSecondsToWait:
1862  *      The time to wait before dismissing the dialog, in seconds.
1863  *
1864  *  Result:
1865  *    An operating system result code.
1866  *
1867  *  Availability:
1868  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1869  *    CarbonLib:        in CarbonLib 1.0 and later
1870  *    Non-Carbon CFM:   in DialogsLib 8.5 and later
1871  }
SetDialogTimeoutnull1872 function SetDialogTimeout( inDialog: DialogRef; inButtonToPress: DialogItemIndex; inSecondsToWait: UInt32 ): OSStatus; external name '_SetDialogTimeout';
1873 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1874 
1875 
1876 {
1877  *  GetDialogTimeout()
1878  *
1879  *  Summary:
1880  *    Retrieves the timeout for a modal dialog.
1881  *
1882  *  Mac OS X threading:
1883  *    Not thread safe
1884  *
1885  *  Parameters:
1886  *
1887  *    inDialog:
1888  *      The dialog from which to retrieve the timeout.
1889  *
1890  *    outButtonToPress:
1891  *      On exit, contains the dialog item index that should be returned
1892  *      from ModalDialog when the dialog is dismissed. May be NULL if
1893  *      you do not need this information.
1894  *
1895  *    outSecondsToWait:
1896  *      On exit, contains the time to wait before dismissing the
1897  *      dialog, in seconds. May be NULL if you do not need this
1898  *      information.
1899  *
1900  *    outSecondsRemaining:
1901  *      On exit, contains the time until the dialog is dismissed, in
1902  *      seconds. May be NULL if you do not need this information.
1903  *
1904  *  Result:
1905  *    An operating system result code. Returns dialogNoTimeoutErr if no
1906  *    timeout has been set for this dialog.
1907  *
1908  *  Availability:
1909  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1910  *    CarbonLib:        in CarbonLib 1.0 and later
1911  *    Non-Carbon CFM:   in DialogsLib 8.5 and later
1912  }
GetDialogTimeoutnull1913 function GetDialogTimeout( inDialog: DialogRef; outButtonToPress: DialogItemIndexPtr { can be NULL }; outSecondsToWait: UInt32Ptr { can be NULL }; outSecondsRemaining: UInt32Ptr { can be NULL } ): OSStatus; external name '_GetDialogTimeout';
1914 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1915 
1916 
1917 {
1918  *  SetModalDialogEventMask()
1919  *
1920  *  Mac OS X threading:
1921  *    Not thread safe
1922  *
1923  *  Availability:
1924  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1925  *    CarbonLib:        in CarbonLib 1.0 and later
1926  *    Non-Carbon CFM:   in DialogsLib 8.5 and later
1927  }
SetModalDialogEventMasknull1928 function SetModalDialogEventMask( inDialog: DialogRef; inMask: EventMask ): OSStatus; external name '_SetModalDialogEventMask';
1929 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1930 
1931 
1932 {
1933  *  GetModalDialogEventMask()
1934  *
1935  *  Mac OS X threading:
1936  *    Not thread safe
1937  *
1938  *  Availability:
1939  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1940  *    CarbonLib:        in CarbonLib 1.0 and later
1941  *    Non-Carbon CFM:   in DialogsLib 8.5 and later
1942  }
GetModalDialogEventMasknull1943 function GetModalDialogEventMask( inDialog: DialogRef; var outMask: EventMask ): OSStatus; external name '_GetModalDialogEventMask';
1944 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1945 
1946 
1947 {
1948   ���������������������������������������������������������������������������������������������������������
1949     � Accessor functions
1950   ���������������������������������������������������������������������������������������������������������
1951 }
1952 
1953 
1954 {
1955  *  GetDialogWindow()
1956  *
1957  *  Mac OS X threading:
1958  *    Not thread safe
1959  *
1960  *  Availability:
1961  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1962  *    CarbonLib:        in CarbonLib 1.0 and later
1963  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
1964  }
GetDialogWindownull1965 function GetDialogWindow( dialog: DialogRef ): WindowRef; external name '_GetDialogWindow';
1966 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1967 
1968 
1969 {
1970  *  GetDialogTextEditHandle()
1971  *
1972  *  Mac OS X threading:
1973  *    Not thread safe
1974  *
1975  *  Availability:
1976  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1977  *    CarbonLib:        in CarbonLib 1.0 and later
1978  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
1979  }
GetDialogTextEditHandlenull1980 function GetDialogTextEditHandle( dialog: DialogRef ): TEHandle; external name '_GetDialogTextEditHandle';
1981 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1982 
1983 
1984 {
1985  *  GetDialogDefaultItem()
1986  *
1987  *  Mac OS X threading:
1988  *    Not thread safe
1989  *
1990  *  Availability:
1991  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1992  *    CarbonLib:        in CarbonLib 1.0 and later
1993  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
1994  }
GetDialogDefaultItemnull1995 function GetDialogDefaultItem( dialog: DialogRef ): SInt16; external name '_GetDialogDefaultItem';
1996 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1997 
1998 
1999 {
2000  *  GetDialogCancelItem()
2001  *
2002  *  Mac OS X threading:
2003  *    Not thread safe
2004  *
2005  *  Availability:
2006  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2007  *    CarbonLib:        in CarbonLib 1.0 and later
2008  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
2009  }
GetDialogCancelItemnull2010 function GetDialogCancelItem( dialog: DialogRef ): SInt16; external name '_GetDialogCancelItem';
2011 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2012 
2013 
2014 {
2015  *  GetDialogKeyboardFocusItem()
2016  *
2017  *  Mac OS X threading:
2018  *    Not thread safe
2019  *
2020  *  Availability:
2021  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2022  *    CarbonLib:        in CarbonLib 1.0 and later
2023  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
2024  }
GetDialogKeyboardFocusItemnull2025 function GetDialogKeyboardFocusItem( dialog: DialogRef ): SInt16; external name '_GetDialogKeyboardFocusItem';
2026 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2027 
2028 
2029 {
2030  *  SetPortDialogPort()
2031  *
2032  *  Mac OS X threading:
2033  *    Not thread safe
2034  *
2035  *  Availability:
2036  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2037  *    CarbonLib:        in CarbonLib 1.0 and later
2038  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
2039  }
2040 procedure SetPortDialogPort( dialog: DialogRef ); external name '_SetPortDialogPort';
2041 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2042 
2043 
2044 {
2045  *  GetDialogPort()
2046  *
2047  *  Mac OS X threading:
2048  *    Not thread safe
2049  *
2050  *  Availability:
2051  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2052  *    CarbonLib:        in CarbonLib 1.0 and later
2053  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
2054  }
GetDialogPortnull2055 function GetDialogPort( dialog: DialogRef ): CGrafPtr; external name '_GetDialogPort';
2056 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2057 
2058 
2059 {
2060  *  GetDialogFromWindow()
2061  *
2062  *  Mac OS X threading:
2063  *    Not thread safe
2064  *
2065  *  Availability:
2066  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2067  *    CarbonLib:        in CarbonLib 1.0 and later
2068  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
2069  }
GetDialogFromWindownull2070 function GetDialogFromWindow( window: WindowRef ): DialogRef; external name '_GetDialogFromWindow';
2071 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2072 
2073 
2074 {$endc} {not TARGET_CPU_64}
2075 
2076 (*
2077 #if OLDROUTINENAMES && !__LP64__
2078 #define DisposDialog(theDialog) DisposeDialog(theDialog)
2079 #define UpdtDialog(theDialog, updateRgn) UpdateDialog(theDialog, updateRgn)
2080 #define GetDItem(theDialog, itemNo, itemType, item, box) GetDialogItem(theDialog, itemNo, itemType, item, box)
2081 #define SetDItem(theDialog, itemNo, itemType, item, box) SetDialogItem(theDialog, itemNo, itemType, item, box)
2082 #define HideDItem(theDialog, itemNo) HideDialogItem(theDialog, itemNo)
2083 #define ShowDItem(theDialog, itemNo) ShowDialogItem(theDialog, itemNo)
2084 #define SelIText(theDialog, itemNo, strtSel, endSel) SelectDialogItemText(theDialog, itemNo, strtSel, endSel)
2085 #define GetIText(item, text) GetDialogItemText(item, text)
2086 #define SetIText(item, text) SetDialogItemText(item, text)
2087 #define FindDItem(theDialog, thePt) FindDialogItem(theDialog, thePt)
2088 #define NewCDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
2089 NewColorDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items)
2090 #define GetAlrtStage() GetAlertStage()
2091 #define ResetAlrtStage() ResetAlertStage()
2092 #define DlgCut(theDialog) DialogCut(theDialog)
2093 #define DlgPaste(theDialog) DialogPaste(theDialog)
2094 #define DlgCopy(theDialog) DialogCopy(theDialog)
2095 #define DlgDelete(theDialog) DialogDelete(theDialog)
2096 #define SetDAFont(fontNum) SetDialogFont(fontNum)
2097 #define SetGrafPortOfDialog(dialog) SetPortDialogPort(dialog)
2098 #endif  { OLDROUTINENAMES }
2099 *)
2100 
2101 {$endc} {TARGET_OS_MAC}
2102 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
2103 
2104 end.
2105 {$endc} {not MACOSALLINCLUDE}
2106