ReactOS  0.4.13-dev-482-ge57f103
uxthemep.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <winnls.h>
#include <windowsx.h>
#include <undocuser.h>
#include <undocgdi.h>
#include <uxtheme.h>
#include <uxundoc.h>
#include <vfwmsgs.h>
#include <tmschema.h>
#include <ndk/ntndk.h>
#include <ndk/rtltypes.h>
#include <wine/debug.h>
Include dependency graph for uxthemep.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _THEME_PROPERTY
 
struct  _THEME_PARTSTATE
 
struct  _THEME_CLASS
 
struct  _THEME_IMAGE
 
struct  _THEME_FILE
 
struct  _UXTHEME_HANDLE
 
struct  _WND_DATA
 
struct  _DRAW_CONTEXT
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define NTOS_MODE_USER
 
#define TMT_ENUM   200
 
#define MAX_THEME_APP_NAME   60
 
#define MAX_THEME_CLASS_NAME   60
 
#define MAX_THEME_VALUE_NAME   60
 
#define HT_ISBUTTON(ht)   ((ht) == HTMINBUTTON || (ht) == HTMAXBUTTON || (ht) == HTCLOSE || (ht) == HTHELP)
 
#define HASSIZEGRIP(Style, ExStyle, ParentStyle, WindowRect, ParentClientRect)
 
#define HAS_MENU(hwnd, style)   ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && GetMenu(hwnd))
 
#define BUTTON_GAP_SIZE   2
 
#define MENU_BAR_ITEMS_SPACE   (12)
 
#define SCROLL_TIMER   0 /* Scroll timer id */
 
#define SCROLL_ARROW_THUMB_OVERLAP   0
 
#define SCROLL_FIRST_DELAY   200
 
#define SCROLL_REPEAT_DELAY   50
 
#define SCROLL_MIN_THUMB   6
 
#define SCROLL_MIN_RECT   4
 
#define ALPHABLEND_NONE   0
 
#define ALPHABLEND_BINARY   1
 
#define ALPHABLEND_FULL   2
 

Typedefs

typedef struct _THEME_PROPERTY THEME_PROPERTY
 
typedef struct _THEME_PROPERTYPTHEME_PROPERTY
 
typedef struct _THEME_PARTSTATE THEME_PARTSTATE
 
typedef struct _THEME_PARTSTATEPTHEME_PARTSTATE
 
typedef struct _THEME_CLASS THEME_CLASS
 
typedef struct _THEME_CLASSPTHEME_CLASS
 
typedef struct _THEME_IMAGE THEME_IMAGE
 
typedef struct _THEME_IMAGEPTHEME_IMAGE
 
typedef struct _THEME_FILE THEME_FILE
 
typedef struct _THEME_FILEPTHEME_FILE
 
typedef struct _UXINI_FILEPUXINI_FILE
 
typedef struct _UXTHEME_HANDLE UXTHEME_HANDLE
 
typedef struct _UXTHEME_HANDLEPUXTHEME_HANDLE
 
typedef struct _WND_DATA WND_DATA
 
typedef struct _WND_DATAPWND_DATA
 
typedef struct _DRAW_CONTEXT DRAW_CONTEXT
 
typedef struct _DRAW_CONTEXTPDRAW_CONTEXT
 

Enumerations

enum  SCROLL_HITTEST {
  SCROLL_NOWHERE, SCROLL_TOP_ARROW, SCROLL_TOP_RECT, SCROLL_THUMB,
  SCROLL_BOTTOM_RECT, SCROLL_BOTTOM_ARROW, SCROLL_NOWHERE, SCROLL_TOP_ARROW,
  SCROLL_TOP_RECT, SCROLL_THUMB, SCROLL_BOTTOM_RECT, SCROLL_BOTTOM_ARROW
}
 
enum  CAPTIONBUTTON { CLOSEBUTTON, MAXBUTTON, MINBUTTON, HELPBUTTON }
 
enum  THEME_BUTTON_STATES {
  BUTTON_NORMAL = 1, BUTTON_HOT, BUTTON_PRESSED, BUTTON_DISABLED,
  BUTTON_INACTIVE, BUTTON_INACTIVE_HOT, BUTTON_INACTIVE_PRESSED, BUTTON_INACTIVE_DISABLED
}
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (uxtheme)
 
PTHEME_CLASS ValidateHandle (HTHEME hTheme)
 
HRESULT UXTHEME_LoadImage (HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph, HBITMAP *hBmp, RECT *bmpRect, BOOL *hasImageAlpha)
 
BOOL MSSTYLES_LookupProperty (LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId)
 
BOOL MSSTYLES_LookupEnum (LPCWSTR pszValueName, int dwEnum, int *dwValue)
 
BOOL MSSTYLES_LookupPartState (LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId)
 
HRESULT MSSTYLES_OpenThemeFile (LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWSTR pszSizeName, PTHEME_FILE *tf)
 
HRESULT MSSTYLES_ReferenceTheme (PTHEME_FILE tf)
 
void MSSTYLES_CloseThemeFile (PTHEME_FILE tf)
 
void MSSTYLES_ParseThemeIni (PTHEME_FILE tf)
 
PTHEME_CLASS MSSTYLES_OpenThemeClass (PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassList)
 
HRESULT MSSTYLES_CloseThemeClass (PTHEME_CLASS tc)
 
PUXINI_FILE MSSTYLES_GetThemeIni (PTHEME_FILE tf)
 
PTHEME_PARTSTATE MSSTYLES_FindPartState (PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext)
 
PTHEME_PROPERTY MSSTYLES_FindProperty (PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
 
PTHEME_PROPERTY MSSTYLES_FindMetric (PTHEME_FILE tf, int iPropertyPrimitive, int iPropertyId)
 
HBITMAP MSSTYLES_LoadBitmap (PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL *hasAlpha)
 
HRESULT MSSTYLES_GetPropertyBool (PTHEME_PROPERTY tp, BOOL *pfVal)
 
HRESULT MSSTYLES_GetPropertyColor (PTHEME_PROPERTY tp, COLORREF *pColor)
 
HRESULT MSSTYLES_GetPropertyFont (PTHEME_PROPERTY tp, HDC hdc, LOGFONTW *pFont)
 
HRESULT MSSTYLES_GetPropertyInt (PTHEME_PROPERTY tp, int *piVal)
 
HRESULT MSSTYLES_GetPropertyIntList (PTHEME_PROPERTY tp, INTLIST *pIntList)
 
HRESULT MSSTYLES_GetPropertyPosition (PTHEME_PROPERTY tp, POINT *pPoint)
 
HRESULT MSSTYLES_GetPropertyString (PTHEME_PROPERTY tp, LPWSTR pszBuff, int cchMaxBuffChars)
 
HRESULT MSSTYLES_GetPropertyRect (PTHEME_PROPERTY tp, RECT *pRect)
 
HRESULT MSSTYLES_GetPropertyMargins (PTHEME_PROPERTY tp, RECT *prc, MARGINS *pMargins)
 
PUXINI_FILE UXINI_LoadINI (HMODULE hTheme, LPCWSTR lpName)
 
void UXINI_CloseINI (PUXINI_FILE uf)
 
LPCWSTR UXINI_GetNextSection (PUXINI_FILE uf, DWORD *dwLen)
 
BOOL UXINI_FindSection (PUXINI_FILE uf, LPCWSTR lpName)
 
LPCWSTR UXINI_GetNextValue (PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen)
 
BOOL UXINI_FindValue (PUXINI_FILE uf, LPCWSTR lpName, LPCWSTR *lpValue, DWORD *dwValueLen)
 
LRESULT CALLBACK ThemeWndProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam, WNDPROC DefWndProc)
 
void ThemeCalculateCaptionButtonsPos (HWND hWnd, HTHEME htheme)
 
void ThemeDrawScrollBar (PDRAW_CONTEXT pcontext, INT Bar, POINT *pt)
 
VOID NC_TrackScrollBar (HWND Wnd, WPARAM wParam, POINT Pt)
 
void ThemeInitDrawContext (PDRAW_CONTEXT pcontext, HWND hWnd, HRGN hRgn)
 
void ThemeCleanupDrawContext (PDRAW_CONTEXT pcontext)
 
PWND_DATA ThemeGetWndData (HWND hWnd)
 
HTHEME GetNCCaptionTheme (HWND hWnd, DWORD style)
 
HTHEME GetNCScrollbarTheme (HWND hWnd, DWORD style)
 
void UXTHEME_InitSystem (HINSTANCE hInst)
 
void UXTHEME_LoadTheme (BOOL bLoad)
 
BOOL CALLBACK UXTHEME_broadcast_theme_changed (HWND hWnd, LPARAM enable)
 

Variables

HINSTANCE hDllInst
 
ATOM atWindowTheme
 
ATOM atWndContext
 
BOOL g_bThemeHooksActive
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 7 of file uxthemep.h.

◆ ALPHABLEND_BINARY

#define ALPHABLEND_BINARY   1

Definition at line 267 of file uxthemep.h.

◆ ALPHABLEND_FULL

#define ALPHABLEND_FULL   2

Definition at line 269 of file uxthemep.h.

◆ ALPHABLEND_NONE

#define ALPHABLEND_NONE   0

Definition at line 265 of file uxthemep.h.

◆ BUTTON_GAP_SIZE

#define BUTTON_GAP_SIZE   2

Definition at line 224 of file uxthemep.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 8 of file uxthemep.h.

◆ HAS_MENU

#define HAS_MENU (   hwnd,
  style 
)    ((((style) & (WS_CHILD | WS_POPUP)) != WS_CHILD) && GetMenu(hwnd))

Definition at line 222 of file uxthemep.h.

◆ HASSIZEGRIP

#define HASSIZEGRIP (   Style,
  ExStyle,
  ParentStyle,
  WindowRect,
  ParentClientRect 
)
Value:
((!(Style & WS_CHILD) && (Style & WS_THICKFRAME) && !(Style & WS_MAXIMIZE)) || \
((Style & WS_CHILD) && (ParentStyle & WS_THICKFRAME) && !(ParentStyle & WS_MAXIMIZE) && \
(WindowRect.right - WindowRect.left == ParentClientRect.right) && \
(WindowRect.bottom - WindowRect.top == ParentClientRect.bottom)))
#define WS_THICKFRAME
Definition: pedump.c:630
#define WS_CHILD
Definition: pedump.c:617
const DWORD Style
Definition: appswitch.c:71
#define WS_MAXIMIZE
Definition: pedump.c:623

Definition at line 216 of file uxthemep.h.

◆ HT_ISBUTTON

#define HT_ISBUTTON (   ht)    ((ht) == HTMINBUTTON || (ht) == HTMAXBUTTON || (ht) == HTCLOSE || (ht) == HTHELP)

Definition at line 214 of file uxthemep.h.

◆ MAX_THEME_APP_NAME

#define MAX_THEME_APP_NAME   60

Definition at line 32 of file uxthemep.h.

◆ MAX_THEME_CLASS_NAME

#define MAX_THEME_CLASS_NAME   60

Definition at line 33 of file uxthemep.h.

◆ MAX_THEME_VALUE_NAME

#define MAX_THEME_VALUE_NAME   60

Definition at line 34 of file uxthemep.h.

