ReactOS 0.4.16-dev-106-g10b08aa
system.c File Reference
#include "uxthemep.h"
#include <stdio.h>
#include <winreg.h>
#include <uxundoc.h>
Include dependency graph for system.c:

Go to the source code of this file.

Classes

struct  BackupSysParam
 

Macros

#define NUM_SYS_COLORS   (COLOR_MENUBAR+1)
 

Functions

static BOOL CALLBACK UXTHEME_send_theme_changed (HWND hWnd, LPARAM enable)
 
BOOL CALLBACK UXTHEME_broadcast_theme_changed (HWND hWnd, LPARAM enable)
 
static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue, LPVOID pvData)
 
static HRESULT UXTHEME_SetActiveTheme (PTHEME_FILE tf)
 
static BOOL bIsThemeActive (LPCWSTR pszTheme, LPCWSTR pszColor, LPCWSTR pszSize)
 
void UXTHEME_LoadTheme (BOOL bLoad)
 
static void save_sys_colors (HKEY baseKey)
 
static void UXTHEME_BackupSystemMetrics (void)
 
static void UXTHEME_RestoreSystemMetrics (void)
 
static void UXTHEME_SaveSystemMetrics (void)
 
static HRESULT UXTHEME_ApplyTheme (PTHEME_FILE tf)
 
void UXTHEME_InitSystem (HINSTANCE hInst)
 
BOOL WINAPI IsAppThemed (void)
 
BOOL WINAPI IsThemeActive (void)
 
HRESULT WINAPI EnableTheming (BOOL fEnable)
 
static HRESULT UXTHEME_SetWindowProperty (HWND hwnd, ATOM aProp, LPCWSTR pszValue)
 
static LPWSTR UXTHEME_GetWindowProperty (HWND hwnd, ATOM aProp, LPWSTR pszBuffer, int dwLen)
 
PTHEME_CLASS ValidateHandle (HTHEME hTheme)
 
static HTHEME WINAPI OpenThemeDataInternal (PTHEME_FILE ThemeFile, HWND hwnd, LPCWSTR pszClassList, DWORD flags)
 
HTHEME WINAPI OpenThemeDataEx (HWND hwnd, LPCWSTR pszClassList, DWORD flags)
 
HTHEME WINAPI OpenThemeDataFromFile (HTHEMEFILE hThemeFile, HWND hwnd, LPCWSTR pszClassList, DWORD flags)
 
HTHEME WINAPI OpenThemeData (HWND hwnd, LPCWSTR classlist)
 
HTHEME WINAPI GetWindowTheme (HWND hwnd)
 
HRESULT WINAPI SetWindowTheme (HWND hwnd, LPCWSTR pszSubAppName, LPCWSTR pszSubIdList)
 
HRESULT WINAPI GetCurrentThemeName (LPWSTR pszThemeFileName, int dwMaxNameChars, LPWSTR pszColorBuff, int cchMaxColorChars, LPWSTR pszSizeBuff, int cchMaxSizeChars)
 
DWORD WINAPI GetThemeAppProperties (void)
 
void WINAPI SetThemeAppProperties (DWORD dwFlags)
 
HRESULT WINAPI CloseThemeData (HTHEME hTheme)
 
HRESULT WINAPI HitTestThemeBackground (HTHEME hTheme, HDC hdc, int iPartId, int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn, POINT ptTest, WORD *pwHitTestCode)
 
BOOL WINAPI IsThemePartDefined (HTHEME hTheme, int iPartId, int iStateId)
 
HRESULT WINAPI GetThemeDocumentationProperty (LPCWSTR pszThemeName, LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars)
 
DWORD WINAPI QueryThemeServices (void)
 
HRESULT WINAPI OpenThemeFile (LPCWSTR pszThemeFileName, LPCWSTR pszColorName, LPCWSTR pszSizeName, HTHEMEFILE *hThemeFile, DWORD unknown)
 
HRESULT WINAPI CloseThemeFile (HTHEMEFILE hThemeFile)
 
HRESULT WINAPI ApplyTheme (HTHEMEFILE hThemeFile, char *unknown, HWND hWnd)
 
HRESULT WINAPI GetThemeDefaults (LPCWSTR pszThemeFileName, LPWSTR pszColorName, DWORD dwColorNameLen, LPWSTR pszSizeName, DWORD dwSizeNameLen)
 
HRESULT WINAPI EnumThemes (LPCWSTR pszThemePath, ENUMTHEMEPROC callback, LPVOID lpData)
 
HRESULT WINAPI EnumThemeColors (LPWSTR pszThemeFileName, LPWSTR pszSizeName, DWORD dwColorNum, PTHEMENAMES pszColorNames)
 
HRESULT WINAPI EnumThemeSizes (LPWSTR pszThemeFileName, LPWSTR pszColorName, DWORD dwSizeNum, PTHEMENAMES pszSizeNames)
 
HRESULT WINAPI ParseThemeIniFile (LPCWSTR pszIniFileName, LPWSTR pszUnknown, PARSETHEMEINIFILEPROC callback, LPVOID lpData)
 
HRESULT WINAPI CheckThemeSignature (LPCWSTR pszThemeFileName)
 

Variables

static const WCHAR szThemeManager []
 
static const WCHAR szThemeActive [] = {'T','h','e','m','e','A','c','t','i','v','e','\0'}
 
static const WCHAR szSizeName [] = {'S','i','z','e','N','a','m','e','\0'}
 
static const WCHAR szColorName [] = {'C','o','l','o','r','N','a','m','e','\0'}
 
static const WCHAR szDllName [] = {'D','l','l','N','a','m','e','\0'}
 
static const WCHAR szIniDocumentation [] = {'d','o','c','u','m','e','n','t','a','t','i','o','n','\0'}
 
HINSTANCE hDllInst
 
ATOM atDialogThemeEnabled
 
static DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS
 
ATOM atWindowTheme
 
static ATOM atSubAppName
 
static ATOM atSubIdList
 
ATOM atWndContext
 
PTHEME_FILE g_ActiveThemeFile
 
RTL_HANDLE_TABLE g_UxThemeHandleTable
 
int g_cHandles
 
static const char *const SysColorsNames []
 
static const WCHAR strColorKey []
 
static const WCHAR keyFlatMenus [] = { 'F','l','a','t','M','e','n','u', 0}
 
static const WCHAR keyGradientCaption []
 
static const WCHAR keyNonClientMetrics []
 
static const WCHAR keyIconTitleFont []
 
static const struct BackupSysParam backupSysParams []
 

Macro Definition Documentation

◆ NUM_SYS_COLORS

#define NUM_SYS_COLORS   (COLOR_MENUBAR+1)

Definition at line 314 of file system.c.

Function Documentation

◆ ApplyTheme()

HRESULT WINAPI ApplyTheme ( HTHEMEFILE  hThemeFile,
char unknown,
HWND  hWnd 
)

Definition at line 1158 of file system.c.

1159{
1160 HRESULT hr;
1161 TRACE("(%p,%s,%p)\n", hThemeFile, unknown, hWnd);
1162 hr = UXTHEME_ApplyTheme(hThemeFile);
1164 return hr;
1165}
HWND hWnd
Definition: settings.c:17
#define NULL
Definition: types.h:112
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1605
BOOL CALLBACK UXTHEME_broadcast_theme_changed(HWND hWnd, LPARAM enable)
Definition: system.c:68
PTHEME_FILE g_ActiveThemeFile
Definition: system.c:54
static HRESULT UXTHEME_ApplyTheme(PTHEME_FILE tf)
Definition: system.c:512
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by ActivateTheme().

◆ bIsThemeActive()

static BOOL bIsThemeActive ( LPCWSTR  pszTheme,
LPCWSTR  pszColor,
LPCWSTR  pszSize 
)
static

Definition at line 145 of file system.c.

