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.

128 lines
3.0 KiB

  1. #define FONT_NONE -1
  2. #define FONT_CAPTION 0
  3. #define FONT_SMCAPTION 1
  4. #define FONT_MENU 2
  5. #define FONT_ICONTITLE 3
  6. #define FONT_STATUS 4
  7. #define FONT_MSGBOX 5
  8. #define NUM_FONTS 6
  9. typedef struct {
  10. HFONT hfont;
  11. LOGFONT lf;
  12. } LOOK_FONT;
  13. extern LOOK_FONT g_fonts[];
  14. #define COLOR_NONE -1
  15. extern COLORREF g_rgb[];
  16. extern HBRUSH g_brushes[];
  17. extern HPALETTE g_hpal3D;
  18. #define SIZE_NONE -1
  19. #define SIZE_FRAME 0
  20. #define SIZE_SCROLL 1
  21. #define SIZE_CAPTION 2
  22. #define SIZE_SMCAPTION 3
  23. #define SIZE_MENU 4
  24. #define SIZE_DXICON 5
  25. #define SIZE_DYICON 6
  26. #define SIZE_ICON 7
  27. #define SIZE_SMICON 8
  28. #define NUM_SIZES 9
  29. typedef struct {
  30. int CurSize;
  31. int MinSize;
  32. int MaxSize;
  33. } LOOK_SIZE;
  34. extern LOOK_SIZE g_sizes[];
  35. typedef struct {
  36. int iMainColor;
  37. int iSize;
  38. BOOL fLinkSizeToFont;
  39. int iTextColor;
  40. int iFont;
  41. int iResId; // id of name in resource (or -1 if duplicate)
  42. int iBaseElement; // index of element that this overlaps (or -1)
  43. int iGradientColor; // index of element for Gradient Caption Bar (or -1)
  44. RECT rc;
  45. } LOOK_ELEMENT;
  46. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  47. //this order has to match the array order in lookdlg.c
  48. //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  49. enum _ELEMENTS {
  50. ELEMENT_APPSPACE = 0,
  51. ELEMENT_DESKTOP,
  52. ELEMENT_INACTIVEBORDER,
  53. ELEMENT_ACTIVEBORDER,
  54. ELEMENT_INACTIVECAPTION,
  55. ELEMENT_INACTIVESYSBUT1,
  56. ELEMENT_INACTIVESYSBUT2,
  57. ELEMENT_ACTIVECAPTION,
  58. ELEMENT_ACTIVESYSBUT1,
  59. ELEMENT_ACTIVESYSBUT2,
  60. ELEMENT_MENUNORMAL,
  61. ELEMENT_MENUSELECTED,
  62. ELEMENT_MENUDISABLED,
  63. ELEMENT_WINDOW,
  64. ELEMENT_MSGBOX,
  65. ELEMENT_MSGBOXCAPTION,
  66. ELEMENT_MSGBOXSYSBUT,
  67. ELEMENT_SCROLLBAR,
  68. ELEMENT_SCROLLUP,
  69. ELEMENT_SCROLLDOWN,
  70. ELEMENT_BUTTON,
  71. ELEMENT_SMCAPTION,
  72. ELEMENT_ICON,
  73. ELEMENT_ICONHORZSPACING,
  74. ELEMENT_ICONVERTSPACING,
  75. ELEMENT_INFO
  76. };
  77. // BOGUS: need to get a size from somewhere
  78. #define NUM_ELEMENTS ELEMENT_INFO+1
  79. #if 0
  80. // go fix lookdlg.c if you decide to add this back in
  81. ELEMENT_SMICON,
  82. #endif
  83. #define CPI_VGAONLY 0x0001
  84. #define CPI_PALETTEOK 0x0002
  85. typedef struct {
  86. HWND hwndParent; // parent for any modal dialogs (choosecolor et al)
  87. HWND hwndOwner; // control that owns mini color picker
  88. COLORREF rgb;
  89. UINT flags;
  90. HPALETTE hpal;
  91. } COLORPICK_INFO, FAR * LPCOLORPICK_INFO;
  92. #define WM_RECREATEBITMAP (WM_USER)
  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 LookPrev_Recalc(HWND hwnd);
  100. void FAR PASCAL LookPrev_Repaint(HWND hwnd);
  101. void FAR PASCAL Look_SelectElement(HWND hDlg, int iElement, DWORD dwFlag);
  102. BOOL WINAPI ChooseColorMini(LPCOLORPICK_INFO lpcpi);
  103. DWORD FAR PASCAL DarkenColor(DWORD rgb, int n);
  104. DWORD FAR PASCAL BrightenColor(DWORD rgb, int n);
  105. DWORD FAR PASCAL AdjustLuma(DWORD rgb, int n, BOOL fScale);
  106. #define LF32toLF(lplf32, lplf) (*(lplf) = *(lplf32))
  107. #define LFtoLF32(lplf, lplf32) (*(lplf32) = *(lplf))