ReactOS 0.4.16-dev-983-g23ad936
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)
 
void UXTHEME_UnInitSystem (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

DWORD gdwErrorInfoTlsIndex = TLS_OUT_OF_INDEXES
 
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 316 of file system.c.

Function Documentation

◆ ApplyTheme()

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

Definition at line 1173 of file system.c.

1174{
1175 HRESULT hr;
1176 TRACE("(%p,%s,%p)\n", hThemeFile, unknown, hWnd);
1177 hr = UXTHEME_ApplyTheme(hThemeFile);
1179 return hr;
1180}
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:70
PTHEME_FILE g_ActiveThemeFile
Definition: system.c:56
static HRESULT UXTHEME_ApplyTheme(PTHEME_FILE tf)
Definition: system.c:514
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 147 of file system.c.

148{
149 if (g_ActiveThemeFile == NULL)
150 return FALSE;
151
152 if (wcscmp(pszTheme, g_ActiveThemeFile->szThemeFile) != 0)
153 return FALSE;
154
155 if (!pszColor[0])
156 {
158 return FALSE;
159 }
160 else
161 {
162 if (wcscmp(pszColor, g_ActiveThemeFile->pszSelectedColor) != 0)
163 return FALSE;
164 }
165
166 if (!pszSize[0])
167 {
169 return FALSE;
170 }
171 else
172 {
173 if (wcscmp(pszSize, g_ActiveThemeFile->pszSelectedSize) != 0)
174 return FALSE;
175 }
176
177 return TRUE;
178}
#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 1464 of file system.c.

1465{
1467 HRESULT hr;
1468 TRACE("(%s)\n", debugstr_w(pszThemeFileName));
1469
1471 return E_FAIL;
1472
1473 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, NULL, &pt);
1474 if(FAILED(hr))
1475 return hr;
1477 return S_OK;
1478}
#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 965 of file system.c.

966{
967 PUXTHEME_HANDLE pHandle = hTheme;
968 HRESULT hr;
969
970 TRACE("(%p)\n", hTheme);
971
973 return E_HANDLE;
974
976 if (SUCCEEDED(hr))
977 {
979 g_cHandles--;
980 TRACE("Destroying handle 0x%x for class 0x%x. Count: %d\n", pHandle, pHandle->pClass, g_cHandles);
981 }
982 return hr;
983}
int g_cHandles
Definition: system.c:59
RTL_HANDLE_TABLE g_UxThemeHandleTable
Definition: system.c:58
#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:1241
PTHEME_CLASS pClass
Definition: uxthemep.h:108
#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 1142 of file system.c.

1143{
1144 TRACE("(%p)\n", hThemeFile);
1145 MSSTYLES_CloseThemeFile(hThemeFile);
1146 return S_OK;
1147}

Referenced by ActivateTheme().

◆ EnableTheming()

HRESULT WINAPI EnableTheming ( BOOL  fEnable)

Definition at line 657 of file system.c.

658{
659 HKEY hKey;
660 WCHAR szEnabled[] = {'0','\0'};
661
662 TRACE("(%d)\n", fEnable);
663
664 if (fEnable != (g_ActiveThemeFile != NULL)) {
665 if(fEnable)
667 else
670
671 if (fEnable) szEnabled[0] = '1';
673 RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (LPBYTE)szEnabled, sizeof(WCHAR));
675 }
677 }
678 return S_OK;
679}
#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:479
static const WCHAR szThemeManager[]
Definition: system.c:33
static void UXTHEME_RestoreSystemMetrics(void)
Definition: system.c:389
static const WCHAR szThemeActive[]
Definition: system.c:40
static void UXTHEME_BackupSystemMetrics(void)
Definition: system.c:345
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 1325 of file system.c.

1327{
1329 HRESULT hr;
1330 LPWSTR tmp;
1331 UINT resourceId = dwColorNum + 1000;
1332 TRACE("(%s,%s,%d)\n", debugstr_w(pszThemeFileName),
1333 debugstr_w(pszSizeName), dwColorNum);
1334
1336 return E_FAIL;
1337
1338 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, pszSizeName, &pt);
1339 if(FAILED(hr)) return hr;
1340
1341 tmp = pt->pszAvailColors;
1342 while(dwColorNum && *tmp) {
1343 dwColorNum--;
1344 tmp += lstrlenW(tmp)+1;
1345 }
1346 if(!dwColorNum && *tmp) {
1347 TRACE("%s\n", debugstr_w(tmp));
1348 lstrcpyW(pszColorNames->szName, tmp);
1349 LoadStringW (pt->hTheme, resourceId,
1350 pszColorNames->szDisplayName,
1351 sizeof (pszColorNames->szDisplayName) / sizeof (WCHAR));
1352 LoadStringW (pt->hTheme, resourceId+1000,
1353 pszColorNames->szTooltip,
1354 sizeof (pszColorNames->szTooltip) / sizeof (WCHAR));
1355 }
1356 else
1358
1360 return hr;
1361}
#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:69
WCHAR szName[MAX_PATH+1]
Definition: uxundoc.h:68
WCHAR szTooltip[MAX_PATH+1]
Definition: uxundoc.h:70
#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 1236 of file system.c.