146{
147 if (g_ActiveThemeFile == NULL)
148 return FALSE;
149
150 if (wcscmp(pszTheme, g_ActiveThemeFile->szThemeFile) != 0)
151 return FALSE;
152
153 if (!pszColor[0])
154 {
156 return FALSE;
157 }
158 else
159 {
160 if (wcscmp(pszColor, g_ActiveThemeFile->pszSelectedColor) != 0)
161 return FALSE;
162 }
163
164 if (!pszSize[0])
165 {
167 return FALSE;
168 }
169 else
170 {
171 if (wcscmp(pszSize, g_ActiveThemeFile->pszSelectedSize) != 0)
172 return FALSE;
173 }
174
175 return TRUE;
176}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
WCHAR szThemeFile[MAX_PATH]
Definition: uxthemep.h:81
LPWSTR pszAvailColors
Definition: uxthemep.h:82
LPWSTR pszSelectedSize
Definition: uxthemep.h:86
LPWSTR pszAvailSizes
Definition: uxthemep.h:83
LPWSTR pszSelectedColor
Definition: uxthemep.h:85

Referenced by UXTHEME_LoadTheme().

◆ CheckThemeSignature()

HRESULT WINAPI CheckThemeSignature ( LPCWSTR  pszThemeFileName)

Definition at line 1449 of file system.c.

1450{
1452 HRESULT hr;
1453 TRACE("(%s)\n", debugstr_w(pszThemeFileName));
1454
1456 return E_FAIL;
1457
1458 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, NULL, &pt);
1459 if(FAILED(hr))
1460 return hr;
1462 return S_OK;
1463}
#define E_FAIL
Definition: ddrawi.h:102
#define pt(x, y)
Definition: drawing.c:79
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
Definition: msstyles.c:179
HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWSTR pszSizeName, PTHEME_FILE *tf)
Definition: msstyles.c:54
BOOL g_bThemeHooksActive
Definition: themehooks.c:15

◆ CloseThemeData()

HRESULT WINAPI CloseThemeData ( HTHEME  hTheme)

Definition at line 950 of file system.c.

951{
952 PUXTHEME_HANDLE pHandle = hTheme;
953 HRESULT hr;
954
955 TRACE("(%p)\n", hTheme);
956
958 return E_HANDLE;
959
961 if (SUCCEEDED(hr))
962 {
964 g_cHandles--;
965 TRACE("Destroying handle 0x%x for class 0x%x. Count: %d\n", pHandle, pHandle->pClass, g_cHandles);
966 }
967 return hr;
968}
int g_cHandles
Definition: system.c:57
RTL_HANDLE_TABLE g_UxThemeHandleTable
Definition: system.c:56
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc)
Definition: msstyles.c:822
NTSYSAPI BOOLEAN NTAPI RtlFreeHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
NTSYSAPI BOOLEAN NTAPI RtlIsValidHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
Definition: rtltypes.h:1247
PTHEME_CLASS pClass
Definition: uxthemep.h:98
#define E_HANDLE
Definition: winerror.h:2850

Referenced by BUTTON_WindowProc(), CheckListWndProc(), COMBO_WindowProc(), DrawNCPreview(), EDIT_WindowProc(), EDIT_WM_NCDestroy(), GetNCCaptionTheme(), GetNCScrollbarTheme(), HEADER_Destroy(), HEADER_ThemeChanged(), IPADDRESS_Draw(), LISTBOX_Destroy(), LISTBOX_WindowProc(), LISTVIEW_Destroy(), LISTVIEW_ThemeChanged(), LoadSchemeFromTheme(), MONTHCAL_Destroy(), CTaskSwitchWnd::OnDestroy(), CTrayShowDesktopButton::OnDestroy(), CTrayClockWnd::OnThemeChanged(), CTrayNotifyWnd::OnThemeChanged(), CTaskSwitchWnd::OnThemeChanged(), CTrayShowDesktopButton::OnThemeChanged(), CTrayWindow::OnThemeChanged(), ProgressWindowProc(), REBAR_Destroy(), START_TEST(), STATUSBAR_WMDestroy(), TAB_Destroy(), test_CloseThemeData(), test_OpenThemeData(), theme_changed(), Theme_Start(), ThemeDestroyWndData(), ThemePreWindowProc(), THEMING_ScrollbarSubclassProc(), TOOLBAR_Destroy(), TRACKBAR_Destroy(), TREEVIEW_Destroy(), TREEVIEW_ThemeChanged(), UpDownWindowProc(), and CTrayWindow::~CTrayWindow().

◆ CloseThemeFile()

HRESULT WINAPI CloseThemeFile ( HTHEMEFILE  hThemeFile)

Definition at line 1127 of file system.c.

1128{
1129 TRACE("(%p)\n", hThemeFile);
1130 MSSTYLES_CloseThemeFile(hThemeFile);
1131 return S_OK;
1132}

Referenced by ActivateTheme().

◆ EnableTheming()

HRESULT WINAPI EnableTheming ( BOOL  fEnable)

Definition at line 642 of file system.c.

643{
644 HKEY hKey;
645 WCHAR szEnabled[] = {'0','\0'};
646
647 TRACE("(%d)\n", fEnable);
648
649 if (fEnable != (g_ActiveThemeFile != NULL)) {
650 if(fEnable)
652 else
655
656 if (fEnable) szEnabled[0] = '1';
658 RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (LPBYTE)szEnabled, sizeof(WCHAR));
660 }
662 }
663 return S_OK;
664}
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
static void UXTHEME_SaveSystemMetrics(void)
Definition: system.c:477
static const WCHAR szThemeManager[]
Definition: system.c:31
static void UXTHEME_RestoreSystemMetrics(void)
Definition: system.c:387
static const WCHAR szThemeActive[]
Definition: system.c:38
static void UXTHEME_BackupSystemMetrics(void)
Definition: system.c:343
FxAutoRegKey hKey
#define REG_SZ
Definition: layer.c:22
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_CURRENT_USER
Definition: winreg.h:11
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ EnumThemeColors()

HRESULT WINAPI EnumThemeColors ( LPWSTR  pszThemeFileName,
LPWSTR  pszSizeName,
DWORD  dwColorNum,
PTHEMENAMES  pszColorNames 
)

Definition at line 1310 of file system.c.

1312{
1314 HRESULT hr;
1315 LPWSTR tmp;
1316 UINT resourceId = dwColorNum + 1000;
1317 TRACE("(%s,%s,%d)\n", debugstr_w(pszThemeFileName),
1318 debugstr_w(pszSizeName), dwColorNum);
1319
1321 return E_FAIL;
1322
1323 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, pszSizeName, &pt);
1324 if(FAILED(hr)) return hr;
1325
1326 tmp = pt->pszAvailColors;
1327 while(dwColorNum && *tmp) {
1328 dwColorNum--;
1329 tmp += lstrlenW(tmp)+1;
1330 }
1331 if(!dwColorNum && *tmp) {
1332 TRACE("%s\n", debugstr_w(tmp));
1333 lstrcpyW(pszColorNames->szName, tmp);
1334 LoadStringW (pt->hTheme, resourceId,
1335 pszColorNames->szDisplayName,
1336 sizeof (pszColorNames->szDisplayName) / sizeof (WCHAR));
1337 LoadStringW (pt->hTheme, resourceId+1000,
1338 pszColorNames->szTooltip,
1339 sizeof (pszColorNames->szTooltip) / sizeof (WCHAR));
1340 }
1341 else
1343
1345 return hr;
1346}
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
unsigned int UINT
Definition: ndis.h:50
WCHAR szDisplayName[MAX_PATH+1]
Definition: uxundoc.h:53
WCHAR szName[MAX_PATH+1]
Definition: uxundoc.h:52
WCHAR szTooltip[MAX_PATH+1]
Definition: uxundoc.h:54
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by LoadTheme().

◆ EnumThemes()

HRESULT WINAPI EnumThemes ( LPCWSTR  pszThemePath,
ENUMTHEMEPROC  callback,
LPVOID  lpData 
)

Definition at line 1221 of file system.c.

