From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/scroll.c | 30 +++++++++++------------------- dlls/user32/user_main.c | 2 +- dlls/user32/user_private.h | 4 ++-- dlls/uxtheme/scrollbar.c | 6 +++--- dlls/uxtheme/uxthemedll.h | 4 ++-- include/winuser.h | 4 ++-- 6 files changed, 21 insertions(+), 29 deletions(-)
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index bf0a7d3350a..e368a2feb70 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -125,7 +125,7 @@ SCROLLBAR_INFO *SCROLL_GetInternalInfo( HWND hwnd, INT nBar, BOOL alloc ) * * Draw the scroll bar arrows. */ -static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr, +static void SCROLL_DrawArrows( HDC hdc, UINT flags, RECT *rect, INT arrowSize, BOOL vertical, BOOL top_pressed, BOOL bottom_pressed ) { @@ -140,7 +140,7 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr, DrawFrameControl( hdc, &r, DFC_SCROLL, (vertical ? DFCS_SCROLLUP : DFCS_SCROLLLEFT) | (top_pressed ? (DFCS_PUSHED | DFCS_FLAT) : 0 ) - | (infoPtr->flags&ESB_DISABLE_LTUP ? DFCS_INACTIVE : 0 ) ); + | (flags & ESB_DISABLE_LTUP ? DFCS_INACTIVE : 0 ) );
r = *rect; if( vertical ) @@ -151,7 +151,7 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr, DrawFrameControl( hdc, &r, DFC_SCROLL, (vertical ? DFCS_SCROLLDOWN : DFCS_SCROLLRIGHT) | (bottom_pressed ? (DFCS_PUSHED | DFCS_FLAT) : 0 ) - | (infoPtr->flags&ESB_DISABLE_RTDN ? DFCS_INACTIVE : 0) ); + | (flags & ESB_DISABLE_RTDN ? DFCS_INACTIVE : 0) ); }
/*********************************************************************** @@ -161,8 +161,7 @@ static void SCROLL_DrawArrows( HDC hdc, SCROLLBAR_INFO *infoPtr, */ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar, RECT *rect, INT arrowSize, - INT thumbSize, INT thumbPos, - UINT flags, BOOL vertical, + INT thumbSize, INT thumbPos, BOOL vertical, BOOL top_selected, BOOL bottom_selected ) { RECT r; @@ -247,11 +246,9 @@ static void SCROLL_DrawInterior( HWND hwnd, HDC hdc, INT nBar,
void WINAPI USER_ScrollBarDraw( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTEST hit_test, const struct SCROLL_TRACKING_INFO *tracking_info, BOOL arrows, - BOOL interior, RECT *rect, INT arrowSize, INT thumbPos, - INT thumbSize, BOOL vertical ) + BOOL interior, RECT *rect, UINT enable_flags, INT arrowSize, + INT thumbPos, INT thumbSize, BOOL vertical ) { - SCROLLBAR_INFO *infoPtr; - if (nBar == SB_CTL) { DWORD style = GetWindowLongW( hwnd, GWL_STYLE ); @@ -274,34 +271,29 @@ void WINAPI USER_ScrollBarDraw( HWND hwnd, HDC hdc, INT nBar, enum SCROLL_HITTES } }
- if (!(infoPtr = SCROLL_GetInternalInfo( hwnd, nBar, TRUE ))) - return; - - /* Draw the arrows */ - + /* Draw the arrows */ if (arrows && arrowSize) { if (vertical == tracking_info->vertical && GetCapture() == hwnd) - SCROLL_DrawArrows( hdc, infoPtr, rect, arrowSize, vertical, + SCROLL_DrawArrows( hdc, enable_flags, rect, arrowSize, vertical, hit_test == tracking_info->hit_test && hit_test == SCROLL_TOP_ARROW, hit_test == tracking_info->hit_test && hit_test == SCROLL_BOTTOM_ARROW ); else - SCROLL_DrawArrows( hdc, infoPtr, rect, arrowSize, vertical, FALSE, FALSE ); + SCROLL_DrawArrows( hdc, enable_flags, rect, arrowSize, vertical, FALSE, FALSE ); }
if (interior) { if (vertical == tracking_info->vertical && GetCapture() == hwnd) { - SCROLL_DrawInterior( hwnd, hdc, nBar, rect, arrowSize, thumbSize, thumbPos, - infoPtr->flags, vertical, + SCROLL_DrawInterior( hwnd, hdc, nBar, rect, arrowSize, thumbSize, thumbPos, vertical, hit_test == tracking_info->hit_test && hit_test == SCROLL_TOP_RECT, hit_test == tracking_info->hit_test && hit_test == SCROLL_BOTTOM_RECT ); } else { SCROLL_DrawInterior( hwnd, hdc, nBar, rect, arrowSize, thumbSize, thumbPos, - infoPtr->flags, vertical, FALSE, FALSE ); + vertical, FALSE, FALSE ); } }
diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index b6c8f26cec6..fb9ce74736d 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -178,7 +178,7 @@ static NTSTATUS WINAPI User32DrawScrollBar( const struct draw_scroll_bar_params RECT rect = params->rect; user_api->pScrollBarDraw( params->hwnd, params->hdc, params->bar, params->hit_test, ¶ms->tracking_info, params->arrows, params->interior, - &rect, params->arrow_size, params->thumb_pos, + &rect, params->enable_flags, params->arrow_size, params->thumb_pos, params->thumb_size, params->vertical ); return 0; } diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index f34818ea258..3be5b84b41b 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -177,8 +177,8 @@ extern struct user_api_hook *user_api DECLSPEC_HIDDEN; LRESULT WINAPI USER_DefDlgProc(HWND, UINT, WPARAM, LPARAM, BOOL) DECLSPEC_HIDDEN; LRESULT WINAPI USER_ScrollBarProc(HWND, UINT, WPARAM, LPARAM, BOOL) DECLSPEC_HIDDEN; void WINAPI USER_ScrollBarDraw(HWND, HDC, INT, enum SCROLL_HITTEST, - const struct SCROLL_TRACKING_INFO *, BOOL, BOOL, RECT *, INT, INT, - INT, BOOL) DECLSPEC_HIDDEN; + const struct SCROLL_TRACKING_INFO *, BOOL, BOOL, RECT *, UINT, + INT, INT, INT, BOOL) DECLSPEC_HIDDEN; struct scroll_info *SCROLL_GetInternalInfo( HWND hwnd, INT nBar, BOOL alloc );
#endif /* __WINE_USER_PRIVATE_H */ diff --git a/dlls/uxtheme/scrollbar.c b/dlls/uxtheme/scrollbar.c index 719081ad5b8..4ae1b2a8724 100644 --- a/dlls/uxtheme/scrollbar.c +++ b/dlls/uxtheme/scrollbar.c @@ -34,8 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(theme_scroll);
void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTEST hit_test, const struct SCROLL_TRACKING_INFO *tracking_info, - BOOL draw_arrows, BOOL draw_interior, RECT *rect, INT arrowsize, - INT thumbpos, INT thumbsize, BOOL vertical) + BOOL draw_arrows, BOOL draw_interior, RECT *rect, UINT enable_flags, + INT arrowsize, INT thumbpos, INT thumbsize, BOOL vertical) { BOOL disabled = !IsWindowEnabled(hwnd); HTHEME theme; @@ -49,7 +49,7 @@ void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTES if (!theme) { user_api.pScrollBarDraw(hwnd, dc, bar, hit_test, tracking_info, draw_arrows, draw_interior, - rect, arrowsize, thumbpos, thumbsize, vertical); + rect, enable_flags, arrowsize, thumbpos, thumbsize, vertical); return; }
diff --git a/dlls/uxtheme/uxthemedll.h b/dlls/uxtheme/uxthemedll.h index 67130774392..85b834e20e8 100644 --- a/dlls/uxtheme/uxthemedll.h +++ b/dlls/uxtheme/uxthemedll.h @@ -109,8 +109,8 @@ extern struct user_api_hook user_api DECLSPEC_HIDDEN; LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL unicode) DECLSPEC_HIDDEN; void WINAPI UXTHEME_ScrollBarDraw(HWND hwnd, HDC dc, INT bar, enum SCROLL_HITTEST hit_test, const struct SCROLL_TRACKING_INFO *tracking_info, - BOOL draw_arrows, BOOL draw_interior, RECT *rect, INT arrowsize, - INT thumbpos, INT thumbsize, BOOL vertical) DECLSPEC_HIDDEN; + BOOL draw_arrows, BOOL draw_interior, RECT *rect, UINT enable_flags, + INT arrowsize, INT thumbpos, INT thumbsize, BOOL vertical) DECLSPEC_HIDDEN; LRESULT WINAPI UXTHEME_ScrollbarWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode) DECLSPEC_HIDDEN;
diff --git a/include/winuser.h b/include/winuser.h index 4e43d6c1170..d2262b6d70a 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -4789,8 +4789,8 @@ struct user_api_hook { LRESULT (WINAPI *pDefDlgProc)(HWND, UINT, WPARAM, LPARAM, BOOL); void (WINAPI *pScrollBarDraw)(HWND, HDC, INT, enum SCROLL_HITTEST, - const struct SCROLL_TRACKING_INFO *, BOOL, BOOL, RECT *, INT, INT, - INT, BOOL); + const struct SCROLL_TRACKING_INFO *, BOOL, BOOL, RECT *, UINT, + INT, INT, INT, BOOL); LRESULT (WINAPI *pScrollBarWndProc)(HWND, UINT, WPARAM, LPARAM, BOOL); };