1238{
1239 WCHAR szDir[MAX_PATH];
1241 static const WCHAR szStar[] = {'*','.','*','\0'};
1242 static const WCHAR szFormat[] = {'%','s','%','s','\\','%','s','.','m','s','s','t','y','l','e','s','\0'};
1243 static const WCHAR szDisplayName[] = {'d','i','s','p','l','a','y','n','a','m','e','\0'};
1244 static const WCHAR szTooltip[] = {'t','o','o','l','t','i','p','\0'};
1245 WCHAR szName[60];
1246 WCHAR szTip[60];
1247 HANDLE hFind;
1248 WIN32_FIND_DATAW wfd;
1249 HRESULT hr;
1250 size_t pathLen;
1251
1252 TRACE("(%s,%p,%p)\n", debugstr_w(pszThemePath), callback, lpData);
1253
1254 if(!pszThemePath || !callback)
1255 return E_POINTER;
1256
1257 lstrcpyW(szDir, pszThemePath);
1258 pathLen = lstrlenW (szDir);
1259 if ((pathLen > 0) && (pathLen < MAX_PATH-1) && (szDir[pathLen - 1] != '\\'))
1260 {
1261 szDir[pathLen] = '\\';
1262 szDir[pathLen+1] = 0;
1263 }
1264
1265 lstrcpyW(szPath, szDir);
1266 lstrcatW(szPath, szStar);
1267 TRACE("searching %s\n", debugstr_w(szPath));
1268
1269 hFind = FindFirstFileW(szPath, &wfd);
1270 if(hFind != INVALID_HANDLE_VALUE) {
1271 do {
1272 if(wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY
1273 && !(wfd.cFileName[0] == '.' && ((wfd.cFileName[1] == '.' && wfd.cFileName[2] == 0) || wfd.cFileName[1] == 0))) {
1274 wsprintfW(szPath, szFormat, szDir, wfd.cFileName, wfd.cFileName);
1275
1276 hr = GetThemeDocumentationProperty(szPath, szDisplayName, szName, sizeof(szName)/sizeof(szName[0]));
1277 if(FAILED(hr))
1278 {
1279 ERR("Failed to get theme name from %S\n", szPath);
1280 continue;
1281 }
1282
1283 hr = GetThemeDocumentationProperty(szPath, szTooltip, szTip, sizeof(szTip)/sizeof(szTip[0]));
1284 if (FAILED(hr))
1285 szTip[0] = 0;
1286
1287 TRACE("callback(%s,%s,%s,%p)\n", debugstr_w(szPath), debugstr_w(szName), debugstr_w(szTip), lpData);
1288 if(!callback(NULL, szPath, szName, szTip, NULL, lpData)) {
1289 TRACE("callback ended enum\n");
1290 break;
1291 }
1292 }
1293 } while(FindNextFileW(hFind, &wfd));
1294 FindClose(hFind);
1295 }
1296 return S_OK;
1297}
#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:1025
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 1388 of file system.c.

1390{
1392 HRESULT hr;
1393 LPWSTR tmp;
1394 UINT resourceId = dwSizeNum + 3000;
1395 TRACE("(%s,%s,%d)\n", debugstr_w(pszThemeFileName),
1396 debugstr_w(pszColorName), dwSizeNum);
1397
1399 return E_FAIL;
1400
1401 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, pszColorName, NULL, &pt);
1402 if(FAILED(hr)) return hr;
1403
1404 tmp = pt->pszAvailSizes;
1405 while(dwSizeNum && *tmp) {
1406 dwSizeNum--;
1407 tmp += lstrlenW(tmp)+1;
1408 }
1409 if(!dwSizeNum && *tmp) {
1410 TRACE("%s\n", debugstr_w(tmp));
1411 lstrcpyW(pszSizeNames->szName, tmp);
1412 LoadStringW (pt->hTheme, resourceId,
1413 pszSizeNames->szDisplayName,
1414 sizeof (pszSizeNames->szDisplayName) / sizeof (WCHAR));
1415 LoadStringW (pt->hTheme, resourceId+1000,
1416 pszSizeNames->szTooltip,
1417 sizeof (pszSizeNames->szTooltip) / sizeof (WCHAR));
1418 }
1419 else
1421
1423 return hr;
1424}