1223{
1224 WCHAR szDir[MAX_PATH];
1226 static const WCHAR szStar[] = {'*','.','*','\0'};
1227 static const WCHAR szFormat[] = {'%','s','%','s','\\','%','s','.','m','s','s','t','y','l','e','s','\0'};
1228 static const WCHAR szDisplayName[] = {'d','i','s','p','l','a','y','n','a','m','e','\0'};
1229 static const WCHAR szTooltip[] = {'t','o','o','l','t','i','p','\0'};
1230 WCHAR szName[60];
1231 WCHAR szTip[60];
1232 HANDLE hFind;
1233 WIN32_FIND_DATAW wfd;
1234 HRESULT hr;
1235 size_t pathLen;
1236
1237 TRACE("(%s,%p,%p)\n", debugstr_w(pszThemePath), callback, lpData);
1238
1239 if(!pszThemePath || !callback)
1240 return E_POINTER;
1241
1242 lstrcpyW(szDir, pszThemePath);
1243 pathLen = lstrlenW (szDir);
1244 if ((pathLen > 0) && (pathLen < MAX_PATH-1) && (szDir[pathLen - 1] != '\\'))
1245 {
1246 szDir[pathLen] = '\\';
1247 szDir[pathLen+1] = 0;
1248 }
1249
1250 lstrcpyW(szPath, szDir);
1251 lstrcatW(szPath, szStar);
1252 TRACE("searching %s\n", debugstr_w(szPath));
1253
1254 hFind = FindFirstFileW(szPath, &wfd);
1255 if(hFind != INVALID_HANDLE_VALUE) {
1256 do {
1257 if(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY
1258 && !(wfd.cFileName[0] == '.' && ((wfd.cFileName[1] == '.' && wfd.cFileName[2] == 0) || wfd.cFileName[1] == 0))) {
1259 wsprintfW(szPath, szFormat, szDir, wfd.cFileName, wfd.cFileName);
1260
1261 hr = GetThemeDocumentationProperty(szPath, szDisplayName, szName, sizeof(szName)/sizeof(szName[0]));
1262 if(FAILED(hr))
1263 {
1264 ERR("Failed to get theme name from %S\n", szPath);
1265 continue;
1266 }
1267
1268 hr = GetThemeDocumentationProperty(szPath, szTooltip, szTip, sizeof(szTip)/sizeof(szTip[0]));
1269 if (FAILED(hr))
1270 szTip[0] = 0;
1271
1272 TRACE("callback(%s,%s,%s,%p)\n", debugstr_w(szPath), debugstr_w(szName), debugstr_w(szTip), lpData);
1273 if(!callback(NULL, szPath, szName, szTip, NULL, lpData)) {
1274 TRACE("callback ended enum\n");
1275 break;
1276 }
1277 }
1278 } while(FindNextFileW(hFind, &wfd));
1279 FindClose(hFind);
1280 }
1281 return S_OK;
1282}
#define ERR(fmt,...)
Definition: precomp.h:57
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define MAX_PATH
Definition: compat.h:34
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR pszThemeName, LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars)
Definition: system.c:1010
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
LPCWSTR szPath
Definition: env.c:37
static IPrintDialogCallback callback
Definition: printdlg.c:326
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
static const WCHAR szName[]
Definition: powrprof.c:45
#define E_POINTER
Definition: winerror.h:2365
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)

Referenced by LoadThemes().

◆ EnumThemeSizes()

HRESULT WINAPI EnumThemeSizes ( LPWSTR  pszThemeFileName,
LPWSTR  pszColorName,
DWORD  dwSizeNum,
PTHEMENAMES  pszSizeNames 
)

Definition at line 1373 of file system.c.

1375{
1377 HRESULT hr;
1378 LPWSTR tmp;
1379 UINT resourceId = dwSizeNum + 3000;
1380 TRACE("(%s,%s,%d)\n", debugstr_w(pszThemeFileName),
1381 debugstr_w(pszColorName), dwSizeNum);
1382
1384 return E_FAIL;
1385
1386 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, pszColorName, NULL, &pt);
1387 if(FAILED(hr)) return hr;
1388
1389 tmp = pt->pszAvailSizes;
1390 while(dwSizeNum && *tmp) {
1391 dwSizeNum--;
1392 tmp += lstrlenW(tmp)+1;
1393 }
1394 if(!dwSizeNum && *tmp) {
1395 TRACE("%s\n", debugstr_w(tmp));
1396 lstrcpyW(pszSizeNames->szName, tmp);
1397 LoadStringW (pt->hTheme, resourceId,
1398 pszSizeNames->szDisplayName,
1399 sizeof (pszSizeNames->szDisplayName) / sizeof (WCHAR));
1400 LoadStringW (pt->hTheme, resourceId+1000,
1401 pszSizeNames->szTooltip,
1402 sizeof (pszSizeNames->szTooltip) / sizeof (WCHAR));
1403 }
1404 else
1406
1408 return hr;
1409}

Referenced by LoadTheme().

◆ GetCurrentThemeName()

HRESULT WINAPI GetCurrentThemeName ( LPWSTR  pszThemeFileName,
int  dwMaxNameChars,
LPWSTR  pszColorBuff,
int  cchMaxColorChars,
LPWSTR  pszSizeBuff,
int  cchMaxSizeChars 
)

Definition at line 894 of file system.c.

897{
898 int cchar;
899
902
903 if (pszThemeFileName && dwMaxNameChars)
904 {
906 if(cchar > dwMaxNameChars)
908 lstrcpynW(pszThemeFileName, g_ActiveThemeFile->szThemeFile, cchar);
909 }
910
911 if (pszColorBuff && cchMaxColorChars)
912 {
914 if(cchar > cchMaxColorChars)
916 lstrcpynW(pszColorBuff, g_ActiveThemeFile->pszSelectedColor, cchar);
917 }
918
919 if (pszSizeBuff && cchMaxSizeChars)
920 {
922 if(cchar > cchMaxSizeChars)
924 lstrcpynW(pszSizeBuff, g_ActiveThemeFile->pszSelectedSize, cchar);
925 }
926
927 return S_OK;
928}
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define lstrcpynW
Definition: compat.h:738
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92

Referenced by GetActiveTheme(), SHGetShellStyleHInstance(), and test_GetCurrentThemeName().

◆ GetThemeAppProperties()

DWORD WINAPI GetThemeAppProperties ( void  )

◆ GetThemeDefaults()

HRESULT WINAPI GetThemeDefaults ( LPCWSTR  pszThemeFileName,
LPWSTR  pszColorName,
DWORD  dwColorNameLen,
LPWSTR  pszSizeName,
DWORD  dwSizeNameLen 
)

Definition at line 1183 of file system.c.

1186{
1188 HRESULT hr;
1189 TRACE("(%s,%p,%d,%p,%d)\n", debugstr_w(pszThemeFileName),
1190 pszColorName, dwColorNameLen,
1191 pszSizeName, dwSizeNameLen);
1192
1194 return E_FAIL;
1195
1196 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, NULL, &pt);
1197 if(FAILED(hr)) return hr;
1198
1199 lstrcpynW(pszColorName, pt->pszSelectedColor, dwColorNameLen);
1200 lstrcpynW(pszSizeName, pt->pszSelectedSize, dwSizeNameLen);
1201
1203 return S_OK;
1204}

◆ GetThemeDocumentationProperty()

HRESULT WINAPI GetThemeDocumentationProperty ( LPCWSTR  pszThemeName,
LPCWSTR  pszPropertyName,
LPWSTR  pszValueBuff,
int  cchMaxValChars 
)

Definition at line 1010 of file system.c.