◆ MENU_BAR_ITEMS_SPACE

#define MENU_BAR_ITEMS_SPACE   (12)

Definition at line 226 of file uxthemep.h.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 23 of file uxthemep.h.

◆ SCROLL_ARROW_THUMB_OVERLAP

#define SCROLL_ARROW_THUMB_OVERLAP   0

Definition at line 231 of file uxthemep.h.

◆ SCROLL_FIRST_DELAY

#define SCROLL_FIRST_DELAY   200

Definition at line 234 of file uxthemep.h.

◆ SCROLL_MIN_RECT

#define SCROLL_MIN_RECT   4

Definition at line 243 of file uxthemep.h.

◆ SCROLL_MIN_THUMB

#define SCROLL_MIN_THUMB   6

Definition at line 240 of file uxthemep.h.

◆ SCROLL_REPEAT_DELAY

#define SCROLL_REPEAT_DELAY   50

Definition at line 237 of file uxthemep.h.

◆ SCROLL_TIMER

#define SCROLL_TIMER   0 /* Scroll timer id */

Definition at line 228 of file uxthemep.h.

◆ TMT_ENUM

#define TMT_ENUM   200

Definition at line 30 of file uxthemep.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 6 of file uxthemep.h.

Typedef Documentation

◆ DRAW_CONTEXT

◆ PDRAW_CONTEXT

◆ PTHEME_CLASS

◆ PTHEME_FILE

◆ PTHEME_IMAGE

◆ PTHEME_PARTSTATE

◆ PTHEME_PROPERTY

◆ PUXINI_FILE

Definition at line 91 of file uxthemep.h.

◆ PUXTHEME_HANDLE

◆ PWND_DATA

◆ THEME_CLASS

◆ THEME_FILE

◆ THEME_IMAGE

◆ THEME_PARTSTATE

◆ THEME_PROPERTY

◆ UXTHEME_HANDLE

◆ WND_DATA

Enumeration Type Documentation

◆ CAPTIONBUTTON

Enumerator
CLOSEBUTTON 
MAXBUTTON 
MINBUTTON 
HELPBUTTON 

Definition at line 190 of file uxthemep.h.

191 {
192  CLOSEBUTTON,
193  MAXBUTTON,
194  MINBUTTON,
195  HELPBUTTON
196 } CAPTIONBUTTON;
CAPTIONBUTTON
Definition: uxthemep.h:190

◆ SCROLL_HITTEST

Enumerator
SCROLL_NOWHERE 
SCROLL_TOP_ARROW 
SCROLL_TOP_RECT 
SCROLL_THUMB 
SCROLL_BOTTOM_RECT 
SCROLL_BOTTOM_ARROW 
SCROLL_NOWHERE 
SCROLL_TOP_ARROW 
SCROLL_TOP_RECT 
SCROLL_THUMB 
SCROLL_BOTTOM_RECT 
SCROLL_BOTTOM_ARROW 

Definition at line 138 of file uxthemep.h.

139 {
140  SCROLL_NOWHERE, /* Outside the scroll bar */
141  SCROLL_TOP_ARROW, /* Top or left arrow */
142  SCROLL_TOP_RECT, /* Rectangle between the top arrow and the thumb */
143  SCROLL_THUMB, /* Thumb rectangle */
144  SCROLL_BOTTOM_RECT, /* Rectangle between the thumb and the bottom arrow */
145  SCROLL_BOTTOM_ARROW /* Bottom or right arrow */
146 };

◆ THEME_BUTTON_STATES

Enumerator
BUTTON_NORMAL 
BUTTON_HOT 
BUTTON_PRESSED 
BUTTON_DISABLED 
BUTTON_INACTIVE 
BUTTON_INACTIVE_HOT 
BUTTON_INACTIVE_PRESSED 
BUTTON_INACTIVE_DISABLED 

Definition at line 203 of file uxthemep.h.

Function Documentation

◆ GetNCCaptionTheme()

HTHEME GetNCCaptionTheme ( HWND  hWnd,
DWORD  style 
)

Definition at line 88 of file themehooks.c.

89 {
90  PWND_DATA pwndData;
91 
92  /* We only get the theme for the window class if the window has a caption */
93  if((style & WS_CAPTION) != WS_CAPTION)
94  return NULL;
95 
96  /* Get theme data for this window */
97  pwndData = ThemeGetWndData(hWnd);
98  if (pwndData == NULL)
99  return NULL;
100 
101  if (!(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT))
102  {
103  if (pwndData->hthemeWindow)
104  {
105  CloseThemeData(pwndData->hthemeWindow);
106  pwndData->hthemeWindow = NULL;
107  }
108  return NULL;
109  }
110 
111  /* If the theme data was not cached, open it now */
112  if (!pwndData->hthemeWindow)
113  pwndData->hthemeWindow = OpenThemeDataEx(hWnd, L"WINDOW", OTD_NONCLIENT);
114 
115  return pwndData->hthemeWindow;
116 }
HWND hWnd
Definition: settings.c:17
DWORD WINAPI GetThemeAppProperties(void)
Definition: system.c:933
smooth NULL
Definition: ftsmooth.c:416
#define WS_CAPTION
Definition: pedump.c:624
HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
Definition: system.c:819
static const WCHAR L[]
Definition: oid.c:1250
HTHEME hthemeWindow
Definition: uxthemep.h:151
PWND_DATA ThemeGetWndData(HWND hWnd)
Definition: themehooks.c:17
Arabic default style
Definition: afstyles.h:93
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950

Referenced by SetThemeRegion(), ThemeCalculateCaptionButtonsPos(), and ThemeInitDrawContext().

◆ GetNCScrollbarTheme()

HTHEME GetNCScrollbarTheme ( HWND  hWnd,
DWORD  style 
)

Definition at line 118 of file themehooks.c.

119 {
120  PWND_DATA pwndData;
121 
122  /* We only get the theme for the scrollbar class if the window has a scrollbar */
123  if((style & (WS_HSCROLL|WS_VSCROLL)) == 0)
124  return NULL;
125 
126  /* Get theme data for this window */
127  pwndData = ThemeGetWndData(hWnd);
128  if (pwndData == NULL)
129  return NULL;
130 
131  if (!(GetThemeAppProperties() & STAP_ALLOW_NONCLIENT))
132  {
133  if (pwndData->hthemeScrollbar)
134  {
135  CloseThemeData(pwndData->hthemeScrollbar);
136  pwndData->hthemeScrollbar = NULL;
137  }
138  return NULL;
139  }
140 
141  /* If the theme data was not cached, open it now */
142  if (!pwndData->hthemeScrollbar)
143  pwndData->hthemeScrollbar = OpenThemeDataEx(hWnd, L"SCROLLBAR", OTD_NONCLIENT);
144 
145  return pwndData->hthemeScrollbar;
146 }
HWND hWnd
Definition: settings.c:17
DWORD WINAPI GetThemeAppProperties(void)
Definition: system.c:933
HTHEME hthemeScrollbar
Definition: uxthemep.h:152
smooth NULL
Definition: ftsmooth.c:416
HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
Definition: system.c:819
#define WS_HSCROLL
Definition: pedump.c:628
static const WCHAR L[]
Definition: oid.c:1250
#define WS_VSCROLL
Definition: pedump.c:627
PWND_DATA ThemeGetWndData(HWND hWnd)
Definition: themehooks.c:17
Arabic default style
Definition: afstyles.h:93
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950

Referenced by ThemeInitDrawContext().

◆ MSSTYLES_CloseThemeClass()

HRESULT MSSTYLES_CloseThemeClass ( PTHEME_CLASS  tc)

Definition at line 822 of file msstyles.c.

823 {
825  return S_OK;
826 }
const GLfloat * tc
Definition: glext.h:8925
#define S_OK
Definition: intsafe.h:59
void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
Definition: msstyles.c:179

Referenced by CloseThemeData(), and OpenThemeDataInternal().

◆ MSSTYLES_CloseThemeFile()

void MSSTYLES_CloseThemeFile ( PTHEME_FILE  tf)

Definition at line 179 of file msstyles.c.

180 {
181  if(tf) {
182 
183  tf->dwRefCount--;
184  TRACE("Theme %p refcount: %d\n", tf, tf->dwRefCount);
185 
186  if(!tf->dwRefCount) {
187  if(tf->hTheme) FreeLibrary(tf->hTheme);
188  if(tf->classes) {
189  while(tf->classes) {
190  PTHEME_CLASS pcls = tf->classes;
191  tf->classes = pcls->next;
192  while(pcls->partstate) {
193  PTHEME_PARTSTATE ps = pcls->partstate;
194 
195  while(ps->properties) {
196  PTHEME_PROPERTY prop = ps->properties;
197  ps->properties = prop->next;
198  HeapFree(GetProcessHeap(), 0, prop);
199  }
200 
201  pcls->partstate = ps->next;
202  HeapFree(GetProcessHeap(), 0, ps);
203  }
204  HeapFree(GetProcessHeap(), 0, pcls);
205  }
206  }
207  while (tf->images)
208  {
209  PTHEME_IMAGE img = tf->images;
210  tf->images = img->next;
211  DeleteObject (img->image);
212  HeapFree (GetProcessHeap(), 0, img);
213  }
214  HeapFree(GetProcessHeap(), 0, tf);
215  }
216  }
217 }
PTHEME_PARTSTATE partstate
Definition: uxthemep.h:62
PTHEME_PROPERTY properties
Definition: uxthemep.h:50
HFONT tf
Definition: icontest.c:17
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
struct _THEME_PARTSTATE * next
Definition: uxthemep.h:52
struct _THEME_PROPERTY * next
Definition: uxthemep.h:44
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:405
#define GetProcessHeap()
Definition: compat.h:395
GLint GLvoid * img
Definition: gl.h:1956
struct _THEME_CLASS * next
Definition: uxthemep.h:65
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by CheckThemeSignature(), CloseThemeFile(), EnumThemeColors(), EnumThemeSizes(), GetThemeDefaults(), GetThemeDocumentationProperty(), MSSTYLES_CloseThemeClass(), UXTHEME_LoadTheme(), and UXTHEME_SetActiveTheme().

◆ MSSTYLES_FindMetric()

PTHEME_PROPERTY MSSTYLES_FindMetric ( PTHEME_FILE  tf,
int  iPropertyPrimitive,
int  iPropertyId 
)

Definition at line 556 of file msstyles.c.

557 {
558  return MSSTYLES_LFindProperty(tf->metrics, iPropertyPrimitive, iPropertyId);
559 }
HFONT tf
Definition: icontest.c:17
static PTHEME_PROPERTY MSSTYLES_LFindProperty(PTHEME_PROPERTY tp, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:506

Referenced by GetThemeSysBool(), GetThemeSysColor(), GetThemeSysFont(), GetThemeSysInt(), GetThemeSysSize(), GetThemeSysString(), and MSSTYLES_AddMetric().

◆ MSSTYLES_FindPartState()

PTHEME_PARTSTATE MSSTYLES_FindPartState ( PTHEME_CLASS  tc,
int  iPartId,
int  iStateId,
PTHEME_CLASS tcNext 
)

Definition at line 452 of file msstyles.c.

453 {
454  PTHEME_PARTSTATE cur = tc->partstate;
455  while(cur) {
456  if(cur->iPartId == iPartId && cur->iStateId == iStateId) {
457  if(tcNext) *tcNext = tc->overrides;
458  return cur;
459  }
460  cur = cur->next;
461  }
462  if(tc->overrides) return MSSTYLES_FindPartState(tc->overrides, iPartId, iStateId, tcNext);
463  return NULL;
464 }
struct _THEME_CLASS * overrides
Definition: uxthemep.h:63
struct _THEME_PARTSTATE * next
Definition: uxthemep.h:52
const GLfloat * tc
Definition: glext.h:8925
smooth NULL
Definition: ftsmooth.c:416
PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext)
Definition: msstyles.c:452

