1c2c66affSColin Finck #ifndef _UXTHEME_H 2c2c66affSColin Finck #define _UXTHEME_H 3c2c66affSColin Finck 4c2c66affSColin Finck #include <commctrl.h> 5c2c66affSColin Finck 6c2c66affSColin Finck #ifdef __cplusplus 7c2c66affSColin Finck extern "C" { 8c2c66affSColin Finck #endif 9c2c66affSColin Finck 10c2c66affSColin Finck #if (_WIN32_WINNT >= 0x0501) 11c2c66affSColin Finck #define DTBG_CLIPRECT 0x00000001 12c2c66affSColin Finck #define DTBG_DRAWSOLID 0x00000002 13c2c66affSColin Finck #define DTBG_OMITBORDER 0x00000004 14c2c66affSColin Finck #define DTBG_OMITCONTENT 0x00000008 15c2c66affSColin Finck #define DTBG_COMPUTINGREGION 0x00000010 16c2c66affSColin Finck #define DTBG_MIRRORDC 0x00000020 17c2c66affSColin Finck #define DTT_GRAYED 0x00000001 18*d4dc0cb5SEthan Rodensky 19*d4dc0cb5SEthan Rodensky /* DTTOPTS.dwFlags bits */ 20*d4dc0cb5SEthan Rodensky #define DTT_TEXTCOLOR 0x00000001 21*d4dc0cb5SEthan Rodensky #define DTT_BORDERCOLOR 0x00000002 22*d4dc0cb5SEthan Rodensky #define DTT_SHADOWCOLOR 0x00000004 23*d4dc0cb5SEthan Rodensky #define DTT_SHADOWTYPE 0x00000008 24*d4dc0cb5SEthan Rodensky #define DTT_SHADOWOFFSET 0x00000010 25*d4dc0cb5SEthan Rodensky #define DTT_BORDERSIZE 0x00000020 26*d4dc0cb5SEthan Rodensky #define DTT_FONTPROP 0x00000040 27*d4dc0cb5SEthan Rodensky #define DTT_COLORPROP 0x00000080 28*d4dc0cb5SEthan Rodensky #define DTT_STATEID 0x00000100 29*d4dc0cb5SEthan Rodensky #define DTT_CALCRECT 0x00000200 30*d4dc0cb5SEthan Rodensky #define DTT_APPLYOVERLAY 0x00000400 31*d4dc0cb5SEthan Rodensky #define DTT_GLOWSIZE 0x00000800 32*d4dc0cb5SEthan Rodensky #define DTT_CALLBACK 0x00001000 33*d4dc0cb5SEthan Rodensky #define DTT_COMPOSITED 0x00002000 34*d4dc0cb5SEthan Rodensky #define DTT_VALIDBITS 0x00003fff 35*d4dc0cb5SEthan Rodensky 36c2c66affSColin Finck #define ETDT_DISABLE 0x00000001 37c2c66affSColin Finck #define ETDT_ENABLE 0x00000002 38c2c66affSColin Finck #define ETDT_USETABTEXTURE 0x00000004 39c2c66affSColin Finck #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE) 40c2c66affSColin Finck #define STAP_ALLOW_NONCLIENT 0x00000001 41c2c66affSColin Finck #define STAP_ALLOW_CONTROLS 0x00000002 42c2c66affSColin Finck #define STAP_ALLOW_WEBCONTENT 0x00000004 43c2c66affSColin Finck #define HTTB_BACKGROUNDSEG 0x0000 44c2c66affSColin Finck #define HTTB_FIXEDBORDER 0x0002 45c2c66affSColin Finck #define HTTB_CAPTION 0x0004 46c2c66affSColin Finck #define HTTB_RESIZINGBORDER_LEFT 0x0010 47c2c66affSColin Finck #define HTTB_RESIZINGBORDER_TOP 0x0020 48c2c66affSColin Finck #define HTTB_RESIZINGBORDER_RIGHT 0x0040 49c2c66affSColin Finck #define HTTB_RESIZINGBORDER_BOTTOM 0x0080 50c2c66affSColin Finck #define HTTB_RESIZINGBORDER (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM) 51c2c66affSColin Finck #define HTTB_SIZINGTEMPLATE 0x0100 52c2c66affSColin Finck #define HTTB_SYSTEMSIZINGMARGINS 0x0200 53c2c66affSColin Finck 54c2c66affSColin Finck #define OTD_FORCE_RECT_SIZING 0x0001 55c2c66affSColin Finck #define OTD_NONCLIENT 0x0002 56c2c66affSColin Finck #define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT) 57c2c66affSColin Finck 58c2c66affSColin Finck typedef HANDLE HPAINTBUFFER; 59c2c66affSColin Finck typedef HANDLE HTHEME; 60*d4dc0cb5SEthan Rodensky typedef int (WINAPI *DTT_CALLBACK_PROC)(HDC,LPWSTR,int,RECT*,UINT,LPARAM); 61c2c66affSColin Finck 62c2c66affSColin Finck typedef enum _BP_BUFFERFORMAT 63c2c66affSColin Finck { 64c2c66affSColin Finck BPBF_COMPATIBLEBITMAP, 65c2c66affSColin Finck BPBF_DIB, 66c2c66affSColin Finck BPBF_TOPDOWNDIB, 67c2c66affSColin Finck BPBF_TOPDOWNMONODIB 68c2c66affSColin Finck } BP_BUFFERFORMAT; 69c2c66affSColin Finck 70c2c66affSColin Finck typedef struct _BP_PAINTPARAMS 71c2c66affSColin Finck { 72c2c66affSColin Finck DWORD cbSize; 73c2c66affSColin Finck DWORD dwFlags; 74c2c66affSColin Finck const RECT *prcExclude; 75c2c66affSColin Finck const BLENDFUNCTION *pBlendFunction; 76c2c66affSColin Finck } BP_PAINTPARAMS, *PBP_PAINTPARAMS; 77c2c66affSColin Finck 78c2c66affSColin Finck typedef enum PROPERTYORIGIN { 79c2c66affSColin Finck PO_STATE = 0, 80c2c66affSColin Finck PO_PART = 1, 81c2c66affSColin Finck PO_CLASS = 2, 82c2c66affSColin Finck PO_GLOBAL = 3, 83c2c66affSColin Finck PO_NOTFOUND = 4 84c2c66affSColin Finck } PROPERTYORIGIN; 85c2c66affSColin Finck 86c2c66affSColin Finck typedef enum THEMESIZE { 87c2c66affSColin Finck TS_MIN, 88c2c66affSColin Finck TS_TRUE, 89c2c66affSColin Finck TS_DRAW 90c2c66affSColin Finck } THEMESIZE; 91c2c66affSColin Finck 92c2c66affSColin Finck typedef struct _DTBGOPTS { 93c2c66affSColin Finck DWORD dwSize; 94c2c66affSColin Finck DWORD dwFlags; 95c2c66affSColin Finck RECT rcClip; 96c2c66affSColin Finck } DTBGOPTS, *PDTBGOPTS; 97c2c66affSColin Finck 98c2c66affSColin Finck #define MAX_INTLIST_COUNT 10 99c2c66affSColin Finck 100c2c66affSColin Finck typedef struct _INTLIST { 101c2c66affSColin Finck int iValueCount; 102c2c66affSColin Finck int iValues[MAX_INTLIST_COUNT]; 103c2c66affSColin Finck } INTLIST, *PINTLIST; 104c2c66affSColin Finck 105c2c66affSColin Finck typedef struct _MARGINS { 106c2c66affSColin Finck int cxLeftWidth; 107c2c66affSColin Finck int cxRightWidth; 108c2c66affSColin Finck int cyTopHeight; 109c2c66affSColin Finck int cyBottomHeight; 110c2c66affSColin Finck } MARGINS, *PMARGINS; 111c2c66affSColin Finck 112*d4dc0cb5SEthan Rodensky typedef struct _DTTOPTS { 113*d4dc0cb5SEthan Rodensky DWORD dwSize; 114*d4dc0cb5SEthan Rodensky DWORD dwFlags; 115*d4dc0cb5SEthan Rodensky COLORREF crText; 116*d4dc0cb5SEthan Rodensky COLORREF crBorder; 117*d4dc0cb5SEthan Rodensky COLORREF crShadow; 118*d4dc0cb5SEthan Rodensky int iTextShadowType; 119*d4dc0cb5SEthan Rodensky POINT ptShadowOffset; 120*d4dc0cb5SEthan Rodensky int iBorderSize; 121*d4dc0cb5SEthan Rodensky int iFontPropId; 122*d4dc0cb5SEthan Rodensky int iColorPropId; 123*d4dc0cb5SEthan Rodensky int iStateId; 124*d4dc0cb5SEthan Rodensky BOOL fApplyOverlay; 125*d4dc0cb5SEthan Rodensky int iGlowSize; 126*d4dc0cb5SEthan Rodensky DTT_CALLBACK_PROC pfnDrawTextCallback; 127*d4dc0cb5SEthan Rodensky LPARAM lParam; 128*d4dc0cb5SEthan Rodensky } DTTOPTS, *PDTTOPTS; 129*d4dc0cb5SEthan Rodensky 130c2c66affSColin Finck HRESULT WINAPI CloseThemeData(HTHEME); 131c2c66affSColin Finck HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*); 132c2c66affSColin Finck HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,const DTBGOPTS*); 133c2c66affSColin Finck HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,RECT*); 134c2c66affSColin Finck HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int); 135c2c66affSColin Finck HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*); 136c2c66affSColin Finck HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,const RECT*); 137c2c66affSColin Finck HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD); 138c2c66affSColin Finck HRESULT WINAPI EnableTheming(BOOL); 139c2c66affSColin Finck HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int); 140c2c66affSColin Finck DWORD WINAPI GetThemeAppProperties(void); 141c2c66affSColin Finck HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,const RECT*,RECT*); 142c2c66affSColin Finck HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*); 143c2c66affSColin Finck HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*); 144c2c66affSColin Finck HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*); 145c2c66affSColin Finck HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*); 146c2c66affSColin Finck HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int); 147c2c66affSColin Finck HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*); 148c2c66affSColin Finck HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int); 149c2c66affSColin Finck HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*); 150c2c66affSColin Finck HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*); 151c2c66affSColin Finck HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*); 152c2c66affSColin Finck HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*); 153c2c66affSColin Finck HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*); 154c2c66affSColin Finck HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*); 155c2c66affSColin Finck HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*); 156c2c66affSColin Finck HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*); 157c2c66affSColin Finck HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*); 158c2c66affSColin Finck HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int); 159c2c66affSColin Finck BOOL WINAPI GetThemeSysBool(HTHEME,int); 160c2c66affSColin Finck COLORREF WINAPI GetThemeSysColor(HTHEME,int); 161c2c66affSColin Finck HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int); 162c2c66affSColin Finck HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*); 163c2c66affSColin Finck HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*); 164c2c66affSColin Finck int WINAPI GetThemeSysSize(HTHEME,int); 165c2c66affSColin Finck HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int); 166c2c66affSColin Finck HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,const RECT*,RECT*); 167c2c66affSColin Finck HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*); 168c2c66affSColin Finck HTHEME WINAPI GetWindowTheme(HWND); 169c2c66affSColin Finck HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,HRGN,POINT,WORD*); 170c2c66affSColin Finck BOOL WINAPI IsAppThemed(void); 171c2c66affSColin Finck BOOL WINAPI IsThemeActive(void); 172c2c66affSColin Finck BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int); 173c2c66affSColin Finck BOOL WINAPI IsThemeDialogTextureEnabled(HWND); 174c2c66affSColin Finck BOOL WINAPI IsThemePartDefined(HTHEME,int,int); 175c2c66affSColin Finck HTHEME WINAPI OpenThemeData(HWND,LPCWSTR); 176c2c66affSColin Finck HTHEME WINAPI OpenThemeDataEx(HWND,LPCWSTR,DWORD); 177c2c66affSColin Finck void WINAPI SetThemeAppProperties(DWORD); 178c2c66affSColin Finck HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR); 179*d4dc0cb5SEthan Rodensky 180*d4dc0cb5SEthan Rodensky /* Undocumented and not exported in Windows XP/2003 181*d4dc0cb5SEthan Rodensky * In public headers since Vista+ */ 182*d4dc0cb5SEthan Rodensky HRESULT 183*d4dc0cb5SEthan Rodensky WINAPI 184*d4dc0cb5SEthan Rodensky DrawThemeTextEx( 185*d4dc0cb5SEthan Rodensky _In_ HTHEME hTheme, 186*d4dc0cb5SEthan Rodensky _In_ HDC hdc, 187*d4dc0cb5SEthan Rodensky _In_ int iPartId, 188*d4dc0cb5SEthan Rodensky _In_ int iStateId, 189*d4dc0cb5SEthan Rodensky _In_ LPCWSTR pszText, 190*d4dc0cb5SEthan Rodensky _In_ int iCharCount, 191*d4dc0cb5SEthan Rodensky _In_ DWORD dwTextFlags, 192*d4dc0cb5SEthan Rodensky _Inout_ LPRECT pRect, 193*d4dc0cb5SEthan Rodensky _In_ const DTTOPTS *options 194*d4dc0cb5SEthan Rodensky ); 195c2c66affSColin Finck #endif 196c2c66affSColin Finck 197c2c66affSColin Finck #ifdef __cplusplus 198c2c66affSColin Finck } 199c2c66affSColin Finck #endif 200c2c66affSColin Finck #endif 201