1014{
1015 const WORD wDocToRes[] = {
1016 TMT_DISPLAYNAME,5000,
1017 TMT_TOOLTIP,5001,
1018 TMT_COMPANY,5002,
1019 TMT_AUTHOR,5003,
1020 TMT_COPYRIGHT,5004,
1021 TMT_URL,5005,
1022 TMT_VERSION,5006,
1023 TMT_DESCRIPTION,5007
1024 };
1025
1027 HRESULT hr;
1028 unsigned int i;
1029 int iDocId;
1030 TRACE("(%s,%s,%p,%d)\n", debugstr_w(pszThemeName), debugstr_w(pszPropertyName),
1031 pszValueBuff, cchMaxValChars);
1032
1034 return E_FAIL;
1035
1036 hr = MSSTYLES_OpenThemeFile(pszThemeName, NULL, NULL, &pt);
1037 if(FAILED(hr)) return hr;
1038
1039 /* Try to load from string resources */
1041 if(MSSTYLES_LookupProperty(pszPropertyName, NULL, &iDocId)) {
1042 for(i=0; i<sizeof(wDocToRes)/sizeof(wDocToRes[0]); i+=2) {
1043 if(wDocToRes[i] == iDocId) {
1044 if(LoadStringW(pt->hTheme, wDocToRes[i+1], pszValueBuff, cchMaxValChars)) {
1045 hr = S_OK;
1046 break;
1047 }
1048 }
1049 }
1050 }
1051 /* If loading from string resource failed, try getting it from the theme.ini */
1052 if(FAILED(hr)) {
1055 LPCWSTR lpValue;
1056 DWORD dwLen;
1057 if(UXINI_FindValue(uf, pszPropertyName, &lpValue, &dwLen)) {
1058 lstrcpynW(pszValueBuff, lpValue, min(dwLen+1,cchMaxValChars));
1059 hr = S_OK;
1060 }
1061 }
1062 UXINI_CloseINI(uf);
1063 }
1064
1066 return hr;
1067}
static const WCHAR szIniDocumentation[]
Definition: system.c:43
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define min(a, b)
Definition: monoChain.cc:55
PUXINI_FILE MSSTYLES_GetThemeIni(PTHEME_FILE tf)
Definition: msstyles.c:236
BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId)
Definition: stylemap.c:1100
BOOL UXINI_FindSection(PUXINI_FILE uf, LPCWSTR lpName)
Definition: uxini.c:200
BOOL UXINI_FindValue(PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen)
Definition: uxini.c:280
void UXINI_CloseINI(PUXINI_FILE uf)
Definition: uxini.c:83
#define TMT_COMPANY
Definition: vssym32.h:156
#define TMT_DESCRIPTION
Definition: vssym32.h:161
#define TMT_TOOLTIP
Definition: vssym32.h:155
#define TMT_URL
Definition: vssym32.h:159
#define TMT_VERSION
Definition: vssym32.h:160
#define TMT_DISPLAYNAME
Definition: vssym32.h:154
#define TMT_AUTHOR
Definition: vssym32.h:157
#define TMT_COPYRIGHT
Definition: vssym32.h:158
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by EnumThemes().

◆ GetWindowTheme()

HTHEME WINAPI GetWindowTheme ( HWND  hwnd)

Definition at line 851 of file system.c.

852{
853 TRACE("(%p)\n", hwnd);
854
855 if(!IsWindow(hwnd))
856 {
858 return NULL;
859 }
860
862}
#define SetLastError(x)
Definition: compat.h:752
ATOM atWindowTheme
Definition: system.c:49
#define MAKEINTATOM(i)
Definition: winbase.h:1463
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
BOOL WINAPI IsWindow(_In_opt_ HWND)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)

Referenced by BUTTON_WindowProc(), COMBO_WindowProc(), EDIT_WindowProc(), EDIT_WM_NCDestroy(), EDIT_WM_NCPaint(), CTrayShowDesktopButton::EnsureWindowTheme(), get_client_rect(), get_led_gap(), get_led_size(), HEADER_Destroy(), HEADER_DrawItem(), HEADER_DrawItemFrame(), HEADER_FillItemFrame(), HEADER_MouseMove(), HEADER_Refresh(), HEADER_ThemeChanged(), hottrack_refresh(), LISTBOX_Destroy(), LISTBOX_NCPaint(), LISTBOX_WindowProc(), LISTVIEW_Destroy(), LISTVIEW_NCPaint(), LISTVIEW_ThemeChanged(), MONTHCAL_Destroy(), PROGRESS_Draw(), PROGRESS_UpdateMarquee(), ProgressWindowProc(), REBAR_Destroy(), REBAR_DrawBand(), REBAR_EraseBkGnd(), REBAR_NCCalcSize(), REBAR_NCPaint(), REBAR_StyleChanged(), STATUSBAR_ComputeHeight(), STATUSBAR_DrawPart(), STATUSBAR_Refresh(), STATUSBAR_RefreshPart(), STATUSBAR_WMDestroy(), TAB_Destroy(), TAB_DrawBorder(), TAB_DrawItem(), TAB_DrawItemInterior(), TAB_EraseTabInterior(), TAB_RecalcHotTrack(), test_GetWindowTheme(), test_OpenThemeData(), theme_changed(), ThemeDestroyWndData(), ThemeDlgPostWindowProc(), THEMING_ScrollbarSubclassProc(), TOOLBAR_Destroy(), TOOLBAR_DrawButton(), TOOLBAR_DrawImage(), TOOLBAR_DrawString(), TOOLBAR_EraseBackground(), TOOLBAR_GetHotItem(), TOOLBAR_MouseMove(), TOOLBAR_NCCreate(), TRACKBAR_Destroy(), TRACKBAR_DrawChannel(), TRACKBAR_DrawThumb(), TRACKBAR_DrawTics(), TRACKBAR_MouseMove(), TRACKBAR_Refresh(), TREEVIEW_Destroy(), TREEVIEW_DrawItemLines(), TREEVIEW_NCPaint(), TREEVIEW_ThemeChanged(), UPDOWN_Draw(), UPDOWN_DrawBuddyBackground(), UPDOWN_GetArrowRect(), and UpDownWindowProc().

◆ HitTestThemeBackground()

HRESULT WINAPI HitTestThemeBackground ( HTHEME  hTheme,
HDC  hdc,
int  iPartId,
int  iStateId,
DWORD  dwOptions,
const RECT pRect,
HRGN  hrgn,
POINT  ptTest,
WORD pwHitTestCode 
)

Definition at line 973 of file system.c.

977{
978 FIXME("%d %d 0x%08x: stub\n", iPartId, iStateId, dwOptions);
979 if (!ValidateHandle(hTheme))
980 return E_HANDLE;
981 return E_NOTIMPL;
982}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
DWORD dwOptions
Definition: solitaire.cpp:25

◆ IsAppThemed()

◆ IsThemeActive()

BOOL WINAPI IsThemeActive ( void  )

Definition at line 606 of file system.c.

607{
608 BOOL bActive;
610 HKEY hKey;
611 WCHAR tmp[10];
612 DWORD buffsize;
613
614 TRACE("IsThemeActive\n");
616
618 return TRUE;
619
621 return FALSE;
622
623 bActive = FALSE;
625 if (Result == ERROR_SUCCESS)
626 {
627 buffsize = sizeof(tmp);
628 if (!RegQueryValueExW(hKey, szThemeActive, NULL, NULL, (LPBYTE)tmp, &buffsize))
629 bActive = (tmp[0] != '0');
631 }
632
633 return bActive;
634}
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LRESULT
Definition: windef.h:209
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by CTrayShowDesktopButton::EnsureWindowTheme(), CTrayNotifyWnd::OnThemeChanged(), CTaskSwitchWnd::OnThemeChanged(), START_TEST(), test_GetCurrentThemeName(), test_IsThemed(), test_OpenThemeData(), test_OpenThemeDataEx(), Test_Params(), TestTheme(), Theme_Start(), THEMING_Initialize(), and CTrayShowDesktopButton::WidthOrHeight().

◆ IsThemePartDefined()

BOOL WINAPI IsThemePartDefined ( HTHEME  hTheme,
int  iPartId,
int  iStateId 
)

Definition at line 987 of file system.c.

988{
989 PTHEME_CLASS pClass;
990
991 TRACE("(%p,%d,%d)\n", hTheme, iPartId, iStateId);
992
993 pClass = ValidateHandle(hTheme);
994 if (!pClass)
995 {
997 return FALSE;
998 }
999 if(MSSTYLES_FindPartState(pClass, iPartId, iStateId, NULL))
1000 return TRUE;
1001 return FALSE;
1002}
PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext)
Definition: msstyles.c:452

Referenced by CTrayShowDesktopButton::EnsureWindowTheme(), test_IsThemed(), and test_OpenThemeData().

◆ OpenThemeData()

◆ OpenThemeDataEx()

HTHEME WINAPI OpenThemeDataEx ( HWND  hwnd,
LPCWSTR  pszClassList,
DWORD  flags 
)

