Sync with trunk (48237)
[reactos.git] / dll / cpl / desk / theme.h
1 /* Some definitions for theme */
2 #define SIZE_BORDER_X 0
3 #define SIZE_BORDER_Y 1
4 #define SIZE_CAPTION_Y 2
5 #define SIZE_ICON_X 3
6 #define SIZE_ICON_Y 4
7 #define SIZE_ICON_SPC_X 5
8 #define SIZE_ICON_SPC_Y 6
9 #define SIZE_MENU_SIZE_X 7
10 #define SIZE_MENU_Y 8
11 #define SIZE_SCROLL_X 9
12 #define SIZE_SCROLL_Y 10
13 #define SIZE_SMCAPTION_Y 11
14 #define SIZE_EDGE_X 12
15 #define SIZE_EDGE_Y 13
16 #define SIZE_FRAME_Y 14
17 #define SIZE_MENU_CHECK_X 15
18 #define SIZE_MENU_CHECK_Y 16
19 #define SIZE_MENU_SIZE_Y 17
20 #define SIZE_SIZE_X 18
21 #define SIZE_SIZE_Y 19
22
23 #define FONT_CAPTION 0
24 #define FONT_SMCAPTION 1
25 #define FONT_HILIGHT 2
26 #define FONT_MENU 2
27 #define FONT_ICON 3
28 #define FONT_INFO 4
29 #define FONT_DIALOG 5
30
31 #define NUM_ELEMENTS 22
32 #define NUM_FONTS 6
33 #define NUM_SIZES 20
34 #define NUM_COLORS 31
35 #define MAX_TEMPLATES 50
36 #define MAX_COLORNAMELENGTH 30
37 #define MAX_TEMPLATENAMELENTGH 80
38
39 /* Some typedefs for theme */
40
41 /* Most (but not all) fields below correspond to HKCU\Control Panel\Desktop\UserPreferencesMask */
42 typedef struct
43 {
44 BOOL bActiveWindowTracking;
45 BOOL bMenuAnimation;
46 BOOL bComboBoxAnimation;
47 BOOL bListBoxSmoothScrolling;
48 BOOL bGradientCaptions;
49 BOOL bKeyboardCues;
50 BOOL bActiveWndTrkZorder;
51 BOOL bHotTracking;
52 BOOL bMenuFade;
53 BOOL bSelectionFade;
54 BOOL bTooltipAnimation;
55 BOOL bTooltipFade;
56 BOOL bCursorShadow;
57 BOOL bUiEffects;
58 BOOL bFontSmoothing;
59 BOOL bDragFullWindows;
60 UINT uiFontSmoothingType;
61 } EFFECTS;
62
63 typedef struct
64 {
65 COLORREF crColor[NUM_COLORS];
66 LOGFONT lfFont[NUM_FONTS];
67 UINT64 Size[NUM_SIZES];
68 BOOL bFlatMenus;
69 EFFECTS Effects;
70 } THEME;
71
72 typedef struct
73 {
74 TCHAR strKeyName[4];
75 TCHAR strSizeName[4];
76 TCHAR strDisplayName[MAX_TEMPLATENAMELENTGH];
77 TCHAR strLegacyName[MAX_TEMPLATENAMELENTGH];
78 } THEME_PRESET;
79
80 extern const TCHAR g_RegColorNames[NUM_COLORS][MAX_COLORNAMELENGTH];
81 extern const INT g_SizeMetric[NUM_SIZES];
82 extern THEME_PRESET g_ThemeTemplates[MAX_TEMPLATES];
83
84 /* prototypes for theme.c */
85 VOID LoadCurrentTheme(THEME* theme);
86 BOOL LoadThemeFromReg(THEME* theme, INT ThemeId);
87 VOID ApplyTheme(THEME* theme, INT ThemeId);
88 BOOL SaveTheme(THEME* theme, LPCTSTR strLegacyName);
89 INT LoadThemePresetEntries(LPTSTR pszSelectedStyle);