Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenappearance.h
Go to the documentation of this file.
00001 /* Some definitions for theme */ 00002 #define SIZE_BORDER_X 0 00003 #define SIZE_BORDER_Y 1 00004 #define SIZE_CAPTION_Y 2 00005 #define SIZE_ICON_X 3 00006 #define SIZE_ICON_Y 4 00007 #define SIZE_ICON_SPC_X 5 00008 #define SIZE_ICON_SPC_Y 6 00009 #define SIZE_MENU_SIZE_X 7 00010 #define SIZE_MENU_Y 8 00011 #define SIZE_SCROLL_X 9 00012 #define SIZE_SCROLL_Y 10 00013 #define SIZE_SMCAPTION_Y 11 00014 #define SIZE_EDGE_X 12 00015 #define SIZE_EDGE_Y 13 00016 #define SIZE_FRAME_Y 14 00017 #define SIZE_MENU_CHECK_X 15 00018 #define SIZE_MENU_CHECK_Y 16 00019 #define SIZE_MENU_SIZE_Y 17 00020 #define SIZE_SIZE_X 18 00021 #define SIZE_SIZE_Y 19 00022 00023 #define FONT_CAPTION 0 00024 #define FONT_SMCAPTION 1 00025 #define FONT_HILIGHT 2 00026 #define FONT_MENU 2 00027 #define FONT_ICON 3 00028 #define FONT_INFO 4 00029 #define FONT_DIALOG 5 00030 00031 #define NUM_ELEMENTS 22 00032 #define NUM_FONTS 6 00033 #define NUM_SIZES 20 00034 #define NUM_COLORS 31 00035 #define MAX_TEMPLATES 50 00036 #define MAX_TEMPLATENAMELENTGH 80 00037 00038 /* Some typedefs for theme */ 00039 00040 /* Most (but not all) fields below correspond to HKCU\Control Panel\Desktop\UserPreferencesMask */ 00041 typedef struct 00042 { 00043 BOOL bActiveWindowTracking; 00044 BOOL bMenuAnimation; 00045 BOOL bComboBoxAnimation; 00046 BOOL bListBoxSmoothScrolling; 00047 BOOL bGradientCaptions; 00048 BOOL bKeyboardCues; 00049 BOOL bActiveWndTrkZorder; 00050 BOOL bHotTracking; 00051 BOOL bMenuFade; 00052 BOOL bSelectionFade; 00053 BOOL bTooltipAnimation; 00054 BOOL bTooltipFade; 00055 BOOL bCursorShadow; 00056 BOOL bUiEffects; 00057 BOOL bFontSmoothing; 00058 BOOL bDragFullWindows; 00059 UINT uiFontSmoothingType; 00060 } EFFECTS; 00061 00062 typedef struct 00063 { 00064 COLORREF crColor[NUM_COLORS]; 00065 LOGFONT lfFont[NUM_FONTS]; 00066 INT Size[NUM_SIZES]; 00067 BOOL bFlatMenus; 00068 EFFECTS Effects; 00069 } COLOR_SCHEME; 00070 00071 typedef struct 00072 { 00073 TCHAR strKeyName[4]; 00074 TCHAR strSizeName[4]; 00075 TCHAR strDisplayName[MAX_TEMPLATENAMELENTGH]; 00076 TCHAR strLegacyName[MAX_TEMPLATENAMELENTGH]; 00077 } SCHEME_PRESET; 00078 00079 /* struct for holding theme colors and sizes */ 00080 typedef struct _THEME_STYLE 00081 { 00082 WCHAR* StlyeName; 00083 WCHAR* DisplayName; 00084 } THEME_STYLE, *PTHEME_STYLE; 00085 00086 typedef struct _THEME 00087 { 00088 WCHAR* themeFileName; 00089 WCHAR* displayName; 00090 HDSA Colors; 00091 int ColorsCount; 00092 HDSA Sizes; 00093 int SizesCount; 00094 00095 } THEME, *PTHEME; 00096 00097 /* This is the global structure used to store the current values. 00098 A pointer of this get's passed to the functions either directly 00099 or by passing hwnd and getting the pointer by GetWindowLongPtr */ 00100 typedef struct tagGLOBALS 00101 { 00102 HDSA Themes; 00103 int ThemesCount; 00104 BOOL bThemeActive; 00105 00106 INT ThemeId; 00107 INT SchemeId; /* Theme is customized if SchemeId == -1 */ 00108 INT SizeID; 00109 TCHAR strSelectedStyle[4]; 00110 00111 LPWSTR pszThemeFileName; 00112 LPWSTR pszColorName; 00113 LPWSTR pszSizeName; 00114 00115 COLOR_SCHEME Scheme; 00116 COLOR_SCHEME SchemeAdv; 00117 BOOL bThemeChanged; 00118 BOOL bSchemeChanged; 00119 HBITMAP hbmpColor[3]; 00120 INT CurrentElement; 00121 HFONT hBoldFont; 00122 HFONT hItalicFont; 00123 BOOL bInitializing; 00124 } GLOBALS; 00125 00126 extern SCHEME_PRESET g_ColorSchemes[MAX_TEMPLATES]; 00127 extern INT g_TemplateCount; 00128 00129 /* prototypes for theme.c */ 00130 VOID LoadCurrentScheme(COLOR_SCHEME* scheme); 00131 BOOL LoadSchemeFromReg(COLOR_SCHEME* scheme, INT SchemeId); 00132 VOID ApplyScheme(COLOR_SCHEME* scheme, INT SchemeId); 00133 BOOL SaveScheme(COLOR_SCHEME* scheme, LPCTSTR strLegacyName); 00134 INT LoadSchemePresetEntries(LPTSTR pszSelectedStyle); 00135 VOID LoadThemes(GLOBALS *g); 00136 HRESULT ActivateTheme(PTHEME pTheme, int iColor, int iSize); 00137 void CleanupThemes(GLOBALS *g); 00138 00139 /* prototypes for appearance.c */ 00140 INT_PTR CALLBACK AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 00141 00142 /* prototypes for advappdlg.c */ 00143 INT_PTR CALLBACK AdvAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); 00144 00145 /* prototypes for effappdlg.c */ 00146 INT_PTR CALLBACK EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); Generated on Sat May 26 2012 04:19:42 for ReactOS by
1.7.6.1
|