Referenced by LoadTheme().

◆ GetCurrentThemeName()

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

Definition at line 909 of file system.c.

912{
913 int cchar;
914
917
918 if (pszThemeFileName && dwMaxNameChars)
919 {
921 if(cchar > dwMaxNameChars)
923 lstrcpynW(pszThemeFileName, g_ActiveThemeFile->szThemeFile, cchar);
924 }
925
926 if (pszColorBuff && cchMaxColorChars)
927 {
929 if(cchar > cchMaxColorChars)
931 lstrcpynW(pszColorBuff, g_ActiveThemeFile->pszSelectedColor, cchar);
932 }
933
934 if (pszSizeBuff && cchMaxSizeChars)
935 {
937 if(cchar > cchMaxSizeChars)
939 lstrcpynW(pszSizeBuff, g_ActiveThemeFile->pszSelectedSize, cchar);
940 }
941
942 return S_OK;
943}
#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 1198 of file system.c.

1201{
1203 HRESULT hr;
1204 TRACE("(%s,%p,%d,%p,%d)\n", debugstr_w(pszThemeFileName),
1205 pszColorName, dwColorNameLen,
1206 pszSizeName, dwSizeNameLen);
1207
1209 return E_FAIL;
1210
1211 hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, NULL, &pt);
1212 if(FAILED(hr)) return hr;
1213
1214 lstrcpynW(pszColorName, pt->pszSelectedColor, dwColorNameLen);
1215 lstrcpynW(pszSizeName, pt->pszSelectedSize, dwSizeNameLen);
1216
1218 return S_OK;
1219}

◆ GetThemeDocumentationProperty()

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

Definition at line 1025 of file system.c.

1029{
1030 const WORD wDocToRes[] = {
1031 TMT_DISPLAYNAME,5000,
1032 TMT_TOOLTIP,5001,
1033 TMT_COMPANY,5002,
1034 TMT_AUTHOR,5003,
1035 TMT_COPYRIGHT,5004,
1036 TMT_URL,5005,
1037 TMT_VERSION,5006,
1038 TMT_DESCRIPTION,5007
1039 };
1040
1042 HRESULT hr;
1043 unsigned int i;
1044 int iDocId;
1045 TRACE("(%s,%s,%p,%d)\n", debugstr_w(pszThemeName), debugstr_w(pszPropertyName),
1046 pszValueBuff, cchMaxValChars);
1047
1049 return E_FAIL;
1050
1051 hr = MSSTYLES_OpenThemeFile(pszThemeName, NULL, NULL, &pt);
1052 if(FAILED(hr)) return hr;
1053
1054 /* Try to load from string resources */
1056 if(MSSTYLES_LookupProperty(pszPropertyName, NULL, &iDocId)) {
1057 for(i=0; i<sizeof(wDocToRes)/sizeof(wDocToRes[0]); i+=2) {
1058 if(wDocToRes[i] == iDocId) {
1059 if(LoadStringW(pt->hTheme, wDocToRes[i+1], pszValueBuff, cchMaxValChars)) {
1060 hr = S_OK;
1061 break;
1062 }
1063 }
1064 }
1065 }
1066 /* If loading from string resource failed, try getting it from the theme.ini */
1067 if(FAILED(hr)) {
1070 LPCWSTR lpValue;
1071 DWORD dwLen;
1072 if(UXINI_FindValue(uf, pszPropertyName, &lpValue, &dwLen)) {
1073 lstrcpynW(pszValueBuff, lpValue, min(dwLen+1,cchMaxValChars));
1074 hr = S_OK;
1075 }
1076 }
1077 UXINI_CloseINI(uf);
1078 }
1079
1081 return hr;
1082}
static const WCHAR szIniDocumentation[]
Definition: system.c:45
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 866 of file system.c.

867{
868 TRACE("(%p)\n", hwnd);
869
870 if(!IsWindow(hwnd))
871 {
873 return NULL;
874 }
875
877}
#define SetLastError(x)
Definition: compat.h:752
ATOM atWindowTheme
Definition: system.c:51
#define MAKEINTATOM(i)
Definition: winbase.h:1494
_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 988 of file system.c.

992{
993 FIXME("%d %d 0x%08x: stub\n", iPartId, iStateId, dwOptions);
994 if (!ValidateHandle(hTheme))
995 return E_HANDLE;
996 return E_NOTIMPL;
997}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:732
DWORD dwOptions
Definition: solitaire.cpp:25

◆ IsAppThemed()