Referenced by IsThemePartDefined(), MSSTYLES_AddPartState(), MSSTYLES_FindPartState(), and MSSTYLES_FindProperty().

◆ MSSTYLES_FindProperty()

PTHEME_PROPERTY MSSTYLES_FindProperty ( PTHEME_CLASS  tc,
int  iPartId,
int  iStateId,
int  iPropertyPrimitive,
int  iPropertyId 
)

Definition at line 835 of file msstyles.c.

836 {
837  PTHEME_CLASS next = tc;
838  PTHEME_PARTSTATE ps;
840 
841  TRACE("(%p, %d, %d, %d)\n", tc, iPartId, iStateId, iPropertyId);
842  /* Try and find an exact match on part & state */
843  while(next && (ps = MSSTYLES_FindPartState(next, iPartId, iStateId, &next))) {
844  if((tp = MSSTYLES_PSFindProperty(ps, iPropertyPrimitive, iPropertyId))) {
845  return tp;
846  }
847  }
848  /* If that fails, and we didn't already try it, search for just part */
849  if(iStateId != 0)
850  iStateId = 0;
851  /* As a last ditch attempt..go for just class */
852  else if(iPartId != 0)
853  iPartId = 0;
854  else
855  return NULL;
856 
857  if((tp = MSSTYLES_FindProperty(tc, iPartId, iStateId, iPropertyPrimitive, iPropertyId)))
858  return tp;
859  return NULL;
860 }
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:835
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
const GLfloat * tc
Definition: glext.h:8925
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext)
Definition: msstyles.c:452
static unsigned __int64 next
Definition: rand_nt.c:6
static PTHEME_PROPERTY MSSTYLES_PSFindProperty(PTHEME_PARTSTATE ps, int iPropertyPrimitive, int iPropertyId)
Definition: msstyles.c:538

Referenced by GetThemeBool(), GetThemeColor(), GetThemeEnumValue(), GetThemeFilename(), GetThemeFont(), GetThemeInt(), GetThemeIntList(), GetThemeMargins(), GetThemeMetric(), GetThemePosition(), GetThemePropertyOrigin(), GetThemeRect(), GetThemeString(), MSSTYLES_FindProperty(), and UXTHEME_SelectImage().

◆ MSSTYLES_GetPropertyBool()

HRESULT MSSTYLES_GetPropertyBool ( PTHEME_PROPERTY  tp,
BOOL pfVal 
)

Definition at line 983 of file msstyles.c.

984 {
985  *pfVal = FALSE;
986  if(*tp->lpValue == 't' || *tp->lpValue == 'T')
987  *pfVal = TRUE;
988  return S_OK;
989 }
#define TRUE
Definition: types.h:120
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define S_OK
Definition: intsafe.h:59

Referenced by GetThemeBool(), GetThemeMetric(), and GetThemeSysBool().

◆ MSSTYLES_GetPropertyColor()

HRESULT MSSTYLES_GetPropertyColor ( PTHEME_PROPERTY  tp,
COLORREF pColor 
)

Definition at line 996 of file msstyles.c.

997 {
998  LPCWSTR lpEnd;
999  LPCWSTR lpCur;
1000  int red, green, blue;
1001 
1002  lpCur = tp->lpValue;
1003  lpEnd = tp->lpValue + tp->dwValueLen;
1004 
1005  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &red)) {
1006  TRACE("Could not parse color property\n");
1007  return E_PROP_ID_UNSUPPORTED;
1008  }
1009  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &green)) {
1010  TRACE("Could not parse color property\n");
1011  return E_PROP_ID_UNSUPPORTED;
1012  }
1013  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &blue)) {
1014  TRACE("Could not parse color property\n");
1015  return E_PROP_ID_UNSUPPORTED;
1016  }
1017  *pColor = RGB(red,green,blue);
1018  return S_OK;
1019 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
GLclampf GLclampf blue
Definition: gl.h:1740
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
#define RGB(r, g, b)
Definition: wingdi.h:2918
GLclampf green
Definition: gl.h:1740
#define red
Definition: linetest.c:67
#define S_OK
Definition: intsafe.h:59
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
Definition: msstyles.c:934

Referenced by GetThemeColor(), GetThemeMetric(), and GetThemeSysColor().

◆ MSSTYLES_GetPropertyFont()

HRESULT MSSTYLES_GetPropertyFont ( PTHEME_PROPERTY  tp,
HDC  hdc,
LOGFONTW pFont 
)

Definition at line 1066 of file msstyles.c.

1067 {
1068  LPCWSTR lpCur = tp->lpValue;
1069  LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
1070  HRESULT hr;
1071 
1072  ZeroMemory(pFont, sizeof(LOGFONTW));
1073  hr = MSSTYLES_GetFont (lpCur, lpEnd, &lpCur, pFont);
1074 
1075  return hr;
1076 }
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define ZeroMemory
Definition: winbase.h:1635
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
LONG HRESULT
Definition: typedefs.h:77
static HRESULT MSSTYLES_GetFont(LPCWSTR lpCur, LPCWSTR lpEnd, LPCWSTR *lpValEnd, LOGFONTW *pFont)
Definition: msstyles.c:1026

Referenced by GetThemeFont(), and GetThemeSysFont().

◆ MSSTYLES_GetPropertyInt()

HRESULT MSSTYLES_GetPropertyInt ( PTHEME_PROPERTY  tp,
int piVal 
)

Definition at line 1083 of file msstyles.c.

1084 {
1085  if(!MSSTYLES_GetNextInteger(tp->lpValue, (tp->lpValue + tp->dwValueLen), NULL, piVal)) {
1086  TRACE("Could not parse int property\n");
1087  return E_PROP_ID_UNSUPPORTED;
1088  }
1089  return S_OK;
1090 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
#define S_OK
Definition: intsafe.h:59
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
Definition: msstyles.c:934

Referenced by GetThemeInt(), GetThemeMetric(), GetThemeSysInt(), and GetThemeSysSize().

◆ MSSTYLES_GetPropertyIntList()

HRESULT MSSTYLES_GetPropertyIntList ( PTHEME_PROPERTY  tp,
INTLIST *  pIntList 
)

Definition at line 1097 of file msstyles.c.

1098 {
1099  int i;
1100  LPCWSTR lpCur = tp->lpValue;
1101  LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
1102 
1103  for(i=0; i < MAX_INTLIST_COUNT; i++) {
1104  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pIntList->iValues[i]))
1105  break;
1106  }
1107  pIntList->iValueCount = i;
1108  return S_OK;
1109 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
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 S_OK
Definition: intsafe.h:59
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
Definition: msstyles.c:934

Referenced by GetThemeIntList().

◆ MSSTYLES_GetPropertyMargins()

HRESULT MSSTYLES_GetPropertyMargins ( PTHEME_PROPERTY  tp,
RECT prc,
MARGINS pMargins 
)

Definition at line 1171 of file msstyles.c.

1172 {
1173  LPCWSTR lpCur = tp->lpValue;
1174  LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
1175 
1176  MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pMargins->cxLeftWidth);
1177  MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pMargins->cxRightWidth);
1178  MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pMargins->cyTopHeight);
1179  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pMargins->cyBottomHeight)) {
1180  TRACE("Could not parse margins property\n");
1181  return E_PROP_ID_UNSUPPORTED;
1182  }
1183  return S_OK;
1184 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
int cyBottomHeight
Definition: misc.c:283
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
int cyTopHeight
Definition: misc.c:282
int cxLeftWidth
Definition: misc.c:280
#define S_OK
Definition: intsafe.h:59
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
Definition: msstyles.c:934
int cxRightWidth
Definition: misc.c:281

Referenced by GetThemeMargins().

◆ MSSTYLES_GetPropertyPosition()

HRESULT MSSTYLES_GetPropertyPosition ( PTHEME_PROPERTY  tp,
POINT pPoint 
)

Definition at line 1116 of file msstyles.c.

1117 {
1118  int x,y;
1119  LPCWSTR lpCur = tp->lpValue;
1120  LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
1121 
1122  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &x)) {
1123  TRACE("Could not parse position property\n");
1124  return E_PROP_ID_UNSUPPORTED;
1125  }
1126  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &y)) {
1127  TRACE("Could not parse position property\n");
1128  return E_PROP_ID_UNSUPPORTED;
1129  }
1130  pPoint->x = x;
1131  pPoint->y = y;
1132  return S_OK;
1133 }
long y
Definition: polytest.cpp:48
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
long x
Definition: polytest.cpp:48
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
#define S_OK
Definition: intsafe.h:59
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
Definition: msstyles.c:934
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548

Referenced by GetThemePosition().

◆ MSSTYLES_GetPropertyRect()

HRESULT MSSTYLES_GetPropertyRect ( PTHEME_PROPERTY  tp,
RECT pRect 
)

Definition at line 1151 of file msstyles.c.

1152 {
1153  LPCWSTR lpCur = tp->lpValue;
1154  LPCWSTR lpEnd = tp->lpValue + tp->dwValueLen;
1155 
1156  MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->left);
1157  MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->top);
1158  MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->right);
1159  if(!MSSTYLES_GetNextInteger(lpCur, lpEnd, &lpCur, &pRect->bottom)) {
1160  TRACE("Could not parse rect property\n");
1161  return E_PROP_ID_UNSUPPORTED;
1162  }
1163  return S_OK;
1164 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
LONG top
Definition: windef.h:292
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
#define S_OK
Definition: intsafe.h:59
static BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value)
Definition: msstyles.c:934
LONG bottom
Definition: windef.h:294

Referenced by GetThemeRect().

◆ MSSTYLES_GetPropertyString()

HRESULT MSSTYLES_GetPropertyString ( PTHEME_PROPERTY  tp,
LPWSTR  pszBuff,
int  cchMaxBuffChars 
)

Definition at line 1140 of file msstyles.c.

1141 {
1142  lstrcpynW(pszBuff, tp->lpValue, min(tp->dwValueLen+1, cchMaxBuffChars));
1143  return S_OK;
1144 }
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
#define lstrcpynW
Definition: compat.h:397
#define S_OK
Definition: intsafe.h:59
#define min(a, b)
Definition: monoChain.cc:55

Referenced by GetThemeEnumValue(), GetThemeFilename(), GetThemeMetric(), GetThemeString(), and GetThemeSysString().

◆ MSSTYLES_GetThemeIni()

PUXINI_FILE MSSTYLES_GetThemeIni ( PTHEME_FILE  tf)

Definition at line 236 of file msstyles.c.

237 {
238  return UXINI_LoadINI(tf->hTheme, szThemesIniResource);
239 }
HFONT tf
Definition: icontest.c:17
static const WCHAR szThemesIniResource[]
Definition: msstyles.c:33
PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName)
Definition: uxini.c:52

