Author: winesync
Date: Thu Nov 29 14:21:01 2007
New Revision: 30889
URL:
http://svn.reactos.org/svn/reactos?rev=30889&view=rev
Log:
Autosyncing with Wine HEAD
Modified:
trunk/reactos/dll/win32/uxtheme/draw.c
trunk/reactos/dll/win32/uxtheme/system.c
trunk/reactos/dll/win32/uxtheme/uxtheme.rbuild
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 (original)
+++ trunk/reactos/dll/win32/uxtheme/draw.c Thu Nov 29 14:21:01 2007
@@ -55,8 +55,8 @@
HRESULT hr;
TRACE("(%p,0x%08x\n", hwnd, dwFlags);
- hr = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
- (HANDLE)(dwFlags|0x80000000));
+ hr = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
+ (HANDLE)(dwFlags|0x80000000));
/* 0x80000000 serves as a "flags set" flag */
if (FAILED(hr))
return hr;
@@ -75,9 +75,9 @@
DWORD dwDialogTextureFlags;
TRACE("(%p)\n", hwnd);
- dwDialogTextureFlags = (DWORD)GetPropW (hwnd,
+ dwDialogTextureFlags = (DWORD)GetPropW (hwnd,
(LPCWSTR)MAKEINTATOM(atDialogThemeEnabled));
- if (dwDialogTextureFlags == 0)
+ if (dwDialogTextureFlags == 0)
/* Means EnableThemeDialogTexture wasn't called for this dialog */
return TRUE;
@@ -94,7 +94,7 @@
HWND hParent;
HRGN clip = NULL;
int hasClip = -1;
-
+
TRACE("(%p,%p,%p)\n", hwnd, hdc, prc);
hParent = GetParent(hwnd);
if(!hParent)
@@ -102,7 +102,7 @@
if(prc) {
CopyRect(&rt, prc);
MapWindowPoints(hwnd, NULL, (LPPOINT)&rt, 2);
-
+
clip = CreateRectRgn(0,0,1,1);
hasClip = GetClipRgn(hdc, clip);
if(hasClip == -1)
@@ -188,7 +188,7 @@
POINT size = {pRect->right-pRect->left, pRect->bottom-pRect->top};
POINT reqsize;
for(i=4; i>=0; i--) {
- PTHEME_PROPERTY fileProp =
+ PTHEME_PROPERTY fileProp =
MSSTYLES_FindProperty(hTheme, iPartId, iStateId, TMT_FILENAME, i +
TMT_IMAGEFILE1);
if (!fileProp) continue;
if(FAILED(GetThemePosition(hTheme, iPartId, iStateId, i + TMT_MINSIZE1,
&reqsize))) {
@@ -201,7 +201,7 @@
HBITMAP hBmp;
BOOL hasAlpha;
- lstrcpynW(szPath, fileProp->lpValue,
+ lstrcpynW(szPath, fileProp->lpValue,
min(fileProp->dwValueLen+1, sizeof(szPath)/sizeof(szPath[0])));
hBmp = MSSTYLES_LoadBitmap(hTheme, szPath, &hasAlpha);
if(!hBmp) continue;
@@ -255,7 +255,7 @@
TRACE("Failed to load bitmap %s\n", debugstr_w(szPath));
return HRESULT_FROM_WIN32(GetLastError());
}
-
+
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_IMAGELAYOUT, &imagelayout);
GetThemeInt(hTheme, iPartId, iStateId, TMT_IMAGECOUNT, &imagecount);
@@ -287,7 +287,7 @@
HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int
nWidthSrc, int nHeightSrc,
INT transparent, COLORREF transcolor)
{
- static const BLENDFUNCTION blendFunc =
+ static const BLENDFUNCTION blendFunc =
{
AC_SRC_OVER, /* BlendOp */
0, /* BlendFlag */
@@ -331,11 +331,11 @@
*
* Stretches or tiles, depending on sizingtype.
*/
-static inline BOOL UXTHEME_SizedBlt (HDC hdcDst, int nXOriginDst, int nYOriginDst,
+static inline BOOL UXTHEME_SizedBlt (HDC hdcDst, int nXOriginDst, int nYOriginDst,
int nWidthDst, int nHeightDst,
- HDC hdcSrc, int nXOriginSrc, int nYOriginSrc,
+ HDC hdcSrc, int nXOriginSrc, int nYOriginSrc,
int nWidthSrc, int nHeightSrc,
- int sizingtype,
+ int sizingtype,
INT transparent, COLORREF transcolor)
{
if (sizingtype == ST_TILE)
@@ -351,7 +351,7 @@
{
int bltWidth = min (xRemaining, nWidthSrc);
if (!UXTHEME_Blt (hdcDst, xOfs, yOfs, bltWidth, bltHeight,
- hdcSrc, nXOriginSrc, nYOriginSrc,
+ hdcSrc, nXOriginSrc, nYOriginSrc,
transparent, transcolor))
return FALSE;
xOfs += nWidthSrc;
@@ -370,10 +370,10 @@
}
}
-/* Get transparency parameters passed to UXTHEME_StretchBlt() - the parameters
- * depend on whether the image has full alpha or whether it is
+/* Get transparency parameters passed to UXTHEME_StretchBlt() - the parameters
+ * depend on whether the image has full alpha or whether it is
* color-transparent or just opaque. */
-static inline void get_transparency (HTHEME hTheme, int iPartId, int iStateId,
+static inline void get_transparency (HTHEME hTheme, int iPartId, int iStateId,
BOOL hasImageAlpha, INT* transparent,
COLORREF* transparentcolor, BOOL glyph)
{
@@ -385,12 +385,12 @@
else
{
BOOL trans = FALSE;
- GetThemeBool(hTheme, iPartId, iStateId,
+ GetThemeBool(hTheme, iPartId, iStateId,
glyph ? TMT_GLYPHTRANSPARENT : TMT_TRANSPARENT, &trans);
if(trans) {
*transparent = ALPHABLEND_BINARY;
- if(FAILED(GetThemeColor(hTheme, iPartId, iStateId,
- glyph ? TMT_GLYPHTRANSPARENTCOLOR : TMT_TRANSPARENTCOLOR,
+ if(FAILED(GetThemeColor(hTheme, iPartId, iStateId,
+ glyph ? TMT_GLYPHTRANSPARENTCOLOR : TMT_TRANSPARENTCOLOR,
transparentcolor))) {
/* If image is transparent, but no color was specified, use magenta */
*transparentcolor = RGB(255, 0, 255);
@@ -424,7 +424,7 @@
POINT topleft;
BOOL hasAlpha;
- hr = UXTHEME_LoadImage(hTheme, hdc, iPartId, iStateId, pRect, TRUE,
+ hr = UXTHEME_LoadImage(hTheme, hdc, iPartId, iStateId, pRect, TRUE,
&bmpSrc, &rcSrc, &hasAlpha);
if(FAILED(hr)) return hr;
hdcSrc = CreateCompatibleDC(hdc);
@@ -499,7 +499,7 @@
RECT rcSrc;
BOOL hasAlpha;
- hr = UXTHEME_LoadImage(hTheme, hdc, iPartId, iStateId, prc, FALSE,
+ hr = UXTHEME_LoadImage(hTheme, hdc, iPartId, iStateId, prc, FALSE,
&bmpSrc, &rcSrc, &hasAlpha);
if (FAILED(hr)) return hr;
@@ -520,7 +520,7 @@
dstSize.y = rcDst.bottom-rcDst.top;
srcSize.x = rcSrc.right-rcSrc.left;
srcSize.y = rcSrc.bottom-rcSrc.top;
-
+
GetThemeBool(hTheme, iPartId, iStateId, TMT_UNIFORMSIZING,
&uniformsizing);
if(uniformsizing) {
/* Scale height and width equally */
@@ -535,11 +535,11 @@
rcDst.right = rcDst.left + dstSize.x;
}
}
-
+
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_SIZINGTYPE,
&sizingtype);
if(sizingtype == ST_TRUESIZE) {
int truesizestretchmark = 100;
-
+
if(dstSize.x < 0 || dstSize.y < 0) {
BOOL mirrorimage = TRUE;
GetThemeBool(hTheme, iPartId, iStateId, TMT_MIRRORIMAGE,
&mirrorimage);
@@ -555,7 +555,7 @@
}
}
/* Whatever TrueSizeStretchMark does - it does not seem to
- * be what's outlined below. It appears as if native
+ * be what's outlined below. It appears as if native
* uxtheme always stretches if dest is smaller than source
* (ie as if TrueSizeStretchMark==100 with the code below) */
#if 0
@@ -612,7 +612,7 @@
COLORREF transparentcolor = 0;
BOOL hasAlpha;
- hr = UXTHEME_LoadImage(hTheme, hdc, iPartId, iStateId, pRect, FALSE,
+ hr = UXTHEME_LoadImage(hTheme, hdc, iPartId, iStateId, pRect, FALSE,
&bmpSrc, &rcSrc, &hasAlpha);
if(FAILED(hr)) return hr;
hdcSrc = CreateCompatibleDC(hdc);
@@ -623,7 +623,7 @@
oldSrc = SelectObject(hdcSrc, bmpSrc);
CopyRect(&rcDst, pRect);
-
+
get_transparency (hTheme, iPartId, iStateId, hasAlpha, &transparent,
&transparentcolor, FALSE);
@@ -670,34 +670,34 @@
/* Upper left corner */
if(!UXTHEME_Blt(hdcDst, 0, 0, sm.cxLeftWidth, sm.cyTopHeight,
- hdcSrc, rcSrc.left, rcSrc.top,
+ hdcSrc, rcSrc.left, rcSrc.top,
transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
/* Upper right corner */
- if(!UXTHEME_Blt (hdcDst, dstSize.x-sm.cxRightWidth, 0,
+ if(!UXTHEME_Blt (hdcDst, dstSize.x-sm.cxRightWidth, 0,
sm.cxRightWidth, sm.cyTopHeight,
- hdcSrc, rcSrc.right-sm.cxRightWidth, rcSrc.top,
+ hdcSrc, rcSrc.right-sm.cxRightWidth, rcSrc.top,
transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
/* Lower left corner */
- if(!UXTHEME_Blt (hdcDst, 0, dstSize.y-sm.cyBottomHeight,
+ if(!UXTHEME_Blt (hdcDst, 0, dstSize.y-sm.cyBottomHeight,
sm.cxLeftWidth, sm.cyBottomHeight,
- hdcSrc, rcSrc.left, rcSrc.bottom-sm.cyBottomHeight,
+ hdcSrc, rcSrc.left, rcSrc.bottom-sm.cyBottomHeight,
transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
/* Lower right corner */
- if(!UXTHEME_Blt (hdcDst, dstSize.x-sm.cxRightWidth, dstSize.y-sm.cyBottomHeight,
+ if(!UXTHEME_Blt (hdcDst, dstSize.x-sm.cxRightWidth, dstSize.y-sm.cyBottomHeight,
sm.cxRightWidth, sm.cyBottomHeight,
- hdcSrc, rcSrc.right-sm.cxRightWidth,
rcSrc.bottom-sm.cyBottomHeight,
+ hdcSrc, rcSrc.right-sm.cxRightWidth,
rcSrc.bottom-sm.cyBottomHeight,
transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
if ((sizingtype == ST_STRETCH) || (sizingtype == ST_TILE)) {
@@ -708,43 +708,43 @@
if(destCenterWidth > 0) {
/* Center top */
- if(!UXTHEME_SizedBlt (hdcDst, sm.cxLeftWidth, 0,
+ if(!UXTHEME_SizedBlt (hdcDst, sm.cxLeftWidth, 0,
destCenterWidth, sm.cyTopHeight,
- hdcSrc, rcSrc.left+sm.cxLeftWidth, rcSrc.top,
- srcCenterWidth, sm.cyTopHeight,
+ hdcSrc, rcSrc.left+sm.cxLeftWidth, rcSrc.top,
+ srcCenterWidth, sm.cyTopHeight,
sizingtype, transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
/* Center bottom */
- if(!UXTHEME_SizedBlt (hdcDst, sm.cxLeftWidth,
dstSize.y-sm.cyBottomHeight,
+ if(!UXTHEME_SizedBlt (hdcDst, sm.cxLeftWidth,
dstSize.y-sm.cyBottomHeight,
destCenterWidth, sm.cyBottomHeight,
- hdcSrc, rcSrc.left+sm.cxLeftWidth,
rcSrc.bottom-sm.cyBottomHeight,
- srcCenterWidth, sm.cyBottomHeight,
+ hdcSrc, rcSrc.left+sm.cxLeftWidth,
rcSrc.bottom-sm.cyBottomHeight,
+ srcCenterWidth, sm.cyBottomHeight,
sizingtype, transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
}
if(destCenterHeight > 0) {
/* Left center */
- if(!UXTHEME_SizedBlt (hdcDst, 0, sm.cyTopHeight,
+ if(!UXTHEME_SizedBlt (hdcDst, 0, sm.cyTopHeight,
sm.cxLeftWidth, destCenterHeight,
- hdcSrc, rcSrc.left, rcSrc.top+sm.cyTopHeight,
- sm.cxLeftWidth, srcCenterHeight,
- sizingtype,
+ hdcSrc, rcSrc.left, rcSrc.top+sm.cyTopHeight,
+ sm.cxLeftWidth, srcCenterHeight,
+ sizingtype,
transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
/* Right center */
- if(!UXTHEME_SizedBlt (hdcDst, dstSize.x-sm.cxRightWidth, sm.cyTopHeight,
+ if(!UXTHEME_SizedBlt (hdcDst, dstSize.x-sm.cxRightWidth, sm.cyTopHeight,
sm.cxRightWidth, destCenterHeight,
- hdcSrc, rcSrc.right-sm.cxRightWidth,
rcSrc.top+sm.cyTopHeight,
- sm.cxRightWidth, srcCenterHeight,
+ hdcSrc, rcSrc.right-sm.cxRightWidth,
rcSrc.top+sm.cyTopHeight,
+ sm.cxRightWidth, srcCenterHeight,
sizingtype, transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
}
if(destCenterHeight > 0 && destCenterWidth > 0) {
@@ -752,13 +752,13 @@
GetThemeBool(hTheme, iPartId, iStateId, TMT_BORDERONLY,
&borderonly);
if(!borderonly) {
/* Center */
- if(!UXTHEME_SizedBlt (hdcDst, sm.cxLeftWidth, sm.cyTopHeight,
+ if(!UXTHEME_SizedBlt (hdcDst, sm.cxLeftWidth, sm.cyTopHeight,
destCenterWidth, destCenterHeight,
- hdcSrc, rcSrc.left+sm.cxLeftWidth,
rcSrc.top+sm.cyTopHeight,
- srcCenterWidth, srcCenterHeight,
+ hdcSrc, rcSrc.left+sm.cxLeftWidth,
rcSrc.top+sm.cyTopHeight,
+ srcCenterWidth, srcCenterHeight,
sizingtype, transparent, transparentcolor)) {
hr = HRESULT_FROM_WIN32(GetLastError());
- goto draw_error;
+ goto draw_error;
}
}
}
@@ -993,7 +993,7 @@
EDGE_NUMCOLORS
};
-static const struct
+static const struct
{
int themeProp;
int sysColor;
@@ -1084,7 +1084,7 @@
{
COLORREF col;
if ((EdgeColorMap[edgeType].themeProp == -1)
- || FAILED (GetThemeColor (theme, part, state,
+ || FAILED (GetThemeColor (theme, part, state,
EdgeColorMap[edgeType].themeProp, &col)))
col = GetSysColor (EdgeColorMap[edgeType].sysColor);
return col;
@@ -1106,7 +1106,7 @@
* Same as DrawEdge invoked with BF_DIAGONAL
*/
static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state,
- const RECT* rc, UINT uType,
+ const RECT* rc, UINT uType,
UINT uFlags, LPRECT contentsRect)
{
POINT Points[4];
@@ -1317,10 +1317,10 @@
if((uFlags & BF_MIDDLE) && retval)
{
HBRUSH hbsave;
- HBRUSH hb = get_edge_brush ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL,
+ HBRUSH hb = get_edge_brush ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL,
theme, part, state);
HPEN hpsave;
- HPEN hp = get_edge_pen ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL,
+ 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);
@@ -1356,7 +1356,7 @@
* Same as DrawEdge invoked without BF_DIAGONAL
*/
static HRESULT draw_rect_edge (HDC hdc, HTHEME theme, int part, int state,
- const RECT* rc, UINT uType,
+ const RECT* rc, UINT uType,
UINT uFlags, LPRECT contentsRect)
{
signed char LTInnerI, LTOuterI;
@@ -1478,7 +1478,7 @@
if((uFlags & BF_MIDDLE) && retval)
{
- HBRUSH br = get_edge_brush ((uFlags & BF_MONO) ? EDGE_WINDOW :
EDGE_FILL,
+ HBRUSH br = get_edge_brush ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL,
theme, part, state);
FillRect(hdc, &InnerRect, br);
DeleteObject (br);
@@ -1513,7 +1513,7 @@
TRACE("%d %d 0x%08x 0x%08x\n", iPartId, iStateId, uEdge, uFlags);
if(!hTheme)
return E_HANDLE;
-
+
if(uFlags & BF_DIAGONAL)
return draw_diag_edge (hdc, hTheme, iPartId, iStateId, pDestRect,
uEdge, uFlags, pContentRect);
@@ -1550,11 +1550,11 @@
COLORREF oldTextColor;
int oldBkMode;
RECT rt;
-
+
TRACE("%d %d: stub\n", iPartId, iStateId);
if(!hTheme)
return E_HANDLE;
-
+
hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, TMT_FONT, &logfont);
if(SUCCEEDED(hr)) {
hFont = CreateFontIndirectW(&logfont);
@@ -1564,7 +1564,7 @@
CopyRect(&rt, pRect);
if(hFont)
oldFont = SelectObject(hdc, hFont);
-
+
if(dwTextFlags2 & DTT_GRAYED)
textColor = GetSysColor(COLOR_GRAYTEXT);
else {
@@ -1614,11 +1614,11 @@
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype);
if(bgtype == BT_BORDERFILL) {
int bordersize = 1;
-
+
GetThemeInt(hTheme, iPartId, iStateId, TMT_BORDERSIZE, &bordersize);
InflateRect(pContentRect, -bordersize, -bordersize);
} else if ((bgtype == BT_IMAGEFILE)
- && (SUCCEEDED(hr = GetThemeMargins(hTheme, hdc, iPartId,
iStateId,
+ && (SUCCEEDED(hr = GetThemeMargins(hTheme, hdc, iPartId,
iStateId,
TMT_SIZINGMARGINS, NULL, &margin)))) {
pContentRect->left = pBoundingRect->left + margin.cxLeftWidth;
pContentRect->top = pBoundingRect->top + margin.cyTopHeight;
@@ -1662,11 +1662,11 @@
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_BGTYPE, &bgtype);
if(bgtype == BT_BORDERFILL) {
int bordersize = 1;
-
+
GetThemeInt(hTheme, iPartId, iStateId, TMT_BORDERSIZE, &bordersize);
InflateRect(pExtentRect, bordersize, bordersize);
} else if ((bgtype == BT_IMAGEFILE)
- && (SUCCEEDED(hr = GetThemeMargins(hTheme, hdc, iPartId,
iStateId,
+ && (SUCCEEDED(hr = GetThemeMargins(hTheme, hdc, iPartId,
iStateId,
TMT_SIZINGMARGINS, NULL, &margin)))) {
pExtentRect->left = pContentRect->left - margin.cxLeftWidth;
pExtentRect->top = pContentRect->top - margin.cyTopHeight;
@@ -1725,14 +1725,14 @@
HRESULT hr = S_OK;
int bordersize = 1;
- if (SUCCEEDED (hr = GetThemeInt(hTheme, iPartId, iStateId, TMT_BORDERSIZE,
+ if (SUCCEEDED (hr = GetThemeInt(hTheme, iPartId, iStateId, TMT_BORDERSIZE,
&bordersize)))
{
psz->x = psz->y = 2*bordersize;
if (eSize != TS_MIN)
{
psz->x++;
- psz->y++;
+ psz->y++;
}
}
return hr;
@@ -1783,14 +1783,14 @@
HGDIOBJ oldFont = NULL;
LOGFONTW logfont;
RECT rt = {0,0,0xFFFF,0xFFFF};
-
+
TRACE("%d %d: stub\n", iPartId, iStateId);
if(!hTheme)
return E_HANDLE;
if(pBoundingRect)
CopyRect(&rt, pBoundingRect);
-
+
hr = GetThemeFont(hTheme, hdc, iPartId, iStateId, TMT_FONT, &logfont);
if(SUCCEEDED(hr)) {
hFont = CreateFontIndirectW(&logfont);
@@ -1799,7 +1799,7 @@
}
if(hFont)
oldFont = SelectObject(hdc, hFont);
-
+
DrawTextW(hdc, pszText, iCharCount, &rt, dwTextFlags|DT_CALCRECT);
CopyRect(pExtentRect, &rt);
@@ -1867,8 +1867,8 @@
if (bgtype != BT_IMAGEFILE) return FALSE;
- if(FAILED (UXTHEME_LoadImage (hTheme, 0, iPartId, iStateId, &rect, FALSE,
- &bmpSrc, &rcSrc, &hasAlpha)))
+ if(FAILED (UXTHEME_LoadImage (hTheme, 0, iPartId, iStateId, &rect, FALSE,
+ &bmpSrc, &rcSrc, &hasAlpha)))
return FALSE;
get_transparency (hTheme, iPartId, iStateId, hasAlpha, &transparent,
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 (original)
+++ trunk/reactos/dll/win32/uxtheme/system.c Thu Nov 29 14:21:01 2007
@@ -246,7 +246,7 @@
"MenuHilight", /* COLOR_MENUHILIGHT */
"MenuBar", /* COLOR_MENUBAR */
};
-static const WCHAR strColorKey[] =
+static const WCHAR strColorKey[] =
{
'C','o','n','t','r','o','l','
','P','a','n','e','l','\\',
'C','o','l','o','r','s',0 };
static const WCHAR keyFlatMenus[] = {
'F','l','a','t','M','e','n','u',
0};
@@ -261,7 +261,7 @@
{
int spiGet, spiSet;
const WCHAR* keyName;
-} backupSysParams[] =
+} backupSysParams[] =
{
{SPI_GETFLATMENU, SPI_SETFLATMENU, keyFlatMenus},
{SPI_GETGRADIENTCAPTIONS, SPI_SETGRADIENTCAPTIONS, keyGradientCaption},
@@ -283,19 +283,19 @@
for (i = 0; i < NUM_SYS_COLORS; i++)
{
COLORREF col = GetSysColor (i);
-
- sprintf (colorStr, "%d %d %d",
+
+ sprintf (colorStr, "%d %d %d",
GetRValue (col), GetGValue (col), GetBValue (col));
- RegSetValueExA (hKey, SysColorsNames[i], 0, REG_SZ,
+ RegSetValueExA (hKey, SysColorsNames[i], 0, REG_SZ,
(BYTE*)colorStr, strlen (colorStr)+1);
}
RegCloseKey (hKey);
}
}
-/* Before activating a theme, query current system colors, certain settings
- * and backup them in the registry, so they can be restored when the theme
+/* Before activating a theme, query current system colors, certain settings
+ * and backup them in the registry, so they can be restored when the theme
* is deactivated */
static void UXTHEME_BackupSystemMetrics(void)
{
@@ -308,22 +308,22 @@
{
NONCLIENTMETRICSW ncm;
LOGFONTW iconTitleFont;
-
+
/* back up colors */
save_sys_colors (hKey);
-
+
/* back up "other" settings */
while (bsp->spiGet >= 0)
{
DWORD value;
-
+
SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
- RegSetValueExW (hKey, bsp->keyName, 0, REG_DWORD,
+ RegSetValueExW (hKey, bsp->keyName, 0, REG_DWORD,
(LPBYTE)&value, sizeof (value));
-
+
bsp++;
}
-
+
/* back up non-client metrics */
memset (&ncm, 0, sizeof (ncm));
ncm.cbSize = sizeof (ncm);
@@ -333,9 +333,9 @@
memset (&iconTitleFont, 0, sizeof (iconTitleFont));
SystemParametersInfoW (SPI_GETICONTITLELOGFONT, sizeof (iconTitleFont),
&iconTitleFont, 0);
- RegSetValueExW (hKey, keyIconTitleFont, 0, REG_BINARY,
+ RegSetValueExW (hKey, keyIconTitleFont, 0, REG_BINARY,
(LPBYTE)&iconTitleFont, sizeof (iconTitleFont));
-
+
RegCloseKey (hKey);
}
}
@@ -347,25 +347,25 @@
const struct BackupSysParam* bsp = backupSysParams;
if (RegOpenKeyExW (HKEY_CURRENT_USER, szThemeManager,
- 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
+ 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
{
HKEY colorKey;
-
+
/* read backed-up colors */
if (RegOpenKeyExW (hKey, strColorKey,
- 0, KEY_QUERY_VALUE, &colorKey) == ERROR_SUCCESS)
+ 0, KEY_QUERY_VALUE, &colorKey) == ERROR_SUCCESS)
{
int i;
COLORREF sysCols[NUM_SYS_COLORS];
int sysColsIndices[NUM_SYS_COLORS];
int sysColCount = 0;
-
+
for (i = 0; i < NUM_SYS_COLORS; i++)
{
DWORD type;
char colorStr[13];
DWORD count = sizeof(colorStr);
-
+
if (RegQueryValueExA (colorKey, SysColorsNames[i], 0,
&type, (LPBYTE) colorStr, &count) == ERROR_SUCCESS)
{
@@ -379,56 +379,56 @@
}
}
RegCloseKey (colorKey);
-
+
SetSysColors (sysColCount, sysColsIndices, sysCols);
}
-
+
/* read backed-up other settings */
while (bsp->spiGet >= 0)
{
DWORD value;
DWORD count = sizeof(value);
DWORD type;
-
+
if (RegQueryValueExW (hKey, bsp->keyName, 0,
&type, (LPBYTE)&value, &count) == ERROR_SUCCESS)
{
SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value,
SPIF_UPDATEINIFILE);
}
-
+
bsp++;
}
-
+
/* read backed-up non-client metrics */
{
NONCLIENTMETRICSW ncm;
LOGFONTW iconTitleFont;
DWORD count = sizeof(ncm);
DWORD type;
-
+
if (RegQueryValueExW (hKey, keyNonClientMetrics, 0,
&type, (LPBYTE)&ncm, &count) == ERROR_SUCCESS)
{
- SystemParametersInfoW (SPI_SETNONCLIENTMETRICS,
+ SystemParametersInfoW (SPI_SETNONCLIENTMETRICS,
count, (LPVOID)&ncm, SPIF_UPDATEINIFILE);
}
-
+
count = sizeof(iconTitleFont);
-
+
if (RegQueryValueExW (hKey, keyIconTitleFont, 0,
&type, (LPBYTE)&iconTitleFont, &count) == ERROR_SUCCESS)
{
- SystemParametersInfoW (SPI_SETICONTITLELOGFONT,
+ SystemParametersInfoW (SPI_SETICONTITLELOGFONT,
count, (LPVOID)&iconTitleFont, SPIF_UPDATEINIFILE);
}
}
-
+
RegCloseKey (hKey);
}
}
-/* Make system settings persistent, so they're in effect even w/o uxtheme
+/* Make system settings persistent, so they're in effect even w/o uxtheme
* loaded.
* For efficiency reasons, only the last SystemParametersInfoW sets
* SPIF_SENDWININICHANGE */
@@ -443,26 +443,26 @@
while (bsp->spiGet >= 0)
{
DWORD value;
-
+
SystemParametersInfoW (bsp->spiGet, 0, &value, 0);
SystemParametersInfoW (bsp->spiSet, 0, (LPVOID)value,
SPIF_UPDATEINIFILE);
-
+
bsp++;
}
-
+
memset (&ncm, 0, sizeof (ncm));
ncm.cbSize = sizeof (ncm);
- SystemParametersInfoW (SPI_GETNONCLIENTMETRICS,
+ SystemParametersInfoW (SPI_GETNONCLIENTMETRICS,
sizeof (ncm), (LPVOID)&ncm, 0);
- SystemParametersInfoW (SPI_SETNONCLIENTMETRICS,
+ SystemParametersInfoW (SPI_SETNONCLIENTMETRICS,
sizeof (ncm), (LPVOID)&ncm, SPIF_UPDATEINIFILE);
memset (&iconTitleFont, 0, sizeof (iconTitleFont));
- SystemParametersInfoW (SPI_GETICONTITLELOGFONT,
+ SystemParametersInfoW (SPI_GETICONTITLELOGFONT,
sizeof (iconTitleFont), (LPVOID)&iconTitleFont, 0);
- SystemParametersInfoW (SPI_SETICONTITLELOGFONT,
- sizeof (iconTitleFont), (LPVOID)&iconTitleFont,
+ SystemParametersInfoW (SPI_SETICONTITLELOGFONT,
+ sizeof (iconTitleFont), (LPVOID)&iconTitleFont,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
}
@@ -501,11 +501,11 @@
tmp[1] = '\0';
RegSetValueExW(hKey, szThemeActive, 0, REG_SZ, (const BYTE*)tmp,
sizeof(WCHAR)*2);
if(bThemeActive) {
- RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)szCurrentColor,
+ RegSetValueExW(hKey, szColorName, 0, REG_SZ, (const BYTE*)szCurrentColor,
(lstrlenW(szCurrentColor)+1)*sizeof(WCHAR));
- RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)szCurrentSize,
+ RegSetValueExW(hKey, szSizeName, 0, REG_SZ, (const BYTE*)szCurrentSize,
(lstrlenW(szCurrentSize)+1)*sizeof(WCHAR));
- RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)szCurrentTheme,
+ RegSetValueExW(hKey, szDllName, 0, REG_SZ, (const BYTE*)szCurrentTheme,
(lstrlenW(szCurrentTheme)+1)*sizeof(WCHAR));
}
else {
@@ -518,9 +518,9 @@
}
else
TRACE("Failed to open theme registry key\n");
-
+
UXTHEME_SaveSystemMetrics ();
-
+
return hr;
}
@@ -583,7 +583,7 @@
TRACE("(%d)\n", fEnable);
if(fEnable != bThemeActive) {
- if(fEnable)
+ if(fEnable)
UXTHEME_BackupSystemMetrics();
else
UXTHEME_RestoreSystemMetrics();
@@ -842,7 +842,7 @@
* RETURNS
* some kind of status flag
*/
-DWORD WINAPI QueryThemeServices()
+DWORD WINAPI QueryThemeServices(void)
{
FIXME("stub\n");
return 3; /* This is what is returned under XP in most cases */
@@ -1053,7 +1053,7 @@
* or when pszSizeName does not refer to a valid size
*
* NOTES
- * XP fails with E_POINTER when pszColorNames points to a buffer smaller than
+ * XP fails with E_POINTER when pszColorNames points to a buffer smaller than
* sizeof(THEMENAMES).
*
* Not very efficient that I'm opening & validating the theme every call, but
@@ -1113,7 +1113,7 @@
* or when pszColorName does not refer to a valid color
*
* NOTES
- * XP fails with E_POINTER when pszSizeNames points to a buffer smaller than
+ * XP fails with E_POINTER when pszSizeNames points to a buffer smaller than
* sizeof(THEMENAMES).
*
* Not very efficient that I'm opening & validating the theme every call, but
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 (original)
+++ trunk/reactos/dll/win32/uxtheme/uxtheme.rbuild Thu Nov 29 14:21:01 2007
@@ -1,13 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
<module name="uxtheme" type="win32dll"
baseaddress="${BASEADDRESS_UXTHEME}" installbase="system32"
installname="uxtheme.dll" allowwarnings="true">
<importlibrary definition="uxtheme.spec.def" />
<include base="uxtheme">.</include>
<include base="ReactOS">include/reactos/wine</include>
- <define name="__REACTOS__" />
<define name="__WINESRC__" />
- <define name="__USE_W32API" />
- <define name="_WIN32_IE">0x600</define>
- <define name="_WIN32_WINNT">0x501</define>
- <define name="WINVER">0x501</define>
+ <define name="WINVER">0x600</define>
+ <define name="_WIN32_WINNT">0x600</define>
<library>wine</library>
<library>user32</library>
<library>gdi32</library>