◆ IsThemeActive()

BOOL WINAPI IsThemeActive ( void  )

Definition at line 621 of file system.c.

622{
623 BOOL bActive;
625 HKEY hKey;
626 WCHAR tmp[10];
627 DWORD buffsize;
628
629 TRACE("IsThemeActive\n");
631
633 return TRUE;
634
636 return FALSE;
637
638 bActive = FALSE;
640 if (Result == ERROR_SUCCESS)
641 {
642 buffsize = sizeof(tmp);
643 if (!RegQueryValueExW(hKey, szThemeActive, NULL, NULL, (LPBYTE)tmp, &buffsize))
644 bActive = (tmp[0] != '0');
646 }
647
648 return bActive;
649}
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 1002 of file system.c.

1003{
1004 PTHEME_CLASS pClass;
1005
1006 TRACE("(%p,%d,%d)\n", hTheme, iPartId, iStateId);
1007
1008 pClass = ValidateHandle(hTheme);
1009 if (!pClass)
1010 {
1012 return FALSE;
1013 }
1014 if(MSSTYLES_FindPartState(pClass, iPartId, iStateId, NULL))
1015 return TRUE;
1016 return FALSE;
1017}
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 834 of file system.c.

835{
836 return OpenThemeDataInternal(g_ActiveThemeFile, hwnd, pszClassList, flags);
837}
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 842 of file system.c.

843{
844 return OpenThemeDataInternal((PTHEME_FILE)hThemeFile, hwnd, pszClassList, flags);
845}

Referenced by DrawNCPreview(), and LoadSchemeFromTheme().

◆ OpenThemeDataInternal()

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

Definition at line 750 of file system.c.

751{
752 WCHAR szAppBuff[256];
753 WCHAR szClassBuff[256];
754 LPCWSTR pszAppName;
755 LPCWSTR pszUseClassList;
756 HTHEME hTheme = NULL;
757 TRACE("(%p,%s, %x)\n", hwnd, debugstr_w(pszClassList), flags);
758
759 if(!pszClassList)
760 {
762 return NULL;
763 }
764
765 if ((flags & OTD_NONCLIENT) && !(dwThemeAppProperties & STAP_ALLOW_NONCLIENT))
766 {
768 return NULL;
769 }
770
771 if (!(flags & OTD_NONCLIENT) && !(dwThemeAppProperties & STAP_ALLOW_CONTROLS))
772 {
774 return NULL;
775 }
776
777 if (ThemeFile)
778 {
779 pszAppName = UXTHEME_GetWindowProperty(hwnd, atSubAppName, szAppBuff, sizeof(szAppBuff)/sizeof(szAppBuff[0]));
780 /* If SetWindowTheme was used on the window, that overrides the class list passed to this function */
781 pszUseClassList = UXTHEME_GetWindowProperty(hwnd, atSubIdList, szClassBuff, sizeof(szClassBuff)/sizeof(szClassBuff[0]));
782 if(!pszUseClassList)
783 pszUseClassList = pszClassList;
784
785 if (pszUseClassList)
786 {
787 PTHEME_CLASS pClass;
788 PUXTHEME_HANDLE pHandle;
789
790 if (!ThemeFile->classes)
791 MSSTYLES_ParseThemeIni(ThemeFile);
792 pClass = MSSTYLES_OpenThemeClass(ThemeFile, pszAppName, pszUseClassList);
793
794 if (pClass)
795 {
797 if (pHandle)
798 {
799 g_cHandles++;
800 TRACE("Created handle 0x%x for class 0x%x, app %S, class %S. Count: %d\n", pHandle, pClass, pszAppName, pszUseClassList, g_cHandles);
801 pHandle->pClass = pClass;
802 pHandle->Handle.Flags = RTL_HANDLE_VALID;
803 hTheme = pHandle;
804 }
805 else
806 {
808 }
809 }
810 }
811 }
812
813 if(IsWindow(hwnd))
814 {
815 if ((flags & OTD_NONCLIENT) == 0)
816 {
818 }
819 }
820 else
821 {
823 }
824
826
827 TRACE(" = %p\n", hTheme);
828 return hTheme;
829}
static LPWSTR UXTHEME_GetWindowProperty(HWND hwnd, ATOM aProp, LPWSTR pszBuffer, int dwLen)
Definition: system.c:721
static ATOM atSubIdList
Definition: system.c:53
static ATOM atSubAppName
Definition: system.c:52
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:370
ULONG Flags
Definition: rtltypes.h:1244
PTHEME_CLASS classes
Definition: uxthemep.h:88
RTL_HANDLE_TABLE_ENTRY Handle
Definition: uxthemep.h:107
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 1116 of file system.c.