Referenced by GetThemeDocumentationProperty().

◆ MSSTYLES_LoadBitmap()

HBITMAP MSSTYLES_LoadBitmap ( PTHEME_CLASS  tc,
LPCWSTR  lpFilename,
BOOL hasAlpha 
)

Definition at line 896 of file msstyles.c.

897 {
898  WCHAR szFile[MAX_PATH];
899  LPWSTR tmp;
901  lstrcpynW(szFile, lpFilename, sizeof(szFile)/sizeof(szFile[0]));
902  tmp = szFile;
903  do {
904  if(*tmp == '\\') *tmp = '_';
905  if(*tmp == '/') *tmp = '_';
906  if(*tmp == '.') *tmp = '_';
907  } while(*tmp++);
908 
909  /* Try to locate in list of loaded images */
910  img = tc->tf->images;
911  while (img)
912  {
913  if (lstrcmpiW (szFile, img->name) == 0)
914  {
915  TRACE ("found %p %s: %p\n", img, debugstr_w (img->name), img->image);
916  *hasAlpha = img->hasAlpha;
917  return img->image;
918  }
919  img = img->next;
920  }
921  /* Not found? Load from resources */
922  img = HeapAlloc (GetProcessHeap(), 0, sizeof (THEME_IMAGE));
923  img->image = LoadImageW(tc->hTheme, szFile, IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
924  prepare_alpha (img->image, hasAlpha);
925  img->hasAlpha = *hasAlpha;
926  /* ...and stow away for later reuse. */
927  lstrcpyW (img->name, szFile);
928  img->next = tc->tf->images;
929  tc->tf->images = img;
930  TRACE ("new %p %s: %p\n", img, debugstr_w (img->name), img->image);
931  return img->image;
932 }
#define lstrcpynW
Definition: compat.h:397
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
#define debugstr_w
Definition: kernel32.h:32
const GLfloat * tc
Definition: glext.h:8925
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLint GLvoid * img
Definition: gl.h:1956
#define MAX_PATH
Definition: compat.h:26
#define lstrcpyW
Definition: compat.h:406
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define IMAGE_BITMAP
Definition: winuser.h:211
static BOOL prepare_alpha(HBITMAP bmp, BOOL *hasAlpha)
Definition: msstyles.c:863
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by UXTHEME_LoadImage(), and UXTHEME_SelectImage().

◆ MSSTYLES_LookupEnum()

BOOL MSSTYLES_LookupEnum ( LPCWSTR  pszValueName,
int  dwEnum,
int dwValue 
)

Definition at line 1126 of file stylemap.c.

1127 {
1128  DWORD item = 0;
1129  /* Locate the enum block */
1130  while(*mapEnum[item].szValueName && mapEnum[item].dwEnum != dwEnum) item++;
1131  /* Now find the value in that block */
1132  while(*mapEnum[item].szValueName && mapEnum[item].dwEnum == dwEnum) {
1133  if(!lstrcmpiW(mapEnum[item].szValueName, pszValueName)) {
1134  if(dwValue) *dwValue = mapEnum[item].dwValue;
1135  return TRUE;
1136  }
1137  item++;
1138  }
1139  return FALSE;
1140 }
#define TRUE
Definition: types.h:120
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
unsigned long DWORD
Definition: ntddk_ex.h:95
static const MSSTYLES_ENUM_MAP mapEnum[]
Definition: stylemap.c:250
static ATOM item
Definition: dde.c:856

Referenced by GetThemeEnumValue(), and GetThemeMetric().

◆ MSSTYLES_LookupPartState()

BOOL MSSTYLES_LookupPartState ( LPCWSTR  pszClass,
LPCWSTR  pszPart,
LPCWSTR  pszState,
int iPartId,
int iStateId 
)

Definition at line 1038 of file stylemap.c.

1039 {
1040  unsigned int i;
1041  const MSSTYLES_CLASS_MAP *map;
1042 
1043  *iPartId = 0;
1044  *iStateId = 0;
1045  for(i=0; i<sizeof(mapClass)/sizeof(mapClass[0]); i++) {
1046  if(!lstrcmpiW(mapClass[i].pszClass, pszClass)) {
1047  map = mapClass[i].lpMap;
1048  if(pszPart) {
1049  do {
1050  if(map->dwStateID == 0 && !lstrcmpiW(map->szName, pszPart)) {
1051  *iPartId = map->dwPartID;
1052  break;
1053  }
1054  } while(*((++map)->szName));
1055  }
1056  if(pszState) {
1057  if(pszPart && *iPartId == 0) {
1058  break;
1059  }
1060  do {
1061  if(pszPart) {
1062  if(map->dwPartID == *iPartId && !lstrcmpiW(map->szName, pszState)) {
1063  *iStateId = map->dwStateID;
1064  break;
1065  }
1066  }
1067  else {
1068  if(!lstrcmpiW(map->szName, pszState)) {
1069  *iStateId = map->dwStateID;
1070  break;
1071  }
1072  }
1073  } while(*((++map)->szName));
1074  }
1075  break;
1076  }
1077  }
1078  if(pszPart && *iPartId == 0) {
1079  return FALSE;
1080  }
1081  if(pszState && *iStateId == 0) {
1082  return FALSE;
1083  }
1084  return TRUE;
1085 }
#define TRUE
Definition: types.h:120
static const MSSTYLES_CLASS_NAME mapClass[]
Definition: stylemap.c:1009
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
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
const MSSTYLES_CLASS_MAP * lpMap
Definition: stylemap.c:42
Definition: _map.h:44
static const WCHAR szName[]
Definition: msipriv.h:1194
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 GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum map
Definition: glfuncs.h:262

Referenced by MSSTYLES_ParseIniSectionName().

◆ MSSTYLES_LookupProperty()

BOOL MSSTYLES_LookupProperty ( LPCWSTR  pszPropertyName,
int dwPrimitive,
int dwId 
)

Definition at line 1100 of file stylemap.c.

1101 {
1102  DWORD item = 0;
1103  do {
1104  if(!lstrcmpiW(mapProperty[item].szPropertyName, pszPropertyName)) {
1105  if(dwPrimitive) *dwPrimitive = mapProperty[item].dwPrimitiveType;
1106  if(dwId) *dwId = mapProperty[item].dwPropertyID;
1107  return TRUE;
1108  }
1109  } while(*mapProperty[++item].szPropertyName);
1110  return FALSE;
1111 }
#define TRUE
Definition: types.h:120
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
unsigned long DWORD
Definition: ntddk_ex.h:95
static ATOM item
Definition: dde.c:856
static const MSSTYLES_PROPERTY_MAP mapProperty[]
Definition: stylemap.c:50

Referenced by GetThemeDocumentationProperty(), and MSSTYLES_ParseThemeIni().

◆ MSSTYLES_OpenThemeClass()

PTHEME_CLASS MSSTYLES_OpenThemeClass ( PTHEME_FILE  tf,
LPCWSTR  pszAppName,
LPCWSTR  pszClassList 
)

Definition at line 756 of file msstyles.c.

757 {
758  PTHEME_CLASS cls = NULL;
759 #ifdef __REACTOS__
760  PTHEME_CLASS defaultCls = NULL;
761 #endif
763  LPCWSTR start;
764  LPCWSTR end;
765  DWORD len;
766 
767  if(!tf->classes) {
768  return NULL;
769  }
770 
771  start = pszClassList;
772  while((end = strchrW(start, ';'))) {
773  len = end-start;
774  lstrcpynW(szClassName, start, min(len+1, sizeof(szClassName)/sizeof(szClassName[0])));
775  start = end+1;
776  cls = MSSTYLES_FindClass(tf, pszAppName, szClassName);
777  if(cls) break;
778 #ifdef __REACTOS__
779  if (!defaultCls)
780  defaultCls = MSSTYLES_FindClass(tf, NULL, szClassName);
781 #endif
782  }
783  if(!cls && *start) {
784  lstrcpynW(szClassName, start, sizeof(szClassName)/sizeof(szClassName[0]));
785  cls = MSSTYLES_FindClass(tf, pszAppName, szClassName);
786 #ifdef __REACTOS__
787  if (!defaultCls)
788  defaultCls = MSSTYLES_FindClass(tf, NULL, szClassName);
789 #endif
790  }
791  if(cls) {
792  TRACE("Opened app %s, class %s from list %s\n", debugstr_w(cls->szAppName), debugstr_w(cls->szClassName), debugstr_w(pszClassList));
793  cls->tf = tf;
794  cls->tf->dwRefCount++;
795  TRACE("Theme %p refcount: %d\n", tf, tf->dwRefCount);
796  }
797 #ifdef __REACTOS__
798  else if (defaultCls)
799  {
800  cls = defaultCls;
801  TRACE("Opened default class %s from list %s\n", debugstr_w(cls->szClassName), debugstr_w(pszClassList));
802  cls->tf = tf;
803  cls->tf->dwRefCount++;
804  TRACE("Theme %p refcount: %d\n", tf, tf->dwRefCount);
805  }
806 #endif
807  return cls;
808 }
WCHAR szAppName[MAX_THEME_APP_NAME]
Definition: uxthemep.h:60
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
HFONT tf
Definition: icontest.c:17
GLuint GLuint end
Definition: gl.h:1545
#define lstrcpynW
Definition: compat.h:397
#define MAX_THEME_CLASS_NAME
Definition: uxthemep.h:33
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
static PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName)
Definition: msstyles.c:392
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR szClassName[]
Definition: clipbrd.c:11
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
WCHAR szClassName[MAX_THEME_CLASS_NAME]
Definition: uxthemep.h:61
GLuint start
Definition: gl.h:1545
#define min(a, b)
Definition: monoChain.cc:55
struct _THEME_FILE * tf
Definition: uxthemep.h:59

Referenced by OpenThemeDataInternal().

◆ MSSTYLES_OpenThemeFile()

HRESULT MSSTYLES_OpenThemeFile ( LPCWSTR  lpThemeFile,
LPCWSTR  pszColorName,
LPCWSTR  pszSizeName,
PTHEME_FILE tf 
)

Definition at line 54 of file msstyles.c.

