ReactOS 0.4.15-dev-5666-gc548b97
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 */
35typedef struct
36{
55} EFFECTS;
56
57typedef struct
58{
59 NONCLIENTMETRICSW ncMetrics;
60 ICONMETRICSW icMetrics;
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 */
79typedef struct _THEME_STYLE
80{
86
87typedef struct _THEME
88{
95
96typedef 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 */
109typedef 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
133
134/* prototypes for theme.c */
138PTHEME LoadTheme(IN LPCWSTR pszThemeFileName,IN LPCWSTR pszThemeName);
140BOOL FindOrAppendTheme(IN PTHEME pThemeList, IN LPCWSTR pwszThemeFileName, IN LPCWSTR pwszColorBuff, IN LPCWSTR pwszSizeBuff, OUT PTHEME_SELECTION pSelectedTheme);
141BOOL GetActiveTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme);
148void CleanupThemes(IN PTHEME pThemeList);
151
152/* prototypes for appearance.c */
154
155/* prototypes for advappdlg.c */
157
158/* prototypes for effappdlg.c */
PLOGFONTW SchemeGetFont(COLOR_SCHEME *scheme, int id)
BOOL LoadSchemeFromReg(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
struct _THEME_SELECTION * PTHEME_SELECTION
int SchemeGetMetric(COLOR_SCHEME *scheme, int id)
PTHEME LoadTheme(IN LPCWSTR pszThemeFileName, IN LPCWSTR pszThemeName)
Definition: theme.c:707
struct _THEME_STYLE * PTHEME_STYLE
void CleanupThemes(IN PTHEME pThemeList)
Definition: theme.c:527
struct tagGLOBALS GLOBALS
BOOL FindOrAppendTheme(IN PTHEME pThemeList, IN LPCWSTR pwszThemeFileName, IN LPCWSTR pwszColorBuff, IN LPCWSTR pwszSizeBuff, OUT PTHEME_SELECTION pSelectedTheme)
Definition: theme.c:791
#define NUM_COLORS
Definition: appearance.h:28
INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: appearance.c:216
struct _THEME THEME
BOOL LoadSchemeFromTheme(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
BOOL DrawThemePreview(HDC hdcMem, PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme, PRECT prcWindow)
BOOL GetActiveClassicTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme)
struct COLOR_SCHEME * PCOLOR_SCHEME
VOID ApplyScheme(PCOLOR_SCHEME scheme, PTHEME_SELECTION pSelectedTheme)
struct _THEME_SELECTION THEME_SELECTION
struct _THEME * PTHEME
BOOL ActivateThemeFile(LPCWSTR pwszFile)
Definition: theme.c:1014
INT_PTR CALLBACK AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: advappdlg.c:504
struct _THEME_STYLE THEME_STYLE
PTHEME LoadThemes(VOID)
Definition: theme.c:749
BOOL ActivateTheme(PTHEME_SELECTION pSelectedTheme)
BOOL GetActiveTheme(PTHEME pThemeList, PTHEME_SELECTION pSelectedTheme)
INT_PTR CALLBACK EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: effappdlg.c:130
VOID SchemeSetMetric(COLOR_SCHEME *scheme, int id, int value)
BOOL LoadCurrentScheme(PCOLOR_SCHEME scheme)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:92
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
DWORD scheme
BOOL bFlatMenus
Definition: appearance.h:63
ICONMETRICSW icMetrics
Definition: appearance.h:60
NONCLIENTMETRICSW ncMetrics
Definition: appearance.h:59
EFFECTS Effects
Definition: appearance.h:64
BOOL bComboBoxAnimation
Definition: appearance.h:39
BOOL bDropShadow
Definition: appearance.h:50
BOOL bGradientCaptions
Definition: appearance.h:41
BOOL bActiveWndTrkZorder
Definition: appearance.h:43
BOOL bUiEffects
Definition: appearance.h:51
UINT uiFontSmoothingType
Definition: appearance.h:53
BOOL bMenuAnimation
Definition: appearance.h:38
BOOL bHotTracking
Definition: appearance.h:44
BOOL bCursorShadow
Definition: appearance.h:49
BOOL bDragFullWindows
Definition: appearance.h:54
BOOL bKeyboardCues
Definition: appearance.h:42
BOOL bMenuFade
Definition: appearance.h:45
BOOL bListBoxSmoothScrolling
Definition: appearance.h:40
BOOL bTooltipAnimation
Definition: appearance.h:47
BOOL bSelectionFade
Definition: appearance.h:46
BOOL bActiveWindowTracking
Definition: appearance.h:37
BOOL bFontSmoothing
Definition: appearance.h:52
BOOL bTooltipFade
Definition: appearance.h:48
PTHEME_STYLE Color
Definition: appearance.h:100
PTHEME_STYLE Size
Definition: appearance.h:101
struct _THEME_STYLE * ChildStyle
Definition: appearance.h:82
PWSTR StyleName
Definition: appearance.h:83
struct _THEME_STYLE * NextStyle
Definition: appearance.h:81
PWSTR DisplayName
Definition: appearance.h:84
THEME_STYLE * SizesList
Definition: appearance.h:93
THEME_STYLE * ColoursList
Definition: appearance.h:92
PWSTR ThemeFileName
Definition: appearance.h:90
struct _THEME * NextTheme
Definition: appearance.h:89
PWSTR DisplayName
Definition: appearance.h:91
PTHEME pThemes
Definition: appearance.h:111
BOOL bInitializing
Definition: appearance.h:128
HBITMAP hbmpColor[3]
Definition: appearance.h:124
INT CurrentElement
Definition: appearance.h:125
COLOR_SCHEME SchemeAdv
Definition: appearance.h:121
THEME_SELECTION ClassicTheme
Definition: appearance.h:117
BOOL bThemeChanged
Definition: appearance.h:122
HBITMAP hbmpThemePreview
Definition: appearance.h:130
HDC hdcThemePreview
Definition: appearance.h:131
BOOL bSchemeChanged
Definition: appearance.h:123
HFONT hItalicFont
Definition: appearance.h:127
THEME_SELECTION ActiveTheme
Definition: appearance.h:118
COLOR_SCHEME Scheme
Definition: appearance.h:120
HFONT hBoldFont
Definition: appearance.h:126
uint16_t * PWSTR
Definition: typedefs.h:56
int32_t INT_PTR
Definition: typedefs.h:64
int32_t INT
Definition: typedefs.h:58
#define IN
Definition: typedefs.h:39
#define OUT
Definition: typedefs.h:40
Definition: pdh_main.c:94
HDC hdcMem
Definition: welcome.c:104
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
DWORD COLORREF
Definition: windef.h:300
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185