1119{
1120 TRACE("(%s,%s,%s,%p,%d)\n", debugstr_w(pszThemeFileName),
1121 debugstr_w(pszColorName), debugstr_w(pszSizeName),
1122 hThemeFile, unknown);
1123
1125 return E_FAIL;
1126
1127 return MSSTYLES_OpenThemeFile(pszThemeFileName, pszColorName, pszSizeName, (PTHEME_FILE*)hThemeFile);
1128}

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

◆ ParseThemeIniFile()

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

Definition at line 1445 of file system.c.

1447{
1448 FIXME("%s %s: stub\n", debugstr_w(pszIniFileName), debugstr_w(pszUnknown));
1449 return E_NOTIMPL;
1450}

Referenced by START_TEST().

◆ query_reg_path()

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

Definition at line 86 of file system.c.

88{
89 DWORD dwRet, dwType, dwUnExpDataLen = MAX_PATH * sizeof(WCHAR), dwExpDataLen;
90
91 TRACE("(hkey=%p,%s,%p)\n", hKey, debugstr_w(lpszValue),
92 pvData);
93
94 dwRet = RegQueryValueExW(hKey, lpszValue, 0, &dwType, pvData, &dwUnExpDataLen);
95 if (dwRet!=ERROR_SUCCESS && dwRet!=ERROR_MORE_DATA)
96 return dwRet;
97
98 if (dwType == REG_EXPAND_SZ)
99 {
100 DWORD nBytesToAlloc;
101
102 /* Expand type REG_EXPAND_SZ into REG_SZ */
103 LPWSTR szData;
104
105 /* If the caller didn't supply a buffer or the buffer is too small we have
106 * to allocate our own
107 */
108 if (dwRet == ERROR_MORE_DATA)
109 {
110 WCHAR cNull = '\0';
111 nBytesToAlloc = dwUnExpDataLen;
112
113 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
114 RegQueryValueExW (hKey, lpszValue, 0, NULL, (LPBYTE)szData, &nBytesToAlloc);
115 dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1);
116 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
117 LocalFree(szData);
118 }
119 else
120 {
121 nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR);
122 szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
123 lstrcpyW(szData, pvData);
124 dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, MAX_PATH );
125 if (dwExpDataLen > MAX_PATH) dwRet = ERROR_MORE_DATA;
126 dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
127 LocalFree(szData);
128 }
129 }
130
131 return dwRet;
132}
#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:401
_In_ ULONG _In_opt_ PVOID pvData
Definition: winddi.h:3749

Referenced by UXTHEME_LoadTheme().

◆ QueryThemeServices()

DWORD WINAPI QueryThemeServices ( void  )

Definition at line 1094 of file system.c.

1095{
1096 FIXME("stub\n");
1097 return 3; /* This is what is returned under XP in most cases */
1098}

◆ save_sys_colors()

static void save_sys_colors ( HKEY  baseKey)
static

Definition at line 318 of file system.c.

319{
320 char colorStr[13];
321 HKEY hKey;
322 int i;
323
324 if (RegCreateKeyExW( baseKey, strColorKey,
325 0, 0, 0, KEY_ALL_ACCESS,
326 0, &hKey, 0 ) == ERROR_SUCCESS)
327 {
328 for (i = 0; i < NUM_SYS_COLORS; i++)
329 {
330 COLORREF col = GetSysColor (i);
331
332 sprintf (colorStr, "%d %d %d",
333 GetRValue (col), GetGValue (col), GetBValue (col));
334
336 (BYTE*)colorStr, strlen (colorStr)+1);
337 }
339 }
340}
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:294
#define NUM_SYS_COLORS
Definition: system.c:316
static const char *const SysColorsNames[]
Definition: system.c:260
#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 956 of file system.c.

957{
958 TRACE("(0x%08x)\n", dwFlags);
960}
_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 884 of file system.c.

886{
887 HRESULT hr;
888 TRACE("(%p,%s,%s)\n", hwnd, debugstr_w(pszSubAppName),
889 debugstr_w(pszSubIdList));
890
891 if(!IsWindow(hwnd))
892 return E_HANDLE;
893
895 if (!SUCCEEDED(hr))
896 return hr;
897
899 if (!SUCCEEDED(hr))
900 return hr;
901
903 return hr;
904}
static HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
Definition: system.c:687

Referenced by test_SetWindowTheme().

◆ UXTHEME_ApplyTheme()

static HRESULT UXTHEME_ApplyTheme ( PTHEME_FILE  tf)
static

Definition at line 514 of file system.c.