55 {
56  HMODULE hTheme;
57  HRSRC hrsc;
58  HRESULT hr = S_OK;
59  static const WCHAR szPackThemVersionResource[] = {
60  'P','A','C','K','T','H','E','M','_','V','E','R','S','I','O','N', '\0'
61  };
62  static const WCHAR szColorNamesResource[] = {
63  'C','O','L','O','R','N','A','M','E','S','\0'
64  };
65  static const WCHAR szSizeNamesResource[] = {
66  'S','I','Z','E','N','A','M','E','S','\0'
67  };
68 
69  WORD version;
70  DWORD versize;
71  LPWSTR pszColors;
72  LPWSTR pszSelectedColor = NULL;
73  LPWSTR pszSizes;
74  LPWSTR pszSelectedSize = NULL;
75  LPWSTR tmp;
76 
77  TRACE("Opening %s\n", debugstr_w(lpThemeFile));
78 
79  hTheme = LoadLibraryExW(lpThemeFile, NULL, LOAD_LIBRARY_AS_DATAFILE);
80 
81  /* Validate that this is really a theme */
82  if(!hTheme) {
84  goto invalid_theme;
85  }
86  if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szPackThemVersionResource))) {
87  TRACE("No version resource found\n");
89  goto invalid_theme;
90  }
91  if((versize = SizeofResource(hTheme, hrsc)) != 2)
92  {
93  TRACE("Version resource found, but wrong size: %d\n", versize);
95  goto invalid_theme;
96  }
97  version = *(WORD*)LoadResource(hTheme, hrsc);
99  {
100  TRACE("Version of theme file is unsupported: 0x%04x\n", version);
102  goto invalid_theme;
103  }
104 
105  if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szColorNamesResource))) {
106  TRACE("Color names resource not found\n");
108  goto invalid_theme;
109  }
110  pszColors = LoadResource(hTheme, hrsc);
111 
112  if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szSizeNamesResource))) {
113  TRACE("Size names resource not found\n");
115  goto invalid_theme;
116  }
117  pszSizes = LoadResource(hTheme, hrsc);
118 
119  /* Validate requested color against what's available from the theme */
120  if(pszColorName) {
121  tmp = pszColors;
122  while(*tmp) {
123  if(!lstrcmpiW(pszColorName, tmp)) {
124  pszSelectedColor = tmp;
125  break;
126  }
127  tmp += lstrlenW(tmp)+1;
128  }
129  }
130  else
131  pszSelectedColor = pszColors; /* Use the default color */
132 
133  /* Validate requested size against what's available from the theme */
134  if(pszSizeName) {
135  tmp = pszSizes;
136  while(*tmp) {
137  if(!lstrcmpiW(pszSizeName, tmp)) {
138  pszSelectedSize = tmp;
139  break;
140  }
141  tmp += lstrlenW(tmp)+1;
142  }
143  }
144  else
145  pszSelectedSize = pszSizes; /* Use the default size */
146 
147  if(!pszSelectedColor || !pszSelectedSize) {
148  TRACE("Requested color/size (%s/%s) not found in theme\n",
149  debugstr_w(pszColorName), debugstr_w(pszSizeName));
151  goto invalid_theme;
152  }
153 
155  (*tf)->hTheme = hTheme;
156 
157  GetFullPathNameW(lpThemeFile, MAX_PATH, (*tf)->szThemeFile, NULL);
158 
159  (*tf)->pszAvailColors = pszColors;
160  (*tf)->pszAvailSizes = pszSizes;
161  (*tf)->pszSelectedColor = pszSelectedColor;
162  (*tf)->pszSelectedSize = pszSelectedSize;
163  (*tf)->dwRefCount = 1;
164 
165  TRACE("Theme %p refcount: %d\n", *tf, (*tf)->dwRefCount);
166 
167  return S_OK;
168 
169 invalid_theme:
170  if(hTheme) FreeLibrary(hTheme);
171  return hr;
172 }
#define ERROR_BAD_FORMAT
Definition: winerror.h:114
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
HRESULT hr
Definition: shlfolder.c:183
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:286
HFONT tf
Definition: icontest.c:17
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1105
#define lstrlenW
Definition: compat.h:407
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define debugstr_w
Definition: kernel32.h:32
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR version[]
Definition: asmname.c:64
#define TRACE(s)
Definition: solgame.cpp:4
#define FreeLibrary(x)
Definition: compat.h:405
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define LOAD_LIBRARY_AS_DATAFILE
Definition: winbase.h:338
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define MSSTYLES_VERSION
Definition: msstyles.c:31

Referenced by CheckThemeSignature(), EnumThemeColors(), EnumThemeSizes(), GetThemeDefaults(), GetThemeDocumentationProperty(), OpenThemeFile(), and UXTHEME_LoadTheme().

◆ MSSTYLES_ParseThemeIni()

void MSSTYLES_ParseThemeIni ( PTHEME_FILE  tf)

Definition at line 644 of file msstyles.c.

645 {
646  static const WCHAR szSysMetrics[] = {'S','y','s','M','e','t','r','i','c','s','\0'};
647  static const WCHAR szGlobals[] = {'g','l','o','b','a','l','s','\0'};
648  PTHEME_CLASS cls;
649  PTHEME_CLASS globals;
650  PTHEME_PARTSTATE ps;
654  WCHAR szPropertyName[MAX_THEME_VALUE_NAME];
655  int iPartId;
656  int iStateId;
657  int iPropertyPrimitive;
658  int iPropertyId;
659  DWORD dwLen;
660  LPCWSTR lpName;
661  DWORD dwValueLen;
662  LPCWSTR lpValue;
663 
664  if(tf->classes)
665  return;
666 
668 
669  while((lpName=UXINI_GetNextSection(ini, &dwLen)))
670  {
671  if(CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, lpName, dwLen, szSysMetrics, -1) == CSTR_EQUAL)
672  {
673  while((lpName=UXINI_GetNextValue(ini, &dwLen, &lpValue, &dwValueLen)))
674  {
675  lstrcpynW(szPropertyName, lpName, min(dwLen+1, sizeof(szPropertyName)/sizeof(szPropertyName[0])));
676  if(MSSTYLES_LookupProperty(szPropertyName, &iPropertyPrimitive, &iPropertyId))
677  {
678  /* Catch all metrics, including colors */
679  MSSTYLES_AddMetric(tf, iPropertyPrimitive, iPropertyId, lpValue, dwValueLen);
680  }
681  else
682  {
683  TRACE("Unknown system metric %s\n", debugstr_w(szPropertyName));
684  }
685  }
686  continue;
687  }
688 
689  if(MSSTYLES_ParseIniSectionName(lpName, dwLen, szAppName, szClassName, &iPartId, &iStateId))
690  {
691  BOOL isGlobal = FALSE;
692  if(!lstrcmpiW(szClassName, szGlobals))
693  {
694  isGlobal = TRUE;
695  }
697  ps = MSSTYLES_AddPartState(cls, iPartId, iStateId);
698 
699  while((lpName=UXINI_GetNextValue(ini, &dwLen, &lpValue, &dwValueLen)))
700  {
701  lstrcpynW(szPropertyName, lpName, min(dwLen+1, sizeof(szPropertyName)/sizeof(szPropertyName[0])));
702  if(MSSTYLES_LookupProperty(szPropertyName, &iPropertyPrimitive, &iPropertyId))
703  {
704  MSSTYLES_AddProperty(ps, iPropertyPrimitive, iPropertyId, lpValue, dwValueLen, isGlobal);
705  }
706  else
707  {
708  TRACE("Unknown property %s\n", debugstr_w(szPropertyName));
709  }
710  }
711  }
712  }
713 
714  /* App/Class combos override values defined by the base class, map these overrides */
715  globals = MSSTYLES_FindClass(tf, NULL, szGlobals);
716  cls = tf->classes;
717  while(cls)
718  {
719  if(*cls->szAppName)
720  {
722  if(!cls->overrides)
723  {
724  TRACE("No overrides found for app %s class %s\n", debugstr_w(cls->szAppName), debugstr_w(cls->szClassName));
725  }
726  else
727  {
728  cls->overrides = globals;
729  }
730  }
731  else
732  {
733  /* Everything overrides globals..except globals */
734  if(cls != globals)
735  cls->overrides = globals;
736  }
737  cls = cls->next;
738  }
740 
741  if(!tf->classes) {
742  ERR("Failed to parse theme ini\n");
743  }
744 }
WCHAR szAppName[MAX_THEME_APP_NAME]
Definition: uxthemep.h:60
#define TRUE
Definition: types.h:120
static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR szAppName, LPWSTR szClassName, int *iPartId, int *iStateId)
Definition: msstyles.c:313
struct _THEME_CLASS * overrides
Definition: uxthemep.h:63
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ LPCSTR lpName
Definition: winbase.h:2729
static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName)
Definition: msstyles.c:422
HFONT tf
Definition: icontest.c:17
static PUXINI_FILE MSSTYLES_GetActiveThemeIni(PTHEME_FILE tf)
Definition: msstyles.c:246
#define NORM_IGNORECASE
Definition: winnls.h:173
#define lstrcpynW
Definition: compat.h:397
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
#define MAX_THEME_CLASS_NAME
Definition: uxthemep.h:33
unsigned int BOOL
Definition: ntddk_ex.h:94
LPCWSTR UXINI_GetNextSection(PUXINI_FILE uf, DWORD *dwLen)
Definition: uxini.c:173
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
BOOL MSSTYLES_LookupProperty(LPCWSTR pszPropertyName, int *dwPrimitive, int *dwId)
Definition: stylemap.c:1100
static PTHEME_PROPERTY MSSTYLES_AddProperty(PTHEME_PARTSTATE ps, int iPropertyPrimitive, int iPropertyId, LPCWSTR lpValue, DWORD dwValueLen, BOOL isGlobal)
Definition: msstyles.c:576
TConfig ini
Definition: tnconfig.cpp:45
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: lang.c:2275
static PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName)
Definition: msstyles.c:392
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR szClassName[]
Definition: clipbrd.c:11
void UXINI_CloseINI(PUXINI_FILE uf)
Definition: uxini.c:83
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define LOCALE_SYSTEM_DEFAULT
unsigned long DWORD
Definition: ntddk_ex.h:95
struct _THEME_CLASS * next
Definition: uxthemep.h:65
#define MAX_THEME_APP_NAME
Definition: uxthemep.h:32
#define CSTR_EQUAL
Definition: winnls.h:453
#define MAX_THEME_VALUE_NAME
Definition: uxthemep.h:34
WCHAR szClassName[MAX_THEME_CLASS_NAME]
Definition: uxthemep.h:61
LPCWSTR UXINI_GetNextValue(PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen)
Definition: uxini.c:226
TCHAR szAppName[128]
Definition: solitaire.cpp:16
#define ERR(fmt,...)
Definition: debug.h:109
static PTHEME_PARTSTATE MSSTYLES_AddPartState(PTHEME_CLASS tc, int iPartId, int iStateId)
Definition: msstyles.c:479
#define min(a, b)
Definition: monoChain.cc:55
static PTHEME_PROPERTY MSSTYLES_AddMetric(PTHEME_FILE tf, int iPropertyPrimitive, int iPropertyId, LPCWSTR lpValue, DWORD dwValueLen)
Definition: msstyles.c:617

Referenced by OpenThemeDataInternal(), and UXTHEME_SetActiveTheme().

◆ MSSTYLES_ReferenceTheme()

HRESULT MSSTYLES_ReferenceTheme ( PTHEME_FILE  tf)

Definition at line 224 of file msstyles.c.

225 {
226  tf->dwRefCount++;
227  TRACE("Theme %p refcount: %d\n", tf, tf->dwRefCount);
228  return S_OK;
229 }
HFONT tf
Definition: icontest.c:17
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

Referenced by UXTHEME_SetActiveTheme().

◆ NC_TrackScrollBar()

VOID NC_TrackScrollBar ( HWND  Wnd,
WPARAM  wParam,
POINT  Pt 
)

Definition at line 665 of file ncscrollbar.c.

