user: Replace WINPROC_GetProcType by WINPROC_IsUnicode.
This commit is contained in:
parent
a9e5e94b0d
commit
4cc498f880
|
@ -187,7 +187,7 @@ static void CLASS_SetProc16( CLASS *classPtr, WNDPROC16 newproc )
|
||||||
{
|
{
|
||||||
WNDPROC proc = WINPROC_AllocProc16( newproc );
|
WNDPROC proc = WINPROC_AllocProc16( newproc );
|
||||||
|
|
||||||
if (WINPROC_GetProcType( proc ) == WIN_PROC_32W)
|
if (WINPROC_IsUnicode( proc, FALSE ))
|
||||||
{
|
{
|
||||||
classPtr->winprocA = 0;
|
classPtr->winprocA = 0;
|
||||||
classPtr->winprocW = proc;
|
classPtr->winprocW = proc;
|
||||||
|
@ -210,7 +210,7 @@ static void CLASS_SetProc( CLASS *classPtr, WNDPROC newproc, BOOL unicode )
|
||||||
{
|
{
|
||||||
WNDPROC proc = WINPROC_AllocProc( newproc, unicode );
|
WNDPROC proc = WINPROC_AllocProc( newproc, unicode );
|
||||||
|
|
||||||
if (WINPROC_GetProcType( proc ) == WIN_PROC_32W)
|
if (WINPROC_IsUnicode( proc, unicode ))
|
||||||
{
|
{
|
||||||
classPtr->winprocA = 0;
|
classPtr->winprocA = 0;
|
||||||
classPtr->winprocW = proc;
|
classPtr->winprocW = proc;
|
||||||
|
@ -532,7 +532,7 @@ void CLASS_AddWindow( CLASS *class, WND *win, WINDOWPROCTYPE type )
|
||||||
}
|
}
|
||||||
win->class = class;
|
win->class = class;
|
||||||
win->clsStyle = class->style;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1993,7 +1993,7 @@ static LONG_PTR WIN_SetWindowLong( HWND hwnd, INT offset, LONG_PTR newval, BOOL
|
||||||
UINT old_flags = wndPtr->flags;
|
UINT old_flags = wndPtr->flags;
|
||||||
retval = (ULONG_PTR)WINPROC_GetProc( wndPtr->winproc, unicode );
|
retval = (ULONG_PTR)WINPROC_GetProc( wndPtr->winproc, unicode );
|
||||||
wndPtr->winproc = WINPROC_AllocProc( (WNDPROC)newval, 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;
|
else wndPtr->flags &= ~WIN_ISUNICODE;
|
||||||
if (!((old_flags ^ wndPtr->flags) & WIN_ISUNICODE))
|
if (!((old_flags ^ wndPtr->flags) & WIN_ISUNICODE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 );
|
WINDOWPROC *ptr = handle_to_proc( proc );
|
||||||
|
|
||||||
if (!ptr) return WIN_PROC_INVALID;
|
if (!ptr) return def_val;
|
||||||
return ptr->type;
|
return (ptr->type == WIN_PROC_32W);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ extern WNDPROC16 WINPROC_GetProc16( WNDPROC proc );
|
||||||
extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func );
|
extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func );
|
||||||
extern WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode );
|
extern WNDPROC WINPROC_GetProc( WNDPROC proc, BOOL unicode );
|
||||||
extern WNDPROC WINPROC_AllocProc( WNDPROC func, 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,
|
extern INT WINPROC_MapMsg32ATo32W( HWND hwnd, UINT msg, WPARAM *pwparam,
|
||||||
LPARAM *plparam );
|
LPARAM *plparam );
|
||||||
|
|
Loading…
Reference in New Issue