Module: wine Branch: master Commit: 1e43d19753c95bf50a58082700ea18f5632742cc URL: http://source.winehq.org/git/wine.git/?a=commit;h=1e43d19753c95bf50a58082700...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Dec 17 12:59:40 2009 +0100
user32: Pre-allocate the window procedure for the scrollbar class.
---
dlls/user32/controls.h | 1 + dlls/user32/scroll.c | 24 ++---------------------- dlls/user32/winproc.c | 21 +++++++++++++++++---- 3 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h index d5760d6..274e59f 100644 --- a/dlls/user32/controls.h +++ b/dlls/user32/controls.h @@ -37,6 +37,7 @@ enum builtin_winprocs WINPROC_COMBO, WINPROC_EDIT, WINPROC_LISTBOX, + WINPROC_SCROLLBAR, NB_BUILTIN_WINPROCS };
diff --git a/dlls/user32/scroll.c b/dlls/user32/scroll.c index b948c82..13b5eaf 100644 --- a/dlls/user32/scroll.c +++ b/dlls/user32/scroll.c @@ -114,8 +114,6 @@ static void SCROLL_DrawInterior_9x( HWND hwnd, HDC hdc, INT nBar, INT thumbSize, INT thumbPos, UINT flags, BOOL vertical, BOOL top_selected, BOOL bottom_selected ); -static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ); -static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
/********************************************************************* @@ -126,8 +124,8 @@ const struct builtin_class_descr SCROLL_builtin_class = { scrollbarW, /* name */ CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW | CS_PARENTDC, /* style */ - ScrollBarWndProcA, /* procA */ - ScrollBarWndProcW, /* procW */ + NULL, /* procA */ + BUILTIN_WINPROC(WINPROC_SCROLLBAR), /* procW */ sizeof(SCROLLBAR_INFO), /* extra */ IDC_ARROW, /* cursor */ 0 /* brush */ @@ -1574,24 +1572,6 @@ LRESULT ScrollBarWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM }
-/*********************************************************************** - * ScrollBarWndProcA - */ -static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) -{ - return wow_handlers.scrollbar_proc( hwnd, message, wParam, lParam, FALSE ); -} - - -/*********************************************************************** - * ScrollBarWndProcW - */ -static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) -{ - return wow_handlers.scrollbar_proc( hwnd, message, wParam, lParam, TRUE ); -} - - /************************************************************************* * SetScrollInfo (USER32.@) * diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c index 96c4749..c9ed557 100644 --- a/dlls/user32/winproc.c +++ b/dlls/user32/winproc.c @@ -57,13 +57,16 @@ LRESULT WINAPI EditWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) static LRESULT WINAPI EditWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ); +static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static WINDOWPROC winproc_array[MAX_WINPROCS] = { - { ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */ - { ComboWndProcA, ComboWndProcW }, /* WINPROC_COMBO */ - { EditWndProcA, EditWndProcW }, /* WINPROC_EDIT */ - { ListBoxWndProcA, ListBoxWndProcW },/* WINPROC_LISTBOX */ + { ButtonWndProcA, ButtonWndProcW }, /* WINPROC_BUTTON */ + { ComboWndProcA, ComboWndProcW }, /* WINPROC_COMBO */ + { EditWndProcA, EditWndProcW }, /* WINPROC_EDIT */ + { ListBoxWndProcA, ListBoxWndProcW }, /* WINPROC_LISTBOX */ + { ScrollBarWndProcA, ScrollBarWndProcW }, /* WINPROC_SCROLLBAR */ };
static UINT builtin_used = NB_BUILTIN_WINPROCS; @@ -1089,6 +1092,16 @@ static LRESULT WINAPI ListBoxWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARA return wow_handlers.listbox_proc( hwnd, msg, wParam, lParam, TRUE ); }
+static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + return wow_handlers.scrollbar_proc( hwnd, msg, wParam, lParam, FALSE ); +} + +static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + return wow_handlers.scrollbar_proc( hwnd, msg, wParam, lParam, TRUE ); +} +
/********************************************************************** * UserRegisterWowHandlers (USER32.@)