Autosyncing with Wine HEAD

svn path=/trunk/; revision=26092
This commit is contained in:
The Wine Synchronizer 2007-03-14 14:55:42 +00:00
parent 59ff37d40e
commit de50154dfe
7 changed files with 42 additions and 38 deletions

View file

@ -27,6 +27,7 @@
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "vfwmsgs.h"
#include "uxtheme.h"
#include "tmschema.h"
@ -53,8 +54,8 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
static const WCHAR szTab[] = { 'T','a','b',0 };
HRESULT hr;
TRACE("(%p,0x%08lx\n", hwnd, dwFlags);
hr = SetPropW (hwnd, MAKEINTATOMW (atDialogThemeEnabled),
TRACE("(%p,0x%08x\n", hwnd, dwFlags);
hr = SetPropW (hwnd, (LPCWSTR)MAKEINTATOM(atDialogThemeEnabled),
(HANDLE)(dwFlags|0x80000000));
/* 0x80000000 serves as a "flags set" flag */
if (FAILED(hr))
@ -75,7 +76,7 @@ BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
TRACE("(%p)\n", hwnd);
dwDialogTextureFlags = (DWORD)GetPropW (hwnd,
MAKEINTATOMW (atDialogThemeEnabled));
(LPCWSTR)MAKEINTATOM(atDialogThemeEnabled));
if (dwDialogTextureFlags == 0)
/* Means EnableThemeDialogTexture wasn't called for this dialog */
return TRUE;
@ -220,7 +221,7 @@ static PTHEME_PROPERTY UXTHEME_SelectImage(HTHEME hTheme, HDC hdc, int iPartId,
}
}
if(reqsize.x <= size.x && reqsize.y <= size.y) {
TRACE("Using image size %ldx%ld, image %d\n", reqsize.x, reqsize.y, i + TMT_IMAGEFILE1);
TRACE("Using image size %dx%d, image %d\n", reqsize.x, reqsize.y, i + TMT_IMAGEFILE1);
return fileProp;
}
}
@ -831,7 +832,7 @@ static HRESULT UXTHEME_DrawBackgroundFill(HTHEME hTheme, HDC hdc, int iPartId,
HRESULT hr = S_OK;
int filltype = FT_SOLID;
TRACE("(%d,%d,%ld)\n", iPartId, iStateId, pOptions->dwFlags);
TRACE("(%d,%d,%d)\n", iPartId, iStateId, pOptions->dwFlags);
if(pOptions->dwFlags & DTBG_OMITCONTENT)
return S_OK;
@ -929,7 +930,7 @@ HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId,
int bgtype = BT_BORDERFILL;
RECT rt;
TRACE("(%p,%p,%d,%d,%ld,%ld)\n", hTheme, hdc, iPartId, iStateId,pRect->left,pRect->top);
TRACE("(%p,%p,%d,%d,%d,%d)\n", hTheme, hdc, iPartId, iStateId,pRect->left,pRect->top);
if(!hTheme)
return E_HANDLE;
@ -1388,7 +1389,7 @@ static HRESULT draw_rect_edge (HDC hdc, HTHEME theme, int part, int state,
LTInnerI = RBInnerI = LTRBInnerFlat[uType & (BDR_INNER|BDR_OUTER)];
LTOuterI = RBOuterI = LTRBOuterFlat[uType & (BDR_INNER|BDR_OUTER)];
if( LTInnerI != -1 ) LTInnerI = RBInnerI = COLOR_BTNFACE;
if( LTInnerI != -1 ) LTInnerI = RBInnerI = EDGE_FILL;
}
else if(uFlags & BF_SOFT)
{
@ -1627,7 +1628,7 @@ HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc, int iPartId
/* If nothing was found, leave unchanged */
}
TRACE("left:%ld,top:%ld,right:%ld,bottom:%ld\n", pContentRect->left, pContentRect->top, pContentRect->right, pContentRect->bottom);
TRACE("left:%d,top:%d,right:%d,bottom:%d\n", pContentRect->left, pContentRect->top, pContentRect->right, pContentRect->bottom);
return S_OK;
}
@ -1675,7 +1676,7 @@ HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId,
/* If nothing was found, leave unchanged */
}
TRACE("left:%ld,top:%ld,right:%ld,bottom:%ld\n", pExtentRect->left, pExtentRect->top, pExtentRect->right, pExtentRect->bottom);
TRACE("left:%d,top:%d,right:%d,bottom:%d\n", pExtentRect->left, pExtentRect->top, pExtentRect->right, pExtentRect->bottom);
return S_OK;
}
@ -1718,8 +1719,8 @@ HRESULT WINAPI GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc, int iPartId,
}
/* compute part size for "borderfill" backgrounds */
HRESULT get_border_background_size (HTHEME hTheme, int iPartId,
int iStateId, THEMESIZE eSize, POINT* psz)
static HRESULT get_border_background_size (HTHEME hTheme, int iPartId,
int iStateId, THEMESIZE eSize, POINT* psz)
{
HRESULT hr = S_OK;
int bordersize = 1;

View file

@ -35,7 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
/* For the moment, do nothing here. */
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
TRACE("%p 0x%lx %p: stub\n", hInstDLL, fdwReason, lpv);
TRACE("%p 0x%x %p: stub\n", hInstDLL, fdwReason, lpv);
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDLL);

