Reactos

[UXTHEME] Implement various Vista+ functions, mostly from WINE

authored by

Ethan Rodensky and committed by
Justin Miller
7ec3a7e9 01a6c487

+419 -41
+6 -1
dll/win32/uxtheme/CMakeLists.txt
··· 1 1 2 2 include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) 3 3 add_definitions(-D__WINESRC__ -D__ROS_LONG64__) 4 - spec2def(uxtheme.dll uxtheme.spec ADD_IMPORTLIB) 4 + 5 + if(DLL_EXPORT_VERSION GREATER_EQUAL 0x600) 6 + spec2def(uxtheme.dll uxtheme_vista.spec ADD_IMPORTLIB) 7 + else() 8 + spec2def(uxtheme.dll uxtheme.spec ADD_IMPORTLIB) 9 + endif() 5 10 6 11 list(APPEND SOURCE 7 12 buffer.c
+147 -31
dll/win32/uxtheme/buffer.c
··· 19 19 */ 20 20 21 21 #include "uxthemep.h" 22 + #include <wine/heap.h> 23 + 24 + struct paintbuffer 25 + { 26 + HDC targetdc; 27 + HDC memorydc; 28 + HBITMAP bitmap; 29 + RECT rect; 30 + void *bits; 31 + }; 32 + 33 + static void free_paintbuffer(struct paintbuffer *buffer) 34 + { 35 + DeleteObject(buffer->bitmap); 36 + DeleteDC(buffer->memorydc); 37 + heap_free(buffer); 38 + } 39 + 40 + static struct paintbuffer *get_buffer_obj(HPAINTBUFFER handle) 41 + { 42 + return handle; 43 + } 22 44 23 45 /*********************************************************************** 24 46 * BufferedPaintInit (UXTHEME.@) ··· 41 63 /*********************************************************************** 42 64 * BeginBufferedPaint (UXTHEME.@) 43 65 */ 44 - HPAINTBUFFER WINAPI BeginBufferedPaint(HDC hdcTarget, 45 - const RECT * prcTarget, 46 - BP_BUFFERFORMAT dwFormat, 47 - BP_PAINTPARAMS *pPaintParams, 48 - HDC *phdc) 66 + HPAINTBUFFER WINAPI BeginBufferedPaint(HDC targetdc, const RECT *rect, 67 + BP_BUFFERFORMAT format, BP_PAINTPARAMS *params, HDC *retdc) 49 68 { 50 - static int i; 69 + #if (defined(_MSC_VER)) 70 + char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors) + 256 * sizeof(RGBQUAD)]; 71 + #else 72 + char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])]; 73 + #endif 74 + BITMAPINFO *bmi = (BITMAPINFO *)bmibuf; 75 + struct paintbuffer *buffer; 76 + 77 + TRACE("(%p %s %d %p %p)\n", targetdc, wine_dbgstr_rect(rect), format, 78 + params, retdc); 79 + 80 + if (retdc) 81 + *retdc = NULL; 82 + 83 + if (!targetdc || IsRectEmpty(rect)) 84 + return NULL; 51 85 52 - TRACE("Stub (%p %p %d %p %p)\n", hdcTarget, prcTarget, dwFormat, 53 - pPaintParams, phdc); 86 + if (params) 87 + FIXME("painting parameters are ignored\n"); 54 88 55 - if (!i++) 56 - FIXME("Stub (%p %p %d %p %p)\n", hdcTarget, prcTarget, dwFormat, 57 - pPaintParams, phdc); 58 - return NULL; 89 + buffer = heap_alloc(sizeof(*buffer)); 90 + buffer->targetdc = targetdc; 91 + buffer->rect = *rect; 92 + buffer->memorydc = CreateCompatibleDC(targetdc); 93 + 94 + switch (format) 95 + { 96 + case BPBF_COMPATIBLEBITMAP: 97 + buffer->bitmap = CreateCompatibleBitmap(targetdc, rect->right - rect->left, rect->bottom - rect->top); 98 + buffer->bits = NULL; 99 + break; 100 + case BPBF_DIB: 101 + case BPBF_TOPDOWNDIB: 102 + case BPBF_TOPDOWNMONODIB: 103 + /* create DIB section */ 104 + memset(bmi, 0, sizeof(bmibuf)); 105 + bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader); 106 + bmi->bmiHeader.biHeight = format == BPBF_DIB ? rect->bottom - rect->top : 107 + -(rect->bottom - rect->top); 108 + bmi->bmiHeader.biWidth = rect->right - rect->left; 109 + bmi->bmiHeader.biBitCount = format == BPBF_TOPDOWNMONODIB ? 1 : 32; 110 + bmi->bmiHeader.biPlanes = 1; 111 + bmi->bmiHeader.biCompression = BI_RGB; 112 + buffer->bitmap = CreateDIBSection(buffer->memorydc, bmi, DIB_RGB_COLORS, &buffer->bits, NULL, 0); 113 + break; 114 + default: 115 + WARN("Unknown buffer format %d\n", format); 116 + buffer->bitmap = NULL; 117 + free_paintbuffer(buffer); 118 + return NULL; 119 + } 120 + 121 + if (!buffer->bitmap) 122 + { 123 + WARN("Failed to create buffer bitmap\n"); 124 + free_paintbuffer(buffer); 125 + return NULL; 126 + } 127 + 128 + SetWindowOrgEx(buffer->memorydc, rect->left, rect->top, NULL); 129 + IntersectClipRect(buffer->memorydc, rect->left, rect->top, rect->right, rect->bottom); 130 + DeleteObject(SelectObject(buffer->memorydc, buffer->bitmap)); 131 + 132 + *retdc = buffer->memorydc; 133 + 134 + return (HPAINTBUFFER)buffer; 59 135 } 60 136 61 137 62 138 /*********************************************************************** 63 139 * EndBufferedPaint (UXTHEME.@) 64 140 */ 65 - HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER hPaintBuffer, BOOL fUpdateTarget) 141 + HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER bufferhandle, BOOL update) 66 142 { 67 - FIXME("Stub (%p %d)\n", hPaintBuffer, fUpdateTarget); 143 + struct paintbuffer *buffer = get_buffer_obj(bufferhandle); 144 + 145 + TRACE("(%p %d)\n", bufferhandle, update); 146 + 147 + if (!buffer) 148 + return E_INVALIDARG; 149 + 150 + if (update) 151 + { 152 + if (!BitBlt(buffer->targetdc, buffer->rect.left, buffer->rect.top, 153 + buffer->rect.right - buffer->rect.left, buffer->rect.bottom - buffer->rect.top, 154 + buffer->memorydc, buffer->rect.left, buffer->rect.top, SRCCOPY)) 155 + { 156 + WARN("BitBlt() failed\n"); 157 + } 158 + } 159 + 160 + free_paintbuffer(buffer); 68 161 return S_OK; 69 162 } 70 - 71 - #ifndef __REACTOS__ 72 163 73 164 /*********************************************************************** 74 165 * BufferedPaintClear (UXTHEME.@) ··· 91 182 /*********************************************************************** 92 183 * GetBufferedPaintBits (UXTHEME.@) 93 184 */ 94 - HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER hBufferedPaint, RGBQUAD **ppbBuffer, 95 - int *pcxRow) 185 + HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER bufferhandle, RGBQUAD **bits, int *width) 96 186 { 97 - FIXME("Stub (%p %p %p)\n", hBufferedPaint, ppbBuffer, pcxRow); 98 - return E_NOTIMPL; 187 + struct paintbuffer *buffer = get_buffer_obj(bufferhandle); 188 + 189 + TRACE("(%p %p %p)\n", buffer, bits, width); 190 + 191 + if (!bits || !width) 192 + return E_POINTER; 193 + 194 + if (!buffer || !buffer->bits) 195 + return E_FAIL; 196 + 197 + *bits = buffer->bits; 198 + *width = buffer->rect.right - buffer->rect.left; 199 + 200 + return S_OK; 99 201 } 100 202 101 203 /*********************************************************************** 102 204 * GetBufferedPaintDC (UXTHEME.@) 103 205 */ 104 - HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER hBufferedPaint) 206 + HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER bufferhandle) 105 207 { 106 - FIXME("Stub (%p)\n", hBufferedPaint); 107 - return NULL; 208 + struct paintbuffer *buffer = get_buffer_obj(bufferhandle); 209 + 210 + TRACE("(%p)\n", buffer); 211 + 212 + return buffer ? buffer->memorydc : NULL; 108 213 } 109 214 110 215 /*********************************************************************** 111 216 * GetBufferedPaintTargetDC (UXTHEME.@) 112 217 */ 113 - HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER hBufferedPaint) 218 + HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER bufferhandle) 114 219 { 115 - FIXME("Stub (%p)\n", hBufferedPaint); 116 - return NULL; 220 + struct paintbuffer *buffer = get_buffer_obj(bufferhandle); 221 + 222 + TRACE("(%p)\n", buffer); 223 + 224 + return buffer ? buffer->targetdc : NULL; 117 225 } 118 226 119 227 /*********************************************************************** 120 228 * GetBufferedPaintTargetRect (UXTHEME.@) 121 229 */ 122 - HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER hBufferedPaint, RECT *prc) 230 + HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER bufferhandle, RECT *rect) 123 231 { 124 - FIXME("Stub (%p %p)\n", hBufferedPaint, prc); 125 - return E_NOTIMPL; 232 + struct paintbuffer *buffer = get_buffer_obj(bufferhandle); 233 + 234 + TRACE("(%p %p)\n", buffer, rect); 235 + 236 + if (!rect) 237 + return E_POINTER; 238 + 239 + if (!buffer) 240 + return E_FAIL; 241 + 242 + *rect = buffer->rect; 243 + return S_OK; 126 244 } 127 245 128 246 /*********************************************************************** ··· 168 286 169 287 return E_NOTIMPL; 170 288 } 171 - 172 - #endif /* __REACTOS__ */
+27 -5
dll/win32/uxtheme/metric.c
··· 220 220 return E_PROP_ID_UNSUPPORTED; 221 221 } 222 222 223 - #ifndef __REACTOS__ 224 223 /*********************************************************************** 225 224 * GetThemeTransitionDuration (UXTHEME.@) 226 225 */ 227 226 HRESULT WINAPI GetThemeTransitionDuration(HTHEME hTheme, int iPartId, int iStateIdFrom, 228 227 int iStateIdTo, int iPropId, DWORD *pdwDuration) 229 228 { 230 - FIXME("(%p, %u, %u, %u, %u, %p) stub\n", hTheme, iPartId, iStateIdFrom, iStateIdTo, 231 - iPropId, pdwDuration); 229 + INTLIST intlist; 230 + HRESULT hr; 232 231 233 - return E_NOTIMPL; 232 + TRACE("(%p, %d, %d, %d, %d, %p)\n", hTheme, iPartId, iStateIdFrom, iStateIdTo, iPropId, 233 + pdwDuration); 234 + 235 + if (!pdwDuration || iStateIdFrom < 1 || iStateIdTo < 1) 236 + return E_INVALIDARG; 237 + 238 + hr = GetThemeIntList(hTheme, iPartId, 0, iPropId, &intlist); 239 + if (FAILED(hr)) 240 + { 241 + if (hr == E_PROP_ID_UNSUPPORTED) 242 + *pdwDuration = 0; 243 + 244 + return hr; 245 + } 246 + 247 + if (intlist.iValueCount < 1 || iStateIdFrom > intlist.iValues[0] 248 + || iStateIdTo > intlist.iValues[0] 249 + || intlist.iValueCount != 1 + intlist.iValues[0] * intlist.iValues[0]) 250 + { 251 + *pdwDuration = 0; 252 + return E_INVALIDARG; 253 + } 254 + 255 + *pdwDuration = intlist.iValues[1 + intlist.iValues[0] * (iStateIdFrom - 1) + (iStateIdTo - 1)]; 256 + return S_OK; 234 257 } 235 - #endif
+64 -2
dll/win32/uxtheme/system.c
··· 648 648 return bActive; 649 649 } 650 650 651 + typedef HRESULT (WINAPI* DWMISCOMPOSITIONENABLED)(BOOL *enabled); 652 + 653 + /************************************************************ 654 + * IsCompositionActive (UXTHEME.@) 655 + */ 656 + BOOL WINAPI IsCompositionActive(void) 657 + { 658 + BOOL bIsCompositionActive; 659 + DWMISCOMPOSITIONENABLED pDwmIsCompositionEnabled; 660 + HMODULE hdwmapi = GetModuleHandleW(L"dwmapi.dll"); 661 + 662 + if (!hdwmapi) 663 + { 664 + hdwmapi = LoadLibraryW(L"dwmapi.dll"); 665 + if (!hdwmapi) 666 + { 667 + ERR("Failed to load dwmapi\n"); 668 + return FALSE; 669 + } 670 + 671 + pDwmIsCompositionEnabled = (DWMISCOMPOSITIONENABLED)GetProcAddress(hdwmapi, "DwmIsCompositionEnabled"); 672 + } 673 + if (!pDwmIsCompositionEnabled) 674 + return FALSE; 675 + 676 + if (pDwmIsCompositionEnabled(&bIsCompositionActive) == S_OK) 677 + return bIsCompositionActive; 678 + 679 + return FALSE; 680 + } 681 + 651 682 /*********************************************************************** 652 683 * EnableTheming (UXTHEME.@) 653 684 * ··· 847 878 /*********************************************************************** 848 879 * OpenThemeData (UXTHEME.@) 849 880 */ 850 - HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist) 881 + HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList) 851 882 { 852 - return OpenThemeDataInternal(g_ActiveThemeFile, hwnd, classlist, 0); 883 + return OpenThemeDataInternal(g_ActiveThemeFile, hwnd, pszClassList, 0); 884 + } 885 + 886 + /*********************************************************************** 887 + * OpenThemeDataForDpi (UXTHEME.@) 888 + */ 889 + HTHEME 890 + WINAPI 891 + OpenThemeDataForDpi( 892 + _In_ HWND hwnd, 893 + _In_ LPCWSTR pszClassList, 894 + _In_ UINT dpi) 895 + { 896 + FIXME("dpi (%x) is currently ignored", dpi); 897 + return OpenThemeDataInternal(g_ActiveThemeFile, hwnd, pszClassList, 0); 853 898 } 854 899 855 900 /*********************************************************************** ··· 902 947 UXTHEME_broadcast_theme_changed (hwnd, TRUE); 903 948 return hr; 904 949 } 950 + 951 + #if (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA) 952 + /*********************************************************************** 953 + * SetWindowThemeAttribute (UXTHEME.@) 954 + */ 955 + HRESULT 956 + WINAPI 957 + SetWindowThemeAttribute( 958 + _In_ HWND hwnd, 959 + _In_ enum WINDOWTHEMEATTRIBUTETYPE eAttribute, 960 + _In_ PVOID pvAttribute, 961 + _In_ DWORD cbAttribute) 962 + { 963 + FIXME("(%p,%d,%p,%ld): stub\n", hwnd, eAttribute, pvAttribute, cbAttribute); 964 + return E_NOTIMPL; 965 + } 966 + #endif /* (DLL_EXPORT_VERSION >= _WIN32_WINNT_VISTA) */ 905 967 906 968 /*********************************************************************** 907 969 * GetCurrentThemeName (UXTHEME.@)
+128
dll/win32/uxtheme/uxtheme_vista.spec
··· 1 + 1 stdcall -noname QueryThemeServices() 2 + 2 stdcall -noname OpenThemeFile(wstr wstr wstr ptr long) 3 + 3 stdcall -noname CloseThemeFile(ptr) 4 + 4 stdcall -noname ApplyTheme(ptr ptr ptr) 5 + 5 stdcall BeginBufferedAnimation(ptr ptr ptr long ptr ptr ptr ptr) 6 + 6 stdcall BeginBufferedPaint(ptr ptr long ptr ptr) 7 + 7 stdcall -noname GetThemeDefaults(wstr wstr long wstr long) 8 + 8 stdcall -noname EnumThemes(wstr ptr ptr) 9 + 9 stdcall -noname EnumThemeColors(wstr wstr long ptr) 10 + 10 stdcall -noname EnumThemeSizes(wstr wstr long ptr) 11 + 11 stdcall -noname ParseThemeIniFile(wstr wstr ptr ptr) 12 + 12 stdcall BufferedPaintClear(ptr ptr) 13 + 13 stdcall -noname DrawNCPreview(ptr long ptr wstr wstr wstr ptr ptr) 14 + 14 stub -noname RegisterDefaultTheme 15 + 15 stub -noname DumpLoadedThemeToTextFile 16 + 16 stdcall -noname OpenThemeDataFromFile(ptr ptr wstr long) 17 + 17 stub -noname OpenThemeFileFromData 18 + 18 stub -noname GetThemeSysSize96 19 + 19 stub -noname GetThemeSysFont96 20 + 20 stub -noname SessionAllocate 21 + 21 stub -noname SessionFree 22 + 22 stub -noname ThemeHooksOn 23 + 23 stub -noname ThemeHooksOff 24 + 24 stub -noname AreThemeHooksActive 25 + 25 stub -noname GetCurrentChangeNumber 26 + 26 stub -noname GetNewChangeNumber 27 + 27 stub -noname SetGlobalTheme 28 + 28 stub -noname GetGlobalTheme 29 + 29 stdcall -noname CheckThemeSignature(wstr) 30 + 30 stub -noname LoadTheme 31 + 31 stub -noname InitUserTheme 32 + 32 stub -noname InitUserRegistry 33 + 33 stub -noname ReestablishServerConnection 34 + 34 stdcall -noname ThemeHooksInstall() 35 + 35 stdcall -noname ThemeHooksRemove() 36 + 36 stub -noname RefreshThemeForTS 37 + 37 stdcall BufferedPaintInit() 38 + 38 stdcall BufferedPaintRenderAnimation(ptr ptr) 39 + 39 stdcall BufferedPaintSetAlpha(ptr ptr long) 40 + 40 stdcall BufferedPaintStopAllAnimations(ptr) 41 + 41 stdcall BufferedPaintUnInit() 42 + 42 stdcall CloseThemeData(ptr) 43 + 43 stdcall -noname ClassicGetSystemMetrics(long) 44 + 44 stdcall -noname ClassicSystemParametersInfoA(long long ptr long) 45 + 45 stdcall -noname ClassicSystemParametersInfoW(long long ptr long) 46 + 46 stdcall -noname ClassicAdjustWindowRectEx(ptr long long long) 47 + 47 stdcall DrawThemeBackgroundEx(ptr ptr long long ptr ptr) 48 + 48 stdcall -noname GetThemeParseErrorInfo(ptr) 49 + 49 stdcall -stub OpenNcThemeData() 50 + 50 stdcall -stub IsThemeClassDefined(ptr ptr long long ptr ptr) 51 + 51 stdcall DrawThemeBackground(ptr ptr long long ptr ptr) 52 + 52 stdcall DrawThemeEdge(ptr ptr long long ptr long long ptr) 53 + 53 stdcall DrawThemeIcon(ptr ptr long long ptr ptr long) 54 + 54 stdcall DrawThemeParentBackground(ptr ptr ptr) 55 + 55 stub DrawThemeParentBackgroundEx 56 + 56 stdcall DrawThemeText(ptr ptr long long wstr long long long ptr) 57 + 57 stdcall DrawThemeTextEx(ptr ptr long long wstr long long ptr ptr) 58 + 58 stdcall EnableThemeDialogTexture(ptr long) 59 + 59 stdcall EnableTheming(long) 60 + 60 stub -noname CreateThemeDataFromObjects 61 + 61 stdcall -noname OpenThemeDataEx(ptr wstr long) 62 + 62 stub -noname ServerClearStockObjects 63 + 63 stub -noname MarkSelection 64 + 64 stub ProcessLoadTheme_RunDLLW 65 + 65 stub SetSystemVisualStyle 66 + 66 stub ServiceClearStockObjects 67 + 67 stdcall -stub AddThemeAppCompatFlag(ptr long long long ptr) 68 + 68 stdcall -stub ResetThemeAppCompatFlags(ptr ptr long long long ptr ptr) 69 + 69 stdcall -stub EnumThemeProperties(ptr ptr long long long ptr) 70 + 70 stdcall EndBufferedAnimation(ptr long) 71 + 71 stdcall EndBufferedPaint(ptr long) 72 + 72 stdcall -stub DrawThemeIconEx(ptr long long long ptr) 73 + 73 stub IsThemeActiveByPolicy 74 + 74 stdcall -stub GetThemeClass(ptr long long long ptr) 75 + 75 stdcall -stub ThemeForwardCapturedMouseMessage(ptr long long long wstr long) 76 + 76 stdcall -stub EnableServiceConnection(ptr long) 77 + 77 stdcall -stub Remote_LoadTheme(ptr long) ; This exits a thread 78 + 78 stdcall GetBufferedPaintBits(ptr ptr ptr) 79 + 79 stdcall GetBufferedPaintDC(ptr) 80 + 80 stdcall GetBufferedPaintTargetDC(ptr) 81 + 81 stdcall GetBufferedPaintTargetRect(ptr ptr) 82 + 82 stdcall GetCurrentThemeName(wstr long wstr long wstr long) 83 + 83 stdcall GetThemeAppProperties() 84 + 84 stdcall GetThemeBackgroundContentRect(ptr ptr long long ptr ptr) 85 + 85 stdcall GetThemeBackgroundExtent(ptr ptr long long ptr ptr) 86 + 86 stdcall GetThemeBackgroundRegion(ptr ptr long long ptr ptr) 87 + 87 stub GetThemeBitMap 88 + 88 stdcall GetThemeBool(ptr long long long ptr) 89 + 89 stdcall GetThemeColor(ptr long long long ptr) 90 + 90 stdcall GetThemeDocumentationProperty(wstr wstr wstr long) 91 + 91 stdcall GetThemeEnumValue(ptr long long long ptr) 92 + 92 stdcall GetThemeFilename(ptr long long long wstr long) 93 + 93 stdcall GetThemeFont(ptr ptr long long long ptr) 94 + 94 stdcall GetThemeInt(ptr long long long ptr) 95 + 95 stdcall GetThemeIntList(ptr long long long ptr) 96 + 96 stdcall GetThemeMargins(ptr ptr long long long ptr ptr) 97 + 97 stdcall GetThemeMetric(ptr ptr long long long ptr) 98 + 98 stdcall GetThemePartSize(ptr ptr long long ptr long ptr) 99 + 99 stdcall GetThemePosition(ptr long long long ptr) 100 + 100 stdcall GetThemePropertyOrigin(ptr long long long ptr) 101 + 101 stdcall GetThemeRect(ptr long long long ptr) 102 + 102 stub GetThemeStream 103 + 103 stdcall GetThemeString(ptr long long long wstr long) 104 + 104 stdcall GetThemeSysBool(ptr long) 105 + 105 stdcall GetThemeSysColor(ptr long) 106 + 106 stdcall GetThemeSysColorBrush(ptr long) 107 + 107 stdcall GetThemeSysFont(ptr long ptr) 108 + 108 stdcall GetThemeSysInt(ptr long ptr) 109 + 109 stdcall GetThemeSysSize(ptr long) 110 + 110 stdcall GetThemeSysString(ptr long wstr long) 111 + 111 stdcall GetThemeTextExtent(ptr ptr long long wstr long long ptr ptr) 112 + 112 stdcall GetThemeTextMetrics(ptr ptr long long ptr) 113 + 113 stdcall GetThemeTransitionDuration(ptr long long long long ptr) 114 + 114 stdcall GetWindowTheme(ptr) 115 + 115 stdcall HitTestThemeBackground(ptr long long long long ptr long double ptr) 116 + 116 stdcall IsAppThemed() 117 + 117 stdcall IsCompositionActive() 118 + 118 stdcall IsThemeActive() 119 + 119 stdcall IsThemeBackgroundPartiallyTransparent(ptr long long) 120 + 120 stdcall IsThemeDialogTextureEnabled(ptr) 121 + 121 stdcall IsThemePartDefined(ptr long long) 122 + 122 stdcall OpenThemeData(ptr wstr) 123 + 123 stdcall SetThemeAppProperties(long) 124 + 124 stdcall SetWindowTheme(ptr wstr wstr) 125 + 125 stdcall SetWindowThemeAttribute(ptr long ptr long) 126 + 126 stdcall ThemeInitApiHook(long ptr) 127 + 128 + @ stdcall OpenThemeDataForDpi(ptr wstr long) ;win7
+47 -2
sdk/include/psdk/uxtheme.h
··· 15 15 #define DTBG_COMPUTINGREGION 0x00000010 16 16 #define DTBG_MIRRORDC 0x00000020 17 17 #define DTT_GRAYED 0x00000001 18 - 19 - /* DTTOPTS.dwFlags bits */ 18 + // Vista+ 20 19 #define DTT_TEXTCOLOR 0x00000001 21 20 #define DTT_BORDERCOLOR 0x00000002 22 21 #define DTT_SHADOWCOLOR 0x00000004 ··· 57 56 58 57 typedef HANDLE HPAINTBUFFER; 59 58 typedef HANDLE HTHEME; 59 + // Vista+ 60 + typedef HANDLE HANIMATIONBUFFER; 60 61 typedef int (WINAPI *DTT_CALLBACK_PROC)(HDC,LPWSTR,int,RECT*,UINT,LPARAM); 61 62 62 63 typedef enum _BP_BUFFERFORMAT ··· 66 67 BPBF_TOPDOWNDIB, 67 68 BPBF_TOPDOWNMONODIB 68 69 } BP_BUFFERFORMAT; 70 + 69 71 70 72 typedef struct _BP_PAINTPARAMS 71 73 { ··· 89 91 TS_DRAW 90 92 } THEMESIZE; 91 93 94 + // Vista+ 95 + 96 + typedef enum _BP_ANIMATIONSTYLE 97 + { 98 + BPAS_NONE, 99 + BPAS_LINEAR, 100 + BPAS_CUBIC, 101 + BPAS_SINE 102 + } BP_ANIMATIONSTYLE; 103 + enum WINDOWTHEMEATTRIBUTETYPE 104 + { 105 + WTA_NONCLIENT = 1 106 + }; 107 + 108 + 92 109 typedef struct _DTBGOPTS { 93 110 DWORD dwSize; 94 111 DWORD dwFlags; ··· 109 126 int cyBottomHeight; 110 127 } MARGINS, *PMARGINS; 111 128 129 + // Vista+ 112 130 typedef struct _DTTOPTS { 113 131 DWORD dwSize; 114 132 DWORD dwFlags; ··· 127 145 LPARAM lParam; 128 146 } DTTOPTS, *PDTTOPTS; 129 147 148 + typedef struct _BP_ANIMATIONPARAMS 149 + { 150 + DWORD cbSize; 151 + DWORD dwFlags; 152 + BP_ANIMATIONSTYLE style; 153 + DWORD dwDuration; 154 + } BP_ANIMATIONPARAMS, *PBP_ANIMATIONPARAMS; 155 + 130 156 HRESULT WINAPI CloseThemeData(HTHEME); 131 157 HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*); 132 158 HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,const DTBGOPTS*); ··· 192 218 _Inout_ LPRECT pRect, 193 219 _In_ const DTTOPTS *options 194 220 ); 221 + 222 + // Vista+ 223 + HRESULT WINAPI BufferedPaintInit(VOID); 224 + HRESULT WINAPI BufferedPaintUnInit(VOID); 225 + HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT, 226 + BP_PAINTPARAMS *,HDC *); 227 + HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL); 228 + HRESULT WINAPI BufferedPaintClear(HPAINTBUFFER, const RECT *); 229 + HRESULT WINAPI BufferedPaintSetAlpha(HPAINTBUFFER, const RECT *, BYTE); 230 + HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER, RGBQUAD **, int *); 231 + HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER); 232 + HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER); 233 + HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER, RECT *prc); 234 + HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND, HDC, const RECT *, 235 + BP_BUFFERFORMAT, BP_PAINTPARAMS *, 236 + BP_ANIMATIONPARAMS *, HDC *, HDC *); 237 + BOOL WINAPI BufferedPaintRenderAnimation(HWND, HDC); 238 + HRESULT WINAPI BufferedPaintStopAllAnimations(HWND); 239 + HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER, BOOL); 195 240 #endif 196 241 197 242 #ifdef __cplusplus