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