Source code of Windows XP (NT5)
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.

141 lines
3.5 KiB

  1. //Copyright (c) 1997-2000 Microsoft Corporation
  2. #define FONT_NONE -1
  3. #define FONT_CAPTION 0
  4. #define FONT_SMCAPTION 1
  5. #define FONT_MENU 2
  6. #define FONT_ICONTITLE 3
  7. #define FONT_STATUS 4
  8. #define FONT_MSGBOX 5
  9. #define NUM_FONTS 6
  10. typedef struct {
  11. HFONT hfont;
  12. LOGFONT lf;
  13. } LOOK_FONT;
  14. extern LOOK_FONT g_fonts[];
  15. #define COLOR_NONE -1
  16. extern HBRUSH g_brushes[];
  17. extern HPALETTE g_hpal3D;
  18. extern BOOL g_bPalette;
  19. #define SIZE_NONE -1
  20. #define SIZE_FRAME 0
  21. #define SIZE_SCROLL 1
  22. #define SIZE_CAPTION 2
  23. #define SIZE_SMCAPTION 3
  24. #define SIZE_MENU 4
  25. #define SIZE_DXICON 5
  26. #define SIZE_DYICON 6
  27. #define SIZE_ICON 7
  28. #define SIZE_SMICON 8
  29. #define NUM_SIZES 9
  30. typedef struct {
  31. int CurSize;
  32. int MinSize;
  33. int MaxSize;
  34. } LOOK_SIZE;
  35. extern LOOK_SIZE g_sizes[];
  36. typedef struct {
  37. int iMainColor;
  38. int iSize;
  39. BOOL fLinkSizeToFont;
  40. int iTextColor;
  41. int iFont;
  42. int iResId; // id of name in resource (or -1 if duplicate)
  43. int iBaseElement; // index of element that this overlaps (or -1)
  44. RECT rc;
  45. int iGradColor;
  46. } LOOK_ELEMENT;
  47. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  48. //this order has to match the array order in lookdlg.c
  49. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  50. enum _ELEMENTS {
  51. ELEMENT_APPSPACE = 0,
  52. ELEMENT_DESKTOP,
  53. ELEMENT_INACTIVEBORDER,
  54. ELEMENT_ACTIVEBORDER,
  55. ELEMENT_INACTIVECAPTION,
  56. ELEMENT_INACTIVESYSBUT1,
  57. ELEMENT_INACTIVESYSBUT2,
  58. ELEMENT_ACTIVECAPTION,
  59. ELEMENT_ACTIVESYSBUT1,
  60. ELEMENT_ACTIVESYSBUT2,
  61. ELEMENT_MENUNORMAL,
  62. ELEMENT_MENUSELECTED,
  63. ELEMENT_MENUDISABLED,
  64. ELEMENT_WINDOW,
  65. ELEMENT_MSGBOX,
  66. ELEMENT_MSGBOXCAPTION,
  67. ELEMENT_MSGBOXSYSBUT,
  68. ELEMENT_SCROLLBAR,
  69. ELEMENT_SCROLLUP,
  70. ELEMENT_SCROLLDOWN,
  71. ELEMENT_BUTTON,
  72. ELEMENT_SMCAPTION,
  73. ELEMENT_ICON,
  74. ELEMENT_ICONHORZSPACING,
  75. ELEMENT_ICONVERTSPACING,
  76. ELEMENT_INFO
  77. };
  78. // BOGUS: need to get a size from somewhere
  79. #define NUM_ELEMENTS ELEMENT_INFO+1
  80. #if 0
  81. // go fix lookdlg.c if you decide to add this back in
  82. ELEMENT_SMICON,
  83. #endif
  84. #define CPI_VGAONLY 0x0001
  85. #define CPI_PALETTEOK 0x0002
  86. typedef struct {
  87. HWND hwndParent; // parent for any modal dialogs (choosecolor et al)
  88. HWND hwndOwner; // control that owns mini color picker
  89. COLORREF rgb;
  90. UINT flags;
  91. HPALETTE hpal;
  92. } COLORPICK_INFO, FAR * LPCOLORPICK_INFO;
  93. extern int cyBorder;
  94. extern int cxBorder;
  95. extern int cyEdge;
  96. extern int cxEdge;
  97. // NOTE: the order in g_elements must match the enum order above
  98. extern LOOK_ELEMENT g_elements[];
  99. void FAR PASCAL Look_SelectElement(HWND hDlg, int iElement, DWORD dwFlags);
  100. BOOL WINAPI ChooseColorMini(LPCOLORPICK_INFO lpcpi);
  101. DWORD FAR PASCAL DarkenColor(DWORD rgb, int n);
  102. DWORD FAR PASCAL BrightenColor(DWORD rgb, int n);
  103. #define LF32toLF(lplf32, lplf) (*(lplf) = *(lplf32))
  104. #define LFtoLF32(lplf, lplf32) (*(lplf32) = *(lplf))
  105. // HACK - REMOVE THESE
  106. extern int g_LogDPI; // logical resolution of display
  107. extern HPALETTE g_hpalVGA; // only exist if palette device
  108. void GetMyNonClientMetrics(LPNONCLIENTMETRICS lpncm);
  109. void SetMyNonClientMetrics(LPNONCLIENTMETRICS lpncm);
  110. void PASCAL Look_RebuildSysStuff(BOOL fInit);
  111. #if(WINVER >= 0x0501)
  112. #define NT40_COLOR_ENDCOLORS COLOR_ENDCOLORS
  113. #else
  114. #define NT40_COLOR_ENDCOLORS COLOR_GRADIENTINACTIVECAPTION
  115. #endif
  116. #define NT40_COLOR_MAX (NT40_COLOR_ENDCOLORS+1)
  117. #define NT40_COLOR_MAX_REAL (COLOR_INFOBK + 1)
  118. extern const TCHAR c_szRegPathUserMetrics[];
  119. extern const TCHAR c_szRegValIconSize[];
  120. extern const TCHAR c_szRegValSmallIconSize[];