Module: wine Branch: refs/heads/master Commit: 4cc498f880b2c91e4e99449c43b5add6db6a0618 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=4cc498f880b2c91e4e99449c...
Author: Alexandre Julliard julliard@winehq.org Date: Wed May 10 13:27:21 2006 +0200
user: Replace WINPROC_GetProcType by WINPROC_IsUnicode.
---
dlls/user/class.c | 6 +++--- dlls/user/win.c | 2 +- dlls/user/winproc.c | 10 +++++----- dlls/user/winproc.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/user/class.c b/dlls/user/class.c index 8c2c653..6639cab 100644 --- a/dlls/user/class.c +++ b/dlls/user/class.c @@ -187,7 +187,7 @@ static void CLASS_SetProc16( CLASS *clas { WNDPROC proc = WINPROC_AllocProc16( newproc );
- if (WINPROC_GetProcType( proc ) == WIN_PROC_32W) + if (WINPROC_IsUnicode( proc, FALSE )) { classPtr->winprocA = 0; classPtr->winprocW = proc; @@ -210,7 +210,7 @@ static void CLASS_SetProc( CLASS *classP { WNDPROC proc = WINPROC_AllocProc( newproc, unicode );
- if (WINPROC_GetProcType( proc ) == WIN_PROC_32W) + if (WINPROC_IsUnicode( proc, unicode )) { classPtr->winprocA = 0; classPtr->winprocW = proc; @@ -532,7 +532,7 @@ void CLASS_AddWindow( CLASS *class, WND } win->class = class; win->clsStyle = class->style; - if (WINPROC_GetProcType( win->winproc ) == WIN_PROC_32W) win->flags |= WIN_ISUNICODE; + if (WINPROC_IsUnicode( win->winproc, (type == WIN_PROC_32W) )) win->flags |= WIN_ISUNICODE; }
diff --git a/dlls/user/win.c b/dlls/user/win.c index 8743292..3b0716a 100644 --- a/dlls/user/win.c +++ b/dlls/user/win.c @@ -1993,7 +1993,7 @@ static LONG_PTR WIN_SetWindowLong( HWND UINT old_flags = wndPtr->flags; retval = (ULONG_PTR)WINPROC_GetProc( wndPtr->winproc, unicode ); wndPtr->winproc = WINPROC_AllocProc( (WNDPROC)newval, unicode ); - if (WINPROC_GetProcType( wndPtr->winproc ) == WIN_PROC_32W) wndPtr->flags |= WIN_ISUNICODE; + if (WINPROC_IsUnicode( wndPtr->winproc, unicode )) wndPtr->flags |= WIN_ISUNICODE; else wndPtr->flags &= ~WIN_ISUNICODE; if (!((old_flags ^ wndPtr->flags) & WIN_ISUNICODE)) { diff --git a/dlls/user/winproc.c b/dlls/user/winproc.c index 62c4dc4..56bc035 100644 --- a/dlls/user/winproc.c +++ b/dlls/user/winproc.c @@ -568,16 +568,16 @@ WNDPROC WINPROC_AllocProc( WNDPROC func,
/********************************************************************** - * WINPROC_GetProcType + * WINPROC_IsUnicode * - * Return the window procedure type. + * Return the window procedure type, or the default value if not a winproc handle. */ -WINDOWPROCTYPE WINPROC_GetProcType( WNDPROC proc ) +BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val ) { WINDOWPROC *ptr = handle_to_proc( proc );
- if (!ptr) return WIN_PROC_INVALID; - return ptr->type; + if (!ptr) return def_val; + return (ptr->type == WIN_PROC_32W); }
diff --git a/dlls/user/winproc.h b/dlls/user/winproc.h index 974b403..14240a6 100644 --- a/dlls/user/winproc.h +++ b/dlls/user/winproc.h @@ -56,7 +56,7 @@ extern WNDPROC16 WINPROC_GetProc16( WNDP extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func ); extern WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode ); extern WNDPROC WINPROC_AllocProc( WNDPROC func, BOOL unicode ); -extern WINDOWPROCTYPE WINPROC_GetProcType( WNDPROC proc ); +extern BOOL WINPROC_IsUnicode( WNDPROC proc, BOOL def_val );
extern INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam, LPARAM *plparam );