666 {
667  INT scrollbar;
668 
669  if ((wParam & 0xfff0) == SC_HSCROLL)
670  {
671  if ((wParam & 0x0f) != HTHSCROLL) return;
672  scrollbar = SB_HORZ;
673  }
674  else /* SC_VSCROLL */
675  {
676  if ((wParam & 0x0f) != HTVSCROLL) return;
677  scrollbar = SB_VERT;
678  }
679  SCROLL_TrackScrollBar( hwnd, scrollbar, pt );
680 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HTHSCROLL
Definition: winuser.h:2435
#define SB_VERT
Definition: winuser.h:553
#define pt(x, y)
Definition: drawing.c:79
#define SB_HORZ
Definition: winuser.h:552
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
static void SCROLL_TrackScrollBar(HWND hwnd, INT scrollbar, POINT pt)
Definition: ncscrollbar.c:627
#define HTVSCROLL
Definition: winuser.h:2436
#define SC_HSCROLL
Definition: winuser.h:2548

Referenced by ThemeWndProc().

◆ ThemeCalculateCaptionButtonsPos()

void ThemeCalculateCaptionButtonsPos ( HWND  hWnd,
HTHEME  htheme 
)

Definition at line 213 of file nonclient.c.

214 {
215  PWND_DATA pwndData;
216  DWORD style;
217  INT ButtonWidth, ButtonHeight, iPartId, i;
218  WINDOWINFO wi = {sizeof(wi)};
219  RECT rcCurrent;
220  SIZE ButtonSize;
221 
222  /* First of all check if we have something to do here */
224  if((style & (WS_CAPTION | WS_SYSMENU)) != (WS_CAPTION | WS_SYSMENU))
225  return;
226 
227  /* Get theme data for this window */
228  pwndData = ThemeGetWndData(hWnd);
229  if (pwndData == NULL)
230  return;
231 
232  if (!htheme)
233  {
234  htheme = GetNCCaptionTheme(hWnd, style);
235  if (!htheme)
236  return;
237  }
238 
239  if(!GetWindowInfo(hWnd, &wi))
240  return;
241 
242  /* Calculate the area of the caption */
243  rcCurrent.top = rcCurrent.left = 0;
244  rcCurrent.right = wi.rcWindow.right - wi.rcWindow.left;
245  rcCurrent.bottom = wi.rcWindow.bottom - wi.rcWindow.top;
246 
247  /* Add a padding around the objects of the caption */
248  InflateRect(&rcCurrent, -(int)wi.cyWindowBorders-BUTTON_GAP_SIZE,
250 
252 
253  GetThemePartSize(htheme, NULL, iPartId, 0, NULL, TS_MIN, &ButtonSize);
254 
256  ButtonWidth = MulDiv(ButtonSize.cx, ButtonHeight, ButtonSize.cy);
257 
258  ButtonHeight -= 4;
259  ButtonWidth -= 4;
260 
261  for (i = CLOSEBUTTON; i <= HELPBUTTON; i++)
262  {
263  SetRect(&pwndData->rcCaptionButtons[i],
264  rcCurrent.right - ButtonWidth,
265  rcCurrent.top,
266  rcCurrent.right,
267  rcCurrent.top + ButtonHeight);
268 
269  rcCurrent.right -= ButtonWidth + BUTTON_GAP_SIZE;
270  }
271 }
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
Definition: draw.c:1777
HTHEME GetNCCaptionTheme(HWND hWnd, DWORD style)
Definition: themehooks.c:88
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define SM_CYSIZE
Definition: winuser.h:982
HWND hWnd
Definition: settings.c:17
LONG top
Definition: windef.h:292
UINT cyWindowBorders
Definition: winuser.h:3715
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
int32_t INT
Definition: typedefs.h:56
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
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
RECT rcWindow
Definition: winuser.h:3709
#define WS_CAPTION
Definition: pedump.c:624
#define SM_CYSMSIZE
Definition: winuser.h:1006
DWORD dwExStyle
Definition: winuser.h:3712
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BUTTON_GAP_SIZE
Definition: uxthemep.h:224
#define GWL_STYLE
Definition: winuser.h:846
RECT rcCaptionButtons[4]
Definition: uxthemep.h:154
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
LONG bottom
Definition: windef.h:294
PWND_DATA ThemeGetWndData(HWND hWnd)
Definition: themehooks.c:17
Arabic default style
Definition: afstyles.h:93
#define WS_SYSMENU
Definition: pedump.c:629
LONG cy
Definition: windef.h:320
#define MulDiv(x, y, z)
Definition: gdifloat.h:86

Referenced by DrawNCPreview(), and ThemePreWindowProc().

◆ ThemeCleanupDrawContext()

void ThemeCleanupDrawContext ( PDRAW_CONTEXT  pcontext)

Definition at line 180 of file nonclient.c.

181 {
182  ReleaseDC(pcontext->hWnd ,pcontext->hDC);
183 
184  if(pcontext->hRgn != NULL)
185  {
186  DeleteObject(pcontext->hRgn);
187  }
188 }
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
smooth NULL
Definition: ftsmooth.c:416

Referenced by DrawNCPreview(), SCROLL_HandleScrollEvent(), ThemeHandleButton(), ThemeHandleNcMouseLeave(), ThemeHandleNcMouseMove(), and ThemeHandleNCPaint().

◆ ThemeDrawScrollBar()

void ThemeDrawScrollBar ( PDRAW_CONTEXT  pcontext,
INT  Bar,
POINT pt 
)

Definition at line 276 of file ncscrollbar.c.

277 {
278  SCROLLINFO si;
279  SCROLLBARINFO sbi;
280  BOOL vertical;
281  enum SCROLL_HITTEST htHot = SCROLL_NOWHERE;
282  PWND_DATA pwndData;
283 
284  if (((nBar == SB_VERT) && !(pcontext->wi.dwStyle & WS_VSCROLL)) ||
285  ((nBar == SB_HORZ) && !(pcontext->wi.dwStyle & WS_HSCROLL))) return;
286 
287  if (!(pwndData = ThemeGetWndData(pcontext->hWnd)))
288  return;
289 
290  if (pwndData->SCROLL_TrackingWin)
291  return;
292 
293  /* Retrieve scrollbar info */
294  sbi.cbSize = sizeof(sbi);
295  si.cbSize = sizeof(si);
296  si.fMask = SIF_ALL ;
297  GetScrollInfo(pcontext->hWnd, nBar, &si);
298  GetScrollBarInfo(pcontext->hWnd, SCROLL_getObjectId(nBar), &sbi);
299  vertical = SCROLL_IsVertical(pcontext->hWnd, nBar);
302  {
303  sbi.xyThumbTop = 0;
304  }
305 
306  /* The scrollbar rect is in screen coordinates */
307  OffsetRect(&sbi.rcScrollBar, -pcontext->wi.rcWindow.left, -pcontext->wi.rcWindow.top);
308 
309  if(pt)
310  {
311  ScreenToWindow(pcontext->hWnd, pt);
312  htHot = SCROLL_HitTest(pcontext->hWnd, &sbi, vertical, *pt, FALSE);
313  }
314 
315  /* do not draw if the scrollbar rectangle is empty */
316  if(IsRectEmpty(&sbi.rcScrollBar)) return;
317 
318  /* Draw the scrollbar */
319  SCROLL_DrawArrows( pcontext, &sbi, vertical, 0, htHot );
320  SCROLL_DrawInterior( pcontext, &sbi, sbi.xyThumbTop, vertical, 0, htHot );
321 }
#define SCROLL_NOWHERE
Definition: scrollbar.c:14
#define STATE_SYSTEM_UNAVAILABLE
Definition: winuser.h:2815
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define SB_VERT
Definition: winuser.h:553
#define pt(x, y)
Definition: drawing.c:79
DWORD dwStyle
Definition: winuser.h:3711
#define SB_HORZ
Definition: winuser.h:552
LONG top
Definition: windef.h:292
static void ScreenToWindow(HWND hWnd, POINT *pt)
Definition: ncscrollbar.c:16
#define SCROLL_BOTTOM_ARROW
Definition: scrollbar.c:19
LONG left
Definition: windef.h:291
static enum SCROLL_HITTEST SCROLL_HitTest(HWND hwnd, SCROLLBARINFO *psbi, BOOL vertical, POINT pt, BOOL bDragging)
Definition: ncscrollbar.c:87
#define SCROLL_TOP_ARROW
Definition: scrollbar.c:15
static LONG SCROLL_getObjectId(INT nBar)
Definition: ncscrollbar.c:38
unsigned int BOOL
Definition: ntddk_ex.h:94
static void SCROLL_DrawInterior(PDRAW_CONTEXT pcontext, SCROLLBARINFO *psbi, INT thumbPos, BOOL vertical, int htDown, int htHot)
Definition: ncscrollbar.c:182
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
SCROLL_HITTEST
RECT rcWindow
Definition: winuser.h:3709
BOOL WINAPI GetScrollBarInfo(_In_ HWND, _In_ LONG, _Inout_ PSCROLLBARINFO)
WINDOWINFO wi
Definition: uxthemep.h:180
DWORD rgstate[CCHILDREN_SCROLLBAR+1]
Definition: winuser.h:3696
static BOOL SCROLL_IsVertical(HWND hwnd, INT nBar)
Definition: ncscrollbar.c:24
#define WS_HSCROLL
Definition: pedump.c:628
BOOL WINAPI GetScrollInfo(_In_ HWND, _In_ int, _Inout_ LPSCROLLINFO)
#define WS_VSCROLL
Definition: pedump.c:627
HWND SCROLL_TrackingWin
Definition: uxthemep.h:166
PWND_DATA ThemeGetWndData(HWND hWnd)
Definition: themehooks.c:17
#define SIF_ALL
Definition: winuser.h:1218
static void SCROLL_DrawArrows(PDRAW_CONTEXT pcontext, SCROLLBARINFO *psbi, BOOL vertical, int htDown, int htHot)
Definition: ncscrollbar.c:147

Referenced by ThemeHandleNcMouseLeave(), ThemeHandleNcMouseMove(), and ThemePaintWindow().

◆ ThemeGetWndData()

PWND_DATA ThemeGetWndData ( HWND  hWnd)

Definition at line 17 of file themehooks.c.

18 {
19  PWND_DATA pwndData;
20 
22  if(pwndData == NULL)
23  {
24  pwndData = HeapAlloc(GetProcessHeap(),
26  sizeof(WND_DATA));
27  if(pwndData == NULL)
28  {
29  return NULL;
30  }
31 
33  }
34 
35  return pwndData;
36 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HWND hWnd
Definition: settings.c:17
ATOM atWndContext
Definition: system.c:52
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
struct _WND_DATA * PWND_DATA
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define MAKEINTATOM(i)
Definition: winbase.h:1416

Referenced by DefWndNCHitTest(), GetDiaogTextureBrush(), GetNCCaptionTheme(), GetNCScrollbarTheme(), OnPostWinPosChanged(), SCROLL_TrackScrollBar(), ThemeCalculateCaptionButtonsPos(), ThemeDrawCaptionButton(), ThemeDrawScrollBar(), ThemeGetScrollInfo(), ThemeHandleButton(), ThemeHandleNcMouseLeave(), ThemeHandleNcMouseMove(), ThemePreWindowProc(), and ThemeSetWindowRgn().

◆ ThemeInitDrawContext()

void ThemeInitDrawContext ( PDRAW_CONTEXT  pcontext,
HWND  hWnd,
HRGN  hRgn 
)

Definition at line 156 of file nonclient.c.

159 {
160  pcontext->wi.cbSize = sizeof(pcontext->wi);
161  GetWindowInfo(hWnd, &pcontext->wi);
162  pcontext->hWnd = hWnd;
163  pcontext->Active = IsWindowActive(hWnd, pcontext->wi.dwExStyle);
164  pcontext->theme = GetNCCaptionTheme(hWnd, pcontext->wi.dwStyle);
165  pcontext->scrolltheme = GetNCScrollbarTheme(hWnd, pcontext->wi.dwStyle);
166 
167  pcontext->CaptionHeight = pcontext->wi.cyWindowBorders;
169 
170  if(hRgn <= (HRGN)1)
171  {
172  hRgn = CreateRectRgnIndirect(&pcontext->wi.rcWindow);
173  }
174  pcontext->hRgn = hRgn;
175 
177 }
HTHEME GetNCCaptionTheme(HWND hWnd, DWORD style)
Definition: themehooks.c:88
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
DWORD cbSize
Definition: winuser.h:3708
DWORD dwStyle
Definition: winuser.h:3711
HRGN WINAPI CreateRectRgnIndirect(_In_ LPCRECT)
HWND hWnd
Definition: settings.c:17
static HRGN hRgn
Definition: mapping.c:33
#define DCX_USESTYLE
Definition: GetDCEx.c:10
UINT cyWindowBorders
Definition: winuser.h:3715
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define DCX_INTERSECTRGN
Definition: winuser.h:2083
#define DCX_WINDOW
Definition: winuser.h:2074
HTHEME scrolltheme
Definition: uxthemep.h:178
#define DCX_KEEPCLIPRGN
Definition: undocuser.h:66
RECT rcWindow
Definition: winuser.h:3709
WINDOWINFO wi
Definition: uxthemep.h:180
DWORD dwExStyle
Definition: winuser.h:3712
#define SM_CYCAPTION
Definition: winuser.h:953
int WINAPI GetSystemMetrics(_In_ int)
HTHEME GetNCScrollbarTheme(HWND hWnd, DWORD style)
Definition: themehooks.c:118
int CaptionHeight
Definition: uxthemep.h:183
BOOL WINAPI GetWindowInfo(_In_ HWND, _Inout_ PWINDOWINFO)
static BOOL IsWindowActive(HWND hWnd, DWORD ExStyle)
Definition: nonclient.c:12
HTHEME theme
Definition: uxthemep.h:177
#define SM_CYSMCAPTION
Definition: winuser.h:1004

Referenced by SCROLL_HandleScrollEvent(), ThemeHandleButton(), ThemeHandleNcMouseLeave(), ThemeHandleNcMouseMove(), and ThemeHandleNCPaint().

◆ ThemeWndProc()

LRESULT CALLBACK ThemeWndProc ( HWND  hWnd,
UINT  Msg,
WPARAM  wParam,
LPARAM  lParam,
WNDPROC  DefWndProc 
)

Definition at line 998 of file nonclient.c.

999 {
1000  switch(Msg)
1001  {
1002  case WM_NCPAINT:
1003  return ThemeHandleNCPaint(hWnd, (HRGN)wParam);
1004  //
1005  // WM_NCUAHDRAWCAPTION : wParam are DC_* flags.
1006  //
1007  case WM_NCUAHDRAWCAPTION:
1008  //
1009  // WM_NCUAHDRAWFRAME : wParam is HDC, lParam are DC_ACTIVE and or DC_REDRAWHUNGWND.
1010  //
1011  case WM_NCUAHDRAWFRAME:
1012  case WM_NCACTIVATE:
1013 
1015  return TRUE;
1016 
1017  ThemeHandleNCPaint(hWnd, (HRGN)1);
1018  return TRUE;
1019  case WM_NCMOUSEMOVE:
1020  {
1021  POINT Point;
1025  }
1026  case WM_NCMOUSELEAVE:
1027  return ThemeHandleNcMouseLeave(hWnd);
1028  case WM_NCLBUTTONDOWN:
1029  switch (wParam)
1030  {
1031  case HTMINBUTTON:
1032  case HTMAXBUTTON:
1033  case HTCLOSE:
1034  {
1036  return 0;
1037  }
1038  default:
1039  return DefWndProc(hWnd, Msg, wParam, lParam);
1040  }
1041  case WM_NCHITTEST:
1042  {
1043  POINT Point;
1046  return DefWndNCHitTest(hWnd, Point);
1047  }
1048  case WM_SYSCOMMAND:
1049  {
1050  if((wParam & 0xfff0) == SC_VSCROLL ||
1051  (wParam & 0xfff0) == SC_HSCROLL)
1052  {
1053  POINT Pt;
1054  Pt.x = (short)LOWORD(lParam);
1055  Pt.y = (short)HIWORD(lParam);
1057  return 0;
1058  }
1059  else
1060  {
1061  return DefWndProc(hWnd, Msg, wParam, lParam);
1062  }
1063  }
1064  default:
1065  return DefWndProc(hWnd, Msg, wParam, lParam);
1066  }
1067 }
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1674
#define HTMAXBUTTON
Definition: winuser.h:2438
#define TRUE
Definition: types.h:120
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
HWND hWnd
Definition: settings.c:17
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
static LRESULT ThemeHandleNcMouseMove(HWND hWnd, DWORD ht, POINT *pt)
Definition: nonclient.c:615
#define WM_NCHITTEST
Definition: winuser.h:1668
#define HTMINBUTTON
Definition: winuser.h:2437
WPARAM wParam
Definition: combotst.c:138
#define WM_NCPAINT
Definition: winuser.h:1669
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:93
static LRESULT DefWndNCHitTest(HWND hWnd, POINT Point)
Definition: nonclient.c:783
#define WM_NCACTIVATE
Definition: winuser.h:1670
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
static LRESULT ThemeHandleNCPaint(HWND hWnd, HRGN hRgn)
Definition: nonclient.c:598
#define WS_CAPTION
Definition: pedump.c:624
#define WM_NCUAHDRAWCAPTION
Definition: undocuser.h:45
void NC_TrackScrollBar(HWND hwnd, WPARAM wParam, POINT pt)
Definition: ncscrollbar.c:665
#define HTCLOSE
Definition: winuser.h:2453
struct Point Point
struct @1574 Msg[]
#define GWL_STYLE
Definition: winuser.h:846
static LRESULT ThemeHandleNcMouseLeave(HWND hWnd)
Definition: nonclient.c:670
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
#define WM_NCUAHDRAWFRAME
Definition: undocuser.h:46
#define HIWORD(l)
Definition: typedefs.h:246
#define WM_NCMOUSELEAVE
Definition: winuser.h:1818
static VOID ThemeHandleButton(HWND hWnd, WPARAM wParam)
Definition: nonclient.c:704
#define WM_SYSCOMMAND
Definition: winuser.h:1717
#define SC_VSCROLL
Definition: winuser.h:2547
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define WM_NCMOUSEMOVE
Definition: winuser.h:1673
#define SC_HSCROLL
Definition: winuser.h:2548

Referenced by ThemeDefWindowProcA(), and ThemeDefWindowProcW().

◆ UXINI_CloseINI()

void UXINI_CloseINI ( PUXINI_FILE  uf)

Definition at line 83 of file uxini.c.

84 {
85  HeapFree(GetProcessHeap(), 0, uf);
86 }
#define GetProcessHeap()
Definition: compat.h:395
#define HeapFree(x, y, z)
Definition: compat.h:394

Referenced by GetThemeDocumentationProperty(), and MSSTYLES_ParseThemeIni().

◆ UXINI_FindSection()

BOOL UXINI_FindSection ( PUXINI_FILE  uf,
LPCWSTR  lpName 
)

Definition at line 200 of file uxini.c.

201 {
202  LPCWSTR lpSection;
203  DWORD dwLen;
204  while((lpSection = UXINI_GetNextSection(uf, &dwLen))) {
205  if(CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, lpSection, dwLen, lpName, -1) == CSTR_EQUAL) {
206  return TRUE;
207  }
208  }
209  return FALSE;
210 }
#define TRUE
Definition: types.h:120
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ LPCSTR lpName
Definition: winbase.h:2729
#define NORM_IGNORECASE
Definition: winnls.h:173
LPCWSTR UXINI_GetNextSection(PUXINI_FILE uf, DWORD *dwLen)
Definition: uxini.c:173
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: lang.c:2275
#define LOCALE_SYSTEM_DEFAULT
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CSTR_EQUAL
Definition: winnls.h:453

Referenced by GetThemeDocumentationProperty().

◆ UXINI_FindValue()

BOOL UXINI_FindValue ( PUXINI_FILE  uf,
LPCWSTR  lpName,
LPCWSTR lpValue,
DWORD dwValueLen 
)

Definition at line 280 of file uxini.c.

281 {
282  LPCWSTR name;
283  DWORD namelen;
284 
285  while((name = UXINI_GetNextValue(uf, &namelen, lpValue, dwValueLen))) {
287  return TRUE;
288  }
289  }
290  return FALSE;
291 }
#define TRUE
Definition: types.h:120
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ LPCSTR lpName
Definition: winbase.h:2729
#define NORM_IGNORECASE
Definition: winnls.h:173
GLint namelen
Definition: glext.h:7232
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: lang.c:2275
#define LOCALE_SYSTEM_DEFAULT
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CSTR_EQUAL
Definition: winnls.h:453
LPCWSTR UXINI_GetNextValue(PUXINI_FILE uf, DWORD *dwNameLen, LPCWSTR *lpValue, DWORD *dwValueLen)
Definition: uxini.c:226
Definition: name.c:36
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by GetThemeDocumentationProperty().

◆ UXINI_GetNextSection()

LPCWSTR UXINI_GetNextSection ( PUXINI_FILE  uf,
DWORD dwLen 
)

Definition at line 173 of file uxini.c.

174 {
175  LPCWSTR lpLine;
176  while((lpLine = UXINI_GetNextLine(uf, dwLen))) {
177  /* Assuming a ']' ending to the section name */
178  if(lpLine[0] == '[') {
179  lpLine++;
180  *dwLen -= 2;
181  break;
182  }
183  }
184  return lpLine;
185 }
static LPCWSTR UXINI_GetNextLine(PUXINI_FILE uf, DWORD *dwLen)
Definition: uxini.c:129
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by MSSTYLES_ParseThemeIni(), and UXINI_FindSection().

◆ UXINI_GetNextValue()

LPCWSTR UXINI_GetNextValue ( PUXINI_FILE  uf,
DWORD dwNameLen,
LPCWSTR lpValue,
DWORD dwValueLen 
)

Definition at line 226 of file uxini.c.

227 {
228  LPCWSTR lpLine;
229  LPCWSTR lpLineEnd;
230  LPCWSTR name = NULL;
231  LPCWSTR value = NULL;
232  DWORD vallen = 0;
233  DWORD namelen = 0;
234  DWORD dwLen;
235  lpLine = UXINI_GetNextLine(uf, &dwLen);
236  if(!lpLine)
237  return NULL;
238  if(lpLine[0] == '[') {
239  UXINI_UnGetToLine(uf, lpLine);
240  return NULL;
241  }
242  lpLineEnd = lpLine + dwLen;
243 
244  name = lpLine;
245  while(namelen < dwLen && *lpLine != '=') {
246  lpLine++;
247  namelen++;
248  }
249  if(*lpLine != '=') return NULL;
250  lpLine++;
251 
252  /* Remove whitespace from end of name */
253  while(UXINI_isspace(name[namelen-1])) namelen--;
254  /* Remove whitespace from beginning of value */
255  while(UXINI_isspace(*lpLine) && lpLine < lpLineEnd) lpLine++;
256  value = lpLine;
257  vallen = dwLen-(value-name);
258 
259  *dwNameLen = namelen;
260  *dwValueLen = vallen;
261  *lpValue = value;
262 
263  return name;
264 }
static LPCWSTR UXINI_GetNextLine(PUXINI_FILE uf, DWORD *dwLen)
Definition: uxini.c:129
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
GLint namelen
Definition: glext.h:7232
smooth NULL
Definition: ftsmooth.c:416
static void UXINI_UnGetToLine(PUXINI_FILE uf, LPCWSTR lpLine)
Definition: uxini.c:155
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizei const GLfloat * value
Definition: glext.h:6069
Definition: name.c:36
static BOOL UXINI_isspace(WCHAR c)
Definition: uxini.c:109
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by MSSTYLES_ParseThemeIni(), and UXINI_FindValue().

◆ UXINI_LoadINI()

PUXINI_FILE UXINI_LoadINI ( HMODULE  hTheme,
LPCWSTR  lpName 
)

Definition at line 52 of file uxini.c.

52  {
53  HRSRC hrsc;
54  LPCWSTR lpThemesIni = NULL;
55  PUXINI_FILE uf;
56  DWORD dwIniSize;
57 
58  TRACE("Loading resource INI %s\n", debugstr_w(lpName));
59 
60  if((hrsc = FindResourceW(hTheme, lpName, szTextFileResource))) {
61  if(!(lpThemesIni = LoadResource(hTheme, hrsc))) {
62  TRACE("%s resource not found\n", debugstr_w(lpName));
63  return NULL;
64  }
65  }
66 
67  dwIniSize = SizeofResource(hTheme, hrsc) / sizeof(WCHAR);
68  uf = HeapAlloc(GetProcessHeap(), 0, sizeof(UXINI_FILE));
69  uf->lpIni = lpThemesIni;
70  uf->lpCurLoc = lpThemesIni;
71  uf->lpEnd = lpThemesIni + dwIniSize;
72  return uf;
73 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
_In_ LPCSTR lpName
Definition: winbase.h:2729
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
#define debugstr_w
Definition: kernel32.h:32
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
smooth NULL
Definition: ftsmooth.c:416
LPCWSTR lpEnd
Definition: uxini.c:34
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPCWSTR lpCurLoc
Definition: uxini.c:33
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPCWSTR lpIni
Definition: uxini.c:32
static const WCHAR szTextFileResource[]
Definition: uxini.c:27

Referenced by MSSTYLES_GetActiveThemeIni(), and MSSTYLES_GetThemeIni().

◆ 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 }
BOOL WINAPI EnumChildWindows(_In_opt_ HWND, _In_ WNDENUMPROC, _In_ LPARAM)
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
static BOOL CALLBACK UXTHEME_send_theme_changed(HWND hWnd, LPARAM enable)
Definition: system.c:61
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC, _In_ LPARAM)
GLboolean enable
Definition: glext.h:11120
BOOL CALLBACK UXTHEME_broadcast_theme_changed(HWND hWnd, LPARAM enable)
Definition: system.c:68

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

