Mac OS 9
Appearance.h
Go to the documentation of this file.
1 
19 #ifndef __APPEARANCE__
20 #define __APPEARANCE__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __QUICKDRAW__
27 #include <Quickdraw.h>
28 #endif
29 
30 #ifndef __TEXTEDIT__
31 #include <TextEdit.h>
32 #endif
33 
34 #ifndef __QDOFFSCREEN__
35 #include <QDOffscreen.h>
36 #endif
37 
38 #ifndef __MACWINDOWS__
39 #include <MacWindows.h>
40 #endif
41 
42 #ifndef __CONTROLS__
43 #include <Controls.h>
44 #endif
45 
46 #ifndef __MACERRORS__
47 #include <MacErrors.h>
48 #endif
49 
50 #ifndef __TEXTUTILS__
51 #include <TextUtils.h>
52 #endif
53 
54 #ifndef __CFSTRING__
55 #include <CFString.h>
56 #endif
57 
58 /*����������������������������������������������������������������������������������*/
59 /* Appearance Manager constants, etc. */
60 /*����������������������������������������������������������������������������������*/
61 /* Appearance Manager Apple Events (1.1 and later) */
62 
63 #if PRAGMA_ONCE
64 #pragma once
65 #endif
66 
67 #ifdef __cplusplus
68 extern "C"
69 {
70 #endif
71 
72 #if PRAGMA_IMPORT
73 #pragma import on
74 #endif
75 
76 #if PRAGMA_STRUCT_ALIGN
77 #pragma options align = mac68k
78 #elif PRAGMA_STRUCT_PACKPUSH
79 #pragma pack(push, 2)
80 #elif PRAGMA_STRUCT_PACK
81 #pragma pack(2)
82 #endif
83 
84  enum
85  {
86  kAppearanceEventClass = FOUR_CHAR_CODE('appr'), /* Event Class */
87  kAEAppearanceChanged = FOUR_CHAR_CODE(
88  'thme'), /* Appearance changed (e.g. platinum to hi-tech) */
89  kAESystemFontChanged = FOUR_CHAR_CODE('sysf'), /* system font changed */
90  kAESmallSystemFontChanged =
91  FOUR_CHAR_CODE('ssfn'), /* small system font changed */
92  kAEViewsFontChanged = FOUR_CHAR_CODE('vfnt') /* views font changed */
93  };
94 
95  /*����������������������������������������������������������������������������������*/
96  /* Appearance Manager file types */
97  /*����������������������������������������������������������������������������������*/
98  enum
99  {
100  kThemeDataFileType = FOUR_CHAR_CODE('thme'), /* file type for theme files */
101  kThemePlatinumFileType =
102  FOUR_CHAR_CODE('pltn'), /* file type for platinum appearance */
103  kThemeCustomThemesFileType =
104  FOUR_CHAR_CODE('scen'), /* file type for user themes */
105  kThemeSoundTrackFileType = FOUR_CHAR_CODE('tsnd')
106  };
107 
108  /*����������������������������������������������������������������������������������*/
109  /* Appearance Manager Supported Themes */
110  /* Use CopyThemeIdentifier to get the current theme ID */
111  /*����������������������������������������������������������������������������������*/
112 
113 #define kThemeAppearancePlatinum CFSTR("com.apple.theme.appearance.platinum")
114 #define kThemeAppearanceAqua CFSTR("com.apple.theme.appearance.aqua")
115 #define kThemeAppearanceAquaBlue CFSTR("com.apple.theme.appearance.aqua.blue")
116 #define kThemeAppearanceAquaGraphite \
117  CFSTR("com.apple.theme.appearance.aqua.graphite")
118 
119  enum
120  {
121  kThemeBrushDialogBackgroundActive = 1, /* Dialogs */
122  kThemeBrushDialogBackgroundInactive = 2, /* Dialogs */
123  kThemeBrushAlertBackgroundActive = 3,
124  kThemeBrushAlertBackgroundInactive = 4,
125  kThemeBrushModelessDialogBackgroundActive = 5,
126  kThemeBrushModelessDialogBackgroundInactive = 6,
127  kThemeBrushUtilityWindowBackgroundActive = 7, /* Miscellaneous */
128  kThemeBrushUtilityWindowBackgroundInactive = 8, /* Miscellaneous */
129  kThemeBrushListViewSortColumnBackground = 9, /* Finder */
130  kThemeBrushListViewBackground = 10,
131  kThemeBrushIconLabelBackground = 11,
132  kThemeBrushListViewSeparator = 12,
133  kThemeBrushChasingArrows = 13,
134  kThemeBrushDragHilite = 14,
135  kThemeBrushDocumentWindowBackground = 15,
136  kThemeBrushFinderWindowBackground = 16
137  };
138 
139  /* Brushes available in Appearance 1.1 or later */
140  enum
141  {
142  kThemeBrushScrollBarDelimiterActive = 17,
143  kThemeBrushScrollBarDelimiterInactive = 18,
144  kThemeBrushFocusHighlight = 19,
145  kThemeBrushPopupArrowActive = 20,
146  kThemeBrushPopupArrowPressed = 21,
147  kThemeBrushPopupArrowInactive = 22,
148  kThemeBrushAppleGuideCoachmark = 23,
149  kThemeBrushIconLabelBackgroundSelected = 24,
150  kThemeBrushStaticAreaFill = 25,
151  kThemeBrushActiveAreaFill = 26,
152  kThemeBrushButtonFrameActive = 27,
153  kThemeBrushButtonFrameInactive = 28,
154  kThemeBrushButtonFaceActive = 29,
155  kThemeBrushButtonFaceInactive = 30,
156  kThemeBrushButtonFacePressed = 31,
157  kThemeBrushButtonActiveDarkShadow = 32,
158  kThemeBrushButtonActiveDarkHighlight = 33,
159  kThemeBrushButtonActiveLightShadow = 34,
160  kThemeBrushButtonActiveLightHighlight = 35,
161  kThemeBrushButtonInactiveDarkShadow = 36,
162  kThemeBrushButtonInactiveDarkHighlight = 37,
163  kThemeBrushButtonInactiveLightShadow = 38,
164  kThemeBrushButtonInactiveLightHighlight = 39,
165  kThemeBrushButtonPressedDarkShadow = 40,
166  kThemeBrushButtonPressedDarkHighlight = 41,
167  kThemeBrushButtonPressedLightShadow = 42,
168  kThemeBrushButtonPressedLightHighlight = 43,
169  kThemeBrushBevelActiveLight = 44,
170  kThemeBrushBevelActiveDark = 45,
171  kThemeBrushBevelInactiveLight = 46,
172  kThemeBrushBevelInactiveDark = 47
173  };
174 
175  /* Brushes available in Appearance 1.1.1 or later */
176  enum
177  {
178  kThemeBrushNotificationWindowBackground = 48
179  };
180 
181  /* Brushes available in Appearance X or later */
182  enum
183  {
184  kThemeBrushMovableModalBackground = 49,
185  kThemeBrushSheetBackgroundOpaque = 50,
186  kThemeBrushDrawerBackground = 51,
187  kThemeBrushToolbarBackground = 52,
188  kThemeBrushSheetBackgroundTransparent = 53
189  };
190 
191  /* Appearance X or later theme brush compatibility synonyms */
192  enum
193  {
194  kThemeBrushSheetBackground = kThemeBrushSheetBackgroundOpaque
195  };
196 
197  /* These values are meta-brushes, specific colors that do not */
198  /* change from theme to theme. You can use them instead of using */
199  /* direct RGB values. */
200  enum
201  {
202  kThemeBrushBlack = -1,
203  kThemeBrushWhite = -2
204  };
205 
206  typedef SInt16 ThemeBrush;
207  enum
208  {
209  kThemeTextColorDialogActive = 1,
210  kThemeTextColorDialogInactive = 2,
211  kThemeTextColorAlertActive = 3,
212  kThemeTextColorAlertInactive = 4,
213  kThemeTextColorModelessDialogActive = 5,
214  kThemeTextColorModelessDialogInactive = 6,
215  kThemeTextColorWindowHeaderActive = 7,
216  kThemeTextColorWindowHeaderInactive = 8,
217  kThemeTextColorPlacardActive = 9,
218  kThemeTextColorPlacardInactive = 10,
219  kThemeTextColorPlacardPressed = 11,
220  kThemeTextColorPushButtonActive = 12,
221  kThemeTextColorPushButtonInactive = 13,
222  kThemeTextColorPushButtonPressed = 14,
223  kThemeTextColorBevelButtonActive = 15,
224  kThemeTextColorBevelButtonInactive = 16,
225  kThemeTextColorBevelButtonPressed = 17,
226  kThemeTextColorPopupButtonActive = 18,
227  kThemeTextColorPopupButtonInactive = 19,
228  kThemeTextColorPopupButtonPressed = 20,
229  kThemeTextColorIconLabel = 21,
230  kThemeTextColorListView = 22
231  };
232 
233  /* Text Colors available in Appearance 1.0.1 or later */
234  enum
235  {
236  kThemeTextColorDocumentWindowTitleActive = 23,
237  kThemeTextColorDocumentWindowTitleInactive = 24,
238  kThemeTextColorMovableModalWindowTitleActive = 25,
239  kThemeTextColorMovableModalWindowTitleInactive = 26,
240  kThemeTextColorUtilityWindowTitleActive = 27,
241  kThemeTextColorUtilityWindowTitleInactive = 28,
242  kThemeTextColorPopupWindowTitleActive = 29,
243  kThemeTextColorPopupWindowTitleInactive = 30,
244  kThemeTextColorRootMenuActive = 31,
245  kThemeTextColorRootMenuSelected = 32,
246  kThemeTextColorRootMenuDisabled = 33,
247  kThemeTextColorMenuItemActive = 34,
248  kThemeTextColorMenuItemSelected = 35,
249  kThemeTextColorMenuItemDisabled = 36,
250  kThemeTextColorPopupLabelActive = 37,
251  kThemeTextColorPopupLabelInactive = 38
252  };
253 
254  /* Text colors available in Appearance 1.1 or later */
255  enum
256  {
257  kThemeTextColorTabFrontActive = 39,
258  kThemeTextColorTabNonFrontActive = 40,
259  kThemeTextColorTabNonFrontPressed = 41,
260  kThemeTextColorTabFrontInactive = 42,
261  kThemeTextColorTabNonFrontInactive = 43,
262  kThemeTextColorIconLabelSelected = 44,
263  kThemeTextColorBevelButtonStickyActive = 45,
264  kThemeTextColorBevelButtonStickyInactive = 46
265  };
266 
267  /* Text colors available in Appearance 1.1.1 or later */
268  enum
269  {
270  kThemeTextColorNotification = 47
271  };
272 
273  /* These values are specific colors that do not change from */
274  /* theme to theme. You can use them instead of using direct RGB values. */
275  enum
276  {
277  kThemeTextColorBlack = -1,
278  kThemeTextColorWhite = -2
279  };
280 
281  typedef SInt16 ThemeTextColor;
282  /* States to draw primitives: disabled, active, and pressed (hilited) */
283  enum
284  {
285  kThemeStateInactive = 0,
286  kThemeStateActive = 1,
287  kThemeStatePressed = 2,
288  kThemeStateRollover = 6,
289  kThemeStateUnavailable = 7,
290  kThemeStateUnavailableInactive = 8
291  };
292 
293  /* obsolete name */
294  enum
295  {
296  kThemeStateDisabled = 0
297  };
298 
299  enum
300  {
301  kThemeStatePressedUp =
302  2, /* draw with up pressed (increment/decrement buttons) */
303  kThemeStatePressedDown =
304  3 /* draw with down pressed (increment/decrement buttons) */
305  };
306 
307  typedef UInt32 ThemeDrawState;
308  /*����������������������������������������������������������������������������������*/
309  /* Theme cursor selectors available in Appearance 1.1 or later */
310  /*����������������������������������������������������������������������������������*/
311  enum
312  {
313  kThemeArrowCursor = 0,
314  kThemeCopyArrowCursor = 1,
315  kThemeAliasArrowCursor = 2,
316  kThemeContextualMenuArrowCursor = 3,
317  kThemeIBeamCursor = 4,
318  kThemeCrossCursor = 5,
319  kThemePlusCursor = 6,
320  kThemeWatchCursor = 7, /* Can Animate */
321  kThemeClosedHandCursor = 8,
322  kThemeOpenHandCursor = 9,
323  kThemePointingHandCursor = 10,
324  kThemeCountingUpHandCursor = 11, /* Can Animate */
325  kThemeCountingDownHandCursor = 12, /* Can Animate */
326  kThemeCountingUpAndDownHandCursor = 13, /* Can Animate */
327  kThemeSpinningCursor = 14, /* Can Animate */
328  kThemeResizeLeftCursor = 15,
329  kThemeResizeRightCursor = 16,
330  kThemeResizeLeftRightCursor = 17
331  };
332 
333  typedef UInt32 ThemeCursor;
334  /*����������������������������������������������������������������������������������*/
335  /* Theme menu bar drawing states */
336  /*����������������������������������������������������������������������������������*/
337  enum
338  {
339  kThemeMenuBarNormal = 0,
340  kThemeMenuBarSelected = 1
341  };
342 
343  typedef UInt16 ThemeMenuBarState;
344  /* attributes */
345  enum
346  {
347  kThemeMenuSquareMenuBar = (1 << 0)
348  };
349 
350  /*����������������������������������������������������������������������������������*/
351  /* Theme menu drawing states */
352  /*����������������������������������������������������������������������������������*/
353  enum
354  {
355  kThemeMenuActive = 0,
356  kThemeMenuSelected = 1,
357  kThemeMenuDisabled = 3
358  };
359 
360  typedef UInt16 ThemeMenuState;
361  /*������������������������������������������������������������������������������������������*/
362  /* MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground
363  * if entire */
364  /* menu is inactive */
365  /*������������������������������������������������������������������������������������������*/
366  enum
367  {
368  kThemeMenuTypePullDown = 0,
369  kThemeMenuTypePopUp = 1,
370  kThemeMenuTypeHierarchical = 2,
371  kThemeMenuTypeInactive = 0x0100
372  };
373 
374  typedef UInt16 ThemeMenuType;
375  enum
376  {
377  kThemeMenuItemPlain = 0,
378  kThemeMenuItemHierarchical = 1, /* item has hierarchical arrow*/
379  kThemeMenuItemScrollUpArrow =
380  2, /* for scrollable menus, indicates item is scroller*/
381  kThemeMenuItemScrollDownArrow = 3,
382  kThemeMenuItemAtTop =
383  0x0100, /* indicates item is being drawn at top of menu*/
384  kThemeMenuItemAtBottom =
385  0x0200, /* indicates item is being drawn at bottom of menu*/
386  kThemeMenuItemHierBackground = 0x0400, /* item is within a hierarchical menu*/
387  kThemeMenuItemPopUpBackground = 0x0800, /* item is within a popped up menu*/
388  kThemeMenuItemHasIcon = 0x8000, /* add into non-arrow type when icon present*/
389  kThemeMenuItemNoBackground = 0x4000 /* don't draw the menu background while
390  drawing this item (Mac OS X only)*/
391  };
392 
393  typedef UInt16 ThemeMenuItemType;
394  /*������������������������������������������������������������������������������������������*/
395  /* Theme Backgrounds */
396  /*������������������������������������������������������������������������������������������*/
397  enum
398  {
399  kThemeBackgroundTabPane = 1,
400  kThemeBackgroundPlacard = 2,
401  kThemeBackgroundWindowHeader = 3,
402  kThemeBackgroundListViewWindowHeader = 4,
403  kThemeBackgroundSecondaryGroupBox = 5
404  };
405 
406  typedef UInt32 ThemeBackgroundKind;
407  /*������������������������������������������������������������������������������������������*/
408  /* Theme Collection tags for Get/SetTheme */
409  /* */
410  /* X ALERT: Please note that Get/SetTheme are severely neutered under Mac OS X
411  * at present. */
412  /* The first group of tags below are available to get under both 9 and
413  * X. The */
414  /* second group is 9 only. None of the tags can be used in SetTheme on
415  * X, as it */
416  /* is completely inert on X, and will return unimpErr. */
417  /*������������������������������������������������������������������������������������������*/
418  enum
419  {
420  kThemeNameTag = FOUR_CHAR_CODE('name'), /* Str255*/
421  kThemeVariantNameTag = FOUR_CHAR_CODE('varn'), /* Str255*/
422  kThemeVariantBaseTintTag =
423  FOUR_CHAR_CODE('tint'), /* RGBColor (10.1 and later)*/
424  kThemeHighlightColorTag = FOUR_CHAR_CODE('hcol'), /* RGBColor*/
425  kThemeScrollBarArrowStyleTag =
426  FOUR_CHAR_CODE('sbar'), /* ThemeScrollBarArrowStyle*/
427  kThemeScrollBarThumbStyleTag =
428  FOUR_CHAR_CODE('sbth'), /* ThemeScrollBarThumbStyle*/
429  kThemeSoundsEnabledTag = FOUR_CHAR_CODE('snds'), /* Boolean*/
430  kThemeDblClickCollapseTag = FOUR_CHAR_CODE('coll') /* Boolean*/
431  };
432 
433  enum
434  {
435  kThemeAppearanceFileNameTag = FOUR_CHAR_CODE('thme'), /* Str255*/
436  kThemeSystemFontTag = FOUR_CHAR_CODE('lgsf'), /* Str255*/
437  kThemeSmallSystemFontTag = FOUR_CHAR_CODE('smsf'), /* Str255*/
438  kThemeViewsFontTag = FOUR_CHAR_CODE('vfnt'), /* Str255*/
439  kThemeViewsFontSizeTag = FOUR_CHAR_CODE('vfsz'), /* SInt16*/
440  kThemeDesktopPatternNameTag = FOUR_CHAR_CODE('patn'), /* Str255*/
441  kThemeDesktopPatternTag =
442  FOUR_CHAR_CODE('patt'), /* <variable-length data> (flattened pattern)*/
443  kThemeDesktopPictureNameTag = FOUR_CHAR_CODE('dpnm'), /* Str255*/
444  kThemeDesktopPictureAliasTag = FOUR_CHAR_CODE('dpal'), /* <alias handle>*/
445  kThemeDesktopPictureAlignmentTag =
446  FOUR_CHAR_CODE('dpan'), /* UInt32 (see the Picture Alignments below)*/
447  kThemeHighlightColorNameTag = FOUR_CHAR_CODE('hcnm'), /* Str255*/
448  kThemeExamplePictureIDTag = FOUR_CHAR_CODE('epic'), /* SInt16*/
449  kThemeSoundTrackNameTag = FOUR_CHAR_CODE('sndt'), /* Str255*/
450  kThemeSoundMaskTag = FOUR_CHAR_CODE('smsk'), /* UInt32*/
451  kThemeUserDefinedTag =
452  FOUR_CHAR_CODE('user'), /* Boolean (this should _always_ be true if
453  present - used by Control Panel).*/
454  kThemeSmoothFontEnabledTag = FOUR_CHAR_CODE('smoo'), /* Boolean*/
455  kThemeSmoothFontMinSizeTag =
456  FOUR_CHAR_CODE('smos') /* UInt16 (must be >= 12 and <= 24)*/
457  };
458 
459  /* Picture Aligmnents that might be reported in the data for
460  * kThemeDesktopPictureAlignmentTag*/
461  enum
462  {
463  kTiledOnScreen = 1, /* draws picture repeatedly*/
464  kCenterOnScreen = 2, /* "actual size", shows pattern on sides or clips picture
465  if necessary*/
466  kFitToScreen = 3, /* shrinks if necessary*/
467  kFillScreen = 4, /* messes up aspect ratio if necessary*/
468  kUseBestGuess = 5 /* heuristically determines the best way to display the
469  picture based on picture and monitor sizes*/
470  };
471 
472  /*������������������������������������������������������������������������������������������*/
473  /* Theme Control Settings */
474  /*������������������������������������������������������������������������������������������*/
475  enum
476  {
477  kThemeCheckBoxClassicX = 0, /* check box with an 'X'*/
478  kThemeCheckBoxCheckMark = 1 /* check box with a real check mark*/
479  };
480 
481  typedef UInt16 ThemeCheckBoxStyle;
482  enum
483  {
484  kThemeScrollBarArrowsSingle = 0, /* single arrow on each end*/
485  kThemeScrollBarArrowsLowerRight = 1 /* double arrows only on right or bottom*/
486  };
487 
488  typedef UInt16 ThemeScrollBarArrowStyle;
489  enum
490  {
491  kThemeScrollBarThumbNormal = 0, /* normal, classic thumb size*/
492  kThemeScrollBarThumbProportional = 1 /* proportional thumbs*/
493  };
494 
495  typedef UInt16 ThemeScrollBarThumbStyle;
496  /*������������������������������������������������������������������������������������������*/
497  /* Font constants */
498  /*������������������������������������������������������������������������������������������*/
499 
512  enum
513  {
514 
523 
530 
537 
542  kThemeViewsFont = 3, /* The following ID's are only available with MacOS X or
543  CarbonLib 1.3 and later*/
544 
552 
560 
568 
574 
580 
586 
592 
598 
604 
610 
616 
640  };
641 
642  typedef UInt16 ThemeFontID;
643  /*������������������������������������������������������������������������������������������*/
644  /* Tab constants */
645  /*������������������������������������������������������������������������������������������*/
646  enum
647  {
648  kThemeTabNonFront = 0,
649  kThemeTabNonFrontPressed = 1,
650  kThemeTabNonFrontInactive = 2,
651  kThemeTabFront = 3,
652  kThemeTabFrontInactive = 4,
653  kThemeTabNonFrontUnavailable = 5,
654  kThemeTabFrontUnavailable = 6
655  };
656 
657  typedef UInt16 ThemeTabStyle;
658  enum
659  {
660  kThemeTabNorth = 0,
661  kThemeTabSouth = 1,
662  kThemeTabEast = 2,
663  kThemeTabWest = 3
664  };
665 
666  typedef UInt16 ThemeTabDirection;
667  /* NOTE ON TAB HEIGHT */
668  /* Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating
669  * the rects */
670  /* to draw tabs into. This height includes the tab frame overlap. Tabs that are
671  * not in the */
672  /* front are only drawn down to where they meet the frame, as if the height was
673  * just */
674  /* kThemeLargeTabHeight, for example, as opposed to the ...Max constant.
675  * Remember that for */
676  /* East and West tabs, the height referred to below is actually the width. */
677  enum
678  {
679  kThemeSmallTabHeight = 16, /* amount small tabs protrude from frame.*/
680  kThemeLargeTabHeight = 21, /* amount large tabs protrude from frame.*/
681  kThemeTabPaneOverlap = 3, /* amount tabs overlap frame.*/
682  kThemeSmallTabHeightMax = 19, /* small tab height + overlap*/
683  kThemeLargeTabHeightMax = 24 /* large tab height + overlap*/
684  };
685 
686  /*������������������������������������������������������������������������������������������*/
687  /* Track kinds */
688  /*������������������������������������������������������������������������������������������*/
689  enum
690  {
691  kThemeMediumScrollBar = 0,
692  kThemeSmallScrollBar = 1,
693  kThemeMediumSlider = 2,
694  kThemeMediumProgressBar = 3,
695  kThemeMediumIndeterminateBar = 4,
696  kThemeRelevanceBar = 5,
697  kThemeSmallSlider = 6,
698  kThemeLargeProgressBar = 7,
699  kThemeLargeIndeterminateBar = 8
700  };
701 
702  typedef UInt16 ThemeTrackKind;
703  /*������������������������������������������������������������������������������������������*/
704  /* Track enable states */
705  /*������������������������������������������������������������������������������������������*/
706  enum
707  {
708  /* track states */
709  kThemeTrackActive = 0,
710  kThemeTrackDisabled = 1,
711  kThemeTrackNothingToScroll = 2,
712  kThemeTrackInactive = 3
713  };
714 
715  typedef UInt8 ThemeTrackEnableState;
716  /*������������������������������������������������������������������������������������������*/
717  /* Track pressed states */
718  /*������������������������������������������������������������������������������������������*/
719  enum
720  {
721  /* press states (ignored unless track is active) */
722  kThemeLeftOutsideArrowPressed = 0x01,
723  kThemeLeftInsideArrowPressed = 0x02,
724  kThemeLeftTrackPressed = 0x04,
725  kThemeThumbPressed = 0x08,
726  kThemeRightTrackPressed = 0x10,
727  kThemeRightInsideArrowPressed = 0x20,
728  kThemeRightOutsideArrowPressed = 0x40,
729  kThemeTopOutsideArrowPressed = kThemeLeftOutsideArrowPressed,
730  kThemeTopInsideArrowPressed = kThemeLeftInsideArrowPressed,
731  kThemeTopTrackPressed = kThemeLeftTrackPressed,
732  kThemeBottomTrackPressed = kThemeRightTrackPressed,
733  kThemeBottomInsideArrowPressed = kThemeRightInsideArrowPressed,
734  kThemeBottomOutsideArrowPressed = kThemeRightOutsideArrowPressed
735  };
736 
737  typedef UInt8 ThemeTrackPressState;
738  /*������������������������������������������������������������������������������������������*/
739  /* Thumb directions */
740  /*������������������������������������������������������������������������������������������*/
741  enum
742  {
743  /* thumb direction */
744  kThemeThumbPlain = 0,
745  kThemeThumbUpward = 1,
746  kThemeThumbDownward = 2
747  };
748 
749  typedef UInt8 ThemeThumbDirection;
750  /*������������������������������������������������������������������������������������������*/
751  /* Track attributes */
752  /*������������������������������������������������������������������������������������������*/
753  enum
754  {
755  kThemeTrackHorizontal = (1 << 0), /* track is drawn horizontally*/
756  kThemeTrackRightToLeft = (1 << 1), /* track progresses from right to left*/
757  kThemeTrackShowThumb = (1 << 2), /* track's thumb should be drawn*/
758  kThemeTrackThumbRgnIsNotGhost =
759  (1
760  << 3), /* the provided thumbRgn should be drawn opaque, not as a ghost*/
761  kThemeTrackNoScrollBarArrows =
762  (1 << 4) /* the scroll bar doesn't have arrows*/
763  };
764 
765  typedef UInt16 ThemeTrackAttributes;
766  /*������������������������������������������������������������������������������������������*/
767  /* Track info block */
768  /*������������������������������������������������������������������������������������������*/
770  {
771  SInt32 viewsize; /* current view range size */
772  ThemeTrackPressState pressState; /* pressed parts state */
773  };
774  typedef struct ScrollBarTrackInfo ScrollBarTrackInfo;
776  {
777  ThemeThumbDirection thumbDir; /* thumb direction */
778  ThemeTrackPressState pressState; /* pressed parts state */
779  };
780  typedef struct SliderTrackInfo SliderTrackInfo;
782  {
783  UInt8 phase; /* phase for indeterminate progress */
784  };
785  typedef struct ProgressTrackInfo ProgressTrackInfo;
787  {
788  ThemeTrackKind kind; /* what kind of track this info is for */
789  Rect bounds; /* track basis rectangle */
790  SInt32 min; /* min track value */
791  SInt32 max; /* max track value */
792  SInt32 value; /* current thumb value */
793  UInt32 reserved;
794 
795  ThemeTrackAttributes attributes; /* various track attributes */
796  ThemeTrackEnableState enableState; /* enable state */
797  UInt8 filler1;
798 
799  union
800  {
801  ScrollBarTrackInfo scrollbar;
802  SliderTrackInfo slider;
803  ProgressTrackInfo progress;
804  } trackInfo;
805  };
806  typedef struct ThemeTrackDrawInfo ThemeTrackDrawInfo;
807  /*������������������������������������������������������������������������������������������*/
808  /* ThemeWindowAttributes */
809  /*������������������������������������������������������������������������������������������*/
810  enum
811  {
812  kThemeWindowHasGrow =
813  (1 << 0), /* can the size of the window be changed by the user? */
814  kThemeWindowHasHorizontalZoom =
815  (1 << 3), /* window can zoom only horizontally */
816  kThemeWindowHasVerticalZoom = (1 << 4), /* window can zoom only vertically */
817  kThemeWindowHasFullZoom =
818  kThemeWindowHasHorizontalZoom +
819  kThemeWindowHasVerticalZoom, /* window zooms in all directions */
820  kThemeWindowHasCloseBox = (1 << 5), /* window has a close box */
821  kThemeWindowHasCollapseBox = (1 << 6), /* window has a collapse box */
822  kThemeWindowHasTitleText = (1 << 7), /* window has a title/title icon */
823  kThemeWindowIsCollapsed = (1 << 8), /* window is in the collapsed state */
824  kThemeWindowHasDirty = (1 << 9)
825  };
826 
827  typedef UInt32 ThemeWindowAttributes;
828  /*������������������������������������������������������������������������������������������*/
829  /* Window Types Supported by the Appearance Manager */
830  /*������������������������������������������������������������������������������������������*/
831  enum
832  {
833  kThemeDocumentWindow = 0,
834  kThemeDialogWindow = 1,
835  kThemeMovableDialogWindow = 2,
836  kThemeAlertWindow = 3,
837  kThemeMovableAlertWindow = 4,
838  kThemePlainDialogWindow = 5,
839  kThemeShadowDialogWindow = 6,
840  kThemePopupWindow = 7,
841  kThemeUtilityWindow = 8,
842  kThemeUtilitySideWindow = 9,
843  kThemeSheetWindow = 10
844  };
845 
846  typedef UInt16 ThemeWindowType;
847  /*������������������������������������������������������������������������������������������*/
848  /* Window Widgets Supported by the Appearance Manager */
849  /*������������������������������������������������������������������������������������������*/
850  enum
851  {
852  kThemeWidgetCloseBox = 0,
853  kThemeWidgetZoomBox = 1,
854  kThemeWidgetCollapseBox = 2,
855  kThemeWidgetDirtyCloseBox = 6
856  };
857 
858  typedef UInt16 ThemeTitleBarWidget;
859  /*������������������������������������������������������������������������������������������*/
860  /* Popup arrow orientations */
861  /*������������������������������������������������������������������������������������������*/
862  enum
863  {
864  kThemeArrowLeft = 0,
865  kThemeArrowDown = 1,
866  kThemeArrowRight = 2,
867  kThemeArrowUp = 3
868  };
869 
870  typedef UInt16 ThemeArrowOrientation;
871  /*������������������������������������������������������������������������������������������*/
872  /* Popup arrow sizes */
873  /*������������������������������������������������������������������������������������������*/
874  enum
875  {
876  kThemeArrow3pt = 0,
877  kThemeArrow5pt = 1,
878  kThemeArrow7pt = 2,
879  kThemeArrow9pt = 3
880  };
881 
882  typedef UInt16 ThemePopupArrowSize;
883  /*������������������������������������������������������������������������������������������*/
884  /* Grow box directions */
885  /*������������������������������������������������������������������������������������������*/
886  enum
887  {
888  kThemeGrowLeft = (1 << 0), /* can grow to the left */
889  kThemeGrowRight = (1 << 1), /* can grow to the right */
890  kThemeGrowUp = (1 << 2), /* can grow up */
891  kThemeGrowDown = (1 << 3) /* can grow down */
892  };
893 
894  typedef UInt16 ThemeGrowDirection;
895  /*������������������������������������������������������������������������������������������*/
896  /* Button kinds */
897  /*������������������������������������������������������������������������������������������*/
898  enum
899  {
900  kThemePushButton = 0,
901  kThemeCheckBox = 1,
902  kThemeRadioButton = 2,
903  kThemeBevelButton = 3, /* bevel button (obsolete) */
904  kThemeArrowButton = 4, /* popup button without text (no label). See
905  ThemeButtonAdornment for glyphs. */
906  kThemePopupButton = 5, /* popup button */
907  kThemeDisclosureButton = 6,
908  kThemeIncDecButton = 7, /* increment/decrement buttons (no label) */
909  kThemeSmallBevelButton = 8, /* small-shadow bevel button */
910  kThemeMediumBevelButton = 3, /* med-shadow bevel button */
911  kThemeLargeBevelButton = 9, /* large-shadow bevel button */
912  kThemeListHeaderButton = 10, /* sort button for top of list */
913  kThemeRoundButton = 11, /* round button */
914  kThemeLargeRoundButton = 12, /* large round button */
915  kThemeSmallCheckBox = 13, /* small checkbox */
916  kThemeSmallRadioButton = 14, /* small radio button */
917  kThemeRoundedBevelButton = 15, /* rounded bevel button */
918  kThemeNormalCheckBox = kThemeCheckBox,
919  kThemeNormalRadioButton = kThemeRadioButton
920  };
921 
922  typedef UInt16 ThemeButtonKind;
923  /*������������������������������������������������������������������������������������������*/
924  /* Common button values */
925  /*������������������������������������������������������������������������������������������*/
926  enum
927  {
928  kThemeButtonOff = 0,
929  kThemeButtonOn = 1,
930  kThemeButtonMixed = 2,
931  kThemeDisclosureRight = 0,
932  kThemeDisclosureDown = 1,
933  kThemeDisclosureLeft = 2
934  };
935 
936  typedef UInt16 ThemeButtonValue;
937  /*������������������������������������������������������������������������������������������*/
938  /* Button adornment types */
939  /*������������������������������������������������������������������������������������������*/
940  enum
941  {
942  kThemeAdornmentNone = 0,
943  kThemeAdornmentDefault = (1 << 0), /* if set, draw default ornamentation ( for
944  push button and generic well ) */
945  kThemeAdornmentFocus = (1 << 2), /* if set, draw focus */
946  kThemeAdornmentRightToLeft = (1 << 4), /* if set, draw right to left label */
947  kThemeAdornmentDrawIndicatorOnly =
948  (1 << 5), /* if set, don't draw or erase label ( radio, check, disclosure
949  ) */
950  kThemeAdornmentHeaderButtonLeftNeighborSelected =
951  (1 << 6), /* if set, draw the left border of the button as selected ( list
952  header button only ) */
953  kThemeAdornmentHeaderButtonRightNeighborSelected =
954  (1 << 7), /* if set, draw the right border of the button ( list header
955  button only ) */
956  kThemeAdornmentHeaderButtonSortUp =
957  (1 << 8), /* if set, draw the sort indicator pointing upward ( list header
958  button only ) */
959  kThemeAdornmentHeaderMenuButton =
960  (1 << 9), /* if set, draw as a header menu button ( list header button
961  only ) */
962  kThemeAdornmentHeaderButtonNoShadow =
963  (1 << 10), /* if set, draw the non-shadow area of the button ( list header
964  button only ) */
965  kThemeAdornmentHeaderButtonShadowOnly =
966  (1 << 11), /* if set, draw the only the shadow area of the button ( list
967  header button only ) */
968  kThemeAdornmentNoShadow = kThemeAdornmentHeaderButtonNoShadow, /* old name */
969  kThemeAdornmentShadowOnly =
970  kThemeAdornmentHeaderButtonShadowOnly, /* old name */
971  kThemeAdornmentArrowLeftArrow =
972  (1 << 6), /* If set, draw a left arrow on the arrow button */
973  kThemeAdornmentArrowDownArrow =
974  (1 << 7), /* If set, draw a down arrow on the arrow button */
975  kThemeAdornmentArrowDoubleArrow =
976  (1 << 8), /* If set, draw a double arrow on the arrow button */
977  kThemeAdornmentArrowUpArrow =
978  (1 << 9) /* If set, draw a up arrow on the arrow button */
979  };
980 
981  typedef UInt16 ThemeButtonAdornment;
982  /*������������������������������������������������������������������������������������������*/
983  /* Button drawing info block */
984  /*������������������������������������������������������������������������������������������*/
986  {
987  ThemeDrawState state;
988  ThemeButtonValue value;
989  ThemeButtonAdornment adornment;
990  };
993  /*������������������������������������������������������������������������������������������*/
994  /* Sound Support */
995  /* */
996  /* X ALERT: Please note that none of the theme sound APIs currently function on
997  * X. */
998  /*������������������������������������������������������������������������������������������*/
999  /*������������������������������������������������������������������������������������������*/
1000  /* Sound classes */
1001  /* */
1002  /* You can use the constants below to set what sounds are active using the
1003  * SetTheme API. */
1004  /* Use these with the kThemeSoundMask tag. */
1005  /*������������������������������������������������������������������������������������������*/
1006  enum
1007  {
1008  kThemeNoSounds = 0,
1009  kThemeWindowSoundsMask = (1 << 0),
1010  kThemeMenuSoundsMask = (1 << 1),
1011  kThemeControlSoundsMask = (1 << 2),
1012  kThemeFinderSoundsMask = (1 << 3)
1013  };
1014 
1015  /*������������������������������������������������������������������������������������������*/
1016  /* Drag Sounds */
1017  /* */
1018  /* Drag sounds are looped for the duration of the drag. */
1019  /* */
1020  /* Call BeginThemeDragSound at the start of the drag. */
1021  /* Call EndThemeDragSound when the drag has finished. */
1022  /* */
1023  /* Note that in order to maintain a consistent user experience, only one drag
1024  * sound may */
1025  /* occur at a time. The sound should be attached to a mouse action, start after
1026  * the */
1027  /* mouse goes down and stop when the mouse is released. */
1028  /*������������������������������������������������������������������������������������������*/
1029  enum
1030  {
1031  kThemeDragSoundNone = 0,
1032  kThemeDragSoundMoveWindow = FOUR_CHAR_CODE('wmov'),
1033  kThemeDragSoundGrowWindow = FOUR_CHAR_CODE('wgro'),
1034  kThemeDragSoundMoveUtilWindow = FOUR_CHAR_CODE('umov'),
1035  kThemeDragSoundGrowUtilWindow = FOUR_CHAR_CODE('ugro'),
1036  kThemeDragSoundMoveDialog = FOUR_CHAR_CODE('dmov'),
1037  kThemeDragSoundMoveAlert = FOUR_CHAR_CODE('amov'),
1038  kThemeDragSoundMoveIcon = FOUR_CHAR_CODE('imov'),
1039  kThemeDragSoundSliderThumb = FOUR_CHAR_CODE('slth'),
1040  kThemeDragSoundSliderGhost = FOUR_CHAR_CODE('slgh'),
1041  kThemeDragSoundScrollBarThumb = FOUR_CHAR_CODE('sbth'),
1042  kThemeDragSoundScrollBarGhost = FOUR_CHAR_CODE('sbgh'),
1043  kThemeDragSoundScrollBarArrowDecreasing = FOUR_CHAR_CODE('sbad'),
1044  kThemeDragSoundScrollBarArrowIncreasing = FOUR_CHAR_CODE('sbai'),
1045  kThemeDragSoundDragging = FOUR_CHAR_CODE('drag')
1046  };
1047 
1048  typedef OSType ThemeDragSoundKind;
1049  /*��������������������������������������������������������������������������*/
1050  /* State-change sounds */
1051  /* */
1052  /* State-change sounds are played asynchonously as a one-shot. */
1053  /* */
1054  /* Call PlayThemeSound to play the sound. The sound will play */
1055  /* asynchronously until complete, then stop automatically. */
1056  /*��������������������������������������������������������������������������*/
1057  enum
1058  {
1059  kThemeSoundNone = 0,
1060  kThemeSoundMenuOpen = FOUR_CHAR_CODE('mnuo'), /* menu sounds */
1061  kThemeSoundMenuClose = FOUR_CHAR_CODE('mnuc'),
1062  kThemeSoundMenuItemHilite = FOUR_CHAR_CODE('mnui'),
1063  kThemeSoundMenuItemRelease = FOUR_CHAR_CODE('mnus'),
1064  kThemeSoundWindowClosePress = FOUR_CHAR_CODE('wclp'), /* window sounds */
1065  kThemeSoundWindowCloseEnter = FOUR_CHAR_CODE('wcle'),
1066  kThemeSoundWindowCloseExit = FOUR_CHAR_CODE('wclx'),
1067  kThemeSoundWindowCloseRelease = FOUR_CHAR_CODE('wclr'),
1068  kThemeSoundWindowZoomPress = FOUR_CHAR_CODE('wzmp'),
1069  kThemeSoundWindowZoomEnter = FOUR_CHAR_CODE('wzme'),
1070  kThemeSoundWindowZoomExit = FOUR_CHAR_CODE('wzmx'),
1071  kThemeSoundWindowZoomRelease = FOUR_CHAR_CODE('wzmr'),
1072  kThemeSoundWindowCollapsePress = FOUR_CHAR_CODE('wcop'),
1073  kThemeSoundWindowCollapseEnter = FOUR_CHAR_CODE('wcoe'),
1074  kThemeSoundWindowCollapseExit = FOUR_CHAR_CODE('wcox'),
1075  kThemeSoundWindowCollapseRelease = FOUR_CHAR_CODE('wcor'),
1076  kThemeSoundWindowDragBoundary = FOUR_CHAR_CODE('wdbd'),
1077  kThemeSoundUtilWinClosePress =
1078  FOUR_CHAR_CODE('uclp'), /* utility window sounds */
1079  kThemeSoundUtilWinCloseEnter = FOUR_CHAR_CODE('ucle'),
1080  kThemeSoundUtilWinCloseExit = FOUR_CHAR_CODE('uclx'),
1081  kThemeSoundUtilWinCloseRelease = FOUR_CHAR_CODE('uclr'),
1082  kThemeSoundUtilWinZoomPress = FOUR_CHAR_CODE('uzmp'),
1083  kThemeSoundUtilWinZoomEnter = FOUR_CHAR_CODE('uzme'),
1084  kThemeSoundUtilWinZoomExit = FOUR_CHAR_CODE('uzmx'),
1085  kThemeSoundUtilWinZoomRelease = FOUR_CHAR_CODE('uzmr'),
1086  kThemeSoundUtilWinCollapsePress = FOUR_CHAR_CODE('ucop'),
1087  kThemeSoundUtilWinCollapseEnter = FOUR_CHAR_CODE('ucoe'),
1088  kThemeSoundUtilWinCollapseExit = FOUR_CHAR_CODE('ucox'),
1089  kThemeSoundUtilWinCollapseRelease = FOUR_CHAR_CODE('ucor'),
1090  kThemeSoundUtilWinDragBoundary = FOUR_CHAR_CODE('udbd'),
1091  kThemeSoundWindowOpen =
1092  FOUR_CHAR_CODE('wopn'), /* window close and zoom action */
1093  kThemeSoundWindowClose = FOUR_CHAR_CODE('wcls'),
1094  kThemeSoundWindowZoomIn = FOUR_CHAR_CODE('wzmi'),
1095  kThemeSoundWindowZoomOut = FOUR_CHAR_CODE('wzmo'),
1096  kThemeSoundWindowCollapseUp = FOUR_CHAR_CODE('wcol'),
1097  kThemeSoundWindowCollapseDown = FOUR_CHAR_CODE('wexp'),
1098  kThemeSoundWindowActivate = FOUR_CHAR_CODE('wact'),
1099  kThemeSoundUtilWindowOpen = FOUR_CHAR_CODE('uopn'),
1100  kThemeSoundUtilWindowClose = FOUR_CHAR_CODE('ucls'),
1101  kThemeSoundUtilWindowZoomIn = FOUR_CHAR_CODE('uzmi'),
1102  kThemeSoundUtilWindowZoomOut = FOUR_CHAR_CODE('uzmo'),
1103  kThemeSoundUtilWindowCollapseUp = FOUR_CHAR_CODE('ucol'),
1104  kThemeSoundUtilWindowCollapseDown = FOUR_CHAR_CODE('uexp'),
1105  kThemeSoundUtilWindowActivate = FOUR_CHAR_CODE('uact'),
1106  kThemeSoundDialogOpen = FOUR_CHAR_CODE('dopn'),
1107  kThemeSoundDialogClose = FOUR_CHAR_CODE('dlgc'),
1108  kThemeSoundAlertOpen = FOUR_CHAR_CODE('aopn'),
1109  kThemeSoundAlertClose = FOUR_CHAR_CODE('altc'),
1110  kThemeSoundPopupWindowOpen = FOUR_CHAR_CODE('pwop'),
1111  kThemeSoundPopupWindowClose = FOUR_CHAR_CODE('pwcl'),
1112  kThemeSoundButtonPress = FOUR_CHAR_CODE('btnp'), /* button */
1113  kThemeSoundButtonEnter = FOUR_CHAR_CODE('btne'),
1114  kThemeSoundButtonExit = FOUR_CHAR_CODE('btnx'),
1115  kThemeSoundButtonRelease = FOUR_CHAR_CODE('btnr'),
1116  kThemeSoundDefaultButtonPress = FOUR_CHAR_CODE('dbtp'), /* default button */
1117  kThemeSoundDefaultButtonEnter = FOUR_CHAR_CODE('dbte'),
1118  kThemeSoundDefaultButtonExit = FOUR_CHAR_CODE('dbtx'),
1119  kThemeSoundDefaultButtonRelease = FOUR_CHAR_CODE('dbtr'),
1120  kThemeSoundCancelButtonPress = FOUR_CHAR_CODE('cbtp'), /* cancel button */
1121  kThemeSoundCancelButtonEnter = FOUR_CHAR_CODE('cbte'),
1122  kThemeSoundCancelButtonExit = FOUR_CHAR_CODE('cbtx'),
1123  kThemeSoundCancelButtonRelease = FOUR_CHAR_CODE('cbtr'),
1124  kThemeSoundCheckboxPress = FOUR_CHAR_CODE('chkp'), /* checkboxes */
1125  kThemeSoundCheckboxEnter = FOUR_CHAR_CODE('chke'),
1126  kThemeSoundCheckboxExit = FOUR_CHAR_CODE('chkx'),
1127  kThemeSoundCheckboxRelease = FOUR_CHAR_CODE('chkr'),
1128  kThemeSoundRadioPress = FOUR_CHAR_CODE('radp'), /* radio buttons */
1129  kThemeSoundRadioEnter = FOUR_CHAR_CODE('rade'),
1130  kThemeSoundRadioExit = FOUR_CHAR_CODE('radx'),
1131  kThemeSoundRadioRelease = FOUR_CHAR_CODE('radr'),
1132  kThemeSoundScrollArrowPress = FOUR_CHAR_CODE('sbap'), /* scroll bars */
1133  kThemeSoundScrollArrowEnter = FOUR_CHAR_CODE('sbae'),
1134  kThemeSoundScrollArrowExit = FOUR_CHAR_CODE('sbax'),
1135  kThemeSoundScrollArrowRelease = FOUR_CHAR_CODE('sbar'),
1136  kThemeSoundScrollEndOfTrack = FOUR_CHAR_CODE('sbte'),
1137  kThemeSoundScrollTrackPress = FOUR_CHAR_CODE('sbtp'),
1138  kThemeSoundSliderEndOfTrack = FOUR_CHAR_CODE('slte'), /* sliders */
1139  kThemeSoundSliderTrackPress = FOUR_CHAR_CODE('sltp'),
1140  kThemeSoundBalloonOpen = FOUR_CHAR_CODE('blno'), /* help balloons */
1141  kThemeSoundBalloonClose = FOUR_CHAR_CODE('blnc'),
1142  kThemeSoundBevelPress = FOUR_CHAR_CODE('bevp'), /* Bevel buttons */
1143  kThemeSoundBevelEnter = FOUR_CHAR_CODE('beve'),
1144  kThemeSoundBevelExit = FOUR_CHAR_CODE('bevx'),
1145  kThemeSoundBevelRelease = FOUR_CHAR_CODE('bevr'),
1146  kThemeSoundLittleArrowUpPress = FOUR_CHAR_CODE('laup'), /* Little Arrows */
1147  kThemeSoundLittleArrowDnPress = FOUR_CHAR_CODE('ladp'),
1148  kThemeSoundLittleArrowEnter = FOUR_CHAR_CODE('lare'),
1149  kThemeSoundLittleArrowExit = FOUR_CHAR_CODE('larx'),
1150  kThemeSoundLittleArrowUpRelease = FOUR_CHAR_CODE('laur'),
1151  kThemeSoundLittleArrowDnRelease = FOUR_CHAR_CODE('ladr'),
1152  kThemeSoundPopupPress = FOUR_CHAR_CODE('popp'), /* Popup Buttons */
1153  kThemeSoundPopupEnter = FOUR_CHAR_CODE('pope'),
1154  kThemeSoundPopupExit = FOUR_CHAR_CODE('popx'),
1155  kThemeSoundPopupRelease = FOUR_CHAR_CODE('popr'),
1156  kThemeSoundDisclosurePress = FOUR_CHAR_CODE('dscp'), /* Disclosure Buttons */
1157  kThemeSoundDisclosureEnter = FOUR_CHAR_CODE('dsce'),
1158  kThemeSoundDisclosureExit = FOUR_CHAR_CODE('dscx'),
1159  kThemeSoundDisclosureRelease = FOUR_CHAR_CODE('dscr'),
1160  kThemeSoundTabPressed = FOUR_CHAR_CODE('tabp'), /* Tabs */
1161  kThemeSoundTabEnter = FOUR_CHAR_CODE('tabe'),
1162  kThemeSoundTabExit = FOUR_CHAR_CODE('tabx'),
1163  kThemeSoundTabRelease = FOUR_CHAR_CODE('tabr'),
1164  kThemeSoundDragTargetHilite = FOUR_CHAR_CODE('dthi'), /* drag manager */
1165  kThemeSoundDragTargetUnhilite = FOUR_CHAR_CODE('dtuh'),
1166  kThemeSoundDragTargetDrop = FOUR_CHAR_CODE('dtdr'),
1167  kThemeSoundEmptyTrash = FOUR_CHAR_CODE('ftrs'), /* finder */
1168  kThemeSoundSelectItem = FOUR_CHAR_CODE('fsel'),
1169  kThemeSoundNewItem = FOUR_CHAR_CODE('fnew'),
1170  kThemeSoundReceiveDrop = FOUR_CHAR_CODE('fdrp'),
1171  kThemeSoundCopyDone = FOUR_CHAR_CODE('fcpd'),
1172  kThemeSoundResolveAlias = FOUR_CHAR_CODE('fral'),
1173  kThemeSoundLaunchApp = FOUR_CHAR_CODE('flap'),
1174  kThemeSoundDiskInsert = FOUR_CHAR_CODE('dski'),
1175  kThemeSoundDiskEject = FOUR_CHAR_CODE('dske'),
1176  kThemeSoundFinderDragOnIcon = FOUR_CHAR_CODE('fdon'),
1177  kThemeSoundFinderDragOffIcon = FOUR_CHAR_CODE('fdof')
1178  };
1179 
1180  typedef OSType ThemeSoundKind;
1181  /*������������������������������������������������������������������������������������������*/
1182  /* Window Metrics */
1183  /*������������������������������������������������������������������������������������������*/
1184  /* Window metrics are used by the Appearance manager to fill in the blanks
1185  * necessary to */
1186  /* draw windows. If a value is not appropriate for the type of window, be sure
1187  * to fill in */
1188  /* the slot in the structure with zero. For the popupTabOffset parameter,
1189  * you can pass a*/
1190  /* real value based on the left edge of the window. This value might be
1191  * interpreted in a */
1192  /* different manner when depending on the value of the popupTabPosition field.
1193  * The values */
1194  /* you can pass into popupTabPosition are: */
1195  /* */
1196  /* kThemePopupTabNormalPosition */
1197  /* Starts the tab left edge at the position indicated by the popupTabOffset
1198  * field. */
1199  /* */
1200  /* kThemePopupTabCenterOnWindow */
1201  /* tells us to ignore the offset field and instead simply center the width
1202  * of the */
1203  /* handle on the window. */
1204  /* */
1205  /* kThemePopupTabCenterOnOffset */
1206  /* tells us to center the width of the handle around the value passed in
1207  * offset. */
1208  /* */
1209  /* The Appearance Manager will try its best to accomodate the requested
1210  * placement, but may */
1211  /* move the handle slightly to make it fit correctly. */
1212  /* */
1213  enum
1214  {
1215  kThemePopupTabNormalPosition = 0,
1216  kThemePopupTabCenterOnWindow = 1,
1217  kThemePopupTabCenterOnOffset = 2
1218  };
1219 
1221  {
1222  UInt16 metricSize; /* should be always be sizeof( ThemeWindowMetrics )*/
1223  SInt16 titleHeight;
1224  SInt16 titleWidth;
1225  SInt16 popupTabOffset;
1226  SInt16 popupTabWidth;
1227  UInt16 popupTabPosition;
1228  };
1229  typedef struct ThemeWindowMetrics ThemeWindowMetrics;
1231  /*������������������������������������������������������������������������������������������*/
1232  /* Theme Metrics */
1233  /*������������������������������������������������������������������������������������������*/
1234 
1240  enum
1241  {
1242  kThemeMetricScrollBarWidth = 0,
1243  kThemeMetricSmallScrollBarWidth = 1,
1244  kThemeMetricCheckBoxHeight = 2,
1245  kThemeMetricRadioButtonHeight = 3,
1246  kThemeMetricEditTextWhitespace = 4,
1247  kThemeMetricEditTextFrameOutset = 5,
1248  kThemeMetricListBoxFrameOutset = 6,
1249  kThemeMetricFocusRectOutset = 7,
1250  kThemeMetricImageWellThickness = 8,
1251  kThemeMetricScrollBarOverlap = 9,
1252  kThemeMetricLargeTabHeight = 10,
1253  kThemeMetricLargeTabCapsWidth = 11,
1254  kThemeMetricTabFrameOverlap = 12,
1255  kThemeMetricTabIndentOrStyle = 13,
1256  kThemeMetricTabOverlap = 14,
1257  kThemeMetricSmallTabHeight = 15,
1258  kThemeMetricSmallTabCapsWidth = 16,
1259  kThemeMetricDisclosureButtonHeight = 17,
1260  kThemeMetricRoundButtonSize = 18,
1261  kThemeMetricPushButtonHeight = 19,
1262  kThemeMetricListHeaderHeight = 20,
1263  kThemeMetricSmallCheckBoxHeight = 21,
1264  kThemeMetricDisclosureButtonWidth = 22,
1265  kThemeMetricSmallDisclosureButtonHeight = 23,
1266  kThemeMetricSmallDisclosureButtonWidth = 24,
1267  kThemeMetricDisclosureTriangleHeight = 25,
1268  kThemeMetricDisclosureTriangleWidth = 26,
1269  kThemeMetricLittleArrowsHeight = 27,
1270  kThemeMetricLittleArrowsWidth = 28,
1271  kThemeMetricPaneSplitterHeight = 29,
1272  kThemeMetricPopupButtonHeight = 30,
1273  kThemeMetricSmallPopupButtonHeight = 31,
1274  kThemeMetricLargeProgressBarThickness = 32,
1275  kThemeMetricPullDownHeight = 33,
1276  kThemeMetricSmallPullDownHeight = 34,
1277  kThemeMetricSmallPushButtonHeight = 35,
1278  kThemeMetricSmallRadioButtonHeight = 36,
1279  kThemeMetricRelevanceIndicatorHeight = 37,
1280  kThemeMetricResizeControlHeight = 38,
1281  kThemeMetricSmallResizeControlHeight = 39,
1282  kThemeMetricLargeRoundButtonSize = 40,
1283  kThemeMetricHSliderHeight = 41,
1284  kThemeMetricHSliderTickHeight = 42,
1285  kThemeMetricSmallHSliderHeight = 43,
1286  kThemeMetricSmallHSliderTickHeight = 44,
1287  kThemeMetricVSliderWidth = 45,
1288  kThemeMetricVSliderTickWidth = 46,
1289  kThemeMetricSmallVSliderWidth = 47,
1290  kThemeMetricSmallVSliderTickWidth = 48,
1291  kThemeMetricTitleBarControlsHeight = 49,
1292  kThemeMetricCheckBoxWidth = 50,
1293  kThemeMetricSmallCheckBoxWidth = 51,
1294  kThemeMetricRadioButtonWidth = 52,
1295  kThemeMetricSmallRadioButtonWidth = 53,
1296  kThemeMetricSmallHSliderMinThumbWidth = 54,
1297  kThemeMetricSmallVSliderMinThumbHeight = 55,
1298  kThemeMetricSmallHSliderTickOffset = 56,
1299  kThemeMetricSmallVSliderTickOffset = 57,
1300  kThemeMetricNormalProgressBarThickness = 58,
1301  kThemeMetricProgressBarShadowOutset = 59,
1302  kThemeMetricSmallProgressBarShadowOutset = 60,
1303  kThemeMetricPrimaryGroupBoxContentInset = 61,
1304  kThemeMetricSecondaryGroupBoxContentInset = 62,
1305 
1317  kThemeMetricMenuExcludedMarkColumnWidth = 64,
1318  kThemeMetricMenuMarkIndent = 65,
1319  kThemeMetricMenuTextLeadingEdgeMargin = 66,
1320  kThemeMetricMenuTextTrailingEdgeMargin = 67,
1321  kThemeMetricMenuIndentWidth = 68,
1322  kThemeMetricMenuIconTrailingEdgeMargin = 69
1323  };
1324 
1325  typedef UInt32 ThemeMetric;
1326  /*������������������������������������������������������������������������������������������*/
1327  /* Drawing State */
1328  /*������������������������������������������������������������������������������������������*/
1329  typedef struct OpaqueThemeDrawingState *ThemeDrawingState;
1330  /*������������������������������������������������������������������������������������������*/
1331  /* Callback procs */
1332  /*������������������������������������������������������������������������������������������*/
1333  typedef CALLBACK_API(void, ThemeTabTitleDrawProcPtr)(
1334  const Rect *bounds, ThemeTabStyle style, ThemeTabDirection direction,
1335  SInt16 depth, Boolean isColorDev, UInt32 userData);
1336  typedef CALLBACK_API(void, ThemeEraseProcPtr)(const Rect *bounds,
1337  UInt32 eraseData, SInt16 depth,
1338  Boolean isColorDev);
1339  typedef CALLBACK_API(void, ThemeButtonDrawProcPtr)(
1340  const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info,
1341  UInt32 userData, SInt16 depth, Boolean isColorDev);
1342  typedef CALLBACK_API(void, WindowTitleDrawingProcPtr)(const Rect *bounds,
1343  SInt16 depth,
1344  Boolean colorDevice,
1345  UInt32 userData);
1346  typedef CALLBACK_API(Boolean, ThemeIteratorProcPtr)(ConstStr255Param inFileName,
1347  SInt16 resID,
1348  Collection inThemeSettings,
1349  void *inUserData);
1350  typedef STACK_UPP_TYPE(ThemeTabTitleDrawProcPtr) ThemeTabTitleDrawUPP;
1351  typedef STACK_UPP_TYPE(ThemeEraseProcPtr) ThemeEraseUPP;
1352  typedef STACK_UPP_TYPE(ThemeButtonDrawProcPtr) ThemeButtonDrawUPP;
1353  typedef STACK_UPP_TYPE(WindowTitleDrawingProcPtr) WindowTitleDrawingUPP;
1354  typedef STACK_UPP_TYPE(ThemeIteratorProcPtr) ThemeIteratorUPP;
1363  ThemeTabTitleDrawUPP
1364  NewThemeTabTitleDrawUPP(ThemeTabTitleDrawProcPtr userRoutine);
1365 #if !OPAQUE_UPP_TYPES
1366  enum
1367  {
1368  uppThemeTabTitleDrawProcInfo = 0x00036AC0
1369  }; /* pascal no_return_value Func(4_bytes, 2_bytes, 2_bytes, 2_bytes, 1_byte,
1370  4_bytes) */
1371 #ifdef __cplusplus
1372  inline ThemeTabTitleDrawUPP
1373  NewThemeTabTitleDrawUPP(ThemeTabTitleDrawProcPtr userRoutine)
1374  {
1375  return (ThemeTabTitleDrawUPP)NewRoutineDescriptor(
1376  (ProcPtr)(userRoutine), uppThemeTabTitleDrawProcInfo,
1377  GetCurrentArchitecture());
1378  }
1379 #else
1380 #define NewThemeTabTitleDrawUPP(userRoutine) \
1381  (ThemeTabTitleDrawUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
1382  uppThemeTabTitleDrawProcInfo, \
1383  GetCurrentArchitecture())
1384 #endif
1385 #endif
1386 
1395  ThemeEraseUPP
1396  NewThemeEraseUPP(ThemeEraseProcPtr userRoutine);
1397 #if !OPAQUE_UPP_TYPES
1398  enum
1399  {
1400  uppThemeEraseProcInfo = 0x00001BC0
1401  }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 1_byte) */
1402 #ifdef __cplusplus
1403  inline ThemeEraseUPP NewThemeEraseUPP(ThemeEraseProcPtr userRoutine)
1404  {
1405  return (ThemeEraseUPP)NewRoutineDescriptor(
1406  (ProcPtr)(userRoutine), uppThemeEraseProcInfo, GetCurrentArchitecture());
1407  }
1408 #else
1409 #define NewThemeEraseUPP(userRoutine) \
1410  (ThemeEraseUPP) NewRoutineDescriptor( \
1411  (ProcPtr)(userRoutine), uppThemeEraseProcInfo, GetCurrentArchitecture())
1412 #endif
1413 #endif
1414 
1423  ThemeButtonDrawUPP
1424  NewThemeButtonDrawUPP(ThemeButtonDrawProcPtr userRoutine);
1425 #if !OPAQUE_UPP_TYPES
1426  enum
1427  {
1428  uppThemeButtonDrawProcInfo = 0x0001BEC0
1429  }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes,
1430  1_byte) */
1431 #ifdef __cplusplus
1432  inline ThemeButtonDrawUPP
1433  NewThemeButtonDrawUPP(ThemeButtonDrawProcPtr userRoutine)
1434  {
1435  return (ThemeButtonDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1436  uppThemeButtonDrawProcInfo,
1437  GetCurrentArchitecture());
1438  }
1439 #else
1440 #define NewThemeButtonDrawUPP(userRoutine) \
1441  (ThemeButtonDrawUPP) \
1442  NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeButtonDrawProcInfo, \
1443  GetCurrentArchitecture())
1444 #endif
1445 #endif
1446 
1455  WindowTitleDrawingUPP
1456  NewWindowTitleDrawingUPP(WindowTitleDrawingProcPtr userRoutine);
1457 #if !OPAQUE_UPP_TYPES
1458  enum
1459  {
1460  uppWindowTitleDrawingProcInfo = 0x000036C0
1461  }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
1462 #ifdef __cplusplus
1463  inline WindowTitleDrawingUPP
1464  NewWindowTitleDrawingUPP(WindowTitleDrawingProcPtr userRoutine)
1465  {
1466  return (WindowTitleDrawingUPP)NewRoutineDescriptor(
1467  (ProcPtr)(userRoutine), uppWindowTitleDrawingProcInfo,
1468  GetCurrentArchitecture());
1469  }
1470 #else
1471 #define NewWindowTitleDrawingUPP(userRoutine) \
1472  (WindowTitleDrawingUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
1473  uppWindowTitleDrawingProcInfo, \
1474  GetCurrentArchitecture())
1475 #endif
1476 #endif
1477 
1486  ThemeIteratorUPP
1487  NewThemeIteratorUPP(ThemeIteratorProcPtr userRoutine);
1488 #if !OPAQUE_UPP_TYPES
1489  enum
1490  {
1491  uppThemeIteratorProcInfo = 0x00003ED0
1492  }; /* pascal 1_byte Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
1493 #ifdef __cplusplus
1494  inline ThemeIteratorUPP NewThemeIteratorUPP(ThemeIteratorProcPtr userRoutine)
1495  {
1496  return (ThemeIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1497  uppThemeIteratorProcInfo,
1498  GetCurrentArchitecture());
1499  }
1500 #else
1501 #define NewThemeIteratorUPP(userRoutine) \
1502  (ThemeIteratorUPP) \
1503  NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeIteratorProcInfo, \
1504  GetCurrentArchitecture())
1505 #endif
1506 #endif
1507 
1516  void
1517  DisposeThemeTabTitleDrawUPP(ThemeTabTitleDrawUPP userUPP);
1518 #if !OPAQUE_UPP_TYPES
1519 #ifdef __cplusplus
1520  inline void DisposeThemeTabTitleDrawUPP(ThemeTabTitleDrawUPP userUPP)
1521  {
1522  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1523  }
1524 #else
1525 #define DisposeThemeTabTitleDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1526 #endif
1527 #endif
1528 
1537  void
1538  DisposeThemeEraseUPP(ThemeEraseUPP userUPP);
1539 #if !OPAQUE_UPP_TYPES
1540 #ifdef __cplusplus
1541  inline void DisposeThemeEraseUPP(ThemeEraseUPP userUPP)
1542  {
1543  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1544  }
1545 #else
1546 #define DisposeThemeEraseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1547 #endif
1548 #endif
1549 
1558  void
1559  DisposeThemeButtonDrawUPP(ThemeButtonDrawUPP userUPP);
1560 #if !OPAQUE_UPP_TYPES
1561 #ifdef __cplusplus
1562  inline void DisposeThemeButtonDrawUPP(ThemeButtonDrawUPP userUPP)
1563  {
1564  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1565  }
1566 #else
1567 #define DisposeThemeButtonDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1568 #endif
1569 #endif
1570 
1579  void
1580  DisposeWindowTitleDrawingUPP(WindowTitleDrawingUPP userUPP);
1581 #if !OPAQUE_UPP_TYPES
1582 #ifdef __cplusplus
1583  inline void DisposeWindowTitleDrawingUPP(WindowTitleDrawingUPP userUPP)
1584  {
1585  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1586  }
1587 #else
1588 #define DisposeWindowTitleDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1589 #endif
1590 #endif
1591 
1600  void
1601  DisposeThemeIteratorUPP(ThemeIteratorUPP userUPP);
1602 #if !OPAQUE_UPP_TYPES
1603 #ifdef __cplusplus
1604  inline void DisposeThemeIteratorUPP(ThemeIteratorUPP userUPP)
1605  {
1606  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1607  }
1608 #else
1609 #define DisposeThemeIteratorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1610 #endif
1611 #endif
1612 
1621  void
1622  InvokeThemeTabTitleDrawUPP(const Rect *bounds, ThemeTabStyle style,
1623  ThemeTabDirection direction, SInt16 depth,
1624  Boolean isColorDev, UInt32 userData,
1625  ThemeTabTitleDrawUPP userUPP);
1626 #if !OPAQUE_UPP_TYPES
1627 #ifdef __cplusplus
1628  inline void InvokeThemeTabTitleDrawUPP(const Rect *bounds, ThemeTabStyle style,
1629  ThemeTabDirection direction,
1630  SInt16 depth, Boolean isColorDev,
1631  UInt32 userData,
1632  ThemeTabTitleDrawUPP userUPP)
1633  {
1634  CALL_SIX_PARAMETER_UPP(userUPP, uppThemeTabTitleDrawProcInfo, bounds, style,
1635  direction, depth, isColorDev, userData);
1636  }
1637 #else
1638 #define InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, \
1639  isColorDev, userData, userUPP) \
1640  CALL_SIX_PARAMETER_UPP((userUPP), uppThemeTabTitleDrawProcInfo, (bounds), \
1641  (style), (direction), (depth), (isColorDev), \
1642  (userData))
1643 #endif
1644 #endif
1645 
1654  void
1655  InvokeThemeEraseUPP(const Rect *bounds, UInt32 eraseData, SInt16 depth,
1656  Boolean isColorDev, ThemeEraseUPP userUPP);
1657 #if !OPAQUE_UPP_TYPES
1658 #ifdef __cplusplus
1659  inline void InvokeThemeEraseUPP(const Rect *bounds, UInt32 eraseData,
1660  SInt16 depth, Boolean isColorDev,
1661  ThemeEraseUPP userUPP)
1662  {
1663  CALL_FOUR_PARAMETER_UPP(userUPP, uppThemeEraseProcInfo, bounds, eraseData,
1664  depth, isColorDev);
1665  }
1666 #else
1667 #define InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userUPP) \
1668  CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeEraseProcInfo, (bounds), \
1669  (eraseData), (depth), (isColorDev))
1670 #endif
1671 #endif
1672 
1681  void
1682  InvokeThemeButtonDrawUPP(const Rect *bounds, ThemeButtonKind kind,
1683  const ThemeButtonDrawInfo *info, UInt32 userData,
1684  SInt16 depth, Boolean isColorDev,
1685  ThemeButtonDrawUPP userUPP);
1686 #if !OPAQUE_UPP_TYPES
1687 #ifdef __cplusplus
1688  inline void InvokeThemeButtonDrawUPP(const Rect *bounds, ThemeButtonKind kind,
1689  const ThemeButtonDrawInfo *info,
1690  UInt32 userData, SInt16 depth,
1691  Boolean isColorDev,
1692  ThemeButtonDrawUPP userUPP)
1693  {
1694  CALL_SIX_PARAMETER_UPP(userUPP, uppThemeButtonDrawProcInfo, bounds, kind,
1695  info, userData, depth, isColorDev);
1696  }
1697 #else
1698 #define InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, \
1699  isColorDev, userUPP) \
1700  CALL_SIX_PARAMETER_UPP((userUPP), uppThemeButtonDrawProcInfo, (bounds), \
1701  (kind), (info), (userData), (depth), (isColorDev))
1702 #endif
1703 #endif
1704 
1713  void
1714  InvokeWindowTitleDrawingUPP(const Rect *bounds, SInt16 depth,
1715  Boolean colorDevice, UInt32 userData,
1716  WindowTitleDrawingUPP userUPP);
1717 #if !OPAQUE_UPP_TYPES
1718 #ifdef __cplusplus
1719  inline void InvokeWindowTitleDrawingUPP(const Rect *bounds, SInt16 depth,
1720  Boolean colorDevice, UInt32 userData,
1721  WindowTitleDrawingUPP userUPP)
1722  {
1723  CALL_FOUR_PARAMETER_UPP(userUPP, uppWindowTitleDrawingProcInfo, bounds, depth,
1724  colorDevice, userData);
1725  }
1726 #else
1727 #define InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, \
1728  userUPP) \
1729  CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowTitleDrawingProcInfo, (bounds), \
1730  (depth), (colorDevice), (userData))
1731 #endif
1732 #endif
1733 
1742  Boolean
1743  InvokeThemeIteratorUPP(ConstStr255Param inFileName, SInt16 resID,
1744  Collection inThemeSettings, void *inUserData,
1745  ThemeIteratorUPP userUPP);
1746 #if !OPAQUE_UPP_TYPES
1747 #ifdef __cplusplus
1748  inline Boolean InvokeThemeIteratorUPP(ConstStr255Param inFileName, SInt16 resID,
1749  Collection inThemeSettings,
1750  void *inUserData,
1751  ThemeIteratorUPP userUPP)
1752  {
1753  return (Boolean)CALL_FOUR_PARAMETER_UPP(userUPP, uppThemeIteratorProcInfo,
1754  inFileName, resID, inThemeSettings,
1755  inUserData);
1756  }
1757 #else
1758 #define InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, \
1759  userUPP) \
1760  (Boolean) CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeIteratorProcInfo, \
1761  (inFileName), (resID), (inThemeSettings), \
1762  (inUserData))
1763 #endif
1764 #endif
1765 
1766 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1767 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1768 #define NewThemeTabTitleDrawProc(userRoutine) \
1769  NewThemeTabTitleDrawUPP(userRoutine)
1770 #define NewThemeEraseProc(userRoutine) NewThemeEraseUPP(userRoutine)
1771 #define NewThemeButtonDrawProc(userRoutine) NewThemeButtonDrawUPP(userRoutine)
1772 #define NewWindowTitleDrawingProc(userRoutine) \
1773  NewWindowTitleDrawingUPP(userRoutine)
1774 #define NewThemeIteratorProc(userRoutine) NewThemeIteratorUPP(userRoutine)
1775 #define CallThemeTabTitleDrawProc(userRoutine, bounds, style, direction, \
1776  depth, isColorDev, userData) \
1777  InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, \
1778  userData, userRoutine)
1779 #define CallThemeEraseProc(userRoutine, bounds, eraseData, depth, isColorDev) \
1780  InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userRoutine)
1781 #define CallThemeButtonDrawProc(userRoutine, bounds, kind, info, userData, \
1782  depth, isColorDev) \
1783  InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, \
1784  userRoutine)
1785 #define CallWindowTitleDrawingProc(userRoutine, bounds, depth, colorDevice, \
1786  userData) \
1787  InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userRoutine)
1788 #define CallThemeIteratorProc(userRoutine, inFileName, resID, inThemeSettings, \
1789  inUserData) \
1790  InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, \
1791  userRoutine)
1792 #endif /* CALL_NOT_IN_CARBON */
1793 
1794  /*����������������������������������������������������������������������������������*/
1795  /* Menu Drawing callbacks */
1796  /*����������������������������������������������������������������������������������*/
1797  typedef CALLBACK_API(void, MenuTitleDrawingProcPtr)(const Rect *inBounds,
1798  SInt16 inDepth,
1799  Boolean inIsColorDevice,
1800  SInt32 inUserData);
1801  typedef CALLBACK_API(void, MenuItemDrawingProcPtr)(const Rect *inBounds,
1802  SInt16 inDepth,
1803  Boolean inIsColorDevice,
1804  SInt32 inUserData);
1805  typedef STACK_UPP_TYPE(MenuTitleDrawingProcPtr) MenuTitleDrawingUPP;
1806  typedef STACK_UPP_TYPE(MenuItemDrawingProcPtr) MenuItemDrawingUPP;
1815  MenuTitleDrawingUPP
1816  NewMenuTitleDrawingUPP(MenuTitleDrawingProcPtr userRoutine);
1817 #if !OPAQUE_UPP_TYPES
1818  enum
1819  {
1820  uppMenuTitleDrawingProcInfo = 0x000036C0
1821  }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
1822 #ifdef __cplusplus
1823  inline MenuTitleDrawingUPP
1824  NewMenuTitleDrawingUPP(MenuTitleDrawingProcPtr userRoutine)
1825  {
1826  return (MenuTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1827  uppMenuTitleDrawingProcInfo,
1828  GetCurrentArchitecture());
1829  }
1830 #else
1831 #define NewMenuTitleDrawingUPP(userRoutine) \
1832  (MenuTitleDrawingUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
1833  uppMenuTitleDrawingProcInfo, \
1834  GetCurrentArchitecture())
1835 #endif
1836 #endif
1837 
1846  MenuItemDrawingUPP
1847  NewMenuItemDrawingUPP(MenuItemDrawingProcPtr userRoutine);
1848 #if !OPAQUE_UPP_TYPES
1849  enum
1850  {
1851  uppMenuItemDrawingProcInfo = 0x000036C0
1852  }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
1853 #ifdef __cplusplus
1854  inline MenuItemDrawingUPP
1855  NewMenuItemDrawingUPP(MenuItemDrawingProcPtr userRoutine)
1856  {
1857  return (MenuItemDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1858  uppMenuItemDrawingProcInfo,
1859  GetCurrentArchitecture());
1860  }
1861 #else
1862 #define NewMenuItemDrawingUPP(userRoutine) \
1863  (MenuItemDrawingUPP) \
1864  NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuItemDrawingProcInfo, \
1865  GetCurrentArchitecture())
1866 #endif
1867 #endif
1868 
1877  void
1878  DisposeMenuTitleDrawingUPP(MenuTitleDrawingUPP userUPP);
1879 #if !OPAQUE_UPP_TYPES
1880 #ifdef __cplusplus
1881  inline void DisposeMenuTitleDrawingUPP(MenuTitleDrawingUPP userUPP)
1882  {
1883  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1884  }
1885 #else
1886 #define DisposeMenuTitleDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1887 #endif
1888 #endif
1889 
1898  void
1899  DisposeMenuItemDrawingUPP(MenuItemDrawingUPP userUPP);
1900 #if !OPAQUE_UPP_TYPES
1901 #ifdef __cplusplus
1902  inline void DisposeMenuItemDrawingUPP(MenuItemDrawingUPP userUPP)
1903  {
1904  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1905  }
1906 #else
1907 #define DisposeMenuItemDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1908 #endif
1909 #endif
1910 
1919  void
1920  InvokeMenuTitleDrawingUPP(const Rect *inBounds, SInt16 inDepth,
1921  Boolean inIsColorDevice, SInt32 inUserData,
1922  MenuTitleDrawingUPP userUPP);
1923 #if !OPAQUE_UPP_TYPES
1924 #ifdef __cplusplus
1925  inline void InvokeMenuTitleDrawingUPP(const Rect *inBounds, SInt16 inDepth,
1926  Boolean inIsColorDevice,
1927  SInt32 inUserData,
1928  MenuTitleDrawingUPP userUPP)
1929  {
1930  CALL_FOUR_PARAMETER_UPP(userUPP, uppMenuTitleDrawingProcInfo, inBounds,
1931  inDepth, inIsColorDevice, inUserData);
1932  }
1933 #else
1934 #define InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, \
1935  inUserData, userUPP) \
1936  CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuTitleDrawingProcInfo, (inBounds), \
1937  (inDepth), (inIsColorDevice), (inUserData))
1938 #endif
1939 #endif
1940 
1949  void
1950  InvokeMenuItemDrawingUPP(const Rect *inBounds, SInt16 inDepth,
1951  Boolean inIsColorDevice, SInt32 inUserData,
1952  MenuItemDrawingUPP userUPP);
1953 #if !OPAQUE_UPP_TYPES
1954 #ifdef __cplusplus
1955  inline void InvokeMenuItemDrawingUPP(const Rect *inBounds, SInt16 inDepth,
1956  Boolean inIsColorDevice, SInt32 inUserData,
1957  MenuItemDrawingUPP userUPP)
1958  {
1959  CALL_FOUR_PARAMETER_UPP(userUPP, uppMenuItemDrawingProcInfo, inBounds,
1960  inDepth, inIsColorDevice, inUserData);
1961  }
1962 #else
1963 #define InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, \
1964  inUserData, userUPP) \
1965  CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuItemDrawingProcInfo, (inBounds), \
1966  (inDepth), (inIsColorDevice), (inUserData))
1967 #endif
1968 #endif
1969 
1970 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1971 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1972 #define NewMenuTitleDrawingProc(userRoutine) NewMenuTitleDrawingUPP(userRoutine)
1973 #define NewMenuItemDrawingProc(userRoutine) NewMenuItemDrawingUPP(userRoutine)
1974 #define CallMenuTitleDrawingProc(userRoutine, inBounds, inDepth, \
1975  inIsColorDevice, inUserData) \
1976  InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, \
1977  userRoutine)
1978 #define CallMenuItemDrawingProc(userRoutine, inBounds, inDepth, \
1979  inIsColorDevice, inUserData) \
1980  InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, \
1981  userRoutine)
1982 #endif /* CALL_NOT_IN_CARBON */
1983 
1984  /*����������������������������������������������������������������������������������*/
1985  /* Appearance Manager APIs */
1986  /*����������������������������������������������������������������������������������*/
1987  /* Registering Appearance-Savvy Applications */
1996  OSStatus
1998 
2007  OSStatus
2009 
2018  Boolean
2020 
2021  /*****************************************************************************
2022  NOTES ON THEME BRUSHES
2023  Theme brushes can be either colors or patterns, depending on the theme.
2024  Because of this, you should be prepared to handle the case where a brush
2025  is a pattern and save and restore the pnPixPat and bkPixPat fields of
2026  your GrafPorts when saving the fore and back colors. Also, since patterns
2027  in bkPixPat override the background color of the window, you should use
2028  BackPat to set your background pattern to a normal white pattern. This
2029  will ensure that you can use RGBBackColor to set your back color to white,
2030  call EraseRect and get the expected results.
2031  *****************************************************************************/
2032 
2041  OSStatus
2042  SetThemePen(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice);
2043 
2052  OSStatus
2053  SetThemeBackground(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice);
2054 
2063  OSStatus
2064  SetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth,
2065  Boolean inIsColorDevice);
2066 
2075  OSStatus
2076  SetThemeWindowBackground(WindowRef inWindow, ThemeBrush inBrush,
2077  Boolean inUpdate);
2078 
2079  /* Window Placards, Headers and Frames */
2088  OSStatus
2089  DrawThemeWindowHeader(const Rect *inRect, ThemeDrawState inState);
2090 
2099  OSStatus
2100  DrawThemeWindowListViewHeader(const Rect *inRect, ThemeDrawState inState);
2101 
2110  OSStatus
2111  DrawThemePlacard(const Rect *inRect, ThemeDrawState inState);
2112 
2121  OSStatus
2122  DrawThemeEditTextFrame(const Rect *inRect, ThemeDrawState inState);
2123 
2132  OSStatus
2133  DrawThemeListBoxFrame(const Rect *inRect, ThemeDrawState inState);
2134 
2135  /* Keyboard Focus Drawing */
2144  OSStatus
2145  DrawThemeFocusRect(const Rect *inRect, Boolean inHasFocus);
2146 
2147  /* Dialog Group Boxes and Separators */
2156  OSStatus
2157  DrawThemePrimaryGroup(const Rect *inRect, ThemeDrawState inState);
2158 
2167  OSStatus
2168  DrawThemeSecondaryGroup(const Rect *inRect, ThemeDrawState inState);
2169 
2178  OSStatus
2179  DrawThemeSeparator(const Rect *inRect, ThemeDrawState inState);
2180 
2181  /*������������������������������ BEGIN APPEARANCE 1.0.1
2182  * ��������������������������������������������*/
2183  /* The following Appearance Manager APIs are only available */
2184  /* in Appearance 1.0.1 or later */
2193  OSStatus
2194  DrawThemeModelessDialogFrame(const Rect *inRect, ThemeDrawState inState);
2195 
2204  OSStatus
2205  DrawThemeGenericWell(const Rect *inRect, ThemeDrawState inState,
2206  Boolean inFillCenter);
2207 
2216  OSStatus
2217  DrawThemeFocusRegion(RgnHandle inRegion, Boolean inHasFocus);
2218 
2227  Boolean
2228  IsThemeInColor(SInt16 inDepth, Boolean inIsColorDevice);
2229 
2230  /* IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any
2231  * other theme will */
2232  /* most likely return an error */
2241  OSStatus
2243 
2252  OSStatus
2253  DrawThemeMenuBarBackground(const Rect *inBounds, ThemeMenuBarState inState,
2254  UInt32 inAttributes);
2255 
2264  OSStatus
2265  DrawThemeMenuTitle(const Rect *inMenuBarRect, const Rect *inTitleRect,
2266  ThemeMenuState inState, UInt32 inAttributes,
2267  MenuTitleDrawingUPP inTitleProc, /* can be NULL */
2268  UInt32 inTitleData);
2269 
2278  OSStatus
2279  GetThemeMenuBarHeight(SInt16 *outHeight);
2280 
2289  OSStatus
2290  DrawThemeMenuBackground(const Rect *inMenuRect, ThemeMenuType inMenuType);
2291 
2300  OSStatus
2301  GetThemeMenuBackgroundRegion(const Rect *inMenuRect, ThemeMenuType menuType,
2302  RgnHandle region);
2303 
2312  OSStatus
2313  DrawThemeMenuItem(const Rect *inMenuRect, const Rect *inItemRect,
2314  SInt16 inVirtualMenuTop, SInt16 inVirtualMenuBottom,
2315  ThemeMenuState inState, ThemeMenuItemType inItemType,
2316  MenuItemDrawingUPP inDrawProc, /* can be NULL */
2317  UInt32 inUserData);
2318 
2327  OSStatus
2328  DrawThemeMenuSeparator(const Rect *inItemRect);
2329 
2338  OSStatus
2339  GetThemeMenuSeparatorHeight(SInt16 *outHeight);
2340 
2349  OSStatus
2350  GetThemeMenuItemExtra(ThemeMenuItemType inItemType, SInt16 *outHeight,
2351  SInt16 *outWidth);
2352 
2361  OSStatus
2362  GetThemeMenuTitleExtra(SInt16 *outWidth, Boolean inIsSquished);
2363 
2364  /*������������������������������� BEGIN APPEARANCE 1.1
2365  * ���������������������������������������������*/
2366  /*���������������������������������� THEME SWITCHING
2367  * �����������������������������������������������*/
2368  /* */
2369  /* X ALERT: Please note that Get/SetTheme are severely neutered under Mac OS X
2370  * at present. */
2371  /* See the note above regarding what collection tags are supported
2372  * under X. */
2373 
2382  OSStatus
2383  GetTheme(Collection ioCollection);
2384 
2393  OSStatus
2394  SetTheme(Collection ioCollection);
2395 
2404  OSStatus
2405  IterateThemes(ThemeIteratorUPP inProc, void *inUserData); /* can be NULL */
2406 
2407  /*���������������������������������������� TABS
2408  * ����������������������������������������������������*/
2417  OSStatus
2418  DrawThemeTabPane(const Rect *inRect, ThemeDrawState inState);
2419 
2428  OSStatus
2429  DrawThemeTab(const Rect *inRect, ThemeTabStyle inStyle,
2430  ThemeTabDirection inDirection,
2431  ThemeTabTitleDrawUPP labelProc, /* can be NULL */
2432  UInt32 userData);
2433 
2442  OSStatus
2443  GetThemeTabRegion(const Rect *inRect, ThemeTabStyle inStyle,
2444  ThemeTabDirection inDirection, RgnHandle ioRgn);
2445 
2446  /*��������������������������������������� CURSORS
2447  * ��������������������������������������������������*/
2456  OSStatus
2457  SetThemeCursor(ThemeCursor inCursor);
2458 
2467  OSStatus
2468  SetAnimatedThemeCursor(ThemeCursor inCursor, UInt32 inAnimationStep);
2469 
2470  /*�������������������������������� CONTROL STYLE SETTINGS
2471  * ������������������������������������������*/
2480  OSStatus
2481  GetThemeScrollBarThumbStyle(ThemeScrollBarThumbStyle *outStyle);
2482 
2491  OSStatus
2492  GetThemeScrollBarArrowStyle(ThemeScrollBarArrowStyle *outStyle);
2493 
2502  OSStatus
2503  GetThemeCheckBoxStyle(ThemeCheckBoxStyle *outStyle);
2504 
2505  /*���������������������������������������� FONTS/TEXT
2506  * ����������������������������������������������*/
2515  OSStatus
2516  UseThemeFont(ThemeFontID inFontID, ScriptCode inScript);
2517 
2526  OSStatus
2527  GetThemeFont(ThemeFontID inFontID, ScriptCode inScript,
2528  Str255 outFontName, /* can be NULL */
2529  SInt16 *outFontSize, Style *outStyle);
2530 
2610  OSStatus
2611  DrawThemeTextBox(CFStringRef inString, ThemeFontID inFontID,
2612  ThemeDrawState inState, Boolean inWrapToWidth,
2613  const Rect *inBoundingBox, SInt16 inJust, void *inContext);
2614 
2667  OSStatus
2668  TruncateThemeText(CFMutableStringRef inString, ThemeFontID inFontID,
2669  ThemeDrawState inState, SInt16 inPixelWidthLimit,
2670  TruncCode inTruncWhere,
2671  Boolean *outTruncated); /* can be NULL */
2672 
2729  OSStatus
2730  GetThemeTextDimensions(CFStringRef inString, ThemeFontID inFontID,
2731  ThemeDrawState inState, Boolean inWrapToWidth,
2732  Point *ioBounds, SInt16 *outBaseline);
2733 
2775  OSStatus
2776  GetThemeTextShadowOutset(ThemeFontID inFontID, ThemeDrawState inState,
2777  Rect *outOutset);
2778 
2779  /*���������������������������������������� TRACKS
2780  * ��������������������������������������������������*/
2789  OSStatus
2791  RgnHandle rgnGhost, /* can be NULL */
2792  ThemeEraseUPP eraseProc, /* can be NULL */
2793  UInt32 eraseData);
2794 
2803  Boolean
2804  HitTestThemeTrack(const ThemeTrackDrawInfo *drawInfo, Point mousePoint,
2805  ControlPartCode *partHit);
2806 
2815  OSStatus
2816  GetThemeTrackBounds(const ThemeTrackDrawInfo *drawInfo, Rect *bounds);
2817 
2826  OSStatus
2828 
2837  OSStatus
2838  GetThemeTrackDragRect(const ThemeTrackDrawInfo *drawInfo, Rect *dragRect);
2839 
2848  OSStatus
2849  DrawThemeTrackTickMarks(const ThemeTrackDrawInfo *drawInfo, ItemCount numTicks,
2850  ThemeEraseUPP eraseProc, /* can be NULL */
2851  UInt32 eraseData);
2852 
2861  OSStatus
2863  Point thumbOffset,
2864  SInt32 *relativePosition);
2865 
2874  OSStatus
2876  RgnHandle thumbRgn,
2877  SInt32 *relativePosition);
2878 
2887  OSStatus
2889  SInt32 relativePosition, SInt32 *value);
2890 
2891  /*����������������������������������� SCROLLBAR ARROWS
2892  * ���������������������������������������������*/
2901  OSStatus
2902  DrawThemeScrollBarArrows(const Rect *bounds, ThemeTrackEnableState enableState,
2903  ThemeTrackPressState pressState, Boolean isHoriz,
2904  Rect *trackBounds);
2905 
2914  OSStatus
2916  ThemeTrackEnableState enableState,
2917  ThemeTrackPressState pressState, Boolean isHoriz,
2918  Rect *trackBounds);
2919 
2928  Boolean
2929  HitTestThemeScrollBarArrows(const Rect *scrollBarBounds,
2930  ThemeTrackEnableState enableState,
2931  ThemeTrackPressState pressState, Boolean isHoriz,
2932  Point ptHit, Rect *trackBounds,
2933  ControlPartCode *partcode);
2934 
2935  /*���������������������������������������� WINDOWS
2936  * �������������������������������������������������*/
2945  OSStatus
2946  GetThemeWindowRegion(ThemeWindowType flavor, const Rect *contRect,
2947  ThemeDrawState state, const ThemeWindowMetrics *metrics,
2948  ThemeWindowAttributes attributes,
2949  WindowRegionCode winRegion, RgnHandle rgn);
2950 
2959  OSStatus
2960  DrawThemeWindowFrame(ThemeWindowType flavor, const Rect *contRect,
2961  ThemeDrawState state, const ThemeWindowMetrics *metrics,
2962  ThemeWindowAttributes attributes,
2963  WindowTitleDrawingUPP titleProc, /* can be NULL */
2964  UInt32 titleData);
2965 
2974  OSStatus
2975  DrawThemeTitleBarWidget(ThemeWindowType flavor, const Rect *contRect,
2976  ThemeDrawState state, const ThemeWindowMetrics *metrics,
2977  ThemeWindowAttributes attributes,
2978  ThemeTitleBarWidget widget);
2979 
2988  Boolean
2989  GetThemeWindowRegionHit(ThemeWindowType flavor, const Rect *inContRect,
2990  ThemeDrawState state, const ThemeWindowMetrics *metrics,
2991  ThemeWindowAttributes inAttributes, Point inPoint,
2992  WindowRegionCode *outRegionHit);
2993 
3002  OSStatus
3003  DrawThemeScrollBarDelimiters(ThemeWindowType flavor, const Rect *inContRect,
3004  ThemeDrawState state,
3005  ThemeWindowAttributes attributes);
3006 
3007  /*���������������������������������������� BUTTONS
3008  * �������������������������������������������������*/
3017  OSStatus
3018  DrawThemeButton(const Rect *inBounds, ThemeButtonKind inKind,
3019  const ThemeButtonDrawInfo *inNewInfo,
3020  const ThemeButtonDrawInfo *inPrevInfo, /* can be NULL */
3021  ThemeEraseUPP inEraseProc, /* can be NULL */
3022  ThemeButtonDrawUPP inLabelProc, /* can be NULL */
3023  UInt32 inUserData);
3024 
3033  OSStatus
3034  GetThemeButtonRegion(const Rect *inBounds, ThemeButtonKind inKind,
3035  const ThemeButtonDrawInfo *inNewInfo, RgnHandle outRegion);
3036 
3045  OSStatus
3046  GetThemeButtonContentBounds(const Rect *inBounds, ThemeButtonKind inKind,
3047  const ThemeButtonDrawInfo *inDrawInfo,
3048  Rect *outBounds);
3049 
3058  OSStatus
3059  GetThemeButtonBackgroundBounds(const Rect *inBounds, ThemeButtonKind inKind,
3060  const ThemeButtonDrawInfo *inDrawInfo,
3061  Rect *outBounds);
3062 
3063  /*������������������������������������� INTERFACE SOUNDS
3064  * �������������������������������������������*/
3065  /* */
3066  /* X ALERT: Please note that the sound APIs do not work on Mac OS X at present.
3067  */
3076  OSStatus
3077  PlayThemeSound(ThemeSoundKind kind);
3078 
3087  OSStatus
3088  BeginThemeDragSound(ThemeDragSoundKind kind);
3089 
3098  OSStatus
3100 
3101  /*�������������������������������������� PRIMITIVES
3102  * ������������������������������������������������*/
3111  OSStatus
3112  DrawThemeTickMark(const Rect *bounds, ThemeDrawState state);
3113 
3122  OSStatus
3123  DrawThemeChasingArrows(const Rect *bounds, UInt32 index, ThemeDrawState state,
3124  ThemeEraseUPP eraseProc, /* can be NULL */
3125  UInt32 eraseData);
3126 
3135  OSStatus
3136  DrawThemePopupArrow(const Rect *bounds, ThemeArrowOrientation orientation,
3137  ThemePopupArrowSize size, ThemeDrawState state,
3138  ThemeEraseUPP eraseProc, /* can be NULL */
3139  UInt32 eraseData);
3140 
3149  OSStatus
3150  DrawThemeStandaloneGrowBox(Point origin, ThemeGrowDirection growDirection,
3151  Boolean isSmall, ThemeDrawState state);
3152 
3161  OSStatus
3162  DrawThemeStandaloneNoGrowBox(Point origin, ThemeGrowDirection growDirection,
3163  Boolean isSmall, ThemeDrawState state);
3164 
3173  OSStatus
3174  GetThemeStandaloneGrowBoxBounds(Point origin, ThemeGrowDirection growDirection,
3175  Boolean isSmall, Rect *bounds);
3176 
3177  /*������������������������������������� DRAWING STATE
3178  * ����������������������������������������������*/
3179  /* The following routines help you save and restore the drawing state in a
3180  * theme-savvy manner. With */
3181  /* these weapons in your arsenal, there is no grafport you cannot tame. Use
3182  * ThemeGetDrawingState to */
3183  /* get the current drawing settings for the current port. It will return an
3184  * opaque object for you */
3185  /* to pass into SetThemeDrawingState later on. When you are finished with the
3186  * state, call the */
3187  /* DisposeThemeDrawingState routine. You can alternatively pass true into the
3188  * inDisposeNow */
3189  /* parameter of the SetThemeDrawingState routine. You can use this routine to
3190  * copy the drawing */
3191  /* state from one port to another as well. */
3192  /* */
3193  /* As of this writing (Mac OS 9.1 and Mac OS X), Get/SetThemeDrawingState will
3194  * save and restore */
3195  /* this data in the port: */
3196  /* */
3197  /* pen size */
3198  /* pen location */
3199  /* pen mode */
3200  /* pen Pattern and PixPat */
3201  /* background Pattern and PixPat */
3202  /* RGB foreground and background colors */
3203  /* text mode */
3204  /* pattern origin */
3205  /* */
3206  /* Get/SetThemeDrawingState may save and restore additional port state in the
3207  * future, but you can */
3208  /* rely on them to always save at least this port state. */
3217  OSStatus
3219 
3228  OSStatus
3229  GetThemeDrawingState(ThemeDrawingState *outState);
3230 
3239  OSStatus
3240  SetThemeDrawingState(ThemeDrawingState inState, Boolean inDisposeNow);
3241 
3250  OSStatus
3251  DisposeThemeDrawingState(ThemeDrawingState inState);
3252 
3253  /*������������������������������������� MISCELLANEOUS
3254  * ����������������������������������������������*/
3255  /* ApplyThemeBackground is used to set up the background for embedded controls
3256  */
3257  /* It is normally called by controls that are embedders. The standard controls
3258  */
3259  /* call this API to ensure a correct background for the current theme. You pass
3260  */
3261  /* in the same rectangle you would if you were calling the drawing primitive. */
3270  OSStatus
3271  ApplyThemeBackground(ThemeBackgroundKind inKind, const Rect *bounds,
3272  ThemeDrawState inState, SInt16 inDepth,
3273  Boolean inColorDev);
3274 
3283  OSStatus
3285  Boolean isColorDev);
3286 
3295  Boolean
3296  IsValidAppearanceFileType(OSType fileType);
3297 
3306  OSStatus
3307  GetThemeBrushAsColor(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev,
3308  RGBColor *outColor);
3309 
3318  OSStatus
3319  GetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev,
3320  RGBColor *outColor);
3321 
3322  /*��������������������������������������� BEGIN CARBON
3323  * ���������������������������������������������*/
3332  OSStatus
3333  GetThemeMetric(ThemeMetric inMetric, SInt32 *outMetric);
3334 
3397  OSStatus
3398  GetTextAndEncodingFromCFString(CFStringRef inString, BytePtr outText,
3399  ByteCount inTextMaxLength,
3400  ByteCount *outTextLength,
3401  TextEncoding *outEncoding); /* can be NULL */
3402 
3411  OSStatus
3412  CopyThemeIdentifier(CFStringRef *outIdentifier);
3413 
3414  /*��������������������������������������������������������������������������������������������������*/
3415  /* Obsolete symbolic names */
3416  /*��������������������������������������������������������������������������������������������������*/
3417  /* Obsolete error codes - use the new ones, s'il vous plait / kudasai */
3418  enum
3419  {
3420  appearanceBadBrushIndexErr = themeInvalidBrushErr, /* pattern index invalid */
3421  appearanceProcessRegisteredErr = themeProcessRegisteredErr,
3422  appearanceProcessNotRegisteredErr = themeProcessNotRegisteredErr,
3423  appearanceBadTextColorIndexErr = themeBadTextColorErr,
3424  appearanceThemeHasNoAccents = themeHasNoAccentsErr,
3425  appearanceBadCursorIndexErr = themeBadCursorIndexErr
3426  };
3427 
3428  enum
3429  {
3430  kThemeActiveDialogBackgroundBrush = kThemeBrushDialogBackgroundActive,
3431  kThemeInactiveDialogBackgroundBrush = kThemeBrushDialogBackgroundInactive,
3432  kThemeActiveAlertBackgroundBrush = kThemeBrushAlertBackgroundActive,
3433  kThemeInactiveAlertBackgroundBrush = kThemeBrushAlertBackgroundInactive,
3434  kThemeActiveModelessDialogBackgroundBrush =
3435  kThemeBrushModelessDialogBackgroundActive,
3436  kThemeInactiveModelessDialogBackgroundBrush =
3437  kThemeBrushModelessDialogBackgroundInactive,
3438  kThemeActiveUtilityWindowBackgroundBrush =
3439  kThemeBrushUtilityWindowBackgroundActive,
3440  kThemeInactiveUtilityWindowBackgroundBrush =
3441  kThemeBrushUtilityWindowBackgroundInactive,
3442  kThemeListViewSortColumnBackgroundBrush =
3443  kThemeBrushListViewSortColumnBackground,
3444  kThemeListViewBackgroundBrush = kThemeBrushListViewBackground,
3445  kThemeIconLabelBackgroundBrush = kThemeBrushIconLabelBackground,
3446  kThemeListViewSeparatorBrush = kThemeBrushListViewSeparator,
3447  kThemeChasingArrowsBrush = kThemeBrushChasingArrows,
3448  kThemeDragHiliteBrush = kThemeBrushDragHilite,
3449  kThemeDocumentWindowBackgroundBrush = kThemeBrushDocumentWindowBackground,
3450  kThemeFinderWindowBackgroundBrush = kThemeBrushFinderWindowBackground
3451  };
3452 
3453  enum
3454  {
3455  kThemeActiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterActive,
3456  kThemeInactiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterInactive,
3457  kThemeFocusHighlightBrush = kThemeBrushFocusHighlight,
3458  kThemeActivePopupArrowBrush = kThemeBrushPopupArrowActive,
3459  kThemePressedPopupArrowBrush = kThemeBrushPopupArrowPressed,
3460  kThemeInactivePopupArrowBrush = kThemeBrushPopupArrowInactive,
3461  kThemeAppleGuideCoachmarkBrush = kThemeBrushAppleGuideCoachmark
3462  };
3463 
3464  enum
3465  {
3466  kThemeActiveDialogTextColor = kThemeTextColorDialogActive,
3467  kThemeInactiveDialogTextColor = kThemeTextColorDialogInactive,
3468  kThemeActiveAlertTextColor = kThemeTextColorAlertActive,
3469  kThemeInactiveAlertTextColor = kThemeTextColorAlertInactive,
3470  kThemeActiveModelessDialogTextColor = kThemeTextColorModelessDialogActive,
3471  kThemeInactiveModelessDialogTextColor = kThemeTextColorModelessDialogInactive,
3472  kThemeActiveWindowHeaderTextColor = kThemeTextColorWindowHeaderActive,
3473  kThemeInactiveWindowHeaderTextColor = kThemeTextColorWindowHeaderInactive,
3474  kThemeActivePlacardTextColor = kThemeTextColorPlacardActive,
3475  kThemeInactivePlacardTextColor = kThemeTextColorPlacardInactive,
3476  kThemePressedPlacardTextColor = kThemeTextColorPlacardPressed,
3477  kThemeActivePushButtonTextColor = kThemeTextColorPushButtonActive,
3478  kThemeInactivePushButtonTextColor = kThemeTextColorPushButtonInactive,
3479  kThemePressedPushButtonTextColor = kThemeTextColorPushButtonPressed,
3480  kThemeActiveBevelButtonTextColor = kThemeTextColorBevelButtonActive,
3481  kThemeInactiveBevelButtonTextColor = kThemeTextColorBevelButtonInactive,
3482  kThemePressedBevelButtonTextColor = kThemeTextColorBevelButtonPressed,
3483  kThemeActivePopupButtonTextColor = kThemeTextColorPopupButtonActive,
3484  kThemeInactivePopupButtonTextColor = kThemeTextColorPopupButtonInactive,
3485  kThemePressedPopupButtonTextColor = kThemeTextColorPopupButtonPressed,
3486  kThemeIconLabelTextColor = kThemeTextColorIconLabel,
3487  kThemeListViewTextColor = kThemeTextColorListView
3488  };
3489 
3490  enum
3491  {
3492  kThemeActiveDocumentWindowTitleTextColor =
3493  kThemeTextColorDocumentWindowTitleActive,
3494  kThemeInactiveDocumentWindowTitleTextColor =
3495  kThemeTextColorDocumentWindowTitleInactive,
3496  kThemeActiveMovableModalWindowTitleTextColor =
3497  kThemeTextColorMovableModalWindowTitleActive,
3498  kThemeInactiveMovableModalWindowTitleTextColor =
3499  kThemeTextColorMovableModalWindowTitleInactive,
3500  kThemeActiveUtilityWindowTitleTextColor =
3501  kThemeTextColorUtilityWindowTitleActive,
3502  kThemeInactiveUtilityWindowTitleTextColor =
3503  kThemeTextColorUtilityWindowTitleInactive,
3504  kThemeActivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleActive,
3505  kThemeInactivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleInactive,
3506  kThemeActiveRootMenuTextColor = kThemeTextColorRootMenuActive,
3507  kThemeSelectedRootMenuTextColor = kThemeTextColorRootMenuSelected,
3508  kThemeDisabledRootMenuTextColor = kThemeTextColorRootMenuDisabled,
3509  kThemeActiveMenuItemTextColor = kThemeTextColorMenuItemActive,
3510  kThemeSelectedMenuItemTextColor = kThemeTextColorMenuItemSelected,
3511  kThemeDisabledMenuItemTextColor = kThemeTextColorMenuItemDisabled,
3512  kThemeActivePopupLabelTextColor = kThemeTextColorPopupLabelActive,
3513  kThemeInactivePopupLabelTextColor = kThemeTextColorPopupLabelInactive
3514  };
3515 
3516  enum
3517  {
3518  kAEThemeSwitch = kAEAppearanceChanged /* Event ID's: Theme Switched */
3519  };
3520 
3521  enum
3522  {
3523  kThemeNoAdornment = kThemeAdornmentNone,
3524  kThemeDefaultAdornment = kThemeAdornmentDefault,
3525  kThemeFocusAdornment = kThemeAdornmentFocus,
3526  kThemeRightToLeftAdornment = kThemeAdornmentRightToLeft,
3527  kThemeDrawIndicatorOnly = kThemeAdornmentDrawIndicatorOnly
3528  };
3529 
3530  enum
3531  {
3532  kThemeBrushPassiveAreaFill = kThemeBrushStaticAreaFill
3533  };
3534 
3535  enum
3536  {
3537  kThemeMetricCheckBoxGlyphHeight = kThemeMetricCheckBoxHeight,
3538  kThemeMetricRadioButtonGlyphHeight = kThemeMetricRadioButtonHeight,
3539  kThemeMetricDisclosureButtonSize = kThemeMetricDisclosureButtonHeight,
3540  kThemeMetricBestListHeaderHeight = kThemeMetricListHeaderHeight,
3541  kThemeMetricSmallProgressBarThickness =
3542  kThemeMetricNormalProgressBarThickness, /* obsolete */
3543  kThemeMetricProgressBarThickness =
3544  kThemeMetricLargeProgressBarThickness /* obsolete */
3545  };
3546 
3547  enum
3548  {
3549  kThemeScrollBar = kThemeMediumScrollBar,
3550  kThemeSlider = kThemeMediumSlider,
3551  kThemeProgressBar = kThemeMediumProgressBar,
3552  kThemeIndeterminateBar = kThemeMediumIndeterminateBar
3553  };
3554 
3555 #if PRAGMA_STRUCT_ALIGN
3556 #pragma options align = reset
3557 #elif PRAGMA_STRUCT_PACKPUSH
3558 #pragma pack(pop)
3559 #elif PRAGMA_STRUCT_PACK
3560 #pragma pack()
3561 #endif
3562 
3563 #ifdef PRAGMA_IMPORT_OFF
3564 #pragma import off
3565 #elif PRAGMA_IMPORT
3566 #pragma import reset
3567 #endif
3568 
3569 #ifdef __cplusplus
3570 }
3571 #endif
3572 
3573 #endif /* __APPEARANCE__ */
OSStatus DrawThemeSecondaryGroup(const Rect *inRect, ThemeDrawState inState)
OSStatus SetThemePen(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
OSStatus GetThemeButtonContentBounds(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inDrawInfo, Rect *outBounds)
OSStatus GetThemeMenuBarHeight(SInt16 *outHeight)
OSStatus GetThemeTrackThumbPositionFromOffset(const ThemeTrackDrawInfo *drawInfo, Point thumbOffset, SInt32 *relativePosition)
void DisposeThemeTabTitleDrawUPP(ThemeTabTitleDrawUPP userUPP)
void DisposeWindowTitleDrawingUPP(WindowTitleDrawingUPP userUPP)
OSStatus DrawThemeFocusRect(const Rect *inRect, Boolean inHasFocus)
OSStatus DrawThemePlacard(const Rect *inRect, ThemeDrawState inState)
OSStatus DrawThemeWindowListViewHeader(const Rect *inRect, ThemeDrawState inState)
Boolean HitTestThemeTrack(const ThemeTrackDrawInfo *drawInfo, Point mousePoint, ControlPartCode *partHit)
OSStatus DrawThemeEditTextFrame(const Rect *inRect, ThemeDrawState inState)
void InvokeThemeButtonDrawUPP(const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, UInt32 userData, SInt16 depth, Boolean isColorDev, ThemeButtonDrawUPP userUPP)
OSStatus DrawThemeMenuBackground(const Rect *inMenuRect, ThemeMenuType inMenuType)
Boolean GetThemeWindowRegionHit(ThemeWindowType flavor, const Rect *inContRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes inAttributes, Point inPoint, WindowRegionCode *outRegionHit)
OSStatus GetThemeStandaloneGrowBoxBounds(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, Rect *bounds)
OSStatus UseThemeFont(ThemeFontID inFontID, ScriptCode inScript)
OSStatus DrawThemeScrollBarArrows(const Rect *bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Rect *trackBounds)
ThemeIteratorUPP NewThemeIteratorUPP(ThemeIteratorProcPtr userRoutine)
OSStatus GetThemeButtonRegion(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inNewInfo, RgnHandle outRegion)
OSStatus GetThemeAccentColors(CTabHandle *outColors)
void DisposeThemeButtonDrawUPP(ThemeButtonDrawUPP userUPP)
@ kThemeWindowTitleFont
Definition: Appearance.h:597
@ kThemeSmallEmphasizedSystemFont
Definition: Appearance.h:536
@ kThemeSystemFont
Definition: Appearance.h:522
@ kThemeUtilityWindowTitleFont
Definition: Appearance.h:609
@ kThemeMenuItemCmdKeyFont
Definition: Appearance.h:591
@ kThemeApplicationFont
Definition: Appearance.h:559
@ kThemeLabelFont
Definition: Appearance.h:567
@ kThemeViewsFont
Definition: Appearance.h:542
@ kThemeEmphasizedSystemFont
Definition: Appearance.h:551
@ kThemeMenuItemMarkFont
Definition: Appearance.h:585
@ kThemePushButtonFont
Definition: Appearance.h:603
@ kThemeCurrentPortFont
Definition: Appearance.h:639
@ kThemeMenuItemFont
Definition: Appearance.h:579
@ kThemeMenuTitleFont
Definition: Appearance.h:573
@ kThemeSmallSystemFont
Definition: Appearance.h:529
@ kThemeAlertHeaderFont
Definition: Appearance.h:615
OSStatus DrawThemeButton(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inNewInfo, const ThemeButtonDrawInfo *inPrevInfo, ThemeEraseUPP inEraseProc, ThemeButtonDrawUPP inLabelProc, UInt32 inUserData)
OSStatus DrawThemeStandaloneGrowBox(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state)
OSStatus DrawThemePrimaryGroup(const Rect *inRect, ThemeDrawState inState)
OSStatus GetThemeMenuBackgroundRegion(const Rect *inMenuRect, ThemeMenuType menuType, RgnHandle region)
void DisposeMenuTitleDrawingUPP(MenuTitleDrawingUPP userUPP)
OSStatus GetThemeWindowRegion(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, WindowRegionCode winRegion, RgnHandle rgn)
OSStatus IterateThemes(ThemeIteratorUPP inProc, void *inUserData)
OSStatus SetThemeBackground(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
OSStatus GetThemeMenuTitleExtra(SInt16 *outWidth, Boolean inIsSquished)
OSStatus GetTextAndEncodingFromCFString(CFStringRef inString, BytePtr outText, ByteCount inTextMaxLength, ByteCount *outTextLength, TextEncoding *outEncoding)
void InvokeThemeTabTitleDrawUPP(const Rect *bounds, ThemeTabStyle style, ThemeTabDirection direction, SInt16 depth, Boolean isColorDev, UInt32 userData, ThemeTabTitleDrawUPP userUPP)
WindowTitleDrawingUPP NewWindowTitleDrawingUPP(WindowTitleDrawingProcPtr userRoutine)
OSStatus SetAnimatedThemeCursor(ThemeCursor inCursor, UInt32 inAnimationStep)
OSStatus GetThemeMenuSeparatorHeight(SInt16 *outHeight)
Boolean IsValidAppearanceFileType(OSType fileType)
OSStatus DrawThemeScrollBarDelimiters(ThemeWindowType flavor, const Rect *inContRect, ThemeDrawState state, ThemeWindowAttributes attributes)
OSStatus DrawThemeTextBox(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, const Rect *inBoundingBox, SInt16 inJust, void *inContext)
OSStatus GetThemeFont(ThemeFontID inFontID, ScriptCode inScript, Str255 outFontName, SInt16 *outFontSize, Style *outStyle)
OSStatus PlayThemeSound(ThemeSoundKind kind)
void InvokeMenuItemDrawingUPP(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData, MenuItemDrawingUPP userUPP)
OSStatus GetThemeMetric(ThemeMetric inMetric, SInt32 *outMetric)
OSStatus DrawThemeTab(const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, ThemeTabTitleDrawUPP labelProc, UInt32 userData)
OSStatus SetThemeTextColorForWindow(WindowRef window, Boolean isActive, SInt16 depth, Boolean isColorDev)
OSStatus GetThemeScrollBarThumbStyle(ThemeScrollBarThumbStyle *outStyle)
OSStatus DrawThemeListBoxFrame(const Rect *inRect, ThemeDrawState inState)
OSStatus DrawThemeModelessDialogFrame(const Rect *inRect, ThemeDrawState inState)
OSStatus GetThemeTextShadowOutset(ThemeFontID inFontID, ThemeDrawState inState, Rect *outOutset)
Boolean HitTestThemeScrollBarArrows(const Rect *scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit, Rect *trackBounds, ControlPartCode *partcode)
OSStatus DrawThemeMenuItem(const Rect *inMenuRect, const Rect *inItemRect, SInt16 inVirtualMenuTop, SInt16 inVirtualMenuBottom, ThemeMenuState inState, ThemeMenuItemType inItemType, MenuItemDrawingUPP inDrawProc, UInt32 inUserData)
OSStatus SetTheme(Collection ioCollection)
OSStatus GetThemeTrackDragRect(const ThemeTrackDrawInfo *drawInfo, Rect *dragRect)
OSStatus GetThemeDrawingState(ThemeDrawingState *outState)
OSStatus UnregisterAppearanceClient(void)
OSStatus DrawThemeChasingArrows(const Rect *bounds, UInt32 index, ThemeDrawState state, ThemeEraseUPP eraseProc, UInt32 eraseData)
OSStatus GetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev, RGBColor *outColor)
Boolean IsThemeInColor(SInt16 inDepth, Boolean inIsColorDevice)
OSStatus DrawThemeTitleBarWidget(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, ThemeTitleBarWidget widget)
void InvokeWindowTitleDrawingUPP(const Rect *bounds, SInt16 depth, Boolean colorDevice, UInt32 userData, WindowTitleDrawingUPP userUPP)
ThemeButtonDrawUPP NewThemeButtonDrawUPP(ThemeButtonDrawProcPtr userRoutine)
void DisposeThemeEraseUPP(ThemeEraseUPP userUPP)
OSStatus EndThemeDragSound(void)
OSStatus SetThemeCursor(ThemeCursor inCursor)
OSStatus DrawThemeGenericWell(const Rect *inRect, ThemeDrawState inState, Boolean inFillCenter)
OSStatus NormalizeThemeDrawingState(void)
OSStatus SetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice)
void InvokeMenuTitleDrawingUPP(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData, MenuTitleDrawingUPP userUPP)
OSStatus DrawThemeTabPane(const Rect *inRect, ThemeDrawState inState)
void InvokeThemeEraseUPP(const Rect *bounds, UInt32 eraseData, SInt16 depth, Boolean isColorDev, ThemeEraseUPP userUPP)
OSStatus GetThemeTabRegion(const Rect *inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection, RgnHandle ioRgn)
OSStatus DrawThemeMenuSeparator(const Rect *inItemRect)
OSStatus DrawThemePopupArrow(const Rect *bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, ThemeEraseUPP eraseProc, UInt32 eraseData)
OSStatus DrawThemeWindowFrame(ThemeWindowType flavor, const Rect *contRect, ThemeDrawState state, const ThemeWindowMetrics *metrics, ThemeWindowAttributes attributes, WindowTitleDrawingUPP titleProc, UInt32 titleData)
OSStatus GetThemeTrackThumbRgn(const ThemeTrackDrawInfo *drawInfo, RgnHandle thumbRgn)
ThemeTabTitleDrawUPP NewThemeTabTitleDrawUPP(ThemeTabTitleDrawProcPtr userRoutine)
OSStatus DrawThemeTickMark(const Rect *bounds, ThemeDrawState state)
OSStatus DrawThemeMenuTitle(const Rect *inMenuBarRect, const Rect *inTitleRect, ThemeMenuState inState, UInt32 inAttributes, MenuTitleDrawingUPP inTitleProc, UInt32 inTitleData)
MenuTitleDrawingUPP NewMenuTitleDrawingUPP(MenuTitleDrawingProcPtr userRoutine)
OSStatus DrawThemeMenuBarBackground(const Rect *inBounds, ThemeMenuBarState inState, UInt32 inAttributes)
ThemeEraseUPP NewThemeEraseUPP(ThemeEraseProcPtr userRoutine)
OSStatus RegisterAppearanceClient(void)
OSStatus GetThemeCheckBoxStyle(ThemeCheckBoxStyle *outStyle)
Boolean IsAppearanceClient(const ProcessSerialNumber *process)
MenuItemDrawingUPP NewMenuItemDrawingUPP(MenuItemDrawingProcPtr userRoutine)
OSStatus GetThemeScrollBarArrowStyle(ThemeScrollBarArrowStyle *outStyle)
OSStatus DrawThemeWindowHeader(const Rect *inRect, ThemeDrawState inState)
OSStatus GetThemeTrackBounds(const ThemeTrackDrawInfo *drawInfo, Rect *bounds)
Boolean InvokeThemeIteratorUPP(ConstStr255Param inFileName, SInt16 resID, Collection inThemeSettings, void *inUserData, ThemeIteratorUPP userUPP)
OSStatus DrawThemeTrackTickMarks(const ThemeTrackDrawInfo *drawInfo, ItemCount numTicks, ThemeEraseUPP eraseProc, UInt32 eraseData)
OSStatus DrawThemeTrack(const ThemeTrackDrawInfo *drawInfo, RgnHandle rgnGhost, ThemeEraseUPP eraseProc, UInt32 eraseData)
@ kThemeMetricMenuMarkColumnWidth
Definition: Appearance.h:1316
OSStatus SetThemeDrawingState(ThemeDrawingState inState, Boolean inDisposeNow)
OSStatus GetTheme(Collection ioCollection)
OSStatus DisposeThemeDrawingState(ThemeDrawingState inState)
OSStatus SetThemeWindowBackground(WindowRef inWindow, ThemeBrush inBrush, Boolean inUpdate)
OSStatus DrawThemeSeparator(const Rect *inRect, ThemeDrawState inState)
OSStatus GetThemeTextDimensions(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Point *ioBounds, SInt16 *outBaseline)
OSStatus ApplyThemeBackground(ThemeBackgroundKind inKind, const Rect *bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev)
OSStatus DrawThemeStandaloneNoGrowBox(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state)
OSStatus DrawThemeFocusRegion(RgnHandle inRegion, Boolean inHasFocus)
OSStatus GetThemeMenuItemExtra(ThemeMenuItemType inItemType, SInt16 *outHeight, SInt16 *outWidth)
OSStatus GetThemeScrollBarTrackRect(const Rect *bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Rect *trackBounds)
OSStatus GetThemeBrushAsColor(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev, RGBColor *outColor)
OSStatus GetThemeButtonBackgroundBounds(const Rect *inBounds, ThemeButtonKind inKind, const ThemeButtonDrawInfo *inDrawInfo, Rect *outBounds)
OSStatus BeginThemeDragSound(ThemeDragSoundKind kind)
OSStatus CopyThemeIdentifier(CFStringRef *outIdentifier)
void DisposeMenuItemDrawingUPP(MenuItemDrawingUPP userUPP)
OSStatus GetThemeTrackThumbPositionFromRegion(const ThemeTrackDrawInfo *drawInfo, RgnHandle thumbRgn, SInt32 *relativePosition)
void DisposeThemeIteratorUPP(ThemeIteratorUPP userUPP)
OSStatus TruncateThemeText(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere, Boolean *outTruncated)
OSStatus GetThemeTrackLiveValue(const ThemeTrackDrawInfo *drawInfo, SInt32 relativePosition, SInt32 *value)
struct OpaqueCollection * Collection
Definition: Collections.h:158
Control Manager interfaces.
OSErr codes.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
Window Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Quickdraw Offscreen GWorld Interfaces.
short TruncCode
Definition: QuickdrawText.h:101
Interface to Quickdraw Graphics.
TextEdit Interfaces.
Text Utilities Interfaces.
Definition: Quickdraw.h:1968
Definition: Quickdraw.h:1648
Definition: Quickdraw.h:306
Definition: MacTypes.h:520
Definition: Processes.h:65
Definition: Appearance.h:782
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527
Definition: Appearance.h:770
Definition: Appearance.h:776
Definition: Appearance.h:986
Definition: Appearance.h:787
Definition: Appearance.h:1221