Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3834 lines
144 KiB

  1. /*
  2. File: Appearance.h
  3. Contains: Appearance Manager Interfaces.
  4. Version: QuickTime 7.3
  5. Copyright: (c) 2007 (c) 1994-2001 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://developer.apple.com/bugreporter/
  9. */
  10. #ifndef __APPEARANCE__
  11. #define __APPEARANCE__
  12. #ifndef __MACTYPES__
  13. #include <MacTypes.h>
  14. #endif
  15. #ifndef __MACERRORS__
  16. #include <MacErrors.h>
  17. #endif
  18. #ifndef __TEXTUTILS__
  19. #include <TextUtils.h>
  20. #endif
  21. #ifndef __QUICKDRAW__
  22. #include <Quickdraw.h>
  23. #endif
  24. #ifndef __QDOFFSCREEN__
  25. #include <QDOffscreen.h>
  26. #endif
  27. #ifndef __TEXTEDIT__
  28. #include <TextEdit.h>
  29. #endif
  30. #ifndef __MACWINDOWS__
  31. #include <MacWindows.h>
  32. #endif
  33. #ifndef __CONTROLS__
  34. #include <Controls.h>
  35. #endif
  36. /*----------------------------------------------------------------------------------*/
  37. /* Appearance Manager constants, etc. */
  38. /*----------------------------------------------------------------------------------*/
  39. /* Appearance Manager Apple Events (1.1 and later) */
  40. #if PRAGMA_ONCE
  41. #pragma once
  42. #endif
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46. #if PRAGMA_IMPORT
  47. #pragma import on
  48. #endif
  49. #if PRAGMA_STRUCT_ALIGN
  50. #pragma options align=mac68k
  51. #elif PRAGMA_STRUCT_PACKPUSH
  52. #pragma pack(push, 2)
  53. #elif PRAGMA_STRUCT_PACK
  54. #pragma pack(2)
  55. #endif
  56. enum {
  57. kAppearanceEventClass = FOUR_CHAR_CODE('appr'), /* Event Class */
  58. kAEAppearanceChanged = FOUR_CHAR_CODE('thme'), /* Appearance changed (e.g. platinum to hi-tech) */
  59. kAESystemFontChanged = FOUR_CHAR_CODE('sysf'), /* system font changed */
  60. kAESmallSystemFontChanged = FOUR_CHAR_CODE('ssfn'), /* small system font changed */
  61. kAEViewsFontChanged = FOUR_CHAR_CODE('vfnt') /* views font changed */
  62. };
  63. /*----------------------------------------------------------------------------------*/
  64. /* Appearance Manager file types */
  65. /*----------------------------------------------------------------------------------*/
  66. enum {
  67. kThemeDataFileType = FOUR_CHAR_CODE('thme'), /* file type for theme files */
  68. kThemePlatinumFileType = FOUR_CHAR_CODE('pltn'), /* file type for platinum appearance */
  69. kThemeCustomThemesFileType = FOUR_CHAR_CODE('scen'), /* file type for user themes */
  70. kThemeSoundTrackFileType = FOUR_CHAR_CODE('tsnd')
  71. };
  72. /*----------------------------------------------------------------------------------*/
  73. /* Appearance Manager Supported Themes */
  74. /* Use CopyThemeIdentifier to get the current theme ID */
  75. /*----------------------------------------------------------------------------------*/
  76. #define kThemeAppearancePlatinum CFSTR( "com.apple.theme.appearance.platinum" )
  77. #define kThemeAppearanceAqua CFSTR( "com.apple.theme.appearance.aqua" )
  78. #define kThemeAppearanceAquaBlue CFSTR( "com.apple.theme.appearance.aqua.blue" )
  79. #define kThemeAppearanceAquaGraphite CFSTR( "com.apple.theme.appearance.aqua.graphite" )
  80. enum {
  81. kThemeBrushDialogBackgroundActive = 1, /* use with kModalWindowClass */
  82. kThemeBrushDialogBackgroundInactive = 2, /* use with kModalWindowClass */
  83. kThemeBrushAlertBackgroundActive = 3, /* use with kAlertWindowClass and kMovableAlertWindowClass */
  84. kThemeBrushAlertBackgroundInactive = 4, /* use with kAlertWindowClass and kMovableAlertWindowClass */
  85. kThemeBrushModelessDialogBackgroundActive = 5, /* use with kDocumentWindowClass */
  86. kThemeBrushModelessDialogBackgroundInactive = 6, /* use with kDocumentWindowClass */
  87. kThemeBrushUtilityWindowBackgroundActive = 7, /* use with kFloatingWindowClass and kUtilityWindowClass */
  88. kThemeBrushUtilityWindowBackgroundInactive = 8, /* use with kFloatingWindowClass and kUtilityWindowClass */
  89. kThemeBrushListViewSortColumnBackground = 9, /* Finder list views */
  90. kThemeBrushListViewBackground = 10,
  91. kThemeBrushIconLabelBackground = 11,
  92. kThemeBrushListViewSeparator = 12,
  93. kThemeBrushChasingArrows = 13,
  94. kThemeBrushDragHilite = 14,
  95. kThemeBrushDocumentWindowBackground = 15, /* use with kDocumentWindowClass */
  96. kThemeBrushFinderWindowBackground = 16
  97. };
  98. /* Brushes introduced in Appearance 1.1 (Mac OS 8.5) and later */
  99. enum {
  100. kThemeBrushScrollBarDelimiterActive = 17,
  101. kThemeBrushScrollBarDelimiterInactive = 18,
  102. kThemeBrushFocusHighlight = 19,
  103. kThemeBrushPopupArrowActive = 20,
  104. kThemeBrushPopupArrowPressed = 21,
  105. kThemeBrushPopupArrowInactive = 22,
  106. kThemeBrushAppleGuideCoachmark = 23,
  107. kThemeBrushIconLabelBackgroundSelected = 24,
  108. kThemeBrushStaticAreaFill = 25,
  109. kThemeBrushActiveAreaFill = 26,
  110. kThemeBrushButtonFrameActive = 27,
  111. kThemeBrushButtonFrameInactive = 28,
  112. kThemeBrushButtonFaceActive = 29,
  113. kThemeBrushButtonFaceInactive = 30,
  114. kThemeBrushButtonFacePressed = 31,
  115. kThemeBrushButtonActiveDarkShadow = 32,
  116. kThemeBrushButtonActiveDarkHighlight = 33,
  117. kThemeBrushButtonActiveLightShadow = 34,
  118. kThemeBrushButtonActiveLightHighlight = 35,
  119. kThemeBrushButtonInactiveDarkShadow = 36,
  120. kThemeBrushButtonInactiveDarkHighlight = 37,
  121. kThemeBrushButtonInactiveLightShadow = 38,
  122. kThemeBrushButtonInactiveLightHighlight = 39,
  123. kThemeBrushButtonPressedDarkShadow = 40,
  124. kThemeBrushButtonPressedDarkHighlight = 41,
  125. kThemeBrushButtonPressedLightShadow = 42,
  126. kThemeBrushButtonPressedLightHighlight = 43,
  127. kThemeBrushBevelActiveLight = 44,
  128. kThemeBrushBevelActiveDark = 45,
  129. kThemeBrushBevelInactiveLight = 46,
  130. kThemeBrushBevelInactiveDark = 47
  131. };
  132. /* Brushes introduced in Appearance 1.1.1 (Mac OS 9.0) and later */
  133. enum {
  134. kThemeBrushNotificationWindowBackground = 48
  135. };
  136. /* Brushes introduced in Carbon */
  137. enum {
  138. kThemeBrushMovableModalBackground = 49, /* use with kMovableModalWindowClass; available in Mac OS X, and CarbonLib 1.3 and later */
  139. kThemeBrushSheetBackgroundOpaque = 50, /* use with kSheetWindowClass and kSheetAlertWindowClass; available in Mac OS X, and CarbonLib 1.3 and later */
  140. kThemeBrushDrawerBackground = 51, /* use with kDrawerWindowClass; available in Mac OS X, and CarbonLib 1.3 and later */
  141. kThemeBrushToolbarBackground = 52, /* use with kToolbarWindowClass; available in Mac OS X, and CarbonLib 1.6 and later */
  142. kThemeBrushSheetBackgroundTransparent = 53, /* use with kSheetWindowClass and kSheetAlertWindowClass; available in Mac OS X 10.1 and CarbonLib 1.6, and later */
  143. kThemeBrushMenuBackground = 54, /* available in Mac OS X 10.1 and CarbonLib 1.6, and later */
  144. kThemeBrushMenuBackgroundSelected = 55 /* available in Mac OS X 10.1 and CarbonLib 1.6, and later */
  145. };
  146. /* Appearance X or later theme brush compatibility synonyms */
  147. enum {
  148. kThemeBrushSheetBackground = kThemeBrushSheetBackgroundOpaque
  149. };
  150. /* These values are meta-brushes, specific colors that do not */
  151. /* change from theme to theme. You can use them instead of using */
  152. /* direct RGB values. */
  153. enum {
  154. kThemeBrushBlack = -1,
  155. kThemeBrushWhite = -2,
  156. kThemeBrushPrimaryHighlightColor = -3, /* available in Mac OS 10.1 and CarbonLib 1.6, and later*/
  157. kThemeBrushSecondaryHighlightColor = -4 /* available in Mac OS 10.1 and CarbonLib 1.6, and later*/
  158. };
  159. typedef SInt16 ThemeBrush;
  160. enum {
  161. kThemeTextColorDialogActive = 1,
  162. kThemeTextColorDialogInactive = 2,
  163. kThemeTextColorAlertActive = 3,
  164. kThemeTextColorAlertInactive = 4,
  165. kThemeTextColorModelessDialogActive = 5,
  166. kThemeTextColorModelessDialogInactive = 6,
  167. kThemeTextColorWindowHeaderActive = 7,
  168. kThemeTextColorWindowHeaderInactive = 8,
  169. kThemeTextColorPlacardActive = 9,
  170. kThemeTextColorPlacardInactive = 10,
  171. kThemeTextColorPlacardPressed = 11,
  172. kThemeTextColorPushButtonActive = 12,
  173. kThemeTextColorPushButtonInactive = 13,
  174. kThemeTextColorPushButtonPressed = 14,
  175. kThemeTextColorBevelButtonActive = 15,
  176. kThemeTextColorBevelButtonInactive = 16,
  177. kThemeTextColorBevelButtonPressed = 17,
  178. kThemeTextColorPopupButtonActive = 18,
  179. kThemeTextColorPopupButtonInactive = 19,
  180. kThemeTextColorPopupButtonPressed = 20,
  181. kThemeTextColorIconLabel = 21,
  182. kThemeTextColorListView = 22
  183. };
  184. /* Text Colors available in Appearance 1.0.1 or later */
  185. enum {
  186. kThemeTextColorDocumentWindowTitleActive = 23,
  187. kThemeTextColorDocumentWindowTitleInactive = 24,
  188. kThemeTextColorMovableModalWindowTitleActive = 25,
  189. kThemeTextColorMovableModalWindowTitleInactive = 26,
  190. kThemeTextColorUtilityWindowTitleActive = 27,
  191. kThemeTextColorUtilityWindowTitleInactive = 28,
  192. kThemeTextColorPopupWindowTitleActive = 29,
  193. kThemeTextColorPopupWindowTitleInactive = 30,
  194. kThemeTextColorRootMenuActive = 31,
  195. kThemeTextColorRootMenuSelected = 32,
  196. kThemeTextColorRootMenuDisabled = 33,
  197. kThemeTextColorMenuItemActive = 34,
  198. kThemeTextColorMenuItemSelected = 35,
  199. kThemeTextColorMenuItemDisabled = 36,
  200. kThemeTextColorPopupLabelActive = 37,
  201. kThemeTextColorPopupLabelInactive = 38
  202. };
  203. /* Text colors available in Appearance 1.1 or later */
  204. enum {
  205. kThemeTextColorTabFrontActive = 39,
  206. kThemeTextColorTabNonFrontActive = 40,
  207. kThemeTextColorTabNonFrontPressed = 41,
  208. kThemeTextColorTabFrontInactive = 42,
  209. kThemeTextColorTabNonFrontInactive = 43,
  210. kThemeTextColorIconLabelSelected = 44,
  211. kThemeTextColorBevelButtonStickyActive = 45,
  212. kThemeTextColorBevelButtonStickyInactive = 46
  213. };
  214. /* Text colors available in Appearance 1.1.1 or later */
  215. enum {
  216. kThemeTextColorNotification = 47
  217. };
  218. /* Text colors only available later than OS X 10.1.3 */
  219. enum {
  220. kThemeTextColorSystemDetail = 48
  221. };
  222. /* These values are specific colors that do not change from */
  223. /* theme to theme. You can use them instead of using direct RGB values. */
  224. enum {
  225. kThemeTextColorBlack = -1,
  226. kThemeTextColorWhite = -2
  227. };
  228. typedef SInt16 ThemeTextColor;
  229. /* States to draw primitives: disabled, active, and pressed (hilited) */
  230. enum {
  231. kThemeStateInactive = 0,
  232. kThemeStateActive = 1,
  233. kThemeStatePressed = 2,
  234. kThemeStateRollover = 6,
  235. kThemeStateUnavailable = 7,
  236. kThemeStateUnavailableInactive = 8
  237. };
  238. /* obsolete name */
  239. enum {
  240. kThemeStateDisabled = 0
  241. };
  242. enum {
  243. kThemeStatePressedUp = 2, /* draw with up pressed (increment/decrement buttons) */
  244. kThemeStatePressedDown = 3 /* draw with down pressed (increment/decrement buttons) */
  245. };
  246. typedef UInt32 ThemeDrawState;
  247. /*----------------------------------------------------------------------------------*/
  248. /* Theme cursor selectors available in Appearance 1.1 or later */
  249. /*----------------------------------------------------------------------------------*/
  250. enum {
  251. kThemeArrowCursor = 0,
  252. kThemeCopyArrowCursor = 1,
  253. kThemeAliasArrowCursor = 2,
  254. kThemeContextualMenuArrowCursor = 3,
  255. kThemeIBeamCursor = 4,
  256. kThemeCrossCursor = 5,
  257. kThemePlusCursor = 6,
  258. kThemeWatchCursor = 7, /* Can Animate */
  259. kThemeClosedHandCursor = 8,
  260. kThemeOpenHandCursor = 9,
  261. kThemePointingHandCursor = 10,
  262. kThemeCountingUpHandCursor = 11, /* Can Animate */
  263. kThemeCountingDownHandCursor = 12, /* Can Animate */
  264. kThemeCountingUpAndDownHandCursor = 13, /* Can Animate */
  265. kThemeSpinningCursor = 14, /* Can Animate */
  266. kThemeResizeLeftCursor = 15,
  267. kThemeResizeRightCursor = 16,
  268. kThemeResizeLeftRightCursor = 17,
  269. kThemeNotAllowedCursor = 18 /* Jaguar or Later */
  270. };
  271. typedef UInt32 ThemeCursor;
  272. /*----------------------------------------------------------------------------------*/
  273. /* Theme menu bar drawing states */
  274. /*----------------------------------------------------------------------------------*/
  275. enum {
  276. kThemeMenuBarNormal = 0,
  277. kThemeMenuBarSelected = 1
  278. };
  279. typedef UInt16 ThemeMenuBarState;
  280. /* attributes */
  281. enum {
  282. kThemeMenuSquareMenuBar = (1 << 0)
  283. };
  284. /*----------------------------------------------------------------------------------*/
  285. /* Theme menu drawing states */
  286. /*----------------------------------------------------------------------------------*/
  287. enum {
  288. kThemeMenuActive = 0,
  289. kThemeMenuSelected = 1,
  290. kThemeMenuDisabled = 3
  291. };
  292. typedef UInt16 ThemeMenuState;
  293. /*------------------------------------------------------------------------------------------*/
  294. /* MenuType: add kThemeMenuTypeInactive to menu type for DrawThemeMenuBackground if entire */
  295. /* menu is inactive */
  296. /*------------------------------------------------------------------------------------------*/
  297. enum {
  298. kThemeMenuTypePullDown = 0,
  299. kThemeMenuTypePopUp = 1,
  300. kThemeMenuTypeHierarchical = 2,
  301. kThemeMenuTypeInactive = 0x0100
  302. };
  303. typedef UInt16 ThemeMenuType;
  304. enum {
  305. kThemeMenuItemPlain = 0,
  306. kThemeMenuItemHierarchical = 1, /* item has hierarchical arrow*/
  307. kThemeMenuItemScrollUpArrow = 2, /* for scrollable menus, indicates item is scroller*/
  308. kThemeMenuItemScrollDownArrow = 3,
  309. kThemeMenuItemAtTop = 0x0100, /* indicates item is being drawn at top of menu*/
  310. kThemeMenuItemAtBottom = 0x0200, /* indicates item is being drawn at bottom of menu*/
  311. kThemeMenuItemHierBackground = 0x0400, /* item is within a hierarchical menu*/
  312. kThemeMenuItemPopUpBackground = 0x0800, /* item is within a popped up menu*/
  313. kThemeMenuItemHasIcon = 0x8000, /* add into non-arrow type when icon present*/
  314. kThemeMenuItemNoBackground = 0x4000 /* don't draw the menu background while drawing this item (Mac OS X only)*/
  315. };
  316. typedef UInt16 ThemeMenuItemType;
  317. /*------------------------------------------------------------------------------------------*/
  318. /* Theme Backgrounds */
  319. /*------------------------------------------------------------------------------------------*/
  320. enum {
  321. kThemeBackgroundTabPane = 1,
  322. kThemeBackgroundPlacard = 2,
  323. kThemeBackgroundWindowHeader = 3,
  324. kThemeBackgroundListViewWindowHeader = 4,
  325. kThemeBackgroundSecondaryGroupBox = 5
  326. };
  327. typedef UInt32 ThemeBackgroundKind;
  328. /*------------------------------------------------------------------------------------------*/
  329. /* Theme Collection tags for Get/SetTheme */
  330. /* */
  331. /* X ALERT: Please note that Get/SetTheme are severely neutered under Mac OS X at present. */
  332. /* The first group of tags below are available to get under both 9 and X. The */
  333. /* second group is 9 only. None of the tags can be used in SetTheme on X, as it */
  334. /* is completely inert on X, and will return unimpErr. */
  335. /*------------------------------------------------------------------------------------------*/
  336. enum {
  337. kThemeNameTag = FOUR_CHAR_CODE('name'), /* Str255*/
  338. kThemeVariantNameTag = FOUR_CHAR_CODE('varn'), /* Str255*/
  339. kThemeVariantBaseTintTag = FOUR_CHAR_CODE('tint'), /* RGBColor (10.1 and later)*/
  340. kThemeHighlightColorTag = FOUR_CHAR_CODE('hcol'), /* RGBColor*/
  341. kThemeScrollBarArrowStyleTag = FOUR_CHAR_CODE('sbar'), /* ThemeScrollBarArrowStyle*/
  342. kThemeScrollBarThumbStyleTag = FOUR_CHAR_CODE('sbth'), /* ThemeScrollBarThumbStyle*/
  343. kThemeSoundsEnabledTag = FOUR_CHAR_CODE('snds'), /* Boolean*/
  344. kThemeDblClickCollapseTag = FOUR_CHAR_CODE('coll') /* Boolean*/
  345. };
  346. enum {
  347. kThemeAppearanceFileNameTag = FOUR_CHAR_CODE('thme'), /* Str255*/
  348. kThemeSystemFontTag = FOUR_CHAR_CODE('lgsf'), /* Str255*/
  349. kThemeSmallSystemFontTag = FOUR_CHAR_CODE('smsf'), /* Str255*/
  350. kThemeViewsFontTag = FOUR_CHAR_CODE('vfnt'), /* Str255*/
  351. kThemeViewsFontSizeTag = FOUR_CHAR_CODE('vfsz'), /* SInt16*/
  352. kThemeDesktopPatternNameTag = FOUR_CHAR_CODE('patn'), /* Str255*/
  353. kThemeDesktopPatternTag = FOUR_CHAR_CODE('patt'), /* <variable-length data> (flattened pattern)*/
  354. kThemeDesktopPictureNameTag = FOUR_CHAR_CODE('dpnm'), /* Str255*/
  355. kThemeDesktopPictureAliasTag = FOUR_CHAR_CODE('dpal'), /* <alias handle>*/
  356. kThemeDesktopPictureAlignmentTag = FOUR_CHAR_CODE('dpan'), /* UInt32 (see the Picture Alignments below)*/
  357. kThemeHighlightColorNameTag = FOUR_CHAR_CODE('hcnm'), /* Str255*/
  358. kThemeExamplePictureIDTag = FOUR_CHAR_CODE('epic'), /* SInt16*/
  359. kThemeSoundTrackNameTag = FOUR_CHAR_CODE('sndt'), /* Str255*/
  360. kThemeSoundMaskTag = FOUR_CHAR_CODE('smsk'), /* UInt32*/
  361. kThemeUserDefinedTag = FOUR_CHAR_CODE('user'), /* Boolean (this should _always_ be true if present - used by Control Panel).*/
  362. kThemeSmoothFontEnabledTag = FOUR_CHAR_CODE('smoo'), /* Boolean*/
  363. kThemeSmoothFontMinSizeTag = FOUR_CHAR_CODE('smos') /* UInt16 (must be >= 12 and <= 24)*/
  364. };
  365. /* Picture Aligmnents that might be reported in the data for kThemeDesktopPictureAlignmentTag*/
  366. enum {
  367. kTiledOnScreen = 1, /* draws picture repeatedly*/
  368. kCenterOnScreen = 2, /* "actual size", shows pattern on sides or clips picture if necessary*/
  369. kFitToScreen = 3, /* shrinks if necessary*/
  370. kFillScreen = 4, /* messes up aspect ratio if necessary*/
  371. kUseBestGuess = 5 /* heuristically determines the best way to display the picture based on picture and monitor sizes*/
  372. };
  373. /*------------------------------------------------------------------------------------------*/
  374. /* Theme Control Settings */
  375. /*------------------------------------------------------------------------------------------*/
  376. enum {
  377. kThemeCheckBoxClassicX = 0, /* check box with an 'X'*/
  378. kThemeCheckBoxCheckMark = 1 /* check box with a real check mark*/
  379. };
  380. typedef UInt16 ThemeCheckBoxStyle;
  381. enum {
  382. kThemeScrollBarArrowsSingle = 0, /* single arrow on each end*/
  383. kThemeScrollBarArrowsLowerRight = 1 /* double arrows only on right or bottom*/
  384. };
  385. typedef UInt16 ThemeScrollBarArrowStyle;
  386. enum {
  387. kThemeScrollBarThumbNormal = 0, /* normal, classic thumb size*/
  388. kThemeScrollBarThumbProportional = 1 /* proportional thumbs*/
  389. };
  390. typedef UInt16 ThemeScrollBarThumbStyle;
  391. /*------------------------------------------------------------------------------------------*/
  392. /* Font constants */
  393. /*------------------------------------------------------------------------------------------*/
  394. /*
  395. * Summary:
  396. * A ThemeFontID value is a virtual font ID which can be passed to
  397. * one of the Appearance Manager's text-related routines. Within
  398. * those routines, the ThemeFontID is mapped into the appropriate
  399. * real font (or fonts), size, and style based on the system
  400. * appearance (Platinum on Mac OS 9, Aqua on Mac OS X), the string
  401. * to be rendered (if any), the language/ script that the app is
  402. * running in, and possibly other factors. The ThemeFontIDs allow
  403. * you to get the correct text appearance for the platform your app
  404. * is currently running on.
  405. */
  406. enum {
  407. /*
  408. * The font used to draw most interface elements. If you can't find a
  409. * more appropriate font from the list below, you should use this
  410. * one. This font is suitable for drawing titles on most custom
  411. * widgets/buttons, as well as most static text in dialogs and
  412. * windows.
  413. */
  414. kThemeSystemFont = 0,
  415. /*
  416. * The font used to draw interface elements when space is at a
  417. * premium. It draws a slightly smaller font compared to
  418. * kThemeSystemFont.
  419. */
  420. kThemeSmallSystemFont = 1,
  421. /*
  422. * Identical to kThemeSmallSystemFont, except it draws bolded (or
  423. * otherwise emphasized in some fashion appropriate to your
  424. * application's language/script).
  425. */
  426. kThemeSmallEmphasizedSystemFont = 2,
  427. /*
  428. * The font used to draw file and folder names in Finder windows or
  429. * other browsable lists.
  430. */
  431. kThemeViewsFont = 3, /* The following ID's are only available with MacOS X or CarbonLib 1.3 and later*/
  432. /*
  433. * Identical to kThemeSystemFont, except it draws bolded (or
  434. * otherwise emphasized in some fashion appropriate to your
  435. * application's language/script). Only available on Mac OS X or
  436. * CarbonLib 1.3 or later.
  437. */
  438. kThemeEmphasizedSystemFont = 4,
  439. /*
  440. * An analog to the Script Manager's notion of the Application Font.
  441. * This font is a suitable default choice for your application's
  442. * document-style text editing areas. Only available on Mac OS X or
  443. * CarbonLib 1.3 or later.
  444. */
  445. kThemeApplicationFont = 5,
  446. /*
  447. * Generally smaller than kThemeSmallSystemFont, this font is
  448. * appropriate for drawing text labels next to image content that
  449. * reinforces the text's meaning (such as on a bevel button). Only
  450. * available on Mac OS X or CarbonLib 1.3 or later.
  451. */
  452. kThemeLabelFont = 6,
  453. /*
  454. * The font used to draw menu titles in the menu bar. Only available
  455. * on Mac OS X or CarbonLib 1.3 or later.
  456. */
  457. kThemeMenuTitleFont = 100,
  458. /*
  459. * The font used to draw menu items in the menus. Only available on
  460. * Mac OS X or CarbonLib 1.3 or later.
  461. */
  462. kThemeMenuItemFont = 101,
  463. /*
  464. * The font used to draw menu item marks in the menus. Only available
  465. * on Mac OS X or CarbonLib 1.3 or later.
  466. */
  467. kThemeMenuItemMarkFont = 102,
  468. /*
  469. * The font used to draw menu item command key equivalents in the
  470. * menus. Only available on Mac OS X or CarbonLib 1.3 or later.
  471. */
  472. kThemeMenuItemCmdKeyFont = 103,
  473. /*
  474. * The font used to draw text in most window title bars. Only
  475. * available on Mac OS X or CarbonLib 1.3 or later.
  476. */
  477. kThemeWindowTitleFont = 104,
  478. /*
  479. * The font used to draw text labels on push buttons. Only available
  480. * on Mac OS X or CarbonLib 1.3 or later.
  481. */
  482. kThemePushButtonFont = 105,
  483. /*
  484. * The font used to draw text in utility window title bars. Only
  485. * available on Mac OS X or CarbonLib 1.3 or later.
  486. */
  487. kThemeUtilityWindowTitleFont = 106,
  488. /*
  489. * The font used to draw the first (and most important) message of an
  490. * alert window. Only available on Mac OS X or CarbonLib 1.3 or later.
  491. */
  492. kThemeAlertHeaderFont = 107,
  493. kThemeSystemFontDetail = 7,
  494. kThemeSystemFontDetailEmphasized = 8,
  495. /*
  496. * Unlike the other ThemeFontIDs, this one doesn't map to a font
  497. * appropriate to your application's language or script. It maps
  498. * directly to the font, size, and style of the current Quickdraw
  499. * port. This allows you to get somewhat customized behavior out of
  500. * the APIs which take ThemeFontIDs. Note, however, that
  501. * kThemeCurrentPortFont does not (and will never) support all
  502. * Quickdraw styles on all platforms; in particular, outline and
  503. * shadow style are not supported on Mac OS X. Additionally,
  504. * kThemeCurrentPortFont is not (and will never be) completely
  505. * unicode savvy; use of kThemeCurrentPortFont may result in errors
  506. * having to do with the current port's font not being appropriate
  507. * for rendering or measuring all glyphs in a given unicode string.
  508. * Because of overhead associated with gathering Quickdraw font
  509. * information and converting it to the native font format on Mac OS
  510. * X, use of kThemeCurrentPortFont may slow down your text drawing
  511. * and measuring significantly compared to other ThemeFontIDs.
  512. * Instead of using kThemeCurrentPortFont, your application will
  513. * probably be better served by using one of the other ThemeFontIDs;
  514. * use kThemeCurrentPortFont only as a last resort. Only available on
  515. * Mac OS X or CarbonLib 1.3 or later.
  516. */
  517. kThemeCurrentPortFont = 200, /* Available in JAGUAR or later*/
  518. /*
  519. * The font used to draw the label of a toolbar item. Available in
  520. * Mac OS X 10.2 or later.
  521. */
  522. kThemeToolbarFont = 108
  523. };
  524. /* This is the total of the PUBLIC ThemeFontIDs!*/
  525. enum {
  526. kPublicThemeFontCount = 17
  527. };
  528. typedef UInt16 ThemeFontID;
  529. /*------------------------------------------------------------------------------------------*/
  530. /* Tab constants */
  531. /*------------------------------------------------------------------------------------------*/
  532. enum {
  533. kThemeTabNonFront = 0,
  534. kThemeTabNonFrontPressed = 1,
  535. kThemeTabNonFrontInactive = 2,
  536. kThemeTabFront = 3,
  537. kThemeTabFrontInactive = 4,
  538. kThemeTabNonFrontUnavailable = 5,
  539. kThemeTabFrontUnavailable = 6
  540. };
  541. typedef UInt16 ThemeTabStyle;
  542. enum {
  543. kThemeTabNorth = 0,
  544. kThemeTabSouth = 1,
  545. kThemeTabEast = 2,
  546. kThemeTabWest = 3
  547. };
  548. typedef UInt16 ThemeTabDirection;
  549. /* NOTE ON TAB HEIGHT */
  550. /* Use the kThemeSmallTabHeightMax and kThemeLargeTabHeightMax when calculating the rects */
  551. /* to draw tabs into. This height includes the tab frame overlap. Tabs that are not in the */
  552. /* front are only drawn down to where they meet the frame, as if the height was just */
  553. /* kThemeLargeTabHeight, for example, as opposed to the ...Max constant. Remember that for */
  554. /* East and West tabs, the height referred to below is actually the width. */
  555. enum {
  556. kThemeSmallTabHeight = 16, /* amount small tabs protrude from frame.*/
  557. kThemeLargeTabHeight = 21, /* amount large tabs protrude from frame.*/
  558. kThemeTabPaneOverlap = 3, /* amount tabs overlap frame.*/
  559. kThemeSmallTabHeightMax = 19, /* small tab height + overlap*/
  560. kThemeLargeTabHeightMax = 24 /* large tab height + overlap*/
  561. };
  562. /*------------------------------------------------------------------------------------------*/
  563. /* Track kinds */
  564. /*------------------------------------------------------------------------------------------*/
  565. enum {
  566. kThemeMediumScrollBar = 0,
  567. kThemeSmallScrollBar = 1,
  568. kThemeMediumSlider = 2,
  569. kThemeMediumProgressBar = 3,
  570. kThemeMediumIndeterminateBar = 4,
  571. kThemeRelevanceBar = 5,
  572. kThemeSmallSlider = 6,
  573. kThemeLargeProgressBar = 7,
  574. kThemeLargeIndeterminateBar = 8
  575. };
  576. typedef UInt16 ThemeTrackKind;
  577. /*------------------------------------------------------------------------------------------*/
  578. /* Track enable states */
  579. /*------------------------------------------------------------------------------------------*/
  580. enum {
  581. /* track states */
  582. kThemeTrackActive = 0,
  583. kThemeTrackDisabled = 1,
  584. kThemeTrackNothingToScroll = 2,
  585. kThemeTrackInactive = 3
  586. };
  587. typedef UInt8 ThemeTrackEnableState;
  588. /*------------------------------------------------------------------------------------------*/
  589. /* Track pressed states */
  590. /*------------------------------------------------------------------------------------------*/
  591. enum {
  592. /* press states (ignored unless track is active) */
  593. kThemeLeftOutsideArrowPressed = 0x01,
  594. kThemeLeftInsideArrowPressed = 0x02,
  595. kThemeLeftTrackPressed = 0x04,
  596. kThemeThumbPressed = 0x08,
  597. kThemeRightTrackPressed = 0x10,
  598. kThemeRightInsideArrowPressed = 0x20,
  599. kThemeRightOutsideArrowPressed = 0x40,
  600. kThemeTopOutsideArrowPressed = kThemeLeftOutsideArrowPressed,
  601. kThemeTopInsideArrowPressed = kThemeLeftInsideArrowPressed,
  602. kThemeTopTrackPressed = kThemeLeftTrackPressed,
  603. kThemeBottomTrackPressed = kThemeRightTrackPressed,
  604. kThemeBottomInsideArrowPressed = kThemeRightInsideArrowPressed,
  605. kThemeBottomOutsideArrowPressed = kThemeRightOutsideArrowPressed
  606. };
  607. typedef UInt8 ThemeTrackPressState;
  608. /*------------------------------------------------------------------------------------------*/
  609. /* Thumb directions */
  610. /*------------------------------------------------------------------------------------------*/
  611. enum {
  612. /* thumb direction */
  613. kThemeThumbPlain = 0,
  614. kThemeThumbUpward = 1,
  615. kThemeThumbDownward = 2
  616. };
  617. typedef UInt8 ThemeThumbDirection;
  618. /*------------------------------------------------------------------------------------------*/
  619. /* Track attributes */
  620. /*------------------------------------------------------------------------------------------*/
  621. /*
  622. * Discussion:
  623. * Theme track attributes control the look of the track elements as
  624. * drawn by the DrawThemeTrackFoo as well as the region returned by
  625. * GetThemeTrackFoo.
  626. */
  627. enum {
  628. /*
  629. * The track is drawn horizontally.
  630. */
  631. kThemeTrackHorizontal = (1 << 0),
  632. /*
  633. * The track progresses from right to left.
  634. */
  635. kThemeTrackRightToLeft = (1 << 1),
  636. /*
  637. * The track's thumb should be drawn.
  638. */
  639. kThemeTrackShowThumb = (1 << 2),
  640. /*
  641. * The provided thumbRgn should be drawn opaque, not as a ghost.
  642. */
  643. kThemeTrackThumbRgnIsNotGhost = (1 << 3),
  644. /*
  645. * The track scroll bar doesn't have arrows. This attribute
  646. * currently has no effect
  647. */
  648. kThemeTrackNoScrollBarArrows = (1 << 4),
  649. /*
  650. * The thumb has focus. This attribute currently has effect only on
  651. * sliders. Available only in Mac OS X after 10.1.
  652. */
  653. kThemeTrackHasFocus = (1 << 5)
  654. };
  655. typedef UInt16 ThemeTrackAttributes;
  656. /*------------------------------------------------------------------------------------------*/
  657. /* Track info block */
  658. /*------------------------------------------------------------------------------------------*/
  659. struct ScrollBarTrackInfo {
  660. SInt32 viewsize; /* current view range size */
  661. ThemeTrackPressState pressState; /* pressed parts state */
  662. };
  663. typedef struct ScrollBarTrackInfo ScrollBarTrackInfo;
  664. struct SliderTrackInfo {
  665. ThemeThumbDirection thumbDir; /* thumb direction */
  666. ThemeTrackPressState pressState; /* pressed parts state */
  667. };
  668. typedef struct SliderTrackInfo SliderTrackInfo;
  669. struct ProgressTrackInfo {
  670. UInt8 phase; /* phase for indeterminate progress */
  671. };
  672. typedef struct ProgressTrackInfo ProgressTrackInfo;
  673. struct ThemeTrackDrawInfo {
  674. ThemeTrackKind kind; /* what kind of track this info is for */
  675. Rect bounds; /* track basis rectangle */
  676. SInt32 min; /* min track value */
  677. SInt32 max; /* max track value */
  678. SInt32 value; /* current thumb value */
  679. UInt32 reserved;
  680. ThemeTrackAttributes attributes; /* various track attributes */
  681. ThemeTrackEnableState enableState; /* enable state */
  682. UInt8 filler1;
  683. union {
  684. ScrollBarTrackInfo scrollbar;
  685. SliderTrackInfo slider;
  686. ProgressTrackInfo progress;
  687. } trackInfo;
  688. };
  689. typedef struct ThemeTrackDrawInfo ThemeTrackDrawInfo;
  690. /*------------------------------------------------------------------------------------------*/
  691. /* ThemeWindowAttributes */
  692. /*------------------------------------------------------------------------------------------*/
  693. enum {
  694. kThemeWindowHasGrow = (1 << 0), /* can the size of the window be changed by the user? */
  695. kThemeWindowHasHorizontalZoom = (1 << 3), /* window can zoom only horizontally */
  696. kThemeWindowHasVerticalZoom = (1 << 4), /* window can zoom only vertically */
  697. kThemeWindowHasFullZoom = kThemeWindowHasHorizontalZoom + kThemeWindowHasVerticalZoom, /* window zooms in all directions */
  698. kThemeWindowHasCloseBox = (1 << 5), /* window has a close box */
  699. kThemeWindowHasCollapseBox = (1 << 6), /* window has a collapse box */
  700. kThemeWindowHasTitleText = (1 << 7), /* window has a title/title icon */
  701. kThemeWindowIsCollapsed = (1 << 8), /* window is in the collapsed state */
  702. kThemeWindowHasDirty = (1 << 9)
  703. };
  704. typedef UInt32 ThemeWindowAttributes;
  705. /*------------------------------------------------------------------------------------------*/
  706. /* Window Types Supported by the Appearance Manager */
  707. /*------------------------------------------------------------------------------------------*/
  708. enum {
  709. kThemeDocumentWindow = 0,
  710. kThemeDialogWindow = 1,
  711. kThemeMovableDialogWindow = 2,
  712. kThemeAlertWindow = 3,
  713. kThemeMovableAlertWindow = 4,
  714. kThemePlainDialogWindow = 5,
  715. kThemeShadowDialogWindow = 6,
  716. kThemePopupWindow = 7,
  717. kThemeUtilityWindow = 8,
  718. kThemeUtilitySideWindow = 9,
  719. kThemeSheetWindow = 10,
  720. kThemeDrawerWindow = 11
  721. };
  722. typedef UInt16 ThemeWindowType;
  723. /*------------------------------------------------------------------------------------------*/
  724. /* Window Widgets Supported by the Appearance Manager */
  725. /*------------------------------------------------------------------------------------------*/
  726. enum {
  727. kThemeWidgetCloseBox = 0,
  728. kThemeWidgetZoomBox = 1,
  729. kThemeWidgetCollapseBox = 2,
  730. kThemeWidgetDirtyCloseBox = 6
  731. };
  732. typedef UInt16 ThemeTitleBarWidget;
  733. /*------------------------------------------------------------------------------------------*/
  734. /* Popup arrow orientations */
  735. /*------------------------------------------------------------------------------------------*/
  736. enum {
  737. kThemeArrowLeft = 0,
  738. kThemeArrowDown = 1,
  739. kThemeArrowRight = 2,
  740. kThemeArrowUp = 3
  741. };
  742. typedef UInt16 ThemeArrowOrientation;
  743. /*------------------------------------------------------------------------------------------*/
  744. /* Popup arrow sizes */
  745. /*------------------------------------------------------------------------------------------*/
  746. enum {
  747. kThemeArrow3pt = 0,
  748. kThemeArrow5pt = 1,
  749. kThemeArrow7pt = 2,
  750. kThemeArrow9pt = 3
  751. };
  752. typedef UInt16 ThemePopupArrowSize;
  753. /*------------------------------------------------------------------------------------------*/
  754. /* Grow box directions */
  755. /*------------------------------------------------------------------------------------------*/
  756. enum {
  757. kThemeGrowLeft = (1 << 0), /* can grow to the left */
  758. kThemeGrowRight = (1 << 1), /* can grow to the right */
  759. kThemeGrowUp = (1 << 2), /* can grow up */
  760. kThemeGrowDown = (1 << 3) /* can grow down */
  761. };
  762. typedef UInt16 ThemeGrowDirection;
  763. /*------------------------------------------------------------------------------------------*/
  764. /* Button kinds */
  765. /*------------------------------------------------------------------------------------------*/
  766. enum {
  767. kThemePushButton = 0,
  768. kThemeCheckBox = 1,
  769. kThemeRadioButton = 2,
  770. kThemeBevelButton = 3, /* bevel button (obsolete) */
  771. kThemeArrowButton = 4, /* popup button without text (no label). See ThemeButtonAdornment for glyphs. */
  772. kThemePopupButton = 5, /* popup button */
  773. kThemeDisclosureButton = 6,
  774. kThemeIncDecButton = 7, /* increment/decrement buttons (no label) */
  775. kThemeSmallBevelButton = 8, /* small-shadow bevel button */
  776. kThemeMediumBevelButton = 3, /* med-shadow bevel button */
  777. kThemeLargeBevelButton = 9, /* large-shadow bevel button */
  778. kThemeListHeaderButton = 10, /* sort button for top of list */
  779. kThemeRoundButton = 11, /* round button */
  780. kThemeLargeRoundButton = 12, /* large round button */
  781. kThemeSmallCheckBox = 13, /* small checkbox */
  782. kThemeSmallRadioButton = 14, /* small radio button */
  783. kThemeRoundedBevelButton = 15, /* rounded bevel button */
  784. kThemeNormalCheckBox = kThemeCheckBox,
  785. kThemeNormalRadioButton = kThemeRadioButton
  786. };
  787. typedef UInt16 ThemeButtonKind;
  788. /*------------------------------------------------------------------------------------------*/
  789. /* Common button values */
  790. /*------------------------------------------------------------------------------------------*/
  791. enum {
  792. kThemeButtonOff = 0,
  793. kThemeButtonOn = 1,
  794. kThemeButtonMixed = 2,
  795. kThemeDisclosureRight = 0,
  796. kThemeDisclosureDown = 1,
  797. kThemeDisclosureLeft = 2
  798. };
  799. typedef UInt16 ThemeButtonValue;
  800. /*------------------------------------------------------------------------------------------*/
  801. /* Button adornment types */
  802. /*------------------------------------------------------------------------------------------*/
  803. enum {
  804. kThemeAdornmentNone = 0,
  805. kThemeAdornmentDefault = (1 << 0), /* if set, draw default ornamentation ( for push button and generic well ) */
  806. kThemeAdornmentFocus = (1 << 2), /* if set, draw focus */
  807. kThemeAdornmentRightToLeft = (1 << 4), /* if set, draw right to left label */
  808. kThemeAdornmentDrawIndicatorOnly = (1 << 5), /* if set, don't draw or erase label ( radio, check, disclosure ) */
  809. kThemeAdornmentHeaderButtonLeftNeighborSelected = (1 << 6), /* if set, draw the left border of the button as selected ( list header button only ) */
  810. kThemeAdornmentHeaderButtonRightNeighborSelected = (1 << 7), /* if set, draw the right border of the button ( list header button only ) */
  811. kThemeAdornmentHeaderButtonSortUp = (1 << 8), /* if set, draw the sort indicator pointing upward ( list header button only ) */
  812. kThemeAdornmentHeaderMenuButton = (1 << 9), /* if set, draw as a header menu button ( list header button only ) */
  813. kThemeAdornmentHeaderButtonNoShadow = (1 << 10), /* if set, draw the non-shadow area of the button ( list header button only ) */
  814. kThemeAdornmentHeaderButtonShadowOnly = (1 << 11), /* if set, draw the only the shadow area of the button ( list header button only ) */
  815. kThemeAdornmentNoShadow = kThemeAdornmentHeaderButtonNoShadow, /* old name */
  816. kThemeAdornmentShadowOnly = kThemeAdornmentHeaderButtonShadowOnly, /* old name */
  817. kThemeAdornmentArrowLeftArrow = (1 << 6), /* If set, draw a left arrow on the arrow button */
  818. kThemeAdornmentArrowDownArrow = (1 << 7), /* If set, draw a down arrow on the arrow button */
  819. kThemeAdornmentArrowDoubleArrow = (1 << 8), /* If set, draw a double arrow on the arrow button */
  820. kThemeAdornmentArrowUpArrow = (1 << 9) /* If set, draw a up arrow on the arrow button */
  821. };
  822. typedef UInt16 ThemeButtonAdornment;
  823. /*------------------------------------------------------------------------------------------*/
  824. /* Button drawing info block */
  825. /*------------------------------------------------------------------------------------------*/
  826. struct ThemeButtonDrawInfo {
  827. ThemeDrawState state;
  828. ThemeButtonValue value;
  829. ThemeButtonAdornment adornment;
  830. };
  831. typedef struct ThemeButtonDrawInfo ThemeButtonDrawInfo;
  832. typedef ThemeButtonDrawInfo * ThemeButtonDrawInfoPtr;
  833. /*------------------------------------------------------------------------------------------*/
  834. /* Sound Support */
  835. /* */
  836. /* X ALERT: Please note that none of the theme sound APIs currently function on X. */
  837. /*------------------------------------------------------------------------------------------*/
  838. /*------------------------------------------------------------------------------------------*/
  839. /* Sound classes */
  840. /* */
  841. /* You can use the constants below to set what sounds are active using the SetTheme API. */
  842. /* Use these with the kThemeSoundMask tag. */
  843. /*------------------------------------------------------------------------------------------*/
  844. enum {
  845. kThemeNoSounds = 0,
  846. kThemeWindowSoundsMask = (1 << 0),
  847. kThemeMenuSoundsMask = (1 << 1),
  848. kThemeControlSoundsMask = (1 << 2),
  849. kThemeFinderSoundsMask = (1 << 3)
  850. };
  851. /*------------------------------------------------------------------------------------------*/
  852. /* Drag Sounds */
  853. /* */
  854. /* Drag sounds are looped for the duration of the drag. */
  855. /* */
  856. /* Call BeginThemeDragSound at the start of the drag. */
  857. /* Call EndThemeDragSound when the drag has finished. */
  858. /* */
  859. /* Note that in order to maintain a consistent user experience, only one drag sound may */
  860. /* occur at a time. The sound should be attached to a mouse action, start after the */
  861. /* mouse goes down and stop when the mouse is released. */
  862. /*------------------------------------------------------------------------------------------*/
  863. enum {
  864. kThemeDragSoundNone = 0,
  865. kThemeDragSoundMoveWindow = FOUR_CHAR_CODE('wmov'),
  866. kThemeDragSoundGrowWindow = FOUR_CHAR_CODE('wgro'),
  867. kThemeDragSoundMoveUtilWindow = FOUR_CHAR_CODE('umov'),
  868. kThemeDragSoundGrowUtilWindow = FOUR_CHAR_CODE('ugro'),
  869. kThemeDragSoundMoveDialog = FOUR_CHAR_CODE('dmov'),
  870. kThemeDragSoundMoveAlert = FOUR_CHAR_CODE('amov'),
  871. kThemeDragSoundMoveIcon = FOUR_CHAR_CODE('imov'),
  872. kThemeDragSoundSliderThumb = FOUR_CHAR_CODE('slth'),
  873. kThemeDragSoundSliderGhost = FOUR_CHAR_CODE('slgh'),
  874. kThemeDragSoundScrollBarThumb = FOUR_CHAR_CODE('sbth'),
  875. kThemeDragSoundScrollBarGhost = FOUR_CHAR_CODE('sbgh'),
  876. kThemeDragSoundScrollBarArrowDecreasing = FOUR_CHAR_CODE('sbad'),
  877. kThemeDragSoundScrollBarArrowIncreasing = FOUR_CHAR_CODE('sbai'),
  878. kThemeDragSoundDragging = FOUR_CHAR_CODE('drag')
  879. };
  880. typedef OSType ThemeDragSoundKind;
  881. /*--------------------------------------------------------------------------*/
  882. /* State-change sounds */
  883. /* */
  884. /* State-change sounds are played asynchonously as a one-shot. */
  885. /* */
  886. /* Call PlayThemeSound to play the sound. The sound will play */
  887. /* asynchronously until complete, then stop automatically. */
  888. /*--------------------------------------------------------------------------*/
  889. enum {
  890. kThemeSoundNone = 0,
  891. kThemeSoundMenuOpen = FOUR_CHAR_CODE('mnuo'), /* menu sounds */
  892. kThemeSoundMenuClose = FOUR_CHAR_CODE('mnuc'),
  893. kThemeSoundMenuItemHilite = FOUR_CHAR_CODE('mnui'),
  894. kThemeSoundMenuItemRelease = FOUR_CHAR_CODE('mnus'),
  895. kThemeSoundWindowClosePress = FOUR_CHAR_CODE('wclp'), /* window sounds */
  896. kThemeSoundWindowCloseEnter = FOUR_CHAR_CODE('wcle'),
  897. kThemeSoundWindowCloseExit = FOUR_CHAR_CODE('wclx'),
  898. kThemeSoundWindowCloseRelease = FOUR_CHAR_CODE('wclr'),
  899. kThemeSoundWindowZoomPress = FOUR_CHAR_CODE('wzmp'),
  900. kThemeSoundWindowZoomEnter = FOUR_CHAR_CODE('wzme'),
  901. kThemeSoundWindowZoomExit = FOUR_CHAR_CODE('wzmx'),
  902. kThemeSoundWindowZoomRelease = FOUR_CHAR_CODE('wzmr'),
  903. kThemeSoundWindowCollapsePress = FOUR_CHAR_CODE('wcop'),
  904. kThemeSoundWindowCollapseEnter = FOUR_CHAR_CODE('wcoe'),
  905. kThemeSoundWindowCollapseExit = FOUR_CHAR_CODE('wcox'),
  906. kThemeSoundWindowCollapseRelease = FOUR_CHAR_CODE('wcor'),
  907. kThemeSoundWindowDragBoundary = FOUR_CHAR_CODE('wdbd'),
  908. kThemeSoundUtilWinClosePress = FOUR_CHAR_CODE('uclp'), /* utility window sounds */
  909. kThemeSoundUtilWinCloseEnter = FOUR_CHAR_CODE('ucle'),
  910. kThemeSoundUtilWinCloseExit = FOUR_CHAR_CODE('uclx'),
  911. kThemeSoundUtilWinCloseRelease = FOUR_CHAR_CODE('uclr'),
  912. kThemeSoundUtilWinZoomPress = FOUR_CHAR_CODE('uzmp'),
  913. kThemeSoundUtilWinZoomEnter = FOUR_CHAR_CODE('uzme'),
  914. kThemeSoundUtilWinZoomExit = FOUR_CHAR_CODE('uzmx'),
  915. kThemeSoundUtilWinZoomRelease = FOUR_CHAR_CODE('uzmr'),
  916. kThemeSoundUtilWinCollapsePress = FOUR_CHAR_CODE('ucop'),
  917. kThemeSoundUtilWinCollapseEnter = FOUR_CHAR_CODE('ucoe'),
  918. kThemeSoundUtilWinCollapseExit = FOUR_CHAR_CODE('ucox'),
  919. kThemeSoundUtilWinCollapseRelease = FOUR_CHAR_CODE('ucor'),
  920. kThemeSoundUtilWinDragBoundary = FOUR_CHAR_CODE('udbd'),
  921. kThemeSoundWindowOpen = FOUR_CHAR_CODE('wopn'), /* window close and zoom action */
  922. kThemeSoundWindowClose = FOUR_CHAR_CODE('wcls'),
  923. kThemeSoundWindowZoomIn = FOUR_CHAR_CODE('wzmi'),
  924. kThemeSoundWindowZoomOut = FOUR_CHAR_CODE('wzmo'),
  925. kThemeSoundWindowCollapseUp = FOUR_CHAR_CODE('wcol'),
  926. kThemeSoundWindowCollapseDown = FOUR_CHAR_CODE('wexp'),
  927. kThemeSoundWindowActivate = FOUR_CHAR_CODE('wact'),
  928. kThemeSoundUtilWindowOpen = FOUR_CHAR_CODE('uopn'),
  929. kThemeSoundUtilWindowClose = FOUR_CHAR_CODE('ucls'),
  930. kThemeSoundUtilWindowZoomIn = FOUR_CHAR_CODE('uzmi'),
  931. kThemeSoundUtilWindowZoomOut = FOUR_CHAR_CODE('uzmo'),
  932. kThemeSoundUtilWindowCollapseUp = FOUR_CHAR_CODE('ucol'),
  933. kThemeSoundUtilWindowCollapseDown = FOUR_CHAR_CODE('uexp'),
  934. kThemeSoundUtilWindowActivate = FOUR_CHAR_CODE('uact'),
  935. kThemeSoundDialogOpen = FOUR_CHAR_CODE('dopn'),
  936. kThemeSoundDialogClose = FOUR_CHAR_CODE('dlgc'),
  937. kThemeSoundAlertOpen = FOUR_CHAR_CODE('aopn'),
  938. kThemeSoundAlertClose = FOUR_CHAR_CODE('altc'),
  939. kThemeSoundPopupWindowOpen = FOUR_CHAR_CODE('pwop'),
  940. kThemeSoundPopupWindowClose = FOUR_CHAR_CODE('pwcl'),
  941. kThemeSoundButtonPress = FOUR_CHAR_CODE('btnp'), /* button */
  942. kThemeSoundButtonEnter = FOUR_CHAR_CODE('btne'),
  943. kThemeSoundButtonExit = FOUR_CHAR_CODE('btnx'),
  944. kThemeSoundButtonRelease = FOUR_CHAR_CODE('btnr'),
  945. kThemeSoundDefaultButtonPress = FOUR_CHAR_CODE('dbtp'), /* default button */
  946. kThemeSoundDefaultButtonEnter = FOUR_CHAR_CODE('dbte'),
  947. kThemeSoundDefaultButtonExit = FOUR_CHAR_CODE('dbtx'),
  948. kThemeSoundDefaultButtonRelease = FOUR_CHAR_CODE('dbtr'),
  949. kThemeSoundCancelButtonPress = FOUR_CHAR_CODE('cbtp'), /* cancel button */
  950. kThemeSoundCancelButtonEnter = FOUR_CHAR_CODE('cbte'),
  951. kThemeSoundCancelButtonExit = FOUR_CHAR_CODE('cbtx'),
  952. kThemeSoundCancelButtonRelease = FOUR_CHAR_CODE('cbtr'),
  953. kThemeSoundCheckboxPress = FOUR_CHAR_CODE('chkp'), /* checkboxes */
  954. kThemeSoundCheckboxEnter = FOUR_CHAR_CODE('chke'),
  955. kThemeSoundCheckboxExit = FOUR_CHAR_CODE('chkx'),
  956. kThemeSoundCheckboxRelease = FOUR_CHAR_CODE('chkr'),
  957. kThemeSoundRadioPress = FOUR_CHAR_CODE('radp'), /* radio buttons */
  958. kThemeSoundRadioEnter = FOUR_CHAR_CODE('rade'),
  959. kThemeSoundRadioExit = FOUR_CHAR_CODE('radx'),
  960. kThemeSoundRadioRelease = FOUR_CHAR_CODE('radr'),
  961. kThemeSoundScrollArrowPress = FOUR_CHAR_CODE('sbap'), /* scroll bars */
  962. kThemeSoundScrollArrowEnter = FOUR_CHAR_CODE('sbae'),
  963. kThemeSoundScrollArrowExit = FOUR_CHAR_CODE('sbax'),
  964. kThemeSoundScrollArrowRelease = FOUR_CHAR_CODE('sbar'),
  965. kThemeSoundScrollEndOfTrack = FOUR_CHAR_CODE('sbte'),
  966. kThemeSoundScrollTrackPress = FOUR_CHAR_CODE('sbtp'),
  967. kThemeSoundSliderEndOfTrack = FOUR_CHAR_CODE('slte'), /* sliders */
  968. kThemeSoundSliderTrackPress = FOUR_CHAR_CODE('sltp'),
  969. kThemeSoundBalloonOpen = FOUR_CHAR_CODE('blno'), /* help balloons */
  970. kThemeSoundBalloonClose = FOUR_CHAR_CODE('blnc'),
  971. kThemeSoundBevelPress = FOUR_CHAR_CODE('bevp'), /* Bevel buttons */
  972. kThemeSoundBevelEnter = FOUR_CHAR_CODE('beve'),
  973. kThemeSoundBevelExit = FOUR_CHAR_CODE('bevx'),
  974. kThemeSoundBevelRelease = FOUR_CHAR_CODE('bevr'),
  975. kThemeSoundLittleArrowUpPress = FOUR_CHAR_CODE('laup'), /* Little Arrows */
  976. kThemeSoundLittleArrowDnPress = FOUR_CHAR_CODE('ladp'),
  977. kThemeSoundLittleArrowEnter = FOUR_CHAR_CODE('lare'),
  978. kThemeSoundLittleArrowExit = FOUR_CHAR_CODE('larx'),
  979. kThemeSoundLittleArrowUpRelease = FOUR_CHAR_CODE('laur'),
  980. kThemeSoundLittleArrowDnRelease = FOUR_CHAR_CODE('ladr'),
  981. kThemeSoundPopupPress = FOUR_CHAR_CODE('popp'), /* Popup Buttons */
  982. kThemeSoundPopupEnter = FOUR_CHAR_CODE('pope'),
  983. kThemeSoundPopupExit = FOUR_CHAR_CODE('popx'),
  984. kThemeSoundPopupRelease = FOUR_CHAR_CODE('popr'),
  985. kThemeSoundDisclosurePress = FOUR_CHAR_CODE('dscp'), /* Disclosure Buttons */
  986. kThemeSoundDisclosureEnter = FOUR_CHAR_CODE('dsce'),
  987. kThemeSoundDisclosureExit = FOUR_CHAR_CODE('dscx'),
  988. kThemeSoundDisclosureRelease = FOUR_CHAR_CODE('dscr'),
  989. kThemeSoundTabPressed = FOUR_CHAR_CODE('tabp'), /* Tabs */
  990. kThemeSoundTabEnter = FOUR_CHAR_CODE('tabe'),
  991. kThemeSoundTabExit = FOUR_CHAR_CODE('tabx'),
  992. kThemeSoundTabRelease = FOUR_CHAR_CODE('tabr'),
  993. kThemeSoundDragTargetHilite = FOUR_CHAR_CODE('dthi'), /* drag manager */
  994. kThemeSoundDragTargetUnhilite = FOUR_CHAR_CODE('dtuh'),
  995. kThemeSoundDragTargetDrop = FOUR_CHAR_CODE('dtdr'),
  996. kThemeSoundEmptyTrash = FOUR_CHAR_CODE('ftrs'), /* finder */
  997. kThemeSoundSelectItem = FOUR_CHAR_CODE('fsel'),
  998. kThemeSoundNewItem = FOUR_CHAR_CODE('fnew'),
  999. kThemeSoundReceiveDrop = FOUR_CHAR_CODE('fdrp'),
  1000. kThemeSoundCopyDone = FOUR_CHAR_CODE('fcpd'),
  1001. kThemeSoundResolveAlias = FOUR_CHAR_CODE('fral'),
  1002. kThemeSoundLaunchApp = FOUR_CHAR_CODE('flap'),
  1003. kThemeSoundDiskInsert = FOUR_CHAR_CODE('dski'),
  1004. kThemeSoundDiskEject = FOUR_CHAR_CODE('dske'),
  1005. kThemeSoundFinderDragOnIcon = FOUR_CHAR_CODE('fdon'),
  1006. kThemeSoundFinderDragOffIcon = FOUR_CHAR_CODE('fdof')
  1007. };
  1008. typedef OSType ThemeSoundKind;
  1009. /*------------------------------------------------------------------------------------------*/
  1010. /* Window Metrics */
  1011. /*------------------------------------------------------------------------------------------*/
  1012. /* Window metrics are used by the Appearance manager to fill in the blanks necessary to */
  1013. /* draw windows. If a value is not appropriate for the type of window, be sure to fill in */
  1014. /* the slot in the structure with zero. For the popupTabOffset parameter, you can pass a*/
  1015. /* real value based on the left edge of the window. This value might be interpreted in a */
  1016. /* different manner when depending on the value of the popupTabPosition field. The values */
  1017. /* you can pass into popupTabPosition are: */
  1018. /* */
  1019. /* kThemePopupTabNormalPosition */
  1020. /* Starts the tab left edge at the position indicated by the popupTabOffset field. */
  1021. /* */
  1022. /* kThemePopupTabCenterOnWindow */
  1023. /* tells us to ignore the offset field and instead simply center the width of the */
  1024. /* handle on the window. */
  1025. /* */
  1026. /* kThemePopupTabCenterOnOffset */
  1027. /* tells us to center the width of the handle around the value passed in offset. */
  1028. /* */
  1029. /* The Appearance Manager will try its best to accomodate the requested placement, but may */
  1030. /* move the handle slightly to make it fit correctly. */
  1031. /* */
  1032. enum {
  1033. kThemePopupTabNormalPosition = 0,
  1034. kThemePopupTabCenterOnWindow = 1,
  1035. kThemePopupTabCenterOnOffset = 2
  1036. };
  1037. struct ThemeWindowMetrics {
  1038. UInt16 metricSize; /* should be always be sizeof( ThemeWindowMetrics )*/
  1039. SInt16 titleHeight;
  1040. SInt16 titleWidth;
  1041. SInt16 popupTabOffset;
  1042. SInt16 popupTabWidth;
  1043. UInt16 popupTabPosition;
  1044. };
  1045. typedef struct ThemeWindowMetrics ThemeWindowMetrics;
  1046. typedef ThemeWindowMetrics * ThemeWindowMetricsPtr;
  1047. /*------------------------------------------------------------------------------------------*/
  1048. /* Theme Metrics */
  1049. /*------------------------------------------------------------------------------------------*/
  1050. /*
  1051. * Discussion:
  1052. * Theme metrics allow you to find out sizes of things in the
  1053. * current environment, such as how wide a scroll bar is, etc.
  1054. */
  1055. enum {
  1056. /*
  1057. * The width (or height if horizontal) of a scroll bar.
  1058. */
  1059. kThemeMetricScrollBarWidth = 0,
  1060. /*
  1061. * The width (or height if horizontal) of a small scroll bar.
  1062. */
  1063. kThemeMetricSmallScrollBarWidth = 1,
  1064. /*
  1065. * The height of the non-label part of a check box control.
  1066. */
  1067. kThemeMetricCheckBoxHeight = 2,
  1068. /*
  1069. * The height of the non-label part of a radio button control.
  1070. */
  1071. kThemeMetricRadioButtonHeight = 3,
  1072. /*
  1073. * The amount of white space surrounding the text Rect of the text
  1074. * inside of an Edit Text control. If you select all of the text in
  1075. * an Edit Text control, you can see the white space. The metric is
  1076. * the number of pixels, per side, that the text Rect is outset to
  1077. * create the whitespace Rect.
  1078. */
  1079. kThemeMetricEditTextWhitespace = 4,
  1080. /*
  1081. * The thickness of the Edit Text frame that surrounds the whitespace
  1082. * Rect (that is surrounding the text Rect). The metric is the number
  1083. * of pixels, per side, that the frame Rect is outset from the
  1084. * whitespace Rect.
  1085. */
  1086. kThemeMetricEditTextFrameOutset = 5,
  1087. /*
  1088. * The number of pixels that the list box frame is outset from the
  1089. * content of the list box.
  1090. */
  1091. kThemeMetricListBoxFrameOutset = 6,
  1092. /*
  1093. * This is a deprecated metric. Don't use it. It used to describe
  1094. * how far the focus rect used to draw from a control, but control
  1095. * focus drawing no longer uses this information to draw its focus.
  1096. */
  1097. kThemeMetricFocusRectOutset = 7,
  1098. /*
  1099. * The thickness of the frame drawn by DrawThemeGenericWell.
  1100. */
  1101. kThemeMetricImageWellThickness = 8,
  1102. /*
  1103. * The number of pixels a scrollbar should overlap (actually
  1104. * underlap) any bounding box which surrounds it and scrollable
  1105. * content. This also includes the window frame when a scrolbar is
  1106. * along an edge of the window.
  1107. */
  1108. kThemeMetricScrollBarOverlap = 9,
  1109. /*
  1110. * The height of the large tab of a tab control.
  1111. */
  1112. kThemeMetricLargeTabHeight = 10,
  1113. /*
  1114. * The width of the caps (end pieces) of the large tabs of a tab
  1115. * control.
  1116. */
  1117. kThemeMetricLargeTabCapsWidth = 11,
  1118. /*
  1119. * The amount to add to the tab height (kThemeMetricLargeTabHeight)
  1120. * to find out the rectangle height to use with the various Tab
  1121. * drawing primitives. This amount is also the amount that each tab
  1122. * overlaps the tab pane.
  1123. */
  1124. kThemeMetricTabFrameOverlap = 12,
  1125. /*
  1126. * If less than zero, this indicates that the text should be centered
  1127. * on each tab. If greater than zero, the text should be justified
  1128. * (according to the system script direction) and the amount is the
  1129. * offset from the appropriate edge at which the text should start
  1130. * drawing.
  1131. */
  1132. kThemeMetricTabIndentOrStyle = 13,
  1133. /*
  1134. * The amount of space that every tab's drawing rectangle overlaps
  1135. * the one on either side of it.
  1136. */
  1137. kThemeMetricTabOverlap = 14,
  1138. /*
  1139. * The height of the small tab of a tab control. This includes the
  1140. * pixels that overlap the tab pane and/or tab pane bar.
  1141. */
  1142. kThemeMetricSmallTabHeight = 15,
  1143. /*
  1144. * The width of the caps (end pieces) of the small tabs of a tab
  1145. * control.
  1146. */
  1147. kThemeMetricSmallTabCapsWidth = 16,
  1148. /*
  1149. * The height and the width of the push button control.
  1150. */
  1151. kThemeMetricPushButtonHeight = 19,
  1152. /*
  1153. * The height of the list header field of the data browser control.
  1154. */
  1155. kThemeMetricListHeaderHeight = 20,
  1156. /*
  1157. * The height of a disclosure triangle control. This triangle is the
  1158. * not the center of the disclosure button, but its own control.
  1159. */
  1160. kThemeMetricDisclosureTriangleHeight = 25,
  1161. /*
  1162. * The width of a disclosure triangle control.
  1163. */
  1164. kThemeMetricDisclosureTriangleWidth = 26,
  1165. /*
  1166. * The height of a little arrows control.
  1167. */
  1168. kThemeMetricLittleArrowsHeight = 27,
  1169. /*
  1170. * The width of a little arrows control.
  1171. */
  1172. kThemeMetricLittleArrowsWidth = 28,
  1173. /*
  1174. * The height of a popup button control.
  1175. */
  1176. kThemeMetricPopupButtonHeight = 30,
  1177. /*
  1178. * The height of a small popup button control.
  1179. */
  1180. kThemeMetricSmallPopupButtonHeight = 31,
  1181. /*
  1182. * The height of the large progress bar, not including its shadow.
  1183. */
  1184. kThemeMetricLargeProgressBarThickness = 32,
  1185. /*
  1186. * This metric is not used.
  1187. */
  1188. kThemeMetricPullDownHeight = 33,
  1189. /*
  1190. * This metric is not used.
  1191. */
  1192. kThemeMetricSmallPullDownHeight = 34,
  1193. /*
  1194. * The height of the window grow box control.
  1195. */
  1196. kThemeMetricResizeControlHeight = 38,
  1197. /*
  1198. * The width of the window grow box control.
  1199. */
  1200. kThemeMetricSmallResizeControlHeight = 39,
  1201. /*
  1202. * The height of the horizontal slider control.
  1203. */
  1204. kThemeMetricHSliderHeight = 41,
  1205. /*
  1206. * The height of the tick marks for a horizontal slider control.
  1207. */
  1208. kThemeMetricHSliderTickHeight = 42,
  1209. /*
  1210. * The width of the vertical slider control.
  1211. */
  1212. kThemeMetricVSliderWidth = 45,
  1213. /*
  1214. * The width of the tick marks for a vertical slider control.
  1215. */
  1216. kThemeMetricVSliderTickWidth = 46,
  1217. /*
  1218. * The height of the title bar widgets (grow, close, and zoom boxes)
  1219. * for a document window.
  1220. */
  1221. kThemeMetricTitleBarControlsHeight = 49,
  1222. /*
  1223. * The width of the non-label part of a check box control.
  1224. */
  1225. kThemeMetricCheckBoxWidth = 50,
  1226. /*
  1227. * The width of the non-label part of a radio button control.
  1228. */
  1229. kThemeMetricRadioButtonWidth = 52,
  1230. /*
  1231. * The height of the normal bar, not including its shadow.
  1232. */
  1233. kThemeMetricNormalProgressBarThickness = 58,
  1234. /*
  1235. * The number of pixels of shadow depth drawn below the progress bar.
  1236. */
  1237. kThemeMetricProgressBarShadowOutset = 59,
  1238. /*
  1239. * The number of pixels of shadow depth drawn below the small
  1240. * progress bar.
  1241. */
  1242. kThemeMetricSmallProgressBarShadowOutset = 60,
  1243. /*
  1244. * The number of pixels that the content of a primary group box is
  1245. * from the bounds of the control.
  1246. */
  1247. kThemeMetricPrimaryGroupBoxContentInset = 61,
  1248. /*
  1249. * The number of pixels that the content of a secondary group box is
  1250. * from the bounds of the control.
  1251. */
  1252. kThemeMetricSecondaryGroupBoxContentInset = 62,
  1253. /*
  1254. * Width allocated to draw the mark character in a menu.
  1255. */
  1256. kThemeMetricMenuMarkColumnWidth = 63,
  1257. /*
  1258. * Width allocated for the mark character in a menu item when the
  1259. * menu has kMenuAttrExcludesMarkColumn.
  1260. */
  1261. kThemeMetricMenuExcludedMarkColumnWidth = 64,
  1262. /*
  1263. * Indent into the interior of the mark column at which the mark
  1264. * character is drawn.
  1265. */
  1266. kThemeMetricMenuMarkIndent = 65,
  1267. /*
  1268. * Whitespace at the leading edge of menu item text.
  1269. */
  1270. kThemeMetricMenuTextLeadingEdgeMargin = 66,
  1271. /*
  1272. * Whitespace at the trailing edge of menu item text.
  1273. */
  1274. kThemeMetricMenuTextTrailingEdgeMargin = 67,
  1275. /*
  1276. * Width per indent level (set by SetMenuItemIndent) of a menu item.
  1277. */
  1278. kThemeMetricMenuIndentWidth = 68,
  1279. /*
  1280. * Whitespace at the trailing edge of a menu icon (if the item also
  1281. * has text).
  1282. */
  1283. kThemeMetricMenuIconTrailingEdgeMargin = 69
  1284. };
  1285. /*
  1286. * Discussion:
  1287. * The following metrics are only available in OS X.
  1288. */
  1289. enum {
  1290. /*
  1291. * The height of a disclosure button.
  1292. */
  1293. kThemeMetricDisclosureButtonHeight = 17,
  1294. /*
  1295. * The height and the width of the round button control.
  1296. */
  1297. kThemeMetricRoundButtonSize = 18,
  1298. /*
  1299. * The height of the non-label part of a small check box control.
  1300. */
  1301. kThemeMetricSmallCheckBoxHeight = 21,
  1302. /*
  1303. * The width of a disclosure button.
  1304. */
  1305. kThemeMetricDisclosureButtonWidth = 22,
  1306. /*
  1307. * The height of a small disclosure button.
  1308. */
  1309. kThemeMetricSmallDisclosureButtonHeight = 23,
  1310. /*
  1311. * The width of a small disclosure button.
  1312. */
  1313. kThemeMetricSmallDisclosureButtonWidth = 24,
  1314. /*
  1315. * The height (or width if vertical) of a pane splitter.
  1316. */
  1317. kThemeMetricPaneSplitterHeight = 29,
  1318. /*
  1319. * The height of the small push button control.
  1320. */
  1321. kThemeMetricSmallPushButtonHeight = 35,
  1322. /*
  1323. * The height of the non-label part of a small radio button control.
  1324. */
  1325. kThemeMetricSmallRadioButtonHeight = 36,
  1326. /*
  1327. * The height of the relevance indicator control.
  1328. */
  1329. kThemeMetricRelevanceIndicatorHeight = 37,
  1330. /*
  1331. * The height and the width of the large round button control.
  1332. */
  1333. kThemeMetricLargeRoundButtonSize = 40,
  1334. /*
  1335. * The height of the small, horizontal slider control.
  1336. */
  1337. kThemeMetricSmallHSliderHeight = 43,
  1338. /*
  1339. * The height of the tick marks for a small, horizontal slider
  1340. * control.
  1341. */
  1342. kThemeMetricSmallHSliderTickHeight = 44,
  1343. /*
  1344. * The width of the small, vertical slider control.
  1345. */
  1346. kThemeMetricSmallVSliderWidth = 47,
  1347. /*
  1348. * The width of the tick marks for a small, vertical slider control.
  1349. */
  1350. kThemeMetricSmallVSliderTickWidth = 48,
  1351. /*
  1352. * The width of the non-label part of a small check box control.
  1353. */
  1354. kThemeMetricSmallCheckBoxWidth = 51,
  1355. /*
  1356. * The width of the non-label part of a small radio button control.
  1357. */
  1358. kThemeMetricSmallRadioButtonWidth = 53,
  1359. /*
  1360. * The minimum width of the thumb of a small, horizontal slider
  1361. * control.
  1362. */
  1363. kThemeMetricSmallHSliderMinThumbWidth = 54,
  1364. /*
  1365. * The minimum width of the thumb of a small, vertical slider control.
  1366. */
  1367. kThemeMetricSmallVSliderMinThumbHeight = 55,
  1368. /*
  1369. * The offset of the tick marks from the appropriate side of a small
  1370. * horizontal slider control.
  1371. */
  1372. kThemeMetricSmallHSliderTickOffset = 56,
  1373. /*
  1374. * The offset of the tick marks from the appropriate side of a small
  1375. * vertical slider control.
  1376. */
  1377. kThemeMetricSmallVSliderTickOffset = 57
  1378. };
  1379. typedef UInt32 ThemeMetric;
  1380. /*------------------------------------------------------------------------------------------*/
  1381. /* Drawing State */
  1382. /*------------------------------------------------------------------------------------------*/
  1383. typedef struct OpaqueThemeDrawingState* ThemeDrawingState;
  1384. /*------------------------------------------------------------------------------------------*/
  1385. /* Callback procs */
  1386. /*------------------------------------------------------------------------------------------*/
  1387. typedef CALLBACK_API( void , ThemeTabTitleDrawProcPtr )(const Rect *bounds, ThemeTabStyle style, ThemeTabDirection direction, SInt16 depth, Boolean isColorDev, UInt32 userData);
  1388. typedef CALLBACK_API( void , ThemeEraseProcPtr )(const Rect *bounds, UInt32 eraseData, SInt16 depth, Boolean isColorDev);
  1389. typedef CALLBACK_API( void , ThemeButtonDrawProcPtr )(const Rect *bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo *info, UInt32 userData, SInt16 depth, Boolean isColorDev);
  1390. typedef CALLBACK_API( void , WindowTitleDrawingProcPtr )(const Rect *bounds, SInt16 depth, Boolean colorDevice, UInt32 userData);
  1391. typedef CALLBACK_API( Boolean , ThemeIteratorProcPtr )(ConstStr255Param inFileName, SInt16 resID, Collection inThemeSettings, void *inUserData);
  1392. typedef STACK_UPP_TYPE(ThemeTabTitleDrawProcPtr) ThemeTabTitleDrawUPP;
  1393. typedef STACK_UPP_TYPE(ThemeEraseProcPtr) ThemeEraseUPP;
  1394. typedef STACK_UPP_TYPE(ThemeButtonDrawProcPtr) ThemeButtonDrawUPP;
  1395. typedef STACK_UPP_TYPE(WindowTitleDrawingProcPtr) WindowTitleDrawingUPP;
  1396. typedef STACK_UPP_TYPE(ThemeIteratorProcPtr) ThemeIteratorUPP;
  1397. /*
  1398. * NewThemeTabTitleDrawUPP()
  1399. *
  1400. * Availability:
  1401. * Non-Carbon CFM: available as macro/inline
  1402. * CarbonLib: in CarbonLib 1.0 and later
  1403. * Mac OS X: in version 10.0 and later
  1404. */
  1405. EXTERN_API_C( ThemeTabTitleDrawUPP )
  1406. NewThemeTabTitleDrawUPP(ThemeTabTitleDrawProcPtr userRoutine);
  1407. #if !OPAQUE_UPP_TYPES
  1408. enum { uppThemeTabTitleDrawProcInfo = 0x00036AC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 2_bytes, 2_bytes, 1_byte, 4_bytes) */
  1409. #ifdef __cplusplus
  1410. inline DEFINE_API_C(ThemeTabTitleDrawUPP) NewThemeTabTitleDrawUPP(ThemeTabTitleDrawProcPtr userRoutine) { return (ThemeTabTitleDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeTabTitleDrawProcInfo, GetCurrentArchitecture()); }
  1411. #else
  1412. #define NewThemeTabTitleDrawUPP(userRoutine) (ThemeTabTitleDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeTabTitleDrawProcInfo, GetCurrentArchitecture())
  1413. #endif
  1414. #endif
  1415. /*
  1416. * NewThemeEraseUPP()
  1417. *
  1418. * Availability:
  1419. * Non-Carbon CFM: available as macro/inline
  1420. * CarbonLib: in CarbonLib 1.0 and later
  1421. * Mac OS X: in version 10.0 and later
  1422. */
  1423. EXTERN_API_C( ThemeEraseUPP )
  1424. NewThemeEraseUPP(ThemeEraseProcPtr userRoutine);
  1425. #if !OPAQUE_UPP_TYPES
  1426. enum { uppThemeEraseProcInfo = 0x00001BC0 }; /* pascal no_return_value Func(4_bytes, 4_bytes, 2_bytes, 1_byte) */
  1427. #ifdef __cplusplus
  1428. inline DEFINE_API_C(ThemeEraseUPP) NewThemeEraseUPP(ThemeEraseProcPtr userRoutine) { return (ThemeEraseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeEraseProcInfo, GetCurrentArchitecture()); }
  1429. #else
  1430. #define NewThemeEraseUPP(userRoutine) (ThemeEraseUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeEraseProcInfo, GetCurrentArchitecture())
  1431. #endif
  1432. #endif
  1433. /*
  1434. * NewThemeButtonDrawUPP()
  1435. *
  1436. * Availability:
  1437. * Non-Carbon CFM: available as macro/inline
  1438. * CarbonLib: in CarbonLib 1.0 and later
  1439. * Mac OS X: in version 10.0 and later
  1440. */
  1441. EXTERN_API_C( ThemeButtonDrawUPP )
  1442. NewThemeButtonDrawUPP(ThemeButtonDrawProcPtr userRoutine);
  1443. #if !OPAQUE_UPP_TYPES
  1444. enum { uppThemeButtonDrawProcInfo = 0x0001BEC0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 4_bytes, 4_bytes, 2_bytes, 1_byte) */
  1445. #ifdef __cplusplus
  1446. inline DEFINE_API_C(ThemeButtonDrawUPP) NewThemeButtonDrawUPP(ThemeButtonDrawProcPtr userRoutine) { return (ThemeButtonDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeButtonDrawProcInfo, GetCurrentArchitecture()); }
  1447. #else
  1448. #define NewThemeButtonDrawUPP(userRoutine) (ThemeButtonDrawUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeButtonDrawProcInfo, GetCurrentArchitecture())
  1449. #endif
  1450. #endif
  1451. /*
  1452. * NewWindowTitleDrawingUPP()
  1453. *
  1454. * Availability:
  1455. * Non-Carbon CFM: available as macro/inline
  1456. * CarbonLib: in CarbonLib 1.0 and later
  1457. * Mac OS X: in version 10.0 and later
  1458. */
  1459. EXTERN_API_C( WindowTitleDrawingUPP )
  1460. NewWindowTitleDrawingUPP(WindowTitleDrawingProcPtr userRoutine);
  1461. #if !OPAQUE_UPP_TYPES
  1462. enum { uppWindowTitleDrawingProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
  1463. #ifdef __cplusplus
  1464. inline DEFINE_API_C(WindowTitleDrawingUPP) NewWindowTitleDrawingUPP(WindowTitleDrawingProcPtr userRoutine) { return (WindowTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowTitleDrawingProcInfo, GetCurrentArchitecture()); }
  1465. #else
  1466. #define NewWindowTitleDrawingUPP(userRoutine) (WindowTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppWindowTitleDrawingProcInfo, GetCurrentArchitecture())
  1467. #endif
  1468. #endif
  1469. /*
  1470. * NewThemeIteratorUPP()
  1471. *
  1472. * Availability:
  1473. * Non-Carbon CFM: available as macro/inline
  1474. * CarbonLib: in CarbonLib 1.0 and later
  1475. * Mac OS X: in version 10.0 and later
  1476. */
  1477. EXTERN_API_C( ThemeIteratorUPP )
  1478. NewThemeIteratorUPP(ThemeIteratorProcPtr userRoutine);
  1479. #if !OPAQUE_UPP_TYPES
  1480. enum { uppThemeIteratorProcInfo = 0x00003ED0 }; /* pascal 1_byte Func(4_bytes, 2_bytes, 4_bytes, 4_bytes) */
  1481. #ifdef __cplusplus
  1482. inline DEFINE_API_C(ThemeIteratorUPP) NewThemeIteratorUPP(ThemeIteratorProcPtr userRoutine) { return (ThemeIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeIteratorProcInfo, GetCurrentArchitecture()); }
  1483. #else
  1484. #define NewThemeIteratorUPP(userRoutine) (ThemeIteratorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppThemeIteratorProcInfo, GetCurrentArchitecture())
  1485. #endif
  1486. #endif
  1487. /*
  1488. * DisposeThemeTabTitleDrawUPP()
  1489. *
  1490. * Availability:
  1491. * Non-Carbon CFM: available as macro/inline
  1492. * CarbonLib: in CarbonLib 1.0 and later
  1493. * Mac OS X: in version 10.0 and later
  1494. */
  1495. EXTERN_API_C( void )
  1496. DisposeThemeTabTitleDrawUPP(ThemeTabTitleDrawUPP userUPP);
  1497. #if !OPAQUE_UPP_TYPES
  1498. #ifdef __cplusplus
  1499. inline DEFINE_API_C(void) DisposeThemeTabTitleDrawUPP(ThemeTabTitleDrawUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1500. #else
  1501. #define DisposeThemeTabTitleDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1502. #endif
  1503. #endif
  1504. /*
  1505. * DisposeThemeEraseUPP()
  1506. *
  1507. * Availability:
  1508. * Non-Carbon CFM: available as macro/inline
  1509. * CarbonLib: in CarbonLib 1.0 and later
  1510. * Mac OS X: in version 10.0 and later
  1511. */
  1512. EXTERN_API_C( void )
  1513. DisposeThemeEraseUPP(ThemeEraseUPP userUPP);
  1514. #if !OPAQUE_UPP_TYPES
  1515. #ifdef __cplusplus
  1516. inline DEFINE_API_C(void) DisposeThemeEraseUPP(ThemeEraseUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1517. #else
  1518. #define DisposeThemeEraseUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1519. #endif
  1520. #endif
  1521. /*
  1522. * DisposeThemeButtonDrawUPP()
  1523. *
  1524. * Availability:
  1525. * Non-Carbon CFM: available as macro/inline
  1526. * CarbonLib: in CarbonLib 1.0 and later
  1527. * Mac OS X: in version 10.0 and later
  1528. */
  1529. EXTERN_API_C( void )
  1530. DisposeThemeButtonDrawUPP(ThemeButtonDrawUPP userUPP);
  1531. #if !OPAQUE_UPP_TYPES
  1532. #ifdef __cplusplus
  1533. inline DEFINE_API_C(void) DisposeThemeButtonDrawUPP(ThemeButtonDrawUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1534. #else
  1535. #define DisposeThemeButtonDrawUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1536. #endif
  1537. #endif
  1538. /*
  1539. * DisposeWindowTitleDrawingUPP()
  1540. *
  1541. * Availability:
  1542. * Non-Carbon CFM: available as macro/inline
  1543. * CarbonLib: in CarbonLib 1.0 and later
  1544. * Mac OS X: in version 10.0 and later
  1545. */
  1546. EXTERN_API_C( void )
  1547. DisposeWindowTitleDrawingUPP(WindowTitleDrawingUPP userUPP);
  1548. #if !OPAQUE_UPP_TYPES
  1549. #ifdef __cplusplus
  1550. inline DEFINE_API_C(void) DisposeWindowTitleDrawingUPP(WindowTitleDrawingUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1551. #else
  1552. #define DisposeWindowTitleDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1553. #endif
  1554. #endif
  1555. /*
  1556. * DisposeThemeIteratorUPP()
  1557. *
  1558. * Availability:
  1559. * Non-Carbon CFM: available as macro/inline
  1560. * CarbonLib: in CarbonLib 1.0 and later
  1561. * Mac OS X: in version 10.0 and later
  1562. */
  1563. EXTERN_API_C( void )
  1564. DisposeThemeIteratorUPP(ThemeIteratorUPP userUPP);
  1565. #if !OPAQUE_UPP_TYPES
  1566. #ifdef __cplusplus
  1567. inline DEFINE_API_C(void) DisposeThemeIteratorUPP(ThemeIteratorUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1568. #else
  1569. #define DisposeThemeIteratorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1570. #endif
  1571. #endif
  1572. /*
  1573. * InvokeThemeTabTitleDrawUPP()
  1574. *
  1575. * Availability:
  1576. * Non-Carbon CFM: available as macro/inline
  1577. * CarbonLib: in CarbonLib 1.0 and later
  1578. * Mac OS X: in version 10.0 and later
  1579. */
  1580. EXTERN_API_C( void )
  1581. InvokeThemeTabTitleDrawUPP(
  1582. const Rect * bounds,
  1583. ThemeTabStyle style,
  1584. ThemeTabDirection direction,
  1585. SInt16 depth,
  1586. Boolean isColorDev,
  1587. UInt32 userData,
  1588. ThemeTabTitleDrawUPP userUPP);
  1589. #if !OPAQUE_UPP_TYPES
  1590. #ifdef __cplusplus
  1591. inline DEFINE_API_C(void) InvokeThemeTabTitleDrawUPP(const Rect * bounds, ThemeTabStyle style, ThemeTabDirection direction, SInt16 depth, Boolean isColorDev, UInt32 userData, ThemeTabTitleDrawUPP userUPP) { CALL_SIX_PARAMETER_UPP(userUPP, uppThemeTabTitleDrawProcInfo, bounds, style, direction, depth, isColorDev, userData); }
  1592. #else
  1593. #define InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, userData, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppThemeTabTitleDrawProcInfo, (bounds), (style), (direction), (depth), (isColorDev), (userData))
  1594. #endif
  1595. #endif
  1596. /*
  1597. * InvokeThemeEraseUPP()
  1598. *
  1599. * Availability:
  1600. * Non-Carbon CFM: available as macro/inline
  1601. * CarbonLib: in CarbonLib 1.0 and later
  1602. * Mac OS X: in version 10.0 and later
  1603. */
  1604. EXTERN_API_C( void )
  1605. InvokeThemeEraseUPP(
  1606. const Rect * bounds,
  1607. UInt32 eraseData,
  1608. SInt16 depth,
  1609. Boolean isColorDev,
  1610. ThemeEraseUPP userUPP);
  1611. #if !OPAQUE_UPP_TYPES
  1612. #ifdef __cplusplus
  1613. inline DEFINE_API_C(void) InvokeThemeEraseUPP(const Rect * bounds, UInt32 eraseData, SInt16 depth, Boolean isColorDev, ThemeEraseUPP userUPP) { CALL_FOUR_PARAMETER_UPP(userUPP, uppThemeEraseProcInfo, bounds, eraseData, depth, isColorDev); }
  1614. #else
  1615. #define InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeEraseProcInfo, (bounds), (eraseData), (depth), (isColorDev))
  1616. #endif
  1617. #endif
  1618. /*
  1619. * InvokeThemeButtonDrawUPP()
  1620. *
  1621. * Availability:
  1622. * Non-Carbon CFM: available as macro/inline
  1623. * CarbonLib: in CarbonLib 1.0 and later
  1624. * Mac OS X: in version 10.0 and later
  1625. */
  1626. EXTERN_API_C( void )
  1627. InvokeThemeButtonDrawUPP(
  1628. const Rect * bounds,
  1629. ThemeButtonKind kind,
  1630. const ThemeButtonDrawInfo * info,
  1631. UInt32 userData,
  1632. SInt16 depth,
  1633. Boolean isColorDev,
  1634. ThemeButtonDrawUPP userUPP);
  1635. #if !OPAQUE_UPP_TYPES
  1636. #ifdef __cplusplus
  1637. inline DEFINE_API_C(void) InvokeThemeButtonDrawUPP(const Rect * bounds, ThemeButtonKind kind, const ThemeButtonDrawInfo * info, UInt32 userData, SInt16 depth, Boolean isColorDev, ThemeButtonDrawUPP userUPP) { CALL_SIX_PARAMETER_UPP(userUPP, uppThemeButtonDrawProcInfo, bounds, kind, info, userData, depth, isColorDev); }
  1638. #else
  1639. #define InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, userUPP) CALL_SIX_PARAMETER_UPP((userUPP), uppThemeButtonDrawProcInfo, (bounds), (kind), (info), (userData), (depth), (isColorDev))
  1640. #endif
  1641. #endif
  1642. /*
  1643. * InvokeWindowTitleDrawingUPP()
  1644. *
  1645. * Availability:
  1646. * Non-Carbon CFM: available as macro/inline
  1647. * CarbonLib: in CarbonLib 1.0 and later
  1648. * Mac OS X: in version 10.0 and later
  1649. */
  1650. EXTERN_API_C( void )
  1651. InvokeWindowTitleDrawingUPP(
  1652. const Rect * bounds,
  1653. SInt16 depth,
  1654. Boolean colorDevice,
  1655. UInt32 userData,
  1656. WindowTitleDrawingUPP userUPP);
  1657. #if !OPAQUE_UPP_TYPES
  1658. #ifdef __cplusplus
  1659. inline DEFINE_API_C(void) InvokeWindowTitleDrawingUPP(const Rect * bounds, SInt16 depth, Boolean colorDevice, UInt32 userData, WindowTitleDrawingUPP userUPP) { CALL_FOUR_PARAMETER_UPP(userUPP, uppWindowTitleDrawingProcInfo, bounds, depth, colorDevice, userData); }
  1660. #else
  1661. #define InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppWindowTitleDrawingProcInfo, (bounds), (depth), (colorDevice), (userData))
  1662. #endif
  1663. #endif
  1664. /*
  1665. * InvokeThemeIteratorUPP()
  1666. *
  1667. * Availability:
  1668. * Non-Carbon CFM: available as macro/inline
  1669. * CarbonLib: in CarbonLib 1.0 and later
  1670. * Mac OS X: in version 10.0 and later
  1671. */
  1672. EXTERN_API_C( Boolean )
  1673. InvokeThemeIteratorUPP(
  1674. ConstStr255Param inFileName,
  1675. SInt16 resID,
  1676. Collection inThemeSettings,
  1677. void * inUserData,
  1678. ThemeIteratorUPP userUPP);
  1679. #if !OPAQUE_UPP_TYPES
  1680. #ifdef __cplusplus
  1681. inline DEFINE_API_C(Boolean) InvokeThemeIteratorUPP(ConstStr255Param inFileName, SInt16 resID, Collection inThemeSettings, void * inUserData, ThemeIteratorUPP userUPP) { return (Boolean)CALL_FOUR_PARAMETER_UPP(userUPP, uppThemeIteratorProcInfo, inFileName, resID, inThemeSettings, inUserData); }
  1682. #else
  1683. #define InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, userUPP) (Boolean)CALL_FOUR_PARAMETER_UPP((userUPP), uppThemeIteratorProcInfo, (inFileName), (resID), (inThemeSettings), (inUserData))
  1684. #endif
  1685. #endif
  1686. #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
  1687. /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
  1688. #define NewThemeTabTitleDrawProc(userRoutine) NewThemeTabTitleDrawUPP(userRoutine)
  1689. #define NewThemeEraseProc(userRoutine) NewThemeEraseUPP(userRoutine)
  1690. #define NewThemeButtonDrawProc(userRoutine) NewThemeButtonDrawUPP(userRoutine)
  1691. #define NewWindowTitleDrawingProc(userRoutine) NewWindowTitleDrawingUPP(userRoutine)
  1692. #define NewThemeIteratorProc(userRoutine) NewThemeIteratorUPP(userRoutine)
  1693. #define CallThemeTabTitleDrawProc(userRoutine, bounds, style, direction, depth, isColorDev, userData) InvokeThemeTabTitleDrawUPP(bounds, style, direction, depth, isColorDev, userData, userRoutine)
  1694. #define CallThemeEraseProc(userRoutine, bounds, eraseData, depth, isColorDev) InvokeThemeEraseUPP(bounds, eraseData, depth, isColorDev, userRoutine)
  1695. #define CallThemeButtonDrawProc(userRoutine, bounds, kind, info, userData, depth, isColorDev) InvokeThemeButtonDrawUPP(bounds, kind, info, userData, depth, isColorDev, userRoutine)
  1696. #define CallWindowTitleDrawingProc(userRoutine, bounds, depth, colorDevice, userData) InvokeWindowTitleDrawingUPP(bounds, depth, colorDevice, userData, userRoutine)
  1697. #define CallThemeIteratorProc(userRoutine, inFileName, resID, inThemeSettings, inUserData) InvokeThemeIteratorUPP(inFileName, resID, inThemeSettings, inUserData, userRoutine)
  1698. #endif /* CALL_NOT_IN_CARBON */
  1699. /*----------------------------------------------------------------------------------*/
  1700. /* Menu Drawing callbacks */
  1701. /*----------------------------------------------------------------------------------*/
  1702. typedef CALLBACK_API( void , MenuTitleDrawingProcPtr )(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData);
  1703. typedef CALLBACK_API( void , MenuItemDrawingProcPtr )(const Rect *inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData);
  1704. typedef STACK_UPP_TYPE(MenuTitleDrawingProcPtr) MenuTitleDrawingUPP;
  1705. typedef STACK_UPP_TYPE(MenuItemDrawingProcPtr) MenuItemDrawingUPP;
  1706. /*
  1707. * NewMenuTitleDrawingUPP()
  1708. *
  1709. * Availability:
  1710. * Non-Carbon CFM: available as macro/inline
  1711. * CarbonLib: in CarbonLib 1.0 and later
  1712. * Mac OS X: in version 10.0 and later
  1713. */
  1714. EXTERN_API_C( MenuTitleDrawingUPP )
  1715. NewMenuTitleDrawingUPP(MenuTitleDrawingProcPtr userRoutine);
  1716. #if !OPAQUE_UPP_TYPES
  1717. enum { uppMenuTitleDrawingProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
  1718. #ifdef __cplusplus
  1719. inline DEFINE_API_C(MenuTitleDrawingUPP) NewMenuTitleDrawingUPP(MenuTitleDrawingProcPtr userRoutine) { return (MenuTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuTitleDrawingProcInfo, GetCurrentArchitecture()); }
  1720. #else
  1721. #define NewMenuTitleDrawingUPP(userRoutine) (MenuTitleDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuTitleDrawingProcInfo, GetCurrentArchitecture())
  1722. #endif
  1723. #endif
  1724. /*
  1725. * NewMenuItemDrawingUPP()
  1726. *
  1727. * Availability:
  1728. * Non-Carbon CFM: available as macro/inline
  1729. * CarbonLib: in CarbonLib 1.0 and later
  1730. * Mac OS X: in version 10.0 and later
  1731. */
  1732. EXTERN_API_C( MenuItemDrawingUPP )
  1733. NewMenuItemDrawingUPP(MenuItemDrawingProcPtr userRoutine);
  1734. #if !OPAQUE_UPP_TYPES
  1735. enum { uppMenuItemDrawingProcInfo = 0x000036C0 }; /* pascal no_return_value Func(4_bytes, 2_bytes, 1_byte, 4_bytes) */
  1736. #ifdef __cplusplus
  1737. inline DEFINE_API_C(MenuItemDrawingUPP) NewMenuItemDrawingUPP(MenuItemDrawingProcPtr userRoutine) { return (MenuItemDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuItemDrawingProcInfo, GetCurrentArchitecture()); }
  1738. #else
  1739. #define NewMenuItemDrawingUPP(userRoutine) (MenuItemDrawingUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMenuItemDrawingProcInfo, GetCurrentArchitecture())
  1740. #endif
  1741. #endif
  1742. /*
  1743. * DisposeMenuTitleDrawingUPP()
  1744. *
  1745. * Availability:
  1746. * Non-Carbon CFM: available as macro/inline
  1747. * CarbonLib: in CarbonLib 1.0 and later
  1748. * Mac OS X: in version 10.0 and later
  1749. */
  1750. EXTERN_API_C( void )
  1751. DisposeMenuTitleDrawingUPP(MenuTitleDrawingUPP userUPP);
  1752. #if !OPAQUE_UPP_TYPES
  1753. #ifdef __cplusplus
  1754. inline DEFINE_API_C(void) DisposeMenuTitleDrawingUPP(MenuTitleDrawingUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1755. #else
  1756. #define DisposeMenuTitleDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1757. #endif
  1758. #endif
  1759. /*
  1760. * DisposeMenuItemDrawingUPP()
  1761. *
  1762. * Availability:
  1763. * Non-Carbon CFM: available as macro/inline
  1764. * CarbonLib: in CarbonLib 1.0 and later
  1765. * Mac OS X: in version 10.0 and later
  1766. */
  1767. EXTERN_API_C( void )
  1768. DisposeMenuItemDrawingUPP(MenuItemDrawingUPP userUPP);
  1769. #if !OPAQUE_UPP_TYPES
  1770. #ifdef __cplusplus
  1771. inline DEFINE_API_C(void) DisposeMenuItemDrawingUPP(MenuItemDrawingUPP userUPP) { DisposeRoutineDescriptor((UniversalProcPtr)userUPP); }
  1772. #else
  1773. #define DisposeMenuItemDrawingUPP(userUPP) DisposeRoutineDescriptor(userUPP)
  1774. #endif
  1775. #endif
  1776. /*
  1777. * InvokeMenuTitleDrawingUPP()
  1778. *
  1779. * Availability:
  1780. * Non-Carbon CFM: available as macro/inline
  1781. * CarbonLib: in CarbonLib 1.0 and later
  1782. * Mac OS X: in version 10.0 and later
  1783. */
  1784. EXTERN_API_C( void )
  1785. InvokeMenuTitleDrawingUPP(
  1786. const Rect * inBounds,
  1787. SInt16 inDepth,
  1788. Boolean inIsColorDevice,
  1789. SInt32 inUserData,
  1790. MenuTitleDrawingUPP userUPP);
  1791. #if !OPAQUE_UPP_TYPES
  1792. #ifdef __cplusplus
  1793. inline DEFINE_API_C(void) InvokeMenuTitleDrawingUPP(const Rect * inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData, MenuTitleDrawingUPP userUPP) { CALL_FOUR_PARAMETER_UPP(userUPP, uppMenuTitleDrawingProcInfo, inBounds, inDepth, inIsColorDevice, inUserData); }
  1794. #else
  1795. #define InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuTitleDrawingProcInfo, (inBounds), (inDepth), (inIsColorDevice), (inUserData))
  1796. #endif
  1797. #endif
  1798. /*
  1799. * InvokeMenuItemDrawingUPP()
  1800. *
  1801. * Availability:
  1802. * Non-Carbon CFM: available as macro/inline
  1803. * CarbonLib: in CarbonLib 1.0 and later
  1804. * Mac OS X: in version 10.0 and later
  1805. */
  1806. EXTERN_API_C( void )
  1807. InvokeMenuItemDrawingUPP(
  1808. const Rect * inBounds,
  1809. SInt16 inDepth,
  1810. Boolean inIsColorDevice,
  1811. SInt32 inUserData,
  1812. MenuItemDrawingUPP userUPP);
  1813. #if !OPAQUE_UPP_TYPES
  1814. #ifdef __cplusplus
  1815. inline DEFINE_API_C(void) InvokeMenuItemDrawingUPP(const Rect * inBounds, SInt16 inDepth, Boolean inIsColorDevice, SInt32 inUserData, MenuItemDrawingUPP userUPP) { CALL_FOUR_PARAMETER_UPP(userUPP, uppMenuItemDrawingProcInfo, inBounds, inDepth, inIsColorDevice, inUserData); }
  1816. #else
  1817. #define InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userUPP) CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuItemDrawingProcInfo, (inBounds), (inDepth), (inIsColorDevice), (inUserData))
  1818. #endif
  1819. #endif
  1820. #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
  1821. /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
  1822. #define NewMenuTitleDrawingProc(userRoutine) NewMenuTitleDrawingUPP(userRoutine)
  1823. #define NewMenuItemDrawingProc(userRoutine) NewMenuItemDrawingUPP(userRoutine)
  1824. #define CallMenuTitleDrawingProc(userRoutine, inBounds, inDepth, inIsColorDevice, inUserData) InvokeMenuTitleDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userRoutine)
  1825. #define CallMenuItemDrawingProc(userRoutine, inBounds, inDepth, inIsColorDevice, inUserData) InvokeMenuItemDrawingUPP(inBounds, inDepth, inIsColorDevice, inUserData, userRoutine)
  1826. #endif /* CALL_NOT_IN_CARBON */
  1827. /*----------------------------------------------------------------------------------*/
  1828. /* Appearance Manager APIs */
  1829. /*----------------------------------------------------------------------------------*/
  1830. /* Registering Appearance-Savvy Applications */
  1831. /*
  1832. * RegisterAppearanceClient()
  1833. *
  1834. * Availability:
  1835. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1836. * CarbonLib: in CarbonLib 1.0 and later
  1837. * Mac OS X: in version 10.0 and later
  1838. */
  1839. EXTERN_API( OSStatus )
  1840. RegisterAppearanceClient(void) THREEWORDINLINE(0x303C, 0x0015, 0xAA74);
  1841. /*
  1842. * UnregisterAppearanceClient()
  1843. *
  1844. * Availability:
  1845. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1846. * CarbonLib: in CarbonLib 1.0 and later
  1847. * Mac OS X: in version 10.0 and later
  1848. */
  1849. EXTERN_API( OSStatus )
  1850. UnregisterAppearanceClient(void) THREEWORDINLINE(0x303C, 0x0016, 0xAA74);
  1851. /*
  1852. * IsAppearanceClient()
  1853. *
  1854. * Availability:
  1855. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  1856. * CarbonLib: in CarbonLib 1.0 and later
  1857. * Mac OS X: in version 10.0 and later
  1858. */
  1859. EXTERN_API( Boolean )
  1860. IsAppearanceClient(const ProcessSerialNumber * process) THREEWORDINLINE(0x303C, 0xFFFF, 0xAA74);
  1861. /*****************************************************************************
  1862. NOTES ON THEME BRUSHES
  1863. Theme brushes can be either colors or patterns, depending on the theme.
  1864. Because of this, you should be prepared to handle the case where a brush
  1865. is a pattern and save and restore the pnPixPat and bkPixPat fields of
  1866. your GrafPorts when saving the fore and back colors. Also, since patterns
  1867. in bkPixPat override the background color of the window, you should use
  1868. BackPat to set your background pattern to a normal white pattern. This
  1869. will ensure that you can use RGBBackColor to set your back color to white,
  1870. call EraseRect and get the expected results.
  1871. *****************************************************************************/
  1872. /*
  1873. * SetThemePen()
  1874. *
  1875. * Availability:
  1876. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1877. * CarbonLib: in CarbonLib 1.0 and later
  1878. * Mac OS X: in version 10.0 and later
  1879. */
  1880. EXTERN_API( OSStatus )
  1881. SetThemePen(
  1882. ThemeBrush inBrush,
  1883. SInt16 inDepth,
  1884. Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0001, 0xAA74);
  1885. /*
  1886. * SetThemeBackground()
  1887. *
  1888. * Availability:
  1889. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1890. * CarbonLib: in CarbonLib 1.0 and later
  1891. * Mac OS X: in version 10.0 and later
  1892. */
  1893. EXTERN_API( OSStatus )
  1894. SetThemeBackground(
  1895. ThemeBrush inBrush,
  1896. SInt16 inDepth,
  1897. Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0002, 0xAA74);
  1898. /*
  1899. * SetThemeTextColor()
  1900. *
  1901. * Availability:
  1902. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1903. * CarbonLib: in CarbonLib 1.0 and later
  1904. * Mac OS X: in version 10.0 and later
  1905. */
  1906. EXTERN_API( OSStatus )
  1907. SetThemeTextColor(
  1908. ThemeTextColor inColor,
  1909. SInt16 inDepth,
  1910. Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0003, 0xAA74);
  1911. /*
  1912. * SetThemeWindowBackground()
  1913. *
  1914. * Availability:
  1915. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1916. * CarbonLib: in CarbonLib 1.0 and later
  1917. * Mac OS X: in version 10.0 and later
  1918. */
  1919. EXTERN_API( OSStatus )
  1920. SetThemeWindowBackground(
  1921. WindowRef inWindow,
  1922. ThemeBrush inBrush,
  1923. Boolean inUpdate) THREEWORDINLINE(0x303C, 0x0004, 0xAA74);
  1924. /* Window Placards, Headers and Frames */
  1925. /*
  1926. * DrawThemeWindowHeader()
  1927. *
  1928. * Availability:
  1929. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1930. * CarbonLib: in CarbonLib 1.0 and later
  1931. * Mac OS X: in version 10.0 and later
  1932. */
  1933. EXTERN_API( OSStatus )
  1934. DrawThemeWindowHeader(
  1935. const Rect * inRect,
  1936. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0005, 0xAA74);
  1937. /*
  1938. * DrawThemeWindowListViewHeader()
  1939. *
  1940. * Availability:
  1941. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1942. * CarbonLib: in CarbonLib 1.0 and later
  1943. * Mac OS X: in version 10.0 and later
  1944. */
  1945. EXTERN_API( OSStatus )
  1946. DrawThemeWindowListViewHeader(
  1947. const Rect * inRect,
  1948. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0006, 0xAA74);
  1949. /*
  1950. * DrawThemePlacard()
  1951. *
  1952. * Availability:
  1953. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1954. * CarbonLib: in CarbonLib 1.0 and later
  1955. * Mac OS X: in version 10.0 and later
  1956. */
  1957. EXTERN_API( OSStatus )
  1958. DrawThemePlacard(
  1959. const Rect * inRect,
  1960. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0007, 0xAA74);
  1961. /*
  1962. * DrawThemeEditTextFrame()
  1963. *
  1964. * Availability:
  1965. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1966. * CarbonLib: in CarbonLib 1.0 and later
  1967. * Mac OS X: in version 10.0 and later
  1968. */
  1969. EXTERN_API( OSStatus )
  1970. DrawThemeEditTextFrame(
  1971. const Rect * inRect,
  1972. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0009, 0xAA74);
  1973. /*
  1974. * DrawThemeListBoxFrame()
  1975. *
  1976. * Availability:
  1977. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1978. * CarbonLib: in CarbonLib 1.0 and later
  1979. * Mac OS X: in version 10.0 and later
  1980. */
  1981. EXTERN_API( OSStatus )
  1982. DrawThemeListBoxFrame(
  1983. const Rect * inRect,
  1984. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000A, 0xAA74);
  1985. /* Keyboard Focus Drawing */
  1986. /*
  1987. * DrawThemeFocusRect()
  1988. *
  1989. * Availability:
  1990. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  1991. * CarbonLib: in CarbonLib 1.0 and later
  1992. * Mac OS X: in version 10.0 and later
  1993. */
  1994. EXTERN_API( OSStatus )
  1995. DrawThemeFocusRect(
  1996. const Rect * inRect,
  1997. Boolean inHasFocus) THREEWORDINLINE(0x303C, 0x000B, 0xAA74);
  1998. /* Dialog Group Boxes and Separators */
  1999. /*
  2000. * DrawThemePrimaryGroup()
  2001. *
  2002. * Availability:
  2003. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2004. * CarbonLib: in CarbonLib 1.0 and later
  2005. * Mac OS X: in version 10.0 and later
  2006. */
  2007. EXTERN_API( OSStatus )
  2008. DrawThemePrimaryGroup(
  2009. const Rect * inRect,
  2010. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000C, 0xAA74);
  2011. /*
  2012. * DrawThemeSecondaryGroup()
  2013. *
  2014. * Availability:
  2015. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2016. * CarbonLib: in CarbonLib 1.0 and later
  2017. * Mac OS X: in version 10.0 and later
  2018. */
  2019. EXTERN_API( OSStatus )
  2020. DrawThemeSecondaryGroup(
  2021. const Rect * inRect,
  2022. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000D, 0xAA74);
  2023. /*
  2024. * DrawThemeSeparator()
  2025. *
  2026. * Availability:
  2027. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2028. * CarbonLib: in CarbonLib 1.0 and later
  2029. * Mac OS X: in version 10.0 and later
  2030. */
  2031. EXTERN_API( OSStatus )
  2032. DrawThemeSeparator(
  2033. const Rect * inRect,
  2034. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x000E, 0xAA74);
  2035. /*------------------------------ BEGIN APPEARANCE 1.0.1 --------------------------------------------*/
  2036. /* The following Appearance Manager APIs are only available */
  2037. /* in Appearance 1.0.1 or later */
  2038. /*
  2039. * DrawThemeModelessDialogFrame()
  2040. *
  2041. * Availability:
  2042. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2043. * CarbonLib: in CarbonLib 1.0 and later
  2044. * Mac OS X: in version 10.0 and later
  2045. */
  2046. EXTERN_API( OSStatus )
  2047. DrawThemeModelessDialogFrame(
  2048. const Rect * inRect,
  2049. ThemeDrawState inState) THREEWORDINLINE(0x303C, 0x0008, 0xAA74);
  2050. /*
  2051. * DrawThemeGenericWell()
  2052. *
  2053. * Availability:
  2054. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2055. * CarbonLib: in CarbonLib 1.0 and later
  2056. * Mac OS X: in version 10.0 and later
  2057. */
  2058. EXTERN_API( OSStatus )
  2059. DrawThemeGenericWell(
  2060. const Rect * inRect,
  2061. ThemeDrawState inState,
  2062. Boolean inFillCenter) THREEWORDINLINE(0x303C, 0x0022, 0xAA74);
  2063. /*
  2064. * DrawThemeFocusRegion()
  2065. *
  2066. * Availability:
  2067. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2068. * CarbonLib: in CarbonLib 1.0 and later
  2069. * Mac OS X: in version 10.0 and later
  2070. */
  2071. EXTERN_API( OSStatus )
  2072. DrawThemeFocusRegion(
  2073. RgnHandle inRegion,
  2074. Boolean inHasFocus) THREEWORDINLINE(0x303C, 0x0023, 0xAA74);
  2075. /*
  2076. * IsThemeInColor()
  2077. *
  2078. * Availability:
  2079. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2080. * CarbonLib: in CarbonLib 1.0 and later
  2081. * Mac OS X: in version 10.0 and later
  2082. */
  2083. EXTERN_API( Boolean )
  2084. IsThemeInColor(
  2085. SInt16 inDepth,
  2086. Boolean inIsColorDevice) THREEWORDINLINE(0x303C, 0x0024, 0xAA74);
  2087. /* IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will */
  2088. /* most likely return an error */
  2089. /*
  2090. * GetThemeAccentColors()
  2091. *
  2092. * Availability:
  2093. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2094. * CarbonLib: in CarbonLib 1.0 and later
  2095. * Mac OS X: in version 10.0 and later
  2096. */
  2097. EXTERN_API( OSStatus )
  2098. GetThemeAccentColors(CTabHandle * outColors) THREEWORDINLINE(0x303C, 0x0025, 0xAA74);
  2099. /*
  2100. * DrawThemeMenuBarBackground()
  2101. *
  2102. * Availability:
  2103. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2104. * CarbonLib: in CarbonLib 1.0 and later
  2105. * Mac OS X: in version 10.0 and later
  2106. */
  2107. EXTERN_API( OSStatus )
  2108. DrawThemeMenuBarBackground(
  2109. const Rect * inBounds,
  2110. ThemeMenuBarState inState,
  2111. UInt32 inAttributes) THREEWORDINLINE(0x303C, 0x0018, 0xAA74);
  2112. /*
  2113. * DrawThemeMenuTitle()
  2114. *
  2115. * Availability:
  2116. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2117. * CarbonLib: in CarbonLib 1.0 and later
  2118. * Mac OS X: in version 10.0 and later
  2119. */
  2120. EXTERN_API( OSStatus )
  2121. DrawThemeMenuTitle(
  2122. const Rect * inMenuBarRect,
  2123. const Rect * inTitleRect,
  2124. ThemeMenuState inState,
  2125. UInt32 inAttributes,
  2126. MenuTitleDrawingUPP inTitleProc, /* can be NULL */
  2127. UInt32 inTitleData) THREEWORDINLINE(0x303C, 0x0019, 0xAA74);
  2128. /*
  2129. * GetThemeMenuBarHeight()
  2130. *
  2131. * Availability:
  2132. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2133. * CarbonLib: in CarbonLib 1.0 and later
  2134. * Mac OS X: in version 10.0 and later
  2135. */
  2136. EXTERN_API( OSStatus )
  2137. GetThemeMenuBarHeight(SInt16 * outHeight) THREEWORDINLINE(0x303C, 0x001A, 0xAA74);
  2138. /*
  2139. * DrawThemeMenuBackground()
  2140. *
  2141. * Availability:
  2142. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2143. * CarbonLib: in CarbonLib 1.0 and later
  2144. * Mac OS X: in version 10.0 and later
  2145. */
  2146. EXTERN_API( OSStatus )
  2147. DrawThemeMenuBackground(
  2148. const Rect * inMenuRect,
  2149. ThemeMenuType inMenuType) THREEWORDINLINE(0x303C, 0x001B, 0xAA74);
  2150. /*
  2151. * GetThemeMenuBackgroundRegion()
  2152. *
  2153. * Availability:
  2154. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2155. * CarbonLib: in CarbonLib 1.0 and later
  2156. * Mac OS X: in version 10.0 and later
  2157. */
  2158. EXTERN_API( OSStatus )
  2159. GetThemeMenuBackgroundRegion(
  2160. const Rect * inMenuRect,
  2161. ThemeMenuType menuType,
  2162. RgnHandle region) THREEWORDINLINE(0x303C, 0x001C, 0xAA74);
  2163. /*
  2164. * DrawThemeMenuItem()
  2165. *
  2166. * Availability:
  2167. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2168. * CarbonLib: in CarbonLib 1.0 and later
  2169. * Mac OS X: in version 10.0 and later
  2170. */
  2171. EXTERN_API( OSStatus )
  2172. DrawThemeMenuItem(
  2173. const Rect * inMenuRect,
  2174. const Rect * inItemRect,
  2175. SInt16 inVirtualMenuTop,
  2176. SInt16 inVirtualMenuBottom,
  2177. ThemeMenuState inState,
  2178. ThemeMenuItemType inItemType,
  2179. MenuItemDrawingUPP inDrawProc, /* can be NULL */
  2180. UInt32 inUserData) THREEWORDINLINE(0x303C, 0x001D, 0xAA74);
  2181. /*
  2182. * DrawThemeMenuSeparator()
  2183. *
  2184. * Availability:
  2185. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2186. * CarbonLib: in CarbonLib 1.0 and later
  2187. * Mac OS X: in version 10.0 and later
  2188. */
  2189. EXTERN_API( OSStatus )
  2190. DrawThemeMenuSeparator(const Rect * inItemRect) THREEWORDINLINE(0x303C, 0x001E, 0xAA74);
  2191. /*
  2192. * GetThemeMenuSeparatorHeight()
  2193. *
  2194. * Availability:
  2195. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2196. * CarbonLib: in CarbonLib 1.0 and later
  2197. * Mac OS X: in version 10.0 and later
  2198. */
  2199. EXTERN_API( OSStatus )
  2200. GetThemeMenuSeparatorHeight(SInt16 * outHeight) THREEWORDINLINE(0x303C, 0x001F, 0xAA74);
  2201. /*
  2202. * GetThemeMenuItemExtra()
  2203. *
  2204. * Availability:
  2205. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2206. * CarbonLib: in CarbonLib 1.0 and later
  2207. * Mac OS X: in version 10.0 and later
  2208. */
  2209. EXTERN_API( OSStatus )
  2210. GetThemeMenuItemExtra(
  2211. ThemeMenuItemType inItemType,
  2212. SInt16 * outHeight,
  2213. SInt16 * outWidth) THREEWORDINLINE(0x303C, 0x0020, 0xAA74);
  2214. /*
  2215. * GetThemeMenuTitleExtra()
  2216. *
  2217. * Availability:
  2218. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  2219. * CarbonLib: in CarbonLib 1.0 and later
  2220. * Mac OS X: in version 10.0 and later
  2221. */
  2222. EXTERN_API( OSStatus )
  2223. GetThemeMenuTitleExtra(
  2224. SInt16 * outWidth,
  2225. Boolean inIsSquished) THREEWORDINLINE(0x303C, 0x0021, 0xAA74);
  2226. /*------------------------------- BEGIN APPEARANCE 1.1 ---------------------------------------------*/
  2227. /*---------------------------------- THEME SWITCHING -----------------------------------------------*/
  2228. /* */
  2229. /* X ALERT: Please note that Get/SetTheme are severely neutered under Mac OS X at present. */
  2230. /* See the note above regarding what collection tags are supported under X. */
  2231. /*
  2232. * GetTheme()
  2233. *
  2234. * Availability:
  2235. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2236. * CarbonLib: in CarbonLib 1.0 and later
  2237. * Mac OS X: in version 10.0 and later
  2238. */
  2239. EXTERN_API( OSStatus )
  2240. GetTheme(Collection ioCollection);
  2241. /*
  2242. * SetTheme()
  2243. *
  2244. * Availability:
  2245. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2246. * CarbonLib: in CarbonLib 1.0 and later
  2247. * Mac OS X: in version 10.0 and later
  2248. */
  2249. EXTERN_API( OSStatus )
  2250. SetTheme(Collection ioCollection);
  2251. /*
  2252. * IterateThemes()
  2253. *
  2254. * Availability:
  2255. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2256. * CarbonLib: in CarbonLib 1.0 and later
  2257. * Mac OS X: in version 10.0 and later
  2258. */
  2259. EXTERN_API( OSStatus )
  2260. IterateThemes(
  2261. ThemeIteratorUPP inProc,
  2262. void * inUserData); /* can be NULL */
  2263. /*---------------------------------------- TABS ----------------------------------------------------*/
  2264. /*
  2265. * DrawThemeTabPane()
  2266. *
  2267. * Availability:
  2268. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2269. * CarbonLib: in CarbonLib 1.0 and later
  2270. * Mac OS X: in version 10.0 and later
  2271. */
  2272. EXTERN_API( OSStatus )
  2273. DrawThemeTabPane(
  2274. const Rect * inRect,
  2275. ThemeDrawState inState);
  2276. /*
  2277. * DrawThemeTab()
  2278. *
  2279. * Availability:
  2280. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2281. * CarbonLib: in CarbonLib 1.0 and later
  2282. * Mac OS X: in version 10.0 and later
  2283. */
  2284. EXTERN_API( OSStatus )
  2285. DrawThemeTab(
  2286. const Rect * inRect,
  2287. ThemeTabStyle inStyle,
  2288. ThemeTabDirection inDirection,
  2289. ThemeTabTitleDrawUPP labelProc, /* can be NULL */
  2290. UInt32 userData);
  2291. /*
  2292. * GetThemeTabRegion()
  2293. *
  2294. * Availability:
  2295. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2296. * CarbonLib: in CarbonLib 1.0 and later
  2297. * Mac OS X: in version 10.0 and later
  2298. */
  2299. EXTERN_API( OSStatus )
  2300. GetThemeTabRegion(
  2301. const Rect * inRect,
  2302. ThemeTabStyle inStyle,
  2303. ThemeTabDirection inDirection,
  2304. RgnHandle ioRgn);
  2305. /*--------------------------------------- CURSORS --------------------------------------------------*/
  2306. /*
  2307. * SetThemeCursor()
  2308. *
  2309. * Availability:
  2310. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2311. * CarbonLib: in CarbonLib 1.0 and later
  2312. * Mac OS X: in version 10.0 and later
  2313. */
  2314. EXTERN_API( OSStatus )
  2315. SetThemeCursor(ThemeCursor inCursor);
  2316. /*
  2317. * SetAnimatedThemeCursor()
  2318. *
  2319. * Availability:
  2320. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2321. * CarbonLib: in CarbonLib 1.0 and later
  2322. * Mac OS X: in version 10.0 and later
  2323. */
  2324. EXTERN_API( OSStatus )
  2325. SetAnimatedThemeCursor(
  2326. ThemeCursor inCursor,
  2327. UInt32 inAnimationStep);
  2328. /*-------------------------------- CONTROL STYLE SETTINGS ------------------------------------------*/
  2329. /*
  2330. * GetThemeScrollBarThumbStyle()
  2331. *
  2332. * Availability:
  2333. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2334. * CarbonLib: in CarbonLib 1.0 and later
  2335. * Mac OS X: in version 10.0 and later
  2336. */
  2337. EXTERN_API( OSStatus )
  2338. GetThemeScrollBarThumbStyle(ThemeScrollBarThumbStyle * outStyle);
  2339. /*
  2340. * GetThemeScrollBarArrowStyle()
  2341. *
  2342. * Availability:
  2343. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2344. * CarbonLib: in CarbonLib 1.0 and later
  2345. * Mac OS X: in version 10.0 and later
  2346. */
  2347. EXTERN_API( OSStatus )
  2348. GetThemeScrollBarArrowStyle(ThemeScrollBarArrowStyle * outStyle);
  2349. /*
  2350. * GetThemeCheckBoxStyle()
  2351. *
  2352. * Availability:
  2353. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2354. * CarbonLib: in CarbonLib 1.0 and later
  2355. * Mac OS X: in version 10.0 and later
  2356. */
  2357. EXTERN_API( OSStatus )
  2358. GetThemeCheckBoxStyle(ThemeCheckBoxStyle * outStyle);
  2359. /*---------------------------------------- FONTS/TEXT ----------------------------------------------*/
  2360. /*
  2361. * UseThemeFont()
  2362. *
  2363. * Availability:
  2364. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2365. * CarbonLib: in CarbonLib 1.0 and later
  2366. * Mac OS X: in version 10.0 and later
  2367. */
  2368. EXTERN_API( OSStatus )
  2369. UseThemeFont(
  2370. ThemeFontID inFontID,
  2371. ScriptCode inScript);
  2372. /*
  2373. * GetThemeFont()
  2374. *
  2375. * Availability:
  2376. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2377. * CarbonLib: in CarbonLib 1.0 and later
  2378. * Mac OS X: in version 10.0 and later
  2379. */
  2380. EXTERN_API( OSStatus )
  2381. GetThemeFont(
  2382. ThemeFontID inFontID,
  2383. ScriptCode inScript,
  2384. Str255 outFontName, /* can be NULL */
  2385. SInt16 * outFontSize,
  2386. Style * outStyle);
  2387. /*
  2388. * DrawThemeTextBox()
  2389. *
  2390. * Summary:
  2391. * Draws text into the area you specify.
  2392. *
  2393. * Discussion:
  2394. * DrawThemeTextBox allows you to draw theme-savvy (ie. Aqua-savvy
  2395. * on Mac OS X) text. It is unicode savvy (although only partially
  2396. * so under CarbonLib), and allows you to customize certain text
  2397. * rendering characteristics such as the font, wrapping behavior,
  2398. * and justification. The text is drawn into the CGContextRef you
  2399. * provide, or into the current Quickdraw port if no CGContextRef is
  2400. * provided. None of DrawThemeTextBox's parameters imply a color, so
  2401. * you must set up the desired text color separately before calling
  2402. * DrawThemeTextBox. If you provide a CGContextRef, its fill color
  2403. * will be used to draw the text. If you do not provide a
  2404. * CGContextRef, a color based on the current Quickdraw port's
  2405. * foreground color and the grayishTextOr mode (if set) will be used
  2406. * to draw the text.
  2407. *
  2408. * Parameters:
  2409. *
  2410. * inString:
  2411. * A CFStringRef containing the unicode characters you wish to
  2412. * render. You MUST NOT pass in a CFStringRef that was allocated
  2413. * with any of the "NoCopy" CFString creation APIs; a string
  2414. * created with a "NoCopy" API has transient storage which is
  2415. * incompatible with DrawThemeTextBox's caches.
  2416. *
  2417. * inFontID:
  2418. * The ThemeFontID describing the font you'd like to render the
  2419. * text with. See the discussion of ThemeFontIDs elsewhere in this
  2420. * header.
  2421. *
  2422. * inState:
  2423. * The ThemeDrawState describing the the state of the interface
  2424. * element you are drawing the text for. If, for example, you are
  2425. * drawing text for an inactive window, you would pass
  2426. * kThemeStateInactive. The ThemeDrawState is generally only used
  2427. * to determine the shadow characteristics for the text on Mac OS
  2428. * X. Note that the ThemeDrawState does NOT imply a color. It is
  2429. * NOT used as a mechanism for graying the text. If you wish to
  2430. * draw grayed text, you must set up the desired gray color and
  2431. * apply it to either the current Quickdraw port or the
  2432. * CGContextRef as appropriate.
  2433. *
  2434. * inWrapToWidth:
  2435. * A Boolean indicating whether you want to draw multiple lines of
  2436. * text wrapped to a bounding box. False indicates that only one
  2437. * line of text should be drawn without any sort of wrapping.
  2438. *
  2439. * inBoundingBox:
  2440. * The rectangle (in coordinates relative to the current Quickdraw
  2441. * port) describing the area to draw the text within. The first
  2442. * line of text will be top-justified to this rectangle. Wrapping
  2443. * (if desired) will happen at the horizontal extent of this
  2444. * rectangle. Regardless of the amount of text in your
  2445. * CFStringRef, all drawn text will be clipped to this rectangle.
  2446. *
  2447. * inJust:
  2448. * The horizontal justification you would like for your text. You
  2449. * can use one of the standard justification constants from
  2450. * TextEdit.h.
  2451. *
  2452. * inContext:
  2453. * The CGContextRef into which you would like to draw the text. On
  2454. * Mac OS X, all text drawing happens in CGContextRefs; if you
  2455. * pass NULL, a transient CGContextRef will be allocated and
  2456. * deallocated for use within the single API call. Relying on the
  2457. * system behavior if transiently createing CGContextRefs may
  2458. * result in performance problems. On Mac OS 9, the CGContextRef
  2459. * parameter is ignored.
  2460. *
  2461. * Availability:
  2462. * Non-Carbon CFM: not available
  2463. * CarbonLib: in CarbonLib 1.3 and later
  2464. * Mac OS X: in version 10.0 and later
  2465. */
  2466. EXTERN_API( OSStatus )
  2467. DrawThemeTextBox(
  2468. CFStringRef inString,
  2469. ThemeFontID inFontID,
  2470. ThemeDrawState inState,
  2471. Boolean inWrapToWidth,
  2472. const Rect * inBoundingBox,
  2473. SInt16 inJust,
  2474. void * inContext);
  2475. /*
  2476. * TruncateThemeText()
  2477. *
  2478. * Summary:
  2479. * Truncates text to fit within the width you specify.
  2480. *
  2481. * Discussion:
  2482. * TruncateThemeText alters a unicode string to fit within a width
  2483. * that you specify. It is unicode savvy (although only partially so
  2484. * under CarbonLib), and makes its calculations (and any subsequent
  2485. * string alteration) based on the font and state you specify. If
  2486. * the string needs to be truncated, it will be reduced to the
  2487. * maximum number of characters which (with the addition of an
  2488. * ellipsis character) fits within the specified width.
  2489. *
  2490. * Parameters:
  2491. *
  2492. * inString:
  2493. * A CFMutableStringRef containing the unicode characters you wish
  2494. * to truncate. On output, inString may have been altered to fit
  2495. * within the specified width. You MUST NOT pass in a CFStringRef
  2496. * that was allocated with any of the "NoCopy" CFString creation
  2497. * APIs (see note in DrawThemeTextBox above).
  2498. *
  2499. * inFontID:
  2500. * The ThemeFontID to use for text measurements. See the
  2501. * discussion of ThemeFontIDs elsewhere in this header.
  2502. *
  2503. * inState:
  2504. * The ThemeDrawState which matches the state you will ultimately
  2505. * render the string width. This may affect text measurement
  2506. * during truncation, so you should be sure the value you pass to
  2507. * TruncateThemeText matches the value you will eventually use for
  2508. * drawing.
  2509. *
  2510. * inPixelWidthLimit:
  2511. * The maximum width (in pixels) that the resulting truncated
  2512. * string may have.
  2513. *
  2514. * inTruncWhere:
  2515. * A TruncCode indicating where you would like truncation to occur.
  2516. *
  2517. * outTruncated:
  2518. * On output, this Boolean value indicates whether the string was
  2519. * truncated. True means the string was truncated. False means the
  2520. * string was not (and did not need to be) truncated.
  2521. *
  2522. * Availability:
  2523. * Non-Carbon CFM: not available
  2524. * CarbonLib: in CarbonLib 1.3 and later
  2525. * Mac OS X: in version 10.0 and later
  2526. */
  2527. EXTERN_API( OSStatus )
  2528. TruncateThemeText(
  2529. CFMutableStringRef inString,
  2530. ThemeFontID inFontID,
  2531. ThemeDrawState inState,
  2532. SInt16 inPixelWidthLimit,
  2533. TruncCode inTruncWhere,
  2534. Boolean * outTruncated); /* can be NULL */
  2535. /*
  2536. * GetThemeTextDimensions()
  2537. *
  2538. * Summary:
  2539. * Tells you the height, width, and baseline for a string.
  2540. *
  2541. * Discussion:
  2542. * GetThemeTextDimensions measures the given string using a font and
  2543. * state you specify. It always reports the actual height and
  2544. * baseline. It sometimes reports the actual width (see below). It
  2545. * can measure a string that wraps. It is unicode savvy (although
  2546. * only partially so under CarbonLib).
  2547. *
  2548. * Parameters:
  2549. *
  2550. * inString:
  2551. * A CFStringRef containing the unicode characters you wish to
  2552. * measure. You MUST NOT pass in a CFStringRef that was allocated
  2553. * with any of the "NoCopy" CFString creation APIs (see note in
  2554. * DrawThemeTextBox above).
  2555. *
  2556. * inFontID:
  2557. * The ThemeFontID describing the font you'd like to measure the
  2558. * text with. See the discussion of ThemeFontIDs elsewhere in this
  2559. * header.
  2560. *
  2561. * inState:
  2562. * The ThemeDrawState which matches the state you will ultimately
  2563. * render the string width. This may affect text measurement, so
  2564. * you should be sure the value you pass to TruncateThemeText
  2565. * matches the value you will eventually use for drawing.
  2566. *
  2567. * inWrapToWidth:
  2568. * A Boolean indicating whether you want the measurements based on
  2569. * wrapping the text to a specific width. If you pass true, you
  2570. * must specify the desired width in ioBounds->h.
  2571. *
  2572. * ioBounds:
  2573. * On output, ioBounds->v contains the height of the text. If you
  2574. * pass false to inWrapToWidth, ioBounds->h will contain the width
  2575. * of the text on output. If you pass true to inWrapToWidth,
  2576. * ioBounds->h must (on input) contain the desired width for
  2577. * wrapping; on output, ioBounds->h contains the same value you
  2578. * specified on input.
  2579. *
  2580. * outBaseline:
  2581. * On output, outBaseline contains the offset (in Quickdraw space)
  2582. * from the bottom edge of the last line of text to the baseline
  2583. * of the first line of text. outBaseline will generally be a
  2584. * negative value.
  2585. *
  2586. * Availability:
  2587. * Non-Carbon CFM: not available
  2588. * CarbonLib: in CarbonLib 1.3 and later
  2589. * Mac OS X: in version 10.0 and later
  2590. */
  2591. EXTERN_API( OSStatus )
  2592. GetThemeTextDimensions(
  2593. CFStringRef inString,
  2594. ThemeFontID inFontID,
  2595. ThemeDrawState inState,
  2596. Boolean inWrapToWidth,
  2597. Point * ioBounds,
  2598. SInt16 * outBaseline);
  2599. /*
  2600. * GetThemeTextShadowOutset()
  2601. *
  2602. * Summary:
  2603. * Tells you the amount of space taken up by the shadow for a given
  2604. * font/state combination.
  2605. *
  2606. * Discussion:
  2607. * GetThemeTextShadowOutset passes back the maximum amount of space
  2608. * the shadow will take up for text drawn in the specified font and
  2609. * state. While GetThemeTextDimensions tells you how much space is
  2610. * taken up by the character glyphs themselves, it does not
  2611. * incorporate the font/state shadow into its calculations. If you
  2612. * need to know how much total space including the shadow will be
  2613. * taken up, call GetThemeTextDimensions followed by
  2614. * GetThemeTextShadowOutset.
  2615. *
  2616. * Parameters:
  2617. *
  2618. * inFontID:
  2619. * The ThemeFontID describing the font you'd like the shadow
  2620. * characteristics of. Font and state both determine the amount of
  2621. * shadow that will be used on rendered text. See the discussion
  2622. * of ThemeFontIDs elsewhere in this header.
  2623. *
  2624. * inState:
  2625. * The ThemeDrawState which matches the state you'd like the
  2626. * shadow characteristics of. Font and state both determine the
  2627. * amount of shadow that will be used on rendered text.
  2628. *
  2629. * outOutset:
  2630. * On output, outOutset contains the amount of space the shadow
  2631. * will take up beyond each edge of the text bounding rectangle
  2632. * returned by GetThemeTextDimensions. The fields of outOutset
  2633. * will either be positive values or zero.
  2634. *
  2635. * Availability:
  2636. * Non-Carbon CFM: not available
  2637. * CarbonLib: in CarbonLib 1.3 and later
  2638. * Mac OS X: in version 10.0 and later
  2639. */
  2640. EXTERN_API( OSStatus )
  2641. GetThemeTextShadowOutset(
  2642. ThemeFontID inFontID,
  2643. ThemeDrawState inState,
  2644. Rect * outOutset);
  2645. /*---------------------------------------- TRACKS --------------------------------------------------*/
  2646. /*
  2647. * DrawThemeTrack()
  2648. *
  2649. * Availability:
  2650. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2651. * CarbonLib: in CarbonLib 1.0 and later
  2652. * Mac OS X: in version 10.0 and later
  2653. */
  2654. EXTERN_API( OSStatus )
  2655. DrawThemeTrack(
  2656. const ThemeTrackDrawInfo * drawInfo,
  2657. RgnHandle rgnGhost, /* can be NULL */
  2658. ThemeEraseUPP eraseProc, /* can be NULL */
  2659. UInt32 eraseData);
  2660. /*
  2661. * HitTestThemeTrack()
  2662. *
  2663. * Availability:
  2664. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2665. * CarbonLib: in CarbonLib 1.0 and later
  2666. * Mac OS X: in version 10.0 and later
  2667. */
  2668. EXTERN_API( Boolean )
  2669. HitTestThemeTrack(
  2670. const ThemeTrackDrawInfo * drawInfo,
  2671. Point mousePoint,
  2672. ControlPartCode * partHit);
  2673. /*
  2674. * GetThemeTrackBounds()
  2675. *
  2676. * Availability:
  2677. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2678. * CarbonLib: in CarbonLib 1.0 and later
  2679. * Mac OS X: in version 10.0 and later
  2680. */
  2681. EXTERN_API( OSStatus )
  2682. GetThemeTrackBounds(
  2683. const ThemeTrackDrawInfo * drawInfo,
  2684. Rect * bounds);
  2685. /*
  2686. * GetThemeTrackThumbRgn()
  2687. *
  2688. * Availability:
  2689. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2690. * CarbonLib: in CarbonLib 1.0 and later
  2691. * Mac OS X: in version 10.0 and later
  2692. */
  2693. EXTERN_API( OSStatus )
  2694. GetThemeTrackThumbRgn(
  2695. const ThemeTrackDrawInfo * drawInfo,
  2696. RgnHandle thumbRgn);
  2697. /*
  2698. * GetThemeTrackDragRect()
  2699. *
  2700. * Availability:
  2701. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2702. * CarbonLib: in CarbonLib 1.0 and later
  2703. * Mac OS X: in version 10.0 and later
  2704. */
  2705. EXTERN_API( OSStatus )
  2706. GetThemeTrackDragRect(
  2707. const ThemeTrackDrawInfo * drawInfo,
  2708. Rect * dragRect);
  2709. /*
  2710. * DrawThemeTrackTickMarks()
  2711. *
  2712. * Availability:
  2713. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2714. * CarbonLib: in CarbonLib 1.0 and later
  2715. * Mac OS X: in version 10.0 and later
  2716. */
  2717. EXTERN_API( OSStatus )
  2718. DrawThemeTrackTickMarks(
  2719. const ThemeTrackDrawInfo * drawInfo,
  2720. ItemCount numTicks,
  2721. ThemeEraseUPP eraseProc, /* can be NULL */
  2722. UInt32 eraseData);
  2723. /*
  2724. * GetThemeTrackThumbPositionFromOffset()
  2725. *
  2726. * Availability:
  2727. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2728. * CarbonLib: in CarbonLib 1.0 and later
  2729. * Mac OS X: in version 10.0 and later
  2730. */
  2731. EXTERN_API( OSStatus )
  2732. GetThemeTrackThumbPositionFromOffset(
  2733. const ThemeTrackDrawInfo * drawInfo,
  2734. Point thumbOffset,
  2735. SInt32 * relativePosition);
  2736. /*
  2737. * GetThemeTrackThumbPositionFromRegion()
  2738. *
  2739. * Availability:
  2740. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2741. * CarbonLib: in CarbonLib 1.0 and later
  2742. * Mac OS X: in version 10.0 and later
  2743. */
  2744. EXTERN_API( OSStatus )
  2745. GetThemeTrackThumbPositionFromRegion(
  2746. const ThemeTrackDrawInfo * drawInfo,
  2747. RgnHandle thumbRgn,
  2748. SInt32 * relativePosition);
  2749. /*
  2750. * GetThemeTrackLiveValue()
  2751. *
  2752. * Availability:
  2753. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2754. * CarbonLib: in CarbonLib 1.0 and later
  2755. * Mac OS X: in version 10.0 and later
  2756. */
  2757. EXTERN_API( OSStatus )
  2758. GetThemeTrackLiveValue(
  2759. const ThemeTrackDrawInfo * drawInfo,
  2760. SInt32 relativePosition,
  2761. SInt32 * value);
  2762. /*----------------------------------- SCROLLBAR ARROWS ---------------------------------------------*/
  2763. /*
  2764. * DrawThemeScrollBarArrows()
  2765. *
  2766. * Availability:
  2767. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2768. * CarbonLib: in CarbonLib 1.0 and later
  2769. * Mac OS X: in version 10.0 and later
  2770. */
  2771. EXTERN_API( OSStatus )
  2772. DrawThemeScrollBarArrows(
  2773. const Rect * bounds,
  2774. ThemeTrackEnableState enableState,
  2775. ThemeTrackPressState pressState,
  2776. Boolean isHoriz,
  2777. Rect * trackBounds);
  2778. /*
  2779. * GetThemeScrollBarTrackRect()
  2780. *
  2781. * Availability:
  2782. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2783. * CarbonLib: in CarbonLib 1.0 and later
  2784. * Mac OS X: in version 10.0 and later
  2785. */
  2786. EXTERN_API( OSStatus )
  2787. GetThemeScrollBarTrackRect(
  2788. const Rect * bounds,
  2789. ThemeTrackEnableState enableState,
  2790. ThemeTrackPressState pressState,
  2791. Boolean isHoriz,
  2792. Rect * trackBounds);
  2793. /*
  2794. * HitTestThemeScrollBarArrows()
  2795. *
  2796. * Availability:
  2797. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2798. * CarbonLib: in CarbonLib 1.0 and later
  2799. * Mac OS X: in version 10.0 and later
  2800. */
  2801. EXTERN_API( Boolean )
  2802. HitTestThemeScrollBarArrows(
  2803. const Rect * scrollBarBounds,
  2804. ThemeTrackEnableState enableState,
  2805. ThemeTrackPressState pressState,
  2806. Boolean isHoriz,
  2807. Point ptHit,
  2808. Rect * trackBounds,
  2809. ControlPartCode * partcode);
  2810. /*---------------------------------------- WINDOWS -------------------------------------------------*/
  2811. /*
  2812. * GetThemeWindowRegion()
  2813. *
  2814. * Availability:
  2815. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2816. * CarbonLib: in CarbonLib 1.0 and later
  2817. * Mac OS X: in version 10.0 and later
  2818. */
  2819. EXTERN_API( OSStatus )
  2820. GetThemeWindowRegion(
  2821. ThemeWindowType flavor,
  2822. const Rect * contRect,
  2823. ThemeDrawState state,
  2824. const ThemeWindowMetrics * metrics,
  2825. ThemeWindowAttributes attributes,
  2826. WindowRegionCode winRegion,
  2827. RgnHandle rgn);
  2828. /*
  2829. * DrawThemeWindowFrame()
  2830. *
  2831. * Availability:
  2832. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2833. * CarbonLib: in CarbonLib 1.0 and later
  2834. * Mac OS X: in version 10.0 and later
  2835. */
  2836. EXTERN_API( OSStatus )
  2837. DrawThemeWindowFrame(
  2838. ThemeWindowType flavor,
  2839. const Rect * contRect,
  2840. ThemeDrawState state,
  2841. const ThemeWindowMetrics * metrics,
  2842. ThemeWindowAttributes attributes,
  2843. WindowTitleDrawingUPP titleProc, /* can be NULL */
  2844. UInt32 titleData);
  2845. /*
  2846. * DrawThemeTitleBarWidget()
  2847. *
  2848. * Summary:
  2849. * Draws the requested theme title bar widget.
  2850. *
  2851. * Discussion:
  2852. * DrawThemeTitleBarWidget renders the requested theme title bar
  2853. * widget in the proper location of a window. A common
  2854. * misconception when using this API is that the client must specify
  2855. * the exact location of the widget in the window. The widget will
  2856. * locate itself in the window based relative to the content rect
  2857. * passed in content rectangle -- the contRect parameter. Another
  2858. * common problem is to ignore the window's attributes. The
  2859. * attributes must be set up properly to describe the window for
  2860. * which the widget is to be drawn.
  2861. *
  2862. * Parameters:
  2863. *
  2864. * flavor:
  2865. * A valid ThemeWindowtype describing the type of theme window for
  2866. * which you would like to draw a widget.
  2867. *
  2868. * contRect:
  2869. * A rectangle describing the window's content area. The widget
  2870. * is drawn relative to the content rectangle of the window, so
  2871. * this parameter does not describe the actual widget bounds, it
  2872. * describes the window's content rectangle.
  2873. *
  2874. * state:
  2875. * A valid ThemeDrawState which describes the state of the window
  2876. * for which the widget is to be drawn.
  2877. *
  2878. * metrics:
  2879. * A pointer to a set of valid ThemeWindowMetrics. At this time,
  2880. * none of the fields of the metrics are pertinent to the widgets,
  2881. * so the only important field is the metricSize field to mark the
  2882. * structure as valid.
  2883. *
  2884. * attributes:
  2885. * A valid ThemeWindowAttributes set which describes the window
  2886. * for which the widget is to be drawn.
  2887. *
  2888. * widget:
  2889. * A valid ThemeTitleBarWidget set which describes which widget to
  2890. * draw.
  2891. *
  2892. * Availability:
  2893. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2894. * CarbonLib: in CarbonLib 1.0 and later
  2895. * Mac OS X: in version 10.0 and later
  2896. */
  2897. EXTERN_API( OSStatus )
  2898. DrawThemeTitleBarWidget(
  2899. ThemeWindowType flavor,
  2900. const Rect * contRect,
  2901. ThemeDrawState state,
  2902. const ThemeWindowMetrics * metrics,
  2903. ThemeWindowAttributes attributes,
  2904. ThemeTitleBarWidget widget);
  2905. /*
  2906. * GetThemeWindowRegionHit()
  2907. *
  2908. * Availability:
  2909. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2910. * CarbonLib: in CarbonLib 1.0 and later
  2911. * Mac OS X: in version 10.0 and later
  2912. */
  2913. EXTERN_API( Boolean )
  2914. GetThemeWindowRegionHit(
  2915. ThemeWindowType flavor,
  2916. const Rect * inContRect,
  2917. ThemeDrawState state,
  2918. const ThemeWindowMetrics * metrics,
  2919. ThemeWindowAttributes inAttributes,
  2920. Point inPoint,
  2921. WindowRegionCode * outRegionHit);
  2922. /*
  2923. * DrawThemeScrollBarDelimiters()
  2924. *
  2925. * Availability:
  2926. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2927. * CarbonLib: in CarbonLib 1.0 and later
  2928. * Mac OS X: in version 10.0 and later
  2929. */
  2930. EXTERN_API( OSStatus )
  2931. DrawThemeScrollBarDelimiters(
  2932. ThemeWindowType flavor,
  2933. const Rect * inContRect,
  2934. ThemeDrawState state,
  2935. ThemeWindowAttributes attributes);
  2936. /*---------------------------------------- BUTTONS -------------------------------------------------*/
  2937. /*
  2938. * DrawThemeButton()
  2939. *
  2940. * Availability:
  2941. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2942. * CarbonLib: in CarbonLib 1.0 and later
  2943. * Mac OS X: in version 10.0 and later
  2944. */
  2945. EXTERN_API( OSStatus )
  2946. DrawThemeButton(
  2947. const Rect * inBounds,
  2948. ThemeButtonKind inKind,
  2949. const ThemeButtonDrawInfo * inNewInfo,
  2950. const ThemeButtonDrawInfo * inPrevInfo, /* can be NULL */
  2951. ThemeEraseUPP inEraseProc, /* can be NULL */
  2952. ThemeButtonDrawUPP inLabelProc, /* can be NULL */
  2953. UInt32 inUserData);
  2954. /*
  2955. * GetThemeButtonRegion()
  2956. *
  2957. * Availability:
  2958. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2959. * CarbonLib: in CarbonLib 1.0 and later
  2960. * Mac OS X: in version 10.0 and later
  2961. */
  2962. EXTERN_API( OSStatus )
  2963. GetThemeButtonRegion(
  2964. const Rect * inBounds,
  2965. ThemeButtonKind inKind,
  2966. const ThemeButtonDrawInfo * inNewInfo,
  2967. RgnHandle outRegion);
  2968. /*
  2969. * GetThemeButtonContentBounds()
  2970. *
  2971. * Availability:
  2972. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2973. * CarbonLib: in CarbonLib 1.0 and later
  2974. * Mac OS X: in version 10.0 and later
  2975. */
  2976. EXTERN_API( OSStatus )
  2977. GetThemeButtonContentBounds(
  2978. const Rect * inBounds,
  2979. ThemeButtonKind inKind,
  2980. const ThemeButtonDrawInfo * inDrawInfo,
  2981. Rect * outBounds);
  2982. /*
  2983. * GetThemeButtonBackgroundBounds()
  2984. *
  2985. * Availability:
  2986. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  2987. * CarbonLib: in CarbonLib 1.0 and later
  2988. * Mac OS X: in version 10.0 and later
  2989. */
  2990. EXTERN_API( OSStatus )
  2991. GetThemeButtonBackgroundBounds(
  2992. const Rect * inBounds,
  2993. ThemeButtonKind inKind,
  2994. const ThemeButtonDrawInfo * inDrawInfo,
  2995. Rect * outBounds);
  2996. /*------------------------------------- INTERFACE SOUNDS -------------------------------------------*/
  2997. /* */
  2998. /* X ALERT: Please note that the sound APIs do not work on Mac OS X at present. */
  2999. /*
  3000. * PlayThemeSound()
  3001. *
  3002. * Availability:
  3003. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3004. * CarbonLib: in CarbonLib 1.0 and later
  3005. * Mac OS X: in version 10.0 and later
  3006. */
  3007. EXTERN_API( OSStatus )
  3008. PlayThemeSound(ThemeSoundKind kind) THREEWORDINLINE(0x303C, 0x0026, 0xAA74);
  3009. /*
  3010. * BeginThemeDragSound()
  3011. *
  3012. * Availability:
  3013. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3014. * CarbonLib: in CarbonLib 1.0 and later
  3015. * Mac OS X: in version 10.0 and later
  3016. */
  3017. EXTERN_API( OSStatus )
  3018. BeginThemeDragSound(ThemeDragSoundKind kind) THREEWORDINLINE(0x303C, 0x0027, 0xAA74);
  3019. /*
  3020. * EndThemeDragSound()
  3021. *
  3022. * Availability:
  3023. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3024. * CarbonLib: in CarbonLib 1.0 and later
  3025. * Mac OS X: in version 10.0 and later
  3026. */
  3027. EXTERN_API( OSStatus )
  3028. EndThemeDragSound(void) THREEWORDINLINE(0x303C, 0x0028, 0xAA74);
  3029. /*-------------------------------------- PRIMITIVES ------------------------------------------------*/
  3030. /*
  3031. * DrawThemeTickMark()
  3032. *
  3033. * Availability:
  3034. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3035. * CarbonLib: in CarbonLib 1.0 and later
  3036. * Mac OS X: in version 10.0 and later
  3037. */
  3038. EXTERN_API( OSStatus )
  3039. DrawThemeTickMark(
  3040. const Rect * bounds,
  3041. ThemeDrawState state);
  3042. /*
  3043. * DrawThemeChasingArrows()
  3044. *
  3045. * Availability:
  3046. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3047. * CarbonLib: in CarbonLib 1.0 and later
  3048. * Mac OS X: in version 10.0 and later
  3049. */
  3050. EXTERN_API( OSStatus )
  3051. DrawThemeChasingArrows(
  3052. const Rect * bounds,
  3053. UInt32 index,
  3054. ThemeDrawState state,
  3055. ThemeEraseUPP eraseProc, /* can be NULL */
  3056. UInt32 eraseData);
  3057. /*
  3058. * DrawThemePopupArrow()
  3059. *
  3060. * Availability:
  3061. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3062. * CarbonLib: in CarbonLib 1.0 and later
  3063. * Mac OS X: in version 10.0 and later
  3064. */
  3065. EXTERN_API( OSStatus )
  3066. DrawThemePopupArrow(
  3067. const Rect * bounds,
  3068. ThemeArrowOrientation orientation,
  3069. ThemePopupArrowSize size,
  3070. ThemeDrawState state,
  3071. ThemeEraseUPP eraseProc, /* can be NULL */
  3072. UInt32 eraseData);
  3073. /*
  3074. * DrawThemeStandaloneGrowBox()
  3075. *
  3076. * Availability:
  3077. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3078. * CarbonLib: in CarbonLib 1.0 and later
  3079. * Mac OS X: in version 10.0 and later
  3080. */
  3081. EXTERN_API( OSStatus )
  3082. DrawThemeStandaloneGrowBox(
  3083. Point origin,
  3084. ThemeGrowDirection growDirection,
  3085. Boolean isSmall,
  3086. ThemeDrawState state);
  3087. /*
  3088. * DrawThemeStandaloneNoGrowBox()
  3089. *
  3090. * Availability:
  3091. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3092. * CarbonLib: in CarbonLib 1.0 and later
  3093. * Mac OS X: in version 10.0 and later
  3094. */
  3095. EXTERN_API( OSStatus )
  3096. DrawThemeStandaloneNoGrowBox(
  3097. Point origin,
  3098. ThemeGrowDirection growDirection,
  3099. Boolean isSmall,
  3100. ThemeDrawState state);
  3101. /*
  3102. * GetThemeStandaloneGrowBoxBounds()
  3103. *
  3104. * Availability:
  3105. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3106. * CarbonLib: in CarbonLib 1.0 and later
  3107. * Mac OS X: in version 10.0 and later
  3108. */
  3109. EXTERN_API( OSStatus )
  3110. GetThemeStandaloneGrowBoxBounds(
  3111. Point origin,
  3112. ThemeGrowDirection growDirection,
  3113. Boolean isSmall,
  3114. Rect * bounds);
  3115. /*------------------------------------- DRAWING STATE ----------------------------------------------*/
  3116. /* The following routines help you save and restore the drawing state in a theme-savvy manner. With */
  3117. /* these weapons in your arsenal, there is no grafport you cannot tame. Use ThemeGetDrawingState to */
  3118. /* get the current drawing settings for the current port. It will return an opaque object for you */
  3119. /* to pass into SetThemeDrawingState later on. When you are finished with the state, call the */
  3120. /* DisposeThemeDrawingState routine. You can alternatively pass true into the inDisposeNow */
  3121. /* parameter of the SetThemeDrawingState routine. You can use this routine to copy the drawing */
  3122. /* state from one port to another as well. */
  3123. /* */
  3124. /* As of this writing (Mac OS 9.1 and Mac OS X), Get/SetThemeDrawingState will save and restore */
  3125. /* this data in the port: */
  3126. /* */
  3127. /* pen size */
  3128. /* pen location */
  3129. /* pen mode */
  3130. /* pen Pattern and PixPat */
  3131. /* background Pattern and PixPat */
  3132. /* RGB foreground and background colors */
  3133. /* text mode */
  3134. /* pattern origin */
  3135. /* */
  3136. /* Get/SetThemeDrawingState may save and restore additional port state in the future, but you can */
  3137. /* rely on them to always save at least this port state. */
  3138. /*
  3139. * NormalizeThemeDrawingState()
  3140. *
  3141. * Availability:
  3142. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3143. * CarbonLib: in CarbonLib 1.0 and later
  3144. * Mac OS X: in version 10.0 and later
  3145. */
  3146. EXTERN_API( OSStatus )
  3147. NormalizeThemeDrawingState(void);
  3148. /*
  3149. * GetThemeDrawingState()
  3150. *
  3151. * Availability:
  3152. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3153. * CarbonLib: in CarbonLib 1.0 and later
  3154. * Mac OS X: in version 10.0 and later
  3155. */
  3156. EXTERN_API( OSStatus )
  3157. GetThemeDrawingState(ThemeDrawingState * outState);
  3158. /*
  3159. * SetThemeDrawingState()
  3160. *
  3161. * Availability:
  3162. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3163. * CarbonLib: in CarbonLib 1.0 and later
  3164. * Mac OS X: in version 10.0 and later
  3165. */
  3166. EXTERN_API( OSStatus )
  3167. SetThemeDrawingState(
  3168. ThemeDrawingState inState,
  3169. Boolean inDisposeNow);
  3170. /*
  3171. * DisposeThemeDrawingState()
  3172. *
  3173. * Availability:
  3174. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3175. * CarbonLib: in CarbonLib 1.0 and later
  3176. * Mac OS X: in version 10.0 and later
  3177. */
  3178. EXTERN_API( OSStatus )
  3179. DisposeThemeDrawingState(ThemeDrawingState inState);
  3180. /*------------------------------------- MISCELLANEOUS ----------------------------------------------*/
  3181. /* ApplyThemeBackground is used to set up the background for embedded controls */
  3182. /* It is normally called by controls that are embedders. The standard controls */
  3183. /* call this API to ensure a correct background for the current theme. You pass */
  3184. /* in the same rectangle you would if you were calling the drawing primitive. */
  3185. /*
  3186. * ApplyThemeBackground()
  3187. *
  3188. * Availability:
  3189. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3190. * CarbonLib: in CarbonLib 1.0 and later
  3191. * Mac OS X: in version 10.0 and later
  3192. */
  3193. EXTERN_API( OSStatus )
  3194. ApplyThemeBackground(
  3195. ThemeBackgroundKind inKind,
  3196. const Rect * bounds,
  3197. ThemeDrawState inState,
  3198. SInt16 inDepth,
  3199. Boolean inColorDev);
  3200. /*
  3201. * SetThemeTextColorForWindow()
  3202. *
  3203. * Summary:
  3204. * Sets a text color which contrasts with a theme brush.
  3205. *
  3206. * Discussion:
  3207. * SetThemeTextColorForWindow sets a text color in the specified
  3208. * window's port which contrasts with the specified brush and also
  3209. * matches the inActive parameter. Only a subset of the theme
  3210. * brushes have theme text colors: currently (as of Mac OS 9 and Mac
  3211. * OS X 10.1), the Alert, Dialog, ModelessDialog, and Notification
  3212. * brushes have corresponding text colors. For any other brush,
  3213. * SetThemeTextColorForWindow returns themeNoAppropriateBrushErr and
  3214. * does not modify the text color.
  3215. *
  3216. * Parameters:
  3217. *
  3218. * inWindow:
  3219. * The window whose text color to change.
  3220. *
  3221. * inActive:
  3222. * Whether the text color should indicate an active or inactive
  3223. * state.
  3224. *
  3225. * inDepth:
  3226. * The bit depth of the window's port.
  3227. *
  3228. * inColorDev:
  3229. * Whether the window's port is color or black&white.
  3230. *
  3231. * Result:
  3232. * An operating system result code, including
  3233. * themeNoAppropriateBrushErr if the specified theme brush does not
  3234. * have a corresponding theme text color.
  3235. *
  3236. * Availability:
  3237. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3238. * CarbonLib: in CarbonLib 1.0 and later
  3239. * Mac OS X: in version 10.0 and later
  3240. */
  3241. EXTERN_API( OSStatus )
  3242. SetThemeTextColorForWindow(
  3243. WindowRef inWindow,
  3244. Boolean inActive,
  3245. SInt16 inDepth,
  3246. Boolean inColorDev);
  3247. /*
  3248. * IsValidAppearanceFileType()
  3249. *
  3250. * Availability:
  3251. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3252. * CarbonLib: in CarbonLib 1.0 and later
  3253. * Mac OS X: in version 10.0 and later
  3254. */
  3255. EXTERN_API( Boolean )
  3256. IsValidAppearanceFileType(OSType fileType);
  3257. /*
  3258. * GetThemeBrushAsColor()
  3259. *
  3260. * Availability:
  3261. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3262. * CarbonLib: in CarbonLib 1.0 and later
  3263. * Mac OS X: in version 10.0 and later
  3264. */
  3265. EXTERN_API( OSStatus )
  3266. GetThemeBrushAsColor(
  3267. ThemeBrush inBrush,
  3268. SInt16 inDepth,
  3269. Boolean inColorDev,
  3270. RGBColor * outColor);
  3271. /*
  3272. * GetThemeTextColor()
  3273. *
  3274. * Availability:
  3275. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3276. * CarbonLib: in CarbonLib 1.0 and later
  3277. * Mac OS X: in version 10.0 and later
  3278. */
  3279. EXTERN_API( OSStatus )
  3280. GetThemeTextColor(
  3281. ThemeTextColor inColor,
  3282. SInt16 inDepth,
  3283. Boolean inColorDev,
  3284. RGBColor * outColor);
  3285. /*--------------------------------------- BEGIN CARBON ---------------------------------------------*/
  3286. /*
  3287. * GetThemeMetric()
  3288. *
  3289. * Availability:
  3290. * Non-Carbon CFM: not available
  3291. * CarbonLib: in CarbonLib 1.0 and later
  3292. * Mac OS X: in version 10.0 and later
  3293. */
  3294. EXTERN_API( OSStatus )
  3295. GetThemeMetric(
  3296. ThemeMetric inMetric,
  3297. SInt32 * outMetric);
  3298. /*
  3299. * CopyThemeIdentifier()
  3300. *
  3301. * Availability:
  3302. * Non-Carbon CFM: not available
  3303. * CarbonLib: in CarbonLib 1.4 and later
  3304. * Mac OS X: in version 10.1 and later
  3305. */
  3306. EXTERN_API_C( OSStatus )
  3307. CopyThemeIdentifier(CFStringRef * outIdentifier);
  3308. /*--------------------------------------------------------------------------------------------------*/
  3309. /* Obsolete symbolic names */
  3310. /*--------------------------------------------------------------------------------------------------*/
  3311. /* Obsolete error codes - use the new ones, s'il vous plait / kudasai */
  3312. enum {
  3313. appearanceBadBrushIndexErr = themeInvalidBrushErr, /* pattern index invalid */
  3314. appearanceProcessRegisteredErr = themeProcessRegisteredErr,
  3315. appearanceProcessNotRegisteredErr = themeProcessNotRegisteredErr,
  3316. appearanceBadTextColorIndexErr = themeBadTextColorErr,
  3317. appearanceThemeHasNoAccents = themeHasNoAccentsErr,
  3318. appearanceBadCursorIndexErr = themeBadCursorIndexErr
  3319. };
  3320. enum {
  3321. kThemeActiveDialogBackgroundBrush = kThemeBrushDialogBackgroundActive,
  3322. kThemeInactiveDialogBackgroundBrush = kThemeBrushDialogBackgroundInactive,
  3323. kThemeActiveAlertBackgroundBrush = kThemeBrushAlertBackgroundActive,
  3324. kThemeInactiveAlertBackgroundBrush = kThemeBrushAlertBackgroundInactive,
  3325. kThemeActiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundActive,
  3326. kThemeInactiveModelessDialogBackgroundBrush = kThemeBrushModelessDialogBackgroundInactive,
  3327. kThemeActiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundActive,
  3328. kThemeInactiveUtilityWindowBackgroundBrush = kThemeBrushUtilityWindowBackgroundInactive,
  3329. kThemeListViewSortColumnBackgroundBrush = kThemeBrushListViewSortColumnBackground,
  3330. kThemeListViewBackgroundBrush = kThemeBrushListViewBackground,
  3331. kThemeIconLabelBackgroundBrush = kThemeBrushIconLabelBackground,
  3332. kThemeListViewSeparatorBrush = kThemeBrushListViewSeparator,
  3333. kThemeChasingArrowsBrush = kThemeBrushChasingArrows,
  3334. kThemeDragHiliteBrush = kThemeBrushDragHilite,
  3335. kThemeDocumentWindowBackgroundBrush = kThemeBrushDocumentWindowBackground,
  3336. kThemeFinderWindowBackgroundBrush = kThemeBrushFinderWindowBackground
  3337. };
  3338. enum {
  3339. kThemeActiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterActive,
  3340. kThemeInactiveScrollBarDelimiterBrush = kThemeBrushScrollBarDelimiterInactive,
  3341. kThemeFocusHighlightBrush = kThemeBrushFocusHighlight,
  3342. kThemeActivePopupArrowBrush = kThemeBrushPopupArrowActive,
  3343. kThemePressedPopupArrowBrush = kThemeBrushPopupArrowPressed,
  3344. kThemeInactivePopupArrowBrush = kThemeBrushPopupArrowInactive,
  3345. kThemeAppleGuideCoachmarkBrush = kThemeBrushAppleGuideCoachmark
  3346. };
  3347. enum {
  3348. kThemeActiveDialogTextColor = kThemeTextColorDialogActive,
  3349. kThemeInactiveDialogTextColor = kThemeTextColorDialogInactive,
  3350. kThemeActiveAlertTextColor = kThemeTextColorAlertActive,
  3351. kThemeInactiveAlertTextColor = kThemeTextColorAlertInactive,
  3352. kThemeActiveModelessDialogTextColor = kThemeTextColorModelessDialogActive,
  3353. kThemeInactiveModelessDialogTextColor = kThemeTextColorModelessDialogInactive,
  3354. kThemeActiveWindowHeaderTextColor = kThemeTextColorWindowHeaderActive,
  3355. kThemeInactiveWindowHeaderTextColor = kThemeTextColorWindowHeaderInactive,
  3356. kThemeActivePlacardTextColor = kThemeTextColorPlacardActive,
  3357. kThemeInactivePlacardTextColor = kThemeTextColorPlacardInactive,
  3358. kThemePressedPlacardTextColor = kThemeTextColorPlacardPressed,
  3359. kThemeActivePushButtonTextColor = kThemeTextColorPushButtonActive,
  3360. kThemeInactivePushButtonTextColor = kThemeTextColorPushButtonInactive,
  3361. kThemePressedPushButtonTextColor = kThemeTextColorPushButtonPressed,
  3362. kThemeActiveBevelButtonTextColor = kThemeTextColorBevelButtonActive,
  3363. kThemeInactiveBevelButtonTextColor = kThemeTextColorBevelButtonInactive,
  3364. kThemePressedBevelButtonTextColor = kThemeTextColorBevelButtonPressed,
  3365. kThemeActivePopupButtonTextColor = kThemeTextColorPopupButtonActive,
  3366. kThemeInactivePopupButtonTextColor = kThemeTextColorPopupButtonInactive,
  3367. kThemePressedPopupButtonTextColor = kThemeTextColorPopupButtonPressed,
  3368. kThemeIconLabelTextColor = kThemeTextColorIconLabel,
  3369. kThemeListViewTextColor = kThemeTextColorListView
  3370. };
  3371. enum {
  3372. kThemeActiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleActive,
  3373. kThemeInactiveDocumentWindowTitleTextColor = kThemeTextColorDocumentWindowTitleInactive,
  3374. kThemeActiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleActive,
  3375. kThemeInactiveMovableModalWindowTitleTextColor = kThemeTextColorMovableModalWindowTitleInactive,
  3376. kThemeActiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleActive,
  3377. kThemeInactiveUtilityWindowTitleTextColor = kThemeTextColorUtilityWindowTitleInactive,
  3378. kThemeActivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleActive,
  3379. kThemeInactivePopupWindowTitleColor = kThemeTextColorPopupWindowTitleInactive,
  3380. kThemeActiveRootMenuTextColor = kThemeTextColorRootMenuActive,
  3381. kThemeSelectedRootMenuTextColor = kThemeTextColorRootMenuSelected,
  3382. kThemeDisabledRootMenuTextColor = kThemeTextColorRootMenuDisabled,
  3383. kThemeActiveMenuItemTextColor = kThemeTextColorMenuItemActive,
  3384. kThemeSelectedMenuItemTextColor = kThemeTextColorMenuItemSelected,
  3385. kThemeDisabledMenuItemTextColor = kThemeTextColorMenuItemDisabled,
  3386. kThemeActivePopupLabelTextColor = kThemeTextColorPopupLabelActive,
  3387. kThemeInactivePopupLabelTextColor = kThemeTextColorPopupLabelInactive
  3388. };
  3389. enum {
  3390. kAEThemeSwitch = kAEAppearanceChanged /* Event ID's: Theme Switched */
  3391. };
  3392. enum {
  3393. kThemeNoAdornment = kThemeAdornmentNone,
  3394. kThemeDefaultAdornment = kThemeAdornmentDefault,
  3395. kThemeFocusAdornment = kThemeAdornmentFocus,
  3396. kThemeRightToLeftAdornment = kThemeAdornmentRightToLeft,
  3397. kThemeDrawIndicatorOnly = kThemeAdornmentDrawIndicatorOnly
  3398. };
  3399. enum {
  3400. kThemeBrushPassiveAreaFill = kThemeBrushStaticAreaFill
  3401. };
  3402. enum {
  3403. kThemeMetricCheckBoxGlyphHeight = kThemeMetricCheckBoxHeight,
  3404. kThemeMetricRadioButtonGlyphHeight = kThemeMetricRadioButtonHeight,
  3405. kThemeMetricDisclosureButtonSize = kThemeMetricDisclosureButtonHeight,
  3406. kThemeMetricBestListHeaderHeight = kThemeMetricListHeaderHeight,
  3407. kThemeMetricSmallProgressBarThickness = kThemeMetricNormalProgressBarThickness, /* obsolete */
  3408. kThemeMetricProgressBarThickness = kThemeMetricLargeProgressBarThickness /* obsolete */
  3409. };
  3410. enum {
  3411. kThemeScrollBar = kThemeMediumScrollBar,
  3412. kThemeSlider = kThemeMediumSlider,
  3413. kThemeProgressBar = kThemeMediumProgressBar,
  3414. kThemeIndeterminateBar = kThemeMediumIndeterminateBar
  3415. };
  3416. #if PRAGMA_STRUCT_ALIGN
  3417. #pragma options align=reset
  3418. #elif PRAGMA_STRUCT_PACKPUSH
  3419. #pragma pack(pop)
  3420. #elif PRAGMA_STRUCT_PACK
  3421. #pragma pack()
  3422. #endif
  3423. #ifdef PRAGMA_IMPORT_OFF
  3424. #pragma import off
  3425. #elif PRAGMA_IMPORT
  3426. #pragma import reset
  3427. #endif
  3428. #ifdef __cplusplus
  3429. }
  3430. #endif
  3431. #endif /* __APPEARANCE__ */