Author: dchapyshev
Date: Wed Nov 12 07:02:29 2008
New Revision: 37303
URL:
http://svn.reactos.org/svn/reactos?rev=37303&view=rev
Log:
- Sync uxtheme with wine head
Added:
trunk/reactos/dll/win32/uxtheme/buffer.c (with props)
Modified:
trunk/reactos/dll/win32/uxtheme/draw.c
trunk/reactos/dll/win32/uxtheme/msstyles.c
trunk/reactos/dll/win32/uxtheme/system.c
trunk/reactos/dll/win32/uxtheme/uxini.c
trunk/reactos/dll/win32/uxtheme/uxtheme.rbuild
trunk/reactos/dll/win32/uxtheme/uxtheme.spec
trunk/reactos/include/psdk/uxtheme.h
Added: trunk/reactos/dll/win32/uxtheme/buffer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/buffer.c…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/buffer.c (added)
+++ trunk/reactos/dll/win32/uxtheme/buffer.c [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -1,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;
+}
Propchange: trunk/reactos/dll/win32/uxtheme/buffer.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/dll/win32/uxtheme/draw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?r…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -52,19 +52,18 @@
HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
{
static const WCHAR szTab[] = { 'T','a','b',0 };
- HRESULT hr;
+ BOOL res;
TRACE("(%p,0x%08x\n", hwnd, dwFlags);
- hr = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
+ res = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
(HANDLE)(dwFlags|0x80000000));
/* 0x80000000 serves as a "flags set" flag */
- if (FAILED(hr))
- return hr;
+ if (!res)
+ return HRESULT_FROM_WIN32(GetLastError());
if (dwFlags & ETDT_USETABTEXTURE)
return SetWindowTheme (hwnd, NULL, szTab);
else
return SetWindowTheme (hwnd, NULL, NULL);
- return S_OK;
}
/***********************************************************************
@@ -1178,8 +1177,8 @@
+ (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0);
/* Init some vars */
- OuterPen = InnerPen = (HPEN)GetStockObject(NULL_PEN);
- SavePen = (HPEN)SelectObject(hdc, InnerPen);
+ OuterPen = InnerPen = GetStockObject(NULL_PEN);
+ SavePen = SelectObject(hdc, InnerPen);
spx = spy = epx = epy = 0; /* Satisfy the compiler... */
/* Determine the colors of the edges */
@@ -1374,8 +1373,8 @@
HPEN hpsave;
HPEN hp = get_edge_pen ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL,
theme, part, state);
- hbsave = (HBRUSH)SelectObject(hdc, hb);
- hpsave = (HPEN)SelectObject(hdc, hp);
+ hbsave = SelectObject(hdc, hb);
+ hpsave = SelectObject(hdc, hp);
Polygon(hdc, Points, 4);
SelectObject(hdc, hbsave);
SelectObject(hdc, hpsave);
@@ -1427,8 +1426,8 @@
&& !(uFlags & (BF_FLAT|BF_MONO)) ) ? E_FAIL : S_OK;
/* Init some vars */
- LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = (HPEN)GetStockObject(NULL_PEN);
- SavePen = (HPEN)SelectObject(hdc, LTInnerPen);
+ LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = GetStockObject(NULL_PEN);
+ SavePen = SelectObject(hdc, LTInnerPen);
/* Determine the colors of the edges */
if(uFlags & BF_MONO)
Modified: trunk/reactos/dll/win32/uxtheme/msstyles.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/msstyles…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/msstyles.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/msstyles.c [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -132,14 +132,14 @@
hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
goto invalid_theme;
}
- pszColors = (LPWSTR)LoadResource(hTheme, hrsc);
+ pszColors = LoadResource(hTheme, hrsc);
if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szSizeNamesResource))) {
TRACE("Size names resource not found\n");
hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
goto invalid_theme;
}
- pszSizes = (LPWSTR)LoadResource(hTheme, hrsc);
+ pszSizes = LoadResource(hTheme, hrsc);
/* Validate requested color against what's available from the theme */
if(pszColorName) {
@@ -298,7 +298,7 @@
TRACE("FILERESNAMES map not found\n");
return NULL;
}
- tmp = (LPWSTR)LoadResource(tf->hTheme, hrsc);
+ tmp = LoadResource(tf->hTheme, hrsc);
dwResourceIndex = (dwSizeCount * dwColorNum) + dwSizeNum;
for(i=0; i < dwResourceIndex; i++) {
tmp += lstrlenW(tmp)+1;
Modified: trunk/reactos/dll/win32/uxtheme/system.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -122,7 +122,7 @@
WCHAR cNull = '\0';
nBytesToAlloc = dwUnExpDataLen;
- szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
+ szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc);
RegQueryValueExW (hKey, lpszValue, 0, NULL, (LPBYTE)szData, &nBytesToAlloc);
dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1);
dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen);
@@ -131,7 +131,7 @@
else
{
nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR);
- szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
+ szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc );
lstrcpyW(szData, pvData);
dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, MAX_PATH );
if (dwExpDataLen > MAX_PATH) dwRet = ERROR_MORE_DATA;
@@ -566,6 +566,7 @@
BOOL WINAPI IsThemeActive(void)
{
TRACE("\n");
+ SetLastError(ERROR_SUCCESS);
return bThemeActive;
}
Modified: trunk/reactos/dll/win32/uxtheme/uxini.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/uxini.c?…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/uxini.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/uxini.c [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -68,7 +68,7 @@
TRACE("Loading resource INI %s\n", debugstr_w(lpName));
if((hrsc = FindResourceW(hTheme, lpName, szTextFileResource))) {
- if(!(lpThemesIni = (LPCWSTR)LoadResource(hTheme, hrsc))) {
+ if(!(lpThemesIni = LoadResource(hTheme, hrsc))) {
TRACE("%s resource not found\n", debugstr_w(lpName));
return NULL;
}
Modified: trunk/reactos/dll/win32/uxtheme/uxtheme.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/uxtheme.…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/uxtheme.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/uxtheme.rbuild [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -6,6 +6,7 @@
<include base="uxtheme">.</include>
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
+ <file>buffer.c</file>
<file>draw.c</file>
<file>main.c</file>
<file>metric.c</file>
Modified: trunk/reactos/dll/win32/uxtheme/uxtheme.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/uxtheme.…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/uxtheme.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/uxtheme.spec [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -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)
Modified: trunk/reactos/include/psdk/uxtheme.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/uxtheme.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/uxtheme.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/uxtheme.h [iso-8859-1] Wed Nov 12 07:02:29 2008
@@ -11,60 +11,83 @@
#endif
#if (_WIN32_WINNT >= 0x0501)
-#define DTBG_CLIPRECT 0x00000001
-#define DTBG_DRAWSOLID 0x00000002
-#define DTBG_OMITBORDER 0x00000004
-#define DTBG_OMITCONTENT 0x00000008
-#define DTBG_COMPUTINGREGION 0x00000010
-#define DTBG_MIRRORDC 0x00000020
-#define DTT_GRAYED 0x00000001
-#define ETDT_DISABLE 0x00000001
-#define ETDT_ENABLE 0x00000002
-#define ETDT_USETABTEXTURE 0x00000004
-#define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
-#define STAP_ALLOW_NONCLIENT 0x00000001
-#define STAP_ALLOW_CONTROLS 0x00000002
-#define STAP_ALLOW_WEBCONTENT 0x00000004
-#define HTTB_BACKGROUNDSEG 0x0000
-#define HTTB_FIXEDBORDER 0x0002
-#define HTTB_CAPTION 0x0004
-#define HTTB_RESIZINGBORDER_LEFT 0x0010
-#define HTTB_RESIZINGBORDER_TOP 0x0020
-#define HTTB_RESIZINGBORDER_RIGHT 0x0040
-#define HTTB_RESIZINGBORDER_BOTTOM 0x0080
-#define HTTB_RESIZINGBORDER
(HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
-#define HTTB_SIZINGTEMPLATE 0x0100
-#define HTTB_SYSTEMSIZINGMARGINS 0x0200
+#define DTBG_CLIPRECT 0x00000001
+#define DTBG_DRAWSOLID 0x00000002
+#define DTBG_OMITBORDER 0x00000004
+#define DTBG_OMITCONTENT 0x00000008
+#define DTBG_COMPUTINGREGION 0x00000010
+#define DTBG_MIRRORDC 0x00000020
+#define DTT_GRAYED 0x00000001
+#define ETDT_DISABLE 0x00000001
+#define ETDT_ENABLE 0x00000002
+#define ETDT_USETABTEXTURE 0x00000004
+#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
+#define STAP_ALLOW_NONCLIENT 0x00000001
+#define STAP_ALLOW_CONTROLS 0x00000002
+#define STAP_ALLOW_WEBCONTENT 0x00000004
+#define HTTB_BACKGROUNDSEG 0x0000
+#define HTTB_FIXEDBORDER 0x0002
+#define HTTB_CAPTION 0x0004
+#define HTTB_RESIZINGBORDER_LEFT 0x0010
+#define HTTB_RESIZINGBORDER_TOP 0x0020
+#define HTTB_RESIZINGBORDER_RIGHT 0x0040
+#define HTTB_RESIZINGBORDER_BOTTOM 0x0080
+#define HTTB_RESIZINGBORDER
(HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
+#define HTTB_SIZINGTEMPLATE 0x0100
+#define HTTB_SYSTEMSIZINGMARGINS 0x0200
+
+typedef HANDLE HPAINTBUFFER;
+typedef HANDLE HTHEME;
+
+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;
typedef enum PROPERTYORIGIN {
- PO_STATE = 0,
- PO_PART = 1,
- PO_CLASS = 2,
- PO_GLOBAL = 3,
- PO_NOTFOUND = 4
+ PO_STATE = 0,
+ PO_PART = 1,
+ PO_CLASS = 2,
+ PO_GLOBAL = 3,
+ PO_NOTFOUND = 4
} PROPERTYORIGIN;
+
typedef enum THEMESIZE {
- TS_MIN,
- TS_TRUE,
- TS_DRAW
+ TS_MIN,
+ TS_TRUE,
+ TS_DRAW
} THEMESIZE;
+
typedef struct _DTBGOPTS {
- DWORD dwSize;
- DWORD dwFlags;
- RECT rcClip;
+ DWORD dwSize;
+ DWORD dwFlags;
+ RECT rcClip;
} DTBGOPTS, *PDTBGOPTS;
+
#define MAX_INTLIST_COUNT 10
+
typedef struct _INTLIST {
- int iValueCount;
- int iValues[MAX_INTLIST_COUNT];
+ int iValueCount;
+ int iValues[MAX_INTLIST_COUNT];
} INTLIST, *PINTLIST;
+
typedef struct _MARGINS {
- int cxLeftWidth;
- int cxRightWidth;
- int cyTopHeight;
- int cyBottomHeight;
+ int cxLeftWidth;
+ int cxRightWidth;
+ int cyTopHeight;
+ int cyBottomHeight;
} MARGINS, *PMARGINS;
-typedef HANDLE HTHEME;
HRESULT WINAPI CloseThemeData(HTHEME);
HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);