1 {
2      File:       HIToolbox/MacWindows.h
3 
4      Contains:   Window Manager Interfaces
5 
6      Version:    HIToolbox-624~3
7 
8      Copyright:  � 1997-2008 by Apple 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 MacWindows;
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,Files,Appearance,HIGeometry,HIObject,HIShape,HIToolbar,Aliases,Collections,Drag,Events,Menus,QDOffscreen,QuickdrawTypes,IconsCore,CFBase,CFArray,CGBase,CGColorSpace,CGContext,CGDirectDisplay,CGWindow,CGWindowLevels,CarbonEventsCore;
220 {$endc} {not MACOSALLINCLUDE}
221 
222 
223 {$ifc TARGET_OS_MAC}
224 
225 {$ALIGN MAC68K}
226 
227 { Current documentation for the Mac OS X Window Manager is available on the web:           }
228 {  <http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/index.html>   }
229 {��������������������������������������������������������������������������������������}
230 { � HIWindowRef                                                                        }
231 {��������������������������������������������������������������������������������������}
232 type
233 	HIWindowRef = WindowRef;
234 	HIWindowRefPtr = ^HIWindowRef;
235 {��������������������������������������������������������������������������������������}
236 { � Property Types                                                                     }
237 {��������������������������������������������������������������������������������������}
238 type
239 	PropertyCreator = OSType;
240 	PropertyTag = OSType;
241 {��������������������������������������������������������������������������������������}
242 { � Window Classes                                                                     }
243 {��������������������������������������������������������������������������������������}
244 
245 {
246  *  WindowClass
247  *
248  *  Summary:
249  *    The types of windows provided by the Window Manager.
250  *
251  *  Discussion:
252  *    The class of a window determines several aspects of the window:
253  *    its appearance, its initial window attributes, its initial window
254  *    group, and its initial modality. All of these except for the
255  *    window's appearance may be changed later using other Window
256  *    Manager APIs.
257  }
258 type
259 	WindowClass = UInt32;
260 	WindowClass_fix = WindowClass; { used as field type when a record declaration contains a WindowClass field identifier }
261 const
262 {
263    * An alert window is used when the application needs the user's
264    * attention immediately. On Mac OS 9 and earlier, a visible alert
265    * window will prevent the user from switching to any other
266    * application. Use kThemeBrushAlertBackgroundActive to draw the
267    * background of alert windows.
268    *
269    * Alert windows support compositing mode in Mac OS X 10.5 and later.
270    *
271    *
272    * Alert windows are initially placed in the modal window group,
273    * given a modality of kWindowModalityAppModal, and given an
274    * activation scope of kWindowActivationScopeAll. Available in Mac OS
275    * 8.5 and later.
276    }
277 	kAlertWindowClass = 1;
278 
279   {
280    * Similar to kAlertWindowClass, but provides a window that is
281    * movable and that allows switching to other applications. Generally
282    * you should use this window class rather than kAlertWindowClass.
283    * Use kThemeBrushAlertBackgroundActive to draw the background of
284    * movable alert windows.
285    *
286    * Movable alert windows support compositing mode in Mac OS X 10.2
287    * and later.
288    *
289    * Movable alert windows are initially placed in the modal window
290    * group, given a modality of kWindowModalityAppModal, and given an
291    * activation scope of kWindowActivationScopeAll. Available in Mac OS
292    * 8.5 and later.
293    }
294 	kMovableAlertWindowClass = 2;
295 
296   {
297    * A modal window is used to display a dialog (but not an alert; use
298    * kAlertWindowClass for alerts). On Mac OS 9 and earlier, a visible
299    * modal window will prevent the user from switching to any other
300    * application. Use kThemeBrushDialogBackgroundActive to draw the
301    * background of modal windows.
302    *
303    * Modal windows support compositing mode in Mac OS X 10.5 and later.
304    *
305    *
306    * Modal windows are initially placed in the modal window group,
307    * given a modality of kWindowModalityAppModal, and given an
308    * activation scope of kWindowActivationScopeAll. Available in Mac OS
309    * 8.5 and later.
310    }
311 	kModalWindowClass = 3;
312 
313   {
314    * Similar to kModalWindowClass, but provides a window that is
315    * movable and that allows switching to other applications. Generally
316    * you should use this window class rather than kModalWindowClass. If
317    * you are using CarbonLib 1.3 or later, or Mac OS X, use
318    * kThemeBrushMovableModalBackground to draw the background of
319    * movable modal windows; on earlier versions of CarbonLib, or for
320    * non-Carbon programming, use kThemeBrushDialogBackgroundActive.
321    *
322    *
323    * Movable modal windows support compositing mode in Mac OS X 10.2
324    * and later.
325    *
326    * Movable modal windows are initially placed in the modal window
327    * group, given a modality of kWindowModalityAppModal, and given an
328    * activation scope of kWindowActivationScopeAll. Available in Mac OS
329    * 8.5 and later.
330    }
331 	kMovableModalWindowClass = 4;
332 
333   {
334    * A floating window is layered above all application windows except
335    * for alert and modal windows. It is commonly used for palette
336    * windows, inspectors, and other accessory (non-document) windows.
337    * Use kThemeBrushUtilityWindowBackgroundActive or
338    * kThemeBrushDocumentWindowBackground to draw the background of
339    * floating windows.
340    *
341    * Floating windows support compositing mode in Mac OS X 10.2 and
342    * later.
343    *
344    * Floating windows are initially placed in the floating window
345    * group, given a modality of kWindowModalityNone, and given an
346    * activation scope of kWindowActivationScopeIndependent. Available
347    * in Mac OS 8.6 and later.
348    }
349 	kFloatingWindowClass = 5;
350 
351   {
352    * A document window is used for normal application document windows.
353    * Use kThemeBrushDocumentWindowBackground or your own custom drawing
354    * to draw the background of a document window.
355    *
356    * Document windows support compositing mode in Mac OS X 10.2 and
357    * later.
358    *
359    * Document windows are initially placed in the document window
360    * group, given a modality of kWindowModalityNone, and given an
361    * activation scope of kWindowActivationScopeAll. Available in Mac OS
362    * 8.5 and later.
363    }
364 	kDocumentWindowClass = 6;
365 
366   {
367    * A utility window is similar to a floating window, but it floats
368    * above the windows of all applications rather than just above the
369    * windows of the application that creates it. Use
370    * kThemeBrushUtilityWindowBackgroundActive or
371    * kThemeBrushDocumentWindowBackground to draw the background of
372    * utility windows.
373    *
374    * Utility windows support compositing mode in Mac OS X 10.2 and
375    * later.
376    *
377    * Utility windows are initially placed in the utility window group,
378    * given a modality of kWindowModalityNone, and given an activation
379    * scope of kWindowActivationScopeIndependent. Available in CarbonLib
380    * 1.1 and later, and in Mac OS X.
381    }
382 	kUtilityWindowClass = 8;
383 
384   {
385    * A help window is used to display help tags. It has no window
386    * frame. Typically you should use the Help Manager to display help
387    * tags, rather than creating a help tag window yourself.
388    *
389    * Help windows support compositing mode in Mac OS X 10.3 and later.
390    *
391    *
392    * Help windows are initially placed in the help window group, given
393    * a modality of kWindowModalityNone, and given an activation scope
394    * of kWindowActivationScopeNone. Available in CarbonLib 1.1 and
395    * later, and in Mac OS X.
396    }
397 	kHelpWindowClass = 10;
398 
399   {
400    * A sheet window is used to display a dialog that is attached
401    * directly to its parent window, rather than being a independent
402    * window. A sheet dialog only prevents interaction with its parent
403    * window; the user may still interact with other windows in the same
404    * application. Use kThemeBrushSheetBackgroundOpaque to draw an
405    * opaque background for sheet windows, or
406    * kThemeBrushSheetBackgroundTransparent to draw a transparent
407    * background (the transparent brush is only available in Mac OS X
408    * 10.1 and later).
409    *
410    * Sheet windows support compositing mode in Mac OS X 10.2 and later.
411    *
412    *
413    * Sheet windows are initially placed in the document window group,
414    * given a modality of kWindowModalityNone, and given an activation
415    * scope of kWindowActivationScopeAll. Available in CarbonLib 1.3 and
416    * later, and in Mac OS X; in CarbonLib, a sheet window is actually a
417    * movable-modal window, which blocks user interaction with all
418    * windows of the application.
419    }
420 	kSheetWindowClass = 11;
421 
422   {
423    * A toolbar window is used to display a palette of controls. It is
424    * similar to a floating window, and like a floating window is
425    * layered above all application windows except for alert and modal
426    * windows, but is layered beneath floating windows. Use
427    * kThemeBrushToolbarBackground to draw the background of a toolbar
428    * window in Mac OS X or later; CarbonLib does not currently support
429    * kThemeBrushToolbarBackground.
430    *
431    * Toolbar windows support compositing mode in Mac OS X 10.3 and
432    * later.
433    *
434    * Toolbar windows are initially placed in the toolbar window group,
435    * given a modality of kWindowModalityNone, and given an activation
436    * scope of kWindowActivationScopeNone. Available in CarbonLib 1.1
437    * and later, and Mac OS X.
438    }
439 	kToolbarWindowClass = 12;
440 
441   {
442    * A plain window has a single-pixel window frame.
443    * kThemeBrushDocumentWindowBackground,
444    * kThemeBrushDialogBackgroundActive, and application-specific custom
445    * drawing are all commonly used to draw the background of a plain
446    * window.
447    *
448    * Plain windows support compositing mode on Mac OS X 10.3 and later.
449    *
450    *
451    * Plain windows are initially placed in the document window group,
452    * given a modality of kWindowModalityNone, and given an activation
453    * scope of kWindowActivationScopeAll. Available in CarbonLib 1.2.5
454    * and later, and Mac OS X.
455    }
456 	kPlainWindowClass = 13;
457 
458   {
459    * An overlay window is a completely transparent window positioned
460    * above all other windows. Overlay windows are intended as a
461    * replacement for the pre-Carbon practice of drawing directly into
462    * the window manager port; by creating a full-screen overlay window
463    * and drawing into it, you can draw over any window in any
464    * application without disturbing the contents of the windows
465    * underneath your drawing.
466    *
467    * Overlay windows have a default handler for kEventWindowPaint that
468    * uses CGContextClearRect to clear the overlay window's alpha
469    * channel to zero. This ensures the initial transparency of the
470    * window. You can install your own kEventWindowPaint handler to do
471    * your own drawing; typically, you would call through to the default
472    * handler with CallNextEventHandler first, and then use
473    * QDBeginCGContext to create your own context for drawing. You can
474    * use either QuickDraw or CoreGraphics to draw into an overlay
475    * window, but you must use CoreGraphics to draw if you need any of
476    * your drawing to be non-opaque, since QuickDraw always sets the
477    * alpha channel of any pixels that it touches to 1.0.
478    *
479    * Overlay windows support compositing mode on Mac OS X 10.3 and
480    * later. You should draw into a compositing overlay window by adding
481    * a standard or custom HIView and implementing the kEventControlDraw
482    * event for your view; do not use kEventWindowPaint.
483    *
484    * You can also use the standard window event handler together with
485    * regular controls in an overlay window. When using the standard
486    * window event handler, you will probably want your
487    * kEventWindowPaint handler to return eventNotHandledErr (after
488    * calling the default handler with CallNextEventHandler first) so
489    * that after the Paint handler returns, the Window Manager will send
490    * a kEventWindowDrawContent event which the standard window event
491    * handler can respond to by drawing the controls in the window.
492    *
493    *
494    * Overlay windows are initially placed in the overlay window group,
495    * given a modality of kWindowModalityNone, and given an activation
496    * scope of kWindowActivationScopeNone. Available in Mac OS X.
497    }
498 	kOverlayWindowClass = 14;
499 
500   {
501    * A sheet alert window is similar to a sheet window, but is intended
502    * to display an alert rather than a dialog. On Mac OS X, the
503    * appearance of a sheet window and a sheet alert window is currently
504    * identical, but in CarbonLib a sheet alert window has a different
505    * appearance from a sheet window. Use
506    * kThemeBrushSheetBackgroundOpaque to draw an opaque background for
507    * sheet alert windows, or kThemeBrushSheetBackgroundTransparent to
508    * draw a transparent background (the transparent brush is only
509    * available in Mac OS X 10.1 and later).
510    *
511    * Sheet alert windows support compositing mode in Mac OS X 10.2 and
512    * later.
513    *
514    * Sheet alert windows are initially placed in the document window
515    * group, given a modality of kWindowModalityNone, and given an
516    * activation scope of kWindowActivationScopeAll. Available in
517    * CarbonLib 1.3 and later, and in Mac OS X 10.1 and later; in
518    * CarbonLib, a sheet alert window is actually a movable alert
519    * window, which blocks user interaction with all windows of the
520    * application.
521    }
522 	kSheetAlertWindowClass = 15;
523 
524   {
525    * A alternate plain window is similar to a plain window but has a
526    * solid black shadow on its right and bottom sides. It is rarely
527    * used in modern Mac OS applications.
528    * kThemeBrushDocumentWindowBackground,
529    * kThemeBrushDialogBackgroundActive, and application-specific custom
530    * drawing are all commonly used to draw the background of an
531    * alternate plain window.
532    *
533    * Alternate plain windows support compositing mode in Mac OS X 10.5
534    * and later.
535    *
536    * Alternate plain windows are initially placed in the document
537    * window group, given a modality of kWindowModalityNone, and given
538    * an activation scope of kWindowActivationScopeAll. Available in
539    * CarbonLib 1.3 and later, and Mac OS X 10.1 and later.
540    }
541 	kAltPlainWindowClass = 16;
542 
543   {
544    * A simple window is the simplest possible window; it has no window
545    * frame and its entire content is drawn by the application. Use any
546    * theme brush or your own custom drawing to draw the background of a
547    * simple window.
548    *
549    * Simple windows support compositing mode in Mac OS X 10.3 and
550    * later.
551    *
552    * Simple windows are initially placed in the document window group,
553    * given a modality of kWindowModalityNone, and given an activation
554    * scope of kWindowActivationScopeAll. Available in CarbonLib 1.5 and
555    * later, and Mac OS X 10.1 and later.
556    }
557 	kSimpleWindowClass = 18;
558 
559   {
560    * A drawer window is used when implementing a drawer user interface,
561    * in which the drawer window slides out from underneath a document
562    * window. Use kThemeBrushDrawerBackground or
563    * kThemeBrushDocumentWindowBackground to draw the background of
564    * drawer windows.
565    *
566    * Drawer windows must always use compositing mode.
567    *
568    * Drawer windows are initially placed in the document window group,
569    * given a modality of kWindowModalityNone, and given an activation
570    * scope of kWindowActivationScopeAll. Drawer windows must always be
571    * created using the Compositing window attribute. Available in Mac
572    * OS X 10.2 or later.
573    }
574 	kDrawerWindowClass = 20;
575 
576   {
577    * Not an actual window class, but a meta-constant that is used with
578    * GetFrontWindowOfClass, FindWindowOfClass, and GetNextWindowOfClass
579    * to indicate that there should be no restriction on the class of
580    * the returned window. Also used with GetWindowGroupOfClass to get
581    * the root window group.
582    }
583 	kAllWindowClasses = $FFFFFFFF;
584 
585 
586 {��������������������������������������������������������������������������������������}
587 { � Window Attributes                                                                  }
588 {��������������������������������������������������������������������������������������}
589 
590 {
591  *  Summary:
592  *    Window attribute bits.
593  }
594 const
595 {
596    * This window has a close box. Available for windows of
597    * kDocumentWindowClass, kFloatingWindowClass, and
598    * kUtilityWindowClass; in Mac OS X 10.5 and later, also available
599    * for windows of kMovableModalWindowClass.
600    }
601 	kHIWindowBitCloseBox = 1;
602 
603   {
604    * This window has a zoom box. Available for windows of
605    * kDocumentWindowClass, kFloatingWindowClass, and
606    * kUtilityWindowClass; in Mac OS X 10.5 and later, also available
607    * for windows of kMovableModalWindowClass. Note that when this
608    * attribute is set on a window, both the
609    * kWindowHorizontalZoomAttribute and kWindowVerticalZoomAttribute
610    * bits are set automatically.
611    }
612 	kHIWindowBitZoomBox = 2;
613 
614   {
615    * This window has a collapse box. Available for windows of
616    * kDocumentWindowClass, kFloatingWindowClass, and
617    * kUtilityWindowClass. For Floating and Utility window classes on
618    * Mac OS X, this attribute must be added to the window using
619    * ChangeWindowAttributes after the window is created; it may not be
620    * added to the window at creation time.
621    }
622 	kHIWindowBitCollapseBox = 4;
623 
624   {
625    * This window can be resized. Available for windows of
626    * kDocumentWindowClass, kMovableModalWindowClass,
627    * kFloatingWindowClass, kUtilityWindowClass, and kSheetWindowClass.
628    }
629 	kHIWindowBitResizable = 5;
630 
631   {
632    * This window has a vertical titlebar on the side of the window.
633    * Available for windows of kFloatingWindowClass and
634    * kUtilityWindowClass.
635    }
636 	kHIWindowBitSideTitlebar = 6;
637 
638   {
639    * This window has a toolbar button. Available for windows of
640    * kDocumentWindowClass on Mac OS X.
641    }
642 	kHIWindowBitToolbarButton = 7;
643 
644   {
645    * This window draws its window title and toolbar using a unified
646    * appearance that has no separator between the two areas. A window
647    * may not have both kHIWindowBitUnifiedTitleAndToolbar and
648    * kHIWindowBitTextured. If a window already has the Textured
649    * attribute, attempting to set the Unified attribute will cause
650    * ChangeWindowAttributes to return an error, and vice versa. This
651    * constant was not added to this header file until Mac OS X 10.5,
652    * but it is actually available at runtime on Mac OS X 10.4 and later
653    * for windows of kDocumentWindowClass. However, on Mac OS X 10.5 and
654    * later, kHIWindowBitUnifiedTitleAndToolbar no longer has any
655    * effect, since all windows with toolbars now have a unified look.
656    }
657 	kHIWindowBitUnifiedTitleAndToolbar = 8;
658 
659   {
660    * This window uses the Textured appearance. Available for document
661    * windows on Mac OS X 10.2 and later, and for floating windows on
662    * Mac OS X 10.3 and later. Drawers can also be textured, but
663    * dynamically adjust their appearance based on their parent window's
664    * appearance; it is not necessary to specify this attribute for a
665    * textured drawer.
666    }
667 	kHIWindowBitTextured = 9;
668 
669   {
670    * For Document, Floating, and Utility windows, this attribute allows
671    * you to hide the title bar of a window. Available in Mac OS X 10.4
672    * and later.
673    }
674 	kHIWindowBitNoTitleBar = 10;
675 
676   {
677    * Indicates that a textured window should have square corners. By
678    * default, a textured window has round corners. When this attribute
679    * is set on a window, the window frame view automatically makes the
680    * grow box view opaque, and when this attribute is cleared, the
681    * window frame view automatically makes the grow box view
682    * transparent. You can change the grow box view transparency after
683    * modifying this attribute with HIGrowBoxViewSetTransparent.
684    * Relevant only for textured windows; ignored in non-textured
685    * windows. Available in Mac OS X 10.5 and later for window classes
686    * that support the textured appearance.
687    }
688 	kHIWindowBitTexturedSquareCorners = 11;
689 
690   {
691    * Indicates that no border should be drawn between the toolbar and
692    * window content. Relevant only in textured windows. Ignored in
693    * non-textured windows.  Available in Mac OS X 10.4 and later for
694    * window classes that support the textured appearance.
695    }
696 	kHIWindowBitNoTexturedContentSeparator = 12;
697 
698   {
699    * Indicates that this window will have rounded bottom corners. By
700    * default, a window has squared corners, and the assertion of this
701    * bit turns on rounded bottom corners for the window if the window
702    * has a bottom bar (set with HIWindowSetContentBorderThickness). If
703    * the window does not have a bottom bar, this bit is ignored. If the
704    * window has the kHIWindowBitTextured attribute set, the
705    * kHIWindowBitRoundBottomBarCorners attribute will be ignored, as
706    * that type of window defaults to rounded corners and controls the
707    * squareness with the kHIWindowBitTexturedSquareCorners attribute.
708    }
709 	kHIWindowBitRoundBottomBarCorners = 13;
710 
711   {
712    * This window does not participate in window cycling invoked by
713    * cmd-~ or the "Focus on Window" hotkey defined in the Keyboards
714    * preference pane. Available for all windows on Mac OS X 10.2 and
715    * later.
716    }
717 	kHIWindowBitDoesNotCycle = 16;
718 
719   {
720    * This window receives no update events. Available for all windows.
721    }
722 	kHIWindowBitNoUpdates = 17;
723 
724   {
725    * This window receives no activate events. Available for all windows.
726    }
727 	kHIWindowBitNoActivates = 18;
728 
729   {
730    * This window receives mouse events even for areas of the window
731    * that are transparent (have an alpha channel component of zero).
732    * Available for windows of kOverlayWindowClass on Mac OS X 10.0 and
733    * 10.1, and available for all windows on Mac OS X 10.2 and later.
734    }
735 	kHIWindowBitOpaqueForEvents = 19;
736 
737   {
738    * This window uses composited drawing. This means that the entire
739    * window is comprised of HIViews, and can be treated thusly. This
740    * attribute must be specified at window creation, and cannot be
741    * changed later with ChangeWindowAttributes. Available on Mac OS X
742    * 10.2 and later.
743    }
744 	kHIWindowBitCompositing = 20;
745 
746   {
747    * This window's backing store can be scaled as necessary for high
748    * resolution drawing. This attribute is only consulted/respected if
749    * the app's Info.plist includes NSHighResolutionCapable with a value
750    * of true. This attribute can only be used when
751    * kHIWindowBitCompositing is also enabled for the window. When this
752    * attribute is enabled, you may not draw with QuickDraw in the
753    * window. You may only specify this attribute at window creation
754    * time. Available for all windows in 10.7.4 and later.
755    }
756 	kHIWindowBitHighResolutionCapable = 21;
757 
758   {
759    * This window has no shadow. Available for all windows on Mac OS X.
760    * This attribute is automatically given to windows of
761    * kOverlayWindowClass.
762    }
763 	kHIWindowBitNoShadow = 22;
764 
765   {
766    * This window can be made visible prior to user login. By default,
767    * in Mac OS X 10.5 and later no windows can be visible before a user
768    * logs into the system; this protects the user against certain types
769    * of malicious use of insecure applications. However, some software,
770    * such as input methods or other accessibility software, may need to
771    * deliberately make windows available prior to user login. Such
772    * software should add this window attribute to its windows.
773    * Available for all windows in Mac OS X 10.5 and later.
774    }
775 	kHIWindowBitCanBeVisibleWithoutLogin = 23;
776 
777   {
778    * This window is marked so that the window server will drag the
779    * window automatically. Your application should not call DragWindow
780    * for this window, else it would confuse the heck out of the drag
781    * (it would fight with the window server for control). This
782    * attribute is ignored (async drag is not used) if your window is
783    * grouped with other windows in a window group that has the
784    * kWindowGroupAttrMoveTogether attribute. Available for all windows
785    * on Mac OS X 10.3 and later.
786    }
787 	kHIWindowBitAsyncDrag = 24;
788 
789   {
790    * This window is automatically hidden on suspend and shown on
791    * resume. Available for all windows. This attribute is automatically
792    * given to windows of kFloatingWindowClass, kHelpWindowClass, and
793    * kToolbarWindowClass.
794    }
795 	kHIWindowBitHideOnSuspend = 25;
796 
797   {
798    * This window has the standard Carbon window event handler
799    * installed. Available for all windows.
800    }
801 	kHIWindowBitStandardHandler = 26;
802 
803   {
804    * This window is automatically hidden during fullscreen mode (when
805    * the menubar is invisible) and shown afterwards. Available for all
806    * windows. This attribute is automatically given to windows of
807    * kUtilityWindowClass.
808    }
809 	kHIWindowBitHideOnFullScreen = 27;
810 
811   {
812    * This window is added to the standard Window menu. Available for
813    * windows of kDocumentWindowClass. This attribute is automatically
814    * given to windows of kDocumentWindowClass.
815    }
816 	kHIWindowBitInWindowMenu = 28;
817 
818   {
819    * This window supports live resizing. Available for all windows on
820    * Mac OS X.
821    }
822 	kHIWindowBitLiveResize = 29;
823 
824   {
825    * This window never receives mouse events, even in areas that are
826    * opaque. Instead, clicks on the window will be passed through to
827    * windows beneath it. Available for all windows on Mac OS X 10.2 and
828    * later.
829    }
830 	kHIWindowBitIgnoreClicks = 30;
831 
832   {
833    * This window will not be repositioned by the default
834    * kEventWindowConstrain handler in response to changes in monitor
835    * size, Dock position, and so on. Available for all windows on Mac
836    * OS X 10.1 and later, and CarbonLib 1.6 and later.
837    }
838 	kHIWindowBitNoConstrain = 32;
839 
840   {
841    * Indicates that this window does not hide when the application is
842    * hidden. Available for all windows in Mac OS X 10.5 and later. This
843    * attribute is automatically given to windows of kUtilityWindowClass.
844    }
845 	kHIWindowBitDoesNotHide = 33;
846 
847   {
848    * Indicates that this window automatically installs Drag Manager
849    * callbacks to detect drag actions, and automatically sends HIView
850    * drag Carbon events. Setting this attribute is equivalent to
851    * calling the SetAutomaticControlDragTrackingEnabledForWindow API
852    * (and calling that API will now set this attribute). Available for
853    * all windows in Mac OS X 10.5 and later.
854    }
855 	kHIWindowBitAutoViewDragTracking = 34;
856 
857   {
858    * Indicates that this window automatically updates its ColorSync
859    * profile to the profile of the display containing the greatest area
860    * of the window. After the profile is set,
861    * kEventWindowColorSpaceChanged is sent to the window. The standard
862    * window handler's response is to repaint the entire window.
863    * Available for all windows in Mac OS X 10.6 and later. This
864    * attribute is automatically given to all compositing windows.
865    }
866 	kHIWindowBitAutoCalibration = 36;
867 
868   {
869    * Indicates that this window can become fullscreen, and causes the
870    * enter fullscreen title bar button to be added to the window's
871    * title bar. Including this bit on a window causes HIToolbox to add
872    * appropriate Enter/Exit Full Screen menu items to the app's menus,
873    * which HIToolbox will update appropriately. Only supported for
874    * windows of kDocumentWindowClass. Available in Mac OS X 10.7 and
875    * later.
876    }
877 	kHIWindowBitFullScreenPrimary = 45;
878 
879   {
880    * Indicates that this window can coexist on a fullscreen space with
881    * a fullscreen window of another application, but is not capable of
882    * becoming fullscreen itself.
883    * This window attribute is used in conjunction with the
884    * kHIWindowCanJoinAllSpaces Availability option to allow the window
885    * to move across FullScreen workspaces. For applications that are
886    * BackgroundOnly or UIElements, this is the default behavior when
887    * kHIWindowCanJoinAllSpaces is also set. For other applications,
888    * kHIWindowBitFullScreenAuxiliary must be specified, and is
889    * supported for window classes including kUtilityWindowClass, and
890    * kFloatingWindowClass with a WindowActivationScope of
891    * kWindowActivationScopeIndependent or kWindowActivationScopeNone.
892    * Available in Mac OS X 10.7 and later.
893    }
894 	kHIWindowBitFullScreenAuxiliary = 46;
895 
896 
897 {
898  *  Summary:
899  *    Window attributes as bitmasks. In Mac OS X 10.5 and later,
900  *    kHIWindowBit constants are preferred.
901  *
902  *  Discussion:
903  *    Note that the kWindowApplicationScaledAttribute constant provided
904  *    in Mac OS X 10.4 has been removed in Mac OS X 10.5 and later.
905  *    Application-scaled mode was never fully implemented and all
906  *    support for it has been removed from HIToolbox in Mac OS X 10.5.
907  }
908 const
909 {
910    * A constant with value zero; the lack of any attributes.
911    }
912 	kWindowNoAttributes = 0;
913 
914   {
915    * See kHIWindowBitCloseBox.
916    }
917 	kWindowCloseBoxAttribute = (1 shl (kHIWindowBitCloseBox - 1));
918 
919   {
920    * See kHIWindowBitZoomBox.
921    }
922 	kWindowHorizontalZoomAttribute = (1 shl (kHIWindowBitZoomBox - 1));
923 
924   {
925    * See kHIWindowBitZoomBox.
926    }
927 	kWindowVerticalZoomAttribute = 1 shl kHIWindowBitZoomBox;
928 
929   {
930    * See kHIWindowBitZoomBox.
931    }
932 	kWindowFullZoomAttribute = kWindowVerticalZoomAttribute or kWindowHorizontalZoomAttribute;
933 
934   {
935    * See kHIWindowBitCollapseBox.
936    }
937 	kWindowCollapseBoxAttribute = (1 shl (kHIWindowBitCollapseBox - 1));
938 
939   {
940    * See kHIWindowBitResizable.
941    }
942 	kWindowResizableAttribute = (1 shl (kHIWindowBitResizable - 1));
943 
944   {
945    * See kHIWindowBitSideTitlebar.
946    }
947 	kWindowSideTitlebarAttribute = (1 shl (kHIWindowBitSideTitlebar - 1));
948 
949   {
950    * See kHIWindowBitToolbarButton.
951    }
952 	kWindowToolbarButtonAttribute = (1 shl (kHIWindowBitToolbarButton - 1));
953 
954   {
955    * See kHIWindowBitUnifiedTitleAndToolbar.
956    }
957 	kWindowUnifiedTitleAndToolbarAttribute = (1 shl (kHIWindowBitUnifiedTitleAndToolbar - 1));
958 
959   {
960    * See kHIWindowBitTextured.
961    }
962 	kWindowMetalAttribute = (1 shl (kHIWindowBitTextured - 1));
963 
964   {
965    * See kHIWindowBitNoTitleBar.
966    }
967 	kWindowNoTitleBarAttribute = (1 shl (kHIWindowBitNoTitleBar - 1));
968 
969   {
970    * See kHIWindowBitTexturedSquareCorners.
971    }
972 	kWindowTexturedSquareCornersAttribute = (1 shl (kHIWindowBitTexturedSquareCorners - 1));
973 
974   {
975    * See kHIWindowBitNoTexturedContentSeparator.
976    }
977 	kWindowMetalNoContentSeparatorAttribute = (1 shl (kHIWindowBitNoTexturedContentSeparator - 1));
978 	kWindowHasRoundBottomBarCornersAttribute = (1 shl (kHIWindowBitRoundBottomBarCorners - 1));
979 
980   {
981    * See kHIWindowBitDoesNotCycle.
982    }
983 	kWindowDoesNotCycleAttribute = (1 shl (kHIWindowBitDoesNotCycle - 1));
984 
985   {
986    * See kHIWindowBitNoUpdates.
987    }
988 	kWindowNoUpdatesAttribute = (1 shl (kHIWindowBitNoUpdates - 1));
989 
990   {
991    * See kHIWindowBitNoActivates.
992    }
993 	kWindowNoActivatesAttribute = (1 shl (kHIWindowBitNoActivates - 1));
994 
995   {
996    * See kHIWindowBitOpaqueForEvents.
997    }
998 	kWindowOpaqueForEventsAttribute = (1 shl (kHIWindowBitOpaqueForEvents - 1));
999 
1000   {
1001    * See kHIWindowBitCompositing.
1002    }
1003 	kWindowCompositingAttribute = (1 shl (kHIWindowBitCompositing - 1));
1004 
1005   {
1006    * See kHIWindowBitNoShadow.
1007    }
1008 	kWindowNoShadowAttribute = (1 shl (kHIWindowBitNoShadow - 1));
1009 
1010   {
1011    * See kHIWindowBitCanBeVisibleWithoutLogin.
1012    }
1013 	kWindowCanBeVisibleWithoutLoginAttribute = (1 shl (kHIWindowBitCanBeVisibleWithoutLogin - 1));
1014 
1015   {
1016    * See kHIWindowBitHideOnSuspend.
1017    }
1018 	kWindowHideOnSuspendAttribute = (1 shl (kHIWindowBitHideOnSuspend - 1));
1019 
1020   {
1021    * See kHIWindowBitAsyncDrag.
1022    }
1023 	kWindowAsyncDragAttribute = (1 shl (kHIWindowBitAsyncDrag - 1));
1024 
1025   {
1026    * See kHIWindowBitStandardHandler.
1027    }
1028 	kWindowStandardHandlerAttribute = (1 shl (kHIWindowBitStandardHandler - 1));
1029 
1030   {
1031    * See kHIWindowBitHideOnFullScreen.
1032    }
1033 	kWindowHideOnFullScreenAttribute = (1 shl (kHIWindowBitHideOnFullScreen - 1));
1034 
1035   {
1036    * See kHIWindowBitInWindowMenu.
1037    }
1038 	kWindowInWindowMenuAttribute = (1 shl (kHIWindowBitInWindowMenu - 1));
1039 
1040   {
1041    * See kHIWindowBitLiveResize.
1042    }
1043 	kWindowLiveResizeAttribute = (1 shl (kHIWindowBitLiveResize - 1));
1044 
1045   {
1046    * See kHIWindowBitIgnoreClicks.
1047    }
1048 	kWindowIgnoreClicksAttribute = (1 shl (kHIWindowBitIgnoreClicks - 1));
1049 
1050   {
1051    * See kHIWindowBitHighResolutionCapable.
1052    }
1053 	kWindowHighResolutionCapableAttribute = (1 shl (kHIWindowBitHighResolutionCapable - 1));
1054 
1055   {
1056    * The minimum set of window attributes commonly used by document
1057    * windows.
1058    }
1059 	kWindowStandardDocumentAttributes = kWindowCloseBoxAttribute or kWindowFullZoomAttribute or kWindowCollapseBoxAttribute or kWindowResizableAttribute;
1060 
1061   {
1062    * The minimum set of window attributes commonly used by floating
1063    * windows.
1064    }
1065 	kWindowStandardFloatingAttributes = kWindowCloseBoxAttribute or kWindowCollapseBoxAttribute;
1066 
1067 
1068 const
1069 {
1070    * See kHIWindowBitNoConstrain.
1071    }
1072 	kWindowNoConstrainAttribute = $80000000; // force unsigned by specifying the constant explicitly
1073 type
1074 	WindowAttributes = OptionBits;
1075   WindowAttributes_fix = WindowAttributes; { used as field type when a record declaration contains a WindowAttributes field identifier }
1076 
1077 {
1078  *  Summary:
1079  *    DEPRECATED Window attribute bits.
1080  }
1081 const
1082 {
1083    * DEPRECATED name and functionality. Replaced conceptually by
1084    * kHIWindowBitHighResolutionCapable.
1085    }
1086 	kHIWindowBitFrameworkScaled = kHIWindowBitHighResolutionCapable;
1087 
1088 
1089 {
1090  *  Summary:
1091  *    DEPRECATED Window attribute bitmasks.
1092  }
1093 const
1094 {
1095    * DEPRECATED name and functionality. Replaced conceptually by
1096    * kWindowHighResolutionCapableAttribute.
1097    }
1098 	kWindowFrameworkScaledAttribute = kWindowHighResolutionCapableAttribute;
1099 
1100 
1101 {��������������������������������������������������������������������������������������}
1102 { � Window Definition Type                                                             }
1103 {��������������������������������������������������������������������������������������}
1104 const
1105 	kWindowDefProcType = FourCharCode('WDEF');
1106 
1107 {��������������������������������������������������������������������������������������}
1108 { � Mac OS 7.5 Window Definition Resource IDs                                          }
1109 {��������������������������������������������������������������������������������������}
1110 const
1111 	kStandardWindowDefinition = 0;    { for document windows and dialogs}
1112 	kRoundWindowDefinition = 1;    { old Desk Accessory-style window}
1113 	kFloatingWindowDefinition = 124;   { for floating windows}
1114 
1115 {��������������������������������������������������������������������������������������}
1116 { � Variant Codes                                                                      }
1117 {��������������������������������������������������������������������������������������}
1118 const
1119 { for use with kStandardWindowDefinition }
1120 	kDocumentWindowVariantCode = 0;
1121 	kModalDialogVariantCode = 1;
1122 	kPlainDialogVariantCode = 2;
1123 	kShadowDialogVariantCode = 3;
1124 	kMovableModalDialogVariantCode = 5;
1125 	kAlertVariantCode = 7;
1126 	kMovableAlertVariantCode = 9;    { for use with kFloatingWindowDefinition }
1127 	kSideFloaterVariantCode = 8;
1128 
1129 
1130 {��������������������������������������������������������������������������������������}
1131 { � DefProc IDs                                                                        }
1132 {��������������������������������������������������������������������������������������}
1133 const
1134 { classic ids }
1135 	documentProc = 0;
1136 	dBoxProc = 1;
1137 	plainDBox = 2;
1138 	altDBoxProc = 3;
1139 	noGrowDocProc = 4;
1140 	movableDBoxProc = 5;
1141 	zoomDocProc = 8;
1142 	zoomNoGrow = 12;   { floating window defproc ids }
1143 	floatProc = 1985;
1144 	floatGrowProc = 1987;
1145 	floatZoomProc = 1989;
1146 	floatZoomGrowProc = 1991;
1147 	floatSideProc = 1993;
1148 	floatSideGrowProc = 1995;
1149 	floatSideZoomProc = 1997;
1150 	floatSideZoomGrowProc = 1999;
1151 
1152 const
1153 { Resource IDs for theme-savvy window defprocs }
1154 	kWindowDocumentDefProcResID = 64;
1155 	kWindowDialogDefProcResID = 65;
1156 	kWindowUtilityDefProcResID = 66;
1157 	kWindowUtilitySideTitleDefProcResID = 67;
1158 	kWindowSheetDefProcResID = 68;
1159 	kWindowSimpleDefProcResID = 69;
1160 	kWindowSheetAlertDefProcResID = 70;
1161 
1162 const
1163 { Proc IDs for theme-savvy windows }
1164 	kWindowDocumentProc = 1024;
1165 	kWindowGrowDocumentProc = 1025;
1166 	kWindowVertZoomDocumentProc = 1026;
1167 	kWindowVertZoomGrowDocumentProc = 1027;
1168 	kWindowHorizZoomDocumentProc = 1028;
1169 	kWindowHorizZoomGrowDocumentProc = 1029;
1170 	kWindowFullZoomDocumentProc = 1030;
1171 	kWindowFullZoomGrowDocumentProc = 1031;
1172 
1173 
1174 const
1175 { Proc IDs for theme-savvy dialogs }
1176 	kWindowPlainDialogProc = 1040;
1177 	kWindowShadowDialogProc = 1041;
1178 	kWindowModalDialogProc = 1042;
1179 	kWindowMovableModalDialogProc = 1043;
1180 	kWindowAlertProc = 1044;
1181 	kWindowMovableAlertProc = 1045;
1182 
1183 
1184 const
1185 { procIDs available from Mac OS 8.1 (Appearance 1.0.1) forward }
1186 	kWindowMovableModalGrowProc = 1046;
1187 
1188 
1189 const
1190 { Proc IDs for top title bar theme-savvy floating windows }
1191 	kWindowFloatProc = 1057;
1192 	kWindowFloatGrowProc = 1059;
1193 	kWindowFloatVertZoomProc = 1061;
1194 	kWindowFloatVertZoomGrowProc = 1063;
1195 	kWindowFloatHorizZoomProc = 1065;
1196 	kWindowFloatHorizZoomGrowProc = 1067;
1197 	kWindowFloatFullZoomProc = 1069;
1198 	kWindowFloatFullZoomGrowProc = 1071;
1199 
1200 
1201 const
1202 { Proc IDs for side title bar theme-savvy floating windows }
1203 	kWindowFloatSideProc = 1073;
1204 	kWindowFloatSideGrowProc = 1075;
1205 	kWindowFloatSideVertZoomProc = 1077;
1206 	kWindowFloatSideVertZoomGrowProc = 1079;
1207 	kWindowFloatSideHorizZoomProc = 1081;
1208 	kWindowFloatSideHorizZoomGrowProc = 1083;
1209 	kWindowFloatSideFullZoomProc = 1085;
1210 	kWindowFloatSideFullZoomGrowProc = 1087;
1211 
1212 
1213 const
1214 { Proc IDs for sheet windows }
1215 	kWindowSheetProc = 1088; { available in Mac OS X and CarbonLib 1.3 }
1216 	kWindowSheetAlertProc = 1120;  { available in Mac OS X 10.1 and CarbonLib 1.3 }
1217 
1218 
1219 {
1220  *  Discussion:
1221  *    Window defproc IDs for simple windows
1222  }
1223 const
1224 { Proc IDs for simple windows }
1225 
1226   {
1227    * A window that has no structure region; the content covers the
1228    * entire window.
1229    }
1230 	kWindowSimpleProc = 1104;
1231 
1232   {
1233    * A window that has a 1-pixel black frame as its structure.
1234    }
1235 	kWindowSimpleFrameProc = 1105;
1236 
1237 
1238 {
1239  *  Discussion:
1240  *    More window defproc IDs.
1241  }
1242 const
1243 {
1244    * Window defproc ID for overlay-class windows.
1245    }
1246 	kWindowOverlayProc = 1136;
1247 
1248 {��������������������������������������������������������������������������������������}
1249 { � System 7 Window Positioning Constants                                              }
1250 { Passed into StandardAlert and used in �WIND�, �DLOG�, and �ALRT� templates           }
1251 { StandardAlert uses zero to specify the default position. Other calls use zero to     }
1252 { specify �no position�.  Do not pass these constants to RepositionWindow.  Do not     }
1253 { store these constants in the BasicWindowDescription of a �wind� resource.            }
1254 {��������������������������������������������������������������������������������������}
1255 
1256 const
1257 	kWindowNoPosition = $0000;
1258 	kWindowDefaultPosition = $0000; { used by StandardAlert}
1259 	kWindowCenterMainScreen = $280A;
1260 	kWindowAlertPositionMainScreen = $300A;
1261 	kWindowStaggerMainScreen = $380A;
1262 	kWindowCenterParentWindow = $A80A;
1263 	kWindowAlertPositionParentWindow = $B00A;
1264 	kWindowStaggerParentWindow = $B80A;
1265 	kWindowCenterParentWindowScreen = $680A;
1266 	kWindowAlertPositionParentWindowScreen = $700A;
1267 	kWindowStaggerParentWindowScreen = $780A;
1268 
1269 {��������������������������������������������������������������������������������������}
1270 { � Window Positioning Methods                                                         }
1271 { Positioning methods passed to RepositionWindow.                                      }
1272 { Do not use them in WIND, ALRT, DLOG templates.                                       }
1273 { Do not confuse these constants with the constants above                              }
1274 {��������������������������������������������������������������������������������������}
1275 
1276 {
1277  *  WindowPositionMethod
1278  *
1279  *  Summary:
1280  *    Positioning methods usable with RepositionWindow.
1281  *
1282  *  Discussion:
1283  *    These constants are for use solely with the RepositionWindow API.
1284  *    They should not be used in 'WIND', 'ALRT', or 'DLOG' resources.
1285  }
1286 type
1287 	WindowPositionMethod = UInt32;
1288 	WindowPositionMethod_fix = WindowPositionMethod; { used as field type when a record declaration contains a WindowPositionMethod field identifier }
1289 const
1290 {
1291    * Centers the window on the main screen.
1292    }
1293 	kWindowCenterOnMainScreen = 1;
1294 
1295   {
1296    * Centers the window on its parent window. The parent window must be
1297    * different from the positioned window.
1298    }
1299 	kWindowCenterOnParentWindow = 2;
1300 
1301   {
1302    * Centers the window on the screen containing the largest portion of
1303    * its parent window. On Mac OS X 10.3 and later, the parent window
1304    * may be the same as the positioned window. On CarbonLib and earlier
1305    * versions of Mac OS X, the parent window must be different from the
1306    * positioned window.
1307    }
1308 	kWindowCenterOnParentWindowScreen = 3;
1309 
1310   {
1311    * Cascades the window on the main screen.
1312    }
1313 	kWindowCascadeOnMainScreen = 4;
1314 
1315   {
1316    * Cascades the window on its parent window. The parent window must
1317    * be different from the positioned window.
1318    }
1319 	kWindowCascadeOnParentWindow = 5;
1320 
1321   {
1322    * Cascades the window on the screen containing the largest portion
1323    * of its parent window. On Mac OS X 10.3 and later, the parent
1324    * window may be the same as the positioned window. On CarbonLib and
1325    * earlier versions of Mac OS X, the parent window must be different
1326    * from the positioned window.
1327    }
1328 	kWindowCascadeOnParentWindowScreen = 6;
1329 
1330   {
1331    * Cascades the window on the screen containing the largest portion
1332    * of its parent window, starting below and to the right of its
1333    * parent window. The parent window must be different from the
1334    * positioned window. Available in Mac OS X 10.2 and CarbonLib 1.6
1335    * and later.
1336    }
1337 	kWindowCascadeStartAtParentWindowScreen = 10;
1338 
1339   {
1340    * Puts the window into the alert position on the main screen.
1341    }
1342 	kWindowAlertPositionOnMainScreen = 7;
1343 
1344   {
1345    * Puts the window into the alert position on its parent window. The
1346    * parent window must be different from the positioned window.
1347    }
1348 	kWindowAlertPositionOnParentWindow = 8;
1349 
1350   {
1351    * Puts the window into the alert position on the screen containing
1352    * the largest portion of its parent window. On Mac OS X 10.3 and
1353    * later, the parent window may be the same as the positioned window.
1354    * On CarbonLib and earlier versions of Mac OS X, the parent window
1355    * must be different from the positioned window.
1356    }
1357 	kWindowAlertPositionOnParentWindowScreen = 9;
1358 
1359 
1360 {��������������������������������������������������������������������������������������}
1361 { � GetWindowRegion Types                                                              }
1362 {��������������������������������������������������������������������������������������}
1363 type
1364 	WindowRegionCode = UInt16;
1365 const
1366 { Region values to pass into GetWindowRegion & GetWindowBounds. All regions are reported in global coordinates. }
1367 	kWindowTitleBarRgn = 0;
1368 	kWindowTitleTextRgn = 1;
1369 	kWindowCloseBoxRgn = 2;
1370 	kWindowZoomBoxRgn = 3;
1371 	kWindowDragRgn = 5;
1372 	kWindowGrowRgn = 6;
1373 	kWindowCollapseBoxRgn = 7;
1374 	kWindowTitleProxyIconRgn = 8;    { Mac OS 8.5 forward}
1375 	kWindowStructureRgn = 32;
1376 	kWindowContentRgn = 33;   { Content area of the window; empty when the window is collapsed}
1377 	kWindowUpdateRgn = 34;   { Carbon forward}
1378 	kWindowOpaqueRgn = 35;   { Mac OS X: Area of window considered to be opaque. Only valid for windows with alpha channels.}
1379 	kWindowGlobalPortRgn = 40;   { Carbon forward - bounds of the window�s port in global coordinates; not affected by CollapseWindow}
1380 	kWindowToolbarButtonRgn = 41;    { Mac OS X Tiger: the toolbar button area}
1381 
1382 
1383 {��������������������������������������������������������������������������������������}
1384 { � Standard Window Kinds                                                              }
1385 {��������������������������������������������������������������������������������������}
1386 const
1387 	dialogKind = 2;
1388 	userKind = 8;
1389 	kDialogWindowKind = 2;
1390 	kApplicationWindowKind = 8;
1391 
1392 
1393 {��������������������������������������������������������������������������������������}
1394 { � FindWindow Result Codes                                                            }
1395 {��������������������������������������������������������������������������������������}
1396 type
1397 	WindowPartCode = SInt16;
1398 	WindowPartCodePtr = ^WindowPartCode; { when a VAR xx: WindowPartCode parameter can be nil, it is changed to xx: WindowPartCodePtr }
1399 const
1400 	inDesk = 0;
1401 	inNoWindow = 0;
1402 	inMenuBar = 1;
1403 	inSysWindow = 2;
1404 	inContent = 3;
1405 	inDrag = 4;
1406 	inGrow = 5;
1407 	inGoAway = 6;
1408 	inZoomIn = 7;
1409 	inZoomOut = 8;
1410 	inCollapseBox = 11;   { Mac OS 8.0 forward}
1411 	inProxyIcon = 12;   { Mac OS 8.5 forward}
1412 	inToolbarButton = 13;   { Mac OS X forward}
1413 	inStructure = 15;    { Mac OS X 10.1 forward}
1414 
1415 {��������������������������������������������������������������������������������������}
1416 { � Window Definition Hit Test Result Codes                                            }
1417 {��������������������������������������������������������������������������������������}
1418 type
1419 	WindowDefPartCode = SInt16;
1420 const
1421 	wNoHit = 0;
1422 	wInContent = 1;
1423 	wInDrag = 2;
1424 	wInGrow = 3;
1425 	wInGoAway = 4;
1426 	wInZoomIn = 5;
1427 	wInZoomOut = 6;
1428 	wInCollapseBox = 9;    { Mac OS 8.0 forward}
1429 	wInProxyIcon = 10;   { Mac OS 8.5 forward}
1430 	wInToolbarButton = 11;   { Mac OS X forward}
1431 	wInStructure = 13;    { Mac OS X 10.1 forward}
1432 
1433 {��������������������������������������������������������������������������������������}
1434 { � Window Feature Bits                                                                }
1435 {��������������������������������������������������������������������������������������}
1436 
1437 {
1438  *  Summary:
1439  *    Window feature bits
1440  *
1441  *  Discussion:
1442  *    These feature bits are supplied by window definition functions in
1443  *    response to the kWindowMsgGetFeatures message or the
1444  *    kEventWindowInit Carbon event. A window's feature bits can also
1445  *    be modified dynamically using the HIWindowChangeFeatures API;
1446  *    typically, feature bits are only modified by a window definition
1447  *    or window frame view.
1448  }
1449 const
1450 {
1451    * Indicates whether the window is resizable. Available on Mac OS 8.0
1452    * and later. Not supported on Mac OS X; replaced by
1453    * kWindowResizableAttribute.
1454    }
1455 	kWindowCanGrow = 1 shl 0;
1456 
1457   {
1458    * Indicates whether the window can zoom. Available on Mac OS 8.0 and
1459    * later. Not supported on Mac OS X; replaced by
1460    * kWindowHorizontal/Vertical/FullZoomAttribute.
1461    }
1462 	kWindowCanZoom = 1 shl 1;
1463 
1464   {
1465    * Indicates whether the window can be minimized. Available on Mac OS
1466    * 8.0 and later. Not supported on Mac OS X; replaced by
1467    * kWindowCollapseBoxAttribute.
1468    }
1469 	kWindowCanCollapse = 1 shl 2;
1470 
1471   {
1472    * Indicates whether the window is application-modal. Available on
1473    * Mac OS 8.0 and later.
1474    }
1475 	kWindowIsModal = 1 shl 3;
1476 
1477   {
1478    * Indicates that the window definition supports the
1479    * kWindowMsgGetRegion message. Available on Mac OS 8.0 and later.
1480    * Not supported on Mac OS X. All window definitions that implement
1481    * the kWindowMsgGetFeatures message automatically get this feature
1482    * bit on Mac OS X.
1483    }
1484 	kWindowCanGetWindowRegion = 1 shl 4;
1485 
1486   {
1487    * Indicates whether the window is an alert. Available on Mac OS 8.0
1488    * and later.
1489    }
1490 	kWindowIsAlert = 1 shl 5;
1491 
1492   {
1493    * Indicates whether the window has a title bar. Available on Mac OS
1494    * 8.0 and later. This feature is required for async dragging to be
1495    * enabled for a window.
1496    }
1497 	kWindowHasTitleBar = 1 shl 6;
1498 
1499   {
1500    * Indicates that the window definition supports the
1501    * kWindowMsgDragHilite message. Available on Mac OS 8.5 and later.
1502    }
1503 	kWindowSupportsDragHilite = 1 shl 7;
1504 
1505   {
1506    * Indicates that the window definition supports the
1507    * kWindowMsgModified message. Available on Mac OS 8.5 and later.
1508    }
1509 	kWindowSupportsModifiedBit = 1 shl 8;
1510 
1511   {
1512    * Indicates that the window definition supports the
1513    * kWindowMsgDrawInCurrentPort message. Available on Mac OS 8.5 and
1514    * later. Not supported on Mac OS X.
1515    }
1516 	kWindowCanDrawInCurrentPort = 1 shl 9;
1517 
1518   {
1519    * Indicates that the window definition supports the
1520    * kWindowMsgSetupProxyDragImage message. Available on Mac OS 8.5 and
1521    * later.
1522    }
1523 	kWindowCanSetupProxyDragImage = 1 shl 10;
1524 
1525   {
1526    * Indicates that the window definition supports the
1527    * kWindowMsgMeasureTitle message. Available on Mac OS 8.5 and later.
1528    }
1529 	kWindowCanMeasureTitle = 1 shl 11;
1530 
1531   {
1532    * Indicates that the window definition wants to receive a
1533    * kWindowMsgCleanUp message for each existing window when a process
1534    * is terminated. Available on Mac OS 8.5 and later. Not supported on
1535    * Mac OS X.
1536    }
1537 	kWindowWantsDisposeAtProcessDeath = 1 shl 12;
1538 
1539   {
1540    * Indicates that the window definition supports the
1541    * kWindowMsgGetGrowImageRegion message. Available on Mac OS X 10.0
1542    * and later.
1543    }
1544 	kWindowSupportsGetGrowImageRegion = 1 shl 13;
1545 
1546   {
1547    * Indicates that the window is entirely opaque. If this feature bit
1548    * is set, the window will use less memory because no alpha channel
1549    * information will be stored for the window's pixels. If this
1550    * feature bit is not set, the Window Manager will send a
1551    * kEventWindowGetRegion Carbon event to the window with the
1552    * kWindowOpaqueRgn constant to get a region that describes the
1553    * opaque area of the window. Available on Mac OS X 10.1 and later.
1554    }
1555 	kWindowIsOpaque = 1 shl 14;
1556 
1557   {
1558    * Indicates that the window definition does not require that the
1559    * current port be the classic Window Manager port. Not supported on
1560    * Mac OS X.
1561    }
1562 	kWindowDefSupportsColorGrafPort = $40000002;
1563 
1564 {��������������������������������������������������������������������������������������}
1565 {  � Region Dragging Constants                                                         }
1566 {��������������������������������������������������������������������������������������}
1567 const
1568 	kMouseUpOutOfSlop = $80008000;
1569 
1570 
1571 {��������������������������������������������������������������������������������������}
1572 { � Window Class Ordering                                                              }
1573 {  Special cases for the �behind� parameter in window creation calls.                  }
1574 {��������������������������������������������������������������������������������������}
1575 	kFirstWindowOfClass = WindowRef(-1);
1576 	kLastWindowOfClass = WindowRef(0);
1577 
1578 {��������������������������������������������������������������������������������������}
1579 { � Zoom Information Handle                                                            }
1580 {��������������������������������������������������������������������������������������}
1581 type
1582 	WStateData = record
1583 		userState: Rect;              {user zoom state}
1584 		stdState: Rect;               {standard zoom state}
1585 	end;
1586 	WStateDataPtr = ^WStateData;
1587 type
1588 	WStateDataHandle = ^WStateDataPtr;
1589 {��������������������������������������������������������������������������������������}
1590 { � Window definition function                                                         }
1591 {��������������������������������������������������������������������������������������}
1592 {$ifc TARGET_CPU_64}
1593 type
1594   WindowDefProcPtr = UnivPtr;
1595 	WindowDefUPP = WindowDefProcPtr;
1596 {$elsec}
1597 
1598 {
1599  *  WindowDefProcPtr
1600  *
1601  *  Summary:
1602  *    Callback function for a custom window definition.
1603  }
1604 type
varCodenull1605 	WindowDefProcPtr = function( varCode: SInt16; window: WindowRef; message: SInt16; param: SIGNEDLONG ): SIGNEDLONG;
1606 	WindowDefUPP = WindowDefProcPtr;
1607 {
1608  *  NewWindowDefUPP()
1609  *
1610  *  Availability:
1611  *    Mac OS X:         in version 10.0 and later in Carbon.framework
1612  *    CarbonLib:        in CarbonLib 1.0 and later
1613  *    Non-Carbon CFM:   available as macro/inline
1614  }
NewWindowDefUPPnull1615 function NewWindowDefUPP( userRoutine: WindowDefProcPtr ): WindowDefUPP; external name '_NewWindowDefUPP';
1616 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1617 
1618 {
1619  *  DisposeWindowDefUPP()
1620  *
1621  *  Availability:
1622  *    Mac OS X:         in version 10.0 and later in Carbon.framework
1623  *    CarbonLib:        in CarbonLib 1.0 and later
1624  *    Non-Carbon CFM:   available as macro/inline
1625  }
1626 procedure DisposeWindowDefUPP( userUPP: WindowDefUPP ); external name '_DisposeWindowDefUPP';
1627 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1628 
1629 {
1630  *  InvokeWindowDefUPP()
1631  *
1632  *  Availability:
1633  *    Mac OS X:         in version 10.0 and later in Carbon.framework
1634  *    CarbonLib:        in CarbonLib 1.0 and later
1635  *    Non-Carbon CFM:   available as macro/inline
1636  }
InvokeWindowDefUPPnull1637 function InvokeWindowDefUPP( varCode: SInt16; window: WindowRef; message: SInt16; param: SIGNEDLONG; userUPP: WindowDefUPP ): SIGNEDLONG; external name '_InvokeWindowDefUPP';
1638 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1639 
1640 {$endc} {TARGET_CPU_64}
1641 
1642 {��������������������������������������������������������������������������������������}
1643 { � Window Definition Spec.  Used in Carbon to specify the code that defines a window. }
1644 {��������������������������������������������������������������������������������������}
1645 const
1646 	kWindowDefProcPtr = 0;    { raw proc-ptr based access}
1647 	kWindowDefObjectClass = 1;    { event-based definition using a ToolboxObjectClassRef (Carbon 1.1 or later)}
1648 	kWindowDefProcID = 2;    { explicit proc ID; overrides the window class default proc ID}
1649 	kWindowDefHIView = 3;     { this window uses an HIView as its frame, not a WDEF}
1650 
1651 type
1652 	WindowDefType = UInt32;
1653 	WindowDefSpec = record
1654 		defType: WindowDefType;
1655 		case SInt16 of
1656 		0: (
1657 			defProc: WindowDefUPP;
1658 			);
1659 		1: (
1660 			classRef: UnivPtr;             { ToolboxObjectClassRef}
1661 			);
1662 		2: (
1663 			procID: SInt16;
1664 			);
1665 		3: (
1666 			rootView: UnivPtr;             { HIViewRef}
1667 			);
1668 	end;
1669 	WindowDefSpecPtr = ^WindowDefSpec;
1670 {��������������������������������������������������������������������������������������}
1671 { � Window Creation & Persistence                                                      }
1672 {��������������������������������������������������������������������������������������}
1673 {
1674     About Window Manager Coordinate Spaces
1675 
1676     All Window Manager API that takes a size, position, or rectangle for input, and does not take an
1677     HICoordinateSpace parameter, expects that its input parameters are given in the 72DPIGlobal coordinate
1678     space. Likewise, any API that returns a rect or region and that does not take an HICoordinateSpace
1679     parameter will provide its output in the 72DPIGlobal coordinate space.
1680 
1681     We expect that most developers will want to work primarily in the 72DPIGlobal space. Doing so makes
1682     your code independent of the current user interface scale factor, and eases source compatibility with
1683     earlier versions of Mac OS X that do not support resolution independence. However, there are also certain
1684     cases where your application must express your window's bounds in pixel coordinates; primarily when you
1685     need to position your windows so they exactly align with each other or with some other fixed location,
1686     such as the edge of the display. For these cases, you should use the ScreenPixel coordinate space.
1687 
1688     Note that non-integral pixel coordinates are not available in Mac OS X. If you specify non-integral
1689     coordinates (in either 72DPIGlobal or ScreenPixel coordinate spaces), they will be rounded to the nearest
1690     integral value in ScreenPixel space when the window is actually positioned or sized.
1691 }
1692 {$ifc not TARGET_CPU_64}
1693 {
1694  *  HIWindowCreate()
1695  *
1696  *  Summary:
1697  *    Creates a new window.
1698  *
1699  *  Mac OS X threading:
1700  *    Not thread safe
1701  *
1702  *  Parameters:
1703  *
1704  *    inClass:
1705  *      The window class.
1706  *
1707  *    inAttributes:
1708  *      A zero-terminated array of attribute bit constants, such as
1709  *      kHIWindowBitCloseBox. Each array entry specifies an attribute
1710  *      of the window to set. You may pass NULL if you do not wish to
1711  *      set any attributes.
1712  *
1713  *    inDefSpec:
1714  *      Contains a custom window proc ID or root view for the window.
1715  *      May be NULL if you don't need to customize the window.
1716  *
1717  *    inSpace:
1718  *      The coordinate space of the inBounds parameter. This parameter
1719  *      must be either kHICoordSpaceScreenPixels or
1720  *      kHICoordSpace72DPIGlobal.
1721  *
1722  *    inBounds:
1723  *      The window content bounds, in the coordinate space specified by
1724  *      the inSpace parameter. ����consider changing this to structure
1725  *      bounds?
1726  *
1727  *    outWindow:
1728  *      On exit, contains the new window.
1729  *
1730  *  Result:
1731  *    An operating system result code.
1732  *
1733  *  Availability:
1734  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
1735  *    CarbonLib:        not available
1736  *    Non-Carbon CFM:   not available
1737  }
HIWindowCreatenull1738 function HIWindowCreate( inClass: WindowClass; {const} inAttributes: SInt32Ptr { can be NULL }; {const} inDefSpec: WindowDefSpecPtr { can be NULL }; inSpace: HICoordinateSpace; const (*var*) inBounds: HIRect; var outWindow: WindowRef ): OSStatus; external name '_HIWindowCreate';
1739 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1740 
1741 
1742 {
1743    Routines available from Mac OS 8.5 forward
1744    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
1745 }
1746 
1747 {
1748  *  CreateNewWindow()
1749  *
1750  *  Mac OS X threading:
1751  *    Not thread safe
1752  *
1753  *  Availability:
1754  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1755  *    CarbonLib:        in CarbonLib 1.0 and later
1756  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
1757  }
CreateNewWindownull1758 function CreateNewWindow( windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateNewWindow';
1759 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1760 
1761 
1762 {
1763  *  DisposeWindow()
1764  *
1765  *  Mac OS X threading:
1766  *    Not thread safe
1767  *
1768  *  Availability:
1769  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1770  *    CarbonLib:        in CarbonLib 1.0 and later
1771  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
1772  }
1773 procedure DisposeWindow( window: WindowRef ); external name '_DisposeWindow';
1774 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1775 
1776 
1777 {��������������������������������������������������������������������������������������}
1778 { � Custom Windows                                                                     }
1779 {��������������������������������������������������������������������������������������}
1780 { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
1781 
1782 {
1783  *  CreateCustomWindow()
1784  *
1785  *  Mac OS X threading:
1786  *    Not thread safe
1787  *
1788  *  Availability:
1789  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1790  *    CarbonLib:        in CarbonLib 1.0 and later
1791  *    Non-Carbon CFM:   not available
1792  }
CreateCustomWindownull1793 function CreateCustomWindow( const (*var*) def: WindowDefSpec; windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateCustomWindow';
1794 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1795 
1796 
1797 {
1798  *  ReshapeCustomWindow()
1799  *
1800  *  Mac OS X threading:
1801  *    Not thread safe
1802  *
1803  *  Availability:
1804  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1805  *    CarbonLib:        in CarbonLib 1.0 and later
1806  *    Non-Carbon CFM:   not available
1807  }
ReshapeCustomWindownull1808 function ReshapeCustomWindow( window: WindowRef ): OSStatus; external name '_ReshapeCustomWindow';
1809 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1810 
1811 
1812 {
1813  *  RegisterWindowDefinition()
1814  *
1815  *  Summary:
1816  *    Registers or unregisters a binding between a resource ID and a
1817  *    window definition function.
1818  *
1819  *  Discussion:
1820  *    In the Mac OS 8.x Window Manager, a 'WIND' resource can contain
1821  *    an embedded WDEF procID that is used by the Window Manager as the
1822  *    resource ID of an 'WDEF' resource to lay out and draw the window.
1823  *    The 'WDEF' resource is loaded by the Window Manager when you load
1824  *    the menu with GetNewWindow. Since WDEFs can no longer be packaged
1825  *    as code resources on Carbon, the procID can no longer refer
1826  *    directly to a WDEF resource. However, using
1827  *    RegisterWindowDefinition you can instead specify a
1828  *    UniversalProcPtr pointing to code in your application code
1829  *    fragment.
1830  *
1831  *    RegisterWindowDefinition is available when linking to CarbonLib
1832  *    1.1 forward.
1833  *
1834  *    RegisterWindowDefinition is not available in 64-bit mode because
1835  *    WDEFs and ToolboxObjects are not supported in 64-bit mode.
1836  *
1837  *  Mac OS X threading:
1838  *    Not thread safe
1839  *
1840  *  Parameters:
1841  *
1842  *    inResID:
1843  *      A WDEF proc ID, as used in a 'WIND' resource.
1844  *
1845  *    inDefSpec:
1846  *      Specifies the WindowDefUPP or ToolboxObjectClassRef that should
1847  *      be used for windows with the given WDEF proc ID. Passing NULL
1848  *      allows you to unregister the window definition that had been
1849  *      associated with the given WDEF proc ID.
1850  *
1851  *  Availability:
1852  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1853  *    CarbonLib:        in CarbonLib 1.1 and later
1854  *    Non-Carbon CFM:   not available
1855  }
RegisterWindowDefinitionnull1856 function RegisterWindowDefinition( inResID: SInt16; const (*var*) inDefSpec: WindowDefSpec ): OSStatus; external name '_RegisterWindowDefinition';
1857 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1858 
1859 
1860 {��������������������������������������������������������������������������������������}
1861 { � Window part tracking                                                               }
1862 {��������������������������������������������������������������������������������������}
1863 {
1864  *  GetWindowWidgetHilite()
1865  *
1866  *  Mac OS X threading:
1867  *    Not thread safe
1868  *
1869  *  Availability:
1870  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
1871  *    CarbonLib:        in CarbonLib 1.0 and later
1872  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
1873  }
GetWindowWidgetHilitenull1874 function GetWindowWidgetHilite( inWindow: WindowRef; var outHilite: WindowDefPartCode ): OSStatus; external name '_GetWindowWidgetHilite';
1875 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1876 
1877 
1878 {��������������������������������������������������������������������������������������}
1879 { � Window Metainformation Accessors                                                   }
1880 {��������������������������������������������������������������������������������������}
1881 {
1882  *  IsValidWindowClass()
1883  *
1884  *  Summary:
1885  *    Indicates whether a window class is supported by the Window
1886  *    Manager.
1887  *
1888  *  Mac OS X threading:
1889  *    Not thread safe
1890  *
1891  *  Parameters:
1892  *
1893  *    inClass:
1894  *      The window class.
1895  *
1896  *  Availability:
1897  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only]
1898  *    CarbonLib:        in CarbonLib 1.5 and later
1899  *    Non-Carbon CFM:   not available
1900  }
IsValidWindowClassnull1901 function IsValidWindowClass( inClass: WindowClass ): Boolean; external name '_IsValidWindowClass';
1902 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
1903 
1904 
1905 {
1906  *  HIWindowTestAttribute()
1907  *
1908  *  Summary:
1909  *    Determines whether a window possesses a specified attribute.
1910  *
1911  *  Discussion:
1912  *    HIWindowTestAttribute takes an attribute bit constant, such as
1913  *    kHIWindowBitCloseBox. You must not use the older attribute
1914  *    bitmask constants, such as kWindowCloseBoxAttribute, with this
1915  *    API.
1916  *
1917  *  Mac OS X threading:
1918  *    Not thread safe
1919  *
1920  *  Parameters:
1921  *
1922  *    inWindow:
1923  *      The window whose attributes to test.
1924  *
1925  *    inAttr:
1926  *      The attribute bit constant to test.
1927  *
1928  *  Result:
1929  *    True if the window possesses the specified attribute, or false if
1930  *    not.
1931  *
1932  *  Availability:
1933  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
1934  *    CarbonLib:        not available
1935  *    Non-Carbon CFM:   not available
1936  }
HIWindowTestAttributenull1937 function HIWindowTestAttribute( inWindow: WindowRef; inAttr: SInt32 ): Boolean; external name '_HIWindowTestAttribute';
1938 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1939 
1940 
1941 {
1942  *  HIWindowChangeAttributes()
1943  *
1944  *  Summary:
1945  *    Changes the attributes of a window.
1946  *
1947  *  Discussion:
1948  *    HIWindowChangeAttributes takes two arrays of attribute bit
1949  *    constants, such as kHIWindowBitCloseBox. You must not use the
1950  *    older attribute bitmask constants, such as
1951  *    kWindowCloseBoxAttribute, with this API. The first array
1952  *    specifies the attributes to set, and the second specifies the
1953  *    attributes to clear. For example, you might call this API as
1954  *    follows:
1955  *
1956  *    int setAttr[] = ( kHIWindowBitCloseBox, kHIWindowBitZoomBox, 0
1957  *    );
1958  *    int clearAttr[] = ( kHIWindowBitNoTitleBar, 0 );
1959  *     HIWindowChangeAttributes( window, setAttr, clearAttr );
1960  *
1961  *  Mac OS X threading:
1962  *    Not thread safe
1963  *
1964  *  Parameters:
1965  *
1966  *    inWindow:
1967  *      The window whose attributes to change.
1968  *
1969  *    inAttrToSet:
1970  *      A zero-terminated array of attribute bit constants, such as
1971  *      kHIWindowBitCloseBox. Each array entry specifies an attribute
1972  *      of the window to set. You may pass NULL if you do not wish to
1973  *      set any attributes.
1974  *
1975  *    inAttrToClear:
1976  *      A zero-terminated array of attribute bit constants, such as
1977  *      kHIWindowBitCloseBox. Each array entry specifies an attribute
1978  *      of the window to clear. You may pass NULL if you do not wish to
1979  *      clear any attributes.
1980  *
1981  *  Result:
1982  *    An operating system result code.
1983  *
1984  *  Availability:
1985  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
1986  *    CarbonLib:        not available
1987  *    Non-Carbon CFM:   not available
1988  }
HIWindowChangeAttributesnull1989 function HIWindowChangeAttributes( inWindow: WindowRef; {const} inAttrToSet: SInt32Ptr { can be NULL }; {const} inAttrToClear: SInt32Ptr { can be NULL } ): OSStatus; external name '_HIWindowChangeAttributes';
1990 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
1991 
1992 
1993 {
1994  *  HIWindowIsAttributeAvailable()
1995  *
1996  *  Summary:
1997  *    Determines if a window attribute is valid for a specified window
1998  *    class.
1999  *
2000  *  Discussion:
2001  *    This API is useful because some window classes support different
2002  *    attributes on different platforms (for example, floating windows
2003  *    can have collapse boxes on 9, but not on X), and the Window
2004  *    Manager will return an error if you attempt to create a window
2005  *    with attributes that aren't supported for the requested window
2006  *    class. You can use this API to remove attributes that are not
2007  *    supported by the current platform before calling CreateNewWindow.
2008  *
2009  *  Mac OS X threading:
2010  *    Not thread safe
2011  *
2012  *  Parameters:
2013  *
2014  *    inClass:
2015  *      The window class.
2016  *
2017  *    inAttr:
2018  *      The window attribute bit. You must use an attribute bit
2019  *      constant, such as kHIWindowBitCloseBox. You must not use the
2020  *      older attribute bitmask constants, such as
2021  *      kWindowCloseBoxAttribute.
2022  *
2023  *  Result:
2024  *    True if the attribute is available for windows of the specifed
2025  *    class, or false if not.
2026  *
2027  *  Availability:
2028  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2029  *    CarbonLib:        not available
2030  *    Non-Carbon CFM:   not available
2031  }
HIWindowIsAttributeAvailablenull2032 function HIWindowIsAttributeAvailable( inClass: WindowClass; inAttr: SInt32 ): Boolean; external name '_HIWindowIsAttributeAvailable';
2033 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2034 
2035 
2036 {
2037  *  GetAvailableWindowAttributes()
2038  *
2039  *  Summary:
2040  *    Returns the window attributes that are valid for a window class.
2041  *
2042  *  Discussion:
2043  *    This API is useful because some window classes support different
2044  *    attributes on different platforms (for example, floating windows
2045  *    can have collapse boxes on 9, but not on X), and the Window
2046  *    Manager will return an error if you attempt to create a window
2047  *    with attributes that aren't supported for the requested window
2048  *    class. You can use this API to remove attributes that are not
2049  *    supported by the current platform before calling CreateNewWindow.
2050  *
2051  *
2052  *    In Mac OS X 10.5 and later, windows may have more than 32 bits of
2053  *    attributes. GetAvailableWindowAttributes can only return the low
2054  *    32 bits of window attributes; therefore, we recommend that you
2055  *    use HIWindowIsAttributeAvailable instead of
2056  *    GetAvailableWindowAttributes.
2057  *
2058  *  Mac OS X threading:
2059  *    Not thread safe
2060  *
2061  *  Parameters:
2062  *
2063  *    inClass:
2064  *      The window class.
2065  *
2066  *  Result:
2067  *    The window attributes that are supported for the specified window
2068  *    class.
2069  *
2070  *  Availability:
2071  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only]
2072  *    CarbonLib:        in CarbonLib 1.5 and later
2073  *    Non-Carbon CFM:   not available
2074  }
GetAvailableWindowAttributesnull2075 function GetAvailableWindowAttributes( inClass: WindowClass ): WindowAttributes; external name '_GetAvailableWindowAttributes';
2076 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
2077 
2078 
2079 {
2080  *  GetWindowClass()
2081  *
2082  *  Summary:
2083  *    Returns the class of a window.
2084  *
2085  *  Mac OS X threading:
2086  *    Not thread safe
2087  *
2088  *  Parameters:
2089  *
2090  *    window:
2091  *      The window whose class to retrieve.
2092  *
2093  *    outClass:
2094  *      On exit, contains the window's class.
2095  *
2096  *  Availability:
2097  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2098  *    CarbonLib:        in CarbonLib 1.0 and later
2099  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
2100  }
GetWindowClassnull2101 function GetWindowClass( window: WindowRef; var outClass: WindowClass ): OSStatus; external name '_GetWindowClass';
2102 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2103 
2104 
2105 {
2106  *  GetWindowAttributes()
2107  *
2108  *  Summary:
2109  *    Returns the attributes of a window.
2110  *
2111  *  Discussion:
2112  *    In Mac OS X 10.5 and later, windows may have more than 32 bits of
2113  *    attributes. GetWindowAttributes can only return the low 32 bits
2114  *    of window attributes; therefore, we recommend that you use
2115  *    HIWindowTestAttribute instead of GetWindowAttributes.
2116  *
2117  *  Mac OS X threading:
2118  *    Not thread safe
2119  *
2120  *  Parameters:
2121  *
2122  *    window:
2123  *      The window whose attributes to retrieve.
2124  *
2125  *    outAttributes:
2126  *      On exit, contains the window's attributes.
2127  *
2128  *  Availability:
2129  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2130  *    CarbonLib:        in CarbonLib 1.0 and later
2131  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
2132  }
GetWindowAttributesnull2133 function GetWindowAttributes( window: WindowRef; var outAttributes: WindowAttributes ): OSStatus; external name '_GetWindowAttributes';
2134 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2135 
2136 
2137 {
2138  *  ChangeWindowAttributes()
2139  *
2140  *  Summary:
2141  *    Sets and clears window attributes.
2142  *
2143  *  Discussion:
2144  *    In Mac OS X 10.5 and later, windows may have more than 32 bits of
2145  *    attributes. ChangeWindowAttributes can only set or clear the low
2146  *    32 bits of window attributes; therefore, we recommend that you
2147  *    use HIWindowChangeAttributes instead of ChangeWindowAttributes.
2148  *
2149  *  Mac OS X threading:
2150  *    Not thread safe
2151  *
2152  *  Parameters:
2153  *
2154  *    window:
2155  *      The window whose attributes to modify.
2156  *
2157  *    setTheseAttributes:
2158  *      The attributes to set.
2159  *
2160  *    clearTheseAttributes:
2161  *      The attributes to clear.
2162  *
2163  *  Availability:
2164  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2165  *    CarbonLib:        in CarbonLib 1.0 and later
2166  *    Non-Carbon CFM:   not available
2167  }
ChangeWindowAttributesnull2168 function ChangeWindowAttributes( window: WindowRef; setTheseAttributes: WindowAttributes; clearTheseAttributes: WindowAttributes ): OSStatus; external name '_ChangeWindowAttributes';
2169 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2170 
2171 
2172 {
2173  *  HIWindowChangeClass()
2174  *
2175  *  Summary:
2176  *    Changes the window look and feel of an existing window on the fly.
2177  *
2178  *  Discussion:
2179  *    HIWindowChangeClass changes the class of a window. Unlike
2180  *    SetWindowClass, this call effectively changes the look and
2181  *    behavior of the window all at once. Because SetWindowClass
2182  *    already existed and had certain behaviour, we could not change it
2183  *    to behave the way HIWindowChangeClass does.
2184  *
2185  *    This function can convert a window between kDocumentWindowClass,
2186  *    kFloatingWindowClass, kUtilityWindowClass, and
2187  *    kMovableModalWindowClass only. It cannot change a document window
2188  *    into a plain window, for example.
2189  *
2190  *    The attributes of the window are adjusted to contain only those
2191  *    that are allowed for the new class. It is the caller�s
2192  *    responsibility to adjust them further after HIWindowChangeClass
2193  *    returns, if necessary.
2194  *
2195  *  Mac OS X threading:
2196  *    Not thread safe
2197  *
2198  *  Parameters:
2199  *
2200  *    inWindow:
2201  *      The window whose class to change.
2202  *
2203  *    inWindowClass:
2204  *      The new window class.
2205  *
2206  *  Availability:
2207  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2208  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2209  *    Non-Carbon CFM:   not available
2210  }
HIWindowChangeClassnull2211 function HIWindowChangeClass( inWindow: WindowRef; inWindowClass: WindowClass ): OSStatus; external name '_HIWindowChangeClass';
2212 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2213 
2214 
2215 {$endc} {not TARGET_CPU_64}
2216 
2217 {$ifc not TARGET_CPU_64}
2218 {
2219  *  HIWindowGetCGWindowID()
2220  *
2221  *  Summary:
2222  *    Returns the CoreGraphics window ID assigned by the window server
2223  *    when a window was created.
2224  *
2225  *  Discussion:
2226  *    The window ID is not generally useful with other Carbon API, but
2227  *    may be usable with other Mac OS X APIs that require window IDs,
2228  *    such as OpenGL. You may convert a window ID back to a WindowRef
2229  *    using the HIWindowFromCGWindowID API.
2230  *
2231  *  Mac OS X threading:
2232  *    Not thread safe
2233  *
2234  *  Parameters:
2235  *
2236  *    inWindow:
2237  *      The window whose window ID to return.
2238  *
2239  *  Result:
2240  *    The window's window ID, or zero if the window is invalid.
2241  *
2242  *  Availability:
2243  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2244  *    CarbonLib:        not available
2245  *    Non-Carbon CFM:   not available
2246  }
HIWindowGetCGWindowIDnull2247 function HIWindowGetCGWindowID( inWindow: WindowRef ): CGWindowID; external name '_HIWindowGetCGWindowID';
2248 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2249 
2250 
2251 {
2252  *  HIWindowFromCGWindowID()
2253  *
2254  *  Summary:
2255  *    Returns the window in the current process with a specified
2256  *    CGWindowID, if any.
2257  *
2258  *  Mac OS X threading:
2259  *    Not thread safe
2260  *
2261  *  Parameters:
2262  *
2263  *    inWindowID:
2264  *      A CoreGraphics window ID, as returned by HIWindowGetCGWindowID
2265  *      or CGWindowListCopyWindowInfo.
2266  *
2267  *  Result:
2268  *    The WindowRef with the specified window ID, or NULL if no such
2269  *    window is found. A valid window ID for a window in another
2270  *    process will cause a NULL return value, since WindowRefs cannot
2271  *    be used across processes.
2272  *
2273  *  Availability:
2274  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2275  *    CarbonLib:        not available
2276  *    Non-Carbon CFM:   not available
2277  }
HIWindowFromCGWindowIDnull2278 function HIWindowFromCGWindowID( inWindowID: CGWindowID ): WindowRef; external name '_HIWindowFromCGWindowID';
2279 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2280 
2281 
2282 {��������������������������������������������������������������������������������������}
2283 {  � Window Flushing                                                                   }
2284 {��������������������������������������������������������������������������������������}
2285 {
2286  *  HIWindowFlush()
2287  *
2288  *  Summary:
2289  *    Flushes any dirty areas a window might have.
2290  *
2291  *  Discussion:
2292  *    This routine allows you to manually flush dirty areas of a window
2293  *    to the screen. If called on a composited window, it will also
2294  *    cause invalid views in the window to be rendered. This API is
2295  *    preferred over calling QDFlushPortBuffer.
2296  *
2297  *  Mac OS X threading:
2298  *    Not thread safe
2299  *
2300  *  Parameters:
2301  *
2302  *    inWindow:
2303  *      The window to flush.
2304  *
2305  *  Availability:
2306  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2307  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2308  *    Non-Carbon CFM:   not available
2309  }
HIWindowFlushnull2310 function HIWindowFlush( inWindow: WindowRef ): OSStatus; external name '_HIWindowFlush';
2311 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2312 
2313 
2314 {��������������������������������������������������������������������������������������}
2315 {  � Window Backing Store Location                                                     }
2316 {��������������������������������������������������������������������������������������}
2317 {$endc} {not TARGET_CPU_64}
2318 
2319 
2320 {
2321  *  Summary:
2322  *    Window backing buffer location constants are used with the
2323  *    HIWindowGet/SetBackingLocation APIs.
2324  }
2325 const
2326 {
2327    * The window server determines where to locate the window's backing
2328    * buffer.
2329    }
2330 	kHIWindowBackingLocationDefault = 0;
2331 
2332   {
2333    * The window's backing buffer is stored in video memory. In this
2334    * case, only Quartz may be used to draw into the window. Use of
2335    * QuickDraw or direct access will force the window's buffer back
2336    * into main memory.
2337    }
2338 	kHIWindowBackingLocationVideoMemory = 1;
2339 
2340   {
2341    * The window's backing buffer is stored in main memory. In this
2342    * case, Quartz, QuickDraw, and direct access are all allowed for
2343    * drawing into the window.
2344    }
2345 	kHIWindowBackingLocationMainMemory = 2;
2346 
2347 type
2348 	HIWindowBackingLocation = UInt32;
2349 	HIWindowBackingLocationPtr = ^HIWindowBackingLocation;
2350 {$ifc not TARGET_CPU_64}
2351 {
2352  *  HIWindowSetBackingLocation()
2353  *
2354  *  Summary:
2355  *    Sets the preferred location for a window's backing buffer.
2356  *
2357  *  Discussion:
2358  *    In Mac OS X 10.5, the Quartz drawing API supports
2359  *    hardware-accelerated drawing to a window. In order to enable
2360  *    hardware acceleration, a window's buffer must be stored in video
2361  *    memory, rather than in main memory. By default, the location of a
2362  *    window's buffer is managed automatically by the Window Server.
2363  *    Your application can use this API to explicitly control a
2364  *    window's buffer location. You might, for example, need to ensure
2365  *    that the buffer is kept in main memory if you are drawing
2366  *    directly into the buffer without using Quartz. You might
2367  *    explicitly force a window's buffer into video memory if, after
2368  *    comparing performance with and without hardware acceleration, you
2369  *    find that acceleration is always a performance advantage for your
2370  *    application.
2371  *
2372  *    You may change the backing buffer location of a window at any
2373  *    time, regardless of whether the window is already visible or has
2374  *    been drawn to. However, changing the buffer location of a visible
2375  *    window requires a potentially significant amount of memory
2376  *    traffic between main and video memory, so it is best to set a
2377  *    window's buffer location once before showing the window, and not
2378  *    change it again.
2379  *
2380  *    The Window Server automatically moves a window's backing buffer
2381  *    into main memory if the buffer is accessed directly. This occurs
2382  *    if you draw into a window using QuickDraw, or if you acquire a
2383  *    pointer to the window buffer using the LockPortBits API. For best
2384  *    performance, if you know that you will be accessing a window's
2385  *    buffer using either QuickDraw or direct access, you should force
2386  *    the window's buffer into main memory before showing the window.
2387  *
2388  *  Mac OS X threading:
2389  *    Not thread safe
2390  *
2391  *  Parameters:
2392  *
2393  *    inWindow:
2394  *      The window whose backing buffer location to set.
2395  *
2396  *    inLocation:
2397  *      The window's new backing buffer location. You may pass
2398  *      kHIWindowBackingLocationDefault to allow the Window Server to
2399  *      determine the buffer location automatically.
2400  *
2401  *  Availability:
2402  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2403  *    CarbonLib:        not available
2404  *    Non-Carbon CFM:   not available
2405  }
HIWindowSetBackingLocationnull2406 function HIWindowSetBackingLocation( inWindow: WindowRef; inLocation: HIWindowBackingLocation ): OSStatus; external name '_HIWindowSetBackingLocation';
2407 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2408 
2409 
2410 {
2411  *  HIWindowGetBackingLocation()
2412  *
2413  *  Summary:
2414  *    Retrieves the preferred location of a window's backing buffer,
2415  *    and its potential location based on hardware and software
2416  *    configuration.
2417  *
2418  *  Mac OS X threading:
2419  *    Not thread safe
2420  *
2421  *  Parameters:
2422  *
2423  *    inWindow:
2424  *      The window whose backing buffer location to retrieve.
2425  *
2426  *    outPreferredLocation:
2427  *      On exit, contains the preferred location for the window's
2428  *      backing buffer. A newly created window's preferred location is
2429  *      kHIWindowBackingLocationDefault. If HIWindowSetBackingLocation
2430  *      has been called on a window, this parameter returns the value
2431  *      that was set. You may pass NULL if you don't need this
2432  *      information.
2433  *
2434  *  Result:
2435  *    The potential location of the window's backing buffer based on
2436  *    hardware and software configuration. This value indicates whether
2437  *    the WindowServer is capable of storing the window's buffer in
2438  *    video or main memory. The determination is based on details of
2439  *    the current hardware and software configuration, such as whether
2440  *    the GPU can be used by the WindowServer to store window buffers
2441  *    and whether the QuartzGL feature is currently enabled for the
2442  *    entire system or the current application. The return value will
2443  *    always be either kHIWindowBackingLocationVideoMemory or
2444  *    kHIWindowBackingLocationMainMemory; it will never be
2445  *    kHIWindowBackingLocationDefault. Your application can use the
2446  *    return value to determine if the current system configuration is
2447  *    fast enough to support your desired level of drawing; if, after
2448  *    performance measurements, you determine that your software
2449  *    requires video-memory storage of window buffers for acceptable
2450  *    performance, you might alert the user if this function returns
2451  *    kHIWindowBackingLocationMainMemory.
2452  *
2453  *    Note that the return value does not indicate the current location
2454  *    of the window's backing buffer, only its potential location. The
2455  *    current location can change from one moment to the next. Your
2456  *    application generally only needs to know the capability for
2457  *    storing the backing buffer in video memory, not the actual
2458  *    current location.
2459  *
2460  *  Availability:
2461  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2462  *    CarbonLib:        not available
2463  *    Non-Carbon CFM:   not available
2464  }
HIWindowGetBackingLocationnull2465 function HIWindowGetBackingLocation( inWindow: WindowRef; outPreferredLocation: HIWindowBackingLocationPtr { can be NULL } ): HIWindowBackingLocation; external name '_HIWindowGetBackingLocation';
2466 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2467 
2468 
2469 {��������������������������������������������������������������������������������������}
2470 {  � Window Buffer Visibility To Other Processes                                       }
2471 {��������������������������������������������������������������������������������������}
2472 {$endc} {not TARGET_CPU_64}
2473 
2474 
2475 {
2476  *  Summary:
2477  *    Window sharing constants are used with the
2478  *    HIWindowGet/SetSharingType APIs.
2479  }
2480 const
2481 {
2482    * Window contents may not be read by another process.
2483    }
2484 	kHIWindowSharingNone = 0;
2485 
2486   {
2487    * Window contents may be read but not modified by another process.
2488    }
2489 	kHIWindowSharingReadOnly = 1;
2490 
2491   {
2492    * Window contents may be read or modified by another process.
2493    }
2494 	kHIWindowSharingReadWrite = 2;
2495 
2496 type
2497 	HIWindowSharingType = UInt32;
2498 {$ifc not TARGET_CPU_64}
2499 {
2500  *  HIWindowSetSharingType()
2501  *
2502  *  Summary:
2503  *    Sets the visibility to other processes of a window's backing
2504  *    buffer contents.
2505  *
2506  *  Discussion:
2507  *    In Mac OS X 10.5, a window's backing buffer may be retrieved
2508  *    using the CGWindowListCreateImage and
2509  *    CGWindowListCreateImageFromArray APIs. Some windows may have
2510  *    content that should not be accessible via these APIs, due to
2511  *    security concerns. Your application can use this API to control
2512  *    how visible a window's backing buffer should be to other
2513  *    processes.
2514  *
2515  *    Note that it is also possible to read the entire contents of a
2516  *    display using OpenGL; setting a window's sharing type with this
2517  *    API does not prevent OpenGL from being able to read the window's
2518  *    content. For example, the built-in screen-sharing software in Mac
2519  *    OS X Mac OS X 10.5 uses OpenGL and a window's content will still
2520  *    be visible via screen-sharing even if its sharing type has been
2521  *    set to None.
2522  *
2523  *    A window's default sharing state on creation is
2524  *    kHIWindowSharingReadOnly.
2525  *
2526  *  Mac OS X threading:
2527  *    Not thread safe
2528  *
2529  *  Parameters:
2530  *
2531  *    inWindow:
2532  *      The window whose backing buffer visibility to set.
2533  *
2534  *    inType:
2535  *      The window's new backing buffer visibility.
2536  *
2537  *  Availability:
2538  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2539  *    CarbonLib:        not available
2540  *    Non-Carbon CFM:   not available
2541  }
HIWindowSetSharingTypenull2542 function HIWindowSetSharingType( inWindow: WindowRef; inType: HIWindowSharingType ): OSStatus; external name '_HIWindowSetSharingType';
2543 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2544 
2545 
2546 {
2547  *  HIWindowGetSharingType()
2548  *
2549  *  Summary:
2550  *    Retrieves the visibility to other processes of a window's backing
2551  *    buffer contents.
2552  *
2553  *  Mac OS X threading:
2554  *    Not thread safe
2555  *
2556  *  Parameters:
2557  *
2558  *    inWindow:
2559  *      The window whose backing buffer visibility to retrieve.
2560  *
2561  *  Result:
2562  *    The window's backing buffer visibility.
2563  *
2564  *  Availability:
2565  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
2566  *    CarbonLib:        not available
2567  *    Non-Carbon CFM:   not available
2568  }
HIWindowGetSharingTypenull2569 function HIWindowGetSharingType( inWindow: WindowRef ): HIWindowSharingType; external name '_HIWindowGetSharingType';
2570 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
2571 
2572 
2573 {��������������������������������������������������������������������������������������}
2574 {  � Window Modality                                                                   }
2575 {��������������������������������������������������������������������������������������}
2576 {$endc} {not TARGET_CPU_64}
2577 
2578 
2579 {
2580  *  WindowModality
2581  *
2582  }
2583 type
2584 	WindowModality = UInt32;
2585 const
2586 {
2587    * A window does not prevent interaction with any other window in the
2588    * system.
2589    }
2590 	kWindowModalityNone = 0;
2591 
2592   {
2593    * A window prevents interaction with all other windows in the
2594    * system. Only available in CarbonLib. Mapped to
2595    * kWindowModalityAppModal in Mac OS X.
2596    }
2597 	kWindowModalitySystemModal = 1;
2598 
2599   {
2600    * A window prevents interaction with other windows in the same
2601    * process.
2602    }
2603 	kWindowModalityAppModal = 2;
2604 
2605   {
2606    * A window prevents interaction with a single other window.
2607    }
2608 	kWindowModalityWindowModal = 3;
2609 
2610 
2611 {$ifc not TARGET_CPU_64}
2612 {
2613  *  SetWindowModality()
2614  *
2615  *  Summary:
2616  *    Sets the modality of a window.
2617  *
2618  *  Discussion:
2619  *    The modality of a window is used by the Carbon event manager to
2620  *    automatically determine appropriate event handling.
2621  *
2622  *  Mac OS X threading:
2623  *    Not thread safe
2624  *
2625  *  Parameters:
2626  *
2627  *    inWindow:
2628  *      The window whose modality to set.
2629  *
2630  *    inModalKind:
2631  *      The new modality for the window.
2632  *
2633  *    inUnavailableWindow:
2634  *      If the window is becoming window-modal, this parameter
2635  *      specifies the window to which the inWindow parameter is modal.
2636  *      The unavailableWindow will not be available while inWindow is
2637  *      in window-modal state.
2638  *
2639  *  Availability:
2640  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2641  *    CarbonLib:        in CarbonLib 1.1 and later
2642  *    Non-Carbon CFM:   not available
2643  }
SetWindowModalitynull2644 function SetWindowModality( inWindow: WindowRef; inModalKind: WindowModality; inUnavailableWindow: WindowRef ): OSStatus; external name '_SetWindowModality';
2645 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2646 
2647 
2648 {
2649  *  GetWindowModality()
2650  *
2651  *  Summary:
2652  *    Retrieves the modality of a window.
2653  *
2654  *  Mac OS X threading:
2655  *    Not thread safe
2656  *
2657  *  Parameters:
2658  *
2659  *    inWindow:
2660  *      The window whose modality to retrieve.
2661  *
2662  *    outModalKind:
2663  *      On exit, contains the modality of the window.
2664  *
2665  *    outUnavailableWindow:
2666  *      On exit, if�the window is window-modal, contains the target
2667  *      window of the specified window's modality.
2668  *
2669  *  Availability:
2670  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2671  *    CarbonLib:        in CarbonLib 1.1 and later
2672  *    Non-Carbon CFM:   not available
2673  }
GetWindowModalitynull2674 function GetWindowModality( inWindow: WindowRef; var outModalKind: WindowModality; outUnavailableWindow: WindowRefPtr { can be NULL } ): OSStatus; external name '_GetWindowModality';
2675 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2676 
2677 
2678 {
2679  *  HIWindowIsDocumentModalTarget()
2680  *
2681  *  Summary:
2682  *    Determines if a window is currently the target window of another
2683  *    document modal window, such as a sheet.
2684  *
2685  *  Mac OS X threading:
2686  *    Not thread safe
2687  *
2688  *  Parameters:
2689  *
2690  *    inWindow:
2691  *      The window in question.
2692  *
2693  *    outOwner:
2694  *      If inWindow is the target of a document modal window, outOwner
2695  *      is set to the document modal window on exit. If this function
2696  *      does not return true, outOwner is undefined. You may pass NULL
2697  *      if you don't want the owner's window ref.
2698  *
2699  *  Result:
2700  *    A boolean result. A true result indicates that inWindow is
2701  *    currently the target of a document modal window.
2702  *
2703  *  Availability:
2704  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2705  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2706  *    Non-Carbon CFM:   not available
2707  }
HIWindowIsDocumentModalTargetnull2708 function HIWindowIsDocumentModalTarget( inWindow: WindowRef; outOwner: WindowRefPtr { can be NULL } ): Boolean; external name '_HIWindowIsDocumentModalTarget';
2709 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2710 
2711 
2712 {��������������������������������������������������������������������������������������}
2713 { � Floating Windows                                                                   }
2714 {��������������������������������������������������������������������������������������}
2715 {
2716    Routines available from Mac OS 8.6 forward
2717    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
2718 }
2719 
2720 {
2721  *  ShowFloatingWindows()
2722  *
2723  *  Mac OS X threading:
2724  *    Not thread safe
2725  *
2726  *  Availability:
2727  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2728  *    CarbonLib:        in CarbonLib 1.0 and later
2729  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
2730  }
ShowFloatingWindowsnull2731 function ShowFloatingWindows: OSStatus; external name '_ShowFloatingWindows';
2732 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2733 
2734 
2735 {
2736  *  HideFloatingWindows()
2737  *
2738  *  Mac OS X threading:
2739  *    Not thread safe
2740  *
2741  *  Availability:
2742  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2743  *    CarbonLib:        in CarbonLib 1.0 and later
2744  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
2745  }
HideFloatingWindowsnull2746 function HideFloatingWindows: OSStatus; external name '_HideFloatingWindows';
2747 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2748 
2749 
2750 {
2751  *  AreFloatingWindowsVisible()
2752  *
2753  *  Mac OS X threading:
2754  *    Not thread safe
2755  *
2756  *  Availability:
2757  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2758  *    CarbonLib:        in CarbonLib 1.0 and later
2759  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
2760  }
AreFloatingWindowsVisiblenull2761 function AreFloatingWindowsVisible: Boolean; external name '_AreFloatingWindowsVisible';
2762 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2763 
2764 
2765 {��������������������������������������������������������������������������������������}
2766 { � Window Groups                                                                      }
2767 { The Window Group API allows the creation and management of groups of windows,        }
2768 { allowing control of the z-order, activation, and positioning of the windows.         }
2769 { Internally to the Window Manager, each of the standard window tiers (document,       }
2770 { toolbar, floating, modal, utility, help, and overlay) is implemented as a window     }
2771 { group; you can access the window group for a class with GetWindowGroupOfClass.       }
2772 { You can create your own window groups, if you would like your windows to float,      }
2773 { for example, above the floating window layer but below the modal layer. It is        }
2774 { also possible to create more complex hierarchical arrangements of window groups.     }
2775 {��������������������������������������������������������������������������������������}
2776 {$endc} {not TARGET_CPU_64}
2777 
2778 type
2779 	WindowGroupRef = ^OpaqueWindowGroupRef; { an opaque type }
2780 	OpaqueWindowGroupRef = record end;
2781 	WindowGroupRefPtr = ^WindowGroupRef;  { when a var xx:WindowGroupRef parameter can be nil, it is changed to xx: WindowGroupRefPtr }
2782 { may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
2783 const
2784 { may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
2785 	kFirstWindowOfGroup = WindowRef(-1);
2786 	kLastWindowOfGroup = nil;
2787 { may be passed as the "behindGroup" parameter to SendWindowGroupBehind}
2788 	kFirstWindowGroup = WindowGroupRef(-1);
2789 	kLastWindowGroup = nil;
2790 
2791 {
2792  *  WindowGroupAttributes
2793  *
2794  *  Summary:
2795  *    These are attributes that may be applied to a window group.
2796  }
2797 type
2798 	WindowGroupAttributes = UInt32;
2799 const
2800 {
2801    * Makes the group behave somewhat as a layer of windows that move
2802    * together. When any window in the group is brought to the front of
2803    * the group, the entire group will also be brought to the front of
2804    * the containing group's child hierarchy.
2805    }
2806 	kWindowGroupAttrSelectAsLayer = 1 shl 0;
2807 
2808   {
2809    * The positions of the contents of this group with respect to each
2810    * other cannot be changed. When one item moves, all other items are
2811    * moved simultaneously. Note that when one window in the group is
2812    * moved, the bounds of the other windows in the group may be updated
2813    * asynchronously.
2814    }
2815 	kWindowGroupAttrMoveTogether = 1 shl 1;
2816 
2817   {
2818    * The z-order of the contents of this group with respect to each
2819    * other cannot be changed. When one item changes z-order, all other
2820    * items are moved simultaneously. For purposes of z-ordering, the
2821    * group and all its subgroups are effectively treated as if they
2822    * were a single window in the parent group of this group.
2823    }
2824 	kWindowGroupAttrLayerTogether = 1 shl 2;
2825 
2826   {
2827    * The active state of the windows in this group is shared. The
2828    * windows in the group are activated or deactivated according to the
2829    * activation scope of the group, but when any window in the group
2830    * changes activation, all other windows change to match.
2831    }
2832 	kWindowGroupAttrSharedActivation = 1 shl 3;
2833 
2834   {
2835    * When any window in this group is collapsed, all other windows in
2836    * this group are hidden. All subgroups of this group are also
2837    * examined for the HideOnCollapse attribute, and any windows of any
2838    * subgroup with this attribute are also hidden. All windows will be
2839    * shown again when the collapsed window is expanded.
2840    }
2841 	kWindowGroupAttrHideOnCollapse = 1 shl 4;
2842 
2843   {
2844    * This window group's window level should be left unchanged. If this
2845    * attribute is not specified, this window group's window level will
2846    * be promoted to a value equal to the level of the next FixedLevel
2847    * window group beneath it in the window group hierarchy.
2848    }
2849 	kWindowGroupAttrFixedLevel = 1 shl 5;
2850 
2851 
2852 {
2853  *  WindowActivationScope
2854  *
2855  *  Discussion:
2856  *    Every window has a WindowActivationScope. It defines how windows
2857  *    are activated by the Window Manager with respect to other windows
2858  *    in the window�s group and in the current process.
2859  }
2860 type
2861 	WindowActivationScope = UInt32;
2862 const
2863 {
2864    * Windows with this scope are never activated by the Window Manager.
2865    * This should be used when the window�s visual state does not change
2866    * based on activation (for example, tooltip windows), or when the
2867    * client wishes to manually control all activation. The window owner
2868    * is free to explicitly activate or deactivate windows using the
2869    * ActivateWindow API.
2870    }
2871 	kWindowActivationScopeNone = 0;
2872 
2873   {
2874    * Windows with this scope are always active if visible. Windows with
2875    * this scope are unaffected by the activation state of other
2876    * windows. This activation scope is automatically used by floating
2877    * windows.
2878    }
2879 	kWindowActivationScopeIndependent = 1;
2880 
2881   {
2882    * Windows with this scope are activated relative to other windows
2883    * with the same scope in the current process. Only one window with
2884    * this scope can be active in the entire process. This activation
2885    * scope is automatically used by document and dialog windows.
2886    }
2887 	kWindowActivationScopeAll = 2;
2888 
2889 
2890 {
2891  *  Summary:
2892  *    These are constants that can be used for the inNextGroup
2893  *    parameter to GetWindowGroupSibling.
2894  }
2895 const
2896 {
2897    * Indicates that GetWindowGroupSibling should return the next deeper
2898    * sibling group in the z-order.
2899    }
2900 	kNextWindowGroup = true;
2901 
2902   {
2903    * Indicates that GetWindowGroupSibling should return the next higher
2904    * sibling group in the z-order.
2905    }
2906 	kPreviousWindowGroup = false;
2907 
2908 
2909 {
2910  *  WindowGroupContentOptions
2911  *
2912  *  Discussion:
2913  *    Window group contents options are used to control what group
2914  *    content is counted or returned by the CountWindowGroupContents
2915  *    and GetWindowGroupContents APIs.
2916  }
2917 type
2918 	WindowGroupContentOptions = UInt32;
2919 const
2920 {
2921    * Indicates that Count/GetWindowGroupContents should return the
2922    * windows in a group. If this option is not set, these APIs return
2923    * the groups in a group.
2924    }
2925 	kWindowGroupContentsReturnWindows = 1 shl 0;
2926 
2927   {
2928    * Indicates that Count/GetWindowGroupContents should include the
2929    * contents of groups contained by the specified group. If this
2930    * option is not set, these APIs only return information about the
2931    * specified group�s contents.
2932    }
2933 	kWindowGroupContentsRecurse = 1 shl 1;
2934 
2935   {
2936    * Indicates that Count/GetWindowGroupContents should only include
2937    * visible windows. Only valid when kWindowGroupContentsReturnWindows
2938    * is specified.
2939    }
2940 	kWindowGroupContentsVisible = 1 shl 2;
2941 
2942 
2943 {----------------------------------------------------------------------------------}
2944 {  � Group creation, destruction, and refcounting                                  }
2945 {----------------------------------------------------------------------------------}
2946 {$ifc not TARGET_CPU_64}
2947 {
2948  *  CreateWindowGroup()
2949  *
2950  *  Summary:
2951  *    Creates a new window group.
2952  *
2953  *  Mac OS X threading:
2954  *    Not thread safe
2955  *
2956  *  Parameters:
2957  *
2958  *    inAttributes:
2959  *      Attributes for the new window group.
2960  *
2961  *    outGroup:
2962  *      On exit, contains the new window group.
2963  *
2964  *  Availability:
2965  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2966  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
2967  *    Non-Carbon CFM:   not available
2968  }
CreateWindowGroupnull2969 function CreateWindowGroup( inAttributes: WindowGroupAttributes; var outGroup: WindowGroupRef ): OSStatus; external name '_CreateWindowGroup';
2970 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2971 
2972 
2973 {
2974  *  RetainWindowGroup()
2975  *
2976  *  Summary:
2977  *    Increments the refcount of a window group.
2978  *
2979  *  Mac OS X threading:
2980  *    Not thread safe
2981  *
2982  *  Parameters:
2983  *
2984  *    inGroup:
2985  *      The group whose refcount to increment.
2986  *
2987  *  Availability:
2988  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2989  *    CarbonLib:        in CarbonLib 1.4 and later
2990  *    Non-Carbon CFM:   not available
2991  }
RetainWindowGroupnull2992 function RetainWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_RetainWindowGroup';
2993 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2994 
2995 
2996 {
2997  *  ReleaseWindowGroup()
2998  *
2999  *  Summary:
3000  *    Releases a refcount on a window group. If the refcount goes to
3001  *    zero, the group is destroyed, and a refcount is released from all
3002  *    contained objects.
3003  *
3004  *  Mac OS X threading:
3005  *    Not thread safe
3006  *
3007  *  Parameters:
3008  *
3009  *    inGroup:
3010  *      The group whose refcount to decrement.
3011  *
3012  *  Availability:
3013  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3014  *    CarbonLib:        in CarbonLib 1.4 and later
3015  *    Non-Carbon CFM:   not available
3016  }
ReleaseWindowGroupnull3017 function ReleaseWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_ReleaseWindowGroup';
3018 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3019 
3020 
3021 {
3022  *  GetWindowGroupRetainCount()
3023  *
3024  *  Summary:
3025  *    Returns the refcount of a window group.
3026  *
3027  *  Mac OS X threading:
3028  *    Not thread safe
3029  *
3030  *  Parameters:
3031  *
3032  *    inGroup:
3033  *      The group whose refcount to return.
3034  *
3035  *  Availability:
3036  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only]
3037  *    CarbonLib:        in CarbonLib 1.4 and later
3038  *    Non-Carbon CFM:   not available
3039  }
GetWindowGroupRetainCountnull3040 function GetWindowGroupRetainCount( inGroup: WindowGroupRef ): ItemCount; external name '_GetWindowGroupRetainCount';
3041 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
3042 
3043 
3044 {
3045  *  GetWindowGroupOfClass()
3046  *
3047  *  Summary:
3048  *    Gets the window group in which windows of a given class are
3049  *    placed.
3050  *
3051  *  Discussion:
3052  *    The Window Manager uses window groups internally to manage the
3053  *    ordering of windows of different classes. In some cases, multiple
3054  *    classes are placed within the same group; for example, windows
3055  *    from all of the modal and alert window classes are placed into
3056  *    the same modal window group. The refcount of the group returned
3057  *    by this API is not incremented, and the caller does not need to
3058  *    release the reference.
3059  *
3060  *  Mac OS X threading:
3061  *    Not thread safe
3062  *
3063  *  Parameters:
3064  *
3065  *    windowClass:
3066  *      The class whose window group to retrieve. You may pass
3067  *      kAllWindowClasses to retrieve the root window group.
3068  *
3069  *  Availability:
3070  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3071  *    CarbonLib:        in CarbonLib 1.4 and later
3072  *    Non-Carbon CFM:   not available
3073  }
GetWindowGroupOfClassnull3074 function GetWindowGroupOfClass( windowClass_: WindowClass ): WindowGroupRef; external name '_GetWindowGroupOfClass';
3075 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3076 
3077 
3078 {----------------------------------------------------------------------------------}
3079 {  ��Group name, attributes, and level                                             }
3080 {----------------------------------------------------------------------------------}
3081 {
3082  *  SetWindowGroupName()
3083  *
3084  *  Summary:
3085  *    Sets the name of a window group.
3086  *
3087  *  Discussion:
3088  *    The name of a window group is never displayed to the user.
3089  *    However, it is displayed by debugging functions such as
3090  *    DebugPrintWindowGroup. This can be very useful when debugging the
3091  *    structure of your window groups.
3092  *
3093  *  Mac OS X threading:
3094  *    Not thread safe
3095  *
3096  *  Parameters:
3097  *
3098  *    inGroup:
3099  *      The group whose name to set.
3100  *
3101  *    inName:
3102  *      The name of the group.
3103  *
3104  *  Availability:
3105  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3106  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3107  *    Non-Carbon CFM:   not available
3108  }
SetWindowGroupNamenull3109 function SetWindowGroupName( inGroup: WindowGroupRef; inName: CFStringRef ): OSStatus; external name '_SetWindowGroupName';
3110 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3111 
3112 
3113 {
3114  *  CopyWindowGroupName()
3115  *
3116  *  Summary:
3117  *    Returns a copy of the name of a window group.
3118  *
3119  *  Mac OS X threading:
3120  *    Not thread safe
3121  *
3122  *  Parameters:
3123  *
3124  *    inGroup:
3125  *      The group whose name to retrieve.
3126  *
3127  *    outName:
3128  *      On exit, contains the name of the group. It is the caller's
3129  *      responsibility to release the name.
3130  *
3131  *  Availability:
3132  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3133  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3134  *    Non-Carbon CFM:   not available
3135  }
CopyWindowGroupNamenull3136 function CopyWindowGroupName( inGroup: WindowGroupRef; var outName: CFStringRef ): OSStatus; external name '_CopyWindowGroupName';
3137 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3138 
3139 
3140 {
3141  *  GetWindowGroupAttributes()
3142  *
3143  *  Summary:
3144  *    Retrieves the attributes of a window group.
3145  *
3146  *  Mac OS X threading:
3147  *    Not thread safe
3148  *
3149  *  Parameters:
3150  *
3151  *    inGroup:
3152  *      The group whose attributes to retrieve.
3153  *
3154  *    outAttributes:
3155  *      On exit, the group�s attributes.
3156  *
3157  *  Availability:
3158  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3159  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3160  *    Non-Carbon CFM:   not available
3161  }
GetWindowGroupAttributesnull3162 function GetWindowGroupAttributes( inGroup: WindowGroupRef; var outAttributes: WindowGroupAttributes ): OSStatus; external name '_GetWindowGroupAttributes';
3163 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3164 
3165 
3166 {
3167  *  ChangeWindowGroupAttributes()
3168  *
3169  *  Summary:
3170  *    Changes the attributes of a window group.
3171  *
3172  *  Mac OS X threading:
3173  *    Not thread safe
3174  *
3175  *  Parameters:
3176  *
3177  *    inGroup:
3178  *      The group whose attributes to change.
3179  *
3180  *    setTheseAttributes:
3181  *      The attributes to set.
3182  *
3183  *    clearTheseAttributes:
3184  *      The attributes to clear.
3185  *
3186  *  Availability:
3187  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3188  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3189  *    Non-Carbon CFM:   not available
3190  }
ChangeWindowGroupAttributesnull3191 function ChangeWindowGroupAttributes( inGroup: WindowGroupRef; setTheseAttributes: WindowGroupAttributes; clearTheseAttributes: WindowGroupAttributes ): OSStatus; external name '_ChangeWindowGroupAttributes';
3192 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3193 
3194 
3195 {
3196  *  SetWindowGroupLevel()
3197  *
3198  *  Summary:
3199  *    Sets the CoreGraphics window group level of windows in a group.
3200  *
3201  *    PLEASE NOTE: Apple does not recommend using this API for most
3202  *    window-ordering purposes. Rather than explicitly setting the
3203  *    level of a window group, it is preferable to position the group
3204  *    in the window group hierarchy so that it is between two standard
3205  *    groups that bracket the desired window level. Doing so will cause
3206  *    your group to automatically adopt the window level of the
3207  *    standard group beneath it. Your code will be more compatible with
3208  *    future versions of Mac OS X if you avoid setting the window level
3209  *    of your groups explicitly.
3210  *
3211  *    The most common case where it is appropriate to explicitly set a
3212  *    window level for your group is when your group's windows need to
3213  *    be positioned above or below all windows in the standard window
3214  *    groups. In these cases, you should position your group in the
3215  *    group hierarchy above or below all standard groups, and then set
3216  *    the window group level explicitly, if necessary.
3217  *
3218  *  Discussion:
3219  *    CoreGraphics windows (used to implement all windows in Carbon and
3220  *    Cocoa applications on Mac OS X) are divided into layers specified
3221  *    by a window level. Standard window levels are listed in
3222  *    <CoreGraphics/CGWindowLevel.h>. By default, a new window group
3223  *    has a window level of kCGNormalWindowLevel.
3224  *
3225  *    When a window is placed into a window group, its window level is
3226  *    determined by the window level of its "base group". This is the
3227  *    containing group that is a child of the root group. For example,
3228  *    if group A is a child of the root group, and group B is a child
3229  *    of group A, and window C is in group B, then window C's base
3230  *    group is group A, and group A's window level determines the level
3231  *    of window C.
3232  *
3233  *    SetWindowGroupLevel only allows changing the window level of
3234  *    groups that are children of the root group. It returns paramErr
3235  *    for other groups, since a group that is not a child of the root
3236  *    group is not a base group and changing its level has no effect.
3237  *
3238  *
3239  *    Changing the level of a group also changes the level of all
3240  *    windows currently contained by the group.
3241  *
3242  *    In Mac OS X 10.4 and later, SetWindowGroupLevel will set all
3243  *    three window levels associated with a window group: the Active,
3244  *    Inactive, and Promoted levels. It will then immediately determine
3245  *    if the Active level needs to be promoted to a larger value, and
3246  *    if so, set the Promoted level to that value.
3247  *
3248  *  Mac OS X threading:
3249  *    Not thread safe
3250  *
3251  *  Parameters:
3252  *
3253  *    inGroup:
3254  *      The window group whose level to change.
3255  *
3256  *    inLevel:
3257  *      The new level for the windows in this group.
3258  *
3259  *  Availability:
3260  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3261  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3262  *    Non-Carbon CFM:   not available
3263  }
SetWindowGroupLevelnull3264 function SetWindowGroupLevel( inGroup: WindowGroupRef; inLevel: SInt32 ): OSStatus; external name '_SetWindowGroupLevel';
3265 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3266 
3267 
3268 {
3269  *  GetWindowGroupLevel()
3270  *
3271  *  Summary:
3272  *    Gets the CoreGraphics window group level of windows in a group.
3273  *
3274  *  Discussion:
3275  *    In Mac OS X 10.4 and later, GetWindowGroupLevel will return
3276  *    either the Promoted window level or the Inactive window level,
3277  *    depending on whether the application is active or inactive.
3278  *
3279  *  Mac OS X threading:
3280  *    Not thread safe
3281  *
3282  *  Parameters:
3283  *
3284  *    inGroup:
3285  *      The window group whose level to return.
3286  *
3287  *    outLevel:
3288  *      On exit, contains the window level of the windows in this group.
3289  *
3290  *  Availability:
3291  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3292  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3293  *    Non-Carbon CFM:   not available
3294  }
GetWindowGroupLevelnull3295 function GetWindowGroupLevel( inGroup: WindowGroupRef; var outLevel: SInt32 ): OSStatus; external name '_GetWindowGroupLevel';
3296 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3297 
3298 
3299 {$endc} {not TARGET_CPU_64}
3300 
3301 
3302 {
3303  *  Summary:
3304  *    Parameters to GetWindowGroupLevelOfType and
3305  *    SetWindowGroupLevelOfType
3306  }
3307 const
3308 {
3309    * The window level that is nominally used for windows in the group
3310    * when the application is active. However, if a group with a higher
3311    * window level is positioned below group in the window group
3312    * hierarchy, this group's active level will be promoted to match the
3313    * level of the group in front of it. You can determine the actual
3314    * window level in use for a group using the
3315    * kWindowGroupLevelPromoted constant.
3316    }
3317 	kWindowGroupLevelActive = 1;
3318 
3319   {
3320    * The window level that is used for windows in the group when the
3321    * application is inactive.
3322    }
3323 	kWindowGroupLevelInactive = 2;
3324 
3325   {
3326    * The window level that is actually used for windows in the group
3327    * when the application is active. This level will either be the same
3328    * as the Active window level, or will be a larger value to match the
3329    * level of a group below this group.
3330    *
3331    * We do not recommend setting the Promoted window level explicitly,
3332    * because the promoted level is reset by the Window Manager whenever
3333    * the window group hierarchy structure changes, and therefore any
3334    * changes that you may make to the promoted level can be
3335    * overwritten. In general you should only use this API to set the
3336    * Active and Inactive window levels.
3337    }
3338 	kWindowGroupLevelPromoted = 3;
3339 
3340 {$ifc not TARGET_CPU_64}
3341 {
3342  *  SetWindowGroupLevelOfType()
3343  *
3344  *  Summary:
3345  *    Sets a CoreGraphics window group level of a window group.
3346  *
3347  *
3348  *    PLEASE NOTE: Apple does not recommend using this API for most
3349  *    window-ordering purposes. Rather than explicitly setting the
3350  *    level of a window group, it is preferable to position the group
3351  *    in the window group hierarchy so that it is between two standard
3352  *    groups that bracket the desired window level. Doing so will cause
3353  *    your group to automatically adopt the window level of the
3354  *    standard group beneath it. Your code will be more compatible with
3355  *    future versions of Mac OS X if you avoid setting the window level
3356  *    of your groups explicitly.
3357  *
3358  *    The most common case where it is appropriate to explicitly set a
3359  *    window level for your group is when your group's windows need to
3360  *    be positioned above or below all windows in the standard window
3361  *    groups. In these cases, you should position your group in the
3362  *    group hierarchy above or below all standard groups, and then set
3363  *    the window group level explicitly, if necessary.
3364  *
3365  *  Discussion:
3366  *    See the SetWindowGroupLevel API for a general discussion of
3367  *    window levels and window groups.
3368  *
3369  *    In Mac OS X 10.4 and later, a window group may have multiple
3370  *    window levels associated with it; one level for when the
3371  *    application is active, and another for when the application is
3372  *    inactive. The Window Manager automatically switches each group's
3373  *    level as the application becomes active or inactive. This API can
3374  *    be used to set each level associated with a group.
3375  *
3376  *    This API can also be used to set the promoted window level that
3377  *    is actually used for windows in the group; however, we do not
3378  *    recommend this usage, because the promoted window level is reset
3379  *    by the Window Manager whenever the window group hierarchy
3380  *    structure changes, and therefore any changes that you may make to
3381  *    the promoted level can be overwritten. In general you should only
3382  *    use this API to set the Active and Inactive window levels.
3383  *
3384  *
3385  *    When setting the Active level of a group with the FixedLevel
3386  *    window group attribute, this API will automatically also set the
3387  *    Promoted level to the same value, and also update the Promoted
3388  *    level of any non-FixedLevel groups above the group being modified.
3389  *
3390  *  Mac OS X threading:
3391  *    Not thread safe
3392  *
3393  *  Parameters:
3394  *
3395  *    inGroup:
3396  *      The window group whose level to change.
3397  *
3398  *    inLevelType:
3399  *      The level type to change (one of kWindowGroupLevelActive,
3400  *      kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
3401  *
3402  *    inLevel:
3403  *      The new level for the windows in this group.
3404  *
3405  *  Availability:
3406  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
3407  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3408  *    Non-Carbon CFM:   not available
3409  }
SetWindowGroupLevelOfTypenull3410 function SetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; inLevel: CGWindowLevel ): OSStatus; external name '_SetWindowGroupLevelOfType';
3411 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3412 
3413 
3414 {
3415  *  GetWindowGroupLevelOfType()
3416  *
3417  *  Summary:
3418  *    Gets a CoreGraphics window level of a window group.
3419  *
3420  *  Discussion:
3421  *    See the SetWindowGroupLevel API for a general discussion of
3422  *    window levels and window groups.
3423  *
3424  *    In Mac OS X 10.4 and later, a window group may have multiple
3425  *    window levels associated with it; one level for when the
3426  *    application is active, and another for when the application is
3427  *    inactive. The Window Manager automatically switches each group's
3428  *    level as the application becomes active or inactive. The
3429  *    GetWindowGroupLevelOfType API can be used to get each level
3430  *    associated with a group, including the promoted window level that
3431  *    is actually in use for windows in the group while the application
3432  *    is active.
3433  *
3434  *  Mac OS X threading:
3435  *    Not thread safe
3436  *
3437  *  Parameters:
3438  *
3439  *    inGroup:
3440  *      The window group whose level to retrieve.
3441  *
3442  *    inLevelType:
3443  *      The level type to retrieve (one of kWindowGroupLevelActive,
3444  *      kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
3445  *
3446  *    outLevel:
3447  *      On exit, the level for the windows in this group.
3448  *
3449  *  Availability:
3450  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
3451  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3452  *    Non-Carbon CFM:   not available
3453  }
GetWindowGroupLevelOfTypenull3454 function GetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; var outLevel: CGWindowLevel ): OSStatus; external name '_GetWindowGroupLevelOfType';
3455 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3456 
3457 
3458 {----------------------------------------------------------------------------------}
3459 {  ��Group z-ordering                                                              }
3460 {----------------------------------------------------------------------------------}
3461 {
3462  *  SendWindowGroupBehind()
3463  *
3464  *  Summary:
3465  *    Changes the z-order of a group, if the group does not have the
3466  *    kWindowGroupAttributeLayerTogether attribute set.
3467  *
3468  *  Discussion:
3469  *    SendWindowGroupBehind currently requires that the group being
3470  *    moved and the behindGroup have the same parent group.
3471  *
3472  *  Mac OS X threading:
3473  *    Not thread safe
3474  *
3475  *  Parameters:
3476  *
3477  *    inGroup:
3478  *      The group whose z-order to change.
3479  *
3480  *    behindGroup:
3481  *      The group behind which to position the specified group.
3482  *
3483  *  Availability:
3484  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3485  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3486  *    Non-Carbon CFM:   not available
3487  }
SendWindowGroupBehindnull3488 function SendWindowGroupBehind( inGroup: WindowGroupRef; behindGroup: WindowGroupRef ): OSStatus; external name '_SendWindowGroupBehind';
3489 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3490 
3491 
3492 {----------------------------------------------------------------------------------}
3493 {  ��Group containment hierarchy manipulation                                      }
3494 {----------------------------------------------------------------------------------}
3495 {
3496  *  GetWindowGroup()
3497  *
3498  *  Summary:
3499  *    Gets the window group that contains a window.
3500  *
3501  *  Discussion:
3502  *    The refcount of the group returned by this API is not
3503  *    incremented, and the caller does not need to release the
3504  *    reference.
3505  *
3506  *  Mac OS X threading:
3507  *    Not thread safe
3508  *
3509  *  Parameters:
3510  *
3511  *    inWindow:
3512  *      The window whose containing group to retrieve.
3513  *
3514  *  Availability:
3515  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3516  *    CarbonLib:        in CarbonLib 1.4 and later
3517  *    Non-Carbon CFM:   not available
3518  }
GetWindowGroupnull3519 function GetWindowGroup( inWindow: WindowRef ): WindowGroupRef; external name '_GetWindowGroup';
3520 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3521 
3522 
3523 {
3524  *  SetWindowGroup()
3525  *
3526  *  Summary:
3527  *    Sets the window group that contains a window.
3528  *
3529  *  Discussion:
3530  *    The window�s z-order relative to windows in the current process
3531  *    may also be changed by this API. If the new window group is
3532  *    z-ordered above the window�s current group, the window will be
3533  *    placed at the end of the new group. If the new window group is
3534  *    z-ordered below the window�s current group, the window will be
3535  *    placed at the top of the new group. You may not place a window
3536  *    directly into the root group.
3537  *
3538  *  Mac OS X threading:
3539  *    Not thread safe
3540  *
3541  *  Parameters:
3542  *
3543  *    inWindow:
3544  *      The window whose group to change.
3545  *
3546  *    inNewGroup:
3547  *      The new containing group.
3548  *
3549  *  Availability:
3550  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3551  *    CarbonLib:        in CarbonLib 1.4 and later
3552  *    Non-Carbon CFM:   not available
3553  }
SetWindowGroupnull3554 function SetWindowGroup( inWindow: WindowRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroup';
3555 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3556 
3557 
3558 {
3559  *  IsWindowContainedInGroup()
3560  *
3561  *  Summary:
3562  *    Indicates whether a window is contained within a group or any of
3563  *    its subgroups.
3564  *
3565  *  Mac OS X threading:
3566  *    Not thread safe
3567  *
3568  *  Parameters:
3569  *
3570  *    inWindow:
3571  *      The window whose containment to examine.
3572  *
3573  *    inGroup:
3574  *      The group that might contain the window.
3575  *
3576  *  Availability:
3577  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3578  *    CarbonLib:        in CarbonLib 1.4 and later
3579  *    Non-Carbon CFM:   not available
3580  }
IsWindowContainedInGroupnull3581 function IsWindowContainedInGroup( inWindow: WindowRef; inGroup: WindowGroupRef ): Boolean; external name '_IsWindowContainedInGroup';
3582 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3583 
3584 
3585 {
3586  *  GetWindowGroupParent()
3587  *
3588  *  Summary:
3589  *    Gets the window group that contains a group.
3590  *
3591  *  Mac OS X threading:
3592  *    Not thread safe
3593  *
3594  *  Parameters:
3595  *
3596  *    inGroup:
3597  *      The group whose containing group to retrieve.
3598  *
3599  *    outGroup:
3600  *      On exit, the containing window group of the group. The group�s
3601  *      refcount is not incremented by this API, and the caller does
3602  *      not need to release the reference.
3603  *
3604  *  Availability:
3605  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3606  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3607  *    Non-Carbon CFM:   not available
3608  }
GetWindowGroupParentnull3609 function GetWindowGroupParent( inGroup: WindowGroupRef ): WindowGroupRef; external name '_GetWindowGroupParent';
3610 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3611 
3612 
3613 {
3614  *  SetWindowGroupParent()
3615  *
3616  *  Summary:
3617  *    Sets the window group that contains a group.
3618  *
3619  *  Discussion:
3620  *    SetWindowGroupParent currently requires that the group have no
3621  *    windows in it.
3622  *
3623  *  Mac OS X threading:
3624  *    Not thread safe
3625  *
3626  *  Parameters:
3627  *
3628  *    inGroup:
3629  *      The group whose containing group to change.
3630  *
3631  *    inNewGroup:
3632  *      The new containing group.
3633  *
3634  *  Availability:
3635  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3636  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3637  *    Non-Carbon CFM:   not available
3638  }
SetWindowGroupParentnull3639 function SetWindowGroupParent( inGroup: WindowGroupRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroupParent';
3640 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3641 
3642 
3643 {
3644  *  GetWindowGroupSibling()
3645  *
3646  *  Summary:
3647  *    Returns the next or previous group of a window group.
3648  *
3649  *  Mac OS X threading:
3650  *    Not thread safe
3651  *
3652  *  Parameters:
3653  *
3654  *    inGroup:
3655  *      The group whose sibling to return.
3656  *
3657  *    inNextGroup:
3658  *      True to return the next sibling, false to return the previous
3659  *      sibling.
3660  *
3661  *  Availability:
3662  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3663  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3664  *    Non-Carbon CFM:   not available
3665  }
GetWindowGroupSiblingnull3666 function GetWindowGroupSibling( inGroup: WindowGroupRef; inNextGroup: Boolean ): WindowGroupRef; external name '_GetWindowGroupSibling';
3667 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3668 
3669 
3670 {
3671  *  GetWindowGroupOwner()
3672  *
3673  *  Summary:
3674  *    Returns the window that owns a window group, or NULL if none.
3675  *
3676  *  Discussion:
3677  *    A window may own one or more window groups. The windows in an
3678  *    owned window group will always be z-ordered above the owner
3679  *    window. Whenever the owner window changes z-order, the windows in
3680  *    the groups owned by the window will be moved also.
3681  *
3682  *  Mac OS X threading:
3683  *    Not thread safe
3684  *
3685  *  Parameters:
3686  *
3687  *    inGroup:
3688  *      The group whose owner to retrieve.
3689  *
3690  *  Availability:
3691  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3692  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3693  *    Non-Carbon CFM:   not available
3694  }
GetWindowGroupOwnernull3695 function GetWindowGroupOwner( inGroup: WindowGroupRef ): WindowRef; external name '_GetWindowGroupOwner';
3696 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3697 
3698 
3699 {
3700  *  SetWindowGroupOwner()
3701  *
3702  *  Summary:
3703  *    Sets the window that owns a window group.
3704  *
3705  *  Discussion:
3706  *    The group and the window must have the same parent group.
3707  *    SetWindowGroupOwner currently requires that the group have no
3708  *    windows in it.
3709  *
3710  *  Mac OS X threading:
3711  *    Not thread safe
3712  *
3713  *  Parameters:
3714  *
3715  *    inGroup:
3716  *      The group whose owner to set.
3717  *
3718  *    inWindow:
3719  *      The group's new owner.
3720  *
3721  *  Availability:
3722  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3723  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
3724  *    Non-Carbon CFM:   not available
3725  }
SetWindowGroupOwnernull3726 function SetWindowGroupOwner( inGroup: WindowGroupRef; inWindow: WindowRef ): OSStatus; external name '_SetWindowGroupOwner';
3727 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3728 
3729 
3730 {----------------------------------------------------------------------------------}
3731 {  � Inspection of group contents                                                  }
3732 {----------------------------------------------------------------------------------}
3733 
3734 {
3735  *  CountWindowGroupContents()
3736  *
3737  *  Summary:
3738  *    Counts the windows or groups contained in a group.
3739  *
3740  *  Mac OS X threading:
3741  *    Not thread safe
3742  *
3743  *  Parameters:
3744  *
3745  *    inGroup:
3746  *      The group whose contents to count.
3747  *
3748  *    inOptions:
3749  *      Specifies how to count the group�s contents.
3750  *
3751  *  Availability:
3752  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3753  *    CarbonLib:        in CarbonLib 1.4 and later
3754  *    Non-Carbon CFM:   not available
3755  }
CountWindowGroupContentsnull3756 function CountWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions ): ItemCount; external name '_CountWindowGroupContents';
3757 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3758 
3759 
3760 {
3761  *  GetWindowGroupContents()
3762  *
3763  *  Summary:
3764  *    Retrieves the windows or groups contained in a group.
3765  *
3766  *  Discussion:
3767  *    The windows or groups returned by this API will be placed into
3768  *    the output buffer in z-order, from highest to lowest.
3769  *
3770  *  Mac OS X threading:
3771  *    Not thread safe
3772  *
3773  *  Parameters:
3774  *
3775  *    inGroup:
3776  *      The group whose contents to retrieve.
3777  *
3778  *    inOptions:
3779  *      Specifies which content to retrieve.
3780  *
3781  *    inAllowedItems:
3782  *      The number of items that will fit in the output buffer.
3783  *
3784  *    outNumItems:
3785  *      On exit, the number of items that were returned. May be NULL.
3786  *
3787  *    outItems:
3788  *      On entry, points to enough memory to hold inAllowedSize
3789  *      WindowRefs or WindowGroupRefs. On exit, contains *outNumItems
3790  *      WindowRefs or WindowGroupRefs.
3791  *
3792  *  Availability:
3793  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3794  *    CarbonLib:        in CarbonLib 1.4 and later
3795  *    Non-Carbon CFM:   not available
3796  }
GetWindowGroupContentsnull3797 function GetWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; inAllowedItems: ItemCount; outNumItems: ItemCountPtr { can be NULL }; var outItems: UnivPtr ): OSStatus; external name '_GetWindowGroupContents';
3798 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3799 
3800 
3801 {
3802  *  GetIndexedWindow()
3803  *
3804  *  Summary:
3805  *    Retrieves a specified window from a group.
3806  *
3807  *  Discussion:
3808  *    GetIndexedWindow is provided as an easier way to get a particular
3809  *    window from a group than using GetWindowGroupContents. If you
3810  *    only need to retrieve, say, the last window in a group, it is
3811  *    easier and more efficient to use GetIndexedWindow. If you need to
3812  *    retrieve all the windows in a group, it is more efficient to use
3813  *    GetWindowGroupContents.
3814  *
3815  *  Mac OS X threading:
3816  *    Not thread safe
3817  *
3818  *  Parameters:
3819  *
3820  *    inGroup:
3821  *      The group containing the window to retrieve.
3822  *
3823  *    inIndex:
3824  *      The index of the window. This parameter may range from 1 to
3825  *      CountWindowGroupContents( inGroup,
3826  *      kWindowGroupContentsReturnWindows | inOptions );
3827  *
3828  *    inOptions:
3829  *      Indicates how to locate the specified window.
3830  *      kWindowGroupContentsReturnWindows is implied by this API and
3831  *      does not need to be explicitly specified.
3832  *
3833  *    outWindow:
3834  *      On exit, the window at the specified index.
3835  *
3836  *  Availability:
3837  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3838  *    CarbonLib:        in CarbonLib 1.4 and later
3839  *    Non-Carbon CFM:   not available
3840  }
GetIndexedWindownull3841 function GetIndexedWindow( inGroup: WindowGroupRef; inIndex: ItemCount; inOptions: WindowGroupContentOptions; var outWindow: WindowRef ): OSStatus; external name '_GetIndexedWindow';
3842 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3843 
3844 
3845 {
3846  *  GetWindowIndex()
3847  *
3848  *  Summary:
3849  *    Retrieves the z-order index of a window inside a group.
3850  *
3851  *  Discussion:
3852  *    The z-order index of a window is its relative position in z-order
3853  *    inside a group. The index ranges from 1 to the number of windows
3854  *    in the group.
3855  *
3856  *  Mac OS X threading:
3857  *    Not thread safe
3858  *
3859  *  Parameters:
3860  *
3861  *    inWindow:
3862  *      The window whose z-order index to retrieve.
3863  *
3864  *    inStartGroup:
3865  *      The group on which to base the z-order index. This should be
3866  *      either the containing group of the window, or NULL. If NULL,
3867  *      this API returns the z-order index of the window across the
3868  *      entire process.
3869  *
3870  *    inOptions:
3871  *      Indicates how to enumerate the specified window.
3872  *      kWindowGroupContentsReturnWindows is implied by this API and
3873  *      does not need to be explicitly specified.
3874  *
3875  *    outIndex:
3876  *      On exit, contains the window�s z-order index.
3877  *
3878  *  Availability:
3879  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3880  *    CarbonLib:        in CarbonLib 1.4 and later
3881  *    Non-Carbon CFM:   not available
3882  }
GetWindowIndexnull3883 function GetWindowIndex( inWindow: WindowRef; inStartGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; var outIndex: ItemCount ): OSStatus; external name '_GetWindowIndex';
3884 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3885 
3886 
3887 {----------------------------------------------------------------------------------}
3888 {  ��Window activation                                                             }
3889 {----------------------------------------------------------------------------------}
3890 {
3891  *  ActiveNonFloatingWindow()
3892  *
3893  *  Summary:
3894  *    Returns the window, among all windows with activation scope of
3895  *    kWindowActivationScopeAll, that is considered active.
3896  *
3897  *  Discussion:
3898  *    The Mac OS 8.5 Window Manager introduced the
3899  *    FrontNonFloatingWindow API, which was designed to return the
3900  *    window that should be considered active by the application. With
3901  *    the advent of window groups, it is now possible to have a window
3902  *    that looks active (is highlighted, and accepts keyboard input)
3903  *    but to have other non-floating windows grouped above the active
3904  *    window. The ActiveNonFloatingWindow API returns the active window
3905  *    regardless of where it is positioned in the z-order. Most code
3906  *    that currently uses FrontNonFloatingWindow or
3907  *    GetFrontWindowOfClass(kDocumentWindowClass) to get the active
3908  *    window should use ActiveNonFloatingWindow instead.
3909  *
3910  *  Mac OS X threading:
3911  *    Not thread safe
3912  *
3913  *  Availability:
3914  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3915  *    CarbonLib:        in CarbonLib 1.4 and later
3916  *    Non-Carbon CFM:   not available
3917  }
ActiveNonFloatingWindownull3918 function ActiveNonFloatingWindow: WindowRef; external name '_ActiveNonFloatingWindow';
3919 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3920 
3921 
3922 {
3923  *  IsWindowActive()
3924  *
3925  *  Summary:
3926  *    Indicates whether a window is active.
3927  *
3928  *  Discussion:
3929  *    Whether a window is considered active is determined by its
3930  *    activation scope, hiliting, and z-order. For windows that have an
3931  *    activation scope of kWindowActivationScopeAll, a window is active
3932  *    if it is the window returned by the ActiveNonFloatingWindow API,
3933  *    or if it is in the same window group as the window returned by
3934  *    that API and the window group has the
3935  *    kWindowGroupAttrSharedActivation attribute. For windows that have
3936  *    some other activation scope, the window is active if its window
3937  *    frame is hilited and the window is the frontmost window in its
3938  *    window group.
3939  *
3940  *    The IsWindowActive API does not indicate whether the window has
3941  *    keyboard focus. To get the window with keyboard focus, use
3942  *    GetUserFocusWindow().
3943  *
3944  *  Mac OS X threading:
3945  *    Not thread safe
3946  *
3947  *  Parameters:
3948  *
3949  *    inWindow:
3950  *      The window whose active state to retrieve.
3951  *
3952  *  Availability:
3953  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3954  *    CarbonLib:        in CarbonLib 1.4 and later
3955  *    Non-Carbon CFM:   not available
3956  }
IsWindowActivenull3957 function IsWindowActive( inWindow: WindowRef ): Boolean; external name '_IsWindowActive';
3958 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3959 
3960 
3961 {
3962  *  ActivateWindow()
3963  *
3964  *  Summary:
3965  *    Activates or deactivates a window.
3966  *
3967  *  Discussion:
3968  *    Window activation consists of two steps: hiliting the window
3969  *    frame and sending an activate event to the window. ActivateWindow
3970  *    handles both of these steps and also updates internal Window
3971  *    Manager state. If you just need to hilite the window frame, you
3972  *    may use HiliteWindow. If you need to send an activate event, you
3973  *    should always use ActivateWindow rather than creating and sending
3974  *    the event yourself.
3975  *
3976  *  Mac OS X threading:
3977  *    Not thread safe
3978  *
3979  *  Parameters:
3980  *
3981  *    inWindow:
3982  *      The window to activate or deactivate.
3983  *
3984  *    inActivate:
3985  *      Whether to activate or deactivate the window.
3986  *
3987  *  Availability:
3988  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3989  *    CarbonLib:        in CarbonLib 1.4 and later
3990  *    Non-Carbon CFM:   not available
3991  }
ActivateWindownull3992 function ActivateWindow( inWindow: WindowRef; inActivate: Boolean ): OSStatus; external name '_ActivateWindow';
3993 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3994 
3995 
3996 {
3997  *  GetWindowActivationScope()
3998  *
3999  *  Summary:
4000  *    Retrieves a window�s activation scope.
4001  *
4002  *  Mac OS X threading:
4003  *    Not thread safe
4004  *
4005  *  Parameters:
4006  *
4007  *    inWindow:
4008  *      The window whose activation scope to retrieve.
4009  *
4010  *    outScope:
4011  *      On exit, the window�s activation scope.
4012  *
4013  *  Availability:
4014  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4015  *    CarbonLib:        in CarbonLib 1.4 and later
4016  *    Non-Carbon CFM:   not available
4017  }
GetWindowActivationScopenull4018 function GetWindowActivationScope( inWindow: WindowRef; var outScope: WindowActivationScope ): OSStatus; external name '_GetWindowActivationScope';
4019 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4020 
4021 
4022 {
4023  *  SetWindowActivationScope()
4024  *
4025  *  Summary:
4026  *    Sets a window�s activation scope.
4027  *
4028  *  Mac OS X threading:
4029  *    Not thread safe
4030  *
4031  *  Parameters:
4032  *
4033  *    inWindow:
4034  *      The window whose activation scope to set.
4035  *
4036  *    inScope:
4037  *      The new activation scope.
4038  *
4039  *  Availability:
4040  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4041  *    CarbonLib:        in CarbonLib 1.4 and later
4042  *    Non-Carbon CFM:   not available
4043  }
SetWindowActivationScopenull4044 function SetWindowActivationScope( inWindow: WindowRef; inScope: WindowActivationScope ): OSStatus; external name '_SetWindowActivationScope';
4045 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4046 
4047 
4048 {--------------------------------------------------------------------------------------}
4049 {  � Window Focus                                                                      }
4050 { The 'user focus' is where keyboard input goes. We also use the term 'key' applied    }
4051 { to windows to mean this. The user focus window is normally the active non-floating   }
4052 { window or dialog. It is possible to make a floater get the focus, however, by calling}
4053 { SetUserFocusWindow. After that call, the event model will automatically route key    }
4054 { input to the active keyboard focus of that window, if any. Passing kUserFocusAuto    }
4055 { into the window parameter tells the toolbox to pick what it considers to be the best }
4056 { candidate for focus. You should call this to restore focus, rather than getting the  }
4057 { focus, setting it to a special window, and then restoring to the saved focus. There  }
4058 { are cases, however, when you might want to restore to an explicit window, but the    }
4059 { typical usage should just be to restore to the kUserFocusAuto focus.                 }
4060 { Keep in mind that setting the focus will only last until you restore focus, or the   }
4061 { user starts clicking in other windows. When that happens, the toolbox will auto-     }
4062 { redirect the user focus to a newly selected window.                                  }
4063 {--------------------------------------------------------------------------------------}
4064 { pick the most appropriate window for focus}
4065 {$endc} {not TARGET_CPU_64}
4066 
4067 const kUserFocusAuto = WindowRef(-1);
4068 {$ifc not TARGET_CPU_64}
4069 {
4070  *  SetUserFocusWindow()
4071  *
4072  *  Summary:
4073  *    Sets the window that receives keyboard input.
4074  *
4075  *  Mac OS X threading:
4076  *    Not thread safe
4077  *
4078  *  Parameters:
4079  *
4080  *    inWindow:
4081  *      The window that should receive user input. You may also pass
4082  *      kUserFocusAuto to cause the toolbox to pick a default window
4083  *      for user focus (typically, this will be the active window).
4084  *
4085  *
4086  *      If the focus changes to a new window, the
4087  *      kEventWindowFocusAcquired Carbon event will be sent to the
4088  *      newly focused window, and the kEventWindowFocusRelinquish
4089  *      Carbon event will be sent to the previously focused window.
4090  *
4091  *  Availability:
4092  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4093  *    CarbonLib:        in CarbonLib 1.1 and later
4094  *    Non-Carbon CFM:   not available
4095  }
SetUserFocusWindownull4096 function SetUserFocusWindow( inWindow: WindowRef ): OSStatus; external name '_SetUserFocusWindow';
4097 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4098 
4099 
4100 {
4101  *  GetUserFocusWindow()
4102  *
4103  *  Summary:
4104  *    Returns the window that receives keyboard input.
4105  *
4106  *  Mac OS X threading:
4107  *    Not thread safe
4108  *
4109  *  Result:
4110  *    The window that is currently receiving keyboard input.
4111  *
4112  *  Availability:
4113  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4114  *    CarbonLib:        in CarbonLib 1.1 and later
4115  *    Non-Carbon CFM:   not available
4116  }
GetUserFocusWindownull4117 function GetUserFocusWindow: WindowRef; external name '_GetUserFocusWindow';
4118 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4119 
4120 
4121 {
4122  *  HIWindowShowsFocus()
4123  *
4124  *  Summary:
4125  *    Returns whether a window's content should show focus indicators,
4126  *    such as focus rings.
4127  *
4128  *  Discussion:
4129  *    This API returns true if the window is either the modeless focus
4130  *    or the effective focus.
4131  *
4132  *  Mac OS X threading:
4133  *    Not thread safe
4134  *
4135  *  Parameters:
4136  *
4137  *    inWindow:
4138  *      The window whose status to return.
4139  *
4140  *  Result:
4141  *    Whether this window's content should show focus indicators.
4142  *
4143  *  Availability:
4144  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
4145  *    CarbonLib:        not available
4146  *    Non-Carbon CFM:   not available
4147  }
HIWindowShowsFocusnull4148 function HIWindowShowsFocus( inWindow: WindowRef ): Boolean; external name '_HIWindowShowsFocus';
4149 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
4150 
4151 
4152 {--------------------------------------------------------------------------------------}
4153 {  � Default/Cancel buttons                                                            }
4154 { In our quest to eliminate the need for dialogs when using the new event model, we    }
4155 { have added the following routines which add dialog-like button control to normal     }
4156 { windows. With these routines, you can set the default and cancel buttons for a       }
4157 { window; these work just like the corresponding concepts in dialogs, and when         }
4158 { present, the standard toolbox handlers will handle keyboard input mapping to these   }
4159 { buttons. This means that pressing return or enter will 'press' the default button    }
4160 { and escape or command-period will 'press' the cancel button.                         }
4161 {--------------------------------------------------------------------------------------}
4162 
4163 {
4164  *  SetWindowDefaultButton()
4165  *
4166  *  Mac OS X threading:
4167  *    Not thread safe
4168  *
4169  *  Availability:
4170  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4171  *    CarbonLib:        in CarbonLib 1.1 and later
4172  *    Non-Carbon CFM:   not available
4173  }
SetWindowDefaultButtonnull4174 function SetWindowDefaultButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowDefaultButton';
4175 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4176 
4177 
4178 {
4179  *  SetWindowCancelButton()
4180  *
4181  *  Mac OS X threading:
4182  *    Not thread safe
4183  *
4184  *  Availability:
4185  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4186  *    CarbonLib:        in CarbonLib 1.1 and later
4187  *    Non-Carbon CFM:   not available
4188  }
SetWindowCancelButtonnull4189 function SetWindowCancelButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowCancelButton';
4190 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4191 
4192 
4193 {
4194  *  GetWindowDefaultButton()
4195  *
4196  *  Mac OS X threading:
4197  *    Not thread safe
4198  *
4199  *  Availability:
4200  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4201  *    CarbonLib:        in CarbonLib 1.1 and later
4202  *    Non-Carbon CFM:   not available
4203  }
GetWindowDefaultButtonnull4204 function GetWindowDefaultButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowDefaultButton';
4205 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4206 
4207 
4208 {
4209  *  GetWindowCancelButton()
4210  *
4211  *  Mac OS X threading:
4212  *    Not thread safe
4213  *
4214  *  Availability:
4215  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4216  *    CarbonLib:        in CarbonLib 1.1 and later
4217  *    Non-Carbon CFM:   not available
4218  }
GetWindowCancelButtonnull4219 function GetWindowCancelButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowCancelButton';
4220 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4221 
4222 
4223 {----------------------------------------------------------------------------------}
4224 {  ��ThemeBrush and ThemeTextColor support                                         }
4225 {----------------------------------------------------------------------------------}
4226 {
4227  *  SetThemeWindowBackground()
4228  *
4229  *  Mac OS X threading:
4230  *    Not thread safe
4231  *
4232  *  Availability:
4233  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4234  *    CarbonLib:        in CarbonLib 1.0 and later
4235  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
4236  }
SetThemeWindowBackgroundnull4237 function SetThemeWindowBackground( inWindow: WindowRef; inBrush: ThemeBrush; inUpdate: Boolean ): OSStatus; external name '_SetThemeWindowBackground';
4238 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4239 
4240 
4241 {
4242  *  HIWindowGetThemeBackground()
4243  *
4244  *  Summary:
4245  *    Gets the the window theme background brush.
4246  *
4247  *  Discussion:
4248  *    Gets the the window theme background brush which may have been
4249  *    previously set by SetThemeWindowBackground.
4250  *
4251  *  Mac OS X threading:
4252  *    Not thread safe
4253  *
4254  *  Parameters:
4255  *
4256  *    inWindow:
4257  *      The window from which to get the brush.
4258  *
4259  *    outThemeBrush:
4260  *      On return, inWindow's background brush.
4261  *
4262  *  Result:
4263  *    An operating system result code. If no brush is found
4264  *    themeNoAppropriateBrushErr will be returned.
4265  *
4266  *  Availability:
4267  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
4268  *    CarbonLib:        not available
4269  *    Non-Carbon CFM:   not available
4270  }
HIWindowGetThemeBackgroundnull4271 function HIWindowGetThemeBackground( inWindow: WindowRef; var outThemeBrush: ThemeBrush ): OSStatus; external name '_HIWindowGetThemeBackground';
4272 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
4273 
4274 
4275 {
4276  *  SetThemeTextColorForWindow()
4277  *
4278  *  Summary:
4279  *    Sets a text color which contrasts with a theme brush.
4280  *
4281  *  Discussion:
4282  *    SetThemeTextColorForWindow sets a text color in the specified
4283  *    window's port that contrasts with the theme brush associated with
4284  *    the specified window, and also matches the inActive parameter.
4285  *    Only a subset of the theme brushes have theme text colors:
4286  *    currently (as of Mac OS 9 and Mac OS X 10.5), the Alert, Dialog,
4287  *    ModelessDialog, and Notification brushes have corresponding text
4288  *    colors. For any other brush, SetThemeTextColorForWindow returns
4289  *    themeNoAppropriateBrushErr and does not modify the text color.
4290  *
4291  *  Mac OS X threading:
4292  *    Not thread safe
4293  *
4294  *  Parameters:
4295  *
4296  *    inWindow:
4297  *      The window whose text color to change.
4298  *
4299  *    inActive:
4300  *      Whether the text color should indicate an active or inactive
4301  *      state.
4302  *
4303  *    inDepth:
4304  *      The bit depth of the window's port.
4305  *
4306  *    inColorDev:
4307  *      Whether the window's port is color or black&white.
4308  *
4309  *  Result:
4310  *    An operating system result code, including
4311  *    themeNoAppropriateBrushErr if the specified theme brush does not
4312  *    have a corresponding theme text color.
4313  *
4314  *  Availability:
4315  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4316  *    CarbonLib:        in CarbonLib 1.0 and later
4317  *    Non-Carbon CFM:   in AppearanceLib 1.1 and later
4318  }
SetThemeTextColorForWindownull4319 function SetThemeTextColorForWindow( inWindow: WindowRef; inActive: Boolean; inDepth: SInt16; inColorDev: Boolean ): OSStatus; external name '_SetThemeTextColorForWindow';
4320 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4321 
4322 
4323 {��������������������������������������������������������������������������������������}
4324 { � Background Image                                                                   }
4325 {��������������������������������������������������������������������������������������}
4326 {
4327    Routines available from Mac OS 8.5 forward
4328    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
4329 }
4330 {
4331  *  SetWindowContentColor()
4332  *
4333  *  Mac OS X threading:
4334  *    Not thread safe
4335  *
4336  *  Availability:
4337  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4338  *    CarbonLib:        in CarbonLib 1.0 and later
4339  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
4340  }
SetWindowContentColornull4341 function SetWindowContentColor( window: WindowRef; const (*var*) color: RGBColor ): OSStatus; external name '_SetWindowContentColor';
4342 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4343 
4344 
4345 {
4346  *  GetWindowContentColor()
4347  *
4348  *  Mac OS X threading:
4349  *    Not thread safe
4350  *
4351  *  Availability:
4352  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4353  *    CarbonLib:        in CarbonLib 1.0 and later
4354  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
4355  }
GetWindowContentColornull4356 function GetWindowContentColor( window: WindowRef; var color: RGBColor ): OSStatus; external name '_GetWindowContentColor';
4357 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4358 
4359 
4360 { Routines available from Mac OS 8.5 forward}
4361 {
4362  *  GetWindowContentPattern()
4363  *
4364  *  Mac OS X threading:
4365  *    Not thread safe
4366  *
4367  *  Availability:
4368  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4369  *    CarbonLib:        in CarbonLib 1.0 and later
4370  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
4371  }
GetWindowContentPatternnull4372 function GetWindowContentPattern( window: WindowRef; outPixPat: PixPatHandle ): OSStatus; external name '_GetWindowContentPattern';
4373 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4374 
4375 
4376 {
4377  *  SetWindowContentPattern()
4378  *
4379  *  Mac OS X threading:
4380  *    Not thread safe
4381  *
4382  *  Availability:
4383  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4384  *    CarbonLib:        in CarbonLib 1.0 and later
4385  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
4386  }
SetWindowContentPatternnull4387 function SetWindowContentPattern( window: WindowRef; pixPat: PixPatHandle ): OSStatus; external name '_SetWindowContentPattern';
4388 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4389 
4390 
4391 {��������������������������������������������������������������������������������������}
4392 { � Colorspace and Depth                                                               }
4393 {��������������������������������������������������������������������������������������}
4394 {
4395  *  HIWindowSetColorSpace()
4396  *
4397  *  Summary:
4398  *    Sets the colorspace used for window content that is drawn by the
4399  *    application with no other specified colorspace.
4400  *
4401  *  Discussion:
4402  *    Typically this API should be used immediately after a window is
4403  *    created, before the window is made visible. If the window
4404  *    colorspace is changed while the window is visible, the window
4405  *    will be redrawn.
4406  *
4407  *    Note that setting a colorspace on a window with the
4408  *    kHIWindowBitAutoCalibration attribute prevents the window from
4409  *    receiving automatic color space updates. Clearing the colorspace
4410  *    by passing NULL restores the kHIWindowBitAutoCalibration
4411  *    functionality.
4412  *
4413  *  Mac OS X threading:
4414  *    Not thread safe
4415  *
4416  *  Parameters:
4417  *
4418  *    inWindow:
4419  *      The window whose colorspace to change.
4420  *
4421  *    inColorSpace:
4422  *      The window's new colorspace. The colorspace will be retained or
4423  *      copied by the window. Pass NULL to clear any previously-set
4424  *      colorspace.
4425  *
4426  *  Availability:
4427  *    Mac OS X:         in version 10.6 and later in Carbon.framework [32-bit only]
4428  *    CarbonLib:        not available
4429  *    Non-Carbon CFM:   not available
4430  }
HIWindowSetColorSpacenull4431 function HIWindowSetColorSpace( inWindow: WindowRef; inColorSpace: CGColorSpaceRef { can be NULL } ): OSStatus; external name '_HIWindowSetColorSpace';
4432 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
4433 
4434 
4435 {
4436  *  HIWindowCopyColorSpace()
4437  *
4438  *  Summary:
4439  *    Retrieves the colorspace for a window.
4440  *
4441  *  Discussion:
4442  *    If this API is called before a color space has been explicitly
4443  *    assigned to a window, the window's default colorspace is returned.
4444  *
4445  *  Mac OS X threading:
4446  *    Not thread safe
4447  *
4448  *  Parameters:
4449  *
4450  *    inWindow:
4451  *      The window whose colorspace to retrieve.
4452  *
4453  *  Result:
4454  *    The window's colorspace, or NULL if an error occurs. The
4455  *    colorspace has been retained and should be released by the caller
4456  *    when the caller is done with it.
4457  *
4458  *  Availability:
4459  *    Mac OS X:         in version 10.6 and later in Carbon.framework [32-bit only]
4460  *    CarbonLib:        not available
4461  *    Non-Carbon CFM:   not available
4462  }
HIWindowCopyColorSpacenull4463 function HIWindowCopyColorSpace( inWindow: WindowRef ): CGColorSpaceRef; external name '_HIWindowCopyColorSpace';
4464 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
4465 
4466 
4467 {$endc} {not TARGET_CPU_64}
4468 
4469 
4470 {
4471  *  Summary:
4472  *    Window backing store depth types.
4473  }
4474 const
4475 {
4476    * The window is invalid or its backing store pixel size is unknown.
4477    }
4478 	kHIWindowDepthInvalid = 0;
4479 
4480   {
4481    * The window's backing store pixel size should be 32 bits.
4482    }
4483 	kHIWindowDepth32Bit = 1;
4484 
4485   {
4486    * The window's backing store pixel size should be 64 bits.
4487    }
4488 	kHIWindowDepth64Bit = 2;
4489 
4490   {
4491    * The window's backing store pixel size should be the size of a
4492    * float.
4493    }
4494 	kHIWindowDepthFloat = 3;
4495 
4496 type
4497 	HIWindowDepth = UInt32;
4498 {$ifc not TARGET_CPU_64}
4499 {
4500  *  HIWindowSetDepth()   *** DEPRECATED ***
4501  *
4502  *  Deprecated:
4503  *    This API is not actually functional in Mac OS X 10.6 or Mac OS X
4504  *    10.7 and should not be used. Applications that need to control
4505  *    the backing store depth of their windows should use NSWindows and
4506  *    the [NSWindow setDepthLimit:] API.
4507  *
4508  *  Summary:
4509  *    Sets the depth of a window's backing store.
4510  *
4511  *  Discussion:
4512  *    Typically this API should be used immediately after a window is
4513  *    created, before the window is made visible. If the window depth
4514  *    is changed while the window is visible, the window will be
4515  *    redrawn.
4516  *
4517  *  Mac OS X threading:
4518  *    Not thread safe
4519  *
4520  *  Parameters:
4521  *
4522  *    inWindow:
4523  *      The window whose backing store depth to change.
4524  *
4525  *    inDepth:
4526  *      The new window depth type. This must be one of
4527  *      kHIWindowDepth32Bit, 64Bit, or Float.
4528  *
4529  *  Availability:
4530  *    Mac OS X:         in version 10.6 and later in Carbon.framework [32-bit only] but deprecated in 10.7
4531  *    CarbonLib:        not available
4532  *    Non-Carbon CFM:   not available
4533  }
HIWindowSetDepthnull4534 function HIWindowSetDepth( inWindow: WindowRef; inDepth: HIWindowDepth ): OSStatus; external name '_HIWindowSetDepth';
4535 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
4536 
4537 
4538 {
4539  *  HIWindowGetDepth()
4540  *
4541  *  Summary:
4542  *    Returns the current depth of the backing store of a window.
4543  *
4544  *  Discussion:
4545  *    This API returns an HIWindowDepth value corresponding to the
4546  *    actual depth of the backing store. It will return one of
4547  *    kHIWindowDepth32Bit, 64Bit, or Float.
4548  *
4549  *  Mac OS X threading:
4550  *    Not thread safe
4551  *
4552  *  Parameters:
4553  *
4554  *    inWindow:
4555  *      The window whose backing store depth to return.
4556  *
4557  *  Result:
4558  *    The window's backing store depth type (one of
4559  *    kHIWindowDepth32Bit, 64Bit, or Float), or kHIWindowDepthInvalid
4560  *    if an error occurs.
4561  *
4562  *  Availability:
4563  *    Mac OS X:         in version 10.6 and later in Carbon.framework [32-bit only]
4564  *    CarbonLib:        not available
4565  *    Non-Carbon CFM:   not available
4566  }
HIWindowGetDepthnull4567 function HIWindowGetDepth( inWindow: WindowRef ): HIWindowDepth; external name '_HIWindowGetDepth';
4568 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
4569 
4570 
4571 {��������������������������������������������������������������������������������������}
4572 { � Scrolling Routines                                                                 }
4573 {��������������������������������������������������������������������������������������}
4574 {$endc} {not TARGET_CPU_64}
4575 
4576 type
4577 	ScrollWindowOptions = UInt32;
4578 const
4579 	kScrollWindowNoOptions = 0;
4580 	kScrollWindowInvalidate = 1 shl 0; { add the exposed area to the window�s update region}
4581 	kScrollWindowEraseToPortBackground = 1 shl 1; { erase the exposed area using the background color/pattern of the window�s grafport}
4582 
4583 
4584 { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
4585 
4586 {$ifc not TARGET_CPU_64}
4587 {
4588  *  ScrollWindowRect()
4589  *
4590  *  Summary:
4591  *    Moves a rectangular portion of a window by a specified horizontal
4592  *    and vertical amount.
4593  *
4594  *  Discussion:
4595  *    This API is only recommended for non-composited windows. For a
4596  *    composited window, use HIViewScrollRect or simply invalidate the
4597  *    view and redraw it at its scrolled position.
4598  *
4599  *  Mac OS X threading:
4600  *    Not thread safe
4601  *
4602  *  Availability:
4603  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4604  *    CarbonLib:        in CarbonLib 1.0 and later
4605  *    Non-Carbon CFM:   not available
4606  }
ScrollWindowRectnull4607 function ScrollWindowRect( inWindow: WindowRef; const (*var*) inScrollRect: Rect; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRect';
4608 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4609 
4610 
4611 {
4612  *  ScrollWindowRegion()
4613  *
4614  *  Summary:
4615  *    Moves a non-rectangular portion of a window by a specified
4616  *    horizontal and vertical amount.
4617  *
4618  *  Discussion:
4619  *    This API is only recommended for non-composited windows. For a
4620  *    composited window, use HIViewScrollRect or simply invalidate the
4621  *    view and redraw it at its scrolled position.
4622  *
4623  *  Mac OS X threading:
4624  *    Not thread safe
4625  *
4626  *  Availability:
4627  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4628  *    CarbonLib:        in CarbonLib 1.0 and later
4629  *    Non-Carbon CFM:   not available
4630  }
ScrollWindowRegionnull4631 function ScrollWindowRegion( inWindow: WindowRef; inScrollRgn: RgnHandle; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRegion';
4632 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4633 
4634 
4635 {��������������������������������������������������������������������������������������}
4636 { � Window List                                                                        }
4637 {��������������������������������������������������������������������������������������}
4638 {$endc} {not TARGET_CPU_64}
4639 
4640 
4641 {
4642  *  Summary:
4643  *    Options for the HIWindowFindAtLocation API.
4644  }
4645 const
4646 {
4647    * Requests that HIWindowFindAtLocation ignore windows of other
4648    * processes which might obscure your process's windows. That is, if
4649    * a window in your process is at the specified point, it will be
4650    * passed back even if some other process's window obscures it.
4651    }
4652 	kHIWindowIgnoreObscuringWindows = 1 shl 0;
4653 
4654 {$ifc not TARGET_CPU_64}
4655 {
4656  *  HIWindowFindAtLocation()
4657  *
4658  *  Summary:
4659  *    Finds a window in the current process at a specified location.
4660  *
4661  *  Mac OS X threading:
4662  *    Not thread safe
4663  *
4664  *  Parameters:
4665  *
4666  *    inLocation:
4667  *      The global location. This may be specified in either screen
4668  *      pixel coordinates or virtual 72DPI coordinates, depending on
4669  *      the inSpace parameter.
4670  *
4671  *    inSpace:
4672  *      The coordinate space in which the location is expressed. This
4673  *      must be kHICoordSpaceScreenPixel or kHICoordSpace72DPIGlobal.
4674  *
4675  *    inStartWindow:
4676  *      The window at which to start the search, inclusive. Pass
4677  *      kFirstWindowOfClass (-1) to start the search at the beginning
4678  *      of the window list. Passing NULL will cause the search to start
4679  *      at the end of the window list, and therefore no window will be
4680  *      found.
4681  *
4682  *    inOptions:
4683  *      Flags allowing you to request optional behavior for this API.
4684  *      If you want the default behavior, pass zero.
4685  *
4686  *    outWindow:
4687  *      On exit, contains the window in the current process at the
4688  *      specified location, if any.
4689  *
4690  *    outWindowPart:
4691  *      On exit, identifies the window part that was hit. You may pass
4692  *      NULL if you don't need this information.
4693  *
4694  *    outWindowLocation:
4695  *      On exit, contains the specified location transformed into
4696  *      window-relative coordinates. This location will take into
4697  *      account any window transform or magnification.
4698  *
4699  *  Availability:
4700  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
4701  *    CarbonLib:        not available
4702  *    Non-Carbon CFM:   not available
4703  }
HIWindowFindAtLocationnull4704 function HIWindowFindAtLocation( const (*var*) inLocation: HIPoint; inSpace: HICoordinateSpace; inStartWindow: WindowRef { can be NULL }; inOptions: OptionBits; var outWindow: WindowRef; outWindowPart: WindowPartCodePtr { can be NULL }; outWindowLocation: HIPointPtr { can be NULL } ): OSStatus; external name '_HIWindowFindAtLocation';
4705 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
4706 
4707 
4708 {
4709  *  [Mac]FindWindow()
4710  *
4711  *  Mac OS X threading:
4712  *    Not thread safe
4713  *
4714  *  Availability:
4715  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4716  *    CarbonLib:        in CarbonLib 1.0 and later
4717  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
4718  }
4719 {$ifc TARGET_OS_MAC}
MacFindWindownull4720 function MacFindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
4721 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4722 {$endc} {TARGET_OS_MAC}
FindWindownull4723 function FindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
4724 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4725 
4726 
4727 {
4728  *  BringToFront()
4729  *
4730  *  Mac OS X threading:
4731  *    Not thread safe
4732  *
4733  *  Availability:
4734  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4735  *    CarbonLib:        in CarbonLib 1.0 and later
4736  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
4737  }
4738 procedure BringToFront( window: WindowRef ); external name '_BringToFront';
4739 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4740 
4741 
4742 {
4743  *  SendBehind()
4744  *
4745  *  Mac OS X threading:
4746  *    Not thread safe
4747  *
4748  *  Availability:
4749  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4750  *    CarbonLib:        in CarbonLib 1.0 and later
4751  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
4752  }
4753 procedure SendBehind( window: WindowRef; behindWindow: WindowRef ); external name '_SendBehind';
4754 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4755 
4756 
4757 {
4758  *  SelectWindow()
4759  *
4760  *  Mac OS X threading:
4761  *    Not thread safe
4762  *
4763  *  Availability:
4764  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4765  *    CarbonLib:        in CarbonLib 1.0 and later
4766  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
4767  }
4768 procedure SelectWindow( window: WindowRef ); external name '_SelectWindow';
4769 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4770 
4771 
4772 {
4773    Routines available from Mac OS 8.6 forward
4774    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
4775 }
4776 
4777 {
4778  *  FrontNonFloatingWindow()
4779  *
4780  *  Mac OS X threading:
4781  *    Not thread safe
4782  *
4783  *  Availability:
4784  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4785  *    CarbonLib:        in CarbonLib 1.0 and later
4786  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
4787  }
FrontNonFloatingWindownull4788 function FrontNonFloatingWindow: WindowRef; external name '_FrontNonFloatingWindow';
4789 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4790 
4791 
4792 { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
4793 
4794 {
4795  *  GetNextWindowOfClass()
4796  *
4797  *  Mac OS X threading:
4798  *    Not thread safe
4799  *
4800  *  Availability:
4801  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4802  *    CarbonLib:        in CarbonLib 1.0 and later
4803  *    Non-Carbon CFM:   not available
4804  }
GetNextWindowOfClassnull4805 function GetNextWindowOfClass( inWindow: WindowRef; inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetNextWindowOfClass';
4806 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4807 
4808 
4809 {
4810  *  GetFrontWindowOfClass()
4811  *
4812  *  Mac OS X threading:
4813  *    Not thread safe
4814  *
4815  *  Availability:
4816  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4817  *    CarbonLib:        in CarbonLib 1.0 and later
4818  *    Non-Carbon CFM:   not available
4819  }
GetFrontWindowOfClassnull4820 function GetFrontWindowOfClass( inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetFrontWindowOfClass';
4821 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4822 
4823 
4824 {
4825  *  FindWindowOfClass()
4826  *
4827  *  Mac OS X threading:
4828  *    Not thread safe
4829  *
4830  *  Availability:
4831  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4832  *    CarbonLib:        in CarbonLib 1.0 and later
4833  *    Non-Carbon CFM:   not available
4834  }
FindWindowOfClassnull4835 function FindWindowOfClass( const (*var*) where: Point; inWindowClass: WindowClass; var outWindow: WindowRef; outWindowPart: WindowPartCodePtr { can be NULL } ): OSStatus; external name '_FindWindowOfClass';
4836 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4837 
4838 
4839 {$endc} {not TARGET_CPU_64}
4840 
4841 
4842 {
4843  *  Summary:
4844  *    Options for the CreateStandardWindowMenu API.
4845  }
4846 const
4847 {
4848    * Requests the standard window menu include a Rotate Windows menu
4849    * item. Available in Mac OS X 10.2.
4850    }
4851 	kWindowMenuIncludeRotate = 1 shl 0;
4852 
4853 
4854 {
4855  *  Summary:
4856  *    Constants for use with Get/SetMenuItemProperty to access property
4857  *    data of items in the standard window menu. These constants are
4858  *    supported on Mac OS X 10.5 and later.
4859  }
4860 const
4861 {
4862    * The property creator for accessing standard window menu item
4863    * properties.
4864    }
4865 	kHIWindowMenuCreator = FourCharCode('wind');
4866 
4867   {
4868    * The property tag for accessing standard window menu item
4869    * properties that hold WindowRefs. Menu items with the
4870    * kHICommandSelectWindow command ID will have a property with this
4871    * tag that contains the WindowRef to be activated when that item is
4872    * selected. Available in Mac OS X 10.5 and later.
4873    }
4874 	kHIWindowMenuWindowTag = FourCharCode('wind');
4875 
4876 {$ifc not TARGET_CPU_64}
4877 {
4878  *  CreateStandardWindowMenu()
4879  *
4880  *  Discussion:
4881  *    Creates a standard Window menu for your application. You can call
4882  *    this to create a window menu for your application. Once you have
4883  *    the menu, you need to insert it in your menu bar (typically at
4884  *    the end of your menu list) with a call to InsertMenu. To register
4885  *    a window to be tracked by this menu, you either create your
4886  *    window with CreateNewWindow, passing the
4887  *    kWindowInWindowMenuAttribute, or you can use
4888  *    ChangeWindowAttributes after the window is created. The Toolbox
4889  *    takes care of acting on the standard items such as zoom and
4890  *    minimize, as well as bringing selected windows to the front. All
4891  *    you need to do is install it and register your windows and the
4892  *    Toolbox does the rest.
4893  *
4894  *    You may also add your own menu items to the standard window menu.
4895  *    To do this, we recommend that you use the
4896  *    GetIndMenuItemWithCommandID API to locate one of the standard
4897  *    menu items in the menu which is immediately above or below the
4898  *    location where you wish to insert your items. Then insert your
4899  *    items relative to the position of the standard menu item. Do not
4900  *    attempt to search the menu items yourself without calling
4901  *    GetIndMenuItemWithCommandID; in Mac OS X 10.2,
4902  *    CreateStandardWindowMenu returns an initially empty menu which is
4903  *    populated later when the menu is displayed or when
4904  *    GetIndMenuItemWithCommandID is called, so you will find no items
4905  *    in the menu unless you first call GetIndMenuItemWithCommandID.
4906  *
4907  *    There is a known bug in all versions of CarbonLib which causes
4908  *    the Zoom, Collapse, and Uncollapse menu items in the standard
4909  *    window menu to be non-functional for windows created by the
4910  *    Dialog Manager. To work around this bug, you can install your own
4911  *    event handlers on the dialog window for kEventWindowZoom,
4912  *    kEventWindowCollapse, and kEventWindowExpand, and handle the
4913  *    event by calling the appropriate Window Manager API.
4914  *
4915  *  Mac OS X threading:
4916  *    Not thread safe
4917  *
4918  *  Parameters:
4919  *
4920  *    inOptions:
4921  *      Requests optional behavior of the standard window menu. Mac OS
4922  *      X 10.2 supports the kWindowMenuIncludeRotate option; in earlier
4923  *      versions of Mac OS X, and in CarbonLib, you must pass zero for
4924  *      this parameter.
4925  *
4926  *    outMenu:
4927  *      Receives a new menu reference which contains the standard
4928  *      window menu items and commands.
4929  *
4930  *  Result:
4931  *    An operating system status code.
4932  *
4933  *  Availability:
4934  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4935  *    CarbonLib:        in CarbonLib 1.1 and later
4936  *    Non-Carbon CFM:   not available
4937  }
CreateStandardWindowMenunull4938 function CreateStandardWindowMenu( inOptions: OptionBits; var outMenu: MenuRef ): OSStatus; external name '_CreateStandardWindowMenu';
4939 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4940 
4941 
4942 {
4943  *  SetWindowAlternateTitle()
4944  *
4945  *  Discussion:
4946  *    This API sets an alternate title for a window. The alternate
4947  *    title overrides what is displayed in the Window menu. If you do
4948  *    not set an alternate title, the normal window title is used. You
4949  *    would normally use this if the window title was not expressive
4950  *    enough to be used in the Window menu (or similar text-only
4951  *    situation).
4952  *
4953  *  Mac OS X threading:
4954  *    Not thread safe
4955  *
4956  *  Parameters:
4957  *
4958  *    inWindow:
4959  *      The window to set the alternate title.
4960  *
4961  *    inTitle:
4962  *      The alternate title for the window. Passing NULL for this
4963  *      parameter will remove any alternate title that might be present.
4964  *
4965  *  Result:
4966  *    An operating system status code.
4967  *
4968  *  Availability:
4969  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4970  *    CarbonLib:        in CarbonLib 1.1 and later
4971  *    Non-Carbon CFM:   not available
4972  }
SetWindowAlternateTitlenull4973 function SetWindowAlternateTitle( inWindow: WindowRef; inTitle: CFStringRef ): OSStatus; external name '_SetWindowAlternateTitle';
4974 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4975 
4976 
4977 {
4978  *  CopyWindowAlternateTitle()
4979  *
4980  *  Discussion:
4981  *    This API gets the alternate title for a window. See the
4982  *    discussion of SetWindowAlternateTitle for more info.
4983  *
4984  *  Mac OS X threading:
4985  *    Not thread safe
4986  *
4987  *  Parameters:
4988  *
4989  *    inWindow:
4990  *      The window to get the alternate title from.
4991  *
4992  *    outTitle:
4993  *      Receives the alternate title for the window. If the window does
4994  *      not have an alternate title, NULL will be returned in outTitle.
4995  *
4996  *  Result:
4997  *    An operating system status code.
4998  *
4999  *  Availability:
5000  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5001  *    CarbonLib:        in CarbonLib 1.1 and later
5002  *    Non-Carbon CFM:   not available
5003  }
CopyWindowAlternateTitlenull5004 function CopyWindowAlternateTitle( inWindow: WindowRef; var outTitle: CFStringRef ): OSStatus; external name '_CopyWindowAlternateTitle';
5005 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5006 
5007 
5008 {��������������������������������������������������������������������������������������}
5009 { � Misc Low-Level stuff                                                               }
5010 {��������������������������������������������������������������������������������������}
5011 {
5012    Routines available from Mac OS 8.5 forward
5013    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
5014 }
5015 {
5016  *  IsValidWindowPtr()
5017  *
5018  *  Mac OS X threading:
5019  *    Not thread safe
5020  *
5021  *  Availability:
5022  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5023  *    CarbonLib:        in CarbonLib 1.0 and later
5024  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5025  }
IsValidWindowPtrnull5026 function IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowPtr';
5027 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
IsValidWindowRef__NAME__IsValidWindowPtrnull5028 function IsValidWindowRef__NAME__IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowRef__NAME__IsValidWindowPtr';
5029 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5030 
5031 
5032 {��������������������������������������������������������������������������������������}
5033 { � Various & Sundry Window Accessors                                                  }
5034 {��������������������������������������������������������������������������������������}
5035 {
5036  *  HiliteWindow()
5037  *
5038  *  Summary:
5039  *    Hilites or unhilites a window's frame.
5040  *
5041  *  Discussion:
5042  *    Hiliting a window's frame is not the same as activating the
5043  *    window. A window's hilited state determines whether the window
5044  *    draws its titlebar and associated widgets as if they were the
5045  *    frontmost window of its window group, whereas a window's active
5046  *    state determines whether the window really is the frontmost
5047  *    window of its window group. Activating or deactivating a window
5048  *    automatically adjusts a window's hilited state to match.
5049  *
5050  *    In general, only very old compatibility code would ever need or
5051  *    want to manually modify a window's hilited state via the
5052  *    HiliteWindow API. Modern clients can typically avoid this API
5053  *    entirely.
5054  *
5055  *  Mac OS X threading:
5056  *    Not thread safe
5057  *
5058  *  Parameters:
5059  *
5060  *    window:
5061  *      The window whose frame you wish to hilite/unhilite.
5062  *
5063  *    fHilite:
5064  *      Whether to hilite or unhilite the window's frame.
5065  *
5066  *  Availability:
5067  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5068  *    CarbonLib:        in CarbonLib 1.0 and later
5069  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
5070  }
5071 procedure HiliteWindow( window: WindowRef; fHilite: Boolean ); external name '_HiliteWindow';
5072 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5073 
5074 
5075 {
5076  *  SetWRefCon()
5077  *
5078  *  Mac OS X threading:
5079  *    Not thread safe
5080  *
5081  *  Availability:
5082  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5083  *    CarbonLib:        in CarbonLib 1.0 and later
5084  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
5085  }
5086 procedure SetWRefCon( window: WindowRef; data: SRefCon ); external name '_SetWRefCon';
5087 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5088 
5089 
5090 {
5091  *  GetWRefCon()
5092  *
5093  *  Mac OS X threading:
5094  *    Not thread safe
5095  *
5096  *  Availability:
5097  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5098  *    CarbonLib:        in CarbonLib 1.0 and later
5099  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
5100  }
GetWRefConnull5101 function GetWRefCon( window: WindowRef ): SRefCon; external name '_GetWRefCon';
5102 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5103 
5104 
5105 { Routines available from Mac OS 8.0 (Appearance 1.0) forward}
5106 {
5107  *  GetWindowFeatures()
5108  *
5109  *  Mac OS X threading:
5110  *    Not thread safe
5111  *
5112  *  Availability:
5113  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5114  *    CarbonLib:        in CarbonLib 1.0 and later
5115  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
5116  }
GetWindowFeaturesnull5117 function GetWindowFeatures( window: WindowRef; var outFeatures: UInt32 ): OSStatus; external name '_GetWindowFeatures';
5118 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5119 
5120 
5121 {
5122  *  HIWindowCopyShape()
5123  *
5124  *  Summary:
5125  *    Retrieves a shape describing a specified region of a window.
5126  *
5127  *  Mac OS X threading:
5128  *    Not thread safe
5129  *
5130  *  Parameters:
5131  *
5132  *    inWindow:
5133  *      The window whose shape to return.
5134  *
5135  *    inRegion:
5136  *      The window region whose shape to return.
5137  *
5138  *    inSpace:
5139  *      The coordinate space in which the shape should be returned.
5140  *      This must be kHICoordSpaceWindow, kHICoordSpaceScreenPixel, or
5141  *      kHICoordSpace72DPIGlobal.
5142  *
5143  *    outShape:
5144  *      On exit, contains a shape describing the specified window
5145  *      region. If the region is not supported, this parameter is not
5146  *      modified.
5147  *
5148  *  Result:
5149  *    An operating system result code. errWindowRegionCodeInvalid is
5150  *    returned if the window does not support the specified window
5151  *    region.
5152  *
5153  *  Availability:
5154  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
5155  *    CarbonLib:        not available
5156  *    Non-Carbon CFM:   not available
5157  }
HIWindowCopyShapenull5158 function HIWindowCopyShape( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; var outShape: HIShapeRef ): OSStatus; external name '_HIWindowCopyShape';
5159 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
5160 
5161 
5162 {
5163  *  GetWindowRegion()   *** DEPRECATED ***
5164  *
5165  *  Deprecated:
5166  *    Use HIWindowCopyShape instead.
5167  *
5168  *  Mac OS X threading:
5169  *    Not thread safe
5170  *
5171  *  Availability:
5172  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
5173  *    CarbonLib:        in CarbonLib 1.0 and later
5174  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
5175  }
GetWindowRegionnull5176 function GetWindowRegion( window: WindowRef; inRegionCode: WindowRegionCode; ioWinRgn: RgnHandle ): OSStatus; external name '_GetWindowRegion';
5177 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
5178 
5179 
5180 {
5181  *  GetWindowStructureWidths()
5182  *
5183  *  Summary:
5184  *    Returns the width of the structure region on each edge of a
5185  *    window.
5186  *
5187  *  Discussion:
5188  *    The structure widths are the difference between the content
5189  *    region and the structure region on each edge of a window. For
5190  *    example, if the left edge of the structure region is at x=100,
5191  *    and the left edge of the content region is at x=110, then the
5192  *    structure width for the left side of the window is 10 pixels.
5193  *
5194  *  Mac OS X threading:
5195  *    Not thread safe
5196  *
5197  *  Parameters:
5198  *
5199  *    inWindow:
5200  *      The window for which to get structure widths.
5201  *
5202  *    outRect:
5203  *      On exit, contains the width of the structure region on each
5204  *      side of the window; the left field of the rectangle contains
5205  *      the structure width on the left side of the window, the top
5206  *      field contains the width on the top side, and so on.
5207  *
5208  *  Availability:
5209  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5210  *    CarbonLib:        in CarbonLib 1.0 and later
5211  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5212  }
GetWindowStructureWidthsnull5213 function GetWindowStructureWidths( inWindow: WindowRef; var outRect: Rect ): OSStatus; external name '_GetWindowStructureWidths';
5214 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5215 
5216 
5217 {
5218  *  HIWindowChangeFeatures()
5219  *
5220  *  Summary:
5221  *    Changes the window features on the fly.
5222  *
5223  *  Discussion:
5224  *    HIWindowChangeFeatures changes the features of a window. This
5225  *    should only be used by custom window definitions or window frame
5226  *    views.
5227  *
5228  *  Mac OS X threading:
5229  *    Not thread safe
5230  *
5231  *  Parameters:
5232  *
5233  *    inWindow:
5234  *      The window to modify.
5235  *
5236  *    inSetThese:
5237  *      The feature bits to set.
5238  *
5239  *    inClearThese:
5240  *      The feature bits to clear.
5241  *
5242  *  Availability:
5243  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
5244  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
5245  *    Non-Carbon CFM:   not available
5246  }
HIWindowChangeFeaturesnull5247 function HIWindowChangeFeatures( inWindow: WindowRef; inSetThese: UInt64; inClearThese: UInt64 ): OSStatus; external name '_HIWindowChangeFeatures';
5248 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
5249 
5250 
5251 {��������������������������������������������������������������������������������������}
5252 { � Update Events                                                                      }
5253 {��������������������������������������������������������������������������������������}
5254 {
5255  *  BeginUpdate()
5256  *
5257  *  Summary:
5258  *    Modifies a window's GrafPort state before redrawing the invalid
5259  *    portion of a non-compositing window.
5260  *
5261  *  Discussion:
5262  *    BeginUpdate copies the window's update region into the window's
5263  *    GrafPort's visible region, and then clears the update region. By
5264  *    setting the visible region to match the update region,
5265  *    BeginUpdate ensures that any subsequent drawing will be clipped
5266  *    to the update region.
5267  *
5268  *    This API should not be used on a compositing window. Composited
5269  *    windows are drawn automatically by the HIView Manager by sending
5270  *    kEventControlDraw events to the views contained in the window.
5271  *
5272  *  Mac OS X threading:
5273  *    Not thread safe
5274  *
5275  *  Parameters:
5276  *
5277  *    window:
5278  *      The window to update.
5279  *
5280  *  Availability:
5281  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5282  *    CarbonLib:        in CarbonLib 1.0 and later
5283  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
5284  }
5285 procedure BeginUpdate( window: WindowRef ); external name '_BeginUpdate';
5286 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5287 
5288 
5289 {
5290  *  EndUpdate()
5291  *
5292  *  Summary:
5293  *    Restores the original state of a window's GrafPort after a
5294  *    non-compositing window has been updated.
5295  *
5296  *  Discussion:
5297  *    EndUpdate restores the original visible region of a window's
5298  *    GrafPort.
5299  *
5300  *    This API should not be used on a compositing window. Composited
5301  *    windows are drawn automatically by the HIView Manager by sending
5302  *    kEventControlDraw events to the views contained in the window.
5303  *
5304  *  Mac OS X threading:
5305  *    Not thread safe
5306  *
5307  *  Parameters:
5308  *
5309  *    window:
5310  *      The window that was updated.
5311  *
5312  *  Availability:
5313  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5314  *    CarbonLib:        in CarbonLib 1.0 and later
5315  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
5316  }
5317 procedure EndUpdate( window: WindowRef ); external name '_EndUpdate';
5318 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5319 
5320 
5321 {
5322    Routines available from Mac OS 8.5 forward
5323    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
5324 }
5325 
5326 {
5327  *  InvalWindowRgn()
5328  *
5329  *  Summary:
5330  *    Invalidates a portion of a non-compositing window.
5331  *
5332  *  Discussion:
5333  *    This API should not be used on a compositing window. To
5334  *    invalidate a portion of a compositing window, use
5335  *    HIViewSetNeedsDisplay or one of its variant APIs.
5336  *
5337  *  Mac OS X threading:
5338  *    Not thread safe
5339  *
5340  *  Parameters:
5341  *
5342  *    window:
5343  *      The window to invalidate.
5344  *
5345  *    region:
5346  *      The region to invalidate, in local coordinates of the window.
5347  *
5348  *  Availability:
5349  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5350  *    CarbonLib:        in CarbonLib 1.0 and later
5351  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5352  }
InvalWindowRgnnull5353 function InvalWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_InvalWindowRgn';
5354 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5355 
5356 
5357 {
5358  *  InvalWindowRect()
5359  *
5360  *  Summary:
5361  *    Invalidates a portion of a non-compositing window.
5362  *
5363  *  Discussion:
5364  *    This API should not be used on a compositing window. To
5365  *    invalidate a portion of a compositing window, use
5366  *    HIViewSetNeedsDisplay or one of its variant APIs.
5367  *
5368  *  Mac OS X threading:
5369  *    Not thread safe
5370  *
5371  *  Parameters:
5372  *
5373  *    window:
5374  *      The window to invalidate.
5375  *
5376  *    bounds:
5377  *      The rect to invalidate, in local coordinates of the window.
5378  *
5379  *  Availability:
5380  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5381  *    CarbonLib:        in CarbonLib 1.0 and later
5382  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5383  }
InvalWindowRectnull5384 function InvalWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_InvalWindowRect';
5385 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5386 
5387 
5388 {
5389  *  ValidWindowRgn()
5390  *
5391  *  Summary:
5392  *    Validates a portion of a non-compositing window.
5393  *
5394  *  Discussion:
5395  *    This API should not be used on a compositing window. To validate
5396  *    a portion of a compositing window, use HIViewSetNeedsDisplay or
5397  *    one of its variant APIs.
5398  *
5399  *  Mac OS X threading:
5400  *    Not thread safe
5401  *
5402  *  Parameters:
5403  *
5404  *    window:
5405  *      The window to validate.
5406  *
5407  *    region:
5408  *      The region to validate, in local coordinates of the window.
5409  *
5410  *  Availability:
5411  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5412  *    CarbonLib:        in CarbonLib 1.0 and later
5413  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5414  }
ValidWindowRgnnull5415 function ValidWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_ValidWindowRgn';
5416 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5417 
5418 
5419 {
5420  *  ValidWindowRect()
5421  *
5422  *  Summary:
5423  *    Validates a portion of a non-compositing window.
5424  *
5425  *  Discussion:
5426  *    This API should not be used on a compositing window. To validate
5427  *    a portion of a compositing window, use HIViewSetNeedsDisplay or
5428  *    one of its variant APIs.
5429  *
5430  *  Mac OS X threading:
5431  *    Not thread safe
5432  *
5433  *  Parameters:
5434  *
5435  *    window:
5436  *      The window to validate.
5437  *
5438  *    bounds:
5439  *      The rect to validate, in local coordinates of the window.
5440  *
5441  *  Availability:
5442  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5443  *    CarbonLib:        in CarbonLib 1.0 and later
5444  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5445  }
ValidWindowRectnull5446 function ValidWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_ValidWindowRect';
5447 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5448 
5449 
5450 {��������������������������������������������������������������������������������������}
5451 { � Window Titles                                                                      }
5452 {��������������������������������������������������������������������������������������}
5453 {
5454  *  SetWindowTitleWithCFString()
5455  *
5456  *  Mac OS X threading:
5457  *    Not thread safe
5458  *
5459  *  Availability:
5460  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5461  *    CarbonLib:        in CarbonLib 1.1 and later
5462  *    Non-Carbon CFM:   not available
5463  }
SetWindowTitleWithCFStringnull5464 function SetWindowTitleWithCFString( inWindow: WindowRef; inString: CFStringRef ): OSStatus; external name '_SetWindowTitleWithCFString';
5465 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5466 
5467 
5468 {
5469  *  CopyWindowTitleAsCFString()
5470  *
5471  *  Mac OS X threading:
5472  *    Not thread safe
5473  *
5474  *  Availability:
5475  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5476  *    CarbonLib:        in CarbonLib 1.1 and later
5477  *    Non-Carbon CFM:   not available
5478  }
CopyWindowTitleAsCFStringnull5479 function CopyWindowTitleAsCFString( inWindow: WindowRef; var outString: CFStringRef ): OSStatus; external name '_CopyWindowTitleAsCFString';
5480 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5481 
5482 
5483 {��������������������������������������������������������������������������������������}
5484 { � Window Proxies                                                                     }
5485 {��������������������������������������������������������������������������������������}
5486 {
5487  *  HIWindowSetProxyFSRef()
5488  *
5489  *  Summary:
5490  *    Set the proxy icon for a window using an FSRef to an existing
5491  *    file system object (volume, folder, or file).
5492  *
5493  *  Mac OS X threading:
5494  *    Not thread safe
5495  *
5496  *  Parameters:
5497  *
5498  *    window:
5499  *      The window whose proxy icon to set.
5500  *
5501  *    inRef:
5502  *      The file system object that the window represents. The window's
5503  *      proxy icon is determined by asking Icon Services for the icon
5504  *      of this object.
5505  *
5506  *  Availability:
5507  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5508  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5509  *    Non-Carbon CFM:   not available
5510  }
HIWindowSetProxyFSRefnull5511 function HIWindowSetProxyFSRef( window: WindowRef; const (*var*) inRef: FSRef ): OSStatus; external name '_HIWindowSetProxyFSRef';
5512 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5513 
5514 
5515 {
5516  *  HIWindowGetProxyFSRef()
5517  *
5518  *  Summary:
5519  *    Returns the FSRef used to determine the proxy icon for a window.
5520  *
5521  *  Discussion:
5522  *    This API will return noErr and a valid FSRef if the window's
5523  *    proxy icon has been specified using the FSRef, FSSpec or alias
5524  *    SetWindowProxy APIs. If the window has no proxy icon, or if the
5525  *    icon was specified with SetWindowProxyCreatorAndType or
5526  *    SetWindowProxyIcon, then an error will be returned.
5527  *
5528  *  Mac OS X threading:
5529  *    Not thread safe
5530  *
5531  *  Parameters:
5532  *
5533  *    window:
5534  *      The window containing the proxy icon to return.
5535  *
5536  *    outRef:
5537  *      On exit, contains the FSRef to the window's proxy icon.
5538  *
5539  *  Result:
5540  *    noErr if the window's proxy icon FSRef has been returned;
5541  *    errWindowDoesNotHaveProxy if the window does not have a proxy
5542  *    icon, or if the proxy icon was specified by
5543  *    SetWindowProxyCreatorAndType or SetWindowProxyIcon. Other
5544  *    operating system error codes may also be returned.
5545  *
5546  *  Availability:
5547  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5548  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5549  *    Non-Carbon CFM:   not available
5550  }
HIWindowGetProxyFSRefnull5551 function HIWindowGetProxyFSRef( window: WindowRef; var outRef: FSRef ): OSStatus; external name '_HIWindowGetProxyFSRef';
5552 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5553 
5554 
5555 {
5556  *  SetWindowProxyAlias()
5557  *
5558  *  Summary:
5559  *    Sets the proxy icon for a window using an AliasHandle to an
5560  *    existing file system object (volume, folder, or file).
5561  *
5562  *  Mac OS X threading:
5563  *    Not thread safe
5564  *
5565  *  Parameters:
5566  *
5567  *    inWindow:
5568  *      The window whose proxy icon to set.
5569  *
5570  *    inAlias:
5571  *      The file system object that the window represents. The window�s
5572  *      proxy icon is determined by asking Icon Services for the icon
5573  *      of this object. The Window Manager copies the alias data; the
5574  *      caller may dispose of the alias after SetWindowProxyAlias
5575  *      returns.
5576  *
5577  *  Availability:
5578  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5579  *    CarbonLib:        in CarbonLib 1.0 and later
5580  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5581  }
SetWindowProxyAliasnull5582 function SetWindowProxyAlias( inWindow: WindowRef; inAlias: AliasHandle ): OSStatus; external name '_SetWindowProxyAlias';
5583 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5584 
5585 
5586 {
5587  *  GetWindowProxyAlias()
5588  *
5589  *  Summary:
5590  *    Returns the alias used to determine the proxy icon for a window.
5591  *
5592  *  Discussion:
5593  *    This API will return noErr and a valid alias if the window�s
5594  *    proxy icon has been specified using the SetWindowProxyFSSpec or
5595  *    SetWindowProxyAlias APIs. If the window has no proxy icon, or if
5596  *    the icon was specified with another SetWindowProxy API, then an
5597  *    error will be returned.
5598  *
5599  *  Mac OS X threading:
5600  *    Not thread safe
5601  *
5602  *  Parameters:
5603  *
5604  *    window:
5605  *      The window whose proxy icon alias to return.
5606  *
5607  *    alias:
5608  *      On exit, contains the window�s proxy icon alias.
5609  *
5610  *  Result:
5611  *    noErr if the window�s proxy icon alias has been returned;
5612  *    errWindowDoesNotHaveProxy if the window does not have a proxy
5613  *    icon, or if the proxy icon was specified by IconRef or
5614  *    type/creator rather than by FSSpec or alias. Other operating
5615  *    system error codes may also be returned.
5616  *
5617  *  Availability:
5618  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5619  *    CarbonLib:        in CarbonLib 1.0 and later
5620  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5621  }
GetWindowProxyAliasnull5622 function GetWindowProxyAlias( window: WindowRef; var alias: AliasHandle ): OSStatus; external name '_GetWindowProxyAlias';
5623 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5624 
5625 
5626 {
5627  *  SetWindowProxyCreatorAndType()
5628  *
5629  *  Summary:
5630  *    Sets the proxy icon for a window using a file type and creator.
5631  *
5632  *  Mac OS X threading:
5633  *    Not thread safe
5634  *
5635  *  Parameters:
5636  *
5637  *    window:
5638  *      The window whose proxy icon to set.
5639  *
5640  *    fileCreator:
5641  *      The creator code for the file system object that the window
5642  *      represents. The window�s proxy icon is determined by asking
5643  *      Icon Services for the icon corresponding to the specified
5644  *      creator code and file type, on the specified volume.
5645  *
5646  *    fileType:
5647  *      The file type for the file system object that the window
5648  *      represents.
5649  *
5650  *    vRefNum:
5651  *      The volume reference number for the volume containing the file
5652  *      system object that the window represents. You may pass
5653  *      kOnSystemDisk for this parameter if you don't know which volume
5654  *      will hold the file system object.
5655  *
5656  *  Availability:
5657  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5658  *    CarbonLib:        in CarbonLib 1.0 and later
5659  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5660  }
SetWindowProxyCreatorAndTypenull5661 function SetWindowProxyCreatorAndType( window: WindowRef; fileCreator: OSType; fileType: OSType; vRefNum: SInt16 ): OSStatus; external name '_SetWindowProxyCreatorAndType';
5662 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5663 
5664 
5665 {
5666  *  GetWindowProxyIcon()
5667  *
5668  *  Summary:
5669  *    Returns the proxy icon of a window.
5670  *
5671  *  Mac OS X threading:
5672  *    Not thread safe
5673  *
5674  *  Parameters:
5675  *
5676  *    window:
5677  *      The window whose proxy icon to return.
5678  *
5679  *    outIcon:
5680  *      On exit, contains the window�s proxy icon.
5681  *
5682  *  Availability:
5683  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5684  *    CarbonLib:        in CarbonLib 1.0 and later
5685  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5686  }
GetWindowProxyIconnull5687 function GetWindowProxyIcon( window: WindowRef; var outIcon: IconRef ): OSStatus; external name '_GetWindowProxyIcon';
5688 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5689 
5690 
5691 {
5692  *  SetWindowProxyIcon()
5693  *
5694  *  Summary:
5695  *    Sets a window�s proxy icon.
5696  *
5697  *  Mac OS X threading:
5698  *    Not thread safe
5699  *
5700  *  Parameters:
5701  *
5702  *    window:
5703  *      The window whose proxy icon to set.
5704  *
5705  *    icon:
5706  *      The proxy icon. The Window Manager retains the IconRef; the
5707  *      caller may release the IconRef after SetWindowProxyIcon returns.
5708  *
5709  *  Availability:
5710  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5711  *    CarbonLib:        in CarbonLib 1.0 and later
5712  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5713  }
SetWindowProxyIconnull5714 function SetWindowProxyIcon( window: WindowRef; icon: IconRef ): OSStatus; external name '_SetWindowProxyIcon';
5715 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5716 
5717 
5718 {
5719  *  RemoveWindowProxy()
5720  *
5721  *  Summary:
5722  *    Removes a window�s proxy icon.
5723  *
5724  *  Discussion:
5725  *    When removing the proxy icon, the Window Manager also releases
5726  *    the alias or IconRef, if any, that was used to specify the proxy
5727  *    icon.
5728  *
5729  *  Mac OS X threading:
5730  *    Not thread safe
5731  *
5732  *  Parameters:
5733  *
5734  *    window:
5735  *      The window whose proxy icon to remove.
5736  *
5737  *  Availability:
5738  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5739  *    CarbonLib:        in CarbonLib 1.0 and later
5740  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5741  }
RemoveWindowProxynull5742 function RemoveWindowProxy( window: WindowRef ): OSStatus; external name '_RemoveWindowProxy';
5743 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5744 
5745 
5746 {
5747  *  BeginWindowProxyDrag()
5748  *
5749  *  Summary:
5750  *    Creates a new drag reference that can be used to drag a window�s
5751  *    proxy icon.
5752  *
5753  *  Discussion:
5754  *    This API is used by applications that need to add their own drag
5755  *    flavors to the drag reference used for a proxy icon drag. Such an
5756  *    application would call BeginWindowProxyDrag to create the drag
5757  *    reference, add its own flavors, call
5758  *    TrackWindowProxyFromExistingDrag to track the proxy icon drag,
5759  *    and then EndWindowProxyDrag to release the drag
5760  *    reference.
5761  *
5762  *    An application which does not need to add its own drag flavors to
5763  *    the drag reference can simply call TrackWindowProxyDrag.
5764  *
5765  *  Mac OS X threading:
5766  *    Not thread safe
5767  *
5768  *  Parameters:
5769  *
5770  *    window:
5771  *      The window whose proxy icon to drag.
5772  *
5773  *    outNewDrag:
5774  *      On exit, contains the drag reference for the proxy icon.
5775  *
5776  *    outDragOutlineRgn:
5777  *      On entry, should be a valid RgnHandle; on exit, the region has
5778  *      been updated with an outline of the proxy icon drag image. This
5779  *      region should be passed to TrackWindowProxyFromExistingDrag;
5780  *      the application may modify it first. On Mac OS X 10.5 and
5781  *      later, you may pass NULL if you don't need the outline region.
5782  *
5783  *  Availability:
5784  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5785  *    CarbonLib:        in CarbonLib 1.0 and later
5786  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5787  }
BeginWindowProxyDragnull5788 function BeginWindowProxyDrag( window: WindowRef; var outNewDrag: DragRef; outDragOutlineRgn: RgnHandle ): OSStatus; external name '_BeginWindowProxyDrag';
5789 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5790 
5791 
5792 {
5793  *  EndWindowProxyDrag()
5794  *
5795  *  Summary:
5796  *    Releases a drag reference created by BeginWindowProxyDrag.
5797  *
5798  *  Mac OS X threading:
5799  *    Not thread safe
5800  *
5801  *  Parameters:
5802  *
5803  *    window:
5804  *      The window whose proxy icon drag reference to release.
5805  *
5806  *    theDrag:
5807  *      The drag reference to release.
5808  *
5809  *  Availability:
5810  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5811  *    CarbonLib:        in CarbonLib 1.0 and later
5812  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5813  }
EndWindowProxyDragnull5814 function EndWindowProxyDrag( window: WindowRef; theDrag: DragRef ): OSStatus; external name '_EndWindowProxyDrag';
5815 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5816 
5817 
5818 {
5819  *  HIWindowTrackProxyDrag()
5820  *
5821  *  Summary:
5822  *    Tracks the drag of a window proxy icon.
5823  *
5824  *  Discussion:
5825  *    This API is used by applications that need to manage the dragging
5826  *    of the proxy icon in their windows. Applications that use the
5827  *    standard window event hander and that do not need to customize
5828  *    the proxy icon drag process may rely on the standard handler to
5829  *    call this API.
5830  *
5831  *    An application may choose whether to allow the Window Manager to
5832  *    create the drag reference and populate it with drag flavors, or
5833  *    to create the drag reference itself and adds its own drag
5834  *    flavors. In the first case, an application should pass NULL for
5835  *    the drag reference parameter to this API.In the second case, an
5836  *    application should call BeginWindowProxyDrag to create the drag
5837  *    reference, add its own flavors, call HIWindowTrackProxyDrag to
5838  *    track the proxy icon drag, and then EndWindowProxyDrag to release
5839  *    the drag reference.
5840  *
5841  *    If you pass a non-NULL drag reference, this routine will not
5842  *    display an outline region for the drag; you are thus expected to
5843  *    set up a drag image via SetDragImageWithCGImage or a similar API.
5844  *    Also, in the non- NULL drag reference case, you should not set
5845  *    the kDragRegionAndImage drag image flag.
5846  *
5847  *    A proxy icon may only be dragged if the window represented by the
5848  *    proxy icon is not modifed (as indicated by the IsWindowModified
5849  *    API). This restriction is imposed because a proxy icon is a
5850  *    representation of a physical file system object, and dragging the
5851  *    proxy icon may result in the Finder making a copy of the file
5852  *    system object. If the window is modified, then it contains user
5853  *    data that has not yet been saved to disk; making a copy of the
5854  *    file system object would result in a stale copy that did not
5855  *    contain the user�s current data.
5856  *
5857  *    By default, all newly created windows are considered to be dirty.
5858  *    The application must call SetWindowModified( window, false )
5859  *    before the proxy icon will be draggable.
5860  *
5861  *    In Mac OS X 10.3 and later, the proxy icon is also draggable in
5862  *    dirty windows if the proxy icon was provided using the
5863  *    SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
5864  *    is allowed in this case because the window does not represent an
5865  *    actual file system object, and therefore there is no risk of user
5866  *    data loss.
5867  *
5868  *  Mac OS X threading:
5869  *    Not thread safe
5870  *
5871  *  Parameters:
5872  *
5873  *    inWindow:
5874  *      The window whose proxy icon to drag.
5875  *
5876  *    inEvent:
5877  *      The event that resulted in starting a drag. This will most
5878  *      commonly be kEventControlTrack, but any event with
5879  *      kEventParamMouseLocation and kEventParamKeyModifiers parameters
5880  *      is all that is required.
5881  *
5882  *    inDrag:
5883  *      The proxy icon drag reference. This parameter may be NULL if
5884  *      you want the Window Manager to create and populate the drag
5885  *      reference itself. The Window Manager will add its own drag
5886  *      flavors to the drag even when the client passes a pre-created
5887  *      drag reference.
5888  *
5889  *  Result:
5890  *    errUserWantsToDragWindow if the user�s mouse movements indicated
5891  *    that the user actually wants to drag the window instead of the
5892  *    proxy icon (in this case the application should call DragWindow);
5893  *    windowWrongStateErr if the window was modified and therefore the
5894  *    proxy icon could not be dragged; noErr if the drag succeeded;
5895  *    userCanceledErr if the user canceled the drag. Other operating
5896  *    system result codes may also be returned.
5897  *
5898  *  Availability:
5899  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
5900  *    CarbonLib:        not available
5901  *    Non-Carbon CFM:   not available
5902  }
HIWindowTrackProxyDragnull5903 function HIWindowTrackProxyDrag( inWindow: WindowRef; inEvent: EventRef; inDrag: DragRef { can be NULL } ): OSStatus; external name '_HIWindowTrackProxyDrag';
5904 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
5905 
5906 
5907 {
5908  *  TrackWindowProxyFromExistingDrag()
5909  *
5910  *  Summary:
5911  *    Tracks the drag of a window proxy icon.
5912  *
5913  *  Discussion:
5914  *    This API is used by applications that need to add their own drag
5915  *    flavors to the drag reference used for a proxy icon drag. Such an
5916  *    application would call BeginWindowProxyDrag to create the drag
5917  *    reference, add its own flavors, call
5918  *    TrackWindowProxyFromExistingDrag to track the proxy icon drag,
5919  *    and then EndWindowProxyDrag to release the drag
5920  *    reference.
5921  *
5922  *    An application which does not need to add its own drag flavors to
5923  *    the drag reference can simply call TrackWindowProxyDrag.
5924  *
5925  *    A proxy icon may only be dragged if the window represented by the
5926  *    proxy icon is not modifed (as indicated by the IsWindowModified
5927  *    API). This restriction is imposed because a proxy icon is a
5928  *    representation of a physical file system object, and dragging the
5929  *    proxy icon may result in the Finder making a copy of the file
5930  *    system object. If the window is modified, then it contains user
5931  *    data that has not yet been saved to disk; making a copy of the
5932  *    file system object would result in a stale copy that did not
5933  *    contain the user�s current data.
5934  *
5935  *    By default, all newly created windows are considered to be dirty.
5936  *    The application must call SetWindowModified( window, false )
5937  *    before the proxy icon will be draggable.
5938  *
5939  *    In Mac OS X 10.3 and later, the proxy icon is also draggable in
5940  *    dirty windows if the proxy icon was provided using the
5941  *    SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
5942  *    is allowed in this case because the window does not represent an
5943  *    actual file system object, and therefore there is no risk of user
5944  *    data loss.
5945  *
5946  *  Mac OS X threading:
5947  *    Not thread safe
5948  *
5949  *  Parameters:
5950  *
5951  *    window:
5952  *      The window whose proxy icon to drag.
5953  *
5954  *    startPt:
5955  *      The point in global coordinates where the drag originated. This
5956  *      is generally the location of the mouse click in the proxy icon.
5957  *
5958  *    drag:
5959  *      The proxy icon drag reference.
5960  *
5961  *    inDragOutlineRgn:
5962  *      The outline of the proxy icon drag image, as returned by
5963  *      BeginWindowProxyDrag. You may pass NULL on Mac OS X 10.5 and
5964  *      later.
5965  *
5966  *  Result:
5967  *    errUserWantsToDragWindow if the user�s mouse movements indicated
5968  *    that the user actually wants to drag the window instead of the
5969  *    proxy icon (in this case the application should call DragWindow);
5970  *    windowWrongStateErr if the window was modified and therefore the
5971  *    proxy icon could not be dragged; noErr if the drag succeeded;
5972  *    userCanceledErr if the user canceled the drag. Other operating
5973  *    system result codes may also be returned.
5974  *
5975  *  Availability:
5976  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
5977  *    CarbonLib:        in CarbonLib 1.0 and later
5978  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
5979  }
TrackWindowProxyFromExistingDragnull5980 function TrackWindowProxyFromExistingDrag( window: WindowRef; startPt: Point; drag: DragRef; inDragOutlineRgn: RgnHandle ): OSStatus; external name '_TrackWindowProxyFromExistingDrag';
5981 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
5982 
5983 
5984 {
5985  *  TrackWindowProxyDrag()
5986  *
5987  *  Summary:
5988  *    Tracks the drag of a window proxy icon.
5989  *
5990  *  Discussion:
5991  *    A proxy icon may only be dragged if the window represented by the
5992  *    proxy icon is not modifed (as indicated by the IsWindowModified
5993  *    API). This restriction is imposed because a proxy icon is a
5994  *    representation of a physical file system object, and dragging the
5995  *    proxy icon may result in the Finder making a copy of the file
5996  *    system object. If the window is modified, then it contains user
5997  *    data that has not yet been saved to disk; making a copy of the
5998  *    file system object would result in a stale copy that did not
5999  *    contain the user�s current data.
6000  *
6001  *    By default, all newly created windows are considered to be
6002  *    modified. The application must call SetWindowModified( window,
6003  *    false ) before the proxy icon will be draggable.
6004  *
6005  *    In Mac OS X 10.3 and later, the proxy icon is also draggable in
6006  *    dirty windows if the proxy icon was provided using the
6007  *    SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
6008  *    is allowed in this case because the window does not represent an
6009  *    actual file system object, and therefore there is no risk of user
6010  *    data loss.
6011  *
6012  *  Mac OS X threading:
6013  *    Not thread safe
6014  *
6015  *  Parameters:
6016  *
6017  *    window:
6018  *      The window whose proxy icon to drag.
6019  *
6020  *    startPt:
6021  *      The point in global coordinates where the drag originated. This
6022  *      is generally the location of the mouse click in the proxy icon.
6023  *
6024  *  Result:
6025  *    errUserWantsToDragWindow if the user�s mouse movements indicated
6026  *    that the user actually wants to drag the window instead of the
6027  *    proxy icon (in this case the application should call DragWindow);
6028  *    windowWrongStateErr if the window was modified and therefore the
6029  *    proxy icon could not be dragged; noErr if the drag succeeded;
6030  *    userCanceledErr if the user canceled the drag. Other operating
6031  *    system result codes may also be returned.
6032  *
6033  *  Availability:
6034  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6035  *    CarbonLib:        in CarbonLib 1.0 and later
6036  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6037  }
TrackWindowProxyDragnull6038 function TrackWindowProxyDrag( window: WindowRef; startPt: Point ): OSStatus; external name '_TrackWindowProxyDrag';
6039 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6040 
6041 
6042 {
6043  *  IsWindowModified()
6044  *
6045  *  Summary:
6046  *    Returns whether the window is considered to have unsaved content.
6047  *
6048  *  Discussion:
6049  *    By default, all newly created windows are considered to be
6050  *    modified. The application must call SetWindowModified( window,
6051  *    false ) to mark the window as unmodified. Until the window is
6052  *    marked as unmodified, the proxy icon will not be draggable.
6053  *
6054  *  Mac OS X threading:
6055  *    Not thread safe
6056  *
6057  *  Parameters:
6058  *
6059  *    window:
6060  *      The window whose modified state to return.
6061  *
6062  *  Result:
6063  *    true if the window has unsaved changes, or false if not.
6064  *
6065  *  Availability:
6066  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6067  *    CarbonLib:        in CarbonLib 1.0 and later
6068  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6069  }
IsWindowModifiednull6070 function IsWindowModified( window: WindowRef ): Boolean; external name '_IsWindowModified';
6071 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6072 
6073 
6074 {
6075  *  SetWindowModified()
6076  *
6077  *  Summary:
6078  *    Sets whether the window is considered to have unsaved content.
6079  *
6080  *  Discussion:
6081  *    By default, all newly created windows are considered to be
6082  *    modified. The application must call SetWindowModified( window,
6083  *    false ) to mark the window as unmodified. Until the window is
6084  *    marked as unmodified, the proxy icon will not be draggable.
6085  *
6086  *  Mac OS X threading:
6087  *    Not thread safe
6088  *
6089  *  Parameters:
6090  *
6091  *    window:
6092  *      The window whose modified state to return.
6093  *
6094  *    modified:
6095  *      Whether the window has unsaved changes.
6096  *
6097  *  Availability:
6098  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6099  *    CarbonLib:        in CarbonLib 1.0 and later
6100  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6101  }
SetWindowModifiednull6102 function SetWindowModified( window: WindowRef; modified: Boolean ): OSStatus; external name '_SetWindowModified';
6103 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6104 
6105 
6106 {
6107  *  IsWindowPathSelectEvent()
6108  *
6109  *  Summary:
6110  *    Indicates whether a Carbon event describing a click on a window�s
6111  *    title should cause a path selection menu to be displayed.
6112  *
6113  *  Discussion:
6114  *    Windows that have a proxy icon provided using an FSSpec or alias
6115  *    can support a path selection menu, which displays the file system
6116  *    path to the object, one menu item per directory. Making a
6117  *    selection from this item will automatically open the
6118  *    corresponding object in the Finder.
6119  *
6120  *  Mac OS X threading:
6121  *    Not thread safe
6122  *
6123  *  Parameters:
6124  *
6125  *    window:
6126  *      The window on which the click occurred.
6127  *
6128  *    inEvent:
6129  *      The event. In CarbonLib and in Mac OS X 10.2 and earlier,
6130  *      IsWindowPathSelectEvent only returned true for
6131  *      kEventClassMouse/ kEventMouseDown events. In Mac OS X 10.3 and
6132  *      later, IsWindowPathSelectEvent returns true for any event that
6133  *      has suitable kEventParamMouseLocation and
6134  *      kEventParamKeyModifiers parameters.
6135  *
6136  *  Result:
6137  *    true if the click should cause a path selection menu to be
6138  *    displayed, or false if not. If this API returns true, the
6139  *    application should call the WindowPathSelect API.
6140  *
6141  *  Availability:
6142  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6143  *    CarbonLib:        in CarbonLib 1.1 and later
6144  *    Non-Carbon CFM:   not available
6145  }
IsWindowPathSelectEventnull6146 function IsWindowPathSelectEvent( window: WindowRef; inEvent: EventRef ): Boolean; external name '_IsWindowPathSelectEvent';
6147 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6148 
6149 
6150 {
6151  *  WindowPathSelect()
6152  *
6153  *  Summary:
6154  *    Displays a path selection menu for a window that has a proxy icon.
6155  *
6156  *  Discussion:
6157  *    If the application passes NULL for the menu parameter, and the
6158  *    user selects an item from the path selection menu, the Window
6159  *    Manager will automatically request the Finder to display that
6160  *    item, and in CarbonLib 1.3.1 and later and Mac OS X, will also
6161  *    make the Finder be the active application.
6162  *
6163  *  Mac OS X threading:
6164  *    Not thread safe
6165  *
6166  *  Parameters:
6167  *
6168  *    window:
6169  *      The window for which to display the path selection menu.
6170  *
6171  *    menu:
6172  *      The menu to display. If you pass NULL, the Window Manager
6173  *      automatically creates a suitable menu based on the window�s
6174  *      proxy icon.
6175  *
6176  *    outMenuResult:
6177  *      On exit, the menu ID and menu item index of the selected item;
6178  *      the menu ID is in the high 16 bits of the result, and the menu
6179  *      item index is in the low 16 bits.
6180  *
6181  *  Result:
6182  *    noErr if the user selected an item from the menu; userCanceledErr
6183  *    if the user closed the menu without making a selection. Other
6184  *    operating system result codes may be returned.
6185  *
6186  *  Availability:
6187  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6188  *    CarbonLib:        in CarbonLib 1.0 and later
6189  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6190  }
WindowPathSelectnull6191 function WindowPathSelect( window: WindowRef; menu: MenuRef { can be NULL }; var outMenuResult: SInt32 ): OSStatus; external name '_WindowPathSelect';
6192 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6193 
6194 
6195 {��������������������������������������������������������������������������������������}
6196 {  � HiliteWindowFrameForDrag                                                          }
6197 {  If you call ShowDragHilite and HideDragHilite, you don�t need to use this routine.  }
6198 {  If you implement custom drag hiliting, you should call HiliteWindowFrameForDrag     }
6199 {  when the drag is tracking inside a window with drag-hilited content.                }
6200 {��������������������������������������������������������������������������������������}
6201 { Routines available from Mac OS 8.5 forward}
6202 
6203 {
6204  *  HiliteWindowFrameForDrag()
6205  *
6206  *  Mac OS X threading:
6207  *    Not thread safe
6208  *
6209  *  Availability:
6210  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6211  *    CarbonLib:        in CarbonLib 1.0 and later
6212  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6213  }
HiliteWindowFrameForDragnull6214 function HiliteWindowFrameForDrag( window: WindowRef; hilited: Boolean ): OSStatus; external name '_HiliteWindowFrameForDrag';
6215 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6216 
6217 
6218 {��������������������������������������������������������������������������������������}
6219 { � Window Transitions                                                                 }
6220 {  TransitionWindow displays a window with accompanying animation and sound.           }
6221 {��������������������������������������������������������������������������������������}
6222 {$endc} {not TARGET_CPU_64}
6223 
6224 
6225 {
6226  *  WindowTransitionEffect
6227  *
6228  *  Summary:
6229  *    Visual effects that are provided by TransitionWindow
6230  }
6231 type
6232 	WindowTransitionEffect = UInt32;
6233 const
6234 {
6235    * Finder-like zoom rectangles. Use with TransitionWindow and Show or
6236    * Hide transition actions. In Mac OS X 10.7 and later, this effect
6237    * can also be used with the Resize transition action to show the
6238    * standard animation effect for zooming a window to a new size. The
6239    * combination of the Zoom effect and the Resize action is only
6240    * recommended for use with compositing windows.
6241    }
6242 	kWindowZoomTransitionEffect = 1;
6243 
6244   {
6245    * Zoom in/out from parent. Use with TransitionWindowAndParent and
6246    * Show or Hide transition actions. Available in Mac OS X, and in
6247    * CarbonLib 1.5 and later.
6248    }
6249 	kWindowSheetTransitionEffect = 2;
6250 
6251   {
6252    * Slide the window into its new position. Use with TransitionWindow
6253    * and Move or Resize transition actions. Available in Mac OS X, and
6254    * in CarbonLib 1.5 and later.
6255    }
6256 	kWindowSlideTransitionEffect = 3;
6257 
6258   {
6259    * Fade the window into or out of visibility. Use with the Show or
6260    * Hide transition actions. Available in Mac OS X 10.3 and later.
6261    }
6262 	kWindowFadeTransitionEffect = 4;
6263 
6264   {
6265    * Use the Genie effect that the Dock uses to minimize or maximize a
6266    * window to show or hide the window. Use with the Show or Hide
6267    * transition actions. Available in Mac OS X 10.3 and later.
6268    }
6269 	kWindowGenieTransitionEffect = 5;
6270 
6271 
6272 {
6273  *  WindowTransitionAction
6274  *
6275  *  Summary:
6276  *    Modifications to window state that are provided by
6277  *    TransitionWindow
6278  }
6279 type
6280 	WindowTransitionAction = UInt32;
6281 const
6282 {
6283    * Shows the window. Use with the Zoom, Sheet, Fade, or Genie
6284    * transition effects. For the Zoom, Sheet, and Genie effects, the
6285    * inRect parameter is the global coordinates from which to start the
6286    * animation; inRect may be NULL for the Zoom and Sheet effects, and
6287    * in that case, the animation begins at the center of the window.
6288    * The Genie effect requires a non-NULL inRect parameter. The Fade
6289    * effect does not use the inRect parameter.
6290    }
6291 	kWindowShowTransitionAction = 1;
6292 
6293   {
6294    * Hides the window. Use with the Zoom, Sheet, Fade, or Genie
6295    * transition effects. For the Zoom, Sheet, and Genie effects, the
6296    * inRect parameter is the global coordinates at which to end the
6297    * animation; inRect may be NULL for the Zoom and Sheet effects, and
6298    * in that case, the animation ends at the center of the window. The
6299    * Genie effect requires a non-NULL inRect parameter. The Fade effect
6300    * does not use the inRect parameter.
6301    }
6302 	kWindowHideTransitionAction = 2;
6303 
6304   {
6305    * Moves the window. Use with the Slide transition effect. The inRect
6306    * parameter is the global coordinates of the window's new structure
6307    * bounds; inRect must be non-NULL. Available in Mac OS X, and in
6308    * CarbonLib 1.5 and later.
6309    }
6310 	kWindowMoveTransitionAction = 3;
6311 
6312   {
6313    * Resizes the window. Use with the Slide transition effect. In Mac
6314    * OS X 10.7 and later, the Zoom transition effect is also supported
6315    * with this action, for use by applications that respond to a zoom
6316    * box click by resizing the window programmatically without calling
6317    * the ZoomWindow or ZoomWindowIdeal APIs. The inRect parameter is
6318    * the global coordinates of the window's new structure bounds;
6319    * inRect must be non-NULL. Available in Mac OS X, and in CarbonLib
6320    * 1.5 and later.
6321    }
6322 	kWindowResizeTransitionAction = 4;
6323 
6324 {$ifc not TARGET_CPU_64}
6325 {
6326  *  TransitionWindow()
6327  *
6328  *  Summary:
6329  *    Shows, hides, moves, or resizes a window with appropriate
6330  *    animation and sound.
6331  *
6332  *  Discussion:
6333  *    In Mac OS X 10.3 and later, this API sends
6334  *    kEventWindowTransitionStarted and kEventWindowTransitionCompleted
6335  *    Carbon events to the transitioning window at the start and end of
6336  *    the transition.
6337  *
6338  *  Mac OS X threading:
6339  *    Not thread safe
6340  *
6341  *  Parameters:
6342  *
6343  *    inWindow:
6344  *      The window on which to act.
6345  *
6346  *    inEffect:
6347  *      The type of visual effect to use. TransitionWindow supports the
6348  *      Zoom, Slide, Fade, and Genie transition effects. The Slide
6349  *      effect is supported on Mac OS X and in CarbonLib 1.5 and later.
6350  *      The Fade and Genie effects are supported on Mac OS X 10.3 and
6351  *      later.
6352  *
6353  *    inAction:
6354  *      The action to take on the window. TransitionWindow supports the
6355  *      Show, Hide, Move, and Resize actions. The Move and Resize
6356  *      actions are supported on Mac OS X and in CarbonLib 1.5 and
6357  *      later.
6358  *
6359  *    inRect:
6360  *      A screen rect in global coordinates. The interpretation of the
6361  *      rect is dependent on the transition action; see the
6362  *      documentation for each action for details. May be NULL for some
6363  *      transition actions.
6364  *
6365  *  Availability:
6366  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6367  *    CarbonLib:        in CarbonLib 1.0 and later
6368  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6369  }
TransitionWindownull6370 function TransitionWindow( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindow';
6371 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6372 
6373 
6374 {
6375  *  TransitionWindowAndParent()
6376  *
6377  *  Summary:
6378  *    Shows or hides a window, potentially also moving a second window,
6379  *    with appropriate animation and sound.
6380  *
6381  *  Discussion:
6382  *    In Mac OS X 10.3 and later, this API sends
6383  *    kEventWindowTransitionStarted and kEventWindowTransitionCompleted
6384  *    Carbon events to the transitioning window at the start and end of
6385  *    the transition.
6386  *
6387  *  Mac OS X threading:
6388  *    Not thread safe
6389  *
6390  *  Parameters:
6391  *
6392  *    inWindow:
6393  *      The window on which to act.
6394  *
6395  *    inParentWindow:
6396  *      The window to which the primary window is related. For the
6397  *      Sheet effect, this parameter must specify a valid WindowRef; it
6398  *      should be NULL for other effects.
6399  *
6400  *    inEffect:
6401  *      The type of visual effect to use. TransitionWindowAndParent is
6402  *      most commonly used to perform the Sheet transition effect, but
6403  *      also supports the Zoom, Slide, Fade, and Genie effects.
6404  *
6405  *    inAction:
6406  *      The action to take on the window. TransitionWindowAndParent
6407  *      supports the Show, Hide, Move, and Resize actions.
6408  *
6409  *    inRect:
6410  *      A screen rect in global coordinates. The interpretation of the
6411  *      rect is dependent on the transition action; see the
6412  *      documentation for each action for details. May be NULL for some
6413  *      transition actions.
6414  *
6415  *  Availability:
6416  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6417  *    CarbonLib:        in CarbonLib 1.5 and later
6418  *    Non-Carbon CFM:   not available
6419  }
TransitionWindowAndParentnull6420 function TransitionWindowAndParent( inWindow: WindowRef; inParentWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindowAndParent';
6421 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6422 
6423 
6424 {$endc} {not TARGET_CPU_64}
6425 
6426 
6427 {
6428  *  TransitionWindowOptions
6429  *
6430  *  Summary:
6431  *    Extensible parameter block for the TransitionWindowWithOptions
6432  *    API.
6433  }
6434 type
6435 	TransitionWindowOptions = record
6436 {
6437    * The structure version. You must put 0 in this field.
6438    }
6439 		version: UInt32;
6440 
6441   {
6442    * The duration of the fade, in seconds. For use with the Sheet,
6443    * Slide, Fade, and Genie transition effects; ignored for other
6444    * effects. You may pass 0 to use the default duration. The effect is
6445    * not guaranteed to last precisely this long, but should be a close
6446    * approximation.
6447    }
6448 		duration: EventTime;
6449 
6450   {
6451    * For use with kWindowSheetTransitionEffect. This is the parent
6452    * window of the sheet.
6453    }
6454 		window: WindowRef;
6455 
6456   {
6457    * This value will be sent as the kEventParamUserData parameter for
6458    * the kEventWindowTransitionStarted and
6459    * kEventWindowTransitionCompleted events.
6460    }
6461 		userData: UnivPtr;
6462 	end;
6463 	TransitionWindowOptionsPtr = ^TransitionWindowOptions;
6464 {$ifc not TARGET_CPU_64}
6465 {
6466  *  TransitionWindowWithOptions()
6467  *
6468  *  Summary:
6469  *    Transitions a window from one state to another with appropriate
6470  *    animation and sound.
6471  *
6472  *  Mac OS X threading:
6473  *    Not thread safe
6474  *
6475  *  Parameters:
6476  *
6477  *    inWindow:
6478  *      The window that should be transitioned.
6479  *
6480  *    inEffect:
6481  *      The type of visual effect to use.
6482  *
6483  *    inAction:
6484  *      The action to take on the window.
6485  *
6486  *    inBounds:
6487  *      A screen rect in global coordinates. The interpretation of the
6488  *      rect is dependent on the transition action; see the
6489  *      documentation for each action for details. May be NULL for some
6490  *      transition actions.
6491  *
6492  *    inAsync:
6493  *      Whether the transition should run synchronously or
6494  *      asynchronously. If inAsync is true, TransitionWindow will
6495  *      return immediately, and the transition will run using an event
6496  *      loop timer. You must run your event loop for the transition to
6497  *      occur. If inAsync is false, TransitionWindow will block until
6498  *      the transition is completed. In either case, the
6499  *      kEventWindowTransitionStarted and
6500  *      kEventWindowTransitionCompleted Carbon events will be sent to
6501  *      the transitioning window at the start and end of the transition.
6502  *
6503  *    inOptions:
6504  *      Extra options that are required for some transitions. This
6505  *      parameter may be NULL if the specific transition effect does
6506  *      not require extra information.
6507  *
6508  *  Availability:
6509  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
6510  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6511  *    Non-Carbon CFM:   not available
6512  }
TransitionWindowWithOptionsnull6513 function TransitionWindowWithOptions( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inBounds: HIRectPtr { can be NULL }; inAsync: Boolean; {const} inOptions: TransitionWindowOptionsPtr { can be NULL } ): OSStatus; external name '_TransitionWindowWithOptions';
6514 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
6515 
6516 
6517 {��������������������������������������������������������������������������������������}
6518 { � Window Positioning                                                                 }
6519 {��������������������������������������������������������������������������������������}
6520 
6521 {
6522  *  [Mac]MoveWindow()
6523  *
6524  *  Mac OS X threading:
6525  *    Not thread safe
6526  *
6527  *  Availability:
6528  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6529  *    CarbonLib:        in CarbonLib 1.0 and later
6530  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
6531  }
6532 {$ifc TARGET_OS_MAC}
6533 procedure MacMoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
6534 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6535 {$endc} {TARGET_OS_MAC}
6536 procedure MoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
6537 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6538 
6539 
6540 {
6541  *  SizeWindow()
6542  *
6543  *  Mac OS X threading:
6544  *    Not thread safe
6545  *
6546  *  Availability:
6547  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6548  *    CarbonLib:        in CarbonLib 1.0 and later
6549  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
6550  }
6551 procedure SizeWindow( window: WindowRef; w: SInt16; h: SInt16; fUpdate: Boolean ); external name '_SizeWindow';
6552 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6553 
6554 
6555 {
6556  *  ResizeWindow()
6557  *
6558  *  Summary:
6559  *    Handles all user interaction while a window is being resized.
6560  *
6561  *  Discussion:
6562  *    The ResizeWindow function moves either an outline of the window's
6563  *    edges (on Mac OS 9.x and earlier) or the actual window (on Mac OS
6564  *    X) around the screen, following the user�s cursor movements, and
6565  *    handles all user interaction until the mouse button is released.
6566  *    Unlike the GrowWindow API, there is no need to follow this call
6567  *    with a call to the function SizeWindow, because once the mouse
6568  *    button is released, ResizeWindow resizes the window if the user
6569  *    has changed the window size. Once the resizing is complete,
6570  *    ResizeWindow draws the window in the new size. Your application
6571  *    should call the ResizeWindow function instead of the earlier
6572  *    Window Manager APIs SizeWindow and GrowWindow. Some windows may
6573  *    allow themselves to be resized from any corner or edge, not just
6574  *    the bottom right, and as a result, when the user resizes the
6575  *    window, the window may move on the screen and not merely change
6576  *    size. ResizeWindow informs your application of the new window
6577  *    bounds, so that your application can respond to any changes in
6578  *    the window�s position.
6579  *
6580  *  Mac OS X threading:
6581  *    Not thread safe
6582  *
6583  *  Parameters:
6584  *
6585  *    inWindow:
6586  *      The window to be resized.
6587  *
6588  *    inStartPoint:
6589  *      The point, in global coordinates, at which the original
6590  *      mouse-down occurred.
6591  *
6592  *    inSizeConstraints:
6593  *      The limits on the vertical and horizontal measurements of the
6594  *      content rectangle, in pixels. Although this parameter is typed
6595  *      as a Rect, the four numbers in the structure represent limits,
6596  *      not screen coordinates. The top, left, bottom, and right fields
6597  *      of the structure specify the minimum vertical measurement
6598  *      (top), the minimum horizontal measurement (left), the maximum
6599  *      vertical measurement (bottom), and the maximum horizontal
6600  *      measurement (right). The minimum dimensions should be large
6601  *      enough to allow a manageable rectangle; 64 pixels on a side is
6602  *      typical. The maximum dimensions can be no greater than 32,767.
6603  *      You can pass NULL to allow the user to resize the window to any
6604  *      size that is contained onscreen.
6605  *
6606  *    outNewContentRect:
6607  *      On exit, the structure contains the new dimensions of the
6608  *      window�s content region, in global coordinates. On Mac OS 9.x
6609  *      and earlier, you must pass a non-NULL value in this parameter;
6610  *      in Carbon, you may pass NULL if you do not need the window�s
6611  *      new dimensions.
6612  *
6613  *  Result:
6614  *    Returns true if the window changed size, or false if not.
6615  *
6616  *  Availability:
6617  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6618  *    CarbonLib:        in CarbonLib 1.0 and later
6619  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
6620  }
ResizeWindownull6621 function ResizeWindow( inWindow: WindowRef; inStartPoint: Point; {const} inSizeConstraints: RectPtr { can be NULL }; outNewContentRect: RectPtr { can be NULL } ): Boolean; external name '_ResizeWindow';
6622 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6623 
6624 
6625 {
6626  *  DragWindow()
6627  *
6628  *  Summary:
6629  *    Allows the user to drag a window to a different position.
6630  *
6631  *  Mac OS X threading:
6632  *    Not thread safe
6633  *
6634  *  Parameters:
6635  *
6636  *    window:
6637  *      The window to drag.
6638  *
6639  *    startPt:
6640  *      The point in global coordinates where the mouse was clicked on
6641  *      the window.
6642  *
6643  *    boundsRect:
6644  *      A rect in global coordinates outside of which the window cannot
6645  *      move. May be NULL in CarbonLib and Mac OS X, to indicate that
6646  *      there are no restrictions on window movement. This parameter is
6647  *      ignored by CarbonLib and Mac OS X 10.0 through 10.2; it is
6648  *      obeyed in Mac OS X 10.3 and later.
6649  *
6650  *  Availability:
6651  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6652  *    CarbonLib:        in CarbonLib 1.0 and later
6653  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
6654  }
6655 procedure DragWindow( window: WindowRef; startPt: Point; {const} boundsRect: RectPtr { can be NULL } ); external name '_DragWindow';
6656 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6657 
6658 
6659 {
6660  *  ZoomWindow()
6661  *
6662  *  Mac OS X threading:
6663  *    Not thread safe
6664  *
6665  *  Availability:
6666  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6667  *    CarbonLib:        in CarbonLib 1.0 and later
6668  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
6669  }
6670 procedure ZoomWindow( window: WindowRef; partCode: WindowPartCode; front: Boolean ); external name '_ZoomWindow';
6671 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6672 
6673 
6674 {��������������������������������������������������������������������������������������}
6675 { � Window Collapsing/Expanding                                                        }
6676 {��������������������������������������������������������������������������������������}
6677 { Routines available from Mac OS 8.0 (Appearance 1.0) forward}
6678 {
6679  *  IsWindowCollapsable()
6680  *
6681  *  Mac OS X threading:
6682  *    Not thread safe
6683  *
6684  *  Availability:
6685  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6686  *    CarbonLib:        in CarbonLib 1.0 and later
6687  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
6688  }
IsWindowCollapsablenull6689 function IsWindowCollapsable( window: WindowRef ): Boolean; external name '_IsWindowCollapsable';
6690 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6691 
6692 
6693 {
6694  *  IsWindowCollapsed()
6695  *
6696  *  Mac OS X threading:
6697  *    Not thread safe
6698  *
6699  *  Availability:
6700  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6701  *    CarbonLib:        in CarbonLib 1.0 and later
6702  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
6703  }
IsWindowCollapsednull6704 function IsWindowCollapsed( window: WindowRef ): Boolean; external name '_IsWindowCollapsed';
6705 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6706 
6707 
6708 {
6709  *  CollapseWindow()
6710  *
6711  *  Mac OS X threading:
6712  *    Not thread safe
6713  *
6714  *  Availability:
6715  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6716  *    CarbonLib:        in CarbonLib 1.0 and later
6717  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
6718  }
CollapseWindownull6719 function CollapseWindow( window: WindowRef; collapse: Boolean ): OSStatus; external name '_CollapseWindow';
6720 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6721 
6722 
6723 {
6724  *  CollapseAllWindows()
6725  *
6726  *  Mac OS X threading:
6727  *    Not thread safe
6728  *
6729  *  Availability:
6730  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6731  *    CarbonLib:        in CarbonLib 1.0 and later
6732  *    Non-Carbon CFM:   in AppearanceLib 1.0 and later
6733  }
CollapseAllWindowsnull6734 function CollapseAllWindows( collapse: Boolean ): OSStatus; external name '_CollapseAllWindows';
6735 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6736 
6737 
6738 {
6739  *  HIWindowCreateCollapsedDockTileContext()
6740  *
6741  *  Summary:
6742  *    Creates a CGContextRef that can be used to draw into a collapsed
6743  *    window's Dock tile.
6744  *
6745  *  Mac OS X threading:
6746  *    Not thread safe
6747  *
6748  *  Parameters:
6749  *
6750  *    inWindow:
6751  *      The collapsed window.
6752  *
6753  *    outContext:
6754  *      On exit, returns a CGContextRef for drawing into the window's
6755  *      Dock tile. You should use
6756  *      HIWindowReleaseCollapsedDockTileContext to release this
6757  *      context. To ensure that drawing to the context appears
6758  *      onscreen, make sure to call CGContextFlush before releasing the
6759  *      context.
6760  *
6761  *    outContextSize:
6762  *      On exit, returns the size of the context in which the
6763  *      application should draw.
6764  *
6765  *  Result:
6766  *    An operating system result code. windowWrongStateErr is returned
6767  *    if the window is not collapsed.
6768  *
6769  *  Availability:
6770  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
6771  *    CarbonLib:        not available
6772  *    Non-Carbon CFM:   not available
6773  }
HIWindowCreateCollapsedDockTileContextnull6774 function HIWindowCreateCollapsedDockTileContext( inWindow: WindowRef; var outContext: CGContextRef; var outContextSize: HISize ): OSStatus; external name '_HIWindowCreateCollapsedDockTileContext';
6775 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
6776 
6777 
6778 {
6779  *  HIWindowReleaseCollapsedDockTileContext()
6780  *
6781  *  Discussion:
6782  *    Releases a CGContextRef and other state created by the
6783  *    HIWindowCreateCollapsedDockTileContext API. You MUST call this
6784  *    instead of CFRelease/CGContextRelease directly, or you may leak
6785  *    system resources.
6786  *
6787  *  Mac OS X threading:
6788  *    Not thread safe
6789  *
6790  *  Parameters:
6791  *
6792  *    inWindow:
6793  *      The collapsed window for which you created the CGContextRef.
6794  *
6795  *    inContext:
6796  *      The context to release. The context is invalid after this call
6797  *      and should no longer be used. To ensure that drawing to the
6798  *      context appears onscreen, make sure to call CGContextFlush
6799  *      before releasing the context.
6800  *
6801  *  Result:
6802  *    An operating system result code. windowWrongStateErr is returned
6803  *    if the window is not collapsed.
6804  *
6805  *  Availability:
6806  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
6807  *    CarbonLib:        not available
6808  *    Non-Carbon CFM:   not available
6809  }
HIWindowReleaseCollapsedDockTileContextnull6810 function HIWindowReleaseCollapsedDockTileContext( inWindow: WindowRef; inContext: CGContextRef ): OSStatus; external name '_HIWindowReleaseCollapsedDockTileContext';
6811 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
6812 
6813 
6814 {
6815  *  CreateQDContextForCollapsedWindowDockTile()   *** DEPRECATED ***
6816  *
6817  *  Deprecated:
6818  *    Use HIWindowCreateCollapsedDockTileContext instead.
6819  *
6820  *  Discussion:
6821  *    Creates and returns a CGrafPtr for a collapsed window's tile in
6822  *    the dock. You can use this port to draw into your window's dock
6823  *    tile with Quickdraw. You MUST call
6824  *    ReleaseQDContextForCollapsedWindowDockTile and NOT DisposePort
6825  *    when using this API, as it maintains more state than just the
6826  *    port. If you call DisposePort, you may leak system resources.
6827  *
6828  *  Mac OS X threading:
6829  *    Not thread safe
6830  *
6831  *  Parameters:
6832  *
6833  *    inWindow:
6834  *      The window to create the dock tile port for. If this window is
6835  *      not collapsed, an error is returned.
6836  *
6837  *    outContext:
6838  *      The Quickdraw port for you to use to draw into. If you wish to
6839  *      use CoreGraphics (Quartz) drawing, call CreateCGContextForPort
6840  *      with this port to obtain a CGContext.
6841  *
6842  *  Result:
6843  *    An operating system result code. windowWrongStateErr is returned
6844  *    if the window is not collapsed.
6845  *
6846  *  Availability:
6847  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6848  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
6849  *    Non-Carbon CFM:   not available
6850  }
CreateQDContextForCollapsedWindowDockTilenull6851 function CreateQDContextForCollapsedWindowDockTile( inWindow: WindowRef; var outContext: CGrafPtr ): OSStatus; external name '_CreateQDContextForCollapsedWindowDockTile';
6852 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6853 
6854 
6855 {
6856  *  ReleaseQDContextForCollapsedWindowDockTile()   *** DEPRECATED ***
6857  *
6858  *  Deprecated:
6859  *    Use HIWindowReleaseCollapsedDockTileContext instead.
6860  *
6861  *  Discussion:
6862  *    Releases a port and other state created by the
6863  *    CreateQDContextForCollapsedWindowDockTile API. You MUST call this
6864  *    instead of DisposePort directly, or you may leak system resources.
6865  *
6866  *  Mac OS X threading:
6867  *    Not thread safe
6868  *
6869  *  Parameters:
6870  *
6871  *    inWindow:
6872  *      The window you created the port for. If this window is not
6873  *      collapsed, an error is returned.
6874  *
6875  *    inContext:
6876  *      The Quickdraw context to dispose.
6877  *
6878  *  Result:
6879  *    An operating system result code. windowWrongStateErr is returned
6880  *    if the window is not collapsed.
6881  *
6882  *  Availability:
6883  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6884  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
6885  *    Non-Carbon CFM:   not available
6886  }
ReleaseQDContextForCollapsedWindowDockTilenull6887 function ReleaseQDContextForCollapsedWindowDockTile( inWindow: WindowRef; inContext: CGrafPtr ): OSStatus; external name '_ReleaseQDContextForCollapsedWindowDockTile';
6888 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6889 
6890 
6891 {
6892  *  UpdateCollapsedWindowDockTile()
6893  *
6894  *  Discussion:
6895  *    Automatically updates the image of a particular window in the
6896  *    dock to the current contents of the window. Use this for periodic
6897  *    updates, etc. Do not use this for animation purposes, if you want
6898  *    animation, use the above create/release drawing context APIs.
6899  *
6900  *  Mac OS X threading:
6901  *    Not thread safe
6902  *
6903  *  Parameters:
6904  *
6905  *    inWindow:
6906  *      The window to update the dock tile for. If this window is not
6907  *      collapsed, an error is returned.
6908  *
6909  *  Result:
6910  *    An operating system result code.
6911  *
6912  *  Availability:
6913  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
6914  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
6915  *    Non-Carbon CFM:   not available
6916  }
UpdateCollapsedWindowDockTilenull6917 function UpdateCollapsedWindowDockTile( inWindow: WindowRef ): OSStatus; external name '_UpdateCollapsedWindowDockTile';
6918 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
6919 
6920 
6921 {
6922  *  SetWindowDockTileMenu()
6923  *
6924  *  Summary:
6925  *    Sets the menu that is displayed by a window's dock tile.
6926  *
6927  *  Discussion:
6928  *    When a window's dock tile menu is right-clicked or
6929  *    control-clicked, the Dock will always automatically display a
6930  *    menu containing a Close menu item that closes the window. If the
6931  *    application wants to add other additional menu items, it can use
6932  *    the SetWindowDockTileMenu API to provide those items. The items
6933  *    in the specified menu will be combined with the standard items
6934  *    provided by the Dock.
6935  *
6936  *    Before the menu is actually displayed, it will receive
6937  *    kEventMenuPopulate, kEventMenuOpening, and kEventMenuEnableItems
6938  *    Carbon events, so any event handlers for these events may update
6939  *    the menu appropriately for the current state of the
6940  *    application.
6941  *
6942  *    The application should set a command ID for each menu item in the
6943  *    dock tile menu, and when that item is chosen, a
6944  *    kEventCommandProcess Carbon event containing the item's command
6945  *    ID will be sent to the window's event target (and from there to
6946  *    the application, if the window does not handle the
6947  *    event).
6948  *
6949  *    This API increments the refcount of the specified menu.
6950  *
6951  *    The toolbox provides a default handler for the
6952  *    kEventWindowGetDockTileMenu event that returns the menu specified
6953  *    by the SetWindowDockTileMenu API.
6954  *
6955  *  Mac OS X threading:
6956  *    Not thread safe
6957  *
6958  *  Parameters:
6959  *
6960  *    inWindow:
6961  *      The window for which to set the dock tile menu.
6962  *
6963  *    inMenu:
6964  *      The menu to display, or NULL to remove the current dock tile
6965  *      menu.
6966  *
6967  *  Availability:
6968  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
6969  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
6970  *    Non-Carbon CFM:   not available
6971  }
SetWindowDockTileMenunull6972 function SetWindowDockTileMenu( inWindow: WindowRef; inMenu: MenuRef { can be NULL } ): OSStatus; external name '_SetWindowDockTileMenu';
6973 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
6974 
6975 
6976 {
6977  *  GetWindowDockTileMenu()
6978  *
6979  *  Summary:
6980  *    Returns the menu that is displayed by a window's dock tile.
6981  *
6982  *  Mac OS X threading:
6983  *    Not thread safe
6984  *
6985  *  Result:
6986  *    The application's dock tile menu, or NULL if none.
6987  *
6988  *  Availability:
6989  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
6990  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
6991  *    Non-Carbon CFM:   not available
6992  }
GetWindowDockTileMenunull6993 function GetWindowDockTileMenu( inWindow: WindowRef ): MenuRef; external name '_GetWindowDockTileMenu';
6994 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
6995 
6996 
6997 {
6998  *  HIWindowGetBounds()
6999  *
7000  *  Summary:
7001  *    Retrieves the bounds of a specified region of a window.
7002  *
7003  *  Mac OS X threading:
7004  *    Not thread safe
7005  *
7006  *  Parameters:
7007  *
7008  *    inWindow:
7009  *      The window whose bounds to return.
7010  *
7011  *    inRegion:
7012  *      The window region whose bounds to return.
7013  *
7014  *    inSpace:
7015  *      The coordinate space in which the bounds should be returned.
7016  *      This must be kHICoordSpaceWindow, kHICoordSpaceScreenPixel, or
7017  *      kHICoordSpace72DPIGlobal.
7018  *
7019  *    outBounds:
7020  *      On exit, contains the bounds of the specified window region. If
7021  *      the region is not supported, this parameter is not modified.
7022  *
7023  *  Result:
7024  *    An operating system result code. errWindowRegionCodeInvalid is
7025  *    returned if the window does not support the specified window
7026  *    region.
7027  *
7028  *  Availability:
7029  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7030  *    CarbonLib:        not available
7031  *    Non-Carbon CFM:   not available
7032  }
HIWindowGetBoundsnull7033 function HIWindowGetBounds( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; var outBounds: HIRect ): OSStatus; external name '_HIWindowGetBounds';
7034 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7035 
7036 
7037 {
7038  *  HIWindowSetBounds()
7039  *
7040  *  Summary:
7041  *    Sets the bounds of a window based on either the structure or
7042  *    content region of the window.
7043  *
7044  *  Mac OS X threading:
7045  *    Not thread safe
7046  *
7047  *  Parameters:
7048  *
7049  *    inWindow:
7050  *      The window whose bounds to set.
7051  *
7052  *    inRegion:
7053  *      The window region on which to base the window's new bounds.
7054  *      This parameter must be either kWindowStructureRgn or
7055  *      kWindowContentRgn.
7056  *
7057  *    inSpace:
7058  *      The coordinate space in which the bounds are expressed. This
7059  *      must be kHICoordSpaceWindow, kHICoordSpaceScreenPixel, or
7060  *      kHICoordSpace72DPIGlobal.
7061  *
7062  *    inBounds:
7063  *      The new bounds of the specified window region. If the
7064  *      coordinate space is kHICoordSpaceWindow, then the origin of the
7065  *      bounds is a window-relative value. Therefore, you can use the
7066  *      Window coordinate space to resize a window without first
7067  *      getting its current bounds by setting the origin to (0,0), or
7068  *      you can offset a window from its current position by setting
7069  *      the origin to the offset amount and the size to the window's
7070  *      current size.
7071  *
7072  *  Result:
7073  *    An operating system result code. errWindowRegionCodeInvalid is
7074  *    returned if the inRegion parameter is any value other than
7075  *    kWindowStructureRgn or kWindowContentRgn.
7076  *
7077  *  Availability:
7078  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7079  *    CarbonLib:        not available
7080  *    Non-Carbon CFM:   not available
7081  }
HIWindowSetBoundsnull7082 function HIWindowSetBounds( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; const (*var*) inBounds: HIRect ): OSStatus; external name '_HIWindowSetBounds';
7083 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7084 
7085 
7086 {
7087    Routines available from Mac OS 8.5 forward
7088    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
7089 }
7090 
7091 {
7092  *  GetWindowBounds()
7093  *
7094  *  Mac OS X threading:
7095  *    Not thread safe
7096  *
7097  *  Availability:
7098  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7099  *    CarbonLib:        in CarbonLib 1.0 and later
7100  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7101  }
GetWindowBoundsnull7102 function GetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; var globalBounds: Rect ): OSStatus; external name '_GetWindowBounds';
7103 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7104 
7105 
7106 {
7107  *  SetWindowResizeLimits()
7108  *
7109  *  Summary:
7110  *    Sets the minimum and maximum content sizes for a window.
7111  *
7112  *  Discussion:
7113  *    The minimum and maximum sizes are obeyed by ResizeWindow and
7114  *    GrowWindow. The default Carbon event handler installed for all
7115  *    windows will return these sizes in response to
7116  *    kEventWindowGetMinimumSize and kEventWindowGetMaximumSize events.
7117  *    When a window is first created, its minimum and maximum sizes are
7118  *    set to reasonable values (which may change from one system
7119  *    release to the next).
7120  *
7121  *  Mac OS X threading:
7122  *    Not thread safe
7123  *
7124  *  Parameters:
7125  *
7126  *    inWindow:
7127  *      The window whose minimum and maximum sizes to set.
7128  *
7129  *    inMinLimits:
7130  *      The new minimum size for the content region of the window. Pass
7131  *      NULL if you don't want to set a minimum size.
7132  *
7133  *    inMaxLimits:
7134  *      The new maximum size for the content region of the window. Pass
7135  *      NULL if you don't want to set a maximum size.
7136  *
7137  *  Result:
7138  *    An operating system result code.
7139  *
7140  *  Availability:
7141  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
7142  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
7143  *    Non-Carbon CFM:   not available
7144  }
SetWindowResizeLimitsnull7145 function SetWindowResizeLimits( inWindow: WindowRef; {const} inMinLimits: HISizePtr { can be NULL }; {const} inMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_SetWindowResizeLimits';
7146 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
7147 
7148 
7149 {
7150  *  GetWindowResizeLimits()
7151  *
7152  *  Summary:
7153  *    Returns the minimum and maximum content sizes for a window.
7154  *
7155  *  Discussion:
7156  *    GetWindowResizeLimits returns the minimum and maximum sizes that
7157  *    were set by SetWindowResizeLimits. Note that it does not send
7158  *    kEventWindowGetMinimumSize or kEventWindowGetMaximumSize Carbon
7159  *    events to get these sizes; it simply retrieves the sizes from the
7160  *    WindowRef. It is entirely possible (and quite likely) that a
7161  *    given window will have event handlers for the
7162  *    kEventWindowGetMinimum/MaximumSize events that will modify or
7163  *    override the sizes in the WindowRef; therefore, to accurately
7164  *    determine the desired minimum and maximum sizes, you should send
7165  *    kEventWindowGetMinimum/MaximumSize Carbon events rather than
7166  *    using this API.
7167  *
7168  *  Mac OS X threading:
7169  *    Not thread safe
7170  *
7171  *  Parameters:
7172  *
7173  *    inWindow:
7174  *      The window whose minimum and maximum sizes to retrieve.
7175  *
7176  *    outMinLimits:
7177  *      On exit, contains the minimum size of the window's content
7178  *      region. Pass NULL if you don't want this information.
7179  *
7180  *    outMaxLimits:
7181  *      On exit, contains the maximum size of the window's content
7182  *      region. Pass NULL if you don't want this information.
7183  *
7184  *  Result:
7185  *    An operating system result code.
7186  *
7187  *  Availability:
7188  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
7189  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
7190  *    Non-Carbon CFM:   not available
7191  }
GetWindowResizeLimitsnull7192 function GetWindowResizeLimits( inWindow: WindowRef; outMinLimits: HISizePtr { can be NULL }; outMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_GetWindowResizeLimits';
7193 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
7194 
7195 
7196 {
7197    Routines available from Mac OS 8.5 forward,
7198    or from Mac OS 8.1 forward when linking to CarbonLib 1.0.2 forward
7199 }
7200 
7201 {
7202  *  SetWindowBounds()
7203  *
7204  *  Mac OS X threading:
7205  *    Not thread safe
7206  *
7207  *  Availability:
7208  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7209  *    CarbonLib:        in CarbonLib 1.0 and later
7210  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7211  }
SetWindowBoundsnull7212 function SetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; const (*var*) globalBounds: Rect ): OSStatus; external name '_SetWindowBounds';
7213 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7214 
7215 
7216 {
7217  *  RepositionWindow()
7218  *
7219  *  Summary:
7220  *    Positions a window according in one of the standard window
7221  *    locations.
7222  *
7223  *  Mac OS X threading:
7224  *    Not thread safe
7225  *
7226  *  Parameters:
7227  *
7228  *    window:
7229  *      The window to position.
7230  *
7231  *    parentWindow:
7232  *      For some positioning methods, the new location for the
7233  *      positioned window will be calculated based on the parent
7234  *      window�s position. On Mac OS X 10.3 and later, some positioning
7235  *      methods allow this parameter to be the same as the window
7236  *      parameter; CarbonLib and earlier versions of Mac OS X require
7237  *      that it be different from the window parameter. See the
7238  *      WindowPositionMethod documentation for details on which methods
7239  *      allow the parent to be the same as the positioned window.
7240  *
7241  *    method:
7242  *      The window positioning method. This should be one of the
7243  *      WindowPositionMethod constants.
7244  *
7245  *  Availability:
7246  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7247  *    CarbonLib:        in CarbonLib 1.0 and later
7248  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7249  }
RepositionWindownull7250 function RepositionWindow( window: WindowRef; parentWindow: WindowRef; method: WindowPositionMethod ): OSStatus; external name '_RepositionWindow';
7251 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7252 
7253 
7254 {
7255  *  MoveWindowStructure()
7256  *
7257  *  Mac OS X threading:
7258  *    Not thread safe
7259  *
7260  *  Availability:
7261  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7262  *    CarbonLib:        in CarbonLib 1.0 and later
7263  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7264  }
MoveWindowStructurenull7265 function MoveWindowStructure( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16 ): OSStatus; external name '_MoveWindowStructure';
7266 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7267 
7268 
7269 {
7270    Routines available from Mac OS 8.5 forward,
7271    or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward
7272 }
7273 
7274 { Routines available from Mac OS 8.5 forward}
7275 
7276 {
7277  *  HIWindowIsInStandardState()
7278  *
7279  *  Summary:
7280  *    Determines whether a window is currently zoomed in to the user
7281  *    state or zoomed out to the standard state.
7282  *
7283  *  Discussion:
7284  *    HIWindowIsInStandardState compares the window�s current
7285  *    dimensions to those given by the inIdealSize parameter to
7286  *    determine if the window is currently in its standard (zoomed-out)
7287  *    state. Your application may use HIWindowIsInStandardState to
7288  *    decide whether a user�s click of the zoom box is a request to
7289  *    zoom in to the user state or out to the standard state. Your
7290  *    application may also use HIWindowIsInStandardState to determine
7291  *    the size and position of the standard state that the Window
7292  *    Manager would calculate for a window, given a specified ideal
7293  *    size; this value is returned in the outIdealStandardState
7294  *    parameter.
7295  *
7296  *  Mac OS X threading:
7297  *    Not thread safe
7298  *
7299  *  Parameters:
7300  *
7301  *    inWindow:
7302  *      The window for which to determine the zoom state.
7303  *
7304  *    inIdealSize:
7305  *      The ideal width and height of the window�s content region,
7306  *      regardless of the actual screen device dimensions. If you set
7307  *      idealSize to NULL, HIWindowIsInStandardState examines the
7308  *      dimensions stored in the stdState field of the WStateData
7309  *      structure attached to the window.
7310  *
7311  *    inSpace:
7312  *      The coordinate space in which the ideal size is expressed and
7313  *      in which the standard state bounds should be returned. This
7314  *      must be kHICoordSpaceScreenPixel or kHICoordSpace72DPIGlobal.
7315  *
7316  *    outIdealStandardState:
7317  *      On exit, contains the global coordinates for the content region
7318  *      of the window in its standard state, based on the data supplied
7319  *      in the inIdealSize parameter. The coordinates are in either
7320  *      screen pixels or 72DPI virtual coordinates. You may pass NULL
7321  *      if you do not need this information.
7322  *
7323  *  Result:
7324  *    Returns true if the window is currently in its standard
7325  *    (zoomed-out) state, or false if the window is a non-zoomed-out
7326  *    state.
7327  *
7328  *  Availability:
7329  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7330  *    CarbonLib:        not available
7331  *    Non-Carbon CFM:   not available
7332  }
HIWindowIsInStandardStatenull7333 function HIWindowIsInStandardState( inWindow: WindowRef; {const} inIdealSize: HISizePtr { can be NULL }; inSpace: HICoordinateSpace; outIdealStandardState: HIRectPtr { can be NULL } ): Boolean; external name '_HIWindowIsInStandardState';
7334 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7335 
7336 
7337 {
7338  *  IsWindowInStandardState()
7339  *
7340  *  Summary:
7341  *    Determines whether a window is currently zoomed in to the user
7342  *    state or zoomed out to the standard state.
7343  *
7344  *  Discussion:
7345  *    IsWindowInStandardState compares the window�s current dimensions
7346  *    to those given by the inIdealSize parameter to determine if the
7347  *    window is currently in its standard (zoomed-out) state. Your
7348  *    application may use IsWindowInStandardState to decide whether a
7349  *    user�s click of the zoom box is a request to zoom in to the user
7350  *    state or out to the standard state. Your application may also use
7351  *    IsWindowInStandardState to determine the size and position of the
7352  *    standard state that the Window Manager would calculate for a
7353  *    window, given a specified ideal size; this value is returned in
7354  *    the outIdealStandardState parameter.
7355  *
7356  *  Mac OS X threading:
7357  *    Not thread safe
7358  *
7359  *  Parameters:
7360  *
7361  *    inWindow:
7362  *      The window for which to determine the zoom state.
7363  *
7364  *    inIdealSize:
7365  *      The ideal width and height of the window�s content region,
7366  *      regardless of the actual screen device dimensions. If you set
7367  *      idealSize to NULL, IsWindowInStandardState examines the
7368  *      dimensions stored in the stdState field of the WStateData
7369  *      structure attached to the window.
7370  *
7371  *    outIdealStandardState:
7372  *      On exit, contains the global coordinates for the content region
7373  *      of the window in its standard state, based on the data supplied
7374  *      in the inIdealSize parameter. You may pass NULL if you do not
7375  *      need this information.
7376  *
7377  *  Result:
7378  *    Returns true if the window is currently in its standard
7379  *    (zoomed-out) state, or false if the window is a non-zoomed-out
7380  *    state.
7381  *
7382  *  Availability:
7383  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7384  *    CarbonLib:        in CarbonLib 1.0 and later
7385  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7386  }
IsWindowInStandardStatenull7387 function IsWindowInStandardState( inWindow: WindowRef; {const} inIdealSize: PointPtr { can be NULL }; outIdealStandardState: RectPtr { can be NULL } ): Boolean; external name '_IsWindowInStandardState';
7388 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7389 
7390 
7391 {
7392  *  ZoomWindowIdeal()
7393  *
7394  *  Summary:
7395  *    Zooms a window in accordance with human interface guidelines.
7396  *
7397  *  Discussion:
7398  *    Applications should use the ZoomWindowIdeal API instead of the
7399  *    older ZoomWindow API. When your application calls
7400  *    ZoomWindowIdeal, it automatically conforms to the human interface
7401  *    guidelines for determining a window�s standard state: the window
7402  *    is moved as little as possible when switching between user and
7403  *    standard states, the window is zoomed to the screen that contains
7404  *    the largest portion of the window, and the window is positioned
7405  *    in its zoomed-out size to avoid the Dock on Mac OS X.
7406  *
7407  *    The ZoomWindowIdeal API calculates a window�s ideal standard
7408  *    state and updates a window�s ideal user state independently of
7409  *    the WStateData structure. Previously, the window definition
7410  *    function was responsible for updating the user state, but because
7411  *    it relies upon the WStateData structure, the window definition
7412  *    function is unaware of the ideal standard state and can no longer
7413  *    track the window�s zoom state reliably. The Window Manager
7414  *    provides the GetWindowIdealUserState and SetWindowIdealUserState
7415  *    APIs to access a window's current ideal user state, previously
7416  *    recorded by ZoomWindowIdeal.
7417  *
7418  *    In Mac OS X 10.7 and later, the ZoomWindowIdeal API automatically
7419  *    uses an animation to resize the window to its new size, if the
7420  *    window uses composited mode.
7421  *
7422  *  Mac OS X threading:
7423  *    Not thread safe
7424  *
7425  *  Parameters:
7426  *
7427  *    inWindow:
7428  *      The window to be zoomed.
7429  *
7430  *    inPartCode:
7431  *      The direction of the zoom, either inZoomIn or inZoomOut. The
7432  *      value passed in this parameter should generally be determined
7433  *      by calling IsWindowInStandardState; if IsWindowInStandardState
7434  *      returns true, pass inZoomIn, otherwise pass inZoomOut.
7435  *
7436  *    ioIdealSize:
7437  *      When you specify inZoomIn in the inPartCode parameter, this
7438  *      parameter is unused on entry; you pass a pointer to a Point
7439  *      structure, but do not fill the structure with data. On exit,
7440  *      the Point contains the new height and width of the window�s
7441  *      content region, and ZoomWindowIdeal restores the previous ideal
7442  *      user state. When you specify inZoomOut in the inPartCode
7443  *      parameter, you pass the ideal height and width of the window�s
7444  *      content region in the Point structure. On return, the Point
7445  *      contains the new height and width of the window�s content
7446  *      region; ZoomWindowIdeal saves the current user state of the
7447  *      window and zooms the window to its ideal size for the standard
7448  *      state.
7449  *
7450  *      Prior to Mac OS X Mac OS X 10.4, the ZoomWindowIdeal API
7451  *      malfunctioned if passed an idealSize that was large enough to
7452  *      cause 16-bit integer overflow when added to the window's
7453  *      current position. Therefore, when specifying the ideal size
7454  *      parameter, you should generally not use values that are close
7455  *      to 32767. It is better to limit your ideal size to, say, 16K.
7456  *
7457  *  Result:
7458  *    An operating system result code.
7459  *
7460  *  Availability:
7461  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7462  *    CarbonLib:        in CarbonLib 1.0 and later
7463  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7464  }
ZoomWindowIdealnull7465 function ZoomWindowIdeal( inWindow: WindowRef; inPartCode: WindowPartCode; var ioIdealSize: Point ): OSStatus; external name '_ZoomWindowIdeal';
7466 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7467 
7468 
7469 {
7470  *  HIWindowGetIdealUserState()
7471  *
7472  *  Summary:
7473  *    Returns the bounds of a window�s content region in its user
7474  *    (zoomed-in) state.
7475  *
7476  *  Discussion:
7477  *    The HIWindowGetIdealUserState API returns the window�s user state
7478  *    most recently recorded by ZoomWindowIdeal.
7479  *
7480  *  Mac OS X threading:
7481  *    Not thread safe
7482  *
7483  *  Parameters:
7484  *
7485  *    inWindow:
7486  *      The window whose ideal user state you wish to retrieve.
7487  *
7488  *    inSpace:
7489  *      The coordinate space in which the user state bounds should be
7490  *      returned. This must be kHICoordSpaceScreenPixel or
7491  *      kHICoordSpace72DPIGlobal.
7492  *
7493  *    outUserState:
7494  *      On exit, contains the global coordinates of the window�s
7495  *      content region when zoomed in, in either screen pixels or 72DPI
7496  *      virtual coordinates. HIWindowGetIdealUserState automatically
7497  *      returns the window�s current content bounds if the window has
7498  *      not yet been zoomed.
7499  *
7500  *  Result:
7501  *    An operating system result code.
7502  *
7503  *  Availability:
7504  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7505  *    CarbonLib:        not available
7506  *    Non-Carbon CFM:   not available
7507  }
HIWindowGetIdealUserStatenull7508 function HIWindowGetIdealUserState( inWindow: WindowRef; inSpace: HICoordinateSpace; var outUserState: HIRect ): OSStatus; external name '_HIWindowGetIdealUserState';
7509 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7510 
7511 
7512 {
7513  *  HIWindowSetIdealUserState()
7514  *
7515  *  Summary:
7516  *    Sets the bounds of a window�s content region in its user
7517  *    (zoomed-in) state.
7518  *
7519  *  Discussion:
7520  *    The window�s ideal user state is used by the ZoomWindowIdeal API
7521  *    when zooming in. The ideal user state is ignored by the
7522  *    ZoomWindow API.
7523  *
7524  *  Mac OS X threading:
7525  *    Not thread safe
7526  *
7527  *  Parameters:
7528  *
7529  *    inWindow:
7530  *      The window whose ideal user state to set.
7531  *
7532  *    inSpace:
7533  *      The coordinate space in which the user state bounds are
7534  *      expressed. This must be kHICoordSpaceScreenPixel or
7535  *      kHICoordSpace72DPIGlobal.
7536  *
7537  *    inUserState:
7538  *      The global coordinates of the window�s content region in its
7539  *      ideal user state, in either screen pixels or 72DPI virtual
7540  *      coordinates.
7541  *
7542  *  Result:
7543  *    An operating system result code.
7544  *
7545  *  Availability:
7546  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7547  *    CarbonLib:        not available
7548  *    Non-Carbon CFM:   not available
7549  }
HIWindowSetIdealUserStatenull7550 function HIWindowSetIdealUserState( inWindow: WindowRef; inSpace: HICoordinateSpace; const (*var*) inUserState: HIRect ): OSStatus; external name '_HIWindowSetIdealUserState';
7551 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7552 
7553 
7554 {
7555  *  GetWindowIdealUserState()
7556  *
7557  *  Summary:
7558  *    Returns the bounds of a window�s content region in its user
7559  *    (zoomed-in) state.
7560  *
7561  *  Discussion:
7562  *    Traditionally, the user (zoomed-in) state of a window has been
7563  *    stored in the WStateData structure attached to a window. This
7564  *    field is updated by the window definition when the user clicks on
7565  *    the zoom box and the window definition determines that the window
7566  *    is currently not zoomed out. When determining whether the window
7567  *    is zoomed out, however, the window definition can only look at
7568  *    the standard state stored in the WStateData field. With the
7569  *    introduction of the ZoomWindowIdeal API, there is a new basis for
7570  *    determining whether a window is zoomed out: the window�s ideal
7571  *    size. The window definition does not have access to the window�s
7572  *    ideal size, and therefore cannot accurately determine whether a
7573  *    window that is zoomed with ZoomWindowIdeal is in its user state
7574  *    or standard state; therefore, the user state that the window
7575  *    definition stores in the WStateData is also unreliable. The
7576  *    ZoomWindowIdeal API therefore stores the window�s user state
7577  *    before zooming out in a new location, which is accessed using the
7578  *    GetWindowIdealUserState API. The GetWindowIdealUserState API
7579  *    returns the window�s user state most recently recorded by
7580  *    ZoomWindowIdeal.
7581  *
7582  *  Mac OS X threading:
7583  *    Not thread safe
7584  *
7585  *  Parameters:
7586  *
7587  *    inWindow:
7588  *      The window whose ideal user state you wish to retrieve.
7589  *
7590  *    outUserState:
7591  *      On exit, contains the global coordinates of the window�s
7592  *      content region when zoomed in. On Mac OS X 10.1 and earlier,
7593  *      and CarbonLib 1.5 and earlier, the window�s ideal user state is
7594  *      an empty rect with coordinates (0,0,0,0) if the window has
7595  *      never been zoomed out; you should check for an empty rect and
7596  *      use GetWindowBounds with the kWindowContentRgn selector to
7597  *      determine the window�s current content region. On later
7598  *      versions of Mac OS X and CarbonLib, GetWindowIdealUserState
7599  *      automatically returns the window�s current content bounds if
7600  *      the window has not yet been zoomed.
7601  *
7602  *  Result:
7603  *    An operating system result code.
7604  *
7605  *  Availability:
7606  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7607  *    CarbonLib:        in CarbonLib 1.0 and later
7608  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7609  }
GetWindowIdealUserStatenull7610 function GetWindowIdealUserState( inWindow: WindowRef; var outUserState: Rect ): OSStatus; external name '_GetWindowIdealUserState';
7611 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7612 
7613 
7614 {
7615  *  SetWindowIdealUserState()
7616  *
7617  *  Summary:
7618  *    Sets the bounds of a window�s content region in its user
7619  *    (zoomed-in) state.
7620  *
7621  *  Discussion:
7622  *    The window�s ideal user state is used by the ZoomWindowIdeal API
7623  *    when zooming in. The ideal user state is ignored by the
7624  *    ZoomWindow API.
7625  *
7626  *  Mac OS X threading:
7627  *    Not thread safe
7628  *
7629  *  Parameters:
7630  *
7631  *    inWindow:
7632  *      The window whose ideal user state to set.
7633  *
7634  *    inUserState:
7635  *      The global coordinates of the window�s content region in its
7636  *      ideal user state.
7637  *
7638  *  Result:
7639  *    An operating system result code.
7640  *
7641  *  Availability:
7642  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7643  *    CarbonLib:        in CarbonLib 1.0 and later
7644  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
7645  }
SetWindowIdealUserStatenull7646 function SetWindowIdealUserState( inWindow: WindowRef; const (*var*) inUserState: Rect ): OSStatus; external name '_SetWindowIdealUserState';
7647 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7648 
7649 
7650 {
7651  *  GetWindowGreatestAreaDevice()
7652  *
7653  *  Summary:
7654  *    Returns the graphics device with the greatest area of
7655  *    intersection with a specified window region.
7656  *
7657  *  Discussion:
7658  *    HIWindowGetGreatestAreaDisplay is recommended for use instead of
7659  *    this API.
7660  *
7661  *  Mac OS X threading:
7662  *    Not thread safe
7663  *
7664  *  Parameters:
7665  *
7666  *    inWindow:
7667  *      The window to compare against.
7668  *
7669  *    inRegion:
7670  *      The window region to compare against.
7671  *
7672  *    outGreatestDevice:
7673  *      On exit, the graphics device with the greatest intersection.
7674  *      May be NULL.
7675  *
7676  *    outGreatestDeviceRect:
7677  *      On exit, the bounds of the graphics device with the greatest
7678  *      intersection. May be NULL. If the device with the greatest
7679  *      intersection also contains the menu bar, the device rect will
7680  *      exclude the menu bar area.
7681  *
7682  *  Availability:
7683  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7684  *    CarbonLib:        in CarbonLib 1.1 and later
7685  *    Non-Carbon CFM:   not available
7686  }
GetWindowGreatestAreaDevicenull7687 function GetWindowGreatestAreaDevice( inWindow: WindowRef; inRegion: WindowRegionCode; outGreatestDevice: GDHandlePtr { can be NULL }; outGreatestDeviceRect: RectPtr { can be NULL } ): OSStatus; external name '_GetWindowGreatestAreaDevice';
7688 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7689 
7690 
7691 {
7692  *  HIWindowGetGreatestAreaDisplay()
7693  *
7694  *  Summary:
7695  *    Returns the display with the greatest area of intersection with a
7696  *    specified window region.
7697  *
7698  *  Mac OS X threading:
7699  *    Not thread safe
7700  *
7701  *  Parameters:
7702  *
7703  *    inWindow:
7704  *      The window to compare against.
7705  *
7706  *    inRegion:
7707  *      The window region to compare against.
7708  *
7709  *    inSpace:
7710  *      The coordinate space in which the display bounds should be
7711  *      returned. This must be either kHICoordSpaceScreenPixel or
7712  *      kHICoordSpace72DPIGlobal.
7713  *
7714  *    outGreatestDisplay:
7715  *      On exit, the display with the greatest intersection. May be
7716  *      NULL if you don't need this information.
7717  *
7718  *    outGreatestDisplayRect:
7719  *      On exit, the bounds of the display with the greatest
7720  *      intersection. May be NULL if you don't need this information.
7721  *      If the device with the greatest intersection also contains the
7722  *      menu bar, the display rect will exclude the menu bar area. This
7723  *      rectangle is returned in the specified coordinate space.
7724  *
7725  *  Result:
7726  *    An operating system result code.
7727  *
7728  *  Availability:
7729  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7730  *    CarbonLib:        not available
7731  *    Non-Carbon CFM:   not available
7732  }
HIWindowGetGreatestAreaDisplaynull7733 function HIWindowGetGreatestAreaDisplay( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; outGreatestDisplay: CGDirectDisplayIDPtr { can be NULL }; outGreatestDisplayRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIWindowGetGreatestAreaDisplay';
7734 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7735 
7736 
7737 {$endc} {not TARGET_CPU_64}
7738 
7739 
7740 {
7741  *  WindowConstrainOptions
7742  *
7743  }
7744 type
7745 	WindowConstrainOptions = UInt32;
7746 const
7747 {
7748    * The window may be resized if necessary to make it fit onscreen.
7749    }
7750 	kWindowConstrainMayResize = 1 shl 0;
7751 
7752   {
7753    * The window will be moved even if it doesn't fit entirely onscreen.
7754    }
7755 	kWindowConstrainMoveRegardlessOfFit = 1 shl 1;
7756 
7757   {
7758    * Allow partial intersection of the specified window region with the
7759    * screen, instead of requiring total intersection.
7760    }
7761 	kWindowConstrainAllowPartial = 1 shl 2;
7762 
7763   {
7764    * Only calculate the new window bounds; don't actually move the
7765    * window.
7766    }
7767 	kWindowConstrainCalcOnly = 1 shl 3;
7768 
7769   {
7770    * Use TransitionWindow with kWindowSlideTransitionEffect to move
7771    * windows onscreen. Available in Mac OS X 10.2.
7772    }
7773 	kWindowConstrainUseTransitionWindow = 1 shl 4;
7774 
7775   {
7776    * Requests that the window be moved the minimum amount necessary to
7777    * be onscreen. This option applies if a partial fit is not allowed
7778    * (kWindowConstrainAllowPartial is not specified) or a partial fit
7779    * is allowed, but the window is not even partially visible. In
7780    * either case, the window will be moved just enough to be slightly
7781    * onscreen. You may customize the minimum amount that is required to
7782    * be visible by passing the desired dimensions in the inMinimumSize
7783    * parameter to HIWindowConstrain.
7784    }
7785 	kWindowConstrainMoveMinimum = 1 shl 6;
7786 
7787   {
7788    * Requests that when determining the bounds of the window region to
7789    * be constrained, rather than getting the current bounds of the
7790    * specified region, the Window Manager should use the bounds
7791    * provided in the ioBounds parameter to HIWindowConstrain. This
7792    * allows your application to constrain a window to a hypothetical
7793    * location; for example, if you plan to move your window such that
7794    * its content rect is at a certain location, and you want to know in
7795    * advance before moving the window whether the window would be
7796    * offscreen at that location, you can use this option.
7797    }
7798 	kWindowConstrainUseSpecifiedBounds = 1 shl 8;
7799 
7800   {
7801    * The most common options: don't resize the window, move the window
7802    * regardless of fit to the screen, require total intersection of the
7803    * specified window region with the screen, and do actually move the
7804    * window.
7805    }
7806 	kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit;
7807 
7808 {$ifc not TARGET_CPU_64}
7809 {
7810  *  HIWindowConstrain()
7811  *
7812  *  Summary:
7813  *    Moves and resizes a window to be within a specified bounding
7814  *    rectangle.
7815  *
7816  *  Mac OS X threading:
7817  *    Not thread safe
7818  *
7819  *  Parameters:
7820  *
7821  *    inWindow:
7822  *      The window to constrain.
7823  *
7824  *    inRegionCode:
7825  *      The window region to constrain.
7826  *
7827  *    inOptions:
7828  *      Flags controlling how the window is constrained.
7829  *
7830  *    inSpace:
7831  *      The coordinate space in which the inScreenBounds,
7832  *      inMinimumSize, and ioBounds parameters are expressed. This
7833  *      parameter must be either kHICoordSpaceScreenPixels or
7834  *      kHICoordSpace72DPIGlobal.
7835  *
7836  *    inScreenBounds:
7837  *      A rectangle, in either screen pixel coordinates or 72DPI
7838  *      virtual coordinates, within which to constrain the window. You
7839  *      may pass NULL if you don't need to specify a screen bounds. If
7840  *      NULL, the window is constrained to the screen that has the
7841  *      greatest intersection with the specified window region.
7842  *
7843  *    inMinimumSize:
7844  *      A minimum size, in either screen pixel dimensions or 72DPI
7845  *      virtual dimensions, that should be kept within the specified
7846  *      screen bounds. This parameter is ignored if the
7847  *      kWindowConstrainMoveMinimum option is not set. Even if that
7848  *      option is set, you may still pass NULL if you don't need to
7849  *      customize the minimum dimensions. If NULL, the minimum size is
7850  *      currently seven 72DPI units in both x and y dimensions, but
7851  *      these values may change in different versions of Mac OS X.
7852  *
7853  *    ioBounds:
7854  *      On entry, if the inOptions parameter contains
7855  *      kWindowConstrainUseSpecifiedBounds, then this parameter should
7856  *      be a bounding rect of the specified window region, in either
7857  *      screen pixel coordinates or 72DPI global coordinates. The
7858  *      bounding rect does not have to match the actual current bounds
7859  *      of the specified region; it may be a hypothetical bounds that
7860  *      you would like to constrain without actually moving the window
7861  *      to that location.
7862  *
7863  *      On exit, contains the new structure bounds of the window, in
7864  *      either screen pixel coordinates or 72DPI virtual coordinates.
7865  *      You may pass NULL if you don't need the window bounds returned.
7866  *
7867  *  Availability:
7868  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
7869  *    CarbonLib:        not available
7870  *    Non-Carbon CFM:   not available
7871  }
HIWindowConstrainnull7872 function HIWindowConstrain( inWindow: WindowRef; inRegionCode: WindowRegionCode; inOptions: WindowConstrainOptions; inSpace: HICoordinateSpace; {const} inScreenBounds: HIRectPtr { can be NULL }; {const} inMinimumSize: HISizePtr { can be NULL }; ioBounds: HIRectPtr { can be NULL } ): OSStatus; external name '_HIWindowConstrain';
7873 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
7874 
7875 
7876 {
7877  *  ConstrainWindowToScreen()
7878  *
7879  *  Summary:
7880  *    Moves and resizes a window so that it's contained entirely on a
7881  *    single screen.
7882  *
7883  *  Mac OS X threading:
7884  *    Not thread safe
7885  *
7886  *  Parameters:
7887  *
7888  *    inWindowRef:
7889  *      The window to constrain.
7890  *
7891  *    inRegionCode:
7892  *      The window region to constrain.
7893  *
7894  *    inOptions:
7895  *      Flags controlling how the window is constrained.
7896  *
7897  *    inScreenRect:
7898  *      A rectangle, in global coordinates, in which to constrain the
7899  *      window. May be NULL. If NULL, the window is constrained to the
7900  *      screen with the greatest intersection with the specified window
7901  *      region.
7902  *
7903  *    outStructure:
7904  *      On exit, contains the new structure bounds of the window, in
7905  *      global coordinates. May be NULL.
7906  *
7907  *  Availability:
7908  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7909  *    CarbonLib:        in CarbonLib 1.1 and later
7910  *    Non-Carbon CFM:   not available
7911  }
ConstrainWindowToScreennull7912 function ConstrainWindowToScreen( inWindowRef: WindowRef; inRegionCode: WindowRegionCode; inOptions: WindowConstrainOptions; {const} inScreenRect: RectPtr { can be NULL }; outStructure: RectPtr { can be NULL } ): OSStatus; external name '_ConstrainWindowToScreen';
7913 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7914 
7915 
7916 {
7917  *  GetAvailableWindowPositioningBounds()
7918  *
7919  *  Summary:
7920  *    Returns the available window positioning bounds on the given
7921  *    screen (i.e., the screen rect minus the MenuBar and Dock if
7922  *    located on that screen).
7923  *
7924  *  Discussion:
7925  *    HIWindowGetAvailablePositioningBounds is recommended for use
7926  *    instead of this API.
7927  *
7928  *  Mac OS X threading:
7929  *    Not thread safe
7930  *
7931  *  Parameters:
7932  *
7933  *    inDevice:
7934  *      The device for which to find the available bounds. May be NULL
7935  *      to request the bounds of the main device.
7936  *
7937  *    outAvailableRect:
7938  *      On exit, contains the available bounds for the given device.
7939  *
7940  *  Availability:
7941  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
7942  *    CarbonLib:        in CarbonLib 1.3 and later
7943  *    Non-Carbon CFM:   not available
7944  }
GetAvailableWindowPositioningBoundsnull7945 function GetAvailableWindowPositioningBounds( inDevice: GDHandle; var outAvailableRect: Rect ): OSStatus; external name '_GetAvailableWindowPositioningBounds';
7946 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
7947 
7948 
7949 {
7950  *  GetAvailableWindowPositioningRegion()
7951  *
7952  *  Summary:
7953  *    Returns the available window positioning region on the given
7954  *    screen (i.e., the screen rect minus the MenuBar and Dock if
7955  *    located on that screen).
7956  *
7957  *  Discussion:
7958  *    GetAvailableWindowPositionRegion differs from
7959  *    GetAvailableWindowPositioningBounds in that the Bounds API
7960  *    removes the entire area that may theoretically be covered by the
7961  *    Dock, even if the the Dock does not currently reach from edge to
7962  *    edge of the device on which it is positioned. The Region API
7963  *    includes the area at the sides of the Dock that is not covered by
7964  *    the Dock in the available region.
7965  *
7966  *    HIWindowCopyAvailablePositioningShape is recommended for use
7967  *    instead of this API.
7968  *
7969  *  Mac OS X threading:
7970  *    Not thread safe
7971  *
7972  *  Parameters:
7973  *
7974  *    inDevice:
7975  *      The device for which to find the available bounds. May be NULL
7976  *      to request the bounds of the main device.
7977  *
7978  *    ioRgn:
7979  *      On entry, contains a preallocated RgnHandle. On exit, the
7980  *      RgnHandle has been modified to contain the available region for
7981  *      the given device.
7982  *
7983  *  Availability:
7984  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
7985  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
7986  *    Non-Carbon CFM:   not available
7987  }
GetAvailableWindowPositioningRegionnull7988 function GetAvailableWindowPositioningRegion( inDevice: GDHandle; ioRgn: RgnHandle ): OSStatus; external name '_GetAvailableWindowPositioningRegion';
7989 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
7990 
7991 
7992 {
7993  *  HIWindowGetAvailablePositioningBounds()
7994  *
7995  *  Summary:
7996  *    Returns the available window positioning bounds on the given
7997  *    display (the display bounds minus the menu bar and Dock if
7998  *    located on that display).
7999  *
8000  *  Mac OS X threading:
8001  *    Not thread safe
8002  *
8003  *  Parameters:
8004  *
8005  *    inDisplay:
8006  *      The display for which to find the available bounds. May be
8007  *      kCGNullDirectDisplay to request the bounds of the main display.
8008  *
8009  *    inSpace:
8010  *      The coordinate space in which the positioning bounds should be
8011  *      returned. This must be either kHICoordSpaceScreenPixel or
8012  *      kHICoordSpace72DPIGlobal.
8013  *
8014  *    outAvailableRect:
8015  *      On exit, contains the available bounds for the given display.
8016  *      This rectangle is returned in the specified coordinate space.
8017  *
8018  *  Result:
8019  *    An operating system result code.
8020  *
8021  *  Availability:
8022  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
8023  *    CarbonLib:        not available
8024  *    Non-Carbon CFM:   not available
8025  }
HIWindowGetAvailablePositioningBoundsnull8026 function HIWindowGetAvailablePositioningBounds( inDisplay: CGDirectDisplayID; inSpace: HICoordinateSpace; var outAvailableRect: HIRect ): OSStatus; external name '_HIWindowGetAvailablePositioningBounds';
8027 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
8028 
8029 
8030 {
8031  *  HIWindowCopyAvailablePositioningShape()
8032  *
8033  *  Summary:
8034  *    Returns the available window positioning bounds on the given
8035  *    display (the display bounds minus the menu bar and Dock if
8036  *    located on that display).
8037  *
8038  *  Discussion:
8039  *    HIWindowCopyAvailablePositioningShape differs from
8040  *    HIWindowGetAvailablePositioningBounds in that the Bounds API
8041  *    removes the entire area that may theoretically be covered by the
8042  *    Dock, even if the the Dock does not currently reach from edge to
8043  *    edge of the device on which it is positioned. The Shape API
8044  *    includes the area at the sides of the Dock that is not covered by
8045  *    the Dock in the available shape.
8046  *
8047  *  Mac OS X threading:
8048  *    Not thread safe
8049  *
8050  *  Parameters:
8051  *
8052  *    inDisplay:
8053  *      The display for which to find the available shape. May be
8054  *      kCGNullDirectDisplay to request the shape of the main display.
8055  *
8056  *    inSpace:
8057  *      The coordinate space in which the positioning shape should be
8058  *      returned. This must be either kHICoordSpaceScreenPixel or
8059  *      kHICoordSpace72DPIGlobal.
8060  *
8061  *    outShape:
8062  *      On exit, contains the available shape for the given display.
8063  *      This shape is returned in the specified coordinate space.
8064  *
8065  *  Result:
8066  *    An operating system result code.
8067  *
8068  *  Availability:
8069  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
8070  *    CarbonLib:        not available
8071  *    Non-Carbon CFM:   not available
8072  }
HIWindowCopyAvailablePositioningShapenull8073 function HIWindowCopyAvailablePositioningShape( inDisplay: CGDirectDisplayID; inSpace: HICoordinateSpace; var outShape: HIShapeRef ): OSStatus; external name '_HIWindowCopyAvailablePositioningShape';
8074 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
8075 
8076 
8077 {��������������������������������������������������������������������������������������}
8078 { � Window Visibility                                                                  }
8079 {��������������������������������������������������������������������������������������}
8080 {
8081  *  HideWindow()
8082  *
8083  *  Mac OS X threading:
8084  *    Not thread safe
8085  *
8086  *  Availability:
8087  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8088  *    CarbonLib:        in CarbonLib 1.0 and later
8089  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
8090  }
8091 procedure HideWindow( window: WindowRef ); external name '_HideWindow';
8092 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8093 
8094 
8095 {
8096  *  [Mac]ShowWindow()
8097  *
8098  *  Mac OS X threading:
8099  *    Not thread safe
8100  *
8101  *  Availability:
8102  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8103  *    CarbonLib:        in CarbonLib 1.0 and later
8104  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
8105  }
8106 {$ifc TARGET_OS_MAC}
8107 procedure MacShowWindow__NAME__ShowWindow( window: WindowRef ); external name '_MacShowWindow__NAME__ShowWindow';
8108 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8109 {$endc} {TARGET_OS_MAC}
8110 procedure ShowWindow( window: WindowRef ); external name '_ShowWindow';
8111 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8112 {
8113  *  ShowHide()
8114  *
8115  *  Mac OS X threading:
8116  *    Not thread safe
8117  *
8118  *  Availability:
8119  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8120  *    CarbonLib:        in CarbonLib 1.0 and later
8121  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
8122  }
8123 procedure ShowHide( window: WindowRef; showFlag: Boolean ); external name '_ShowHide';
8124 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8125 
8126 
8127 {
8128  *  [Mac]IsWindowVisible()
8129  *
8130  *  Mac OS X threading:
8131  *    Not thread safe
8132  *
8133  *  Availability:
8134  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8135  *    CarbonLib:        in CarbonLib 1.0 and later
8136  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
8137  }
8138 {$ifc TARGET_OS_MAC}
MacIsWindowVisible__NAME__IsWindowVisiblenull8139 function MacIsWindowVisible__NAME__IsWindowVisible( window: WindowRef ): Boolean; external name '_MacIsWindowVisible__NAME__IsWindowVisible';
8140 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8141 {$endc} {TARGET_OS_MAC}
IsWindowVisiblenull8142 function IsWindowVisible( window: WindowRef ): Boolean; external name '_IsWindowVisible';
8143 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8144 
8145 
8146 {
8147  *  HIWindowIsOnActiveSpace()
8148  *
8149  *  Summary:
8150  *    Returns whether a window is attached to the currently active
8151  *    space.
8152  *
8153  *  Discussion:
8154  *    For visible windows, this API indicates whether the window is
8155  *    currently visible on the active space; for invisible windows, it
8156  *    indicates whether the window would be visible on the active space
8157  *    if it were visible at this moment. The window's visible state
8158  *    still controls whether the window is actually visible or not.
8159  *
8160  *
8161  *    Windows that have availability attributes of either
8162  *    kHIWindowCanJoinAllSpaces or kHIWindowMoveToActiveSpace will
8163  *    always return true from this API.
8164  *
8165  *  Mac OS X threading:
8166  *    Not thread safe
8167  *
8168  *  Parameters:
8169  *
8170  *    inWindow:
8171  *      The window to examine.
8172  *
8173  *  Result:
8174  *    True if the window is attached to the current space or to all
8175  *    spaces, or false if the window is attached solely to some other
8176  *    space.
8177  *
8178  *  Availability:
8179  *    Mac OS X:         in version 10.6 and later in Carbon.framework [32-bit only]
8180  *    CarbonLib:        not available
8181  *    Non-Carbon CFM:   not available
8182  }
HIWindowIsOnActiveSpacenull8183 function HIWindowIsOnActiveSpace( inWindow: WindowRef ): Boolean; external name '_HIWindowIsOnActiveSpace';
8184 (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
8185 
8186 
8187 {
8188   ��������������������������������������������������������������������������������������
8189     ��Latent window visibility
8190   ��������������������������������������������������������������������������������������
8191 }
8192 
8193 {$endc} {not TARGET_CPU_64}
8194 
8195 
8196 {
8197  *  WindowLatentVisibility
8198  *
8199  *  Summary:
8200  *    Reasons why a window is currently invisible when ordinarily it
8201  *    would be visible.
8202  }
8203 type
8204 	WindowLatentVisibility = UInt32;
8205 	WindowLatentVisibilityPtr = ^WindowLatentVisibility;
8206 const
8207 {
8208    * Window is a floater and floating windows are hidden
8209    }
8210 	kWindowLatentVisibleFloater = 1 shl 0;
8211 
8212   {
8213    * Window has HideOnSuspend and we are suspended
8214    }
8215 	kWindowLatentVisibleSuspend = 1 shl 1;
8216 
8217   {
8218    * Window has HideOnFullScreen and we are full-screen
8219    }
8220 	kWindowLatentVisibleFullScreen = 1 shl 2;
8221 
8222   {
8223    * Window's process is hidden
8224    }
8225 	kWindowLatentVisibleAppHidden = 1 shl 3;
8226 
8227   {
8228    * Window is in an owned group and the owner was collapsed
8229    }
8230 	kWindowLatentVisibleCollapsedOwner = 1 shl 4;
8231 
8232   {
8233    * Window is in a HideOnCollapse group and another window in the
8234    * group was collapsed
8235    }
8236 	kWindowLatentVisibleCollapsedGroup = 1 shl 5;
8237 
8238 {$ifc not TARGET_CPU_64}
8239 {
8240  *  IsWindowLatentVisible()
8241  *
8242  *  Summary:
8243  *    Indicates whether a window is visible onscreen and also whether
8244  *    it is latently visible but not currently onscreen.
8245  *
8246  *  Discussion:
8247  *    All windows are either onscreen or offscreen. A window that is
8248  *    offscreen may still be latently visible; this occurs, for
8249  *    example, when a floating window is hidden as an application is
8250  *    suspended. The floating window is not visible onscreen, but it is
8251  *    latently visible and is only hidden due to the suspended state of
8252  *    the application; when the application becomes active again, the
8253  *    floating window will be placed back onscreen.
8254  *    IsWindowLatentVisible may be used to determine both the window's
8255  *    onscreen/offscreen status and its latent visibility (if the
8256  *    window is offscreen).
8257  *
8258  *  Mac OS X threading:
8259  *    Not thread safe
8260  *
8261  *  Parameters:
8262  *
8263  *    inWindow:
8264  *      The window whose visibility to return.
8265  *
8266  *    outLatentVisible:
8267  *      If the window is onscreen, the latent visibility is zero. If
8268  *      the window is offscreen, this parameter is used to return the
8269  *      latent visibility flags of the window. If any of the flags are
8270  *      set, then the window is latently visible.
8271  *
8272  *  Result:
8273  *    Indicates whether the window is currently onscreen.
8274  *
8275  *  Availability:
8276  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only]
8277  *    CarbonLib:        in CarbonLib 1.5 and later
8278  *    Non-Carbon CFM:   not available
8279  }
IsWindowLatentVisiblenull8280 function IsWindowLatentVisible( inWindow: WindowRef; outLatentVisible: WindowLatentVisibilityPtr { can be NULL } ): Boolean; external name '_IsWindowLatentVisible';
8281 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
8282 
8283 
8284 {
8285   ��������������������������������������������������������������������������������������
8286     ��Window Availability for Expos�
8287   ��������������������������������������������������������������������������������������
8288 }
8289 
8290 {$endc} {not TARGET_CPU_64}
8291 
8292 
8293 {
8294  *  Summary:
8295  *    Window availability options for Expos� and Spaces.
8296  *
8297  *  Discussion:
8298  *    These options are used with the HIWindowGet/ChangeAvailability
8299  *    APIs to override the default behavior of a window in Expos� and
8300  *    Spaces. Most applications should not override the default
8301  *    behavior; these options should only be used in special cases. By
8302  *    default, newly created windows of class kDocumentWindowClass are
8303  *    given an availability of zero (meaning that they are available
8304  *    during Expos�, and are only visible in the Space in which they
8305  *    were created), and windows from all other window classes are
8306  *    given an availability of kHIWindowExposeHidden.
8307  }
8308 const
8309 {
8310    * This window is hidden during Expos��s �All windows� and
8311    * �Application windows� modes, and during the Spaces overview mode.
8312    * It moves to the current space automatically after a space switch,
8313    * and does not trigger a space switch when dragged to a space
8314    * boundary. If this bit is not set, the window is visible during
8315    * Expos� and Spaces.
8316    }
8317 	kHIWindowBehaviorTransient = 1 shl 0;
8318 
8319   {
8320    * This window is visible during Expos��s �All windows� and
8321    * �Application windows� modes, and does not move. It remains in its
8322    * original position and, when clicked in "Show desktop" mode,
8323    * receives the mouse event.
8324    }
8325 	kHIWindowBehaviorStationary = 1 shl 1;
8326 
8327   {
8328    * This window is visible in all window sets managed by Spaces. If
8329    * this bit is not set, the window is only visible in the Space where
8330    * it was created. This bit and the kHIWindowMoveToActiveSpace bit
8331    * should not both be set.
8332    }
8333 	kHIWindowCanJoinAllSpaces = 1 shl 8;
8334 
8335   {
8336    * When made visible, this window is always shown in the current
8337    * Space, rather than the space in which it was last visible. When
8338    * activated, this window moves to the active space, rather than
8339    * forcing a switch to the Space on which it was previously located.
8340    * This option is typically used with modeless dialog windows such as
8341    * the Quick Search window in BBEdit. This bit and the
8342    * kHIWindowCanJoinAllSpaces bit should not both be set.
8343    }
8344 	kHIWindowMoveToActiveSpace = 1 shl 9;
8345 
8346   {
8347    * The original name for the constant kHIWindowBehaviorTransient.
8348    * Please do not use this name.
8349    }
8350 	kHIWindowExposeHidden = kHIWindowBehaviorTransient;
8351 
8352   {
8353    * The original name for the constant kHIWindowCanJoinAllSpaces.
8354    * Please do not use this name.
8355    }
8356 	kHIWindowVisibleInAllSpaces = kHIWindowCanJoinAllSpaces;
8357 
8358 
8359 type
8360 	HIWindowAvailability = OptionBits;
8361 {$ifc not TARGET_CPU_64}
8362 {
8363  *  HIWindowGetAvailability()
8364  *
8365  *  Summary:
8366  *    Returns the availability of a window during Expos�.
8367  *
8368  *  Mac OS X threading:
8369  *    Not thread safe
8370  *
8371  *  Parameters:
8372  *
8373  *    inWindow:
8374  *      The window whose availability to return.
8375  *
8376  *    outAvailability:
8377  *      On exit, contains the window availability.
8378  *
8379  *  Availability:
8380  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
8381  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
8382  *    Non-Carbon CFM:   not available
8383  }
HIWindowGetAvailabilitynull8384 function HIWindowGetAvailability( inWindow: WindowRef; var outAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowGetAvailability';
8385 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
8386 
8387 
8388 {
8389  *  HIWindowChangeAvailability()
8390  *
8391  *  Summary:
8392  *    Alters the availability of a window during Expos�.
8393  *
8394  *  Mac OS X threading:
8395  *    Not thread safe
8396  *
8397  *  Parameters:
8398  *
8399  *    inWindow:
8400  *      The window whose availability to change.
8401  *
8402  *    inSetAvailability:
8403  *      The availability bits to set.
8404  *
8405  *    inClearAvailability:
8406  *      The availability bits to clear.
8407  *
8408  *  Availability:
8409  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
8410  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
8411  *    Non-Carbon CFM:   not available
8412  }
HIWindowChangeAvailabilitynull8413 function HIWindowChangeAvailability( inWindow: WindowRef; inSetAvailability: HIWindowAvailability; inClearAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowChangeAvailability';
8414 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
8415 
8416 
8417 {��������������������������������������������������������������������������������������}
8418 {
8419     � Sheets
8420 
8421     Sheets are a new user interface object in Mac OS X. A sheet is a modal alert or dialog,
8422     but unlike a traditional alert or dialog window (which is visually separate from the
8423     frontmost document window), a sheet appears to be attached to its parent window; it
8424     moves and z-orders simultaneously with its parent. Furthermore, sheets on Mac OS X
8425     use a new type of modality called window modality. A traditional alert or dialog is
8426     app-modal; it prevents user interaction with all other windows in the current application.
8427     A sheet is window-modal; it only prevents user interaction with its parent window, and
8428     events continue to flow to other windows in the application.
8429 
8430     � Sheet Event Handling
8431 
8432     Implementing a sheet window in your application generally requires some modifications
8433     to your event-handling code. A traditional app-modal window is implemented using a modal
8434     event loop; your application starts a new event loop (either by processing events itself,
8435     or by calling ModalDialog), which does not return back to your application's main event
8436     loop until the app-modal window has closed.
8437 
8438     Starting a new event loop doesn't work with sheets, because typically the modal event loop
8439     will only handle events destined for the sheet, and not events for other windows, but
8440     a sheet only blocks events for its parent window, and your application must still handle
8441     events for the rest of its windows as normal. Therefore, you will usually not use a modal
8442     event loop to handle events in a sheet. Rather, you will show the sheet window, and then
8443     return directly back to your main event loop. The Carbon Event Manager automatically
8444     prevents events from reaching the sheet's parent window; events in your application's
8445     other windows are still returned to you via WaitNextEvent or your application's Carbon
8446     event handlers, where you can process them as normal.
8447 
8448     You have several choices for handling events in the sheet itself. A sheet is, at the most
8449     basic level, simply another window in your application, and you can use any of the standard
8450     event-handling APIs to receive events in the sheet. For example, you can:
8451 
8452         -   receive events in the sheet via WaitNextEvent, and handle them directly in your
8453             main event loop
8454 
8455         -   create the sheet using Dialog Manager APIs, and use IsDialogEvent and DialogSelect
8456             to handle events in the sheet
8457 
8458         -   install Carbon event handlers on the sheet, and respond to events in your handlers
8459 
8460     Which approach you choose is up to you.
8461 
8462     � Sheets in CarbonLib
8463 
8464     The sheet window class, sheet WDEF procIDs, and ShowSheetWindow, HideSheetWindow, and
8465     GetSheetWindowParent APIs are implemented in CarbonLib starting with version 1.3. However,
8466     since Mac OS 8 and 9 do not traditionally support a window-modal user interface, sheet
8467     windows are displayed as app-modal windows by CarbonLib. From your application's perspective,
8468     event handling for a sheet in CarbonLib is the same as event handling for a sheet on X;
8469     ShowSheetWindow still returns immediately, and your application should still return back
8470     to its main event loop and be prepared to handle events in other windows. On CarbonLib,
8471     your application will simply never receive any user input in any of your other windows;
8472     since the sheet has application modality, the Carbon Event Manager will discard events
8473     in any windows other than the sheet.
8474 
8475     ��Creating a Sheet
8476 
8477     A sheet is just a normal window with a special window class: kSheetWindowClass or
8478     kSheetAlertWindowClass. As such, it can be created in any of the ways you might create
8479     a window: NewWindow, NewCWindow, CreateNewWindow, GetNewWindow, GetNewCWindow,
8480     CreateWindowFromCollection, CreateWindowFromResource, CreateWindowFromNib, NewDialog,
8481     NewColorDialog, NewFeaturesDialog, or GetNewDialog.
8482 
8483     The Window Manager defines two window classes and two WDEF procIDs for sheets:
8484 
8485         -   kSheetWindowClass and kSheetAlertWindowClass
8486         -   kWindowSheetProc and kWindowSheetAlertProc
8487 
8488     The window classes may be used with CreateNewWindow, CreateWindowFromCollection, and
8489     CreateWindowFromResource; the WDEF procIDs may be used with NewWindow, NewCWindow, NewDialog,
8490     NewColorDialog, NewFeaturesDialog, and in 'WDEF' and 'DLOG' resources.
8491 
8492     Mac OS X 10.0 only supports kSheetWindowClass and kWindowSheetProc;
8493     it does not support kSheetAlertWindowClass or kWindowSheetAlertProc. The latter window
8494     class and procID were added in CarbonLib 1.3 and Mac OS X 10.1. A new window class and
8495     procID were necessary for CarbonLib support because
8496     sheets can be used for both alerts ("Do you want to save changes before closing this
8497     window?") and dialogs (a Navigation Services PutFile dialog). On Mac OS X, sheet windows
8498     have the same appearance when used for either an alert or a dialog, but on Mac OS 8 and 9,
8499     alert windows have a different appearance from dialog windows. Two separate window classes
8500     are necessary for CarbonLib to know whether to display a sheet using a movable alert or a
8501     movable dialog window. Therefore, it is recommended that you use kSheetAlertWindowClass when
8502     creating a sheet window that will be used to display an alert, although this is not required.
8503 
8504     � Displaying a Sheet
8505 
8506     A sheet is made visible by calling the ShowSheetWindow API. This API shows the sheet,
8507     using whatever visual effects are appropriate for the platform, and then returns immediately.
8508     On Mac OS X, it creates a window group and places the sheet and its parent window into the
8509     group; it also marks the sheet as window-modal. On CarbonLib, it marks the sheet as app-modal
8510     but does not create a window group.
8511 
8512     On Mac OS X, before the sheet window is actually made visible, ShowSheetWindow sends a
8513     kEventWindowDrawContent event to the sheet window, asking it to draw its content into the
8514     window's offscreen buffer. The sheet must handle this event, or its content area will be
8515     blank after the sheet becomes visible.
8516 
8517     In some cases, this handler is automatically provided for you:
8518 
8519         -   If you create your sheet window using the Dialog Manager, the Dialog Manager
8520             automatically installs a handler for this event that calls DrawDialog, so you
8521             don't need to install the handler yourself.
8522 
8523         -   If you install the standard Carbon window event handler on your sheet window
8524             (using kWindowStandardHandlerAttribute or InstallStandardEventHandler), the
8525             standard handler automatically handles this event and calls DrawControls.
8526 
8527     Typically, your event handling code (whether it uses WaitNextEvent, the Dialog Manager,
8528     or Carbon event handlers) will receive and respond to events in the sheet until the
8529     user does something that should cause the sheet to close. This might be clicking in an
8530     OK or Cancel button, for example. At that time, your event handling code must call either
8531     HideSheetWindow or DetachSheetWindow. The sheet window will hide, but will not be destroyed,
8532     so you can use it again later if you want.
8533 
8534     ��Closing a sheet
8535 
8536     A sheet is normally hidden by calling the HideSheetWindow API. HideSheetWindow provides the
8537     visual effects of zooming the sheet back into the parent window's title bar and moving the
8538     parent window back to its original position. In Mac OS X 10.3 and later, the DetachSheetWindow
8539     API is also available. DetachSheetWindow ungroups the sheet from its parent, releases the
8540     retain count acquired by ShowSheetWindow on the parent window, and removes all event handlers
8541     installed by ShowSheetWindow, but does not hide the sheet window; an application would typically
8542     call DetachSheetWindow and then HideWindow to hide the sheet window without the sheet closing
8543     animation. This may be useful if, for example, the sheet were being used to ask if changes to
8544     a modified document should be saved; if the user chooses "Don�t Save", then the application
8545     could use DetachSheetWindow and then hide both the sheet and the document immediately, so that
8546     the document closes as quickly as possible without taking time for the closing animation.
8547     The Navigation Services Save Changes dialog does this automatically.
8548 
8549     You _must_ call either HideSheetWindow or DetachSheetWindow before destroying a sheet that has
8550     been shown with ShowSheetWindow. You may not simply dispose of a sheet window without first using
8551     Hide or DetachSheetWindow; doing so will leave an extra refcount on the parent window, and will
8552     leave the parent window still embedded in the sheet window group.
8553 
8554     � Sheet Transparency
8555 
8556     Sheets should be transparent so that the user can see some of the document content behind
8557     the sheet and remember the context in which the sheet was displayed. In Mac OS X 10.1,
8558     a sheet is made transparent by using the kThemeBrushSheetBackgroundTransparent constant for
8559     the sheet window�s theme background brush. In Mac OS X 10.2 and later, sheets are only
8560     transparent if this brush is used and if the sheet window uses compositing mode (enabled by
8561     setting the kWindowCompositingAttribute window attribute when the sheet window is created).
8562 }
8563 {
8564  *  ShowSheetWindow()
8565  *
8566  *  Summary:
8567  *    Shows a sheet window using appropriate visual effects.
8568  *
8569  *  Discussion:
8570  *    ShowSheetWindow is implemented in both CarbonLib 1.3 and Mac OS
8571  *    X. Since Mac OS 9 does not use a window-modal user interface for
8572  *    alerts and dialogs, ShowSheetWindow in CarbonLib does not bind
8573  *    the sheet to the parent window in the same way that it does on
8574  *    Mac OS X; instead, it shows the sheet like a standard
8575  *    movable-modal dialog window. Sheet windows must use the window
8576  *    classes kSheetWindowClass or kSheetAlertWindowClass to get the
8577  *    right appearance on both platforms.
8578  *
8579  *    Note that ShowSheetWindow will increment the retain count of the
8580  *    parent window. The retain count is decremented by HideSheetWindow
8581  *    and DetachSheetWindow. You must call one of those APIs before
8582  *    destroying the sheet window.
8583  *
8584  *    On Mac OS X, ShowSheetWindow sets the modality of the sheet
8585  *    window to kWindowModalityWindowModal.
8586  *
8587  *  Mac OS X threading:
8588  *    Not thread safe
8589  *
8590  *  Parameters:
8591  *
8592  *    inSheet:
8593  *      The sheet window to show.
8594  *
8595  *    inParentWindow:
8596  *      The sheet's parent window.
8597  *
8598  *  Result:
8599  *    An operating system result code. ShowSheetWindow checks for the
8600  *    following error conditions, and returns paramErr if any occur:
8601  *    the sheet window must have a window class of kSheetWindowClass or
8602  *    kSheetAlertWindowClass; the sheet and parent windows must not be
8603  *    the same window; the sheet must not have a parent window already;
8604  *    and the parent window must not already be the target of a sheet.
8605  *
8606  *  Availability:
8607  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8608  *    CarbonLib:        in CarbonLib 1.3 and later
8609  *    Non-Carbon CFM:   not available
8610  }
ShowSheetWindownull8611 function ShowSheetWindow( inSheet: WindowRef; inParentWindow: WindowRef ): OSStatus; external name '_ShowSheetWindow';
8612 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8613 
8614 
8615 {
8616  *  HideSheetWindow()
8617  *
8618  *  Summary:
8619  *    Hides a sheet window using appropriate visual effects.
8620  *
8621  *  Mac OS X threading:
8622  *    Not thread safe
8623  *
8624  *  Parameters:
8625  *
8626  *    inSheet:
8627  *      The sheet window to hide.
8628  *
8629  *  Availability:
8630  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8631  *    CarbonLib:        in CarbonLib 1.3 and later
8632  *    Non-Carbon CFM:   not available
8633  }
HideSheetWindownull8634 function HideSheetWindow( inSheet: WindowRef ): OSStatus; external name '_HideSheetWindow';
8635 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8636 
8637 
8638 {
8639  *  DetachSheetWindow()
8640  *
8641  *  Summary:
8642  *    Detaches a sheet window from its parent window without affecting
8643  *    the visibility or position of the sheet or its parent.
8644  *
8645  *  Discussion:
8646  *    This API may be useful if you want to hide a sheet window without
8647  *    an animation effect. To do that, use DetachSheetWindow to detach
8648  *    the sheet from the parent, and then use HideWindow to hide the
8649  *    sheet, or DisposeWindow to destroy the sheet.
8650  *
8651  *  Mac OS X threading:
8652  *    Not thread safe
8653  *
8654  *  Parameters:
8655  *
8656  *    inSheet:
8657  *      The sheet to detach.
8658  *
8659  *  Availability:
8660  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
8661  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
8662  *    Non-Carbon CFM:   not available
8663  }
DetachSheetWindownull8664 function DetachSheetWindow( inSheet: WindowRef ): OSStatus; external name '_DetachSheetWindow';
8665 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
8666 
8667 
8668 {
8669  *  GetSheetWindowParent()
8670  *
8671  *  Summary:
8672  *    Returns the parent window of a sheet.
8673  *
8674  *  Mac OS X threading:
8675  *    Not thread safe
8676  *
8677  *  Parameters:
8678  *
8679  *    inSheet:
8680  *      The sheet window whose parent to retrieve.
8681  *
8682  *    outParentWindow:
8683  *      On exit, contains the parent window of the sheet.
8684  *
8685  *  Availability:
8686  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
8687  *    CarbonLib:        in CarbonLib 1.3 and later
8688  *    Non-Carbon CFM:   not available
8689  }
GetSheetWindowParentnull8690 function GetSheetWindowParent( inSheet: WindowRef; var outParentWindow: WindowRef ): OSStatus; external name '_GetSheetWindowParent';
8691 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
8692 
8693 
8694 {��������������������������������������������������������������������������������������}
8695 {
8696     � Drawers
8697 
8698     Drawers are supported in Carbon by Mac OS X 10.2 and later. To create and use a drawer:
8699 
8700         -   Create a window using kDrawerWindowClass. You must also use compositing mode with
8701             drawers; this mode is enabled by passing kWindowCompositingAttribute to CreateNewWindow.
8702 
8703         -   Either install the standard window event handler on the drawer window, or use
8704             your own Carbon event or WaitNextEvent code to handle user interaction with the
8705             drawer. If you do not use the standard window event handler, you should call
8706             ResizeWindow in response to clicks on the grow region of the drawer if you want
8707             the drawer to be resizable.
8708 
8709         -   Set the drawer's parent window with the SetDrawerParent function. The parent is
8710             the window on which the drawer will open.
8711 
8712         -   Optionally, install a Carbon event handler on the drawer or the drawer's parent
8713             window for the kEventWindowDrawerOpening/Opened/Closing/Closed events, to be notified
8714             when the drawer has started or finished opening or closing.
8715 
8716         -   Optionally, set the drawer's preferred edge on the parent window with the
8717             SetDrawerPreferredEdge function. If you do not set a preferred edge, the drawer
8718             opens on the parent's left side on a left-to-right system, or on the parent's right
8719             side on a right-to-left system.
8720 
8721         -   Optionally, set the drawer's offsets with the SetDrawerOffsets function. The offsets
8722             control the amount of inset between the edge of the parent's content area and the edge
8723             of the drawer's structure. If you do not set any offsets, the drawer's edges are flush
8724             with the edges of the parent's content.
8725 
8726         -   Optionally, set the drawer's minimum and maximum sizes with the SetWindowResizeLimits
8727             function. Or, install a Carbon event handler on the drawer to handle the kEventWindow-
8728             GetMinimumSize and kEventWindowGetMaximumSize events. The drawer's minimum and maximum
8729             sizes control how small or large it will resize together with the parent. If you do not
8730             set resize limits, the drawer will be capable of resizing to default small and large
8731             limits.
8732 
8733         -   Call ToggleDrawer to open or close the drawer, or use OpenDrawer or CloseDrawer if
8734             you require more control over how the drawer opens or closes.
8735 }
8736 {$endc} {not TARGET_CPU_64}
8737 
8738 
8739 {
8740  *  Summary:
8741  *    Indicates the parent window edge on which a drawer will be shown.
8742  }
8743 const
8744 {
8745    * This constant is typically used with the OpenDrawer API; it
8746    * indicates that the drawer should be opened on whatever edge of the
8747    * parent window has previously been set as the drawer's preferred
8748    * edge.
8749    }
8750 	kWindowEdgeDefault = 0;
8751 
8752   {
8753    * The drawer should open on the top edge of the parent window.
8754    }
8755 	kWindowEdgeTop = 1 shl 0;
8756 
8757   {
8758    * The drawer should open on the left edge of the parent window.
8759    }
8760 	kWindowEdgeLeft = 1 shl 1;
8761 
8762   {
8763    * The drawer should open on the bottom edge of the parent window.
8764    }
8765 	kWindowEdgeBottom = 1 shl 2;
8766 
8767   {
8768    * The drawer should open on the right edge of the parent window.
8769    }
8770 	kWindowEdgeRight = 1 shl 3;
8771 
8772 
8773 {
8774  *  Summary:
8775  *    Indicates the current state of a drawer window.
8776  }
8777 const
8778 {
8779    * The drawer is opening, but is not yet fully open.
8780    }
8781 	kWindowDrawerOpening = 1;
8782 
8783   {
8784    * The drawer is fully open.
8785    }
8786 	kWindowDrawerOpen = 2;
8787 
8788   {
8789    * The drawer is closing, but is not yet fully closed.
8790    }
8791 	kWindowDrawerClosing = 3;
8792 
8793   {
8794    * The drawer is fully closed.
8795    }
8796 	kWindowDrawerClosed = 4;
8797 
8798 type
8799 	WindowDrawerState = UInt32;
8800 
8801 {$ifc not TARGET_CPU_64}
8802 {
8803  *  GetDrawerPreferredEdge()
8804  *
8805  *  Summary:
8806  *    Returns the preferred parent window edge of a drawer.
8807  *
8808  *  Discussion:
8809  *    Drawers start out with a preferred parent window edge of
8810  *    kWindowEdgeDefault. On left-to-right systems, the default edge is
8811  *    the left edge of the parent window; on right-to-left systems, the
8812  *    default edge is the right edge. You can set the preferred edge
8813  *    with SetDrawerPreferredEdge. If there's not enough room on the
8814  *    preferred edge, the drawer will automatically switch to the
8815  *    opposite edge.
8816  *
8817  *  Mac OS X threading:
8818  *    Not thread safe
8819  *
8820  *  Parameters:
8821  *
8822  *    inDrawerWindow:
8823  *      The drawer window whose preferred edge to retrieve.
8824  *
8825  *  Result:
8826  *    The preferred edge of the drawer window.
8827  *
8828  *  Availability:
8829  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
8830  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
8831  *    Non-Carbon CFM:   not available
8832  }
GetDrawerPreferredEdgenull8833 function GetDrawerPreferredEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerPreferredEdge';
8834 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
8835 
8836 
8837 {
8838  *  SetDrawerPreferredEdge()
8839  *
8840  *  Summary:
8841  *    Sets the preferred parent window edge of a drawer.
8842  *
8843  *  Mac OS X threading:
8844  *    Not thread safe
8845  *
8846  *  Parameters:
8847  *
8848  *    inDrawerWindow:
8849  *      The drawer window whose preferred edge to set.
8850  *
8851  *    inEdge:
8852  *      The preferred edge of the drawer window. Note that although the
8853  *      WindowEdge enumeration has values appropriate for a bitfield,
8854  *      the current implementation does not support receiving more than
8855  *      one edge bit in this parameter. You can also pass
8856  *      kWindowEdgeDefault to allow the Window Manager to pick an edge.
8857  *
8858  *  Availability:
8859  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
8860  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
8861  *    Non-Carbon CFM:   not available
8862  }
SetDrawerPreferredEdgenull8863 function SetDrawerPreferredEdge( inDrawerWindow: WindowRef; inEdge: OptionBits ): OSStatus; external name '_SetDrawerPreferredEdge';
8864 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
8865 
8866 
8867 {
8868  *  GetDrawerCurrentEdge()
8869  *
8870  *  Summary:
8871  *    Returns the current parent window edge on which a drawer is
8872  *    displayed.
8873  *
8874  *  Discussion:
8875  *    If the drawer window is currently visible, this API returns the
8876  *    parent window edge on which the drawer is displayed. If the
8877  *    drawer is not visible, this API determines on which edge of the
8878  *    parent window the drawer should be displayed, given the current
8879  *    size of the drawer, position of the parent, and preferred edge
8880  *    for the drawer.
8881  *
8882  *  Mac OS X threading:
8883  *    Not thread safe
8884  *
8885  *  Parameters:
8886  *
8887  *    inDrawerWindow:
8888  *      The drawer window whose current edge to retrieve.
8889  *
8890  *  Result:
8891  *    The current edge of the drawer window.
8892  *
8893  *  Availability:
8894  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
8895  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
8896  *    Non-Carbon CFM:   not available
8897  }
GetDrawerCurrentEdgenull8898 function GetDrawerCurrentEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerCurrentEdge';
8899 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
8900 
8901 
8902 {
8903  *  GetDrawerState()
8904  *
8905  *  Summary:
8906  *    Returns the current state of a drawer: opening, open, closing, or
8907  *    closed.
8908  *
8909  *  Mac OS X threading:
8910  *    Not thread safe
8911  *
8912  *  Parameters:
8913  *
8914  *    inDrawerWindow:
8915  *      The drawer window whose state to retrieve.
8916  *
8917  *  Result:
8918  *    The current state of the drawer window.
8919  *
8920  *  Availability:
8921  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
8922  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
8923  *    Non-Carbon CFM:   not available
8924  }
GetDrawerStatenull8925 function GetDrawerState( inDrawerWindow: WindowRef ): WindowDrawerState; external name '_GetDrawerState';
8926 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
8927 
8928 
8929 {
8930  *  GetDrawerParent()
8931  *
8932  *  Summary:
8933  *    Returns the parent window of a drawer.
8934  *
8935  *  Mac OS X threading:
8936  *    Not thread safe
8937  *
8938  *  Parameters:
8939  *
8940  *    inDrawerWindow:
8941  *      The drawer window whose parent window to retrieve.
8942  *
8943  *  Result:
8944  *    The drawer's parent window, or NULL if the drawer has no assigned
8945  *    parent.
8946  *
8947  *  Availability:
8948  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
8949  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
8950  *    Non-Carbon CFM:   not available
8951  }
GetDrawerParentnull8952 function GetDrawerParent( inDrawerWindow: WindowRef ): WindowRef; external name '_GetDrawerParent';
8953 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
8954 
8955 
8956 {
8957  *  SetDrawerParent()
8958  *
8959  *  Summary:
8960  *    Sets the parent window of a drawer.
8961  *
8962  *  Discussion:
8963  *    In Mac OS X 10.4 and 10.5, this API incorrectly increments the
8964  *    refcount of the drawer window, and you must either destroy the
8965  *    drawer parent window or use SetDrawerParent( drawer, NULL ) on
8966  *    the drawer window before destroying the drawer. This extra step
8967  *    is not required in Mac OS X 10.2, 10.3, or 10.6 and later; in
8968  *    those versions you may simply release the drawer window when
8969  *    you're done with it and it will be automatically removed from the
8970  *    parent.
8971  *
8972  *  Mac OS X threading:
8973  *    Not thread safe
8974  *
8975  *  Parameters:
8976  *
8977  *    inDrawerWindow:
8978  *      The drawer window whose parent window to set.
8979  *
8980  *    inParent:
8981  *      The drawer's new parent window, or NULL if the drawer should
8982  *      have no parent.
8983  *
8984  *  Result:
8985  *    An operating system result code.
8986  *
8987  *  Availability:
8988  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
8989  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
8990  *    Non-Carbon CFM:   not available
8991  }
SetDrawerParentnull8992 function SetDrawerParent( inDrawerWindow: WindowRef; inParent: WindowRef ): OSStatus; external name '_SetDrawerParent';
8993 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
8994 
8995 
8996 {$endc} {not TARGET_CPU_64}
8997 
8998 
8999 {
9000  *  kWindowOffsetUnchanged
9001  *
9002  *  Discussion:
9003  *    Pass this value to SetDrawerOffsets to indicate that an existing
9004  *    offset should not be changed.
9005  }
9006 const
9007   kWindowOffsetUnchanged = -1.0;
9008 {$ifc not TARGET_CPU_64}
9009 {
9010  *  SetDrawerOffsets()
9011  *
9012  *  Summary:
9013  *    Sets the offsets from the beginning and end of the parent window
9014  *    to the beginning and end of the drawer window.
9015  *
9016  *  Discussion:
9017  *    The drawer offsets control the positioning of the drawer relative
9018  *    to its parent window. When a drawer is first created, its offsets
9019  *    are zero. When a drawer is positioned, it is initially given a
9020  *    height or width equal to the height or width of the content area
9021  *    of the parent to which it is attached. If a drawer is opening on
9022  *    the left side of its parent, for example, the drawer's height
9023  *    will be the height of the parent's content area. In this case,
9024  *    the top side of the drawer window is called the leading edge of
9025  *    the drawer, and the bottom side of the drawer window is called
9026  *    the trailing edge of the drawer. The drawer's size is then
9027  *    adjusted by the leading and trailing offsets. The leading edge of
9028  *    the drawer is moved inward by an amount equal to the leading
9029  *    offset, and the trailing edge is moved inward by an amount equal
9030  *    to the trailing offset. For example, if the leading and trailing
9031  *    offsets are five and fifteen, then the top edge of a left-opening
9032  *    drawer will be five pixels inside the top edge of the parent
9033  *    window's content area, and the bottom edge of the drawer will be
9034  *    fifteen pixels inside the bottom edge of the parent's content
9035  *    area.
9036  *
9037  *  Mac OS X threading:
9038  *    Not thread safe
9039  *
9040  *  Parameters:
9041  *
9042  *    inDrawerWindow:
9043  *      The drawer window whose offsets to change.
9044  *
9045  *    inLeadingOffset:
9046  *      The new leading offset, in pixels. Pass kWindowOffsetUnchanged
9047  *      if you don't want to change the leading offset.
9048  *
9049  *    inTrailingOffset:
9050  *      The new trailing offset, in pixels. Pass kWindowOffsetUnchanged
9051  *      if you don't want to change the trailing offset.
9052  *
9053  *  Result:
9054  *    An operating system result code.
9055  *
9056  *  Availability:
9057  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9058  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9059  *    Non-Carbon CFM:   not available
9060  }
SetDrawerOffsetsnull9061 function SetDrawerOffsets( inDrawerWindow: WindowRef; inLeadingOffset: CGFloat; inTrailingOffset: CGFloat ): OSStatus; external name '_SetDrawerOffsets';
9062 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9063 
9064 
9065 {
9066  *  GetDrawerOffsets()
9067  *
9068  *  Summary:
9069  *    Returns the offsets from the beginning and end of the parent
9070  *    window to the beginning and end of the drawer window.
9071  *
9072  *  Mac OS X threading:
9073  *    Not thread safe
9074  *
9075  *  Parameters:
9076  *
9077  *    inDrawerWindow:
9078  *      The drawer window whose offsets to retrieve.
9079  *
9080  *    outLeadingOffset:
9081  *      On exit, contains the drawer's leading offset. Pass NULL if you
9082  *      don't need this information returned.
9083  *
9084  *    outTrailingOffset:
9085  *      On exit, contains the drawer's trailing offset. Pass NULL if
9086  *      you don't need this information returned.
9087  *
9088  *  Result:
9089  *    An operating system result code.
9090  *
9091  *  Availability:
9092  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9093  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9094  *    Non-Carbon CFM:   not available
9095  }
GetDrawerOffsetsnull9096 function GetDrawerOffsets( inDrawerWindow: WindowRef; outLeadingOffset: CGFloatPtr { can be NULL }; outTrailingOffset: CGFloatPtr { can be NULL } ): OSStatus; external name '_GetDrawerOffsets';
9097 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9098 
9099 
9100 {
9101  *  ToggleDrawer()
9102  *
9103  *  Summary:
9104  *    Toggles a drawer from open to closed, or vice versa.
9105  *
9106  *  Discussion:
9107  *    ToggleDrawer opens the drawer if it is closed, opening, or
9108  *    closing. If the drawer is open, it closes the drawer.
9109  *
9110  *    ToggleDrawer attempts to open the drawer on its preferred edge,
9111  *    but if there is not enough room on that edge, it will try the
9112  *    opposite edge instead. If there is insufficient room on either
9113  *    edge, the drawer will open on the preferred edge but may extend
9114  *    offscreen, under the Dock, or under the menubar.
9115  *
9116  *    The opening or closing of the drawer is performed asynchronously;
9117  *    ToggleDrawer installs an event loop timer that opens or closes
9118  *    the drawer after ToggleDrawer returns to the caller. Therefore,
9119  *    the caller must be running its event loop for the drawer to open
9120  *    or close. To open or close the drawer synchronously, use the
9121  *    OpenDrawer or CloseDrawer APIs.
9122  *
9123  *    ToggleDrawer retains the drawer window while the drawer is
9124  *    opening or closing, and releases it when the drawer is fully
9125  *    opened or closed.
9126  *
9127  *    ToggleDrawer sends the kEventWindowDrawerOpening,
9128  *    kEventWindowDrawerOpened, kEventWindowDrawerClosing, and
9129  *    kEventWindowDrawerClosed events as the drawer opens or closes.
9130  *
9131  *  Mac OS X threading:
9132  *    Not thread safe
9133  *
9134  *  Parameters:
9135  *
9136  *    inDrawerWindow:
9137  *      The drawer window to open or close.
9138  *
9139  *  Result:
9140  *    An operating system result code.
9141  *
9142  *  Availability:
9143  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9144  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9145  *    Non-Carbon CFM:   not available
9146  }
ToggleDrawernull9147 function ToggleDrawer( inDrawerWindow: WindowRef ): OSStatus; external name '_ToggleDrawer';
9148 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9149 
9150 
9151 {
9152  *  OpenDrawer()
9153  *
9154  *  Summary:
9155  *    Opens a drawer on a specified parent window edge.
9156  *
9157  *  Discussion:
9158  *    OpenDrawer may open the drawer either synchronously or
9159  *    asynchronously, depending on the value of the inAsync parameter.
9160  *    If inAsync is true, OpenDrawer installs an event loop timer that
9161  *    opens the drawer after OpenDrawer returns to the caller;
9162  *    therefore, the caller must be running its event loop for the
9163  *    drawer to open. If inAsync is false, OpenDrawer opens the drawer
9164  *    completely before returning to the caller.
9165  *
9166  *    OpenDrawer retains the drawer window while the drawer is opening,
9167  *    and releases it when the drawer is fully open.
9168  *
9169  *    OpenDrawer sends the kEventWindowDrawerOpening event to the
9170  *    drawer, the drawer's parent, and the application before opening
9171  *    the drawer. If an event handler for this event returns
9172  *    userCanceledErr, OpenDrawer will return immediately without
9173  *    opening the drawer. OpenDrawer sends the kEventWindowDrawerOpened
9174  *    event to the drawer, the drawer's parent, and the application
9175  *    after the drawer has finished opening.
9176  *
9177  *  Mac OS X threading:
9178  *    Not thread safe
9179  *
9180  *  Parameters:
9181  *
9182  *    inDrawerWindow:
9183  *      The drawer window to open.
9184  *
9185  *    inEdge:
9186  *      The parent window edge on which to open the drawer. Pass
9187  *      kWindowEdgeDefault to use the drawer's preferred edge. If there
9188  *      is not enough room on the preferred edge, OpenDrawer will try
9189  *      the opposite edge instead. If there is insufficient room on
9190  *      either edge, the drawer will open on the preferred edge but may
9191  *      extend offscreen, under the Dock, or under the menubar.
9192  *
9193  *    inAsync:
9194  *      Whether to open the drawer synchronously (the drawer is
9195  *      entirely opened before the function call returns) or
9196  *      asynchronously (the drawer opens using an event loop timer
9197  *      after the function call returns).
9198  *
9199  *  Result:
9200  *    An operating system result code.
9201  *
9202  *  Availability:
9203  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9204  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9205  *    Non-Carbon CFM:   not available
9206  }
OpenDrawernull9207 function OpenDrawer( inDrawerWindow: WindowRef; inEdge: OptionBits; inAsync: Boolean ): OSStatus; external name '_OpenDrawer';
9208 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9209 
9210 
9211 {
9212  *  CloseDrawer()
9213  *
9214  *  Summary:
9215  *    Closes a drawer.
9216  *
9217  *  Discussion:
9218  *    CloseDrawer may close the drawer either synchronously or
9219  *    asynchronously, depending on the value of the inAsync parameter.
9220  *    If inAsync is true, CloseDrawer installs an event loop timer that
9221  *    closes the drawer after CloseDrawer returns to the caller;
9222  *    therefore, the caller must be running its event loop for the
9223  *    drawer to close. If inAsync is false, CloseDrawer closes the
9224  *    drawer completely before returning to the caller.
9225  *
9226  *    CloseDrawer retains the drawer window while the drawer is
9227  *    closing, and releases it when the drawer is fully closed.
9228  *
9229  *    CloseDrawer sends the kEventWindowDrawerClosing event to the
9230  *    drawer, the drawer's parent, and the application before closing
9231  *    the drawer. If an event handler for this event returns
9232  *    userCanceledErr, CloseDrawer will return immediately without
9233  *    closing the drawer. CloseDrawer sends the
9234  *    kEventWindowDrawerClosed event to the drawer, the drawer's
9235  *    parent, and the application after the drawer has finished closing.
9236  *
9237  *  Mac OS X threading:
9238  *    Not thread safe
9239  *
9240  *  Parameters:
9241  *
9242  *    inDrawerWindow:
9243  *      The drawer window to close.
9244  *
9245  *    inAsync:
9246  *      Whether to close the drawer synchronously (the drawer is
9247  *      entirely closed before the function call returns) or
9248  *      asynchronously (the drawer closes using an event loop timer
9249  *      after the function call returns).
9250  *
9251  *  Result:
9252  *    An operating system result code.
9253  *
9254  *  Availability:
9255  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9256  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9257  *    Non-Carbon CFM:   not available
9258  }
CloseDrawernull9259 function CloseDrawer( inDrawerWindow: WindowRef; inAsync: Boolean ): OSStatus; external name '_CloseDrawer';
9260 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9261 
9262 
9263 {
9264  *  HIWindowCopyDrawers()
9265  *
9266  *  Summary:
9267  *    Returns an array of the drawers that are attached to a window.
9268  *
9269  *  Mac OS X threading:
9270  *    Not thread safe
9271  *
9272  *  Parameters:
9273  *
9274  *    inWindow:
9275  *      The window whose drawers to return.
9276  *
9277  *    outDrawers:
9278  *      On exit, an array containing WindowRefs. Each array entry is a
9279  *      drawer attached to the specified window. The array will be
9280  *      valid, but empty, if the window has no drawers.
9281  *
9282  *  Availability:
9283  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
9284  *    CarbonLib:        not available
9285  *    Non-Carbon CFM:   not available
9286  }
HIWindowCopyDrawersnull9287 function HIWindowCopyDrawers( inWindow: WindowRef; var outDrawers: CFArrayRef ): OSStatus; external name '_HIWindowCopyDrawers';
9288 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
9289 
9290 
9291 {��������������������������������������������������������������������������������������}
9292 { � Disabling Screen Redraw                                                            }
9293 {��������������������������������������������������������������������������������������}
9294 {
9295  *  DisableScreenUpdates()
9296  *
9297  *  Summary:
9298  *    Temporarily disables redraw of the screen after changes to window
9299  *    geometry or window contents.
9300  *
9301  *  Discussion:
9302  *    It is appropriate to disable updates if you are moving or
9303  *    resizing multiple windows and you want all of the geometry
9304  *    changes to appear onscreen simulataneously. In most other cases,
9305  *    you should strive to avoid disabling screen updates. The window
9306  *    server will automatically re-enable updates (and print a message
9307  *    to the Console log) if you leave updates disabled for a
9308  *    sufficiently long period of time, currently about 1 second.
9309  *
9310  *
9311  *    The window server records the number of calls to
9312  *    DisableScreenUpdates and does not re-enable updates until a
9313  *    matching number of calls to EnableScreenUpdates have been made.
9314  *
9315  *  Mac OS X threading:
9316  *    Not thread safe
9317  *
9318  *  Result:
9319  *    An operating system result code. In practice, this API always
9320  *    returns noErr.
9321  *
9322  *  Availability:
9323  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
9324  *    CarbonLib:        in CarbonLib 1.1 and later
9325  *    Non-Carbon CFM:   not available
9326  }
DisableScreenUpdatesnull9327 function DisableScreenUpdates: OSStatus; external name '_DisableScreenUpdates';
9328 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
9329 
9330 
9331 {
9332  *  EnableScreenUpdates()
9333  *
9334  *  Summary:
9335  *    Re-enables redraw of the screen after changes to window geometry
9336  *    or window contents.
9337  *
9338  *  Discussion:
9339  *    Screen redraw is not actually enabled until the number of calls
9340  *    to EnableScreenUpdates matches the number of calls to
9341  *    DisableScreenUpdates.
9342  *
9343  *  Mac OS X threading:
9344  *    Not thread safe
9345  *
9346  *  Result:
9347  *    An operating system result code. In practice, this API always
9348  *    returns noErr.
9349  *
9350  *  Availability:
9351  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
9352  *    CarbonLib:        in CarbonLib 1.1 and later
9353  *    Non-Carbon CFM:   not available
9354  }
EnableScreenUpdatesnull9355 function EnableScreenUpdates: OSStatus; external name '_EnableScreenUpdates';
9356 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
9357 
9358 
9359 {��������������������������������������������������������������������������������������}
9360 { � Window Toolbars                                                                    }
9361 {��������������������������������������������������������������������������������������}
9362 {
9363  *  SetWindowToolbar()
9364  *
9365  *  Discussion:
9366  *    Sets the toolbar for a window. If any other toolbar is currently
9367  *    bound to the window, it is released. This API does NOT add the
9368  *    toolbar button to the window, your application must set the
9369  *    attribute itself.
9370  *
9371  *  Mac OS X threading:
9372  *    Not thread safe
9373  *
9374  *  Parameters:
9375  *
9376  *    inWindow:
9377  *      The window to add the toolbar to.
9378  *
9379  *    inToolbar:
9380  *      The toolbar to add.
9381  *
9382  *  Result:
9383  *    An operating system result code.
9384  *
9385  *  Availability:
9386  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9387  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9388  *    Non-Carbon CFM:   not available
9389  }
SetWindowToolbarnull9390 function SetWindowToolbar( inWindow: WindowRef; inToolbar: HIToolbarRef ): OSStatus; external name '_SetWindowToolbar';
9391 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9392 
9393 
9394 {
9395  *  GetWindowToolbar()
9396  *
9397  *  Discussion:
9398  *    Gets the toolbar of a window, if any.
9399  *
9400  *  Mac OS X threading:
9401  *    Not thread safe
9402  *
9403  *  Parameters:
9404  *
9405  *    inWindow:
9406  *      The window to add the toolbar to.
9407  *
9408  *    outToolbar:
9409  *      The toolbar. You do not own the toolbar reference returned by
9410  *      this function. Do not release it! It is possible for the
9411  *      toolbar returned to be NULL, indicating there is no toolbar
9412  *      associated with this window. ��� NOTE: May need to change the
9413  *      release strategy here.
9414  *
9415  *  Result:
9416  *    An operating system result code.
9417  *
9418  *  Availability:
9419  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9420  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9421  *    Non-Carbon CFM:   not available
9422  }
GetWindowToolbarnull9423 function GetWindowToolbar( inWindow: WindowRef; var outToolbar: HIToolbarRef ): OSStatus; external name '_GetWindowToolbar';
9424 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9425 
9426 
9427 {
9428  *  ShowHideWindowToolbar()
9429  *
9430  *  Discussion:
9431  *    Shows or hides a window's toolbar. Optionally, you can ask for
9432  *    the transition to be animated or not. Typically, you would not
9433  *    need to call this other than to set up your window accordingly.
9434  *
9435  *  Mac OS X threading:
9436  *    Not thread safe
9437  *
9438  *  Parameters:
9439  *
9440  *    inWindow:
9441  *      The window to show or hide the toolbar for.
9442  *
9443  *    inShow:
9444  *      Pass true to show the toolbar, false to hide it.
9445  *
9446  *    inAnimate:
9447  *      Pass true to animate the transition, false to do it quickly and
9448  *      without fanfare.
9449  *
9450  *  Result:
9451  *    An operating system result code.
9452  *
9453  *  Availability:
9454  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9455  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9456  *    Non-Carbon CFM:   not available
9457  }
ShowHideWindowToolbarnull9458 function ShowHideWindowToolbar( inWindow: WindowRef; inShow: Boolean; inAnimate: Boolean ): OSStatus; external name '_ShowHideWindowToolbar';
9459 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9460 
9461 
9462 {
9463  *  IsWindowToolbarVisible()
9464  *
9465  *  Discussion:
9466  *    Returns whether the toolbar (if any) attached to a window is
9467  *    visible. If the window has no toolbar, false is returned.
9468  *
9469  *  Mac OS X threading:
9470  *    Not thread safe
9471  *
9472  *  Parameters:
9473  *
9474  *    inWindow:
9475  *      The window test the toolbar visiblity for.
9476  *
9477  *  Result:
9478  *    A boolean result indicating whether the toolbar is visible (true)
9479  *    or not (false).
9480  *
9481  *  Availability:
9482  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
9483  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
9484  *    Non-Carbon CFM:   not available
9485  }
IsWindowToolbarVisiblenull9486 function IsWindowToolbarVisible( inWindow: WindowRef ): Boolean; external name '_IsWindowToolbarVisible';
9487 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
9488 
9489 
9490 {
9491     About Custom Toolbar Views
9492 
9493     A window with a custom toolbar view does not have an HIToolbarRef. No API that takes an HIToolbarRef will work.
9494 
9495     When a custom toolbar view is provided for a window, the Window Manager will:
9496         - set the view's HIViewID to kHIViewWindowToolbarID
9497         - embed the toolbar view in the root view of the window
9498         - make the toolbar view invisible
9499 
9500     These aspects of the standard toolbar support also work with custom toolbar views:
9501         - unmodified clicks on the toolbar button to show and hide the toolbar
9502         - ShowHideWindowToolbar and IsWindowToolbarVisible
9503         - kHICommandShow/HideToolbar and kHICommandToggleToolbar
9504 
9505     These aspects of the standard toolbar support do _not_ work with custom toolbar views:
9506         - option-click on toolbar button to toggle all windows with the same toolbar
9507         - command-click and command-shift-click on toolbar button to change display mode and size
9508         - command-option click on toolbar button to display config sheet
9509 
9510     A custom toolbar view must handle these events:
9511         - kEventControlGetOptimalBounds
9512         - kEventControlSetData with kHIToolbarViewDrawBackgroundTag
9513         - kEventControlDraw and draw, or not, as requested by the background tag
9514 
9515     A custom toolbar view may optionally handle:
9516         - kEventWindowAttributesChanged to be notified when window style changes
9517         - kHICommandCustomizeToolbar to present its own toolbar customization dialog
9518         - kHICommandToggleAllToolbars to implement multi-window toggling
9519         - kHICommandCycleToolbarModeSmaller/Larger to change display mode and size
9520 
9521     A custom toolbar view may need to make itself taller or shorter while the view is visible. To ensure
9522     correct window redraw when this happens, the window frame view must be involved or notified of the
9523     change in toolbar size. The correct way to do this depends on the Mac OS X version:
9524 
9525         - for Mac OS X 10.4.x, the toolbar view should use this code:
9526 
9527             WindowRef window = HIViewGetWindow( view );
9528             DisableScreenUpdates();
9529             ShowHideWindowToolbar( window, false, false );
9530             HIViewSetFrame( view, &newBounds );
9531             ShowHideWindowToolbar( window, true, false );
9532             EnableScreenUpdates();
9533 
9534         - for Mac OS X 10.5 and later, the toolbar view may either use the above code or may instead
9535           send a kEventControlOptimalBoundsChanged event to itself. The window frame view will observe
9536           this event and resize the toolbar view automatically. Note that in this case, the view should
9537           not resize itself; instead, it should be prepared to receive a kEventControlGetOptimalBounds
9538           event and return its new optimal size in response.
9539 }
9540 {$endc} {not TARGET_CPU_64}
9541 
9542 
9543 const
9544 {
9545    * A SetControlData tag that is used by the standard window frame
9546    * view to inform the toolbar view whether the view should draw its
9547    * background or leave its background transparent. The data for this
9548    * tag is a Boolean. If the data value is true, the toolbar view
9549    * should draw its background as it desires. If the data value is
9550    * false, the toolbar view should leave its background transparent so
9551    * that the window's root view can show through the toolbar view.
9552    * Currently, the toolbar view will be asked to leave its background
9553    * transparent for windows with the textured or unified appearance.
9554    }
9555 	kHIToolbarViewDrawBackgroundTag = FourCharCode('back');
9556 
9557 {$ifc not TARGET_CPU_64}
9558 {
9559  *  HIWindowSetToolbarView()
9560  *
9561  *  Summary:
9562  *    Sets a custom toolbar view for a window.
9563  *
9564  *  Discussion:
9565  *    This API is provided for use by applications that cannot use the
9566  *    HIToolbarRef API. For best compatibility with future versions of
9567  *    Mac OS X, we highly recommend that you use the HIToolbar API if
9568  *    possible. However, if HIToolbar is not sufficient for your needs,
9569  *    you can provide a custom toolbar view that will be placed at the
9570  *    standard location inside the window frame. You are responsible
9571  *    for defining the appearance and behavior of the view. You cannot
9572  *    use this API to customize the view that is associated with an
9573  *    HIToolbarRef; a window with an HIToolbarRef uses a standard
9574  *    HIToolbox-provided view that cannot be customized. When using a
9575  *    custom toolbar view, no API that takes an HIToolbarRef will work
9576  *    with that window.
9577  *
9578  *    The HIWIndowSetToolbarView API is available in Mac OS X 10.4.9
9579  *    and later.
9580  *
9581  *  Mac OS X threading:
9582  *    Not thread safe
9583  *
9584  *  Parameters:
9585  *
9586  *    inWindow:
9587  *      The window whose toolbar view to set.
9588  *
9589  *    inView:
9590  *      The custom toolbar view for the window. You may pass NULL to
9591  *      remove the custom view from the window. Setting a custom view
9592  *      will also remove any HIToolbarRef that is associated with the
9593  *      window.
9594  *
9595  *      After a custom toolbar view has been set, the window owns the
9596  *      view and will release it automatically when the window is
9597  *      destroyed, or when a different custom view or standard
9598  *      HIToolbar is set for the window.
9599  *
9600  *  Availability:
9601  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
9602  *    CarbonLib:        not available
9603  *    Non-Carbon CFM:   not available
9604  }
HIWindowSetToolbarViewnull9605 function HIWindowSetToolbarView( inWindow: WindowRef; inView: HIViewRef { can be NULL } ): OSStatus; external name '_HIWindowSetToolbarView';
9606 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
9607 
9608 
9609 {��������������������������������������������������������������������������������������}
9610 { � Window Transparency                                                                }
9611 {��������������������������������������������������������������������������������������}
9612 {
9613  *  SetWindowAlpha()
9614  *
9615  *  Discussion:
9616  *    Alters the overall alpha of a window, making the entire window
9617  *    (including window frame) either more or less transparent. The
9618  *    alpha is expressed as a floating point value from 0.0 (completely
9619  *    transparent) to 1.0 (completely opaque).
9620  *
9621  *  Mac OS X threading:
9622  *    Not thread safe
9623  *
9624  *  Parameters:
9625  *
9626  *    inWindow:
9627  *      The window whose alpha to modify.
9628  *
9629  *    inAlpha:
9630  *      The new alpha value.
9631  *
9632  *  Result:
9633  *    An operating system result code.
9634  *
9635  *  Availability:
9636  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
9637  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
9638  *    Non-Carbon CFM:   not available
9639  }
SetWindowAlphanull9640 function SetWindowAlpha( inWindow: WindowRef; inAlpha: CGFloat ): OSStatus; external name '_SetWindowAlpha';
9641 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
9642 
9643 
9644 {
9645  *  GetWindowAlpha()
9646  *
9647  *  Discussion:
9648  *    Returns the current overall alpha value for a window. The alpha
9649  *    is expressed as a floating point value from 0.0 (completely
9650  *    transparent) to 1.0 (completely opaque).
9651  *
9652  *  Mac OS X threading:
9653  *    Not thread safe
9654  *
9655  *  Parameters:
9656  *
9657  *    inWindow:
9658  *      The window whose alpha to return.
9659  *
9660  *    outAlpha:
9661  *      On exit, contains the window's current alpha value.
9662  *
9663  *  Result:
9664  *    An operating system result code.
9665  *
9666  *  Availability:
9667  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
9668  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
9669  *    Non-Carbon CFM:   not available
9670  }
GetWindowAlphanull9671 function GetWindowAlpha( inWindow: WindowRef; var outAlpha: CGFloat ): OSStatus; external name '_GetWindowAlpha';
9672 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
9673 
9674 
9675 {��������������������������������������������������������������������������������������}
9676 { � Window Shadows                                                                     }
9677 {��������������������������������������������������������������������������������������}
9678 {
9679  *  HIWindowInvalidateShadow()
9680  *
9681  *  Summary:
9682  *    This API causes a window's shadow to be recalculated.
9683  *
9684  *  Discussion:
9685  *    HIWindowInvalidateShadow is not typically used by applications.
9686  *    However, it may be useful for applications with customized window
9687  *    frames that change shape dynamically; in this case, after the
9688  *    application has drawn the new window shape, the window shadow
9689  *    must be recalculated to follow the new window shape.
9690  *
9691  *    This API causes the window shadow to be immediately recalculated
9692  *    and redrawn based on the current contents of the window's back
9693  *    buffer. For best performance and visual appearance, you should
9694  *    follow these steps when invalidating a window shadow: disable
9695  *    updates with DisableScreenUpdates, draw, flush, invalidate the
9696  *    shadow, and enable updates. For a compositing window, after
9697  *    invalidating any views that should be redrawn, you will need to
9698  *    explicitly draw and flush using HIWindowFlush, rather than
9699  *    waiting for the event loop to draw and flush the window, because
9700  *    you cannot disable updates or invalidate the window shadow if
9701  *    drawing is done via the event loop.
9702  *
9703  *  Mac OS X threading:
9704  *    Not thread safe
9705  *
9706  *  Parameters:
9707  *
9708  *    inWindow:
9709  *      The window.
9710  *
9711  *  Availability:
9712  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
9713  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
9714  *    Non-Carbon CFM:   not available
9715  }
HIWindowInvalidateShadownull9716 function HIWindowInvalidateShadow( inWindow: WindowRef ): OSStatus; external name '_HIWindowInvalidateShadow';
9717 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
9718 
9719 
9720 {��������������������������������������������������������������������������������������}
9721 { � Window Scaling for Resolution Independence                                         }
9722 {��������������������������������������������������������������������������������������}
9723 {
9724  *  HIWindowGetBackingScaleFactor()
9725  *
9726  *  Summary:
9727  *    Returns the scale factor representing the number of backing store
9728  *    pixels corresponding to each linear unit in window space on this
9729  *    WindowRef.
9730  *
9731  *  Discussion:
9732  *    This is generally only necessary when building a bitmap context
9733  *    or image whose resolution needs to match that of a particular
9734  *    WindowRef. Note that a WindowRef's backing scale factor can
9735  *    change over time, such as when the window moves from one display
9736  *    to another, or when a display's resolution changes, so clients
9737  *    should not cache the value returned by this function.
9738  *    HIWindowGetBackingScaleFactor is only available on Mac OS X
9739  *    Version 10.7.3 and later.
9740  *
9741  *  Mac OS X threading:
9742  *    Not thread safe
9743  *
9744  *  Parameters:
9745  *
9746  *    inWindow:
9747  *      The WindowRef whose backing scale factor to provide.
9748  *
9749  *  Result:
9750  *    The backing scale factor of the window.
9751  *
9752  *  Availability:
9753  *    Mac OS X:         in version 10.7 and later in Carbon.framework [32-bit only]
9754  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.7 and later
9755  *    Non-Carbon CFM:   not available
9756  }
HIWindowGetBackingScaleFactornull9757 function HIWindowGetBackingScaleFactor( inWindow: WindowRef ): CGFloat; external name '_HIWindowGetBackingScaleFactor';
9758 (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
9759 
9760 
9761 {$endc} {not TARGET_CPU_64}
9762 
9763 
9764 {
9765  *  HIWindowScaleMode
9766  *
9767  *  Discussion:
9768  *    A window's scale mode indicates in which resolution-independent
9769  *    scale mode it is operating.
9770  }
9771 type
9772 	HIWindowScaleMode = UInt32;
9773 const
9774 {
9775    * The window is not scaled at all because the display scale factor
9776    * is 1.0.
9777    }
9778 	kHIWindowScaleModeUnscaled = 0;
9779 
9780   {
9781    * The window's backing store is being magnified by the window server
9782    * because the display scale factor != 1.0, and because the window
9783    * was created without kWindowFrameworkScaledAttribute.
9784    }
9785 	kHIWindowScaleModeMagnified = 1;
9786 
9787   {
9788    * The window's context has been scaled to match the display scale
9789    * factor because the display scale factor != 1.0 and because the
9790    * window was created with kWindowFrameworkScaledAttribute.
9791    }
9792 	kHIWindowScaleModeFrameworkScaled = 2;
9793 
9794 {$ifc not TARGET_CPU_64}
9795 {
9796  *  HIWindowGetScaleMode()   *** DEPRECATED ***
9797  *
9798  *  Summary:
9799  *    Provides the window's scale mode and the application's display
9800  *    scale factor.
9801  *
9802  *  Discussion:
9803  *    HIWindowGetScaleMode returns the HIWindowScaleMode for the
9804  *    window, which is determined based on the application's display
9805  *    scale factor and any resolution-independence attributes specified
9806  *    at window creation time. Applications and the views within the
9807  *    window can use the scale mode and display scale factor to help
9808  *    draw or layout properly for a particular scale mode.
9809  *
9810  *    This function is deprecated and should not be used by
9811  *    applications targeting Mac OS X 10.7 or later. Please use an
9812  *    appropriate AppKit API instead. Clients desiring high resolution
9813  *    windows should switch to use NSWindows instead of Carbon
9814  *    WindowRefs.
9815  *
9816  *  Mac OS X threading:
9817  *    Not thread safe
9818  *
9819  *  Parameters:
9820  *
9821  *    inWindow:
9822  *      The WindowRef whose scale mode to provide.
9823  *
9824  *    outMode:
9825  *      On exit, this is always kHIWindowScaleModeUnscaled.
9826  *
9827  *    outScaleFactor:
9828  *      On exit, this is always 1.0.
9829  *
9830  *  Result:
9831  *    An operating system result code.
9832  *
9833  *  Availability:
9834  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only] but deprecated in 10.7
9835  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
9836  *    Non-Carbon CFM:   not available
9837  }
HIWindowGetScaleModenull9838 function HIWindowGetScaleMode( inWindow: WindowRef; var outMode: HIWindowScaleMode; outScaleFactor: CGFloatPtr { can be NULL } ): OSStatus; external name '_HIWindowGetScaleMode';
9839 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
9840 
9841 
9842 {��������������������������������������������������������������������������������������}
9843 { � Window FullScreen Transition                                                       }
9844 {��������������������������������������������������������������������������������������}
9845 {
9846  *  HIWindowToggleFullScreen()
9847  *
9848  *  Summary:
9849  *    Causes a window to enter or exit fullscreen.
9850  *
9851  *  Discussion:
9852  *    If the window is not already fullscreen and the window is capable
9853  *    of becoming fullscreen -- see kHIWindowBitFullScreenPrimary --
9854  *    the window will enter fullscreen. Otherwise, if the window is
9855  *    already fullscreen, the window will exit fullscreen.
9856  *
9857  *  Mac OS X threading:
9858  *    Not thread safe
9859  *
9860  *  Parameters:
9861  *
9862  *    inWindow:
9863  *      The window whose fullscreen state to toggle.
9864  *
9865  *  Result:
9866  *    An operating system result code.
9867  *
9868  *  Availability:
9869  *    Mac OS X:         in version 10.7 and later in Carbon.framework [32-bit only]
9870  *    CarbonLib:        not available
9871  *    Non-Carbon CFM:   not available
9872  }
HIWindowToggleFullScreennull9873 function HIWindowToggleFullScreen( inWindow: WindowRef ): OSStatus; external name '_HIWindowToggleFullScreen';
9874 (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
9875 
9876 
9877 {
9878  *  HIWindowIsFullScreen()
9879  *
9880  *  Summary:
9881  *    Returns whether the window is fullscreen.
9882  *
9883  *  Mac OS X threading:
9884  *    Not thread safe
9885  *
9886  *  Parameters:
9887  *
9888  *    inWindow:
9889  *      The window whose fullscreen state to query.
9890  *
9891  *  Result:
9892  *    A Boolean indicating whether the window is fullscreen: True means
9893  *    fullscreen, and false means not fullscreen.
9894  *
9895  *  Availability:
9896  *    Mac OS X:         in version 10.7 and later in Carbon.framework [32-bit only]
9897  *    CarbonLib:        not available
9898  *    Non-Carbon CFM:   not available
9899  }
HIWindowIsFullScreennull9900 function HIWindowIsFullScreen( inWindow: WindowRef ): Boolean; external name '_HIWindowIsFullScreen';
9901 (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
9902 
9903 
9904 {��������������������������������������������������������������������������������������}
9905 { � Window Content Border                                                              }
9906 {��������������������������������������������������������������������������������������}
9907 {$endc} {not TARGET_CPU_64}
9908 
9909 
9910 {
9911  *  HIContentBorderMetrics
9912  *
9913  *  Summary:
9914  *    Describes the border of the content area of the window that will
9915  *    contain the window frame gradient.
9916  }
9917 type
9918 	HIContentBorderMetrics = record
9919 {
9920    * Height of the top of the content border area.
9921    }
9922 		top: CGFloat;
9923 
9924   {
9925    * Width of the left of the content border area.
9926    }
9927 		left: CGFloat;
9928 
9929   {
9930    * Height of the bottom of the content border area.
9931    }
9932 		bottom: CGFloat;
9933 
9934   {
9935    * Width of the right of the content border area.
9936    }
9937 		right: CGFloat;
9938 	end;
9939 {$ifc not TARGET_CPU_64}
9940 {
9941  *  HIWindowSetContentBorderThickness()
9942  *
9943  *  Summary:
9944  *    Sets the thickness of the window border that extends into the
9945  *    content area of the window.
9946  *
9947  *  Discussion:
9948  *    In Mac OS X 10.5, windows can have a gradient on the top and
9949  *    bottom section of the window which have the appearance and
9950  *    behavior of being part of the window frame. The window frame
9951  *    gradient is drawn or extended into this border and the window is
9952  *    draggable from this area. Functionally, the area actually extends
9953  *    into the content of the window where the client can embed
9954  *    controls or print status messages a la iTunes. This can be set on
9955  *    all non-floating windows.
9956  *
9957  *  Mac OS X threading:
9958  *    Not thread safe
9959  *
9960  *  Parameters:
9961  *
9962  *    inWindow:
9963  *      The window whose content border thickness is being set.
9964  *
9965  *    inBorderThickness:
9966  *      A pointer to a structure that indicates how much of the content
9967  *      area is used for the frame gradient drawing. Currently only the
9968  *      top and bottom fields are allowed. If any value other than 0 is
9969  *      used for the left or right fields, this function will return
9970  *      paramErr.
9971  *
9972  *  Result:
9973  *    An operating system result code.
9974  *
9975  *  Availability:
9976  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
9977  *    CarbonLib:        not available
9978  *    Non-Carbon CFM:   not available
9979  }
HIWindowSetContentBorderThicknessnull9980 function HIWindowSetContentBorderThickness( inWindow: HIWindowRef; const (*var*) inBorderThickness: HIContentBorderMetrics ): OSStatus; external name '_HIWindowSetContentBorderThickness';
9981 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
9982 
9983 
9984 {
9985  *  HIWindowGetContentBorderThickness()
9986  *
9987  *  Summary:
9988  *    Retrieves the border thickness of the content area of the window.
9989  *
9990  *  Discussion:
9991  *    In Mac OS X 10.5, windows can have a gradient on the top and
9992  *    bottom section of the window which have the appearance and
9993  *    behavior of being part of the window frame. This is actually the
9994  *    border of the content area of the window, and this API returns
9995  *    the metrics of this content border.
9996  *
9997  *  Mac OS X threading:
9998  *    Not thread safe
9999  *
10000  *  Parameters:
10001  *
10002  *    inWindow:
10003  *      The window to be queried.
10004  *
10005  *  Result:
10006  *    A structure describing the metrics of the content view that is
10007  *    drawn with the window frame appearance.
10008  *
10009  *  Availability:
10010  *    Mac OS X:         in version 10.5 and later in Carbon.framework [32-bit only]
10011  *    CarbonLib:        not available
10012  *    Non-Carbon CFM:   not available
10013  }
HIWindowGetContentBorderThicknessnull10014 function HIWindowGetContentBorderThickness( inWindow: HIWindowRef ): HIContentBorderMetrics; external name '_HIWindowGetContentBorderThickness';
10015 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
10016 
10017 
10018 {��������������������������������������������������������������������������������������}
10019 { � Window Properties                                                                  }
10020 {��������������������������������������������������������������������������������������}
10021 {
10022    Routines available from Mac OS 8.5 forward
10023    or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
10024 }
10025 
10026 {
10027  *  GetWindowProperty()
10028  *
10029  *  Mac OS X threading:
10030  *    Not thread safe
10031  *
10032  *  Availability:
10033  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10034  *    CarbonLib:        in CarbonLib 1.0 and later
10035  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10036  }
GetWindowPropertynull10037 function GetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; bufferSize: ByteCount; actualSize: ByteCountPtr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetWindowProperty';
10038 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10039 
10040 
10041 {
10042  *  GetWindowPropertySize()
10043  *
10044  *  Mac OS X threading:
10045  *    Not thread safe
10046  *
10047  *  Availability:
10048  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10049  *    CarbonLib:        in CarbonLib 1.0 and later
10050  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10051  }
GetWindowPropertySizenull10052 function GetWindowPropertySize( window: WindowRef; creator: PropertyCreator; tag: PropertyTag; var size: ByteCount ): OSStatus; external name '_GetWindowPropertySize';
10053 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10054 
10055 
10056 {
10057  *  SetWindowProperty()
10058  *
10059  *  Mac OS X threading:
10060  *    Not thread safe
10061  *
10062  *  Availability:
10063  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10064  *    CarbonLib:        in CarbonLib 1.0 and later
10065  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10066  }
SetWindowPropertynull10067 function SetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; propertySize: ByteCount; propertyBuffer: {const} UnivPtr ): OSStatus; external name '_SetWindowProperty';
10068 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10069 
10070 
10071 {
10072  *  RemoveWindowProperty()
10073  *
10074  *  Mac OS X threading:
10075  *    Not thread safe
10076  *
10077  *  Availability:
10078  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10079  *    CarbonLib:        in CarbonLib 1.0 and later
10080  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10081  }
RemoveWindowPropertynull10082 function RemoveWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag ): OSStatus; external name '_RemoveWindowProperty';
10083 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10084 
10085 
10086 { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
10087 
10088 {$endc} {not TARGET_CPU_64}
10089 
10090 const
10091 	kWindowPropertyPersistent = $00000001; { whether this property gets saved when flattening the window }
10092 
10093 {$ifc not TARGET_CPU_64}
10094 {
10095  *  GetWindowPropertyAttributes()
10096  *
10097  *  Mac OS X threading:
10098  *    Not thread safe
10099  *
10100  *  Availability:
10101  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10102  *    CarbonLib:        in CarbonLib 1.0 and later
10103  *    Non-Carbon CFM:   not available
10104  }
GetWindowPropertyAttributesnull10105 function GetWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; var attributes: OptionBits ): OSStatus; external name '_GetWindowPropertyAttributes';
10106 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10107 
10108 
10109 {
10110  *  ChangeWindowPropertyAttributes()
10111  *
10112  *  Mac OS X threading:
10113  *    Not thread safe
10114  *
10115  *  Availability:
10116  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10117  *    CarbonLib:        in CarbonLib 1.0 and later
10118  *    Non-Carbon CFM:   not available
10119  }
ChangeWindowPropertyAttributesnull10120 function ChangeWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; attributesToSet: OptionBits; attributesToClear: OptionBits ): OSStatus; external name '_ChangeWindowPropertyAttributes';
10121 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10122 
10123 
10124 {��������������������������������������������������������������������������������������}
10125 { � Utilities                                                                          }
10126 {��������������������������������������������������������������������������������������}
10127 {
10128  *  PinRect()
10129  *
10130  *  Mac OS X threading:
10131  *    Not thread safe
10132  *
10133  *  Availability:
10134  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10135  *    CarbonLib:        in CarbonLib 1.0 and later
10136  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10137  }
PinRectnull10138 function PinRect( const (*var*) theRect: Rect; thePt: Point ): SIGNEDLONG; external name '_PinRect';
10139 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10140 
10141 
10142 {��������������������������������������������������������������������������������������}
10143 { � Window Part Tracking                                                               }
10144 {��������������������������������������������������������������������������������������}
10145 {
10146  *  TrackBox()
10147  *
10148  *  Mac OS X threading:
10149  *    Not thread safe
10150  *
10151  *  Availability:
10152  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10153  *    CarbonLib:        in CarbonLib 1.0 and later
10154  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10155  }
TrackBoxnull10156 function TrackBox( window: WindowRef; thePt: Point; partCode: WindowPartCode ): Boolean; external name '_TrackBox';
10157 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10158 
10159 
10160 {
10161  *  TrackGoAway()
10162  *
10163  *  Mac OS X threading:
10164  *    Not thread safe
10165  *
10166  *  Availability:
10167  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10168  *    CarbonLib:        in CarbonLib 1.0 and later
10169  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10170  }
TrackGoAwaynull10171 function TrackGoAway( window: WindowRef; thePt: Point ): Boolean; external name '_TrackGoAway';
10172 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10173 
10174 
10175 {��������������������������������������������������������������������������������������}
10176 { � Window Accessors                                                                   }
10177 {��������������������������������������������������������������������������������������}
10178 {
10179  *  GetWindowGoAwayFlag()
10180  *
10181  *  Discussion:
10182  *    use GetWindowAttributes in Carbon
10183  *
10184  *  Availability:
10185  *    Mac OS X:         not available [32-bit only]
10186  *    CarbonLib:        not available
10187  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10188  }
10189 
10190 
10191 {
10192  *  GetWindowSpareFlag()
10193  *
10194  *  Discussion:
10195  *    use GetWindowAttributes in Carbon
10196  *
10197  *  Availability:
10198  *    Mac OS X:         not available [32-bit only]
10199  *    CarbonLib:        not available
10200  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10201  }
10202 
10203 
10204 {
10205  *  GetWindowList()
10206  *
10207  *  Mac OS X threading:
10208  *    Not thread safe
10209  *
10210  *  Availability:
10211  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10212  *    CarbonLib:        in CarbonLib 1.0 and later
10213  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later
10214  }
GetWindowListnull10215 function GetWindowList: WindowRef; external name '_GetWindowList';
10216 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10217 
10218 
10219 {
10220  *  GetWindowPort()
10221  *
10222  *  Mac OS X threading:
10223  *    Not thread safe
10224  *
10225  *  Availability:
10226  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10227  *    CarbonLib:        in CarbonLib 1.0 and later
10228  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10229  }
GetWindowPortnull10230 function GetWindowPort( window: WindowRef ): CGrafPtr; external name '_GetWindowPort';
10231 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10232 
10233 
10234 {
10235  *  GetWindowStructurePort()
10236  *
10237  *  Mac OS X threading:
10238  *    Not thread safe
10239  *
10240  *  Availability:
10241  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only]
10242  *    CarbonLib:        in CarbonLib 1.5 and later
10243  *    Non-Carbon CFM:   not available
10244  }
GetWindowStructurePortnull10245 function GetWindowStructurePort( inWindow: WindowRef ): CGrafPtr; external name '_GetWindowStructurePort';
10246 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
10247 
10248 
10249 {
10250  *  GetWindowKind()
10251  *
10252  *  Mac OS X threading:
10253  *    Not thread safe
10254  *
10255  *  Availability:
10256  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10257  *    CarbonLib:        in CarbonLib 1.0 and later
10258  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10259  }
GetWindowKindnull10260 function GetWindowKind( window: WindowRef ): SInt16; external name '_GetWindowKind';
10261 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10262 
10263 
10264 {
10265  *  IsWindowHilited()
10266  *
10267  *  Summary:
10268  *    Indicates whether a window's frame is hilited.
10269  *
10270  *  Discussion:
10271  *    See HiliteWindow for a disucssion on the meaning of a window's
10272  *    hilited state.
10273  *
10274  *  Mac OS X threading:
10275  *    Not thread safe
10276  *
10277  *  Parameters:
10278  *
10279  *    window:
10280  *      The window whose hilited state you wish to retrieve.
10281  *
10282  *  Result:
10283  *    A Boolean indicating whether the window's frame is hilited.
10284  *
10285  *  Availability:
10286  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10287  *    CarbonLib:        in CarbonLib 1.0 and later
10288  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10289  }
IsWindowHilitednull10290 function IsWindowHilited( window: WindowRef ): Boolean; external name '_IsWindowHilited';
10291 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10292 
10293 
10294 {
10295  *  IsWindowUpdatePending()
10296  *
10297  *  Mac OS X threading:
10298  *    Not thread safe
10299  *
10300  *  Availability:
10301  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10302  *    CarbonLib:        in CarbonLib 1.0 and later
10303  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10304  }
IsWindowUpdatePendingnull10305 function IsWindowUpdatePending( window: WindowRef ): Boolean; external name '_IsWindowUpdatePending';
10306 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10307 
10308 
10309 {
10310  *  [Mac]GetNextWindow()
10311  *
10312  *  Mac OS X threading:
10313  *    Not thread safe
10314  *
10315  *  Availability:
10316  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10317  *    CarbonLib:        in CarbonLib 1.0 and later
10318  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0.2 and later or as macro/inline
10319  }
10320 {$ifc TARGET_OS_MAC}
MacGetNextWindow__NAME__GetNextWindownull10321 function MacGetNextWindow__NAME__GetNextWindow( window: WindowRef ): WindowRef; external name '_MacGetNextWindow__NAME__GetNextWindow';
10322 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10323 {$endc} {TARGET_OS_MAC}
GetNextWindownull10324 function GetNextWindow( window: WindowRef ): WindowRef; external name '_GetNextWindow';
10325 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10326 
10327 
10328 {
10329  *  GetPreviousWindow()
10330  *
10331  *  Summary:
10332  *    Returns the window above a given window in the window list.
10333  *
10334  *  Mac OS X threading:
10335  *    Not thread safe
10336  *
10337  *  Parameters:
10338  *
10339  *    inWindow:
10340  *      The window above this window is returned.
10341  *
10342  *  Availability:
10343  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
10344  *    CarbonLib:        in CarbonLib 1.6 and later
10345  *    Non-Carbon CFM:   not available
10346  }
GetPreviousWindownull10347 function GetPreviousWindow( inWindow: WindowRef ): WindowRef; external name '_GetPreviousWindow';
10348 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
10349 
10350 
10351 {
10352  *  GetWindowStandardState()
10353  *
10354  *  Mac OS X threading:
10355  *    Not thread safe
10356  *
10357  *  Availability:
10358  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10359  *    CarbonLib:        in CarbonLib 1.0 and later
10360  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10361  }
GetWindowStandardStatenull10362 function GetWindowStandardState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowStandardState';
10363 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10364 
10365 
10366 {
10367  *  GetWindowUserState()
10368  *
10369  *  Mac OS X threading:
10370  *    Not thread safe
10371  *
10372  *  Availability:
10373  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10374  *    CarbonLib:        in CarbonLib 1.0 and later
10375  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10376  }
GetWindowUserStatenull10377 function GetWindowUserState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowUserState';
10378 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10379 
10380 
10381 {
10382  *  SetWindowKind()
10383  *
10384  *  Mac OS X threading:
10385  *    Not thread safe
10386  *
10387  *  Availability:
10388  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10389  *    CarbonLib:        in CarbonLib 1.0 and later
10390  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10391  }
10392 procedure SetWindowKind( window: WindowRef; kind: SInt16 ); external name '_SetWindowKind';
10393 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10394 
10395 
10396 {
10397  *  SetWindowStandardState()
10398  *
10399  *  Mac OS X threading:
10400  *    Not thread safe
10401  *
10402  *  Availability:
10403  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10404  *    CarbonLib:        in CarbonLib 1.0 and later
10405  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10406  }
10407 procedure SetWindowStandardState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowStandardState';
10408 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10409 
10410 
10411 {
10412  *  SetWindowUserState()
10413  *
10414  *  Mac OS X threading:
10415  *    Not thread safe
10416  *
10417  *  Availability:
10418  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10419  *    CarbonLib:        in CarbonLib 1.0 and later
10420  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10421  }
10422 procedure SetWindowUserState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowUserState';
10423 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10424 
10425 
10426 {
10427  *  SetPortWindowPort()
10428  *
10429  *  Discussion:
10430  *    set the current QuickDraw port to the port associated with the
10431  *    window
10432  *
10433  *  Mac OS X threading:
10434  *    Not thread safe
10435  *
10436  *  Availability:
10437  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10438  *    CarbonLib:        in CarbonLib 1.0 and later
10439  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10440  }
10441 procedure SetPortWindowPort( window: WindowRef ); external name '_SetPortWindowPort';
10442 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10443 
10444 
10445 {
10446  *  GetWindowPortBounds()
10447  *
10448  *  Mac OS X threading:
10449  *    Not thread safe
10450  *
10451  *  Availability:
10452  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10453  *    CarbonLib:        in CarbonLib 1.0 and later
10454  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10455  }
GetWindowPortBoundsnull10456 function GetWindowPortBounds( window: WindowRef; var bounds: Rect ): RectPtr; external name '_GetWindowPortBounds';
10457 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10458 
10459 
10460 {
10461  *  GetWindowFromPort()
10462  *
10463  *  Discussion:
10464  *    Needed to �cast up� to a WindowRef from a GrafPtr
10465  *
10466  *  Mac OS X threading:
10467  *    Not thread safe
10468  *
10469  *  Availability:
10470  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
10471  *    CarbonLib:        in CarbonLib 1.0 and later
10472  *    Non-Carbon CFM:   in CarbonAccessors.o 1.0 and later or as macro/inline
10473  }
GetWindowFromPortnull10474 function GetWindowFromPort( port: CGrafPtr ): WindowRef; external name '_GetWindowFromPort';
10475 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
10476 
10477 
10478 { old accessors}
10479 
10480 {$endc} {not TARGET_CPU_64}
10481 
10482 {
10483  *  GetWindowDataHandle()
10484  *
10485  *  Availability:
10486  *    Mac OS X:         not available
10487  *    CarbonLib:        not available
10488  *    Non-Carbon CFM:   available as macro/inline
10489  }
10490 
10491 
10492 {
10493  *  SetWindowDataHandle()
10494  *
10495  *  Availability:
10496  *    Mac OS X:         not available
10497  *    CarbonLib:        not available
10498  *    Non-Carbon CFM:   available as macro/inline
10499  }
10500 
10501 
10502 {
10503  *  GetWindowZoomFlag()
10504  *
10505  *  Availability:
10506  *    Mac OS X:         not available
10507  *    CarbonLib:        not available
10508  *    Non-Carbon CFM:   available as macro/inline
10509  }
10510 
10511 
10512 {
10513  *  GetWindowStructureRgn()
10514  *
10515  *  Availability:
10516  *    Mac OS X:         not available
10517  *    CarbonLib:        not available
10518  *    Non-Carbon CFM:   available as macro/inline
10519  }
10520 
10521 
10522 {
10523  *  GetWindowContentRgn()
10524  *
10525  *  Availability:
10526  *    Mac OS X:         not available
10527  *    CarbonLib:        not available
10528  *    Non-Carbon CFM:   available as macro/inline
10529  }
10530 
10531 
10532 {
10533  *  GetWindowUpdateRgn()
10534  *
10535  *  Availability:
10536  *    Mac OS X:         not available
10537  *    CarbonLib:        not available
10538  *    Non-Carbon CFM:   available as macro/inline
10539  }
10540 
10541 
10542 {
10543  *  GetWindowTitleWidth()
10544  *
10545  *  Availability:
10546  *    Mac OS X:         not available
10547  *    CarbonLib:        not available
10548  *    Non-Carbon CFM:   available as macro/inline
10549  }
10550 
10551 
10552 {--------------------------------------------------------------------------------------}
10553 {  � DEPRECATED                                                                        }
10554 {  All functions below this point are either deprecated (they continue to function     }
10555 {  but are not the most modern nor most efficient solution to a problem), or they are  }
10556 {  completely unavailable on Mac OS X.                                                 }
10557 {--------------------------------------------------------------------------------------}
10558 {��������������������������������������������������������������������������������������}
10559 { � Window Definition Messages                                                         }
10560 {��������������������������������������������������������������������������������������}
10561 const
10562 	kWindowMsgDraw = 0;
10563 	kWindowMsgHitTest = 1;
10564 	kWindowMsgCalculateShape = 2;
10565 	kWindowMsgInitialize = 3;
10566 	kWindowMsgCleanUp = 4;
10567 	kWindowMsgDrawGrowOutline = 5;
10568 	kWindowMsgDrawGrowBox = 6;
10569 
10570 { Messages available from Mac OS 8.0 forward}
10571 const
10572 	kWindowMsgGetFeatures = 7;
10573 	kWindowMsgGetRegion = 8;
10574 
10575 { Messages available from Mac OS 8.5 forward}
10576 const
10577 	kWindowMsgDragHilite = 9;    { parameter boolean indicating on or off}
10578 	kWindowMsgModified = 10;   { parameter boolean indicating saved (false) or modified (true)}
10579 	kWindowMsgDrawInCurrentPort = 11;   { same as kWindowMsgDraw, but must draw in current port}
10580 	kWindowMsgSetupProxyDragImage = 12;   { parameter pointer to SetupWindowProxyDragImageRec}
10581 	kWindowMsgStateChanged = 13;   { something about the window's state has changed}
10582 	kWindowMsgMeasureTitle = 14;    { measure and return the ideal title width}
10583 
10584 { Messages only available in Carbon}
10585 const
10586 	kWindowMsgGetGrowImageRegion = 19;    { get region to xor during grow/resize. parameter pointer to GetGrowImageRegionRec.}
10587 
10588 { old names}
10589 const
10590 	wDraw = kWindowMsgDraw;
10591 	wHit = kWindowMsgHitTest;
10592 	wCalcRgns = kWindowMsgCalculateShape;
10593 	wNew = kWindowMsgInitialize;
10594 	wDispose = kWindowMsgCleanUp;
10595 	wGrow = kWindowMsgDrawGrowOutline;
10596 	wDrawGIcon = kWindowMsgDrawGrowBox;
10597 
10598 {��������������������������������������������������������������������������������������}
10599 { � State-changed Flags for kWindowMsgStateChanged                                     }
10600 {��������������������������������������������������������������������������������������}
10601 const
10602 	kWindowStateTitleChanged = 1 shl 0;
10603 
10604 {��������������������������������������������������������������������������������������}
10605 { � WDEF Message Types                                                                 }
10606 {��������������������������������������������������������������������������������������}
10607 {
10608    SetupWindowProxyDragImageRec - setup the proxy icon drag image
10609    Both regions are allocated and disposed by the Window Manager.
10610    The GWorld is disposed of by the Window Manager, but the WDEF must allocate
10611    it.  See Technote on Drag Manager 1.1 additions for more information and sample code for
10612    setting up drag images.
10613 }
10614 
10615 type
10616 	SetupWindowProxyDragImageRec = record
10617 		imageGWorld: GWorldPtr;            { locked GWorld containing the drag image - output - can be NULL}
10618 		imageRgn: RgnHandle;               { image clip region, contains the portion of the image which gets blitted to screen - preallocated output - if imageGWorld is NULL, this is ignored}
10619 		outlineRgn: RgnHandle;             { the outline region used on shallow monitors - preallocated output - must always be non-empty}
10620 	end;
10621 { MeasureWindowTitleRec - a pointer to this is passed in WDEF param for kWindowMsgMeasureTitle}
10622 type
10623 	MeasureWindowTitleRec = record
10624 { output parameters (filled in by the WDEF)}
10625 		fullTitleWidth: SInt16;         { text + proxy icon width}
10626 		titleTextWidth: SInt16;         { text width}
10627 
10628                                               { input parameters}
10629 		isUnicodeTitle: Boolean;
10630 		unused: Boolean;                 { future use}
10631 	end;
10632 	MeasureWindowTitleRecPtr = ^MeasureWindowTitleRec;
10633 {
10634    GetGrowImageRegionRec - generate a region to be xored during GrowWindow and ResizeWindow.
10635    This is passed along with a kWindowMsgGetGrowImageRegion message. On input, the growRect
10636    parameter is the window's new bounds in global coordinates. The growImageRegion parameter
10637    will be allocated and disposed automatically; the window definition should alter the
10638    region appropriately.
10639 }
10640 type
10641 	GetGrowImageRegionRecPtr = ^GetGrowImageRegionRec;
10642 	GetGrowImageRegionRec = record
10643 		growRect: Rect;
10644 		growImageRegion: RgnHandle;
10645 	end;
10646 { GetWindowRegionRec - a pointer to this is passed in WDEF param for kWindowMsgGetRegion}
10647 type
10648 	GetWindowRegionRec = record
10649 		winRgn: RgnHandle;
10650 		regionCode: WindowRegionCode;
10651 	end;
10652 	GetWindowRegionPtr = ^GetWindowRegionRec;
10653 	GetWindowRegionRecPtr = GetWindowRegionPtr;
10654 {��������������������������������������������������������������������������������������}
10655 { � Desktop Pattern Resource ID                                                        }
10656 {��������������������������������������������������������������������������������������}
10657 const
10658 	deskPatID = 16;
10659 
10660 {��������������������������������������������������������������������������������������}
10661 { � Window Color Part Codes                                                            }
10662 {��������������������������������������������������������������������������������������}
10663 const
10664 	wContentColor = 0;
10665 	wFrameColor = 1;
10666 	wTextColor = 2;
10667 	wHiliteColor = 3;
10668 	wTitleBarColor = 4;
10669 
10670 {��������������������������������������������������������������������������������������}
10671 { � Window Color Table                                                                 }
10672 {��������������������������������������������������������������������������������������}
10673 type
10674 	WinCTabPtr = ^WinCTab;
10675 	WinCTab = record
10676 		wCSeed: SIGNEDLONG;                 { reserved }
10677 		wCReserved: SInt16;             { reserved }
10678 		ctSize: SInt16;                 { usually 4 for windows }
10679 		ctTable: array [0..4] of ColorSpec;
10680 	end;
10681 type
10682 	WCTabPtr = WinCTabPtr;
10683 type
10684 	WCTabHandle = ^WCTabPtr;
10685 
10686 {��������������������������������������������������������������������������������������}
10687 {  � BasicWindowDescription                                                            }
10688 {  Contains statically-sized basic attributes of the window, for storage in a          }
10689 {  collection item.                                                                    }
10690 {��������������������������������������������������������������������������������������}
10691 { constants for the version field}
10692 const
10693 	kWindowDefinitionVersionOne = 1;
10694 	kWindowDefinitionVersionTwo = 2;
10695 
10696 { constants for the stateflags bit field }
10697 const
10698 	kWindowIsCollapsedState = 1 shl 0;
10699 
10700 type
10701 	BasicWindowDescriptionPtr = ^BasicWindowDescription;
10702 	BasicWindowDescription = record
10703 		descriptionSize: UInt32;        { sizeof(BasicWindowDescription)}
10704 
10705 		windowContentRect: Rect;      { location on screen}
10706 		windowZoomRect: Rect;         { location on screen when zoomed out}
10707 		windowRefCon: URefCon;           { the refcon - __avoid saving stale pointers here__  }
10708 		windowStateFlags: UInt32;       { window state bit flags}
10709 		windowPositionMethod: WindowPositionMethod_fix; { method last used by RepositionWindow to position the window (if any)}
10710 
10711 		windowDefinitionVersion: UInt32;
10712 		case SInt16 of
10713 		0: (
10714 			windowDefProc: SInt16;      { defProc and variant}
10715 			windowHasCloseBox: Boolean;
10716 		   );
10717 		1: (
10718 			windowClass: WindowClass_fix;        { the class}
10719 			windowAttributes:	WindowAttributes_fix;   { the attributes}
10720 		   );
10721 	end;
10722 {  the window manager stores the default collection items using these IDs}
10723 const
10724 	kStoredWindowSystemTag = FourCharCode('appl'); { Only Apple collection items will be of this tag}
10725 	kStoredBasicWindowDescriptionID = FourCharCode('sbas'); { BasicWindowDescription}
10726 	kStoredWindowPascalTitleID = FourCharCode('s255'); { pascal title string}
10727 	kStoredWindowTitleCFStringID = FourCharCode('cfst'); { CFString title string}
10728 
10729 
10730 {
10731  *  DeskHookProcPtr
10732  *
10733  *  Summary:
10734  *    Callback function that handles mouse clicks on the desktop.
10735  }
10736 type
10737 	DeskHookProcPtr = procedure( mouseClick: Boolean; var theEvent: EventRecord );
10738 
10739 {
10740  *  WindowPaintProcPtr
10741  *
10742  *  Summary:
10743  *    Callback function that paints a window's content area.
10744  }
10745 type
devicenull10746 	WindowPaintProcPtr = function( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr ): OSStatus;
10747 	DeskHookUPP = DeskHookProcPtr;
10748 	WindowPaintUPP = WindowPaintProcPtr;
10749 {
10750  *  NewDeskHookUPP()
10751  *
10752  *  Availability:
10753  *    Mac OS X:         not available
10754  *    CarbonLib:        not available
10755  *    Non-Carbon CFM:   available as macro/inline
10756  }
10757 
10758 {
10759  *  NewWindowPaintUPP()
10760  *
10761  *  Availability:
10762  *    Mac OS X:         in version 10.0 and later in Carbon.framework
10763  *    CarbonLib:        in CarbonLib 1.0 and later
10764  *    Non-Carbon CFM:   available as macro/inline
10765  }
NewWindowPaintUPPnull10766 function NewWindowPaintUPP( userRoutine: WindowPaintProcPtr ): WindowPaintUPP; external name '_NewWindowPaintUPP';
10767 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10768 
10769 {
10770  *  DisposeDeskHookUPP()
10771  *
10772  *  Availability:
10773  *    Mac OS X:         not available
10774  *    CarbonLib:        not available
10775  *    Non-Carbon CFM:   available as macro/inline
10776  }
10777 
10778 {
10779  *  DisposeWindowPaintUPP()
10780  *
10781  *  Availability:
10782  *    Mac OS X:         in version 10.0 and later in Carbon.framework
10783  *    CarbonLib:        in CarbonLib 1.0 and later
10784  *    Non-Carbon CFM:   available as macro/inline
10785  }
10786 procedure DisposeWindowPaintUPP( userUPP: WindowPaintUPP ); external name '_DisposeWindowPaintUPP';
10787 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10788 
10789 {
10790  *  InvokeDeskHookUPP()
10791  *
10792  *  Availability:
10793  *    Mac OS X:         not available
10794  *    CarbonLib:        not available
10795  *    Non-Carbon CFM:   available as macro/inline
10796  }
10797 
10798 {
10799  *  InvokeWindowPaintUPP()
10800  *
10801  *  Availability:
10802  *    Mac OS X:         in version 10.0 and later in Carbon.framework
10803  *    CarbonLib:        in CarbonLib 1.0 and later
10804  *    Non-Carbon CFM:   available as macro/inline
10805  }
InvokeWindowPaintUPPnull10806 function InvokeWindowPaintUPP( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr; userUPP: WindowPaintUPP ): OSStatus; external name '_InvokeWindowPaintUPP';
10807 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10808 
10809 {$ifc not TARGET_CPU_64}
10810 {
10811  *  NewWindow()   *** DEPRECATED ***
10812  *
10813  *  Deprecated:
10814  *    Use CreateNewWindow instead of NewWindow.
10815  *
10816  *  Summary:
10817  *    Creates a new window.
10818  *
10819  *  Mac OS X threading:
10820  *    Not thread safe
10821  *
10822  *  Availability:
10823  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10824  *    CarbonLib:        in CarbonLib 1.0 and later
10825  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10826  }
NewWindownull10827 function NewWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; theProc: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SRefCon ): WindowRef; external name '_NewWindow';
10828 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10829 
10830 
10831 {
10832  *  NewCWindow()   *** DEPRECATED ***
10833  *
10834  *  Deprecated:
10835  *    Use CreateNewWindow instead of NewCWindow.
10836  *
10837  *  Summary:
10838  *    Creates a new window.
10839  *
10840  *  Mac OS X threading:
10841  *    Not thread safe
10842  *
10843  *  Availability:
10844  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10845  *    CarbonLib:        in CarbonLib 1.0 and later
10846  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10847  }
NewCWindownull10848 function NewCWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SRefCon ): WindowRef; external name '_NewCWindow';
10849 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10850 
10851 
10852 {
10853  *  GetNewCWindow()   *** DEPRECATED ***
10854  *
10855  *  Deprecated:
10856  *    Use nib files and CreateWindowFromNib instead of GetNewCWindow.
10857  *
10858  *  Summary:
10859  *    Loads a window from a 'WIND' resource.
10860  *
10861  *  Mac OS X threading:
10862  *    Not thread safe
10863  *
10864  *  Availability:
10865  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10866  *    CarbonLib:        in CarbonLib 1.0 and later
10867  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10868  }
GetNewCWindownull10869 function GetNewCWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewCWindow';
10870 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10871 
10872 
10873 {
10874  *  GetNewWindow()   *** DEPRECATED ***
10875  *
10876  *  Deprecated:
10877  *    Use nib files and CreateWindowFromNib instead of GetNewWindow.
10878  *
10879  *  Summary:
10880  *    Loads a window from a 'WIND' resource.
10881  *
10882  *  Mac OS X threading:
10883  *    Not thread safe
10884  *
10885  *  Availability:
10886  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10887  *    CarbonLib:        in CarbonLib 1.0 and later
10888  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
10889  }
GetNewWindownull10890 function GetNewWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewWindow';
10891 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10892 
10893 
10894 {
10895  *  CreateWindowFromResource()   *** DEPRECATED ***
10896  *
10897  *  Deprecated:
10898  *    Use nib files and CreateWindowFromNib instead of
10899  *    CreateWindowFromResource.
10900  *
10901  *  Summary:
10902  *    Loads a window from a 'wind' resource.
10903  *
10904  *  Mac OS X threading:
10905  *    Not thread safe
10906  *
10907  *  Availability:
10908  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10909  *    CarbonLib:        in CarbonLib 1.0 and later
10910  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10911  }
CreateWindowFromResourcenull10912 function CreateWindowFromResource( resID: SInt16; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromResource';
10913 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10914 
10915 
10916 {
10917  *  StoreWindowIntoCollection()   *** DEPRECATED ***
10918  *
10919  *  Deprecated:
10920  *    Use HIArchiveEncodeCFType to encode a window to an archive
10921  *    instead of StoreWindowIntoCollection.
10922  *
10923  *  Summary:
10924  *    Stores a description of a window into a Collection Manager
10925  *    collection.
10926  *
10927  *  Mac OS X threading:
10928  *    Not thread safe
10929  *
10930  *  Availability:
10931  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10932  *    CarbonLib:        in CarbonLib 1.0 and later
10933  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10934  }
StoreWindowIntoCollectionnull10935 function StoreWindowIntoCollection( window: WindowRef; collection_: Collection ): OSStatus; external name '_StoreWindowIntoCollection';
10936 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10937 
10938 
10939 {
10940  *  CreateWindowFromCollection()   *** DEPRECATED ***
10941  *
10942  *  Deprecated:
10943  *    Use HIArchiveCopyDecodedCFType to decode a window from an archive
10944  *    instead of CreateWindowFromCollection.
10945  *
10946  *  Summary:
10947  *    Creates a window from a window description stored in a Collection
10948  *    Manager collection.
10949  *
10950  *  Mac OS X threading:
10951  *    Not thread safe
10952  *
10953  *  Availability:
10954  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10955  *    CarbonLib:        in CarbonLib 1.0 and later
10956  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10957  }
CreateWindowFromCollectionnull10958 function CreateWindowFromCollection( collection_: Collection; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromCollection';
10959 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10960 
10961 
10962 {
10963  *  GetWindowOwnerCount()   *** DEPRECATED ***
10964  *
10965  *  Deprecated:
10966  *    In Mac OS X 10.2 and later, use CFGetRetainCount instead of
10967  *    GetWindowOwnerCount.
10968  *
10969  *  Summary:
10970  *    Returns the retain count of a window.
10971  *
10972  *  Mac OS X threading:
10973  *    Not thread safe
10974  *
10975  *  Availability:
10976  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10977  *    CarbonLib:        in CarbonLib 1.0 and later
10978  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
10979  }
GetWindowOwnerCountnull10980 function GetWindowOwnerCount( window: WindowRef; var outCount: ItemCount ): OSStatus; external name '_GetWindowOwnerCount';
10981 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
10982 
10983 
10984 {
10985  *  CloneWindow()   *** DEPRECATED ***
10986  *
10987  *  Deprecated:
10988  *    On Mac OS X 10.2 and later, use CFRetain instead of CloneWindow.
10989  *
10990  *  Summary:
10991  *    Increments the retain count of a window.
10992  *
10993  *  Mac OS X threading:
10994  *    Not thread safe
10995  *
10996  *  Availability:
10997  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
10998  *    CarbonLib:        in CarbonLib 1.0 and later
10999  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
11000  }
CloneWindownull11001 function CloneWindow( window: WindowRef ): OSStatus; external name '_CloneWindow';
11002 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11003 
11004 
11005 {
11006  *  GetWindowRetainCount()   *** DEPRECATED ***
11007  *
11008  *  Deprecated:
11009  *    In Mac OS X 10.2 and later, use CFGetRetainCount instead of
11010  *    GetWindowRetainCount.
11011  *
11012  *  Summary:
11013  *    Returns the retain count of a window.
11014  *
11015  *  Mac OS X threading:
11016  *    Not thread safe
11017  *
11018  *  Availability:
11019  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11020  *    CarbonLib:        in CarbonLib 1.1 and later
11021  *    Non-Carbon CFM:   not available
11022  }
GetWindowRetainCountnull11023 function GetWindowRetainCount( inWindow: WindowRef ): ItemCount; external name '_GetWindowRetainCount';
11024 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11025 
11026 
11027 {
11028  *  RetainWindow()   *** DEPRECATED ***
11029  *
11030  *  Deprecated:
11031  *    On Mac OS X 10.2 and later, use CFRetain instead of RetainWindow.
11032  *
11033  *  Summary:
11034  *    Increments the retain count of a window.
11035  *
11036  *  Mac OS X threading:
11037  *    Not thread safe
11038  *
11039  *  Availability:
11040  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11041  *    CarbonLib:        in CarbonLib 1.1 and later
11042  *    Non-Carbon CFM:   not available
11043  }
RetainWindownull11044 function RetainWindow( inWindow: WindowRef ): OSStatus; external name '_RetainWindow';
11045 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11046 
11047 
11048 {
11049  *  ReleaseWindow()   *** DEPRECATED ***
11050  *
11051  *  Deprecated:
11052  *    On Mac OS X 10.2 and later, use CFRelease instead of
11053  *    ReleaseWindow.
11054  *
11055  *  Summary:
11056  *    Decrements the retain count of a window, and destroys the window
11057  *    if the retain count falls to zero.
11058  *
11059  *  Mac OS X threading:
11060  *    Not thread safe
11061  *
11062  *  Availability:
11063  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11064  *    CarbonLib:        in CarbonLib 1.1 and later
11065  *    Non-Carbon CFM:   not available
11066  }
ReleaseWindownull11067 function ReleaseWindow( inWindow: WindowRef ): OSStatus; external name '_ReleaseWindow';
11068 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11069 
11070 
11071 {
11072  *  GetWVariant()   *** DEPRECATED ***
11073  *
11074  *  Deprecated:
11075  *    Use GetWindowAttributes to determine aspects of a window's
11076  *    appearance or behavior.
11077  *
11078  *  Summary:
11079  *    Retrieves the window variant code for a window.
11080  *
11081  *  Discussion:
11082  *    The window variant code is the low four bits of a window's
11083  *    procID. This API is no longer recommended for use.
11084  *
11085  *  Mac OS X threading:
11086  *    Not thread safe
11087  *
11088  *  Availability:
11089  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11090  *    CarbonLib:        in CarbonLib 1.0 and later
11091  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11092  }
GetWVariantnull11093 function GetWVariant( window: WindowRef ): SInt16; external name '_GetWVariant';
11094 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11095 
11096 
11097 {
11098  *  SetWindowClass()   *** DEPRECATED ***
11099  *
11100  *  Deprecated:
11101  *    Use HIWindowChangeClass or SetWindowGroup or
11102  *    ChangeWindowAttributes (or all three) instead of SetWindowClass.
11103  *
11104  *  Summary:
11105  *    Changes the window class of a window.
11106  *
11107  *  Discussion:
11108  *    SetWindowClass changes the class of a window. It also changes the
11109  *    window's z-order so that it is grouped with other windows of the
11110  *    same class. It does not change the visual appearance of the
11111  *    window. In CarbonLib, SetWindowClass may not be used to change a
11112  *    non-utility window to have utility window class, or to make a
11113  *    utility window have non-utility class. SetWindowClass is
11114  *    available from CarbonLib 1.1 forward.
11115  *
11116  *  Mac OS X threading:
11117  *    Not thread safe
11118  *
11119  *  Parameters:
11120  *
11121  *    inWindow:
11122  *      The window whose class to change.
11123  *
11124  *    inWindowClass:
11125  *      The new window class.
11126  *
11127  *  Availability:
11128  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11129  *    CarbonLib:        in CarbonLib 1.1 and later
11130  *    Non-Carbon CFM:   not available
11131  }
SetWindowClassnull11132 function SetWindowClass( inWindow: WindowRef; inWindowClass: WindowClass ): OSStatus; external name '_SetWindowClass';
11133 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11134 
11135 
11136 {$endc} {not TARGET_CPU_64}
11137 
11138 const
11139 	kWindowPaintProcOptionsNone = 0;
11140 
11141 
11142 type
11143 	WindowPaintProcOptions = OptionBits;
11144 {$ifc not TARGET_CPU_64}
11145 {
11146  *  InstallWindowContentPaintProc()   *** DEPRECATED ***
11147  *
11148  *  Deprecated:
11149  *    Use an event handler for kEventControlDraw on a window's content
11150  *    view instead of installing a window content paint proc.
11151  *
11152  *  Summary:
11153  *    Installs a callback function that is used by non-compositing
11154  *    windows to erase the window background.
11155  *
11156  *  Mac OS X threading:
11157  *    Not thread safe
11158  *
11159  *  Availability:
11160  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11161  *    CarbonLib:        in CarbonLib 1.0 and later
11162  *    Non-Carbon CFM:   in WindowsLib 9.0 and later
11163  }
InstallWindowContentPaintProcnull11164 function InstallWindowContentPaintProc( window: WindowRef; paintProc: WindowPaintUPP; options: WindowPaintProcOptions; refCon: UnivPtr { can be NULL } ): OSStatus; external name '_InstallWindowContentPaintProc';
11165 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11166 
11167 
11168 {
11169  *  ClipAbove()   *** DEPRECATED ***
11170  *
11171  *  Deprecated:
11172  *    Do not use this function on Mac OS X; it does nothing.
11173  *
11174  *  Summary:
11175  *    Sets the clip region of the Window Manager port to be the desktop
11176  *    minus the structure regions of the windows in front of the
11177  *    specified window.
11178  *
11179  *  Mac OS X threading:
11180  *    Not thread safe
11181  *
11182  *  Availability:
11183  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11184  *    CarbonLib:        in CarbonLib 1.0 and later
11185  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11186  }
11187 procedure ClipAbove( window: WindowRef ); external name '_ClipAbove';
11188 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11189 
11190 
11191 {
11192  *  PaintOne()   *** DEPRECATED ***
11193  *
11194  *  Deprecated:
11195  *    Applications never need to call PaintOne. Use InvalWindowRect,
11196  *    InvalWindowRgn, or HIViewSetNeedsDisplay to invalidate a portion
11197  *    of a window.
11198  *
11199  *  Summary:
11200  *    Repaints a portion of a window's structure and content.
11201  *
11202  *  Mac OS X threading:
11203  *    Not thread safe
11204  *
11205  *  Availability:
11206  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11207  *    CarbonLib:        in CarbonLib 1.0 and later
11208  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11209  }
11210 procedure PaintOne( window: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintOne';
11211 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11212 
11213 
11214 {
11215  *  PaintBehind()   *** DEPRECATED ***
11216  *
11217  *  Deprecated:
11218  *    Applications never need to call PaintBehind. Use InvalWindowRect,
11219  *    InvalWindowRgn, or HIViewSetNeedsDisplay to invalidate a portion
11220  *    of a window.
11221  *
11222  *  Summary:
11223  *    Repaints the windows that intersect with a specified region.
11224  *
11225  *  Mac OS X threading:
11226  *    Not thread safe
11227  *
11228  *  Availability:
11229  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11230  *    CarbonLib:        in CarbonLib 1.0 and later
11231  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11232  }
11233 procedure PaintBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintBehind';
11234 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11235 
11236 
11237 {
11238  *  CalcVis()   *** DEPRECATED ***
11239  *
11240  *  Deprecated:
11241  *    The visible region of a window on Mac OS X is managed by the
11242  *    window server. Applications never need to call this function.
11243  *
11244  *  Summary:
11245  *    Recalculates the visible region of a window.
11246  *
11247  *  Mac OS X threading:
11248  *    Not thread safe
11249  *
11250  *  Availability:
11251  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11252  *    CarbonLib:        in CarbonLib 1.0 and later
11253  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11254  }
11255 procedure CalcVis( window: WindowRef ); external name '_CalcVis';
11256 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11257 
11258 
11259 {
11260  *  CalcVisBehind()   *** DEPRECATED ***
11261  *
11262  *  Deprecated:
11263  *    The visible region of a window on Mac OS X is managed by the
11264  *    window server. Applications never need to call this function.
11265  *
11266  *  Summary:
11267  *    Recalculates the visible region of windows that intersect with a
11268  *    specified region.
11269  *
11270  *  Mac OS X threading:
11271  *    Not thread safe
11272  *
11273  *  Availability:
11274  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11275  *    CarbonLib:        in CarbonLib 1.0 and later
11276  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11277  }
11278 procedure CalcVisBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_CalcVisBehind';
11279 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11280 
11281 
11282 {
11283  *  CheckUpdate()   *** DEPRECATED ***
11284  *
11285  *  Deprecated:
11286  *    Use AcquireFirstMatchingEventInQueue instead of CheckUpdate.
11287  *
11288  *  Summary:
11289  *    Searches the event queue for the next available update event.
11290  *
11291  *  Mac OS X threading:
11292  *    Not thread safe
11293  *
11294  *  Availability:
11295  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11296  *    CarbonLib:        in CarbonLib 1.0 and later
11297  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11298  }
CheckUpdatenull11299 function CheckUpdate( var theEvent: EventRecord ): Boolean; external name '_CheckUpdate';
11300 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11301 
11302 
11303 {
11304  *  FrontWindow()   *** DEPRECATED ***
11305  *
11306  *  Deprecated:
11307  *    Use ActiveNonFloatingWindow, FrontNonFloatingWindow, or
11308  *    GetFrontWindowOfClass instead of FrontWindow.
11309  *
11310  *  Summary:
11311  *    Returns the frontmost visible window in the window list.
11312  *
11313  *  Discussion:
11314  *    The frontmost visible window is not necessarily a document or
11315  *    dialog window, or even a window created by your application. For
11316  *    example, it may be a menu window, a Text Services Manager
11317  *    bottom-line input window, a help tag, or a floating window. If
11318  *    your code needs the frontmost document or dialog window, use the
11319  *    ActiveNonFloatingWindow or FrontNonFloatingWindow APIs instead of
11320  *    FrontWindow. For compatibility with existing applications,
11321  *    FrontWindow ignores all windows of class kMenuBarWindowClass and
11322  *    instead returns the frontmost visible window behind the menubar.
11323  *
11324  *  Mac OS X threading:
11325  *    Not thread safe
11326  *
11327  *  Result:
11328  *    The frontmost visible window, or NULL if no windows are visible.
11329  *
11330  *  Availability:
11331  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11332  *    CarbonLib:        in CarbonLib 1.0 and later
11333  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11334  }
FrontWindownull11335 function FrontWindow: WindowRef; external name '_FrontWindow';
11336 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11337 
11338 
11339 {
11340  *  SetWindowPic()   *** DEPRECATED ***
11341  *
11342  *  Deprecated:
11343  *    Use an HIImageView placed in the window instead of SetWindowPic.
11344  *
11345  *  Summary:
11346  *    Causes a picture to be drawn in a window's content area.
11347  *
11348  *  Mac OS X threading:
11349  *    Not thread safe
11350  *
11351  *  Availability:
11352  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11353  *    CarbonLib:        in CarbonLib 1.0 and later
11354  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11355  }
11356 procedure SetWindowPic( window: WindowRef; pic: PicHandle ); external name '_SetWindowPic';
11357 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11358 
11359 
11360 {
11361  *  GetWindowPic()   *** DEPRECATED ***
11362  *
11363  *  Deprecated:
11364  *    If using an HIImageView to draw a window's content, ask the image
11365  *    view for its image instead of calling GetWindowPic.
11366  *
11367  *  Summary:
11368  *    Retrieves the picture being drawn in a window's content area.
11369  *
11370  *  Mac OS X threading:
11371  *    Not thread safe
11372  *
11373  *  Availability:
11374  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11375  *    CarbonLib:        in CarbonLib 1.0 and later
11376  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11377  }
GetWindowPicnull11378 function GetWindowPic( window: WindowRef ): PicHandle; external name '_GetWindowPic';
11379 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11380 
11381 
11382 {
11383  *  SetWindowProxyFSSpec()   *** DEPRECATED ***
11384  *
11385  *  Deprecated:
11386  *    Use HIWindowSetProxyFSRef instead of SetWindowProxyFSSpec.
11387  *
11388  *  Summary:
11389  *    Set the proxy icon for a window using an FSSpec to an existing
11390  *    file system object (volume, folder, or file).
11391  *
11392  *  Mac OS X threading:
11393  *    Not thread safe
11394  *
11395  *  Parameters:
11396  *
11397  *    window:
11398  *      The window whose proxy icon to set.
11399  *
11400  *    inFile:
11401  *      The file system object that the window represents. The window�s
11402  *      proxy icon is determined by asking Icon Services for the icon
11403  *      of this object.
11404  *
11405  *  Availability:
11406  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11407  *    CarbonLib:        in CarbonLib 1.0 and later
11408  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
11409  }
SetWindowProxyFSSpecnull11410 function SetWindowProxyFSSpec( window: WindowRef; const (*var*) inFile: FSSpec ): OSStatus; external name '_SetWindowProxyFSSpec';
11411 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11412 
11413 
11414 {
11415  *  GetWindowProxyFSSpec()   *** DEPRECATED ***
11416  *
11417  *  Deprecated:
11418  *    Use HIWindowGetProxyFSRef instead of GetWindowProxyFSSpec.
11419  *
11420  *  Summary:
11421  *    Returns the FSSpec used to determine the proxy icon for a window.
11422  *
11423  *  Discussion:
11424  *    This API will return noErr and a valid FSSpec if the window�s
11425  *    proxy icon has been specified using the SetWindowProxyFSSpec or
11426  *    SetWindowProxyAlias APIs. If the window has no proxy icon, or if
11427  *    the icon was specified with another SetWindowProxy API, then an
11428  *    error will be returned.
11429  *
11430  *  Mac OS X threading:
11431  *    Not thread safe
11432  *
11433  *  Parameters:
11434  *
11435  *    window:
11436  *      The window whose proxy icon FSSpec to return.
11437  *
11438  *    outFile:
11439  *      On exit, contains the window�s proxy icon FSSpec.
11440  *
11441  *  Result:
11442  *    noErr if the window�s proxy icon FSSpec has been returned;
11443  *    errWindowDoesNotHaveProxy if the window does not have a proxy
11444  *    icon, or if the proxy icon was specified by IconRef or
11445  *    type/creator rather than by FSSpec or alias. Other operating
11446  *    system error codes may also be returned.
11447  *
11448  *  Availability:
11449  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11450  *    CarbonLib:        in CarbonLib 1.0 and later
11451  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
11452  }
GetWindowProxyFSSpecnull11453 function GetWindowProxyFSSpec( window: WindowRef; var outFile: FSSpec ): OSStatus; external name '_GetWindowProxyFSSpec';
11454 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11455 
11456 
11457 {
11458  *  IsWindowPathSelectClick()   *** DEPRECATED ***
11459  *
11460  *  Deprecated:
11461  *    Use IsWindowPathSelectEvent instead of IsWindowPathSelectClick.
11462  *
11463  *  Summary:
11464  *    Indicates whether an EventRecord describing a click on a window�s
11465  *    title should cause a path selection menu to be displayed.
11466  *
11467  *  Discussion:
11468  *    Windows that have a proxy icon provided using an FSSpec or alias
11469  *    can support a path selection menu, which displays the file system
11470  *    path to the object, one menu item per directory. Making a
11471  *    selection from this item will automatically open the
11472  *    corresponding object in the Finder.
11473  *
11474  *  Mac OS X threading:
11475  *    Not thread safe
11476  *
11477  *  Parameters:
11478  *
11479  *    window:
11480  *      The window on which the click occurred.
11481  *
11482  *    event:
11483  *      The event. IsWindowPathSelectClick will only return true for
11484  *      mouseDown events.
11485  *
11486  *  Result:
11487  *    true if the click should cause a path selection menu to be
11488  *    displayed, or false if not. If this API returns true, the
11489  *    application should call the WindowPathSelect API.
11490  *
11491  *  Availability:
11492  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11493  *    CarbonLib:        in CarbonLib 1.0 and later
11494  *    Non-Carbon CFM:   in WindowsLib 8.5 and later
11495  }
IsWindowPathSelectClicknull11496 function IsWindowPathSelectClick( window: WindowRef; const (*var*) event: EventRecord ): Boolean; external name '_IsWindowPathSelectClick';
11497 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11498 
11499 
11500 {
11501  *  SetWTitle()   *** DEPRECATED ***
11502  *
11503  *  Deprecated:
11504  *    Use SetWindowTitleWithCFString instead of SetWTitle.
11505  *
11506  *  Summary:
11507  *    Sets the title of a window using a Pascal string.
11508  *
11509  *  Mac OS X threading:
11510  *    Not thread safe
11511  *
11512  *  Availability:
11513  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11514  *    CarbonLib:        in CarbonLib 1.0 and later
11515  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11516  }
11517 procedure SetWTitle( window: WindowRef; const (*var*) title: Str255 ); external name '_SetWTitle';
11518 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11519 
11520 
11521 {
11522  *  GetWTitle()   *** DEPRECATED ***
11523  *
11524  *  Deprecated:
11525  *    Use CopyWindowTitleAsCFString instead of GetWTitle.
11526  *
11527  *  Summary:
11528  *    Retrieves the title of a window as a Pascal string.
11529  *
11530  *  Mac OS X threading:
11531  *    Not thread safe
11532  *
11533  *  Availability:
11534  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11535  *    CarbonLib:        in CarbonLib 1.0 and later
11536  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11537  }
11538 procedure GetWTitle( window: WindowRef; var title: Str255 ); external name '_GetWTitle';
11539 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11540 
11541 
11542 {
11543  *  DrawGrowIcon()   *** DEPRECATED ***
11544  *
11545  *  Deprecated:
11546  *    DrawGrowIcon is deprecated from Mac OS 8.0 forward. Theme-savvy
11547  *    window defprocs automatically draw the grow box in the window
11548  *    frame.
11549  *
11550  *  Summary:
11551  *    Draws the grow icon in a window.
11552  *
11553  *  Mac OS X threading:
11554  *    Not thread safe
11555  *
11556  *  Availability:
11557  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11558  *    CarbonLib:        in CarbonLib 1.0 and later
11559  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11560  }
11561 procedure DrawGrowIcon( window: WindowRef ); external name '_DrawGrowIcon';
11562 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11563 
11564 
11565 {
11566  *  GrowWindow()   *** DEPRECATED ***
11567  *
11568  *  Deprecated:
11569  *    Use ResizeWindow instead of GrowWindow.
11570  *
11571  *  Summary:
11572  *    Tracks the mouse while the user resizes a window, and returns the
11573  *    new width and height.
11574  *
11575  *  Mac OS X threading:
11576  *    Not thread safe
11577  *
11578  *  Availability:
11579  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11580  *    CarbonLib:        in CarbonLib 1.0 and later
11581  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11582  }
GrowWindownull11583 function GrowWindow( window: WindowRef; startPt: Point; {const} bBox: RectPtr { can be NULL } ): SIGNEDLONG; external name '_GrowWindow';
11584 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11585 
11586 
11587 {
11588  *  GetGrayRgn()   *** DEPRECATED ***
11589  *
11590  *  Deprecated:
11591  *    To determine the area in which a window may be positioned, use
11592  *    HIWindowCopyAvailablePositioningShape.
11593  *
11594  *  Summary:
11595  *    Returns a region that covers the desktop area of all active
11596  *    displays.
11597  *
11598  *  Mac OS X threading:
11599  *    Not thread safe
11600  *
11601  *  Availability:
11602  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11603  *    CarbonLib:        in CarbonLib 1.0 and later
11604  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11605  }
GetGrayRgnnull11606 function GetGrayRgn: RgnHandle; external name '_GetGrayRgn';
11607 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11608 
11609 
11610 {
11611  *  DragGrayRgn()   *** DEPRECATED ***
11612  *
11613  *  Deprecated:
11614  *    Use a overlay window or other custom drawing instead of
11615  *    DragGrayRgn.
11616  *
11617  *  Summary:
11618  *    Tracks the mouse as the user drags a gray outline of a region.
11619  *
11620  *  Mac OS X threading:
11621  *    Not thread safe
11622  *
11623  *  Availability:
11624  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11625  *    CarbonLib:        in CarbonLib 1.0 and later
11626  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11627  }
DragGrayRgnnull11628 function DragGrayRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SIGNEDLONG; external name '_DragGrayRgn';
11629 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11630 
11631 
11632 {
11633  *  DragTheRgn()   *** DEPRECATED ***
11634  *
11635  *  Deprecated:
11636  *    Use a overlay window or other custom drawing instead of
11637  *    DragTheRgn.
11638  *
11639  *  Summary:
11640  *    Tracks the mouse as the user drags the outline of a region. The
11641  *    outline is drawn using the pattern specified in the DragPattern
11642  *    low-memory global.
11643  *
11644  *  Mac OS X threading:
11645  *    Not thread safe
11646  *
11647  *  Availability:
11648  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
11649  *    CarbonLib:        in CarbonLib 1.0 and later
11650  *    Non-Carbon CFM:   in InterfaceLib 7.1 and later
11651  }
DragTheRgnnull11652 function DragTheRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SIGNEDLONG; external name '_DragTheRgn';
11653 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
11654 
11655 
11656 {��������������������������������������������������������������������������������������������������}
11657 { Obsolete symbolic names                                                                          }
11658 {��������������������������������������������������������������������������������������������������}
11659 {$endc} {not TARGET_CPU_64}
11660 
11661 const
11662 	kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer;
11663 	kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether;
11664 	kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether;
11665 
11666 
11667 {$endc} {TARGET_OS_MAC}
11668 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
11669 
11670 end.
11671 {$endc} {not MACOSALLINCLUDE}
11672