◆ 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 }
int g_cHandles
Definition: system.c:57
ATOM atDialogThemeEnabled
Definition: system.c:46
HINSTANCE hDllInst
Definition: system.c:45
NTSYSAPI VOID NTAPI RtlInitializeHandleTable(_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
ATOM atWndContext
Definition: system.c:52
static ATOM atSubAppName
Definition: system.c:50
RTL_HANDLE_TABLE g_UxThemeHandleTable
Definition: system.c:56
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR L[]
Definition: oid.c:1250
HINSTANCE hInst
Definition: dxdiag.c:13
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
static ATOM atSubIdList
Definition: system.c:51
ATOM atWindowTheme
Definition: system.c:49

Referenced by DllMain().

◆ UXTHEME_LoadImage()

HRESULT UXTHEME_LoadImage ( HTHEME  hTheme,
HDC  hdc,
int  iPartId,
int  iStateId,
const RECT pRect,
BOOL  glyph,
HBITMAP hBmp,
RECT bmpRect,
BOOL hasImageAlpha 
)

Definition at line 230 of file draw.c.

232 {
233  int imagelayout = IL_HORIZONTAL;
234  int imagecount = 1;
235  int imagenum;
236  BITMAP bmp;
239  PTHEME_CLASS pClass;
240 
241  pClass = ValidateHandle(hTheme);
242  if (!pClass)
243  return E_HANDLE;
244 
245  tp = UXTHEME_SelectImage(hTheme, hdc, iPartId, iStateId, pRect, glyph);
246  if(!tp) {
247  FIXME("Couldn't determine image for part/state %d/%d, invalid theme?\n", iPartId, iStateId);
248  return E_PROP_ID_UNSUPPORTED;
249  }
250  lstrcpynW(szPath, tp->lpValue, min(tp->dwValueLen+1, sizeof(szPath)/sizeof(szPath[0])));
251  *hBmp = MSSTYLES_LoadBitmap(pClass, szPath, hasImageAlpha);
252  if(!*hBmp) {
253  TRACE("Failed to load bitmap %s\n", debugstr_w(szPath));
255  }
256 
257  GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_IMAGELAYOUT, &imagelayout);
258  GetThemeInt(hTheme, iPartId, iStateId, TMT_IMAGECOUNT, &imagecount);
259 
260  imagenum = max (min (imagecount, iStateId), 1) - 1;
261  GetObjectW(*hBmp, sizeof(bmp), &bmp);
262 
263  if(imagecount < 1) imagecount = 1;
264 
265  if(imagelayout == IL_VERTICAL) {
266  int height = bmp.bmHeight/imagecount;
267  bmpRect->left = 0;
268  bmpRect->right = bmp.bmWidth;
269  bmpRect->top = imagenum * height;
270  bmpRect->bottom = bmpRect->top + height;
271  }
272  else {
273  int width = bmp.bmWidth/imagecount;
274  bmpRect->left = imagenum * width;
275  bmpRect->right = bmpRect->left + width;
276  bmpRect->top = 0;
277  bmpRect->bottom = bmp.bmHeight;
278  }
279  return S_OK;
280 }
GLint GLint GLsizei width
Definition: gl.h:1546
#define max(a, b)
Definition: svc.c:63
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define E_HANDLE
Definition: winerror.h:2850
#define TMT_IMAGELAYOUT
Definition: vssym32.h:363
HRESULT WINAPI GetThemeEnumValue(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:63
LONG top
Definition: windef.h:292
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
_In_ UINT64 _In_ UINT64 _In_ UINT64 _In_opt_ traverse_ptr * tp
Definition: btrfs.c:2694
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define lstrcpynW
Definition: compat.h:397
#define TMT_IMAGECOUNT
Definition: vssym32.h:272
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
HBITMAP MSSTYLES_LoadBitmap(PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL *hasAlpha)
Definition: msstyles.c:896
#define TRACE(s)
Definition: solgame.cpp:4
#define E_PROP_ID_UNSUPPORTED
Definition: vfwmsgs.h:173
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
BITMAP bmp
Definition: alphablend.c:62
PTHEME_CLASS ValidateHandle(HTHEME hTheme)
Definition: system.c:717
HDC hdc
Definition: main.c:9
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define S_OK
Definition: intsafe.h:59
LPCWSTR szPath
Definition: env.c:35
Definition: bl.h:1331
#define min(a, b)
Definition: monoChain.cc:55
LONG bottom
Definition: windef.h:294
HRESULT WINAPI GetThemeInt(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:126
static PTHEME_PROPERTY UXTHEME_SelectImage(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, BOOL glyph)
Definition: draw.c:147

Referenced by get_image_part_size(), GetDiaogTextureBrush(), IsThemeBackgroundPartiallyTransparent(), UXTHEME_DrawImageBackground(), and UXTHEME_DrawImageGlyph().

◆ 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];
189  PTHEME_FILE pt;
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';
216  RegCloseKey(hKey);
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 const WCHAR szSizeName[]
Definition: system.c:39
HRESULT hr
Definition: shlfolder.c:183
#define pt(x, y)
Definition: drawing.c:79
static const WCHAR szThemeManager[]
Definition: system.c:31
#define HKEY_CURRENT_USER
Definition: winreg.h:11
static const WCHAR szThemeActive[]
Definition: system.c:38
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
static const WCHAR szColorName[]
Definition: system.c:40
static HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
Definition: system.c:132
static DWORD query_reg_path(HKEY hKey, LPCWSTR lpszValue, LPVOID pvData)
Definition: system.c:84
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
static BOOL bIsThemeActive(LPCWSTR pszTheme, LPCWSTR pszColor, LPCWSTR pszSize)
Definition: system.c:145
#define TRACE(s)
Definition: solgame.cpp:4
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWSTR pszSizeName, PTHEME_FILE *tf)
Definition: msstyles.c:54
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR szDllName[]
Definition: system.c:41
BOOL g_bThemeHooksActive
Definition: themehooks.c:15
void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
Definition: msstyles.c:179
static BOOL bThemeActive
Definition: scroll.c:29