Definition at line 819 of file system.c.

820{
821 return OpenThemeDataInternal(g_ActiveThemeFile, hwnd, pszClassList, flags);
822}
GLbitfield flags
Definition: glext.h:7161

Referenced by GetNCCaptionTheme(), GetNCScrollbarTheme(), init_funcs(), and START_TEST().

◆ OpenThemeDataFromFile()

HTHEME WINAPI OpenThemeDataFromFile ( HTHEMEFILE  hThemeFile,
HWND  hwnd,
LPCWSTR  pszClassList,
DWORD  flags 
)

Definition at line 827 of file system.c.

828{
829 return OpenThemeDataInternal((PTHEME_FILE)hThemeFile, hwnd, pszClassList, flags);
830}

Referenced by DrawNCPreview(), and LoadSchemeFromTheme().

◆ OpenThemeDataInternal()

static HTHEME WINAPI OpenThemeDataInternal ( PTHEME_FILE  ThemeFile,
HWND  hwnd,
LPCWSTR  pszClassList,
DWORD  flags 
)
static

Definition at line 735 of file system.c.

736{
737 WCHAR szAppBuff[256];
738 WCHAR szClassBuff[256];
739 LPCWSTR pszAppName;
740 LPCWSTR pszUseClassList;
741 HTHEME hTheme = NULL;
742 TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags);
743
744 if(!pszClassList)
745 {
747 return NULL;
748 }
749
750 if ((flags & OTD_NONCLIENT) && !(dwThemeAppProperties & STAP_ALLOW_NONCLIENT))
751 {
753 return NULL;
754 }
755
756 if (!(flags & OTD_NONCLIENT) && !(dwThemeAppProperties & STAP_ALLOW_CONTROLS))
757 {
759 return NULL;
760 }
761
762 if (ThemeFile)
763 {
764 pszAppName = UXTHEME_GetWindowProperty(hwnd, atSubAppName, szAppBuff, sizeof(szAppBuff)/sizeof(szAppBuff[0]));
765 /* If SetWindowTheme was used on the window, that overrides the class list passed to this function */
766 pszUseClassList = UXTHEME_GetWindowProperty(hwnd, atSubIdList, szClassBuff, sizeof(szClassBuff)/sizeof(szClassBuff[0]));
767 if(!pszUseClassList)
768 pszUseClassList = pszClassList;
769
770 if (pszUseClassList)
771 {
772 PTHEME_CLASS pClass;
773 PUXTHEME_HANDLE pHandle;
774
775 if (!ThemeFile->classes)
776 MSSTYLES_ParseThemeIni(ThemeFile);
777 pClass = MSSTYLES_OpenThemeClass(ThemeFile, pszAppName, pszUseClassList);
778
779 if (pClass)
780 {
782 if (pHandle)
783 {
784 g_cHandles++;
785 TRACE("Created handle 0x%x for class 0x%x, app %S, class %S. Count: %d\n", pHandle, pClass, pszAppName, pszUseClassList, g_cHandles);
786 pHandle->pClass = pClass;
787 pHandle->Handle.Flags = RTL_HANDLE_VALID;
788 hTheme = pHandle;
789 }
790 else
791 {
793 }
794 }
795 }
796 }
797
798 if(IsWindow(hwnd))
799 {
800 if ((flags & OTD_NONCLIENT) == 0)
801 {
803 }
804 }
805 else
806 {
808 }
809
811
812 TRACE(" = %p\n", hTheme);
813 return hTheme;
814}
static LPWSTR UXTHEME_GetWindowProperty(HWND hwnd, ATOM aProp, LPWSTR pszBuffer, int dwLen)
Definition: system.c:706
static ATOM atSubIdList
Definition: system.c:51
static ATOM atSubAppName
Definition: system.c:50
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
PTHEME_CLASS MSSTYLES_OpenThemeClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassList)
Definition: msstyles.c:756
void MSSTYLES_ParseThemeIni(PTHEME_FILE tf)
Definition: msstyles.c:644
NTSYSAPI PRTL_HANDLE_TABLE_ENTRY NTAPI RtlAllocateHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _Inout_ PULONG Index)
#define RTL_HANDLE_VALID
Definition: rtltypes.h:376
ULONG Flags
Definition: rtltypes.h:1250
PTHEME_CLASS classes
Definition: uxthemep.h:88
RTL_HANDLE_TABLE_ENTRY Handle
Definition: uxthemep.h:97
struct _UXTHEME_HANDLE * PUXTHEME_HANDLE
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)

Referenced by OpenThemeData(), OpenThemeDataEx(), and OpenThemeDataFromFile().

◆ OpenThemeFile()

HRESULT WINAPI OpenThemeFile ( LPCWSTR  pszThemeFileName,
LPCWSTR  pszColorName,
LPCWSTR  pszSizeName,
HTHEMEFILE hThemeFile,
DWORD  unknown 
)

Definition at line 1101 of file system.c.

1104{
1105 TRACE("(%s,%s,%s,%p,%d)\n", debugstr_w(pszThemeFileName),
1106 debugstr_w(pszColorName), debugstr_w(pszSizeName),
1107 hThemeFile, unknown);
1108
1110 return E_FAIL;
1111
1112 return MSSTYLES_OpenThemeFile(pszThemeFileName, pszColorName, pszSizeName, (PTHEME_FILE*)hThemeFile);
1113}

Referenced by ActivateTheme(), DrawNCPreview(), and LoadSchemeFromTheme().

◆ ParseThemeIniFile()

HRESULT WINAPI ParseThemeIniFile ( LPCWSTR  pszIniFileName,
LPWSTR  pszUnknown,
PARSETHEMEINIFILEPROC  callback,
LPVOID  lpData 
)

Definition at line 1430 of file system.c.

1432{
1433 FIXME("%s %s: stub\n", debugstr_w(pszIniFileName), debugstr_w(pszUnknown));
1434 return E_NOTIMPL;
1435}

◆ query_reg_path()

static DWORD query_reg_path ( HKEY  hKey,
LPCWSTR  lpszValue,
LPVOID  pvData 
)
static

Definition at line 84 of file system.c.

86{
87 DWORD dwRet, dwType, dwUnExpDataLen = MAX_PATH * sizeof(WCHAR), dwExpDataLen;
88
89 TRACE("(hkey=%p,%s,%p)\n", hKey, debugstr_w(lpszValue),
90 pvData);
91
92 dwRet = RegQueryValueExW(hKey, lpszValue, 0, &dwType, pvData, &dwUnExpDataLen);
93 if (dwRet!=ERROR_SUCCESS && dwRet!=ERROR_MORE_DATA)
94 return dwRet;
95
96 if (dwType == REG_EXPAND_SZ)
97 {
98 DWORD nBytesToAlloc;
99
100 /* Expand type REG_EXPAND_SZ into REG_SZ */
101 LPWSTR szData;
102
103 /* If the caller didn't supply a buffer or the buffer is too small we have
104 * to allocate our own
105 */
106 if (dwRet == ERROR_MORE_DATA)
107 {
108 WCHAR cNull = '\0';
109 nBytesToAlloc = dwUnExpDataLen;
110
111 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
112 RegQueryValueExW (hKey, lpszValue, 0, NULL, (LPBYTE)szData, &nBytesToAlloc);
113 dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1);
114 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
115 LocalFree(szData);
116 }
117 else
118 {
119 nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR);
120 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
121 lstrcpyW(szData, pvData);
122 dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, MAX_PATH );
123 if (dwExpDataLen > MAX_PATH) dwRet = ERROR_MORE_DATA;
124 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
125 LocalFree(szData);
126 }
127 }
128
129 return dwRet;
130}
#define ERROR_MORE_DATA
Definition: dderror.h:13
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1390
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
#define max(a, b)
Definition: svc.c:63
#define LMEM_ZEROINIT
Definition: winbase.h:375
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3749

Referenced by UXTHEME_LoadTheme().

◆ QueryThemeServices()

DWORD WINAPI QueryThemeServices ( void  )

Definition at line 1079 of file system.c.

1080{
1081 FIXME("stub\n");
1082 return 3; /* This is what is returned under XP in most cases */
1083}

