}
}
-static void SCROLL_DrawMovingThumb(PWND_CONTEXT pwndContext, PDRAW_CONTEXT pcontext, SCROLLBARINFO* psbi, BOOL vertical)
+static void SCROLL_DrawMovingThumb(PWND_DATA pwndData, PDRAW_CONTEXT pcontext, SCROLLBARINFO* psbi, BOOL vertical)
{
- INT pos = pwndContext->SCROLL_TrackingPos;
+ INT pos = pwndData->SCROLL_TrackingPos;
INT max_size;
if( vertical )
SCROLL_DrawInterior(pcontext, psbi, pos, vertical, SCROLL_THUMB, 0);
- pwndContext->SCROLL_MovingThumb = !pwndContext->SCROLL_MovingThumb;
+ pwndData->SCROLL_MovingThumb = !pwndData->SCROLL_MovingThumb;
}
SCROLLBARINFO sbi;
BOOL vertical;
enum SCROLL_HITTEST htHot = SCROLL_NOWHERE;
- PWND_CONTEXT pwndContext;
+ PWND_DATA pwndData;
if (((nBar == SB_VERT) && !(pcontext->wi.dwStyle & WS_VSCROLL)) ||
((nBar == SB_HORZ) && !(pcontext->wi.dwStyle & WS_HSCROLL))) return;
- if (!(pwndContext = ThemeGetWndContext(pcontext->hWnd)))
+ if (!(pwndData = ThemeGetWndData(pcontext->hWnd)))
return;
- if (pwndContext->SCROLL_TrackingWin)
+ if (pwndData->SCROLL_TrackingWin)
return;
/* Retrieve scrollbar info */
}
static void
-SCROLL_HandleScrollEvent(PWND_CONTEXT pwndContext, HWND hwnd, INT nBar, UINT msg, POINT pt)
+SCROLL_HandleScrollEvent(PWND_DATA pwndData, HWND hwnd, INT nBar, UINT msg, POINT pt)
{
/* Previous mouse position for timer events */
static POINT prevPt;
return;
}
- if ((pwndContext->SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN))
+ if ((pwndData->SCROLL_trackHitTest == SCROLL_NOWHERE) && (msg != WM_LBUTTONDOWN))
return;
ThemeInitDrawContext(&context, hwnd, 0);
{
case WM_LBUTTONDOWN: /* Initialise mouse tracking */
HideCaret(hwnd); /* hide caret while holding down LBUTTON */
- pwndContext->SCROLL_trackVertical = vertical;
- pwndContext->SCROLL_trackHitTest = hittest = SCROLL_HitTest( hwnd, &sbi, vertical, pt, FALSE );
+ pwndData->SCROLL_trackVertical = vertical;
+ pwndData->SCROLL_trackHitTest = hittest = SCROLL_HitTest( hwnd, &sbi, vertical, pt, FALSE );
lastClickPos = vertical ? (pt.y - sbi.rcScrollBar.top) : (pt.x - sbi.rcScrollBar.left);
lastMousePos = lastClickPos;
trackThumbPos = sbi.xyThumbTop;
//TRACE("Event: hwnd=%p bar=%d msg=%s pt=%d,%d hit=%d\n",
// hwnd, nBar, SPY_GetMsgName(msg,hwnd), pt.x, pt.y, hittest );
- switch(pwndContext->SCROLL_trackHitTest)
+ switch(pwndData->SCROLL_trackHitTest)
{
case SCROLL_NOWHERE: /* No tracking in progress */
break;
case SCROLL_TOP_ARROW:
- if (hittest == pwndContext->SCROLL_trackHitTest)
+ if (hittest == pwndData->SCROLL_trackHitTest)
{
- SCROLL_DrawArrows( &context, &sbi, vertical, pwndContext->SCROLL_trackHitTest, 0 );
+ SCROLL_DrawArrows( &context, &sbi, vertical, pwndData->SCROLL_trackHitTest, 0 );
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessageW( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
break;
case SCROLL_TOP_RECT:
- SCROLL_DrawInterior( &context, &sbi, sbi.xyThumbTop, vertical, pwndContext->SCROLL_trackHitTest, 0);
- if (hittest == pwndContext->SCROLL_trackHitTest)
+ SCROLL_DrawInterior( &context, &sbi, sbi.xyThumbTop, vertical, pwndData->SCROLL_trackHitTest, 0);
+ if (hittest == pwndData->SCROLL_trackHitTest)
{
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
case SCROLL_THUMB:
if (msg == WM_LBUTTONDOWN)
{
- pwndContext->SCROLL_TrackingWin = hwnd;
- pwndContext->SCROLL_TrackingBar = nBar;
- pwndContext->SCROLL_TrackingPos = trackThumbPos + lastMousePos - lastClickPos;
- pwndContext->SCROLL_TrackingVal = SCROLL_GetThumbVal( &si, &sbi.rcScrollBar,
- vertical, pwndContext->SCROLL_TrackingPos );
- if (!pwndContext->SCROLL_MovingThumb)
- SCROLL_DrawMovingThumb(pwndContext, &context, &sbi, vertical);
+ pwndData->SCROLL_TrackingWin = hwnd;
+ pwndData->SCROLL_TrackingBar = nBar;
+ pwndData->SCROLL_TrackingPos = trackThumbPos + lastMousePos - lastClickPos;
+ pwndData->SCROLL_TrackingVal = SCROLL_GetThumbVal( &si, &sbi.rcScrollBar,
+ vertical, pwndData->SCROLL_TrackingPos );
+ if (!pwndData->SCROLL_MovingThumb)
+ SCROLL_DrawMovingThumb(pwndData, &context, &sbi, vertical);
}
else if (msg == WM_LBUTTONUP)
{
- if (pwndContext->SCROLL_MovingThumb)
- SCROLL_DrawMovingThumb(pwndContext, &context, &sbi, vertical);
+ if (pwndData->SCROLL_MovingThumb)
+ SCROLL_DrawMovingThumb(pwndData, &context, &sbi, vertical);
- SCROLL_DrawInterior( &context, &sbi, sbi.xyThumbTop, vertical, 0, pwndContext->SCROLL_trackHitTest );
+ SCROLL_DrawInterior( &context, &sbi, sbi.xyThumbTop, vertical, 0, pwndData->SCROLL_trackHitTest );
}
else /* WM_MOUSEMOVE */
{
pt = SCROLL_ClipPos( &sbi.rcScrollBar, pt );
pos = vertical ? (pt.y - sbi.rcScrollBar.top) : (pt.x - sbi.rcScrollBar.left);
}
- if ( (pos != lastMousePos) || (!pwndContext->SCROLL_MovingThumb) )
+ if ( (pos != lastMousePos) || (!pwndData->SCROLL_MovingThumb) )
{
- if (pwndContext->SCROLL_MovingThumb)
- SCROLL_DrawMovingThumb(pwndContext, &context, &sbi, vertical);
+ if (pwndData->SCROLL_MovingThumb)
+ SCROLL_DrawMovingThumb(pwndData, &context, &sbi, vertical);
lastMousePos = pos;
- pwndContext->SCROLL_TrackingPos = trackThumbPos + pos - lastClickPos;
- pwndContext->SCROLL_TrackingVal = SCROLL_GetThumbVal( &si, &sbi.rcScrollBar,
+ pwndData->SCROLL_TrackingPos = trackThumbPos + pos - lastClickPos;
+ pwndData->SCROLL_TrackingVal = SCROLL_GetThumbVal( &si, &sbi.rcScrollBar,
vertical,
- pwndContext->SCROLL_TrackingPos );
+ pwndData->SCROLL_TrackingPos );
SendMessageW( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
- MAKEWPARAM( SB_THUMBTRACK, pwndContext->SCROLL_TrackingVal),
+ MAKEWPARAM( SB_THUMBTRACK, pwndData->SCROLL_TrackingVal),
(LPARAM)hwndCtl );
- if (!pwndContext->SCROLL_MovingThumb)
- SCROLL_DrawMovingThumb(pwndContext, &context, &sbi, vertical);
+ if (!pwndData->SCROLL_MovingThumb)
+ SCROLL_DrawMovingThumb(pwndData, &context, &sbi, vertical);
}
}
break;
case SCROLL_BOTTOM_RECT:
- if (hittest == pwndContext->SCROLL_trackHitTest)
+ if (hittest == pwndData->SCROLL_trackHitTest)
{
- SCROLL_DrawInterior( &context, &sbi, sbi.xyThumbTop, vertical, pwndContext->SCROLL_trackHitTest, 0 );
+ SCROLL_DrawInterior( &context, &sbi, sbi.xyThumbTop, vertical, pwndData->SCROLL_trackHitTest, 0 );
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessageW( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
break;
case SCROLL_BOTTOM_ARROW:
- if (hittest == pwndContext->SCROLL_trackHitTest)
+ if (hittest == pwndData->SCROLL_trackHitTest)
{
- SCROLL_DrawArrows( &context, &sbi, vertical, pwndContext->SCROLL_trackHitTest, 0 );
+ SCROLL_DrawArrows( &context, &sbi, vertical, pwndData->SCROLL_trackHitTest, 0 );
if ((msg == WM_LBUTTONDOWN) || (msg == WM_SYSTIMER))
{
SendMessageW( hwndOwner, vertical ? WM_VSCROLL : WM_HSCROLL,
if (msg == WM_LBUTTONUP)
{
- hittest = pwndContext->SCROLL_trackHitTest;
- pwndContext->SCROLL_trackHitTest = SCROLL_NOWHERE; /* Terminate tracking */
+ hittest = pwndData->SCROLL_trackHitTest;
+ pwndData->SCROLL_trackHitTest = SCROLL_NOWHERE; /* Terminate tracking */
if (hittest == SCROLL_THUMB)
{
SB_ENDSCROLL, (LPARAM)hwndCtl );
/* Terminate tracking */
- pwndContext->SCROLL_TrackingWin = 0;
+ pwndData->SCROLL_TrackingWin = 0;
}
ThemeCleanupDrawContext(&context);
SCROLL_TrackScrollBar( HWND hwnd, INT scrollbar, POINT pt )
{
MSG msg;
- PWND_CONTEXT pwndContext = ThemeGetWndContext(hwnd);
- if(!pwndContext)
+ PWND_DATA pwndData = ThemeGetWndData(hwnd);
+ if(!pwndData)
return;
ScreenToWindow(hwnd, &pt);
- SCROLL_HandleScrollEvent(pwndContext, hwnd, scrollbar, WM_LBUTTONDOWN, pt );
+ SCROLL_HandleScrollEvent(pwndData, hwnd, scrollbar, WM_LBUTTONDOWN, pt );
do
{
pt.y = GET_Y_LPARAM(msg.lParam);
ClientToScreen(hwnd, &pt);
ScreenToWindow(hwnd, &pt);
- SCROLL_HandleScrollEvent(pwndContext, hwnd, scrollbar, msg.message, pt );
+ SCROLL_HandleScrollEvent(pwndData, hwnd, scrollbar, msg.message, pt );
}
else
{
DRAW_CONTEXT context;
TRACKMOUSEEVENT tme;
DWORD style;
- PWND_CONTEXT pcontext;
+ PWND_DATA pwndData;
/* First of all check if we have something to do here */
style = GetWindowLongW(hWnd, GWL_STYLE);
return 0;
/* Get theme data for this window */
- pcontext = ThemeGetWndContext(hWnd);
- if (pcontext == NULL)
+ pwndData = ThemeGetWndData(hWnd);
+ if (pwndData == NULL)
return 0;
/* Begin tracking in the non client area if we are not tracking yet */
ThemeInitDrawContext(&context, hWnd, 0);
if (context.wi.dwStyle & WS_SYSMENU)
{
- if (HT_ISBUTTON(ht) || HT_ISBUTTON(pcontext->lastHitTest))
+ if (HT_ISBUTTON(ht) || HT_ISBUTTON(pwndData->lastHitTest))
ThemeDrawCaptionButtons(&context, ht, 0);
}
if (context.wi.dwStyle & WS_HSCROLL)
{
- if (ht == HTHSCROLL || pcontext->lastHitTest == HTHSCROLL)
+ if (ht == HTHSCROLL || pwndData->lastHitTest == HTHSCROLL)
ThemeDrawScrollBar(&context, SB_HORZ , ht == HTHSCROLL ? pt : NULL);
}
if (context.wi.dwStyle & WS_VSCROLL)
{
- if (ht == HTVSCROLL || pcontext->lastHitTest == HTVSCROLL)
+ if (ht == HTVSCROLL || pwndData->lastHitTest == HTVSCROLL)
ThemeDrawScrollBar(&context, SB_VERT, ht == HTVSCROLL ? pt : NULL);
}
ThemeCleanupDrawContext(&context);
- pcontext->lastHitTest = ht;
+ pwndData->lastHitTest = ht;
return 0;
}
{
DRAW_CONTEXT context;
DWORD style;
- PWND_CONTEXT pWndContext;
+ PWND_DATA pwndData;
/* First of all check if we have something to do here */
style = GetWindowLongW(hWnd, GWL_STYLE);
return 0;
/* Get theme data for this window */
- pWndContext = ThemeGetWndContext(hWnd);
- if (pWndContext == NULL)
+ pwndData = ThemeGetWndData(hWnd);
+ if (pwndData == NULL)
return 0;
ThemeInitDrawContext(&context, hWnd, 0);
- if (context.wi.dwStyle & WS_SYSMENU && HT_ISBUTTON(pWndContext->lastHitTest))
+ if (context.wi.dwStyle & WS_SYSMENU && HT_ISBUTTON(pwndData->lastHitTest))
ThemeDrawCaptionButtons(&context, 0, 0);
- if (context.wi.dwStyle & WS_HSCROLL && pWndContext->lastHitTest == HTHSCROLL)
+ if (context.wi.dwStyle & WS_HSCROLL && pwndData->lastHitTest == HTHSCROLL)
ThemeDrawScrollBar(&context, SB_HORZ, NULL);
- if (context.wi.dwStyle & WS_VSCROLL && pWndContext->lastHitTest == HTVSCROLL)
+ if (context.wi.dwStyle & WS_VSCROLL && pwndData->lastHitTest == HTVSCROLL)
ThemeDrawScrollBar(&context, SB_VERT, NULL);
ThemeCleanupDrawContext(&context);
- pWndContext->lastHitTest = HTNOWHERE;
+ pwndData->lastHitTest = HTNOWHERE;
return 0;
}
WPARAM SCMsg, ht;
ULONG Style;
DRAW_CONTEXT context;
- PWND_CONTEXT pWndContext;
+ PWND_DATA pwndData;
Style = GetWindowLongW(hWnd, GWL_STYLE);
if (!((Style & WS_CAPTION) && (Style & WS_SYSMENU)))
}
/* Get theme data for this window */
- pWndContext = ThemeGetWndContext(hWnd);
- if (pWndContext == NULL)
+ pwndData = ThemeGetWndData(hWnd);
+ if (pwndData == NULL)
return;
ThemeInitDrawContext(&context, hWnd, 0);
ThemeDrawCaptionButtons(&context, 0, wParam);
- pWndContext->lastHitTest = wParam;
+ pwndData->lastHitTest = wParam;
SetCapture(hWnd);
Pressed = (ht == wParam);
/* Only draw the buttons if the hit test changed */
- if (ht != pWndContext->lastHitTest &&
- (HT_ISBUTTON(ht) || HT_ISBUTTON(pWndContext->lastHitTest)))
+ if (ht != pwndData->lastHitTest &&
+ (HT_ISBUTTON(ht) || HT_ISBUTTON(pwndData->lastHitTest)))
{
ThemeDrawCaptionButtons(&context, 0, Pressed ? wParam: 0);
- pWndContext->lastHitTest = ht;
+ pwndData->lastHitTest = ht;
}
}
BYTE gabDLGPmessages[UAHOWP_MAX_SIZE];
BOOL gbThemeHooksActive = FALSE;
-PWND_CONTEXT ThemeGetWndContext(HWND hWnd)
+PWND_DATA ThemeGetWndData(HWND hWnd)
{
- PWND_CONTEXT pcontext;
+ PWND_DATA pwndData;
- pcontext = (PWND_CONTEXT)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContext));
- if(pcontext == NULL)
+ pwndData = (PWND_DATA)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContext));
+ if(pwndData == NULL)
{
- pcontext = HeapAlloc(GetProcessHeap(),
+ pwndData = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
- sizeof(WND_CONTEXT));
- if(pcontext == NULL)
+ sizeof(WND_DATA));
+ if(pwndData == NULL)
{
return NULL;
}
- SetPropW( hWnd, (LPCWSTR)MAKEINTATOM(atWndContext), pcontext);
+ SetPropW( hWnd, (LPCWSTR)MAKEINTATOM(atWndContext), pwndData);
}
- return pcontext;
+ return pwndData;
}
-void ThemeDestroyWndContext(HWND hWnd)
+void ThemeDestroyWndData(HWND hWnd)
{
- PWND_CONTEXT pContext;
+ PWND_DATA pwndData;
DWORD ProcessId;
- /*Do not destroy WND_CONTEXT of a window that belong to another process */
+ /*Do not destroy WND_DATA of a window that belong to another process */
GetWindowThreadProcessId(hWnd, &ProcessId);
if(ProcessId != GetCurrentProcessId())
{
return;
}
- pContext = (PWND_CONTEXT)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContext));
- if(pContext == NULL)
+ pwndData = (PWND_DATA)GetPropW(hWnd, (LPCWSTR)MAKEINTATOM(atWndContext));
+ if(pwndData == NULL)
{
return;
}
- if(pContext->HasThemeRgn)
+ if(pwndData->HasThemeRgn)
{
user32ApiHook.SetWindowRgn(hWnd, 0, TRUE);
}
- if (pContext->hTabBackgroundBrush != NULL)
+ if (pwndData->hTabBackgroundBrush != NULL)
{
CloseThemeData(GetWindowTheme(hWnd));
- DeleteObject(pContext->hTabBackgroundBrush);
- pContext->hTabBackgroundBrush = NULL;
+ DeleteObject(pwndData->hTabBackgroundBrush);
+ pwndData->hTabBackgroundBrush = NULL;
}
- if (pContext->hTabBackgroundBmp != NULL)
+ if (pwndData->hTabBackgroundBmp != NULL)
{
- DeleteObject(pContext->hTabBackgroundBmp);
- pContext->hTabBackgroundBmp = NULL;
+ DeleteObject(pwndData->hTabBackgroundBmp);
+ pwndData->hTabBackgroundBmp = NULL;
}
- HeapFree(GetProcessHeap(), 0, pContext);
+ HeapFree(GetProcessHeap(), 0, pwndData);
SetPropW( hWnd, (LPCWSTR)MAKEINTATOM(atWndContext), NULL);
}
static BOOL CALLBACK ThemeCleanupChildWndContext (HWND hWnd, LPARAM msg)
{
- ThemeDestroyWndContext(hWnd);
+ ThemeDestroyWndData(hWnd);
return TRUE;
}
}
else
{
- ThemeDestroyWndContext(hWnd);
+ ThemeDestroyWndData(hWnd);
EnumChildWindows (hWnd, ThemeCleanupChildWndContext, 0);
}
int OnPostWinPosChanged(HWND hWnd, WINDOWPOS* pWinPos)
{
- PWND_CONTEXT pcontext;
+ PWND_DATA pwndData;
DWORD style;
/* We only proceed to change the window shape if it has a caption */
return 0;
/* Get theme data for this window */
- pcontext = ThemeGetWndContext(hWnd);
- if (pcontext == NULL)
+ pwndData = ThemeGetWndData(hWnd);
+ if (pwndData == NULL)
return 0;
/* Do not change the region of the window if its size wasn't changed */
- if ((pWinPos->flags & SWP_NOSIZE) != 0 && pcontext->DirtyThemeRegion == FALSE)
+ if ((pWinPos->flags & SWP_NOSIZE) != 0 && pwndData->DirtyThemeRegion == FALSE)
return 0;
/* We don't touch the shape of the window if the application sets it on its own */
- if (pcontext->HasAppDefinedRgn == TRUE)
+ if (pwndData->HasAppDefinedRgn == TRUE)
return 0;
/* Calling SetWindowRgn will call SetWindowPos again so we need to avoid this recursion */
- if (pcontext->UpdatingRgn == TRUE)
+ if (pwndData->UpdatingRgn == TRUE)
return 0;
if(!IsAppThemed())
{
- if(pcontext->HasThemeRgn)
+ if(pwndData->HasThemeRgn)
{
- pcontext->HasThemeRgn = FALSE;
+ pwndData->HasThemeRgn = FALSE;
user32ApiHook.SetWindowRgn(hWnd, 0, TRUE);
}
return 0;
}
- pcontext->DirtyThemeRegion = FALSE;
- pcontext->HasThemeRgn = TRUE;
- pcontext->UpdatingRgn = TRUE;
+ pwndData->DirtyThemeRegion = FALSE;
+ pwndData->HasThemeRgn = TRUE;
+ pwndData->UpdatingRgn = TRUE;
SetThemeRegion(hWnd);
- pcontext->UpdatingRgn = FALSE;
+ pwndData->UpdatingRgn = FALSE;
return 0;
}
{
case WM_THEMECHANGED:
{
- PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd);
+ PWND_DATA pwndData = ThemeGetWndData(hWnd);
if (GetAncestor(hWnd, GA_PARENT) == GetDesktopWindow())
UXTHEME_LoadTheme(TRUE);
- if (pcontext == NULL)
+ if (pwndData == NULL)
return 0;
- if (pcontext->hTabBackgroundBrush != NULL)
+ if (pwndData->hTabBackgroundBrush != NULL)
{
- DeleteObject(pcontext->hTabBackgroundBrush);
- pcontext->hTabBackgroundBrush = NULL;
+ DeleteObject(pwndData->hTabBackgroundBrush);
+ pwndData->hTabBackgroundBrush = NULL;
}
- if (pcontext->hTabBackgroundBmp != NULL)
+ if (pwndData->hTabBackgroundBmp != NULL)
{
- DeleteObject(pcontext->hTabBackgroundBmp);
- pcontext->hTabBackgroundBmp = NULL;
+ DeleteObject(pwndData->hTabBackgroundBmp);
+ pwndData->hTabBackgroundBmp = NULL;
}
}
case WM_NCCREATE:
{
- PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd);
- if (pcontext == NULL)
+ PWND_DATA pwndData = ThemeGetWndData(hWnd);
+ if (pwndData == NULL)
return 0;
- pcontext->DirtyThemeRegion = TRUE;
+ pwndData->DirtyThemeRegion = TRUE;
}
}
}
case WM_NCDESTROY:
{
- ThemeDestroyWndContext(hWnd);
+ ThemeDestroyWndData(hWnd);
return 0;
}
}
HRESULT GetDiaogTextureBrush(HTHEME theme, HWND hwnd, HDC hdc, HBRUSH* result, BOOL changeOrigin)
{
- PWND_CONTEXT pcontext;
+ PWND_DATA pwndData;
- pcontext = ThemeGetWndContext(hwnd);
- if (pcontext == NULL)
+ pwndData = ThemeGetWndData(hwnd);
+ if (pwndData == NULL)
return E_FAIL;
- if (pcontext->hTabBackgroundBrush == NULL)
+ if (pwndData->hTabBackgroundBrush == NULL)
{
HBITMAP hbmp;
RECT dummy, bmpRect;
DeleteDC(hdcHackPattern);
/* Keep the handle of the bitmap we created so that it can be used later */
- pcontext->hTabBackgroundBmp = hbmpHack;
+ pwndData->hTabBackgroundBmp = hbmpHack;
hbmp = hbmpHack;
}
/* hbmp is cached so there is no need to free it */
- pcontext->hTabBackgroundBrush = CreatePatternBrush(hbmp);
+ pwndData->hTabBackgroundBrush = CreatePatternBrush(hbmp);
}
- if (!pcontext->hTabBackgroundBrush)
+ if (!pwndData->hTabBackgroundBrush)
return E_FAIL;
- *result = pcontext->hTabBackgroundBrush;
+ *result = pwndData->hTabBackgroundBrush;
return S_OK;
}
int WINAPI ThemeSetWindowRgn(HWND hWnd, HRGN hRgn, BOOL bRedraw)
{
- PWND_CONTEXT pcontext = ThemeGetWndContext(hWnd);
- if(pcontext)
+ PWND_DATA pwndData = ThemeGetWndData(hWnd);
+ if(pwndData)
{
- pcontext->HasAppDefinedRgn = TRUE;
- pcontext->HasThemeRgn = FALSE;
+ pwndData->HasAppDefinedRgn = TRUE;
+ pwndData->HasThemeRgn = FALSE;
}
return user32ApiHook.SetWindowRgn(hWnd, hRgn, bRedraw);
BOOL WINAPI ThemeGetScrollInfo(HWND hwnd, int fnBar, LPSCROLLINFO lpsi)
{
- PWND_CONTEXT pwndContext;
+ PWND_DATA pwndData;
DWORD style;
BOOL ret;
if((style & (WS_HSCROLL|WS_VSCROLL))==0)
goto dodefault;
- pwndContext = ThemeGetWndContext(hwnd);
- if (pwndContext == NULL)
+ pwndData = ThemeGetWndData(hwnd);
+ if (pwndData == NULL)
goto dodefault;
/*
ret = user32ApiHook.GetScrollInfo(hwnd, fnBar, lpsi);
if ( lpsi &&
(lpsi->fMask & SIF_TRACKPOS) &&
- pwndContext->SCROLL_TrackingWin == hwnd &&
- pwndContext->SCROLL_TrackingBar == fnBar)
+ pwndData->SCROLL_TrackingWin == hwnd &&
+ pwndData->SCROLL_TrackingBar == fnBar)
{
- lpsi->nTrackPos = pwndContext->SCROLL_TrackingVal;
+ lpsi->nTrackPos = pwndData->SCROLL_TrackingVal;
}
return ret;
};
/* The window context stores data for the window needed through the life of the window */
-typedef struct _WND_CONTEXT
+typedef struct _WND_DATA
{
UINT lastHitTest;
BOOL HasAppDefinedRgn;
INT SCROLL_TrackingBar;
INT SCROLL_TrackingPos;
INT SCROLL_TrackingVal;
-} WND_CONTEXT, *PWND_CONTEXT;
+} WND_DATA, *PWND_DATA;
/* The draw context stores data that are needed by the drawing operations in the non client area of the window */
typedef struct _DRAW_CONTEXT
VOID NC_TrackScrollBar(HWND Wnd, WPARAM wParam, POINT Pt);
void ThemeInitDrawContext(PDRAW_CONTEXT pcontext, HWND hWnd, HRGN hRgn);
void ThemeCleanupDrawContext(PDRAW_CONTEXT pcontext);
-PWND_CONTEXT ThemeGetWndContext(HWND hWnd);
+PWND_DATA ThemeGetWndData(HWND hWnd);
extern HINSTANCE hDllInst;
extern ATOM atWindowTheme;