mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 06:16:35 +00:00
Implement IsThemeBackgroundPartiallyTransparent,
DrawThemeParentBackground, and beginnings of other drawing functions.
This commit is contained in:
parent
edf9eb6eea
commit
64851e1664
|
@ -36,13 +36,22 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
|
WINE_DEFAULT_DEBUG_CHANNEL(uxtheme);
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* Defines and global variables
|
||||||
|
*/
|
||||||
|
|
||||||
|
DWORD dwDialogTextureFlags;
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EnableThemeDialogTexture (UXTHEME.@)
|
* EnableThemeDialogTexture (UXTHEME.@)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
|
HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
FIXME("%p 0x%08lx: stub\n", hwnd, dwFlags);
|
TRACE("(%p,0x%08lx\n", hwnd, dwFlags);
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
dwDialogTextureFlags = dwFlags;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -50,8 +59,8 @@ HRESULT WINAPI EnableThemeDialogTexture(HWND hwnd, DWORD dwFlags)
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI IsThemeDialogTextureEnabled(void)
|
BOOL WINAPI IsThemeDialogTextureEnabled(void)
|
||||||
{
|
{
|
||||||
FIXME("stub\n");
|
TRACE("\n");
|
||||||
return FALSE;
|
return (dwDialogTextureFlags & ETDT_ENABLE) && !(dwDialogTextureFlags & ETDT_DISABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -59,10 +68,32 @@ BOOL WINAPI IsThemeDialogTextureEnabled(void)
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
|
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
|
||||||
{
|
{
|
||||||
FIXME("stub\n");
|
RECT rt;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
POINT org;
|
||||||
|
HWND hParent;
|
||||||
|
TRACE("(%p,%p,%p)\n", hwnd, hdc, prc);
|
||||||
|
hParent = GetParent(hwnd);
|
||||||
|
if(!hParent)
|
||||||
|
hParent = hwnd;
|
||||||
|
if(prc) {
|
||||||
|
CopyRect(&rt, prc);
|
||||||
|
MapWindowPoints(hwnd, NULL, (LPPOINT)&rt, 2);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GetClientRect(hParent, &rt);
|
||||||
|
MapWindowPoints(hParent, NULL, (LPPOINT)&rt, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
SetViewportOrgEx(hdc, rt.left, rt.top, &org);
|
||||||
|
|
||||||
|
SendMessageW(hParent, WM_ERASEBKGND, (WPARAM)hdc, 0);
|
||||||
|
SendMessageW(hParent, WM_PRINTCLIENT, (WPARAM)hdc, PRF_CLIENT);
|
||||||
|
|
||||||
|
SetViewportOrgEx(hdc, org.x, org.y, NULL);
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* DrawThemeBackground (UXTHEME.@)
|
* DrawThemeBackground (UXTHEME.@)
|
||||||
*/
|
*/
|
||||||
|
@ -70,10 +101,14 @@ HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId,
|
||||||
int iStateId, const RECT *pRect,
|
int iStateId, const RECT *pRect,
|
||||||
const RECT *pClipRect)
|
const RECT *pClipRect)
|
||||||
{
|
{
|
||||||
FIXME("%d %d: stub\n", iPartId, iStateId);
|
DTBGOPTS opts;
|
||||||
if(!hTheme)
|
opts.dwSize = sizeof(DTBGOPTS);
|
||||||
return E_HANDLE;
|
opts.dwFlags = 0;
|
||||||
return ERROR_CALL_NOT_IMPLEMENTED;
|
if(pClipRect) {
|
||||||
|
opts.dwFlags |= DTBG_CLIPRECT;
|
||||||
|
CopyRect(&opts.rcClip, pClipRect);
|
||||||
|
}
|
||||||
|
return DrawThemeBackgroundEx(hTheme, hdc, iPartId, iStateId, pRect, &opts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -229,6 +264,8 @@ HRESULT WINAPI GetThemeTextMetrics(HTHEME hTheme, HDC hdc, int iPartId,
|
||||||
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId,
|
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId,
|
||||||
int iStateId)
|
int iStateId)
|
||||||
{
|
{
|
||||||
FIXME("%d %d: stub\n", iPartId, iStateId);
|
BOOL transparent = FALSE;
|
||||||
return FALSE;
|
TRACE("(%d,%d)\n", iPartId, iStateId);
|
||||||
|
GetThemeBool(hTheme, iPartId, iStateId, TMT_TRANSPARENT, &transparent);
|
||||||
|
return transparent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue