Module: wine Branch: master Commit: 6a78ea4d6cbacd63f938ecb69a9f104f9f79d465 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a78ea4d6cbacd63f938ecb69a...
Author: Reece Dunn msclrhd@googlemail.com Date: Mon Nov 10 09:35:59 2008 +0000
uxtheme: Add stubs for the double buffer drawing API in Vista.
---
dlls/uxtheme/Makefile.in | 1 + dlls/uxtheme/buffer.c | 77 +++++++++++++++++++++++++++++++++++++++++++++ dlls/uxtheme/uxtheme.spec | 4 ++ include/uxtheme.h | 28 ++++++++++++++++ 4 files changed, 110 insertions(+), 0 deletions(-)
diff --git a/dlls/uxtheme/Makefile.in b/dlls/uxtheme/Makefile.in index da6944f..fb1c44d 100644 --- a/dlls/uxtheme/Makefile.in +++ b/dlls/uxtheme/Makefile.in @@ -8,6 +8,7 @@ IMPORTS = user32 gdi32 advapi32 kernel32 DELAYIMPORTS = msimg32
C_SRCS = \ + buffer.c \ draw.c \ main.c \ metric.c \ diff --git a/dlls/uxtheme/buffer.c b/dlls/uxtheme/buffer.c new file mode 100644 index 0000000..af004d0 --- /dev/null +++ b/dlls/uxtheme/buffer.c @@ -0,0 +1,77 @@ +/* + * uxtheme Double-buffered Drawing API + * + * Copyright (C) 2008 Reece H. Dunn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "config.h" + +#include <stdlib.h> +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "wingdi.h" +#include "vfwmsgs.h" +#include "uxtheme.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(uxtheme); + +/*********************************************************************** + * BufferedPaintInit (UXTHEME.@) + */ +HRESULT WINAPI BufferedPaintInit(VOID) +{ + FIXME("Stub ()\n"); + return S_OK; +} + +/*********************************************************************** + * BufferedPaintUnInit (UXTHEME.@) + */ +HRESULT WINAPI BufferedPaintUnInit(VOID) +{ + FIXME("Stub ()\n"); + return S_OK; +} + +/*********************************************************************** + * BeginBufferedPaint (UXTHEME.@) + */ +HPAINTBUFFER WINAPI BeginBufferedPaint(HDC hdcTarget, + const RECT * prcTarget, + BP_BUFFERFORMAT dwFormat, + BP_PAINTPARAMS *pPaintParams, + HDC *phdc) +{ + FIXME("Stub (%p %p %d %p %p)\n", hdcTarget, prcTarget, dwFormat, + pPaintParams, phdc); + return NULL; +} + + +/*********************************************************************** + * EndBufferedPaint (UXTHEME.@) + */ +HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER hPaintBuffer, BOOL fUpdateTarget) +{ + FIXME("Stub (%p %d)\n", hPaintBuffer, fUpdateTarget); + return S_OK; +} diff --git a/dlls/uxtheme/uxtheme.spec b/dlls/uxtheme/uxtheme.spec index 6b367b5..2646a15 100644 --- a/dlls/uxtheme/uxtheme.spec +++ b/dlls/uxtheme/uxtheme.spec @@ -43,6 +43,9 @@ 63 stub -noname MarkSelection
# Standard functions +@ stdcall BeginBufferedPaint(ptr ptr long ptr ptr) +@ stdcall BufferedPaintInit() +@ stdcall BufferedPaintUnInit() @ stdcall CloseThemeData(ptr) @ stdcall DrawThemeBackground(ptr ptr long long ptr ptr) @ stdcall DrawThemeBackgroundEx(ptr ptr long long ptr ptr) @@ -52,6 +55,7 @@ @ stdcall DrawThemeText(ptr ptr long long wstr long long long ptr) @ stdcall EnableThemeDialogTexture(ptr long) @ stdcall EnableTheming(long) +@ stdcall EndBufferedPaint(ptr long) @ stdcall GetCurrentThemeName(wstr long wstr long wstr long) @ stdcall GetThemeAppProperties() @ stdcall GetThemeBackgroundContentRect(ptr ptr long long ptr ptr) diff --git a/include/uxtheme.h b/include/uxtheme.h index 8ee63b6..ef369dc 100644 --- a/include/uxtheme.h +++ b/include/uxtheme.h @@ -172,4 +172,32 @@ void WINAPI SetThemeAppProperties(DWORD); HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
+/* Double-buffered Drawing API */ + +typedef HANDLE HPAINTBUFFER; + +HRESULT WINAPI BufferedPaintInit(VOID); +HRESULT WINAPI BufferedPaintUnInit(VOID); + +typedef enum _BP_BUFFERFORMAT +{ + BPBF_COMPATIBLEBITMAP, + BPBF_DIB, + BPBF_TOPDOWNDIB, + BPBF_TOPDOWNMONODIB +} BP_BUFFERFORMAT; + +typedef struct _BP_PAINTPARAMS +{ + DWORD cbSize; + DWORD dwFlags; + const RECT *prcExclude; + const BLENDFUNCTION *pBlendFunction; +} BP_PAINTPARAMS, *PBP_PAINTPARAMS; + +HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT, + BP_PAINTPARAMS *,HDC *); + +HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL); + #endif