◆ save_sys_colors()

static void save_sys_colors ( HKEY  baseKey)
static

Definition at line 316 of file system.c.

317{
318 char colorStr[13];
319 HKEY hKey;
320 int i;
321
322 if (RegCreateKeyExW( baseKey, strColorKey,
323 0, 0, 0, KEY_ALL_ACCESS,
324 0, &hKey, 0 ) == ERROR_SUCCESS)
325 {
326 for (i = 0; i < NUM_SYS_COLORS; i++)
327 {
328 COLORREF col = GetSysColor (i);
329
330 sprintf (colorStr, "%d %d %d",
331 GetRValue (col), GetGValue (col), GetBValue (col));
332
334 (BYTE*)colorStr, strlen (colorStr)+1);
335 }
337 }
338}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4799
static const WCHAR strColorKey[]
Definition: system.c:292
#define NUM_SYS_COLORS
Definition: system.c:314
static const char *const SysColorsNames[]
Definition: system.c:258
#define GetBValue(quad)
Definition: precomp.h:75
#define GetGValue(quad)
Definition: precomp.h:74
#define GetRValue(quad)
Definition: precomp.h:73
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
DWORD COLORREF
Definition: windef.h:300
DWORD WINAPI GetSysColor(_In_ int)
unsigned char BYTE
Definition: xxhash.c:193

Referenced by UXTHEME_BackupSystemMetrics(), and UXTHEME_SaveSystemMetrics().

◆ SetThemeAppProperties()

void WINAPI SetThemeAppProperties ( DWORD  dwFlags)

Definition at line 941 of file system.c.

942{
943 TRACE("(0x%08x)\n", dwFlags);
945}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by Notify(), and START_TEST().

◆ SetWindowTheme()

HRESULT WINAPI SetWindowTheme ( HWND  hwnd,
LPCWSTR  pszSubAppName,
LPCWSTR  pszSubIdList 
)

Definition at line 869 of file system.c.

871{
872 HRESULT hr;
873 TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName),
874 debugstr_w(pszSubIdList));
875
876 if(!IsWindow(hwnd))
877 return E_HANDLE;
878
880 if (!SUCCEEDED(hr))
881 return hr;
882
884 if (!SUCCEEDED(hr))
885 return hr;
886
888 return hr;
889}
static HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
Definition: system.c:672

Referenced by test_SetWindowTheme().

◆ UXTHEME_ApplyTheme()

static HRESULT UXTHEME_ApplyTheme ( PTHEME_FILE  tf)
static

Definition at line 512 of file system.c.

513{
514 HKEY hKey;
515 WCHAR tmp[2];
516 HRESULT hr;
517
518 TRACE("UXTHEME_ApplyTheme\n");
519
520 if (tf && !g_ActiveThemeFile)
521 {
523 }
524
526 if (FAILED(hr))
527 return hr;
528
529 if (!tf)
530 {
532 }
533
534 TRACE("Writing theme config to registry\n");
536 tmp[0] = g_ActiveThemeFile ? '1' : '0';
537 tmp[1] = '\0';
538 RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (const BYTE*)tmp, sizeof(WCHAR)*2);
539 if (g_ActiveThemeFile) {
540 RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)tf->pszSelectedColor,
541 (lstrlenW(tf->pszSelectedColor)+1)*sizeof(WCHAR));
542 RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)tf->pszSelectedSize,
543 (lstrlenW(tf->pszSelectedSize)+1)*sizeof(WCHAR));
544 RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)tf->szThemeFile,
545 (lstrlenW(tf->szThemeFile)+1)*sizeof(WCHAR));
546 }
547 else {
551
552 }
554 }
555 else
556 TRACE("Failed to open theme registry key\n");
557
559
560 return hr;
561}
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
Definition: reg.c:2330
LONG WINAPI RegCreateKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:1201
static const WCHAR szSizeName[]
Definition: system.c:39
static const WCHAR szDllName[]
Definition: system.c:41
static HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
Definition: system.c:132
static const WCHAR szColorName[]
Definition: system.c:40
HFONT tf
Definition: icontest.c:17

Referenced by ApplyTheme().

◆ UXTHEME_BackupSystemMetrics()

static void UXTHEME_BackupSystemMetrics ( void  )
static

Definition at line 343 of file system.c.

344{
345 HKEY hKey;
346 const struct BackupSysParam* bsp = backupSysParams;
347
349 0, 0, 0, KEY_ALL_ACCESS,
350 0, &hKey, 0) == ERROR_SUCCESS)
351 {
352 NONCLIENTMETRICSW ncm;
353 LOGFONTW iconTitleFont;
354
355 /* back up colors */
357
358 /* back up "other" settings */
359 while (bsp->spiGet >= 0)
360 {
361 DWORD value;
362
363 SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
365 (LPBYTE)&value, sizeof (value));
366
367 bsp++;
368 }
369
370 /* back up non-client metrics */
371 memset (&ncm, 0, sizeof (ncm));
372 ncm.cbSize = sizeof (ncm);
373 SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (ncm), &ncm, 0);
375 sizeof (ncm));
376 memset (&iconTitleFont, 0, sizeof (iconTitleFont));
377 SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (iconTitleFont),
378 &iconTitleFont, 0);
380 (LPBYTE)&iconTitleFont, sizeof (iconTitleFont));
381
383 }
384}
static const WCHAR keyIconTitleFont[]
Definition: system.c:300
static const WCHAR keyNonClientMetrics[]
Definition: system.c:298
static const struct BackupSysParam backupSysParams[]
static void save_sys_colors(HKEY baseKey)
Definition: system.c:316
#define REG_BINARY
Definition: nt_native.h:1496
#define REG_DWORD
Definition: sdbapi.c:596
#define memset(x, y, z)
Definition: compat.h:39
const WCHAR * keyName
Definition: system.c:306
Definition: pdh_main.c:94
#define SPI_GETICONTITLELOGFONT
Definition: winuser.h:1383
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)

Referenced by EnableTheming(), and UXTHEME_ApplyTheme().

◆ UXTHEME_broadcast_theme_changed()

BOOL CALLBACK UXTHEME_broadcast_theme_changed ( HWND  hWnd,
LPARAM  enable 
)

Definition at line 68 of file system.c.

69{
70 if (hWnd == NULL)
71 {
73 }
74 else
75 {
78 }
79 return TRUE;
80}
static BOOL CALLBACK UXTHEME_send_theme_changed(HWND hWnd, LPARAM enable)
Definition: system.c:61
GLboolean enable
Definition: glext.h:11120
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)

Referenced by ApplyTheme(), EnableTheming(), SetWindowTheme(), ThemeHooksInstall(), ThemeHooksRemove(), and UXTHEME_broadcast_theme_changed().

◆ UXTHEME_GetWindowProperty()

static LPWSTR UXTHEME_GetWindowProperty ( HWND  hwnd,
ATOM  aProp,
LPWSTR  pszBuffer,
int  dwLen 
)
static

Definition at line 706 of file system.c.

707{
708 ATOM atValue = (ATOM)(size_t)GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
709 if(atValue) {
710 if(GetAtomNameW(atValue, pszBuffer, dwLen))
711 return pszBuffer;
712 TRACE("property defined, but unable to get value\n");
713 }
714 return NULL;
715}
WORD ATOM
Definition: dimm.idl:113
UINT WINAPI GetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:589

Referenced by OpenThemeDataInternal().

◆ UXTHEME_InitSystem()

void UXTHEME_InitSystem ( HINSTANCE  hInst)

Definition at line 566 of file system.c.