Referenced by ThemeInitApiHook(), and ThemePreWindowProc().

◆ 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 }
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
smooth NULL
Definition: ftsmooth.c:416
RTL_HANDLE_TABLE g_UxThemeHandleTable
Definition: system.c:56
NTSYSAPI BOOLEAN NTAPI RtlIsValidHandle(_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
#define ERR(fmt,...)
Definition: debug.h:109
BOOL g_bThemeHooksActive
Definition: themehooks.c:15
Definition: rtltypes.h:1240
PTHEME_CLASS pClass
Definition: uxthemep.h:96

Referenced by CheckMenuItem(), GetMenuContextHelpId(), GetMenuDefaultItem(), GetMenuInfo(), GetMenuItemCount(), GetThemeBool(), GetThemeColor(), GetThemeEnumValue(), GetThemeFilename(), GetThemeFont(), GetThemeInt(), GetThemeIntList(), GetThemeMargins(), GetThemeMetric(), GetThemePosition(), GetThemePropertyOrigin(), GetThemeRect(), GetThemeString(), GetThemeSysBool(), GetThemeSysColor(), GetThemeSysFont(), GetThemeSysInt(), GetThemeSysSize(), GetThemeSysString(), HitTestThemeBackground(), IsMenu(), IsThemePartDefined(), UXTHEME_LoadImage(), and UXTHEME_SelectImage().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( uxtheme  )

Variable Documentation

◆ atWindowTheme

ATOM atWindowTheme

Definition at line 49 of file system.c.

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

◆ atWndContext

◆ g_bThemeHooksActive

◆ hDllInst

HINSTANCE hDllInst

Definition at line 45 of file system.c.

Referenced by DrawNCPreview(), ThemeHooksInstall(), and UXTHEME_InitSystem().