515{
516 HKEY hKey;
517 WCHAR tmp[2];
518 HRESULT hr;
519
520 TRACE("UXTHEME_ApplyTheme\n");
521
522 if (tf && !g_ActiveThemeFile)
523 {
525 }
526
528 if (FAILED(hr))
529 return hr;
530
531 if (!tf)
532 {
534 }
535
536 TRACE("Writing theme config to registry\n");
538 tmp[0] = g_ActiveThemeFile ? '1' : '0';
539 tmp[1] = '\0';
540 RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (const BYTE*)tmp, sizeof(WCHAR)*2);
541 if (g_ActiveThemeFile) {
542 RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)tf->pszSelectedColor,
543 (lstrlenW(tf->pszSelectedColor)+1)*sizeof(WCHAR));
544 RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)tf->pszSelectedSize,
545 (lstrlenW(tf->pszSelectedSize)+1)*sizeof(WCHAR));
546 RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)tf->szThemeFile,
547 (lstrlenW(tf->szThemeFile)+1)*sizeof(WCHAR));
548 }
549 else {
553
554 }
556 }
557 else
558 TRACE("Failed to open theme registry key\n");
559
561
562 return hr;
563}
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:41
static const WCHAR szDllName[]
Definition: system.c:43
static HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
Definition: system.c:134
static const WCHAR szColorName[]
Definition: system.c:42
HFONT tf
Definition: icontest.c:17

Referenced by ApplyTheme().

◆ UXTHEME_BackupSystemMetrics()

static void UXTHEME_BackupSystemMetrics ( void  )
static

Definition at line 345 of file system.c.

346{
347 HKEY hKey;
348 const struct BackupSysParam* bsp = backupSysParams;
349
351 0, 0, 0, KEY_ALL_ACCESS,
352 0, &hKey, 0) == ERROR_SUCCESS)
353 {
354 NONCLIENTMETRICSW ncm;
355 LOGFONTW iconTitleFont;
356
357 /* back up colors */
359
360 /* back up "other" settings */
361 while (bsp->spiGet >= 0)
362 {
363 DWORD value;
364
365 SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
367 (LPBYTE)&value, sizeof (value));
368
369 bsp++;
370 }
371
372 /* back up non-client metrics */
373 memset (&ncm, 0, sizeof (ncm));
374 ncm.cbSize = sizeof (ncm);
375 SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof (ncm), &ncm, 0);
377 sizeof (ncm));
378 memset (&iconTitleFont, 0, sizeof (iconTitleFont));
379 SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (iconTitleFont),
380 &iconTitleFont, 0);
382 (LPBYTE)&iconTitleFont, sizeof (iconTitleFont));
383
385 }
386}
static const WCHAR keyIconTitleFont[]
Definition: system.c:302
static const WCHAR keyNonClientMetrics[]
Definition: system.c:300
static const struct BackupSysParam backupSysParams[]
static void save_sys_colors(HKEY baseKey)
Definition: system.c:318
#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:308
Definition: pdh_main.c:96
#define SPI_GETICONTITLELOGFONT
Definition: winuser.h:1391
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 70 of file system.c.

71{
72 if (hWnd == NULL)
73 {
75 }
76 else
77 {
80 }
81 return TRUE;
82}
static BOOL CALLBACK UXTHEME_send_theme_changed(HWND hWnd, LPARAM enable)
Definition: system.c:63
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 721 of file system.c.

722{
723 ATOM atValue = (ATOM)(size_t)GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
724 if(atValue) {
725 if(GetAtomNameW(atValue, pszBuffer, dwLen))
726 return pszBuffer;
727 TRACE("property defined, but unable to get value\n");
728 }
729 return NULL;
730}
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 568 of file system.c.

569{
570 static const WCHAR szWindowTheme[] = {
571 'u','x','_','t','h','e','m','e','\0'
572 };
573 static const WCHAR szSubAppName[] = {
574 'u','x','_','s','u','b','a','p','p','\0'
575 };
576 static const WCHAR szSubIdList[] = {
577 'u','x','_','s','u','b','i','d','l','s','t','\0'
578 };
579 static const WCHAR szDialogThemeEnabled[] = {
580 'u','x','_','d','i','a','l','o','g','t','h','e','m','e','\0'
581 };
582
583 hDllInst = hInst;
584
585 atWindowTheme = GlobalAddAtomW(szWindowTheme);
586 atSubAppName = GlobalAddAtomW(szSubAppName);
587 atSubIdList = GlobalAddAtomW(szSubIdList);
588 atDialogThemeEnabled = GlobalAddAtomW(szDialogThemeEnabled);
589 atWndContext = GlobalAddAtomW(L"ux_WndContext");
590
592 g_cHandles = 0;
593
595}
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
DWORD WINAPI TlsAlloc(VOID)
Definition: thread.c:1100
DWORD gdwErrorInfoTlsIndex
Definition: system.c:27
HINSTANCE hDllInst
Definition: system.c:47
ATOM atWndContext
Definition: system.c:54
ATOM atDialogThemeEnabled
Definition: system.c:48
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 185 of file system.c.