567{
568 static const WCHAR szWindowTheme[] = {
569 'u','x','_','t','h','e','m','e','\0'
570 };
571 static const WCHAR szSubAppName[] = {
572 'u','x','_','s','u','b','a','p','p','\0'
573 };
574 static const WCHAR szSubIdList[] = {
575 'u','x','_','s','u','b','i','d','l','s','t','\0'
576 };
577 static const WCHAR szDialogThemeEnabled[] = {
578 'u','x','_','d','i','a','l','o','g','t','h','e','m','e','\0'
579 };
580
581 hDllInst = hInst;
582
583 atWindowTheme = GlobalAddAtomW(szWindowTheme);
584 atSubAppName = GlobalAddAtomW(szSubAppName);
585 atSubIdList = GlobalAddAtomW(szSubIdList);
586 atDialogThemeEnabled = GlobalAddAtomW(szDialogThemeEnabled);
587 atWndContext = GlobalAddAtomW(L"ux_WndContext");
588
590 g_cHandles = 0;
591}
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
HINSTANCE hDllInst
Definition: system.c:45
ATOM atWndContext
Definition: system.c:52
ATOM atDialogThemeEnabled
Definition: system.c:46
HINSTANCE hInst
Definition: dxdiag.c:13
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
#define L(x)
Definition: ntvdm.h:50

Referenced by DllMain().

◆ UXTHEME_LoadTheme()

void UXTHEME_LoadTheme ( BOOL  bLoad)

Definition at line 183 of file system.c.

184{
185 HKEY hKey;
186 DWORD buffsize;
187 HRESULT hr;
188 WCHAR tmp[10];
190 WCHAR szCurrentTheme[MAX_PATH];
191 WCHAR szCurrentColor[64];
192 WCHAR szCurrentSize[64];
194
195 if ((bLoad != FALSE) && g_bThemeHooksActive)
196 {
197 /* Get current theme configuration */
199 TRACE("Loading theme config\n");
200 buffsize = sizeof(tmp);
201 if(!RegQueryValueExW(hKey, szThemeActive, NULL, NULL, (LPBYTE)tmp, &buffsize)) {
202 bThemeActive = (tmp[0] != '0');
203 }
204 else {
206 TRACE("Failed to get ThemeActive: %d\n", GetLastError());
207 }
208 buffsize = sizeof(szCurrentColor);
209 if(RegQueryValueExW(hKey, szColorName, NULL, NULL, (LPBYTE)szCurrentColor, &buffsize))
210 szCurrentColor[0] = '\0';
211 buffsize = sizeof(szCurrentSize);
212 if(RegQueryValueExW(hKey, szSizeName, NULL, NULL, (LPBYTE)szCurrentSize, &buffsize))
213 szCurrentSize[0] = '\0';
214 if (query_reg_path (hKey, szDllName, szCurrentTheme))
215 szCurrentTheme[0] = '\0';
217 }
218 else
219 TRACE("Failed to open theme registry key\n");
220 }
221 else
222 {
224 }
225
226 if(bThemeActive)
227 {
228 if( bIsThemeActive(szCurrentTheme, szCurrentColor, szCurrentSize) )
229 {
230 TRACE("Tried to load active theme again\n");
231 return;
232 }
233
234 /* Make sure the theme requested is actually valid */
235 hr = MSSTYLES_OpenThemeFile(szCurrentTheme,
236 szCurrentColor[0]?szCurrentColor:NULL,
237 szCurrentSize[0]?szCurrentSize:NULL,
238 &pt);
239 if(FAILED(hr)) {
241 }
242 else {
243 TRACE("Theme active: %s %s %s\n", debugstr_w(szCurrentTheme),
244 debugstr_w(szCurrentColor), debugstr_w(szCurrentSize));
245
248 }
249 }
250 if(!bThemeActive) {
252 TRACE("Theming not active\n");
253 }
254}
static BOOL bIsThemeActive(LPCWSTR pszTheme, LPCWSTR pszColor, LPCWSTR pszSize)
Definition: system.c:145
static DWORD query_reg_path(HKEY hKey, LPCWSTR lpszValue, LPVOID pvData)
Definition: system.c:84
static BOOL bThemeActive
Definition: scroll.c:29
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by ThemeInitApiHook(), and ThemePreWindowProc().

◆ UXTHEME_RestoreSystemMetrics()

static void UXTHEME_RestoreSystemMetrics ( void  )
static

Definition at line 387 of file system.c.

388{
389 HKEY hKey;
390 const struct BackupSysParam* bsp = backupSysParams;
391
394 {
395 HKEY colorKey;
396
397 /* read backed-up colors */
399 0, KEY_QUERY_VALUE, &colorKey) == ERROR_SUCCESS)
400 {
401 int i;
402 COLORREF sysCols[NUM_SYS_COLORS];
403 int sysColsIndices[NUM_SYS_COLORS];
404 int sysColCount = 0;
405
406 for (i = 0; i < NUM_SYS_COLORS; i++)
407 {
408 DWORD type;
409 char colorStr[13];
410 DWORD count = sizeof(colorStr);
411
412 if (RegQueryValueExA (colorKey, SysColorsNames[i], 0,
413 &type, (LPBYTE) colorStr, &count) == ERROR_SUCCESS)
414 {
415 int r, g, b;
416 if (sscanf (colorStr, "%d %d %d", &r, &g, &b) == 3)
417 {
418 sysColsIndices[sysColCount] = i;
419 sysCols[sysColCount] = RGB(r, g, b);
420 sysColCount++;
421 }
422 }
423 }
424 RegCloseKey (colorKey);
425
426 SetSysColors (sysColCount, sysColsIndices, sysCols);
427 }
428
429 /* read backed-up other settings */
430 while (bsp->spiGet >= 0)
431 {
432 DWORD value;
433 DWORD count = sizeof(value);
434 DWORD type;
435
436 if (RegQueryValueExW (hKey, bsp->keyName, 0,
438 {
440 }
441
442 bsp++;
443 }
444
445 /* read backed-up non-client metrics */
446 {
447 NONCLIENTMETRICSW ncm;
448 LOGFONTW iconTitleFont;
449 DWORD count = sizeof(ncm);
450 DWORD type;
451
453 &type, (LPBYTE)&ncm, &count) == ERROR_SUCCESS)
454 {
455 SystemParametersInfoW (SPI_SETNONCLIENTMETRICS,
457 }
458
459 count = sizeof(iconTitleFont);
460
462 &type, (LPBYTE)&iconTitleFont, &count) == ERROR_SUCCESS)
463 {
465 count, &iconTitleFont, SPIF_UPDATEINIFILE);
466 }
467 }
468
470 }
471}
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
#define RGB(r, g, b)
Definition: precomp.h:71
#define UlongToPtr(u)
Definition: config.h:106
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLboolean GLboolean g
Definition: glext.h:6204
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
#define b
Definition: ke_i.h:79
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
BOOL WINAPI SetSysColors(_In_ int cElements, _In_reads_(cElements) CONST INT *lpaElements, _In_reads_(cElements) CONST COLORREF *lpaRgbValues)
#define SPIF_UPDATEINIFILE
Definition: winuser.h:1574
#define SPI_SETICONTITLELOGFONT
Definition: winuser.h:1386

Referenced by EnableTheming(), and UXTHEME_ApplyTheme().

◆ UXTHEME_SaveSystemMetrics()

static void UXTHEME_SaveSystemMetrics ( void  )
static

Definition at line 477 of file system.c.

478{
479 const struct BackupSysParam* bsp = backupSysParams;
480 NONCLIENTMETRICSW ncm;
481 LOGFONTW iconTitleFont;
482
484
485 while (bsp->spiGet >= 0)
486 {
487 DWORD value;
488
489 SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
491 bsp++;
492 }
493
494 memset (&ncm, 0, sizeof (ncm));
495 ncm.cbSize = sizeof (ncm);
496 SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (ncm), &ncm, 0);
497 SystemParametersInfoW (SPI_SETNONCLIENTMETRICS, sizeof (ncm), &ncm,
499
500 memset (&iconTitleFont, 0, sizeof (iconTitleFont));
501 SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (iconTitleFont),
502 &iconTitleFont, 0);
503 SystemParametersInfoW (SPI_SETICONTITLELOGFONT, sizeof (iconTitleFont),
504 &iconTitleFont, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
505}
#define SPIF_SENDCHANGE
Definition: winuser.h:1575

Referenced by EnableTheming(), and UXTHEME_ApplyTheme().

◆ UXTHEME_send_theme_changed()

static BOOL CALLBACK UXTHEME_send_theme_changed ( HWND  hWnd,
LPARAM  enable 
)
static

Definition at line 61 of file system.c.