View file

@ -26,6 +26,7 @@
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "vfwmsgs.h"
#include "uxtheme.h"
#include "tmschema.h"

View file

@ -28,6 +28,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "vfwmsgs.h"
#include "uxtheme.h"
#include "tmschema.h"
@ -46,7 +47,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
BOOL MSSTYLES_GetNextInteger(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, int *value);
BOOL MSSTYLES_GetNextToken(LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LPWSTR lpBuff, DWORD buffSize);
void MSSTYLES_ParseThemeIni(PTHEME_FILE tf, BOOL setMetrics);
HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LOGFONTW* logfont);
static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPCWSTR *lpValEnd, LOGFONTW* logfont);
extern HINSTANCE hDllInst;
extern int alphaBlendMode;
@ -57,7 +58,7 @@ static const WCHAR szThemesIniResource[] = {
't','h','e','m','e','s','_','i','n','i','\0'
};
PTHEME_FILE tfActiveTheme = NULL;
static PTHEME_FILE tfActiveTheme;
/***********************************************************************/
@ -115,7 +116,7 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST
}
if((versize = SizeofResource(hTheme, hrsc)) != 2)
{
TRACE("Version resource found, but wrong size: %ld\n", versize);
TRACE("Version resource found, but wrong size: %d\n", versize);
hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT);
goto invalid_theme;
}
@ -402,7 +403,7 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
* RETURNS
* The class found, or NULL
*/
PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName)
static PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName)
{
PTHEME_CLASS cur = tf->classes;
while(cur) {
@ -674,7 +675,7 @@ struct PARSECOLORSTATE
int captionColors;
};
inline void parse_init_color (struct PARSECOLORSTATE* state)
static inline void parse_init_color (struct PARSECOLORSTATE* state)
{
memset (state, 0, sizeof (*state));
}
@ -728,7 +729,7 @@ struct PARSENONCLIENTSTATE
LOGFONTW iconTitleFont;
};
inline void parse_init_nonclient (struct PARSENONCLIENTSTATE* state)
static inline void parse_init_nonclient (struct PARSENONCLIENTSTATE* state)
{
memset (state, 0, sizeof (*state));
state->metrics.cbSize = sizeof (NONCLIENTMETRICSW);
@ -1225,8 +1226,8 @@ HRESULT MSSTYLES_GetPropertyColor(PTHEME_PROPERTY tp, COLORREF *pColor)
*
* Retrieve a color value for a property
*/
HRESULT MSSTYLES_GetFont (LPCWSTR lpCur, LPCWSTR lpEnd,
LPCWSTR *lpValEnd, LOGFONTW* pFont)
static HRESULT MSSTYLES_GetFont (LPCWSTR lpCur, LPCWSTR lpEnd,
LPCWSTR *lpValEnd, LOGFONTW* pFont)
{
static const WCHAR szBold[] = {'b','o','l','d','\0'};
static const WCHAR szItalic[] = {'i','t','a','l','i','c','\0'};

View file

@ -94,7 +94,6 @@ BOOL MSSTYLES_LookupEnum(LPCWSTR pszValueName, int dwEnum, int *dwValue);
BOOL MSSTYLES_LookupPartState(LPCWSTR pszClass, LPCWSTR pszPart, LPCWSTR pszState, int *iPartId, int *iStateId);
PUXINI_FILE MSSTYLES_GetThemeIni(PTHEME_FILE tf);
PTHEME_PARTSTATE MSSTYLES_FindPartState(PTHEME_CLASS tc, int iPartId, int iStateId, PTHEME_CLASS *tcNext);
PTHEME_CLASS MSSTYLES_FindClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWSTR pszClassName);
PTHEME_PROPERTY MSSTYLES_FindProperty(PTHEME_CLASS tc, int iPartId, int iStateId, int iPropertyPrimitive, int iPropertyId);
PTHEME_PROPERTY MSSTYLES_FindMetric(int iPropertyPrimitive, int iPropertyId);
HBITMAP MSSTYLES_LoadBitmap(PTHEME_CLASS tc, LPCWSTR lpFilename, BOOL* hasAlpha);

View file

@ -26,6 +26,7 @@
#include "winbase.h"
#include "winuser.h"
#include "wingdi.h"
#include "vfwmsgs.h"
#include "uxtheme.h"
#include "tmschema.h"

View file

@ -28,6 +28,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "vfwmsgs.h"
#include "uxtheme.h"
#include "tmschema.h"
@ -165,7 +166,7 @@ static void UXTHEME_LoadTheme(void)
}
else {
bThemeActive = FALSE;
TRACE("Failed to get ThemeActive: %ld\n", GetLastError());
TRACE("Failed to get ThemeActive: %d\n", GetLastError());
}
buffsize = sizeof(szCurrentColor)/sizeof(szCurrentColor[0]);
if(RegQueryValueExW(hKey, szColorName, NULL, NULL, (LPBYTE)szCurrentColor, &buffsize))
@ -205,7 +206,7 @@ static void UXTHEME_LoadTheme(void)
}
if(!bThemeActive) {
MSSTYLES_SetActiveTheme(NULL, FALSE);
TRACE("Themeing not active\n");
TRACE("Theming not active\n");
}
}
@ -470,7 +471,7 @@ static void UXTHEME_SaveSystemMetrics(void)
*
* Change the current active theme
*/
HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
static HRESULT UXTHEME_SetActiveTheme(PTHEME_FILE tf)
{
HKEY hKey;
WCHAR tmp[2];
@ -604,15 +605,15 @@ HRESULT WINAPI EnableTheming(BOOL fEnable)
* I'm using atoms as there may be large numbers of duplicated strings
* and they do the work of keeping memory down as a cause of that quite nicely
*/
HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
static HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
{
ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, MAKEINTATOMW(aProp));
ATOM oldValue = (ATOM)(size_t)RemovePropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
if(oldValue)
DeleteAtom(oldValue);
if(pszValue) {
ATOM atValue = AddAtomW(pszValue);
if(!atValue
|| !SetPropW(hwnd, MAKEINTATOMW(aProp), (LPWSTR)MAKEINTATOMW(atValue))) {
|| !SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp), (LPWSTR)MAKEINTATOM(atValue))) {
HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
if(atValue) DeleteAtom(atValue);
return hr;
@ -621,9 +622,9 @@ HRESULT UXTHEME_SetWindowProperty(HWND hwnd, ATOM aProp, LPCWSTR pszValue)
return S_OK;
}
LPWSTR UXTHEME_GetWindowProperty(HWND hwnd, ATOM aProp, LPWSTR pszBuffer, int dwLen)
static LPWSTR UXTHEME_GetWindowProperty(HWND hwnd, ATOM aProp, LPWSTR pszBuffer, int dwLen)
{
ATOM atValue = (ATOM)(size_t)GetPropW(hwnd, MAKEINTATOMW(aProp));
ATOM atValue = (ATOM)(size_t)GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(aProp));
if(atValue) {
if(GetAtomNameW(atValue, pszBuffer, dwLen))
return pszBuffer;
@ -642,7 +643,7 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
LPCWSTR pszAppName;
LPCWSTR pszUseClassList;
HTHEME hTheme = NULL;
TRACE("(%p,%s)", hwnd, debugstr_w(pszClassList));
TRACE("(%p,%s)\n", hwnd, debugstr_w(pszClassList));
if(bThemeActive)
{
@ -656,7 +657,7 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
hTheme = MSSTYLES_OpenThemeClass(pszAppName, pszUseClassList);
}
if(IsWindow(hwnd))
SetPropW(hwnd, MAKEINTATOMW(atWindowTheme), hTheme);
SetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme), hTheme);
TRACE(" = %p\n", hTheme);
return hTheme;
}
@ -675,7 +676,7 @@ HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
{
TRACE("(%p)\n", hwnd);
return GetPropW(hwnd, MAKEINTATOMW(atWindowTheme));
return GetPropW(hwnd, (LPCWSTR)MAKEINTATOM(atWindowTheme));
}
/***********************************************************************
@ -725,7 +726,7 @@ DWORD WINAPI GetThemeAppProperties(void)
*/
void WINAPI SetThemeAppProperties(DWORD dwFlags)
{
TRACE("(0x%08lx)\n", dwFlags);
TRACE("(0x%08x)\n", dwFlags);
dwThemeAppProperties = dwFlags;
}
@ -748,7 +749,7 @@ HRESULT WINAPI HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
const RECT *pRect, HRGN hrgn,
POINT ptTest, WORD *pwHitTestCode)
{
FIXME("%d %d 0x%08lx: stub\n", iPartId, iStateId, dwOptions);
FIXME("%d %d 0x%08x: stub\n", iPartId, iStateId, dwOptions);
if(!hTheme)
return E_HANDLE;
return ERROR_CALL_NOT_IMPLEMENTED;
@ -867,7 +868,7 @@ HRESULT WINAPI OpenThemeFile(LPCWSTR pszThemeFileName, LPCWSTR pszColorName,
LPCWSTR pszSizeName, HTHEMEFILE *hThemeFile,
DWORD unknown)
{
TRACE("(%s,%s,%s,%p,%ld)\n", debugstr_w(pszThemeFileName),
TRACE("(%s,%s,%s,%p,%d)\n", debugstr_w(pszThemeFileName),
debugstr_w(pszColorName), debugstr_w(pszSizeName),
hThemeFile, unknown);
return MSSTYLES_OpenThemeFile(pszThemeFileName, pszColorName, pszSizeName, (PTHEME_FILE*)hThemeFile);
@ -947,7 +948,7 @@ HRESULT WINAPI GetThemeDefaults(LPCWSTR pszThemeFileName, LPWSTR pszColorName,
{
PTHEME_FILE pt;
HRESULT hr;
TRACE("(%s,%p,%ld,%p,%ld)\n", debugstr_w(pszThemeFileName),
TRACE("(%s,%p,%d,%p,%d)\n", debugstr_w(pszThemeFileName),
pszColorName, dwColorNameLen,
pszSizeName, dwSizeNameLen);
@ -1066,7 +1067,7 @@ HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName,
HRESULT hr;
LPWSTR tmp;
UINT resourceId = dwColorNum + 1000;
TRACE("(%s,%s,%ld)\n", debugstr_w(pszThemeFileName),
TRACE("(%s,%s,%d)\n", debugstr_w(pszThemeFileName),
debugstr_w(pszSizeName), dwColorNum);
hr = MSSTYLES_OpenThemeFile(pszThemeFileName, NULL, pszSizeName, &pt);
@ -1126,7 +1127,7 @@ HRESULT WINAPI EnumThemeSizes(LPWSTR pszThemeFileName, LPWSTR pszColorName,
HRESULT hr;
LPWSTR tmp;
UINT resourceId = dwSizeNum + 3000;
TRACE("(%s,%s,%ld)\n", debugstr_w(pszThemeFileName),
TRACE("(%s,%s,%d)\n", debugstr_w(pszThemeFileName),
debugstr_w(pszColorName), dwSizeNum);
hr = MSSTYLES_OpenThemeFile(pszThemeFileName, pszColorName, NULL, &pt);