[DDK]: Merge 46183 from header-branch.
[reactos.git] / reactos / dll / cpl / desk / appearance.h
1
2 /* Some definitions for appearance page */
3 #define SIZE_BORDER_X 0
4 #define SIZE_BORDER_Y 1
5 #define SIZE_CAPTION_Y 2
6 #define SIZE_ICON_X 3
7 #define SIZE_ICON_Y 4
8 #define SIZE_ICON_SPC_X 5
9 #define SIZE_ICON_SPC_Y 6
10 #define SIZE_MENU_X 7
11 #define SIZE_MENU_Y 8
12 #define SIZE_SCROLL_X 9
13 #define SIZE_SCROLL_Y 10
14 #define SIZE_SMCAPTION_Y 11
15
16 #define FONT_CAPTION 0
17 #define FONT_SMCAPTION 1
18 #define FONT_HILIGHT 2
19 #define FONT_MENU 2
20 #define FONT_ICON 3
21 #define FONT_INFO 4
22 #define FONT_DIALOG 5
23
24 #define NUM_ELEMENTS 22
25 #define NUM_FONTS 6
26 #define NUM_SIZES 13
27 #define NUM_COLORS 31
28 #define MAX_TEMPLATES 50
29 #define MAX_COLORNAMELENGTH 30
30 #define MAX_TEMPLATENAMELENTGH 80
31
32 /* Some typedefs for appearance */
33
34 /* Most (but not all) fields below correspond to HKCU\Control Panel\Desktop\UserPreferencesMask */
35 typedef struct
36 {
37 BOOL bActiveWindowTracking;
38 BOOL bMenuAnimation;
39 BOOL bComboBoxAnimation;
40 BOOL bListBoxSmoothScrolling;
41 BOOL bGradientCaptions;
42 BOOL bKeyboardCues;
43 BOOL bActiveWndTrkZorder;
44 BOOL bHotTracking;
45 BOOL bMenuFade;
46 BOOL bSelectionFade;
47 BOOL bTooltipAnimation;
48 BOOL bTooltipFade;
49 BOOL bCursorShadow;
50 BOOL bUiEffects;
51 BOOL bFontSmoothing;
52 BOOL bDragFullWindows;
53 UINT uiFontSmoothingType;
54 } EFFECTS;
55
56 typedef struct
57 {
58 COLORREF crColor[NUM_COLORS];
59 LOGFONT lfFont[NUM_FONTS];
60 UINT64 Size[NUM_SIZES];
61 INT Id;
62 BOOL bFlatMenus;
63 BOOL bHasChanged;
64 BOOL bIsCustom;
65 EFFECTS Effects;
66 } THEME;
67
68 typedef struct
69 {
70 TCHAR strKeyName[4];
71 TCHAR strSizeName[4];
72 TCHAR strDisplayName[MAX_TEMPLATENAMELENTGH];
73 TCHAR strLegacyName[MAX_TEMPLATENAMELENTGH];
74 INT NumSizes;
75 } THEME_PRESET;
76
77 typedef struct
78 {
79 int Size;
80 int Size2;
81 int Color1;
82 int Color2;
83 int Font;
84 int FontColor;
85 } ASSIGNMENT;
86
87 /* This is the global structure used to store the current values.
88 A pointer of this get's passed to the functions either directly
89 or by passing hwnd and getting the pointer by GetWindowLongPtr */
90 typedef struct tagGLOBALS
91 {
92 THEME_PRESET ThemeTemplates[MAX_TEMPLATES];
93 THEME Theme;
94 THEME ThemeAdv;
95 INT ColorList[NUM_COLORS];
96 HBITMAP hbmpColor[3];
97 INT CurrentElement;
98 COLORREF crCOLOR_BTNFACE;
99 COLORREF crCOLOR_BTNSHADOW;
100 COLORREF crCOLOR_BTNTEXT;
101 COLORREF crCOLOR_BTNHIGHLIGHT;
102 HFONT hBoldFont;
103 HFONT hItalicFont;
104 } GLOBALS;
105
106
107 extern const ASSIGNMENT g_Assignment[NUM_ELEMENTS];
108 extern const TCHAR g_RegColorNames[NUM_COLORS][MAX_COLORNAMELENGTH];
109 extern const INT g_SizeMetric[NUM_SIZES];
110
111 /* prototypes for appearance.c */
112 INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
113
114 /* prototypes for advappdlg.c */
115 INT_PTR CALLBACK AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
116
117 /* prototypes for effappdlg.c */
118 INT_PTR CALLBACK EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);