62{
63 SendMessageW(hWnd, WM_THEMECHANGED, enable, 0);
64 return TRUE;
65}
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by UXTHEME_broadcast_theme_changed().

◆ UXTHEME_SetActiveTheme()

static HRESULT UXTHEME_SetActiveTheme ( PTHEME_FILE  tf)
static

Definition at line 132 of file system.c.

133{
138 {
141 }
142 return S_OK;
143}
HRESULT MSSTYLES_ReferenceTheme(PTHEME_FILE tf)
Definition: msstyles.c:224

Referenced by UXTHEME_ApplyTheme(), and UXTHEME_LoadTheme().

◆ UXTHEME_SetWindowProperty()

static HRESULT UXTHEME_SetWindowProperty ( HWND  hwnd,
ATOM  aProp,
LPCWSTR  pszValue 
)
static

Definition at line 672 of file system.c.

673{
674 ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
675 if(oldValue)
676 {
677 DeleteAtom(oldValue);
678 }
679
680 if(pszValue)
681 {
682 ATOM atValue;
683
684 /* A string with zero lenght is not acceptatble in AddAtomW but we want to support
685 users passing an empty string meaning they want no theme for the specified window */
686 if(!pszValue[0])
687 pszValue = L"0";
688
689 atValue = AddAtomW(pszValue);
690 if (!atValue)
691 {
692 ERR("AddAtomW for %S failed with last error %d!\n", pszValue, GetLastError());
694 }
695
696 if (!SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp), (LPWSTR)MAKEINTATOM(atValue)))
697 {
698 ERR("SetPropW for atom %d failed with last error %d\n", aProp, GetLastError());
699 if(atValue) DeleteAtom(atValue);
701 }
702 }
703 return S_OK;
704}
ATOM WINAPI DeleteAtom(ATOM nAtom)
Definition: atom.c:546
ATOM WINAPI AddAtomW(LPCWSTR lpString)
Definition: atom.c:536
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)

Referenced by SetWindowTheme().

◆ ValidateHandle()

PTHEME_CLASS ValidateHandle ( HTHEME  hTheme)

Definition at line 717 of file system.c.

718{
719 PUXTHEME_HANDLE pHandle;
720
721 if (!g_bThemeHooksActive || !hTheme || hTheme == INVALID_HANDLE_VALUE)
722 return NULL;
723
725 {
726 ERR("Invalid handle 0x%x!\n", hTheme);
727 return NULL;
728 }
729
730 pHandle = hTheme;
731 return pHandle->pClass;
732}

Referenced by HitTestThemeBackground(), and IsThemePartDefined().

Variable Documentation

◆ atDialogThemeEnabled

ATOM atDialogThemeEnabled

◆ atSubAppName

ATOM atSubAppName
static

Definition at line 50 of file system.c.

Referenced by OpenThemeDataInternal(), SetWindowTheme(), and UXTHEME_InitSystem().

◆ atSubIdList

ATOM atSubIdList
static

Definition at line 51 of file system.c.

Referenced by OpenThemeDataInternal(), SetWindowTheme(), and UXTHEME_InitSystem().

◆ atWindowTheme

ATOM atWindowTheme

Definition at line 49 of file system.c.

Referenced by GetWindowTheme(), OpenThemeDataInternal(), and UXTHEME_InitSystem().

◆ atWndContext

◆ backupSysParams

const struct BackupSysParam backupSysParams[]
static
Initial value:
=
{
{SPI_GETFLATMENU, SPI_SETFLATMENU, keyFlatMenus},
{SPI_GETGRADIENTCAPTIONS, SPI_SETGRADIENTCAPTIONS, keyGradientCaption},
{-1, -1, 0}
}
static const WCHAR keyGradientCaption[]
Definition: system.c:296
static const WCHAR keyFlatMenus[]
Definition: system.c:295

Referenced by UXTHEME_BackupSystemMetrics(), UXTHEME_RestoreSystemMetrics(), and UXTHEME_SaveSystemMetrics().

◆ dwThemeAppProperties

DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS
static

Definition at line 48 of file system.c.

Referenced by GetThemeAppProperties(), OpenThemeDataInternal(), and SetThemeAppProperties().

◆ g_ActiveThemeFile

◆ g_cHandles

int g_cHandles

Definition at line 57 of file system.c.

Referenced by CloseThemeData(), OpenThemeDataInternal(), and UXTHEME_InitSystem().

◆ g_UxThemeHandleTable

RTL_HANDLE_TABLE g_UxThemeHandleTable

Definition at line 56 of file system.c.

Referenced by CloseThemeData(), OpenThemeDataInternal(), UXTHEME_InitSystem(), and ValidateHandle().

◆ hDllInst

HINSTANCE hDllInst

◆ keyFlatMenus

const WCHAR keyFlatMenus[] = { 'F','l','a','t','M','e','n','u', 0}
static

Definition at line 295 of file system.c.

◆ keyGradientCaption

const WCHAR keyGradientCaption[]
static
Initial value:
= { 'G','r','a','d','i','e','n','t',
'C','a','p','t','i','o','n', 0 }

Definition at line 296 of file system.c.

◆ keyIconTitleFont

const WCHAR keyIconTitleFont[]
static
Initial value:
= { 'I','c','o','n','T','i','t','l','e',
'F','o','n','t',0 }

Definition at line 300 of file system.c.

Referenced by UXTHEME_BackupSystemMetrics(), and UXTHEME_RestoreSystemMetrics().

◆ keyNonClientMetrics

const WCHAR keyNonClientMetrics[]
static
Initial value:
= { 'N','o','n','C','l','i','e','n','t',
'M','e','t','r','i','c','s',0 }

Definition at line 298 of file system.c.

Referenced by UXTHEME_BackupSystemMetrics(), and UXTHEME_RestoreSystemMetrics().

◆ strColorKey

const WCHAR strColorKey[]
static
Initial value:
=
{ 'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\',
'C','o','l','o','r','s',0 }

Definition at line 292 of file system.c.

Referenced by save_sys_colors(), and UXTHEME_RestoreSystemMetrics().

◆ SysColorsNames

const char* const SysColorsNames[]
static

Definition at line 258 of file system.c.

Referenced by save_sys_colors(), and UXTHEME_RestoreSystemMetrics().

◆ szColorName

const WCHAR szColorName[] = {'C','o','l','o','r','N','a','m','e','\0'}
static

Definition at line 40 of file system.c.

Referenced by SHGetShellStyleHInstance(), UXTHEME_ApplyTheme(), and UXTHEME_LoadTheme().

◆ szDllName

const WCHAR szDllName[] = {'D','l','l','N','a','m','e','\0'}
static

Definition at line 41 of file system.c.

Referenced by UXTHEME_ApplyTheme(), and UXTHEME_LoadTheme().

◆ szIniDocumentation

const WCHAR szIniDocumentation[] = {'d','o','c','u','m','e','n','t','a','t','i','o','n','\0'}
static

Definition at line 43 of file system.c.

Referenced by GetThemeDocumentationProperty().

◆ szSizeName

const WCHAR szSizeName[] = {'S','i','z','e','N','a','m','e','\0'}
static

Definition at line 39 of file system.c.

Referenced by UXTHEME_ApplyTheme(), and UXTHEME_LoadTheme().

◆ szThemeActive

const WCHAR szThemeActive[] = {'T','h','e','m','e','A','c','t','i','v','e','\0'}
static

Definition at line 38 of file system.c.

Referenced by EnableTheming(), IsThemeActive(), UXTHEME_ApplyTheme(), and UXTHEME_LoadTheme().

◆ szThemeManager

const WCHAR szThemeManager[]
static
Initial value:
= {
'S','o','f','t','w','a','r','e','\\',
'M','i','c','r','o','s','o','f','t','\\',
'W','i','n','d','o','w','s','\\',
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'T','h','e','m','e','M','a','n','a','g','e','r','\0'
}

Definition at line 31 of file system.c.

Referenced by EnableTheming(), IsThemeActive(), UXTHEME_ApplyTheme(), UXTHEME_BackupSystemMetrics(), UXTHEME_LoadTheme(), and UXTHEME_RestoreSystemMetrics().