186{
187 HKEY hKey;
188 DWORD buffsize;
189 HRESULT hr;
190 WCHAR tmp[10];
192 WCHAR szCurrentTheme[MAX_PATH];
193 WCHAR szCurrentColor[64];
194 WCHAR szCurrentSize[64];
196
197 if ((bLoad != FALSE) && g_bThemeHooksActive)
198 {
199 /* Get current theme configuration */
201 TRACE("Loading theme config\n");
202 buffsize = sizeof(tmp);
203 if(!RegQueryValueExW(hKey, szThemeActive, NULL, NULL, (LPBYTE)tmp, &buffsize)) {
204 bThemeActive = (tmp[0] != '0');
205 }
206 else {
208 TRACE("Failed to get ThemeActive: %d\n", GetLastError());
209 }
210 buffsize = sizeof(szCurrentColor);
211 if(RegQueryValueExW(hKey, szColorName, NULL, NULL, (LPBYTE)szCurrentColor, &buffsize))
212 szCurrentColor[0] = '\0';
213 buffsize = sizeof(szCurrentSize);
214 if(RegQueryValueExW(hKey, szSizeName, NULL, NULL, (LPBYTE)szCurrentSize, &buffsize))
215 szCurrentSize[0] = '\0';
216 if (query_reg_path (hKey, szDllName, szCurrentTheme))
217 szCurrentTheme[0] = '\0';
219 }
220 else
221 TRACE("Failed to open theme registry key\n");
222 }
223 else
224 {
226 }
227
228 if(bThemeActive)
229 {
230 if( bIsThemeActive(szCurrentTheme, szCurrentColor, szCurrentSize) )
231 {
232 TRACE("Tried to load active theme again\n");
233 return;
234 }
235
236 /* Make sure the theme requested is actually valid */
237 hr = MSSTYLES_OpenThemeFile(szCurrentTheme,
238 szCurrentColor[0]?szCurrentColor:NULL,
239 szCurrentSize[0]?szCurrentSize:NULL,
240 &pt);
241 if(FAILED(hr)) {
243 }
244 else {
245 TRACE("Theme active: %s %s %s\n", debugstr_w(szCurrentTheme),
246 debugstr_w(szCurrentColor), debugstr_w(szCurrentSize));
247
250 }
251 }
252 if(!bThemeActive) {
254 TRACE("Theming not active\n");
255 }
256}
static BOOL bIsThemeActive(LPCWSTR pszTheme, LPCWSTR pszColor, LPCWSTR pszSize)
Definition: system.c:147
static DWORD query_reg_path(HKEY hKey, LPCWSTR lpszValue, LPVOID pvData)
Definition: system.c:86
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 389 of file system.c.

390{
391 HKEY hKey;
392 const struct BackupSysParam* bsp = backupSysParams;
393
396 {
397 HKEY colorKey;
398
399 /* read backed-up colors */
401 0, KEY_QUERY_VALUE, &colorKey) == ERROR_SUCCESS)
402 {
403 int i;
404 COLORREF sysCols[NUM_SYS_COLORS];
405 int sysColsIndices[NUM_SYS_COLORS];
406 int sysColCount = 0;
407
408 for (i = 0; i < NUM_SYS_COLORS; i++)
409 {
410 DWORD type;
411 char colorStr[13];
412 DWORD count = sizeof(colorStr);
413
414 if (RegQueryValueExA (colorKey, SysColorsNames[i], 0,
415 &type, (LPBYTE) colorStr, &count) == ERROR_SUCCESS)
416 {
417 int r, g, b;
418 if (sscanf (colorStr, "%d %d %d", &r, &g, &b) == 3)
419 {
420 sysColsIndices[sysColCount] = i;
421 sysCols[sysColCount] = RGB(r, g, b);
422 sysColCount++;
423 }
424 }
425 }
426 RegCloseKey (colorKey);
427
428 SetSysColors (sysColCount, sysColsIndices, sysCols);
429 }
430
431 /* read backed-up other settings */
432 while (bsp->spiGet >= 0)
433 {
434 DWORD value;
435 DWORD count = sizeof(value);
436 DWORD type;
437
438 if (RegQueryValueExW (hKey, bsp->keyName, 0,
440 {
442 }
443
444 bsp++;
445 }
446
447 /* read backed-up non-client metrics */
448 {
449 NONCLIENTMETRICSW ncm;
450 LOGFONTW iconTitleFont;
451 DWORD count = sizeof(ncm);
452 DWORD type;
453
455 &type, (LPBYTE)&ncm, &count) == ERROR_SUCCESS)
456 {
457 SystemParametersInfoW (SPI_SETNONCLIENTMETRICS,
459 }
460
461 count = sizeof(iconTitleFont);
462
464 &type, (LPBYTE)&iconTitleFont, &count) == ERROR_SUCCESS)
465 {
467 count, &iconTitleFont, SPIF_UPDATEINIFILE);
468 }
469 }
470
472 }
473}
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 count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
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:1582
#define SPI_SETICONTITLELOGFONT
Definition: winuser.h:1394

