- Sync up Mm interface with WinLdr branch (introduce the concept of a memory type...
[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 typedef struct
34 {
35 COLORREF crColor[NUM_COLORS];
36 LOGFONT lfFont[NUM_FONTS];
37 UINT64 Size[NUM_SIZES];
38 BOOL bFlatMenus;
39 BOOL bHasChanged;
40 BOOL bIsCustom;
41 } THEME;
42
43 typedef struct
44 {
45 TCHAR strKeyName[4];
46 TCHAR strSizeName[4];
47 TCHAR strDisplayName[MAX_TEMPLATENAMELENTGH];
48 TCHAR strLegacyName[MAX_TEMPLATENAMELENTGH];
49 INT NumSizes;
50 } THEME_PRESET;
51
52 typedef struct
53 {
54 int Size;
55 int Size2;
56 int Color1;
57 int Color2;
58 int Font;
59 int FontColor;
60 } ASSIGNMENT;
61
62 /* This is the global structure used to store the current values.
63 A pointer of this get's passed to the functions either directly
64 or by passing hwnd and getting the pointer by GetWindowLongPtr */
65 typedef struct tagGLOBALS
66 {
67 THEME_PRESET ThemeTemplates[MAX_TEMPLATES];
68 THEME Theme;
69 THEME ThemeAdv;
70 INT ColorList[NUM_COLORS];
71 HBITMAP hbmpColor[3];
72 INT CurrentElement;
73 COLORREF crCOLOR_BTNFACE;
74 COLORREF crCOLOR_BTNSHADOW;
75 COLORREF crCOLOR_BTNTEXT;
76 COLORREF crCOLOR_BTNHIGHLIGHT;
77 HFONT hBoldFont;
78 HFONT hItalicFont;
79 } GLOBALS;
80
81
82 extern const ASSIGNMENT g_Assignment[NUM_ELEMENTS];
83 extern const TCHAR g_RegColorNames[NUM_COLORS][MAX_COLORNAMELENGTH];
84 extern const INT g_SizeMetric[NUM_SIZES];
85
86 /* prototypes for appearance.c */
87 INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
88
89 /* prototypes for advappearancedlg.c */
90 INT_PTR CALLBACK AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);