ReactOS  0.4.13-dev-544-gede3fdd
appearance.h
Go to the documentation of this file.
1 #pragma once
2 
3 /* Some definitions for theme */
4 #define SIZE_BORDER_WIDTH 0
5 #define SIZE_SCROLL_WIDTH 1
6 #define SIZE_SCROLL_HEIGHT 2
7 #define SIZE_CAPTION_WIDTH 3
8 #define SIZE_CAPTION_HEIGHT 4
9 #define SIZE_SM_CAPTION_WIDTH 5
10 #define SIZE_SM_CAPTION_HEIGHT 6
11 #define SIZE_MENU_WIDTH 7
12 #define SIZE_MENU_HEIGHT 8
13 
14 #define SIZE_ICON_SPACE_X 9
15 #define SIZE_ICON_SPACE_Y 10
16 #define SIZE_ICON 11
17 
18 #define FONT_CAPTION 0
19 #define FONT_SMCAPTION 1
20 #define FONT_MENU 2
21 #define FONT_STATUS 3
22 #define FONT_MESSAGE 4
23 #define FONT_ICON 5
24 
25 #define NUM_ELEMENTS 18
26 #define NUM_FONTS 6
27 #define NUM_SIZES 9
28 #define NUM_COLORS 31
29 #define MAX_TEMPLATES 50
30 #define MAX_TEMPLATENAMELENTGH 80
31 
32 /* Some typedefs for theme */
33 
34 /* Most (but not all) fields below correspond to HKCU\Control Panel\Desktop\UserPreferencesMask */
35 typedef struct
36 {
55 } EFFECTS;
56 
57 typedef struct
58 {
59  NONCLIENTMETRICSW ncMetrics;
60  ICONMETRICSW icMetrics;
61  COLORREF crColor[NUM_COLORS];
66 
67 /*
68  * The classic theme has several different 'colours' and every colour has
69  * several sizes. On visual styles however a theme has different colours
70  * and different sizes. In other words the user can select a combination
71  * of colour and size.
72  * That means that for the classic theme THEME.SizesList is unused and
73  * every color has some child styles that correspond its sizes.
74  * The themes for visual styles however will use both ColoursList and SizesList
75  * and ChildStyle will not be used.
76  */
77 
78 /* struct for holding theme colors and sizes */
79 typedef struct _THEME_STYLE
80 {
86 
87 typedef struct _THEME
88 {
89  struct _THEME *NextTheme;
94 } THEME, *PTHEME;
95 
96 typedef struct _THEME_SELECTION
97 {
103 
104 /*
105  * This is the global structure used to store the current values.
106  * A pointer of this get's passed to the functions either directly
107  * or by passing hwnd and getting the pointer by GetWindowLongPtr.
108  */
109 typedef struct tagGLOBALS
110 {
112 
113  /*
114  * Keep a copy of the selected classic theme in order to select this
115  * when user selects the classic theme (and not a horrible random theme )
116  */
119 
129 
132 } GLOBALS;
133 
134 /* prototypes for theme.c */
136 int SchemeGetMetric(COLOR_SCHEME *scheme, int id);
138 PTHEME LoadTheme(IN LPCWSTR pszThemeFileName,IN LPCWSTR pszThemeName);
140 BOOL FindOrAppendTheme(IN PTHEME pThemeList, IN LPCWSTR pwszThemeFileName, IN LPCWSTR pwszColorBuff, IN LPCWSTR pwszSizeBuff, OUT PTHEME_SELECTION pSelectedTheme);
141 BOOL GetActiveTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme);
142 BOOL GetActiveClassicTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme);
147 BOOL ActivateTheme(PTHEME_SELECTION pSelectedTheme);
148 void CleanupThemes(IN PTHEME pThemeList);
150 BOOL ActivateThemeFile(LPCWSTR pwszFile);
151 
152 /* prototypes for appearance.c */
154 
155 /* prototypes for advappdlg.c */
157 
158 /* prototypes for effappdlg.c */
BOOL ActivateTheme(PTHEME_SELECTION pSelectedTheme)
BOOL bMenuFade
Definition: appearance.h:45
NONCLIENTMETRICSW ncMetrics
Definition: appearance.h:59
INT_PTR CALLBACK EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: effappdlg.c:130
PTHEME_STYLE Size
Definition: appearance.h:101
BOOL LoadSchemeFromTheme(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
BOOL LoadSchemeFromReg(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
#define IN
Definition: typedefs.h:38
UINT uiFontSmoothingType
Definition: appearance.h:53
struct _THEME_SELECTION THEME_SELECTION
PWSTR StyleName
Definition: appearance.h:83
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL bDropShadow
Definition: appearance.h:50
BOOL ActivateThemeFile(LPCWSTR pwszFile)
Definition: theme.c:1014
BOOL bHotTracking
Definition: appearance.h:44
uint16_t * PWSTR
Definition: typedefs.h:54
BOOL bFontSmoothing
Definition: appearance.h:52
BOOL bGradientCaptions
Definition: appearance.h:41
BOOL bListBoxSmoothScrolling
Definition: appearance.h:40
INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: appearance.c:216
#define NUM_COLORS
Definition: appearance.h:28
static HDC
Definition: imagelist.c:92
#define CALLBACK
Definition: compat.h:27
BOOL bSelectionFade
Definition: appearance.h:46
DWORD scheme
PTHEME pThemes
Definition: appearance.h:111
struct _THEME_STYLE * NextStyle
Definition: appearance.h:81
struct tagGLOBALS GLOBALS
PTHEME LoadTheme(IN LPCWSTR pszThemeFileName, IN LPCWSTR pszThemeName)
Definition: theme.c:707
UINT_PTR WPARAM
Definition: windef.h:207
THEME_STYLE * SizesList
Definition: appearance.h:93
INT CurrentElement
Definition: appearance.h:125
int32_t INT_PTR
Definition: typedefs.h:62
HBITMAP hbmpThemePreview
Definition: appearance.h:130
PWSTR DisplayName
Definition: appearance.h:91
BOOL bComboBoxAnimation
Definition: appearance.h:39
int32_t INT
Definition: typedefs.h:56
EFFECTS Effects
Definition: appearance.h:64
WPARAM wParam
Definition: combotst.c:138
int SchemeGetMetric(COLOR_SCHEME *scheme, int id)
void CleanupThemes(IN PTHEME pThemeList)
Definition: theme.c:527
THEME_SELECTION ActiveTheme
Definition: appearance.h:118
INT_PTR CALLBACK AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advappdlg.c:504
PTHEME LoadThemes(VOID)
Definition: theme.c:749
BOOL bActiveWndTrkZorder
Definition: appearance.h:43
PWSTR DisplayName
Definition: appearance.h:84
unsigned int BOOL
Definition: ntddk_ex.h:94
ICONMETRICSW icMetrics
Definition: appearance.h:60
BOOL DrawThemePreview(HDC hdcMem, PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme, PRECT prcWindow)
struct _THEME_STYLE * PTHEME_STYLE
BOOL bCursorShadow
Definition: appearance.h:49
COLOR_SCHEME SchemeAdv
Definition: appearance.h:121
BOOL bUiEffects
Definition: appearance.h:51
LONG_PTR LPARAM
Definition: windef.h:208
BOOL bSchemeChanged
Definition: appearance.h:123
BOOL bTooltipFade
Definition: appearance.h:48
DWORD COLORREF
Definition: windef.h:285
PTHEME_STYLE Color
Definition: appearance.h:100
BOOL GetActiveTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme)
VOID ApplyScheme(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
COLOR_SCHEME Scheme
Definition: appearance.h:120
struct COLOR_SCHEME * PCOLOR_SCHEME
THEME_STYLE * ColoursList
Definition: appearance.h:92
struct _THEME_STYLE * ChildStyle
Definition: appearance.h:82
struct _THEME * NextTheme
Definition: appearance.h:89
struct _THEME THEME
BOOL GetActiveClassicTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme)
BOOL bActiveWindowTracking
Definition: appearance.h:37
HBITMAP hbmpColor[3]
Definition: appearance.h:124
BOOL FindOrAppendTheme(IN PTHEME pThemeList, IN LPCWSTR pwszThemeFileName, IN LPCWSTR pwszColorBuff, IN LPCWSTR pwszSizeBuff, OUT PTHEME_SELECTION pSelectedTheme)
Definition: theme.c:791
BOOL bFlatMenus
Definition: appearance.h:63
BOOL LoadCurrentScheme(PCOLOR_SCHEME scheme)
HFONT hBoldFont
Definition: appearance.h:126
PLOGFONTW SchemeGetFont(COLOR_SCHEME *scheme, int id)
HDC hdcThemePreview
Definition: appearance.h:131
unsigned int UINT
Definition: ndis.h:50
THEME_SELECTION ClassicTheme
Definition: appearance.h:117
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
BOOL bDragFullWindows
Definition: appearance.h:54
#define OUT
Definition: typedefs.h:39
VOID SchemeSetMetric(COLOR_SCHEME *scheme, int id, int value)
BOOL bMenuAnimation
Definition: appearance.h:38
struct _THEME_STYLE THEME_STYLE
HFONT hItalicFont
Definition: appearance.h:127
static HBITMAP
Definition: button.c:44
BOOL bTooltipAnimation
Definition: appearance.h:47
BOOL bKeyboardCues
Definition: appearance.h:42
BOOL bInitializing
Definition: appearance.h:128
LPARAM lParam
Definition: combotst.c:139
BOOL bThemeChanged
Definition: appearance.h:122
struct _THEME * PTHEME
struct _THEME_SELECTION * PTHEME_SELECTION
PWSTR ThemeFileName
Definition: appearance.h:90
HDC hdcMem
Definition: welcome.c:104