Referenced by EnableTheming(), and UXTHEME_ApplyTheme().

◆ UXTHEME_SaveSystemMetrics()

static void UXTHEME_SaveSystemMetrics ( void  )
static

Definition at line 479 of file system.c.

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

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 63 of file system.c.

64{
65 SendMessageW(hWnd, WM_THEMECHANGED, enable, 0);
66 return TRUE;
67}
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 134 of file system.c.

135{
140 {
143 }
144 return S_OK;
145}
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 687 of file system.c.

688{
689 ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
690 if(oldValue)
691 {
692 DeleteAtom(oldValue);
693 }
694
695 if(pszValue)
696 {
697 ATOM atValue;
698
699 /* A string with zero lenght is not acceptatble in AddAtomW but we want to support
700 users passing an empty string meaning they want no theme for the specified window */
701 if(!pszValue[0])
702 pszValue = L"0";
703
704 atValue = AddAtomW(pszValue);
705 if (!atValue)
706 {
707 ERR("AddAtomW for %S failed with last error %d!\n", pszValue, GetLastError());
709 }
710
711 if (!SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp), (LPWSTR)MAKEINTATOM(atValue)))
712 {
713 ERR("SetPropW for atom %d failed with last error %d\n", aProp, GetLastError());
714 if(atValue) DeleteAtom(atValue);
716 }
717 }
718 return S_OK;
719}
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().

◆ UXTHEME_UnInitSystem()

void UXTHEME_UnInitSystem ( HINSTANCE  hInst)

Definition at line 600 of file system.c.

601{
603
606}
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166
VOID UXTHEME_DeleteParseErrorInfo(VOID)
Definition: errinfo.c:34
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:575

Referenced by DllMain().

◆ ValidateHandle()

PTHEME_CLASS ValidateHandle ( HTHEME  hTheme)

Definition at line 732 of file system.c.

733{
734 PUXTHEME_HANDLE pHandle;
735
736 if (!g_bThemeHooksActive || !hTheme || hTheme == INVALID_HANDLE_VALUE)
737 return NULL;
738
740 {
741 ERR("Invalid handle 0x%x!\n", hTheme);
742 return NULL;
743 }
744
745 pHandle = hTheme;
746 return pHandle->pClass;
747}

Referenced by HitTestThemeBackground(), and IsThemePartDefined().

Variable Documentation

◆ atDialogThemeEnabled

ATOM atDialogThemeEnabled

◆ atSubAppName

ATOM atSubAppName
static

Definition at line 52 of file system.c.

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

◆ atSubIdList

ATOM atSubIdList
static

Definition at line 53 of file system.c.

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

◆ atWindowTheme

ATOM atWindowTheme

Definition at line 51 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:298
static const WCHAR keyFlatMenus[]
Definition: system.c:297

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

◆ dwThemeAppProperties

DWORD dwThemeAppProperties = STAP_ALLOW_NONCLIENT | STAP_ALLOW_CONTROLS
static

Definition at line 50 of file system.c.

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

◆ g_ActiveThemeFile

◆ g_cHandles

int g_cHandles

Definition at line 59 of file system.c.

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

◆ g_UxThemeHandleTable

RTL_HANDLE_TABLE g_UxThemeHandleTable

Definition at line 58 of file system.c.

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

◆ gdwErrorInfoTlsIndex

◆ hDllInst

HINSTANCE hDllInst

◆ keyFlatMenus

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

Definition at line 297 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 298 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 302 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 300 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 294 of file system.c.

Referenced by save_sys_colors(), and UXTHEME_RestoreSystemMetrics().

◆ SysColorsNames

const char* const SysColorsNames[]
static

Definition at line 260 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 42 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 43 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 45 of file system.c.

Referenced by GetThemeDocumentationProperty().

◆ szSizeName

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

Definition at line 41 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 40 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 33 of file system.c.

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