Alexandre Julliard : user32: Pre-allocate the window procedure for the edit class.
Alexandre Julliard
julliard at winehq.org
Thu Dec 17 10:37:10 CST 2009
Module: wine
Branch: master
Commit: 6400dabf40ab2015141732c38fab9558fa6836bc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6400dabf40ab2015141732c38fab9558fa6836bc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 17 12:57:40 2009 +0100
user32: Pre-allocate the window procedure for the edit class.
---
dlls/user32/controls.h | 1 +
dlls/user32/edit.c | 22 ++--------------------
dlls/user32/winproc.c | 13 +++++++++++++
3 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/dlls/user32/controls.h b/dlls/user32/controls.h
index 76c714c..37b9bc5 100644
--- a/dlls/user32/controls.h
+++ b/dlls/user32/controls.h
@@ -35,6 +35,7 @@ enum builtin_winprocs
{
WINPROC_BUTTON = 0,
WINPROC_COMBO,
+ WINPROC_EDIT,
NB_BUILTIN_WINPROCS
};
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index a2ce5f1..3466002 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -4971,24 +4971,6 @@ LRESULT EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, B
/*********************************************************************
- *
- * EditWndProc (USER32.@)
- */
-LRESULT WINAPI EditWndProcA(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- return wow_handlers.edit_proc(hWnd, uMsg, wParam, lParam, FALSE);
-}
-
-/*********************************************************************
- *
- * EditWndProcW
- */
-static LRESULT WINAPI EditWndProcW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- return wow_handlers.edit_proc(hWnd, uMsg, wParam, lParam, TRUE);
-}
-
-/*********************************************************************
* edit class descriptor
*/
static const WCHAR editW[] = {'E','d','i','t',0};
@@ -4996,8 +4978,8 @@ const struct builtin_class_descr EDIT_builtin_class =
{
editW, /* name */
CS_DBLCLKS | CS_PARENTDC, /* style */
- EditWndProcA, /* procA */
- EditWndProcW, /* procW */
+ NULL, /* procA */
+ BUILTIN_WINPROC(WINPROC_EDIT), /* procW */
#ifdef __i386__
sizeof(EDITSTATE *) + sizeof(HLOCAL16), /* extra */
#else
diff --git a/dlls/user32/winproc.c b/dlls/user32/winproc.c
index 32b94b4..a21b4f0 100644
--- a/dlls/user32/winproc.c
+++ b/dlls/user32/winproc.c
@@ -55,11 +55,14 @@ static LRESULT WINAPI ButtonWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM
static LRESULT WINAPI ButtonWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static LRESULT WINAPI ComboWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
+LRESULT WINAPI EditWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
+static LRESULT WINAPI EditWndProcW( 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 */
};
static UINT builtin_used = NB_BUILTIN_WINPROCS;
@@ -1065,6 +1068,16 @@ static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPA
return wow_handlers.combo_proc( hwnd, message, wParam, lParam, TRUE );
}
+LRESULT WINAPI EditWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
+{
+ return wow_handlers.edit_proc( hwnd, msg, wParam, lParam, FALSE );
+}
+
+static LRESULT WINAPI EditWndProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
+{
+ return wow_handlers.edit_proc( hwnd, msg, wParam, lParam, TRUE );
+}
+
/**********************************************************************
* UserRegisterWowHandlers (USER32.@)
More information about the wine-cvs
mailing list