user: Replace WINPROC_GetProcType by WINPROC_IsUnicode.

This commit is contained in:
Alexandre Julliard 2006-05-10 13:27:21 +02:00
parent a9e5e94b0d
commit 4cc498f880
4 changed files with 10 additions and 10 deletions

View file

@ -187,7 +187,7 @@ static void CLASS_SetProc16( CLASS *classPtr, WNDPROC16 newproc )
{
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 *classPtr, WNDPROC newproc, BOOL unicode )
{
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, WINDOWPROCTYPE type )
}
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;
}

View file

@ -1993,7 +1993,7 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval, BOOL
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))
{

View file

@ -568,16 +568,16 @@ WNDPROC WINPROC_AllocProc( WNDPROC func, BOOL unicode )
/**********************************************************************
* 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);
}

View file

@ -56,7 +56,7 @@ extern WNDPROC16 WINPROC_GetProc16( WNDPROC proc );
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 );