Appearance.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:91k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       Appearance.h
  3.  
  4.      Contains:   Appearance Manager Interfaces.
  5.  
  6.      Version:    Technology: Mac OS 9
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __APPEARANCE__
  18. #define __APPEARANCE__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __QUICKDRAW__
  23. #include "Quickdraw.h"
  24. #endif
  25. #ifndef __TEXTEDIT__
  26. #include "TextEdit.h"
  27. #endif
  28. #ifndef __QDOFFSCREEN__
  29. #include "QDOffscreen.h"
  30. #endif
  31. #ifndef __MACWINDOWS__
  32. #include "MacWindows.h"
  33. #endif
  34. #ifndef __CONTROLS__
  35. #include "Controls.h"
  36. #endif
  37. #ifndef __MACERRORS__
  38. #include "MacErrors.h"
  39. #endif
  40. /*----------------------------------------------------------------------------------*/
  41. /* Appearance Manager constants, etc.                                               */
  42. /*----------------------------------------------------------------------------------*/
  43. /* Appearance Manager Apple Events (1.1 and later)              */
  44. #if PRAGMA_ONCE
  45. #pragma once
  46. #endif
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50. #if PRAGMA_IMPORT
  51. #pragma import on
  52. #endif
  53. #if PRAGMA_STRUCT_ALIGN
  54.     #pragma options align=mac68k
  55. #elif PRAGMA_STRUCT_PACKPUSH
  56.     #pragma pack(push, 2)
  57. #elif PRAGMA_STRUCT_PACK
  58.     #pragma pack(2)
  59. #endif
  60. enum {
  61.     kAppearanceEventClass       = FOUR_CHAR_CODE('appr'),       /* Event Class */
  62.     kAEAppearanceChanged        = FOUR_CHAR_CODE('thme'),       /* Appearance changed (e.g. platinum to hi-tech) */
  63.     kAESystemFontChanged        = FOUR_CHAR_CODE('sysf'),       /* system font changed */
  64.     kAESmallSystemFontChanged   = FOUR_CHAR_CODE('ssfn'),       /* small system font changed */
  65.     kAEViewsFontChanged         = FOUR_CHAR_CODE('vfnt')        /* views font changed */
  66. };
  67. /*----------------------------------------------------------------------------------*/
  68. /* Appearance Manager file types                                                    */
  69. /*----------------------------------------------------------------------------------*/
  70. enum {
  71.     kThemeDataFileType          = FOUR_CHAR_CODE('thme'),       /* file type for theme files */
  72.     kThemePlatinumFileType      = FOUR_CHAR_CODE('pltn'),       /* file type for platinum appearance */
  73.     kThemeCustomThemesFileType  = FOUR_CHAR_CODE('scen'),       /* file type for user themes */
  74.     kThemeSoundTrackFileType    = FOUR_CHAR_CODE('tsnd')
  75. };
  76. enum {
  77.     kThemeBrushDialogBackgroundActive = 1,                      /* Dialogs */
  78.     kThemeBrushDialogBackgroundInactive = 2,                    /* Dialogs */
  79.     kThemeBrushAlertBackgroundActive = 3,
  80.     kThemeBrushAlertBackgroundInactive = 4,
  81.     kThemeBrushModelessDialogBackgroundActive = 5,
  82.     kThemeBrushModelessDialogBackgroundInactive = 6,
  83.     kThemeBrushUtilityWindowBackgroundActive = 7,               /* Miscellaneous */
  84.     kThemeBrushUtilityWindowBackgroundInactive = 8,             /* Miscellaneous */
  85.     kThemeBrushListViewSortColumnBackground = 9,                /* Finder */
  86.     kThemeBrushListViewBackground = 10,
  87.     kThemeBrushIconLabelBackground = 11,
  88.     kThemeBrushListViewSeparator = 12,
  89.     kThemeBrushChasingArrows    = 13,
  90.     kThemeBrushDragHilite       = 14,
  91.     kThemeBrushDocumentWindowBackground = 15,
  92.     kThemeBrushFinderWindowBackground = 16
  93. };
  94. /* Brushes available in Appearance 1.1 or later */
  95. enum {
  96.     kThemeBrushScrollBarDelimiterActive = 17,
  97.     kThemeBrushScrollBarDelimiterInactive = 18,
  98.     kThemeBrushFocusHighlight   = 19,
  99.     kThemeBrushPopupArrowActive = 20,
  100.     kThemeBrushPopupArrowPressed = 21,
  101.     kThemeBrushPopupArrowInactive = 22,
  102.     kThemeBrushAppleGuideCoachmark = 23,
  103.     kThemeBrushIconLabelBackgroundSelected = 24,
  104.     kThemeBrushStaticAreaFill   = 25,
  105.     kThemeBrushActiveAreaFill   = 26,
  106.     kThemeBrushButtonFrameActive = 27,
  107.     kThemeBrushButtonFrameInactive = 28,
  108.     kThemeBrushButtonFaceActive = 29,
  109.     kThemeBrushButtonFaceInactive = 30,
  110.     kThemeBrushButtonFacePressed = 31,
  111.     kThemeBrushButtonActiveDarkShadow = 32,
  112.     kThemeBrushButtonActiveDarkHighlight = 33,
  113.     kThemeBrushButtonActiveLightShadow = 34,
  114.     kThemeBrushButtonActiveLightHighlight = 35,
  115.     kThemeBrushButtonInactiveDarkShadow = 36,
  116.     kThemeBrushButtonInactiveDarkHighlight = 37,
  117.     kThemeBrushButtonInactiveLightShadow = 38,
  118.     kThemeBrushButtonInactiveLightHighlight = 39,
  119.     kThemeBrushButtonPressedDarkShadow = 40,
  120.     kThemeBrushButtonPressedDarkHighlight = 41,
  121.     kThemeBrushButtonPressedLightShadow = 42,
  122.     kThemeBrushButtonPressedLightHighlight = 43,
  123.     kThemeBrushBevelActiveLight = 44,
  124.     kThemeBrushBevelActiveDark  = 45,
  125.     kThemeBrushBevelInactiveLight = 46,
  126.     kThemeBrushBevelInactiveDark = 47
  127. };
  128. /* Brushes available in Appearance 1.1.1 or later */
  129. enum {
  130.     kThemeBrushNotificationWindowBackground = 48
  131. };
  132. /* These values are meta-brushes, specific colors that do not       */
  133. /* change from theme to theme. You can use them instead of using    */
  134. /* direct RGB values.                                               */
  135. enum {
  136.     kThemeBrushBlack            = -1,
  137.     kThemeBrushWhite            = -2
  138. };
  139. typedef SInt16                          ThemeBrush;
  140. enum {
  141.     kThemeTextColorDialogActive = 1,
  142.     kThemeTextColorDialogInactive = 2,
  143.     kThemeTextColorAlertActive  = 3,
  144.     kThemeTextColorAlertInactive = 4,
  145.     kThemeTextColorModelessDialogActive = 5,
  146.     kThemeTextColorModelessDialogInactive = 6,
  147.     kThemeTextColorWindowHeaderActive = 7,
  148.     kThemeTextColorWindowHeaderInactive = 8,
  149.     kThemeTextColorPlacardActive = 9,
  150.     kThemeTextColorPlacardInactive = 10,
  151.     kThemeTextColorPlacardPressed = 11,
  152.     kThemeTextColorPushButtonActive = 12,
  153.     kThemeTextColorPushButtonInactive = 13,
  154.     kThemeTextColorPushButtonPressed = 14,
  155.     kThemeTextColorBevelButtonActive = 15,
  156.     kThemeTextColorBevelButtonInactive = 16,
  157.     kThemeTextColorBevelButtonPressed = 17,
  158.     kThemeTextColorPopupButtonActive = 18,
  159.     kThemeTextColorPopupButtonInactive = 19,
  160.     kThemeTextColorPopupButtonPressed = 20,
  161.     kThemeTextColorIconLabel    = 21,
  162.     kThemeTextColorListView     = 22
  163. };
  164. /* Text Colors available in Appearance 1.0.1 or later */
  165. enum {
  166.     kThemeTextColorDocumentWindowTitleActive = 23,
  167.     kThemeTextColorDocumentWindowTitleInactive = 24,
  168.     kThemeTextColorMovableModalWindowTitleActive = 25,
  169.     kThemeTextColorMovableModalWindowTitleInactive = 26,
  170.     kThemeTextColorUtilityWindowTitleActive = 27,
  171.     kThemeTextColorUtilityWindowTitleInactive = 28,
  172.     kThemeTextColorPopupWindowTitleActive = 29,
  173.     kThemeTextColorPopupWindowTitleInactive = 30,
  174.     kThemeTextColorRootMenuActive = 31,
  175.     kThemeTextColorRootMenuSelected = 32,
  176.     kThemeTextColorRootMenuDisabled = 33,
  177.     kThemeTextColorMenuItemActive = 34,
  178.     kThemeTextColorMenuItemSelected = 35,
  179.     kThemeTextColorMenuItemDisabled = 36,
  180.     kThemeTextColorPopupLabelActive = 37,
  181.     kThemeTextColorPopupLabelInactive = 38
  182. };
  183. /* Text colors available in Appearance 1.1 or later */
  184. enum {
  185.     kThemeTextColorTabFrontActive = 39,
  186.     kThemeTextColorTabNonFrontActive = 40,
  187.     kThemeTextColorTabNonFrontPressed = 41,
  188.     kThemeTextColorTabFrontInactive = 42,
  189.     kThemeTextColorTabNonFrontInactive = 43,
  190.     kThemeTextColorIconLabelSelected = 44,
  191.     kThemeTextColorBevelButtonStickyActive = 45,
  192.     kThemeTextColorBevelButtonStickyInactive = 46
  193. };
  194. /* Text colors available in Appearance 1.1.1 or later */
  195. enum {
  196.     kThemeTextColorNotification = 47
  197. };
  198. /* These values are specific colors that do not change from             */
  199. /* theme to theme. You can use them instead of using direct RGB values. */
  200. enum {
  201.     kThemeTextColorBlack        = -1,
  202.     kThemeTextColorWhite        = -2
  203. };
  204. typedef SInt16                          ThemeTextColor;
  205. /* States to draw primitives: disabled, active, and pressed (hilited) */
  206. enum {
  207.     kThemeStateInactive         = 0,
  208.     kThemeStateActive           = 1,
  209.     kThemeStatePressed          = 2,
  210.     kThemeStateRollover         = 6,
  211.     kThemeStateDisabled         = 7
  212. };
  213. enum {
  214.     kThemeStatePressedUp        = 2,                            /* draw with up pressed     (increment/decrement buttons) */
  215.     kThemeStatePressedDown      = 3                             /* draw with down pressed (increment/decrement buttons) */
  216. };
  217. typedef UInt32                          ThemeDrawState;
  218. /*----------------------------------------------------------------------------------*/
  219. /* Theme cursor selectors available in Appearance 1.1 or later                      */
  220. /*----------------------------------------------------------------------------------*/
  221. enum {
  222.     kThemeArrowCursor           = 0,
  223.     kThemeCopyArrowCursor       = 1,
  224.     kThemeAliasArrowCursor      = 2,
  225.     kThemeContextualMenuArrowCursor = 3,
  226.     kThemeIBeamCursor           = 4,
  227.     kThemeCrossCursor           = 5,
  228.     kThemePlusCursor            = 6,
  229.     kThemeWatchCursor           = 7,                            /* Can Animate */
  230.     kThemeClosedHandCursor      = 8,
  231.     kThemeOpenHandCursor        = 9,
  232.     kThemePointingHandCursor    = 10,
  233.     kThemeCountingUpHandCursor  = 11,                           /* Can Animate */
  234.     kThemeCountingDownHandCursor = 12,                          /* Can Animate */
  235.     kThemeCountingUpAndDownHandCursor = 13,                     /* Can Animate */
  236.     kThemeSpinningCursor        = 14,                           /* Can Animate */
  237.     kThemeResizeLeftCursor      = 15,
  238.     kThemeResizeRightCursor     = 16,
  239.     kThemeResizeLeftRightCursor = 17
  240. };
  241. typedef UInt32                          ThemeCursor;
  242. /*----------------------------------------------------------------------------------*/
  243. /* Theme menu bar drawing states                                                    */
  244. /*----------------------------------------------------------------------------------*/
  245. enum {
  246.     kThemeMenuBarNormal         = 0,
  247.     kThemeMenuBarSelected       = 1
  248. };
  249. typedef UInt16                          ThemeMenuBarState;
  250. /* attributes */
  251. enum {
  252.     kThemeMenuSquareMenuBar     = (1 << 0)
  253. };
  254. /*----------------------------------------------------------------------------------*/
  255. /* Theme menu drawing states                                                        */
  256. /*----------------------------------------------------------------------------------*/
  257. enum {
  258.     kThemeMenuActive            = 0,
  259.     kThemeMenuSelected          = 1,
  260.     kThemeMenuDisabled          = 3
  261. };
  262. typedef UInt16                          ThemeMenuState;
  263. /*------------------------------------------------------------------------------------------*/
  264. /* MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire  */
  265. /* menu is inactive                                                                         */
  266. /*------------------------------------------------------------------------------------------*/
  267. enum {
  268.     kThemeMenuTypePullDown      = 0,
  269.     kThemeMenuTypePopUp         = 1,
  270.     kThemeMenuTypeHierarchical  = 2,
  271.     kThemeMenuTypeInactive      = 0x0100
  272. };
  273. typedef UInt16                          ThemeMenuType;
  274. enum {
  275.     kThemeMenuItemPlain         = 0,
  276.     kThemeMenuItemHierarchical  = 1,                            /* item has hierarchical arrow*/
  277.     kThemeMenuItemScrollUpArrow = 2,                            /* for scrollable menus, indicates item is scroller*/
  278.     kThemeMenuItemScrollDownArrow = 3,
  279.     kThemeMenuItemAtTop         = 0x0100,                       /* indicates item is being drawn at top of menu*/
  280.     kThemeMenuItemAtBottom      = 0x0200,                       /* indicates item is being drawn at bottom of menu*/
  281.     kThemeMenuItemHierBackground = 0x0400,                      /* item is within a hierarchical menu*/
  282.     kThemeMenuItemPopUpBackground = 0x0800,                     /* item is within a popped up menu*/
  283.     kThemeMenuItemHasIcon       = 0x8000                        /* add into non-arrow type when icon present.*/
  284. };
  285. typedef UInt16                          ThemeMenuItemType;
  286. /*------------------------------------------------------------------------------------------*/
  287. /* Theme Backgrounds                                                                        */
  288. /*------------------------------------------------------------------------------------------*/
  289. enum {
  290.     kThemeBackgroundTabPane     = 1,
  291.     kThemeBackgroundPlacard     = 2,
  292.     kThemeBackgroundWindowHeader = 3,
  293.     kThemeBackgroundListViewWindowHeader = 4
  294. };
  295. typedef UInt32                          ThemeBackgroundKind;
  296. /*------------------------------------------------------------------------------------------*/
  297. /* Theme Collection tags for Get/SetTheme                                                   */
  298. /*------------------------------------------------------------------------------------------*/
  299. enum {
  300.     kThemeNameTag               = FOUR_CHAR_CODE('name'),       /* Str255*/
  301.     kThemeAppearanceFileNameTag = FOUR_CHAR_CODE('thme'),       /* Str255*/
  302.     kThemeVariantNameTag        = FOUR_CHAR_CODE('varn'),       /* Str255*/
  303.     kThemeSystemFontTag         = FOUR_CHAR_CODE('lgsf'),       /* Str255*/
  304.     kThemeSmallSystemFontTag    = FOUR_CHAR_CODE('smsf'),       /* Str255*/
  305.     kThemeViewsFontTag          = FOUR_CHAR_CODE('vfnt'),       /* Str255*/
  306.     kThemeViewsFontSizeTag      = FOUR_CHAR_CODE('vfsz'),       /* SInt16*/
  307.     kThemeDesktopPatternNameTag = FOUR_CHAR_CODE('patn'),       /* Str255*/
  308.     kThemeDesktopPatternTag     = FOUR_CHAR_CODE('patt'),       /* <variable-length data> (flattened pattern)*/
  309.     kThemeDesktopPictureNameTag = FOUR_CHAR_CODE('dpnm'),       /* Str255*/
  310.     kThemeDesktopPictureAliasTag = FOUR_CHAR_CODE('dpal'),      /* <alias handle>*/
  311.     kThemeDesktopPictureAlignmentTag = FOUR_CHAR_CODE('dpan'),  /* UInt32*/
  312.     kThemeHighlightColorNameTag = FOUR_CHAR_CODE('hcnm'),       /* Str255*/
  313.     kThemeHighlightColorTag     = FOUR_CHAR_CODE('hcol'),       /* RGBColor*/
  314.     kThemeExamplePictureIDTag   = FOUR_CHAR_CODE('epic'),       /* SInt16*/
  315.     kThemeSoundsEnabledTag      = FOUR_CHAR_CODE('snds'),       /* Boolean*/
  316.     kThemeSoundTrackNameTag     = FOUR_CHAR_CODE('sndt'),       /* Str255*/
  317.     kThemeSoundMaskTag          = FOUR_CHAR_CODE('smsk'),       /* UInt32*/
  318.     kThemeUserDefinedTag        = FOUR_CHAR_CODE('user'),       /* Boolean (this should _always_ be true if present - used by Control Panel).*/
  319.     kThemeScrollBarArrowStyleTag = FOUR_CHAR_CODE('sbar'),      /* ThemeScrollBarArrowStyle*/
  320.     kThemeScrollBarThumbStyleTag = FOUR_CHAR_CODE('sbth'),      /* ThemeScrollBarThumbStyle*/
  321.     kThemeSmoothFontEnabledTag  = FOUR_CHAR_CODE('smoo'),       /* Boolean*/
  322.     kThemeSmoothFontMinSizeTag  = FOUR_CHAR_CODE('smos'),       /* UInt16 (must be >= 12 and <= 24)*/
  323.     kThemeDblClickCollapseTag   = FOUR_CHAR_CODE('coll')        /* Boolean*/
  324. };
  325. /*------------------------------------------------------------------------------------------*/
  326. /* Theme Control Settings                                                                   */
  327. /*------------------------------------------------------------------------------------------*/
  328. enum {
  329.     kThemeCheckBoxClassicX      = 0,                            /* check box with an 'X'*/
  330.     kThemeCheckBoxCheckMark     = 1                             /* check box with a real check mark*/
  331. };
  332. typedef UInt16                          ThemeCheckBoxStyle;
  333. enum {
  334.     kThemeScrollBarArrowsSingle = 0,                            /* single arrow on each end*/
  335.     kThemeScrollBarArrowsLowerRight = 1                         /* double arrows only on right or bottom*/
  336. };
  337. typedef UInt16                          ThemeScrollBarArrowStyle;
  338. enum {
  339.     kThemeScrollBarThumbNormal  = 0,                            /* normal, classic thumb size*/
  340.     kThemeScrollBarThumbProportional = 1                        /* proportional thumbs*/
  341. };
  342. typedef UInt16                          ThemeScrollBarThumbStyle;
  343. /*------------------------------------------------------------------------------------------*/
  344. /* Font constants                                                                           */
  345. /*------------------------------------------------------------------------------------------*/
  346. enum {
  347.     kThemeSystemFont            = 0,
  348.     kThemeSmallSystemFont       = 1,
  349.     kThemeSmallEmphasizedSystemFont = 2,
  350.     kThemeViewsFont             = 3
  351. };
  352. typedef UInt16                          ThemeFontID;
  353. /*------------------------------------------------------------------------------------------*/
  354. /* Tab constants                                                                            */
  355. /*------------------------------------------------------------------------------------------*/
  356. enum {
  357.     kThemeTabNonFront           = 0,
  358.     kThemeTabNonFrontPressed    = 1,
  359.     kThemeTabNonFrontInactive   = 2,
  360.     kThemeTabFront              = 3,
  361.     kThemeTabFrontInactive      = 4
  362. };
  363. typedef UInt16                          ThemeTabStyle;
  364. enum {
  365.     kThemeTabNorth              = 0,
  366.     kThemeTabSouth              = 1,
  367.     kThemeTabEast               = 2,
  368.     kThemeTabWest               = 3
  369. };
  370. typedef UInt16                          ThemeTabDirection;
  371. /* NOTE ON TAB HEIGHT                                                                       */
  372. /* Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating the rects   */
  373. /* to draw tabs into. This height includes the tab frame overlap. Tabs that are not in the  */
  374. /* front are only drawn down to where they meet the frame, as if the height was just        */
  375. /* kThemeLargeTabHeight, for example, as opposed to the ...Max constant. Remember that for  */
  376. /* East and West tabs, the height referred to below is actually the width.                  */
  377. enum {
  378.     kThemeSmallTabHeight        = 16,                           /* amount small tabs protrude from frame.*/
  379.     kThemeLargeTabHeight        = 21,                           /* amount large tabs protrude from frame.*/
  380.     kThemeTabPaneOverlap        = 3,                            /* amount tabs overlap frame.*/
  381.     kThemeSmallTabHeightMax     = 19,                           /* small tab height + overlap*/
  382.     kThemeLargeTabHeightMax     = 24                            /* large tab height + overlap*/
  383. };
  384. /*------------------------------------------------------------------------------------------*/
  385. /* Track kinds                                                                              */
  386. /*------------------------------------------------------------------------------------------*/
  387. enum {
  388.     kThemeScrollBar             = 0,
  389.     kThemeSmallScrollBar        = 1,
  390.     kThemeSlider                = 2,
  391.     kThemeProgressBar           = 3,
  392.     kThemeIndeterminateBar      = 4
  393. };
  394. typedef UInt16                          ThemeTrackKind;
  395. /*------------------------------------------------------------------------------------------*/
  396. /* Track enable states                                                                      */
  397. /*------------------------------------------------------------------------------------------*/
  398. enum {
  399.                                                                 /* track states */
  400.     kThemeTrackActive           = 0,
  401.     kThemeTrackDisabled         = 1,
  402.     kThemeTrackNothingToScroll  = 2,
  403.     kThemeTrackInactive         = 3
  404. };
  405. typedef UInt8                           ThemeTrackEnableState;
  406. /*------------------------------------------------------------------------------------------*/
  407. /* Track pressed states                                                                     */
  408. /*------------------------------------------------------------------------------------------*/
  409. enum {
  410.                                                                 /* press states (ignored unless track is active) */
  411.     kThemeLeftOutsideArrowPressed = 0x01,
  412.     kThemeLeftInsideArrowPressed = 0x02,
  413.     kThemeLeftTrackPressed      = 0x04,
  414.     kThemeThumbPressed          = 0x08,
  415.     kThemeRightTrackPressed     = 0x10,
  416.     kThemeRightInsideArrowPressed = 0x20,
  417.     kThemeRightOutsideArrowPressed = 0x40,
  418.     kThemeTopOutsideArrowPressed = kThemeLeftOutsideArrowPressed,
  419.     kThemeTopInsideArrowPressed = kThemeLeftInsideArrowPressed,
  420.     kThemeTopTrackPressed       = kThemeLeftTrackPressed,
  421.     kThemeBottomTrackPressed    = kThemeRightTrackPressed,
  422.     kThemeBottomInsideArrowPressed = kThemeRightInsideArrowPressed,
  423.     kThemeBottomOutsideArrowPressed = kThemeRightOutsideArrowPressed
  424. };
  425. typedef UInt8                           ThemeTrackPressState;
  426. /*------------------------------------------------------------------------------------------*/
  427. /* Thumb directions                                                                         */
  428. /*------------------------------------------------------------------------------------------*/
  429. enum {
  430.                                                                 /* thumb direction */
  431.     kThemeThumbPlain            = 0,
  432.     kThemeThumbUpward           = 1,
  433.     kThemeThumbDownward         = 2
  434. };
  435. typedef UInt8                           ThemeThumbDirection;
  436. /*------------------------------------------------------------------------------------------*/
  437. /* Track attributes                                                                         */
  438. /*------------------------------------------------------------------------------------------*/
  439. enum {
  440.     kThemeTrackHorizontal       = (1 << 0),                     /* track is drawn horizontally*/
  441.     kThemeTrackRightToLeft      = (1 << 1),                     /* track progresses from right to left*/
  442.     kThemeTrackShowThumb        = (1 << 2),                     /* track's thumb should be drawn*/
  443.     kThemeTrackThumbRgnIsNotGhost = (1 << 3)                    /* the provided thumbRgn should be drawn opaque, not as a ghost*/
  444. };
  445. typedef UInt16                          ThemeTrackAttributes;
  446. /*------------------------------------------------------------------------------------------*/
  447. /* Track info block                                                                         */
  448. /*------------------------------------------------------------------------------------------*/
  449. struct ScrollBarTrackInfo {
  450.     SInt32                          viewsize;                   /* current view range size */
  451.     ThemeTrackPressState            pressState;                 /* pressed parts state */
  452. };
  453. typedef struct ScrollBarTrackInfo       ScrollBarTrackInfo;
  454. struct SliderTrackInfo {
  455.     ThemeThumbDirection             thumbDir;                   /* thumb direction */
  456.     ThemeTrackPressState            pressState;                 /* pressed parts state */
  457. };
  458. typedef struct SliderTrackInfo          SliderTrackInfo;
  459. struct ProgressTrackInfo {
  460.     UInt8                           phase;                      /* phase for indeterminate progress */
  461. };
  462. typedef struct ProgressTrackInfo        ProgressTrackInfo;
  463. struct ThemeTrackDrawInfo {
  464.     ThemeTrackKind                  kind;                       /* what kind of track this info is for */
  465.     Rect                            bounds;                     /* track basis rectangle */
  466.     SInt32                          min;                        /* min track value */
  467.     SInt32                          max;                        /* max track value */
  468.     SInt32                          value;                      /* current thumb value */
  469.     UInt32                          reserved;
  470.     ThemeTrackAttributes            attributes;                 /* various track attributes */
  471.     ThemeTrackEnableState           enableState;                /* enable state */
  472.     UInt8                           filler1;
  473.     union {
  474.         ScrollBarTrackInfo              scrollbar;
  475.         SliderTrackInfo                 slider;
  476.         ProgressTrackInfo               progress;
  477.     }                                 trackInfo;
  478. };
  479. typedef struct ThemeTrackDrawInfo       ThemeTrackDrawInfo;
  480. /*------------------------------------------------------------------------------------------*/
  481. /* ThemeWindowAttributes                                                                    */
  482. /*------------------------------------------------------------------------------------------*/
  483. enum {
  484.     kThemeWindowHasGrow         = (1 << 0),                     /* can the size of the window be changed by the user? */
  485.     kThemeWindowHasHorizontalZoom = (1 << 3),                   /* window can zoom only horizontally */
  486.     kThemeWindowHasVerticalZoom = (1 << 4),                     /* window can zoom only vertically */
  487.     kThemeWindowHasFullZoom     = kThemeWindowHasHorizontalZoom + kThemeWindowHasVerticalZoom, /* window zooms in all directions */
  488.     kThemeWindowHasCloseBox     = (1 << 5),                     /* window has a close box */
  489.     kThemeWindowHasCollapseBox  = (1 << 6),                     /* window has a collapse box */
  490.     kThemeWindowHasTitleText    = (1 << 7),                     /* window has a title/title icon */
  491.     kThemeWindowIsCollapsed     = (1 << 8),                     /* window is in the collapsed state */
  492.     kThemeWindowHasA            = (1 << 9),
  493.     kThemeWindowHasB            = (1 << 10)
  494. };
  495. typedef UInt32                          ThemeWindowAttributes;
  496. /*------------------------------------------------------------------------------------------*/
  497. /* Window Types Supported by the Appearance Manager                                         */
  498. /*------------------------------------------------------------------------------------------*/
  499. enum {
  500.     kThemeDocumentWindow        = 0,
  501.     kThemeDialogWindow          = 1,
  502.     kThemeMovableDialogWindow   = 2,
  503.     kThemeAlertWindow           = 3,
  504.     kThemeMovableAlertWindow    = 4,
  505.     kThemePlainDialogWindow     = 5,
  506.     kThemeShadowDialogWindow    = 6,
  507.     kThemePopupWindow           = 7,
  508.     kThemeUtilityWindow         = 8,
  509.     kThemeUtilitySideWindow     = 9
  510. };
  511. typedef UInt16                          ThemeWindowType;
  512. /*------------------------------------------------------------------------------------------*/
  513. /* Window Widgets Supported by the Appearance Manager                                       */
  514. /*------------------------------------------------------------------------------------------*/
  515. enum {
  516.     kThemeWidgetCloseBox        = 0,
  517.     kThemeWidgetZoomBox         = 1,
  518.     kThemeWidgetCollapseBox     = 2,
  519.     kThemeWidgetABox            = 3,
  520.     kThemeWidgetBBox            = 4,
  521.     kThemeWidgetBOffBox         = 5
  522. };
  523. typedef UInt16                          ThemeTitleBarWidget;
  524. /*------------------------------------------------------------------------------------------*/
  525. /* Popup arrow orientations                                                                 */
  526. /*------------------------------------------------------------------------------------------*/
  527. enum {
  528.     kThemeArrowLeft             = 0,
  529.     kThemeArrowDown             = 1,
  530.     kThemeArrowRight            = 2,
  531.     kThemeArrowUp               = 3
  532. };
  533. typedef UInt16                          ThemeArrowOrientation;
  534. /*------------------------------------------------------------------------------------------*/
  535. /* Popup arrow sizes                                                                        */
  536. /*------------------------------------------------------------------------------------------*/
  537. enum {
  538.     kThemeArrow3pt              = 0,
  539.     kThemeArrow5pt              = 1,
  540.     kThemeArrow7pt              = 2,
  541.     kThemeArrow9pt              = 3
  542. };
  543. typedef UInt16                          ThemePopupArrowSize;
  544. /*------------------------------------------------------------------------------------------*/
  545. /* Grow box directions                                                                      */
  546. /*------------------------------------------------------------------------------------------*/
  547. enum {
  548.     kThemeGrowLeft              = (1 << 0),                     /* can grow to the left */
  549.     kThemeGrowRight             = (1 << 1),                     /* can grow to the right */
  550.     kThemeGrowUp                = (1 << 2),                     /* can grow up */
  551.     kThemeGrowDown              = (1 << 3)                      /* can grow down */
  552. };
  553. typedef UInt16                          ThemeGrowDirection;
  554. /*------------------------------------------------------------------------------------------*/
  555. /* Button kinds                                                                             */
  556. /*------------------------------------------------------------------------------------------*/
  557. enum {
  558.     kThemePushButton            = 0,
  559.     kThemeCheckBox              = 1,
  560.     kThemeRadioButton           = 2,
  561.     kThemeBevelButton           = 3,                            /* bevel button (obsolete) */
  562.     kThemeArrowButton           = 4,                            /* popup button without text  (no label) */
  563.     kThemePopupButton           = 5,                            /* popup button */
  564.     kThemeDisclosureButton      = 6,
  565.     kThemeIncDecButton          = 7,                            /* increment/decrement buttons  (no label) */
  566.     kThemeSmallBevelButton      = 8,                            /* small-shadow bevel button */
  567.     kThemeMediumBevelButton     = 3,                            /* med-shadow bevel button */
  568.     kThemeLargeBevelButton      = 9                             /* large-shadow bevel button */
  569. };
  570. typedef UInt16                          ThemeButtonKind;
  571. /*------------------------------------------------------------------------------------------*/
  572. /* Common button values                                                                     */
  573. /*------------------------------------------------------------------------------------------*/
  574. enum {
  575.     kThemeButtonOff             = 0,
  576.     kThemeButtonOn              = 1,
  577.     kThemeButtonMixed           = 2,
  578.     kThemeDisclosureRight       = 0,
  579.     kThemeDisclosureDown        = 1,
  580.     kThemeDisclosureLeft        = 2
  581. };
  582. typedef UInt16                          ThemeButtonValue;
  583. /*------------------------------------------------------------------------------------------*/
  584. /* Button adornment types                                                                   */
  585. /*------------------------------------------------------------------------------------------*/
  586. enum {
  587.     kThemeAdornmentNone         = 0,
  588.     kThemeAdornmentDefault      = (1 << 0),                     /* if set, draw default ornamentation ( push button only ) */
  589.     kThemeAdornmentFocus        = (1 << 2),                     /* if set, draw focus */
  590.     kThemeAdornmentRightToLeft  = (1 << 4),                     /* if set, draw right to left label */
  591.     kThemeAdornmentDrawIndicatorOnly = (1 << 5)                 /* if set, don't draw or erase label ( radio, check, disclosure ) */
  592. };
  593. typedef UInt16                          ThemeButtonAdornment;
  594. /*------------------------------------------------------------------------------------------*/
  595. /* Button drawing info block                                                                */
  596. /*------------------------------------------------------------------------------------------*/
  597. struct ThemeButtonDrawInfo {
  598.     ThemeDrawState                  state;
  599.     ThemeButtonValue                value;
  600.     ThemeButtonAdornment            adornment;
  601. };
  602. typedef struct ThemeButtonDrawInfo      ThemeButtonDrawInfo;
  603. typedef ThemeButtonDrawInfo *           ThemeButtonDrawInfoPtr;
  604. /*------------------------------------------------------------------------------------------*/
  605. /* Sound Support                                                                            */
  606. /*------------------------------------------------------------------------------------------*/
  607. /*------------------------------------------------------------------------------------------*/
  608. /* Sound classes                                                                            */
  609. /*                                                                                          */
  610. /* You can use the constants below to set what sounds are active using the SetTheme API.    */
  611. /* Use these with the kThemeSoundMask tag.                                                  */
  612. /*------------------------------------------------------------------------------------------*/
  613. enum {
  614.     kThemeNoSounds              = 0,
  615.     kThemeWindowSoundsMask      = (1 << 0),
  616.     kThemeMenuSoundsMask        = (1 << 1),
  617.     kThemeControlSoundsMask     = (1 << 2),
  618.     kThemeFinderSoundsMask      = (1 << 3)
  619. };
  620. /*------------------------------------------------------------------------------------------*/
  621. /* Drag Sounds                                                                              */
  622. /*                                                                                          */
  623. /* Drag sounds are looped for the duration of the drag.                                     */
  624. /*                                                                                          */
  625. /* Call BeginThemeDragSound at the start of the drag.                                       */
  626. /* Call EndThemeDragSound when the drag has finished.                                       */
  627. /*                                                                                          */
  628. /* Note that in order to maintain a consistent user experience, only one drag sound may     */
  629. /* occur at a time.  The sound should be attached to a mouse action, start after the        */
  630. /* mouse goes down and stop when the mouse is released.                                     */
  631. /*------------------------------------------------------------------------------------------*/
  632. enum {
  633.     kThemeDragSoundNone         = 0,
  634.     kThemeDragSoundMoveWindow   = FOUR_CHAR_CODE('wmov'),
  635.     kThemeDragSoundGrowWindow   = FOUR_CHAR_CODE('wgro'),
  636.     kThemeDragSoundMoveUtilWindow = FOUR_CHAR_CODE('umov'),
  637.     kThemeDragSoundGrowUtilWindow = FOUR_CHAR_CODE('ugro'),
  638.     kThemeDragSoundMoveDialog   = FOUR_CHAR_CODE('dmov'),
  639.     kThemeDragSoundMoveAlert    = FOUR_CHAR_CODE('amov'),
  640.     kThemeDragSoundMoveIcon     = FOUR_CHAR_CODE('imov'),
  641.     kThemeDragSoundSliderThumb  = FOUR_CHAR_CODE('slth'),
  642.     kThemeDragSoundSliderGhost  = FOUR_CHAR_CODE('slgh'),
  643.     kThemeDragSoundScrollBarThumb = FOUR_CHAR_CODE('sbth'),
  644.     kThemeDragSoundScrollBarGhost = FOUR_CHAR_CODE('sbgh'),
  645.     kThemeDragSoundScrollBarArrowDecreasing = FOUR_CHAR_CODE('sbad'),
  646.     kThemeDragSoundScrollBarArrowIncreasing = FOUR_CHAR_CODE('sbai'),
  647.     kThemeDragSoundDragging     = FOUR_CHAR_CODE('drag')
  648. };
  649. typedef OSType                          ThemeDragSoundKind;
  650. /*--------------------------------------------------------------------------*/
  651. /* State-change sounds                                                      */
  652. /*                                                                          */
  653. /* State-change sounds are played asynchonously as a one-shot.              */
  654. /*                                                                          */
  655. /* Call PlayThemeSound to play the sound.  The sound will play              */
  656. /* asynchronously until complete, then stop automatically.                  */
  657. /*--------------------------------------------------------------------------*/
  658. enum {
  659.     kThemeSoundNone             = 0,
  660.     kThemeSoundMenuOpen         = FOUR_CHAR_CODE('mnuo'),       /* menu sounds */
  661.     kThemeSoundMenuClose        = FOUR_CHAR_CODE('mnuc'),
  662.     kThemeSoundMenuItemHilite   = FOUR_CHAR_CODE('mnui'),
  663.     kThemeSoundMenuItemRelease  = FOUR_CHAR_CODE('mnus'),
  664.     kThemeSoundWindowClosePress = FOUR_CHAR_CODE('wclp'),       /* window sounds */
  665.     kThemeSoundWindowCloseEnter = FOUR_CHAR_CODE('wcle'),
  666.     kThemeSoundWindowCloseExit  = FOUR_CHAR_CODE('wclx'),
  667.     kThemeSoundWindowCloseRelease = FOUR_CHAR_CODE('wclr'),
  668.     kThemeSoundWindowZoomPress  = FOUR_CHAR_CODE('wzmp'),
  669.     kThemeSoundWindowZoomEnter  = FOUR_CHAR_CODE('wzme'),
  670.     kThemeSoundWindowZoomExit   = FOUR_CHAR_CODE('wzmx'),
  671.     kThemeSoundWindowZoomRelease = FOUR_CHAR_CODE('wzmr'),
  672.     kThemeSoundWindowCollapsePress = FOUR_CHAR_CODE('wcop'),
  673.     kThemeSoundWindowCollapseEnter = FOUR_CHAR_CODE('wcoe'),
  674.     kThemeSoundWindowCollapseExit = FOUR_CHAR_CODE('wcox'),
  675.     kThemeSoundWindowCollapseRelease = FOUR_CHAR_CODE('wcor'),
  676.     kThemeSoundWindowDragBoundary = FOUR_CHAR_CODE('wdbd'),
  677.     kThemeSoundUtilWinClosePress = FOUR_CHAR_CODE('uclp'),      /* utility window sounds */
  678.     kThemeSoundUtilWinCloseEnter = FOUR_CHAR_CODE('ucle'),
  679.     kThemeSoundUtilWinCloseExit = FOUR_CHAR_CODE('uclx'),
  680.     kThemeSoundUtilWinCloseRelease = FOUR_CHAR_CODE('uclr'),
  681.     kThemeSoundUtilWinZoomPress = FOUR_CHAR_CODE('uzmp'),
  682.     kThemeSoundUtilWinZoomEnter = FOUR_CHAR_CODE('uzme'),
  683.     kThemeSoundUtilWinZoomExit  = FOUR_CHAR_CODE('uzmx'),
  684.     kThemeSoundUtilWinZoomRelease = FOUR_CHAR_CODE('uzmr'),
  685.     kThemeSoundUtilWinCollapsePress = FOUR_CHAR_CODE('ucop'),
  686.     kThemeSoundUtilWinCollapseEnter = FOUR_CHAR_CODE('ucoe'),
  687.     kThemeSoundUtilWinCollapseExit = FOUR_CHAR_CODE('ucox'),
  688.     kThemeSoundUtilWinCollapseRelease = FOUR_CHAR_CODE('ucor'),
  689.     kThemeSoundUtilWinDragBoundary = FOUR_CHAR_CODE('udbd'),
  690.     kThemeSoundWindowOpen       = FOUR_CHAR_CODE('wopn'),       /* window close and zoom action */
  691.     kThemeSoundWindowClose      = FOUR_CHAR_CODE('wcls'),
  692.     kThemeSoundWindowZoomIn     = FOUR_CHAR_CODE('wzmi'),
  693.     kThemeSoundWindowZoomOut    = FOUR_CHAR_CODE('wzmo'),
  694.     kThemeSoundWindowCollapseUp = FOUR_CHAR_CODE('wcol'),
  695.     kThemeSoundWindowCollapseDown = FOUR_CHAR_CODE('wexp'),
  696.     kThemeSoundWindowActivate   = FOUR_CHAR_CODE('wact'),
  697.     kThemeSoundUtilWindowOpen   = FOUR_CHAR_CODE('uopn'),
  698.     kThemeSoundUtilWindowClose  = FOUR_CHAR_CODE('ucls'),
  699.     kThemeSoundUtilWindowZoomIn = FOUR_CHAR_CODE('uzmi'),
  700.     kThemeSoundUtilWindowZoomOut = FOUR_CHAR_CODE('uzmo'),
  701.     kThemeSoundUtilWindowCollapseUp = FOUR_CHAR_CODE('ucol'),
  702.     kThemeSoundUtilWindowCollapseDown = FOUR_CHAR_CODE('uexp'),
  703.     kThemeSoundUtilWindowActivate = FOUR_CHAR_CODE('uact'),
  704.     kThemeSoundDialogOpen       = FOUR_CHAR_CODE('dopn'),
  705.     kThemeSoundDialogClose      = FOUR_CHAR_CODE('dlgc'),
  706.     kThemeSoundAlertOpen        = FOUR_CHAR_CODE('aopn'),
  707.     kThemeSoundAlertClose       = FOUR_CHAR_CODE('altc'),
  708.     kThemeSoundPopupWindowOpen  = FOUR_CHAR_CODE('pwop'),
  709.     kThemeSoundPopupWindowClose = FOUR_CHAR_CODE('pwcl'),
  710.     kThemeSoundButtonPress      = FOUR_CHAR_CODE('btnp'),       /* button */
  711.     kThemeSoundButtonEnter      = FOUR_CHAR_CODE('btne'),
  712.     kThemeSoundButtonExit       = FOUR_CHAR_CODE('btnx'),
  713.     kThemeSoundButtonRelease    = FOUR_CHAR_CODE('btnr'),
  714.     kThemeSoundDefaultButtonPress = FOUR_CHAR_CODE('dbtp'),     /* default button */
  715.     kThemeSoundDefaultButtonEnter = FOUR_CHAR_CODE('dbte'),
  716.     kThemeSoundDefaultButtonExit = FOUR_CHAR_CODE('dbtx'),
  717.     kThemeSoundDefaultButtonRelease = FOUR_CHAR_CODE('dbtr'),
  718.     kThemeSoundCancelButtonPress = FOUR_CHAR_CODE('cbtp'),      /* cancel button */
  719.     kThemeSoundCancelButtonEnter = FOUR_CHAR_CODE('cbte'),
  720.     kThemeSoundCancelButtonExit = FOUR_CHAR_CODE('cbtx'),
  721.     kThemeSoundCancelButtonRelease = FOUR_CHAR_CODE('cbtr'),
  722.     kThemeSoundCheckboxPress    = FOUR_CHAR_CODE('chkp'),       /* checkboxes */
  723.     kThemeSoundCheckboxEnter    = FOUR_CHAR_CODE('chke'),
  724.     kThemeSoundCheckboxExit     = FOUR_CHAR_CODE('chkx'),
  725.     kThemeSoundCheckboxRelease  = FOUR_CHAR_CODE('chkr'),
  726.     kThemeSoundRadioPress       = FOUR_CHAR_CODE('radp'),       /* radio buttons */
  727.     kThemeSoundRadioEnter       = FOUR_CHAR_CODE('rade'),
  728.     kThemeSoundRadioExit        = FOUR_CHAR_CODE('radx'),
  729.     kThemeSoundRadioRelease     = FOUR_CHAR_CODE('radr'),
  730.     kThemeSoundScrollArrowPress = FOUR_CHAR_CODE('sbap'),       /* scroll bars */
  731.     kThemeSoundScrollArrowEnter = FOUR_CHAR_CODE('sbae'),
  732.     kThemeSoundScrollArrowExit  = FOUR_CHAR_CODE('sbax'),
  733.     kThemeSoundScrollArrowRelease = FOUR_CHAR_CODE('sbar'),
  734.     kThemeSoundScrollEndOfTrack = FOUR_CHAR_CODE('sbte'),
  735.     kThemeSoundScrollTrackPress = FOUR_CHAR_CODE('sbtp'),
  736.     kThemeSoundSliderEndOfTrack = FOUR_CHAR_CODE('slte'),       /* sliders */
  737.     kThemeSoundSliderTrackPress = FOUR_CHAR_CODE('sltp'),
  738.     kThemeSoundBalloonOpen      = FOUR_CHAR_CODE('blno'),       /* help balloons */
  739.     kThemeSoundBalloonClose     = FOUR_CHAR_CODE('blnc'),
  740.     kThemeSoundBevelPress       = FOUR_CHAR_CODE('bevp'),       /* Bevel buttons */
  741.     kThemeSoundBevelEnter       = FOUR_CHAR_CODE('beve'),
  742.     kThemeSoundBevelExit        = FOUR_CHAR_CODE('bevx'),
  743.     kThemeSoundBevelRelease     = FOUR_CHAR_CODE('bevr'),
  744.     kThemeSoundLittleArrowUpPress = FOUR_CHAR_CODE('laup'),     /* Little Arrows */
  745.     kThemeSoundLittleArrowDnPress = FOUR_CHAR_CODE('ladp'),
  746.     kThemeSoundLittleArrowEnter = FOUR_CHAR_CODE('lare'),
  747.     kThemeSoundLittleArrowExit  = FOUR_CHAR_CODE('larx'),
  748.     kThemeSoundLittleArrowUpRelease = FOUR_CHAR_CODE('laur'),
  749.     kThemeSoundLittleArrowDnRelease = FOUR_CHAR_CODE('ladr'),
  750.     kThemeSoundPopupPress       = FOUR_CHAR_CODE('popp'),       /* Popup Buttons */
  751.     kThemeSoundPopupEnter       = FOUR_CHAR_CODE('pope'),
  752.     kThemeSoundPopupExit        = FOUR_CHAR_CODE('popx'),
  753.     kThemeSoundPopupRelease     = FOUR_CHAR_CODE('popr'),
  754.     kThemeSoundDisclosurePress  = FOUR_CHAR_CODE('dscp'),       /* Disclosure Buttons */
  755.     kThemeSoundDisclosureEnter  = FOUR_CHAR_CODE('dsce'),
  756.     kThemeSoundDisclosureExit   = FOUR_CHAR_CODE('dscx'),
  757.     kThemeSoundDisclosureRelease = FOUR_CHAR_CODE('dscr'),
  758.     kThemeSoundTabPressed       = FOUR_CHAR_CODE('tabp'),       /* Tabs */
  759.     kThemeSoundTabEnter         = FOUR_CHAR_CODE('tabe'),
  760.     kThemeSoundTabExit          = FOUR_CHAR_CODE('tabx'),
  761.     kThemeSoundTabRelease       = FOUR_CHAR_CODE('tabr'),
  762.     kThemeSoundDragTargetHilite = FOUR_CHAR_CODE('dthi'),       /* drag manager */
  763.     kThemeSoundDragTargetUnhilite = FOUR_CHAR_CODE('dtuh'),
  764.     kThemeSoundDragTargetDrop   = FOUR_CHAR_CODE('dtdr'),
  765.     kThemeSoundEmptyTrash       = FOUR_CHAR_CODE('ftrs'),       /* finder */
  766.     kThemeSoundSelectItem       = FOUR_CHAR_CODE('fsel'),
  767.     kThemeSoundNewItem          = FOUR_CHAR_CODE('fnew'),
  768.     kThemeSoundReceiveDrop      = FOUR_CHAR_CODE('fdrp'),
  769.     kThemeSoundCopyDone         = FOUR_CHAR_CODE('fcpd'),
  770.     kThemeSoundResolveAlias     = FOUR_CHAR_CODE('fral'),
  771.     kThemeSoundLaunchApp        = FOUR_CHAR_CODE('flap'),
  772.     kThemeSoundDiskInsert       = FOUR_CHAR_CODE('dski'),
  773.     kThemeSoundDiskEject        = FOUR_CHAR_CODE('dske'),
  774.     kThemeSoundFinderDragOnIcon = FOUR_CHAR_CODE('fdon'),
  775.     kThemeSoundFinderDragOffIcon = FOUR_CHAR_CODE('fdof')
  776. };
  777. typedef OSType                          ThemeSoundKind;
  778. /*------------------------------------------------------------------------------------------*/
  779. /* Window Metrics                                                                           */
  780. /*------------------------------------------------------------------------------------------*/
  781. /*  Window metrics are used by the Appearance manager to fill in the blanks necessary to    */
  782. /*  draw windows. If a value is not appropriate for the type of window, be sure to fill in  */
  783. /*  the slot in the structure with zero.    For the popupTabOffset parameter, you can pass a*/
  784. /*  real value based on the left edge of the window. This value might be interpreted in a   */
  785. /*  different manner when depending on the value of the popupTabPosition field. The values  */
  786. /*  you can pass into popupTabPosition are:                                                 */
  787. /*                                                                                          */
  788. /*  kThemePopupTabNormalPosition                                                            */
  789. /*      Starts the tab left edge at the position indicated by the popupTabOffset field.     */
  790. /*                                                                                          */
  791. /*  kThemePopupTabCenterOnWindow                                                            */
  792. /*      tells us to ignore the offset field and instead simply center the width of the      */
  793. /*      handle on the window.                                                               */
  794. /*                                                                                          */
  795. /*  kThemePopupTabCenterOnOffset                                                            */
  796. /*      tells us to center the width of the handle around the value passed in offset.       */
  797. /*                                                                                          */
  798. /*  The Appearance Manager will try its best to accomodate the requested placement, but may */
  799. /*  move the handle slightly to make it fit correctly.                                      */
  800. /*                                                                                          */
  801. enum {
  802.     kThemePopupTabNormalPosition = 0,
  803.     kThemePopupTabCenterOnWindow = 1,
  804.     kThemePopupTabCenterOnOffset = 2
  805. };
  806. struct ThemeWindowMetrics {
  807.     UInt16                          metricSize;                 /* should be always be sizeof( ThemeWindowMetrics )*/
  808.     SInt16                          titleHeight;
  809.     SInt16                          titleWidth;
  810.     SInt16                          popupTabOffset;
  811.     SInt16                          popupTabWidth;
  812.     UInt16                          popupTabPosition;
  813. };
  814. typedef struct ThemeWindowMetrics       ThemeWindowMetrics;
  815. typedef ThemeWindowMetrics *            ThemeWindowMetricsPtr;
  816. /*------------------------------------------------------------------------------------------*/
  817. /* Theme Metrics                                                                            */
  818. /*------------------------------------------------------------------------------------------*/
  819. /*  Theme metrics allow you to find out sizes of things in the current environment, such as */
  820. /*  how wide a scroll bar is, etc.                                                          */
  821. enum {
  822.     kThemeMetricScrollBarWidth  = 0,
  823.     kThemeMetricSmallScrollBarWidth = 1,
  824.     kThemeMetricCheckBoxGlyphHeight = 2,
  825.     kThemeMetricRadioButtonGlyphHeight = 3
  826. };
  827. typedef UInt32                          ThemeMetric;
  828. /*------------------------------------------------------------------------------------------*/
  829. /* Drawing State                                                                            */
  830. /*------------------------------------------------------------------------------------------*/
  831. typedef struct OpaqueThemeDrawingState*  ThemeDrawingState;
  832. /*------------------------------------------------------------------------------------------*/
  833. /* Callback procs                                                                           */
  834. /*------------------------------------------------------------------------------------------*/
  835. typedef CALLBACK_API( void , ThemeTabTitleDrawProcPtr )(const Rect *bounds, ThemeTabStyle style, ThemeTabDirection direction, SInt16 depth, Boolean isColorDev, UInt32 userData);
  836. typedef CALLBACK_API( void , ThemeEraseProcPtr )(const Rect *bounds, UInt32 eraseData, SInt16 depth, Boolean isColorDev);
  837. typedef CALLBACK_API( void , ThemeButtonDrawProcPtr )(const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, UInt32 userData, SInt16 depth, Boolean isColorDev);
  838. typedef CALLBACK_API( void , WindowTitleDrawingProcPtr )(const Rect *bounds, SInt16 depth, Boolean colorDevice, UInt32 userData);
  839. typedef CALLBACK_API( Boolean , ThemeIteratorProcPtr )(ConstStr255Param inFileName, SInt16 resID, Collection inThemeSettings, void *inUserData);
  840. typedef STACK_UPP_TYPE(ThemeTabTitleDrawProcPtr)                ThemeTabTitleDrawUPP;
  841. typedef STACK_UPP_TYPE(ThemeEraseProcPtr)                       ThemeEraseUPP;
  842. typedef STACK_UPP_TYPE(ThemeButtonDrawProcPtr)                  ThemeButtonDrawUPP;
  843. typedef STACK_UPP_TYPE(WindowTitleDrawingProcPtr)               WindowTitleDrawingUPP;
  844. typedef STACK_UPP_TYPE(ThemeIteratorProcPtr)                    ThemeIteratorUPP;
  845. #if OPAQUE_UPP_TYPES
  846.     EXTERN_API(ThemeTabTitleDrawUPP)
  847.     NewThemeTabTitleDrawUPP        (ThemeTabTitleDrawProcPtr userRoutine);
  848.     EXTERN_API(ThemeEraseUPP)
  849.     NewThemeEraseUPP               (ThemeEraseProcPtr       userRoutine);
  850.     EXTERN_API(ThemeButtonDrawUPP)
  851.     NewThemeButtonDrawUPP          (ThemeButtonDrawProcPtr  userRoutine);
  852.     EXTERN_API(WindowTitleDrawingUPP)
  853.     NewWindowTitleDrawingUPP       (WindowTitleDrawingProcPtr userRoutine);
  854.     EXTERN_API(ThemeIteratorUPP)
  855.     NewThemeIteratorUPP            (ThemeIteratorProcPtr    userRoutine);
  856.     EXTERN_API(void)
  857.     DisposeThemeTabTitleDrawUPP    (ThemeTabTitleDrawUPP    userUPP);
  858.     EXTERN_API(void)
  859.     DisposeThemeEraseUPP           (ThemeEraseUPP           userUPP);
  860.     EXTERN_API(void)
  861.     DisposeThemeButtonDrawUPP      (ThemeButtonDrawUPP      userUPP);
  862.     EXTERN_API(void)
  863.     DisposeWindowTitleDrawingUPP    (WindowTitleDrawingUPP  userUPP);
  864.     EXTERN_API(void)
  865.     DisposeThemeIteratorUPP        (ThemeIteratorUPP        userUPP);
  866.     EXTERN_API(void)
  867.     InvokeThemeTabTitleDrawUPP     (const Rect *            bounds,
  868.                                     ThemeTabStyle           style,
  869.                                     ThemeTabDirection       direction,
  870.                                     SInt16                  depth,
  871.                                     Boolean                 isColorDev,
  872.                                     UInt32                  userData,
  873.                                     ThemeTabTitleDrawUPP    userUPP);
  874.     EXTERN_API(void)
  875.     InvokeThemeEraseUPP            (const Rect *            bounds,
  876.                                     UInt32                  eraseData,
  877.                                     SInt16                  depth,
  878.                                     Boolean                 isColorDev,
  879.                                     ThemeEraseUPP           userUPP);
  880.     EXTERN_API(void)
  881.     InvokeThemeButtonDrawUPP       (const Rect *            bounds,
  882.                                     ThemeButtonKind         kind,
  883.                                     const ThemeButtonDrawInfo * info,
  884.                                     UInt32                  userData,
  885.                                     SInt16                  depth,
  886.                                     Boolean                 isColorDev,
  887.                                     ThemeButtonDrawUPP      userUPP);
  888.     EXTERN_API(void)
  889.     InvokeWindowTitleDrawingUPP    (const Rect *            bounds,
  890.                                     SInt16                  depth,
  891.                                     Boolean                 colorDevice,
  892.                                     UInt32                  userData,
  893.                                     WindowTitleDrawingUPP   userUPP);
  894.     EXTERN_API(Boolean)
  895.     InvokeThemeIteratorUPP         (ConstStr255Param        inFileName,
  896.                                     SInt16                  resID,
  897.                                     Collection              inThemeSettings,
  898.                                     void *                  inUserData,
  899.                                     ThemeIteratorUPP        userUPP);
  900. #else
  901.     enum { uppThemeTabTitleDrawProcInfo = 0x00036AC0 };             /* pascal no_return_value Func(4_bytes, 2_bytes, 2_bytes, 2_bytes, 1_byte, 4_bytes) */
  902.     enum { uppThemeEraseProcInfo = 0x00001BC0 };                    /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 1_byte) */
  903.     enum { uppThemeButtonDrawProcInfo = 0x0001BEC0 };               /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes, 1_byte) */
  904.     enum { uppWindowTitleDrawingProcInfo = 0x000036C0 };            /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
  905.     enum { uppThemeIteratorProcInfo = 0x00003ED0 };                 /* pascal 1_byte Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
  906.     #define NewThemeTabTitleDrawUPP(userRoutine)                    (ThemeTabTitleDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeTabTitleDrawProcInfo, GetCurrentArchitecture())
  907.     #define NewThemeEraseUPP(userRoutine)                           (ThemeEraseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeEraseProcInfo, GetCurrentArchitecture())
  908.     #define NewThemeButtonDrawUPP(userRoutine)                      (ThemeButtonDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeButtonDrawProcInfo, GetCurrentArchitecture())
  909.     #define NewWindowTitleDrawingUPP(userRoutine)                   (WindowTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowTitleDrawingProcInfo, GetCurrentArchitecture())
  910.     #define NewThemeIteratorUPP(userRoutine)                        (ThemeIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeIteratorProcInfo, GetCurrentArchitecture())
  911.     #define DisposeThemeTabTitleDrawUPP(userUPP)                    DisposeRoutineDescriptor(userUPP)
  912.     #define DisposeThemeEraseUPP(userUPP)                           DisposeRoutineDescriptor(userUPP)
  913.     #define DisposeThemeButtonDrawUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  914.     #define DisposeWindowTitleDrawingUPP(userUPP)                   DisposeRoutineDescriptor(userUPP)
  915.     #define DisposeThemeIteratorUPP(userUPP)                        DisposeRoutineDescriptor(userUPP)
  916.     #define InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, userData, userUPP)  CALL_SIX_PARAMETER_UPP((userUPP), uppThemeTabTitleDrawProcInfo, (bounds), (style), (direction), (depth), (isColorDev), (userData))
  917.     #define InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeEraseProcInfo, (bounds), (eraseData), (depth), (isColorDev))
  918.     #define InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, userUPP)  CALL_SIX_PARAMETER_UPP((userUPP), uppThemeButtonDrawProcInfo, (bounds), (kind), (info), (userData), (depth), (isColorDev))
  919.     #define InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowTitleDrawingProcInfo, (bounds), (depth), (colorDevice), (userData))
  920.     #define InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, userUPP)  (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeIteratorProcInfo, (inFileName), (resID), (inThemeSettings), (inUserData))
  921. #endif
  922. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  923. #define NewThemeTabTitleDrawProc(userRoutine)                   NewThemeTabTitleDrawUPP(userRoutine)
  924. #define NewThemeEraseProc(userRoutine)                          NewThemeEraseUPP(userRoutine)
  925. #define NewThemeButtonDrawProc(userRoutine)                     NewThemeButtonDrawUPP(userRoutine)
  926. #define NewWindowTitleDrawingProc(userRoutine)                  NewWindowTitleDrawingUPP(userRoutine)
  927. #define NewThemeIteratorProc(userRoutine)                       NewThemeIteratorUPP(userRoutine)
  928. #define CallThemeTabTitleDrawProc(userRoutine, bounds, style, direction, depth, isColorDev, userData) InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, userData, userRoutine)
  929. #define CallThemeEraseProc(userRoutine, bounds, eraseData, depth, isColorDev) InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userRoutine)
  930. #define CallThemeButtonDrawProc(userRoutine, bounds, kind, info, userData, depth, isColorDev) InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, userRoutine)
  931. #define CallWindowTitleDrawingProc(userRoutine, bounds, depth, colorDevice, userData) InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userRoutine)
  932. #define CallThemeIteratorProc(userRoutine, inFileName, resID, inThemeSettings, inUserData) InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, userRoutine)
  933. /*----------------------------------------------------------------------------------*/
  934. /* Menu Drawing callbacks                                                           */
  935. /*----------------------------------------------------------------------------------*/
  936. typedef CALLBACK_API( void , MenuTitleDrawingProcPtr )(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData);
  937. typedef CALLBACK_API( void , MenuItemDrawingProcPtr )(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData);
  938. typedef STACK_UPP_TYPE(MenuTitleDrawingProcPtr)                 MenuTitleDrawingUPP;
  939. typedef STACK_UPP_TYPE(MenuItemDrawingProcPtr)                  MenuItemDrawingUPP;
  940. #if OPAQUE_UPP_TYPES
  941.     EXTERN_API(MenuTitleDrawingUPP)
  942.     NewMenuTitleDrawingUPP         (MenuTitleDrawingProcPtr userRoutine);
  943.     EXTERN_API(MenuItemDrawingUPP)
  944.     NewMenuItemDrawingUPP          (MenuItemDrawingProcPtr  userRoutine);
  945.     EXTERN_API(void)
  946.     DisposeMenuTitleDrawingUPP     (MenuTitleDrawingUPP     userUPP);
  947.     EXTERN_API(void)
  948.     DisposeMenuItemDrawingUPP      (MenuItemDrawingUPP      userUPP);
  949.     EXTERN_API(void)
  950.     InvokeMenuTitleDrawingUPP      (const Rect *            inBounds,
  951.                                     SInt16                  inDepth,
  952.                                     Boolean                 inIsColorDevice,
  953.                                     SInt32                  inUserData,
  954.                                     MenuTitleDrawingUPP     userUPP);
  955.     EXTERN_API(void)
  956.     InvokeMenuItemDrawingUPP       (const Rect *            inBounds,
  957.                                     SInt16                  inDepth,
  958.                                     Boolean                 inIsColorDevice,
  959.                                     SInt32                  inUserData,
  960.                                     MenuItemDrawingUPP      userUPP);
  961. #else
  962.     enum { uppMenuTitleDrawingProcInfo = 0x000036C0 };              /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
  963.     enum { uppMenuItemDrawingProcInfo = 0x000036C0 };               /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
  964.     #define NewMenuTitleDrawingUPP(userRoutine)                     (MenuTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuTitleDrawingProcInfo, GetCurrentArchitecture())
  965.     #define NewMenuItemDrawingUPP(userRoutine)                      (MenuItemDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuItemDrawingProcInfo, GetCurrentArchitecture())
  966.     #define DisposeMenuTitleDrawingUPP(userUPP)                     DisposeRoutineDescriptor(userUPP)
  967.     #define DisposeMenuItemDrawingUPP(userUPP)                      DisposeRoutineDescriptor(userUPP)
  968.     #define InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuTitleDrawingProcInfo, (inBounds), (inDepth), (inIsColorDevice), (inUserData))
  969.     #define InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userUPP)  CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuItemDrawingProcInfo, (inBounds), (inDepth), (inIsColorDevice), (inUserData))
  970. #endif
  971. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  972. #define NewMenuTitleDrawingProc(userRoutine)                    NewMenuTitleDrawingUPP(userRoutine)
  973. #define NewMenuItemDrawingProc(userRoutine)                     NewMenuItemDrawingUPP(userRoutine)
  974. #define CallMenuTitleDrawingProc(userRoutine, inBounds, inDepth, inIsColorDevice, inUserData) InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userRoutine)
  975. #define CallMenuItemDrawingProc(userRoutine, inBounds, inDepth, inIsColorDevice, inUserData) InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userRoutine)
  976. /*----------------------------------------------------------------------------------*/
  977. /*  Appearance Manager APIs                                                         */
  978. /*----------------------------------------------------------------------------------*/
  979. /* Registering Appearance-Savvy Applications */
  980. EXTERN_API( OSStatus )
  981. RegisterAppearanceClient        (void)                                                      THREEWORDINLINE(0x303C, 0x0015, 0xAA74);
  982. EXTERN_API( OSStatus )
  983. UnregisterAppearanceClient      (void)                                                      THREEWORDINLINE(0x303C, 0x0016, 0xAA74);
  984. EXTERN_API( Boolean )
  985. IsAppearanceClient              (const ProcessSerialNumber * process)                       THREEWORDINLINE(0x303C, 0xFFFF, 0xAA74);
  986. /*****************************************************************************
  987.     NOTES ON THEME BRUSHES
  988.     Theme brushes can be either colors or patterns, depending on the theme.
  989.     Because of this, you should be prepared to handle the case where a brush
  990.     is a pattern and save and restore the pnPixPat and bkPixPat fields of
  991.     your GrafPorts when saving the fore and back colors. Also, since patterns
  992.     in bkPixPat override the background color of the window, you should use
  993.     BackPat to set your background pattern to a normal white pattern. This
  994.     will ensure that you can use RGBBackColor to set your back color to white,
  995.     call EraseRect and get the expected results.
  996. *****************************************************************************/
  997. EXTERN_API( OSStatus )
  998. SetThemePen                     (ThemeBrush             inBrush,
  999.                                  SInt16                 inDepth,
  1000.                                  Boolean                inIsColorDevice)                    THREEWORDINLINE(0x303C, 0x0001, 0xAA74);
  1001. EXTERN_API( OSStatus )
  1002. SetThemeBackground              (ThemeBrush             inBrush,
  1003.                                  SInt16                 inDepth,
  1004.                                  Boolean                inIsColorDevice)                    THREEWORDINLINE(0x303C, 0x0002, 0xAA74);
  1005. EXTERN_API( OSStatus )
  1006. SetThemeTextColor               (ThemeTextColor         inColor,
  1007.                                  SInt16                 inDepth,
  1008.                                  Boolean                inIsColorDevice)                    THREEWORDINLINE(0x303C, 0x0003, 0xAA74);
  1009. EXTERN_API( OSStatus )
  1010. SetThemeWindowBackground        (WindowPtr              inWindow,
  1011.                                  ThemeBrush             inBrush,
  1012.                                  Boolean                inUpdate)                           THREEWORDINLINE(0x303C, 0x0004, 0xAA74);
  1013. /* Window Placards, Headers and Frames */
  1014. EXTERN_API( OSStatus )
  1015. DrawThemeWindowHeader           (const Rect *           inRect,
  1016.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x0005, 0xAA74);
  1017. EXTERN_API( OSStatus )
  1018. DrawThemeWindowListViewHeader   (const Rect *           inRect,
  1019.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x0006, 0xAA74);
  1020. EXTERN_API( OSStatus )
  1021. DrawThemePlacard                (const Rect *           inRect,
  1022.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x0007, 0xAA74);
  1023. EXTERN_API( OSStatus )
  1024. DrawThemeEditTextFrame          (const Rect *           inRect,
  1025.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x0009, 0xAA74);
  1026. EXTERN_API( OSStatus )
  1027. DrawThemeListBoxFrame           (const Rect *           inRect,
  1028.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x000A, 0xAA74);
  1029. /* Keyboard Focus Drawing */
  1030. EXTERN_API( OSStatus )
  1031. DrawThemeFocusRect              (const Rect *           inRect,
  1032.                                  Boolean                inHasFocus)                         THREEWORDINLINE(0x303C, 0x000B, 0xAA74);
  1033. /* Dialog Group Boxes and Separators */
  1034. EXTERN_API( OSStatus )
  1035. DrawThemePrimaryGroup           (const Rect *           inRect,
  1036.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x000C, 0xAA74);
  1037. EXTERN_API( OSStatus )
  1038. DrawThemeSecondaryGroup         (const Rect *           inRect,
  1039.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x000D, 0xAA74);
  1040. EXTERN_API( OSStatus )
  1041. DrawThemeSeparator              (const Rect *           inRect,
  1042.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x000E, 0xAA74);
  1043. /*------------------------------ BEGIN APPEARANCE 1.0.1 --------------------------------------------*/
  1044. /* The following Appearance Manager APIs are only available */
  1045. /* in Appearance 1.0.1 or later                             */
  1046. EXTERN_API( OSStatus )
  1047. DrawThemeModelessDialogFrame    (const Rect *           inRect,
  1048.                                  ThemeDrawState         inState)                            THREEWORDINLINE(0x303C, 0x0008, 0xAA74);
  1049. EXTERN_API( OSStatus )
  1050. DrawThemeGenericWell            (const Rect *           inRect,
  1051.                                  ThemeDrawState         inState,
  1052.                                  Boolean                inFillCenter)                       THREEWORDINLINE(0x303C, 0x0022, 0xAA74);
  1053. EXTERN_API( OSStatus )
  1054. DrawThemeFocusRegion            (RgnHandle              inRegion,
  1055.                                  Boolean                inHasFocus)                         THREEWORDINLINE(0x303C, 0x0023, 0xAA74);
  1056. EXTERN_API( Boolean )
  1057. IsThemeInColor                  (SInt16                 inDepth,
  1058.                                  Boolean                inIsColorDevice)                    THREEWORDINLINE(0x303C, 0x0024, 0xAA74);
  1059. /* IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will */
  1060. /* most likely return an error */
  1061. EXTERN_API( OSStatus )
  1062. GetThemeAccentColors            (CTabHandle *           outColors)                          THREEWORDINLINE(0x303C, 0x0025, 0xAA74);
  1063. EXTERN_API( OSStatus )
  1064. DrawThemeMenuBarBackground      (const Rect *           inBounds,
  1065.                                  ThemeMenuBarState      inState,
  1066.                                  UInt32                 inAttributes)                       THREEWORDINLINE(0x303C, 0x0018, 0xAA74);
  1067. EXTERN_API( OSStatus )
  1068. DrawThemeMenuTitle              (const Rect *           inMenuBarRect,
  1069.                                  const Rect *           inTitleRect,
  1070.                                  ThemeMenuState         inState,
  1071.                                  UInt32                 inAttributes,
  1072.                                  MenuTitleDrawingUPP    inTitleProc, /* can be NULL */
  1073.                                  UInt32                 inTitleData)                        THREEWORDINLINE(0x303C, 0x0019, 0xAA74);
  1074. EXTERN_API( OSStatus )
  1075. GetThemeMenuBarHeight           (SInt16 *               outHeight)                          THREEWORDINLINE(0x303C, 0x001A, 0xAA74);
  1076. EXTERN_API( OSStatus )
  1077. DrawThemeMenuBackground         (const Rect *           inMenuRect,
  1078.                                  ThemeMenuType          inMenuType)                         THREEWORDINLINE(0x303C, 0x001B, 0xAA74);
  1079. EXTERN_API( OSStatus )
  1080. GetThemeMenuBackgroundRegion    (const Rect *           inMenuRect,
  1081.                                  ThemeMenuType          menuType,
  1082.                                  RgnHandle              region)                             THREEWORDINLINE(0x303C, 0x001C, 0xAA74);
  1083. EXTERN_API( OSStatus )
  1084. DrawThemeMenuItem               (const Rect *           inMenuRect,
  1085.                                  const Rect *           inItemRect,
  1086.                                  SInt16                 inVirtualMenuTop,
  1087.                                  SInt16                 inVirtualMenuBottom,
  1088.                                  ThemeMenuState         inState,
  1089.                                  ThemeMenuItemType      inItemType,
  1090.                                  MenuItemDrawingUPP     inDrawProc, /* can be NULL */
  1091.                                  UInt32                 inUserData)                         THREEWORDINLINE(0x303C, 0x001D, 0xAA74);
  1092. EXTERN_API( OSStatus )
  1093. DrawThemeMenuSeparator          (const Rect *           inItemRect)                         THREEWORDINLINE(0x303C, 0x001E, 0xAA74);
  1094. EXTERN_API( OSStatus )
  1095. GetThemeMenuSeparatorHeight     (SInt16 *               outHeight)                          THREEWORDINLINE(0x303C, 0x001F, 0xAA74);
  1096. EXTERN_API( OSStatus )
  1097. GetThemeMenuItemExtra           (ThemeMenuItemType      inItemType,
  1098.                                  SInt16 *               outHeight,
  1099.                                  SInt16 *               outWidth)                           THREEWORDINLINE(0x303C, 0x0020, 0xAA74);
  1100. EXTERN_API( OSStatus )
  1101. GetThemeMenuTitleExtra          (SInt16 *               outWidth,
  1102.                                  Boolean                inIsSquished)                       THREEWORDINLINE(0x303C, 0x0021, 0xAA74);
  1103. /*------------------------------- BEGIN APPEARANCE 1.1 ---------------------------------------------*/
  1104. /*---------------------------------- THEME SWITCHING -----------------------------------------------*/
  1105. EXTERN_API( OSStatus )
  1106. GetTheme                        (Collection             ioCollection);
  1107. EXTERN_API( OSStatus )
  1108. SetTheme                        (Collection             ioCollection);
  1109. EXTERN_API( OSStatus )
  1110. IterateThemes                   (ThemeIteratorUPP       inProc,
  1111.                                  void *                 inUserData) /* can be NULL */;
  1112. /*---------------------------------------- TABS ----------------------------------------------------*/
  1113. EXTERN_API( OSStatus )
  1114. DrawThemeTabPane                (const Rect *           inRect,
  1115.                                  ThemeDrawState         inState);
  1116. EXTERN_API( OSStatus )
  1117. DrawThemeTab                    (const Rect *           inRect,
  1118.                                  ThemeTabStyle          inStyle,
  1119.                                  ThemeTabDirection      inDirection,
  1120.                                  ThemeTabTitleDrawUPP   labelProc, /* can be NULL */
  1121.                                  UInt32                 userData);
  1122. EXTERN_API( OSStatus )
  1123. GetThemeTabRegion               (const Rect *           inRect,
  1124.                                  ThemeTabStyle          inStyle,
  1125.                                  ThemeTabDirection      inDirection,
  1126.                                  RgnHandle              ioRgn);
  1127. /*--------------------------------------- CURSORS --------------------------------------------------*/
  1128. EXTERN_API( OSStatus )
  1129. SetThemeCursor                  (ThemeCursor            inCursor);
  1130. EXTERN_API( OSStatus )
  1131. SetAnimatedThemeCursor          (ThemeCursor            inCursor,
  1132.                                  UInt32                 inAnimationStep);
  1133. /*-------------------------------- CONTROL STYLE SETTINGS ------------------------------------------*/
  1134. EXTERN_API( OSStatus )
  1135. GetThemeScrollBarThumbStyle     (ThemeScrollBarThumbStyle * outStyle);
  1136. EXTERN_API( OSStatus )
  1137. GetThemeScrollBarArrowStyle     (ThemeScrollBarArrowStyle * outStyle);
  1138. EXTERN_API( OSStatus )
  1139. GetThemeCheckBoxStyle           (ThemeCheckBoxStyle *   outStyle);
  1140. /*---------------------------------------- FONTS ---------------------------------------------------*/
  1141. EXTERN_API( OSStatus )
  1142. UseThemeFont                    (ThemeFontID            inFontID,
  1143.                                  ScriptCode             inScript);
  1144. EXTERN_API( OSStatus )
  1145. GetThemeFont                    (ThemeFontID            inFontID,
  1146.                                  ScriptCode             inScript,
  1147.                                  StringPtr              outFontName,
  1148.                                  SInt16 *               outFontSize,
  1149.                                  Style *                outStyle);
  1150. /*---------------------------------------- TRACKS --------------------------------------------------*/
  1151. EXTERN_API( OSStatus )
  1152. DrawThemeTrack                  (const ThemeTrackDrawInfo * drawInfo,
  1153.                                  RgnHandle              rgnGhost, /* can be NULL */
  1154.                                  ThemeEraseUPP          eraseProc, /* can be NULL */
  1155.                                  UInt32                 eraseData);
  1156. EXTERN_API( Boolean )
  1157. HitTestThemeTrack               (const ThemeTrackDrawInfo * drawInfo,
  1158.                                  Point                  mousePoint,
  1159.                                  ControlPartCode *      partHit);
  1160. EXTERN_API( OSStatus )
  1161. GetThemeTrackBounds             (const ThemeTrackDrawInfo * drawInfo,
  1162.                                  Rect *                 bounds);
  1163. EXTERN_API( OSStatus )
  1164. GetThemeTrackThumbRgn           (const ThemeTrackDrawInfo * drawInfo,
  1165.                                  RgnHandle              thumbRgn);
  1166. EXTERN_API( OSStatus )
  1167. GetThemeTrackDragRect           (const ThemeTrackDrawInfo * drawInfo,
  1168.                                  Rect *                 dragRect);
  1169. EXTERN_API( OSStatus )
  1170. DrawThemeTrackTickMarks         (const ThemeTrackDrawInfo * drawInfo,
  1171.                                  ItemCount              numTicks,
  1172.                                  ThemeEraseUPP          eraseProc, /* can be NULL */
  1173.                                  UInt32                 eraseData);
  1174. EXTERN_API( OSStatus )
  1175. GetThemeTrackThumbPositionFromOffset (const ThemeTrackDrawInfo * drawInfo,
  1176.                                  Point                  thumbOffset,
  1177.                                  SInt32 *               relativePosition);
  1178. EXTERN_API( OSStatus )
  1179. GetThemeTrackThumbPositionFromRegion (const ThemeTrackDrawInfo * drawInfo,
  1180.                                  RgnHandle              thumbRgn,
  1181.                                  SInt32 *               relativePosition);
  1182. EXTERN_API( OSStatus )
  1183. GetThemeTrackLiveValue          (const ThemeTrackDrawInfo * drawInfo,
  1184.                                  SInt32                 relativePosition,
  1185.                                  SInt32 *               value);
  1186. /*----------------------------------- SCROLLBAR ARROWS ---------------------------------------------*/
  1187. EXTERN_API( OSStatus )
  1188. DrawThemeScrollBarArrows        (const Rect *           bounds,
  1189.                                  ThemeTrackEnableState  enableState,
  1190.                                  ThemeTrackPressState   pressState,
  1191.                                  Boolean                isHoriz,
  1192.                                  Rect *                 trackBounds);
  1193. EXTERN_API( OSStatus )
  1194. GetThemeScrollBarTrackRect      (const Rect *           bounds,
  1195.                                  ThemeTrackEnableState  enableState,
  1196.                                  ThemeTrackPressState   pressState,
  1197.                                  Boolean                isHoriz,
  1198.                                  Rect *                 trackBounds);
  1199. EXTERN_API( Boolean )
  1200. HitTestThemeScrollBarArrows     (const Rect *           scrollBarBounds,
  1201.                                  ThemeTrackEnableState  enableState,
  1202.                                  ThemeTrackPressState   pressState,
  1203.                                  Boolean                isHoriz,
  1204.                                  Point                  ptHit,
  1205.                                  Rect *                 trackBounds,
  1206.                                  ControlPartCode *      partcode);
  1207. /*---------------------------------------- WINDOWS -------------------------------------------------*/
  1208. EXTERN_API( OSStatus )
  1209. GetThemeWindowRegion            (ThemeWindowType        flavor,
  1210.                                  const Rect *           contRect,
  1211.                                  ThemeDrawState         state,
  1212.                                  const ThemeWindowMetrics * metrics,
  1213.                                  ThemeWindowAttributes  attributes,
  1214.                                  WindowRegionCode       winRegion,
  1215.                                  RgnHandle              rgn);
  1216. EXTERN_API( OSStatus )
  1217. DrawThemeWindowFrame            (ThemeWindowType        flavor,
  1218.                                  const Rect *           contRect,
  1219.                                  ThemeDrawState         state,
  1220.                                  const ThemeWindowMetrics * metrics,
  1221.                                  ThemeWindowAttributes  attributes,
  1222.                                  WindowTitleDrawingUPP  titleProc, /* can be NULL */
  1223.                                  UInt32                 titleData);
  1224. EXTERN_API( OSStatus )
  1225. DrawThemeTitleBarWidget         (ThemeWindowType        flavor,
  1226.                                  const Rect *           contRect,
  1227.                                  ThemeDrawState         state,
  1228.                                  const ThemeWindowMetrics * metrics,
  1229.                                  ThemeWindowAttributes  attributes,
  1230.                                  ThemeTitleBarWidget    widget);
  1231. EXTERN_API( Boolean )
  1232. GetThemeWindowRegionHit         (ThemeWindowType        flavor,
  1233.                                  const Rect *           inContRect,
  1234.                                  ThemeDrawState         state,
  1235.                                  const ThemeWindowMetrics * metrics,
  1236.                                  ThemeWindowAttributes  inAttributes,
  1237.                                  Point                  inPoint,
  1238.                                  WindowRegionCode *     outRegionHit);
  1239. EXTERN_API( OSStatus )
  1240. DrawThemeScrollBarDelimiters    (ThemeWindowType        flavor,
  1241.                                  const Rect *           inContRect,
  1242.                                  ThemeDrawState         state,
  1243.                                  ThemeWindowAttributes  attributes);
  1244. /*---------------------------------------- BUTTONS -------------------------------------------------*/
  1245. EXTERN_API( OSStatus )
  1246. DrawThemeButton                 (const Rect *           inBounds,
  1247.                                  ThemeButtonKind        inKind,
  1248.                                  const ThemeButtonDrawInfo * inNewInfo,
  1249.                                  const ThemeButtonDrawInfo * inPrevInfo, /* can be NULL */
  1250.                                  ThemeEraseUPP          inEraseProc, /* can be NULL */
  1251.                                  ThemeButtonDrawUPP     inLabelProc, /* can be NULL */
  1252.                                  UInt32                 inUserData);
  1253. EXTERN_API( OSStatus )
  1254. GetThemeButtonRegion            (const Rect *           inBounds,
  1255.                                  ThemeButtonKind        inKind,
  1256.                                  const ThemeButtonDrawInfo * inNewInfo,
  1257.                                  RgnHandle              outRegion);
  1258. EXTERN_API( OSStatus )
  1259. GetThemeButtonContentBounds     (const Rect *           inBounds,
  1260.                                  ThemeButtonKind        inKind,
  1261.                                  const ThemeButtonDrawInfo * inDrawInfo,
  1262.                                  Rect *                 outBounds);
  1263. EXTERN_API( OSStatus )
  1264. GetThemeButtonBackgroundBounds  (const Rect *           inBounds,
  1265.                                  ThemeButtonKind        inKind,
  1266.                                  const ThemeButtonDrawInfo * inDrawInfo,
  1267.                                  Rect *                 outBounds);
  1268. /*------------------------------------- INTERFACE SOUNDS -------------------------------------------*/
  1269. EXTERN_API( OSStatus )
  1270. PlayThemeSound                  (ThemeSoundKind         kind)                               THREEWORDINLINE(0x303C, 0x0026, 0xAA74);
  1271. EXTERN_API( OSStatus )
  1272. BeginThemeDragSound             (ThemeDragSoundKind     kind)                               THREEWORDINLINE(0x303C, 0x0027, 0xAA74);
  1273. EXTERN_API( OSStatus )
  1274. EndThemeDragSound               (void)                                                      THREEWORDINLINE(0x303C, 0x0028, 0xAA74);
  1275. /*-------------------------------------- PRIMITIVES ------------------------------------------------*/
  1276. EXTERN_API( OSStatus )
  1277. DrawThemeTickMark               (const Rect *           bounds,
  1278.                                  ThemeDrawState         state);
  1279. EXTERN_API( OSStatus )
  1280. DrawThemeChasingArrows          (const Rect *           bounds,
  1281.                                  UInt32                 index,
  1282.                                  ThemeDrawState         state,
  1283.                                  ThemeEraseUPP          eraseProc, /* can be NULL */
  1284.                                  UInt32                 eraseData);
  1285. EXTERN_API( OSStatus )
  1286. DrawThemePopupArrow             (const Rect *           bounds,
  1287.                                  ThemeArrowOrientation  orientation,
  1288.                                  ThemePopupArrowSize    size,
  1289.                                  ThemeDrawState         state,
  1290.                                  ThemeEraseUPP          eraseProc, /* can be NULL */
  1291.                                  UInt32                 eraseData);
  1292. EXTERN_API( OSStatus )
  1293. DrawThemeStandaloneGrowBox      (Point                  origin,
  1294.                                  ThemeGrowDirection     growDirection,
  1295.                                  Boolean                isSmall,
  1296.                                  ThemeDrawState         state);
  1297. EXTERN_API( OSStatus )
  1298. DrawThemeStandaloneNoGrowBox    (Point                  origin,
  1299.                                  ThemeGrowDirection     growDirection,
  1300.                                  Boolean                isSmall,
  1301.                                  ThemeDrawState         state);
  1302. EXTERN_API( OSStatus )
  1303. GetThemeStandaloneGrowBoxBounds (Point                  origin,
  1304.                                  ThemeGrowDirection     growDirection,
  1305.                                  Boolean                isSmall,
  1306.                                  Rect *                 bounds);
  1307. /*------------------------------------- DRAWING STATE ----------------------------------------------*/
  1308. /* The following routines help you save and restore the drawing state in a theme-savvy manner. With */
  1309. /* these weapons in your arsenal, there is no grafport you cannot tame. Use ThemeGetDrawingState to */
  1310. /* get the current drawing settings for the current port. It will return an opaque object for you   */
  1311. /* to pass into ThemeSetDrawingState later on. When you are finished with the state, call the       */
  1312. /* ThemeDisposeDrawingState routine. You can alternatively pass true into the inDisposeNow          */
  1313. /* parameter of the ThemeSetDrawingState routine.  You can use this routine to copy the drawing     */
  1314. /* state from one port to another as well.                                                          */
  1315. EXTERN_API( OSStatus )
  1316. NormalizeThemeDrawingState      (void);
  1317. EXTERN_API( OSStatus )
  1318. GetThemeDrawingState            (ThemeDrawingState *    outState);
  1319. EXTERN_API( OSStatus )
  1320. SetThemeDrawingState            (ThemeDrawingState      inState,
  1321.                                  Boolean                inDisposeNow);
  1322. EXTERN_API( OSStatus )
  1323. DisposeThemeDrawingState        (ThemeDrawingState      inState);
  1324. /*------------------------------------- MISCELLANEOUS ----------------------------------------------*/
  1325. /* ApplyThemeBackground is used to set up the background for embedded controls  */
  1326. /* It is normally called by controls that are embedders. The standard controls  */
  1327. /* call this API to ensure a correct background for the current theme. You pass */
  1328. /* in the same rectangle you would if you were calling the drawing primitive.   */
  1329. EXTERN_API( OSStatus )
  1330. ApplyThemeBackground            (ThemeBackgroundKind    inKind,
  1331.                                  const Rect *           bounds,
  1332.                                  ThemeDrawState         inState,
  1333.                                  SInt16                 inDepth,
  1334.                                  Boolean                inColorDev);
  1335. EXTERN_API( OSStatus )
  1336. SetThemeTextColorForWindow      (WindowPtr              window,
  1337.                                  Boolean                isActive,
  1338.                                  SInt16                 depth,
  1339.                                  Boolean                isColorDev);
  1340. EXTERN_API( Boolean )
  1341. IsValidAppearanceFileType       (OSType                 fileType);
  1342. EXTERN_API( OSStatus )
  1343. GetThemeBrushAsColor            (ThemeBrush             inBrush,
  1344.                                  SInt16                 inDepth,
  1345.                                  Boolean                inColorDev,
  1346.                                  RGBColor *             outColor);
  1347. EXTERN_API( OSStatus )
  1348. GetThemeTextColor               (ThemeTextColor         inColor,
  1349.                                  SInt16                 inDepth,
  1350.                                  Boolean                inColorDev,
  1351.                                  RGBColor *             outColor);
  1352. /*--------------------------------------- BEGIN CARBON ---------------------------------------------*/
  1353. EXTERN_API( OSStatus )
  1354. GetThemeMetric                  (ThemeMetric            inMetric,
  1355.                                  SInt32 *               outMetric);
  1356. /*--------------------------------------------------------------------------------------------------*/
  1357. /* Obsolete symbolic names                                                                          */
  1358. /*--------------------------------------------------------------------------------------------------*/
  1359. /* Obsolete error codes - use the new ones, s'il vous plait / kudasai */
  1360. enum {
  1361.     appearanceBadBrushIndexErr  = themeInvalidBrushErr,         /* pattern index invalid */
  1362.     appearanceProcessRegisteredErr = themeProcessRegisteredErr,
  1363.     appearanceProcessNotRegisteredErr = themeProcessNotRegisteredErr,
  1364.     appearanceBadTextColorIndexErr = themeBadTextColorErr,
  1365.     appearanceThemeHasNoAccents = themeHasNoAccentsErr,
  1366.     appearanceBadCursorIndexErr = themeBadCursorIndexErr
  1367. };
  1368. enum {
  1369.     kThemeActiveDialogBackgroundBrush = kThemeBrushDialogBackgroundActive,
  1370.     kThemeInactiveDialogBackgroundBrush = kThemeBrushDialogBackgroundInactive,
  1371.     kThemeActiveAlertBackgroundBrush = kThemeBrushAlertBackgroundActive,
  1372.     kThemeInactiveAlertBackgroundBrush = kThemeBrushAlertBackgroundInactive,
  1373.     kThemeActiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundActive,
  1374.     kThemeInactiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundInactive,
  1375.     kThemeActiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundActive,
  1376.     kThemeInactiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundInactive,
  1377.     kThemeListViewSortColumnBackgroundBrush = kThemeBrushListViewSortColumnBackground,
  1378.     kThemeListViewBackgroundBrush = kThemeBrushListViewBackground,
  1379.     kThemeIconLabelBackgroundBrush = kThemeBrushIconLabelBackground,
  1380.     kThemeListViewSeparatorBrush = kThemeBrushListViewSeparator,
  1381.     kThemeChasingArrowsBrush    = kThemeBrushChasingArrows,
  1382.     kThemeDragHiliteBrush       = kThemeBrushDragHilite,
  1383.     kThemeDocumentWindowBackgroundBrush = kThemeBrushDocumentWindowBackground,
  1384.     kThemeFinderWindowBackgroundBrush = kThemeBrushFinderWindowBackground
  1385. };
  1386. enum {
  1387.     kThemeActiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterActive,
  1388.     kThemeInactiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterInactive,
  1389.     kThemeFocusHighlightBrush   = kThemeBrushFocusHighlight,
  1390.     kThemeActivePopupArrowBrush = kThemeBrushPopupArrowActive,
  1391.     kThemePressedPopupArrowBrush = kThemeBrushPopupArrowPressed,
  1392.     kThemeInactivePopupArrowBrush = kThemeBrushPopupArrowInactive,
  1393.     kThemeAppleGuideCoachmarkBrush = kThemeBrushAppleGuideCoachmark
  1394. };
  1395. enum {
  1396.     kThemeActiveDialogTextColor = kThemeTextColorDialogActive,
  1397.     kThemeInactiveDialogTextColor = kThemeTextColorDialogInactive,
  1398.     kThemeActiveAlertTextColor  = kThemeTextColorAlertActive,
  1399.     kThemeInactiveAlertTextColor = kThemeTextColorAlertInactive,
  1400.     kThemeActiveModelessDialogTextColor = kThemeTextColorModelessDialogActive,
  1401.     kThemeInactiveModelessDialogTextColor = kThemeTextColorModelessDialogInactive,
  1402.     kThemeActiveWindowHeaderTextColor = kThemeTextColorWindowHeaderActive,
  1403.     kThemeInactiveWindowHeaderTextColor = kThemeTextColorWindowHeaderInactive,
  1404.     kThemeActivePlacardTextColor = kThemeTextColorPlacardActive,
  1405.     kThemeInactivePlacardTextColor = kThemeTextColorPlacardInactive,
  1406.     kThemePressedPlacardTextColor = kThemeTextColorPlacardPressed,
  1407.     kThemeActivePushButtonTextColor = kThemeTextColorPushButtonActive,
  1408.     kThemeInactivePushButtonTextColor = kThemeTextColorPushButtonInactive,
  1409.     kThemePressedPushButtonTextColor = kThemeTextColorPushButtonPressed,
  1410.     kThemeActiveBevelButtonTextColor = kThemeTextColorBevelButtonActive,
  1411.     kThemeInactiveBevelButtonTextColor = kThemeTextColorBevelButtonInactive,
  1412.     kThemePressedBevelButtonTextColor = kThemeTextColorBevelButtonPressed,
  1413.     kThemeActivePopupButtonTextColor = kThemeTextColorPopupButtonActive,
  1414.     kThemeInactivePopupButtonTextColor = kThemeTextColorPopupButtonInactive,
  1415.     kThemePressedPopupButtonTextColor = kThemeTextColorPopupButtonPressed,
  1416.     kThemeIconLabelTextColor    = kThemeTextColorIconLabel,
  1417.     kThemeListViewTextColor     = kThemeTextColorListView
  1418. };
  1419. enum {
  1420.     kThemeActiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleActive,
  1421.     kThemeInactiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleInactive,
  1422.     kThemeActiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleActive,
  1423.     kThemeInactiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleInactive,
  1424.     kThemeActiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleActive,
  1425.     kThemeInactiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleInactive,
  1426.     kThemeActivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleActive,
  1427.     kThemeInactivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleInactive,
  1428.     kThemeActiveRootMenuTextColor = kThemeTextColorRootMenuActive,
  1429.     kThemeSelectedRootMenuTextColor = kThemeTextColorRootMenuSelected,
  1430.     kThemeDisabledRootMenuTextColor = kThemeTextColorRootMenuDisabled,
  1431.     kThemeActiveMenuItemTextColor = kThemeTextColorMenuItemActive,
  1432.     kThemeSelectedMenuItemTextColor = kThemeTextColorMenuItemSelected,
  1433.     kThemeDisabledMenuItemTextColor = kThemeTextColorMenuItemDisabled,
  1434.     kThemeActivePopupLabelTextColor = kThemeTextColorPopupLabelActive,
  1435.     kThemeInactivePopupLabelTextColor = kThemeTextColorPopupLabelInactive
  1436. };
  1437. enum {
  1438.     kAEThemeSwitch              = kAEAppearanceChanged          /* Event ID's: Theme Switched */
  1439. };
  1440. enum {
  1441.     kThemeNoAdornment           = kThemeAdornmentNone,
  1442.     kThemeDefaultAdornment      = kThemeAdornmentDefault,
  1443.     kThemeFocusAdornment        = kThemeAdornmentFocus,
  1444.     kThemeRightToLeftAdornment  = kThemeAdornmentRightToLeft,
  1445.     kThemeDrawIndicatorOnly     = kThemeAdornmentDrawIndicatorOnly
  1446. };
  1447. enum {
  1448.     kThemeBrushPassiveAreaFill  = kThemeBrushStaticAreaFill
  1449. };
  1450. #if PRAGMA_STRUCT_ALIGN
  1451.     #pragma options align=reset
  1452. #elif PRAGMA_STRUCT_PACKPUSH
  1453.     #pragma pack(pop)
  1454. #elif PRAGMA_STRUCT_PACK
  1455.     #pragma pack()
  1456. #endif
  1457. #ifdef PRAGMA_IMPORT_OFF
  1458. #pragma import off
  1459. #elif PRAGMA_IMPORT
  1460. #pragma import reset
  1461. #endif
  1462. #ifdef __cplusplus
  1463. }
  1464. #endif
  1465. #endif /* __APPEARANCE__ */