Commit 85012b91 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Remove no longer needed unicode call_hooks argument.

parent e41c255b
......@@ -883,7 +883,7 @@ static void sys_command_size_move( HWND hwnd, WPARAM wparam )
NtUserReleaseDC( parent, hdc );
if (parent) map_window_points( 0, parent, (POINT *)&sizing_rect, 2, get_thread_dpi() );
if (call_hooks( WH_CBT, HCBT_MOVESIZE, (WPARAM)hwnd, (LPARAM)&sizing_rect, TRUE ))
if (call_hooks( WH_CBT, HCBT_MOVESIZE, (WPARAM)hwnd, (LPARAM)&sizing_rect ))
moved = FALSE;
send_message( hwnd, WM_EXITSIZEMOVE, 0, 0 );
......@@ -950,7 +950,7 @@ static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam )
if (!is_window_enabled( hwnd )) return 0;
if (call_hooks( WH_CBT, HCBT_SYSCOMMAND, wparam, lparam, TRUE ))
if (call_hooks( WH_CBT, HCBT_SYSCOMMAND, wparam, lparam ))
return 0;
if (!user_driver->pSysCommand( hwnd, wparam, lparam ))
......@@ -2811,7 +2811,7 @@ LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
{
HWND parent = get_parent( hwnd );
if (!parent)
call_hooks( WH_SHELL, HSHELL_APPCOMMAND, wparam, lparam, TRUE );
call_hooks( WH_SHELL, HSHELL_APPCOMMAND, wparam, lparam );
else
send_message( parent, msg, wparam, lparam );
break;
......
......@@ -179,8 +179,8 @@ BOOL WINAPI NtUserCallMsgFilter( MSG *msg, INT code )
{
/* FIXME: We should use NtCallbackReturn instead of passing (potentially kernel) pointer
* like that, but we need to consequently use syscall thunks first for that to work. */
if (call_hooks( WH_SYSMSGFILTER, code, 0, (LPARAM)msg, TRUE )) return TRUE;
return call_hooks( WH_MSGFILTER, code, 0, (LPARAM)msg, TRUE );
if (call_hooks( WH_SYSMSGFILTER, code, 0, (LPARAM)msg )) return TRUE;
return call_hooks( WH_MSGFILTER, code, 0, (LPARAM)msg );
}
static UINT get_ll_hook_timeout(void)
......@@ -333,7 +333,7 @@ LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam )
return call_hook( &info );
}
LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode )
LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam )
{
struct user_thread_info *thread_info = get_user_thread_info();
struct win_hook_params info;
......@@ -348,7 +348,7 @@ LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode
}
memset( &info, 0, sizeof(info) - sizeof(info.module) );
info.prev_unicode = unicode;
info.prev_unicode = TRUE;
info.id = id;
SERVER_START_REQ( start_hook_chain )
......
......@@ -1611,7 +1611,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus )
/* call CBT hook chain */
cbt.fMouse = mouse;
cbt.hWndActive = previous;
if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt, TRUE )) return FALSE;
if (call_hooks( WH_CBT, HCBT_ACTIVATE, (WPARAM)hwnd, (LPARAM)&cbt )) return FALSE;
if (is_window( previous ))
{
......@@ -1763,7 +1763,7 @@ HWND WINAPI NtUserSetFocus( HWND hwnd )
}
/* call hooks */
if (call_hooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)hwnd, (LPARAM)previous, TRUE )) return 0;
if (call_hooks( WH_CBT, HCBT_SETFOCUS, (WPARAM)hwnd, (LPARAM)previous )) return 0;
/* activate hwndTop if needed. */
if (hwndTop != get_active_window())
......@@ -1778,7 +1778,7 @@ HWND WINAPI NtUserSetFocus( HWND hwnd )
else /* NULL hwnd passed in */
{
if (!previous) return 0; /* nothing to do */
if (call_hooks( WH_CBT, HCBT_SETFOCUS, 0, (LPARAM)previous, TRUE )) return 0;
if (call_hooks( WH_CBT, HCBT_SETFOCUS, 0, (LPARAM)previous )) return 0;
}
/* change focus and send messages */
......
......@@ -1364,7 +1364,7 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
cwp.wParam = wparam;
cwp.message = msg;
cwp.hwnd = params->hwnd;
call_hooks( WH_CALLWNDPROC, HC_ACTION, same_thread, (LPARAM)&cwp, unicode );
call_hooks( WH_CALLWNDPROC, HC_ACTION, same_thread, (LPARAM)&cwp );
dispatch_win_proc_params( params, sizeof(*params) + size );
if (params != &p) free( params );
......@@ -1375,7 +1375,7 @@ static LRESULT call_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
cwpret.wParam = wparam;
cwpret.message = msg;
cwpret.hwnd = params->hwnd;
call_hooks( WH_CALLWNDPROCRET, HC_ACTION, same_thread, (LPARAM)&cwpret, unicode );
call_hooks( WH_CALLWNDPROCRET, HC_ACTION, same_thread, (LPARAM)&cwpret );
return result;
}
......@@ -1482,7 +1482,7 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
event.paramL = (msg->wParam & 0xFF) | (HIWORD(msg->lParam) << 8);
event.paramH = msg->lParam & 0x7FFF;
if (HIWORD(msg->lParam) & 0x0100) event.paramH |= 0x8000; /* special_key - bit */
call_hooks( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)&event, TRUE );
call_hooks( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)&event );
/* check message filters */
if (msg->message < first || msg->message > last) return FALSE;
......@@ -1515,10 +1515,10 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
}
if (call_hooks( WH_KEYBOARD, remove ? HC_ACTION : HC_NOREMOVE,
LOWORD(msg->wParam), msg->lParam, TRUE ))
LOWORD(msg->wParam), msg->lParam ))
{
/* skip this message */
call_hooks( WH_CBT, HCBT_KEYSKIPPED, LOWORD(msg->wParam), msg->lParam, TRUE );
call_hooks( WH_CBT, HCBT_KEYSKIPPED, LOWORD(msg->wParam), msg->lParam );
accept_hardware_message( hw_id );
return FALSE;
}
......@@ -1590,7 +1590,7 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
event.hwnd = msg->hwnd;
event.paramL = msg->pt.x;
event.paramH = msg->pt.y;
call_hooks( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)&event, TRUE );
call_hooks( WH_JOURNALRECORD, HC_ACTION, 0, (LPARAM)&event );
if (!check_hwnd_filter( msg, hwnd_filter )) return FALSE;
......@@ -1664,14 +1664,14 @@ static BOOL process_mouse_message( MSG *msg, UINT hw_id, ULONG_PTR extra_info, H
hook.wHitTestCode = hittest;
hook.dwExtraInfo = extra_info;
hook.mouseData = msg->wParam;
if (call_hooks( WH_MOUSE, remove ? HC_ACTION : HC_NOREMOVE, message, (LPARAM)&hook, TRUE ))
if (call_hooks( WH_MOUSE, remove ? HC_ACTION : HC_NOREMOVE, message, (LPARAM)&hook ))
{
hook.pt = msg->pt;
hook.hwnd = msg->hwnd;
hook.wHitTestCode = hittest;
hook.dwExtraInfo = extra_info;
hook.mouseData = msg->wParam;
call_hooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook, TRUE );
call_hooks( WH_CBT, HCBT_CLICKSKIPPED, message, (LPARAM)&hook );
accept_hardware_message( hw_id );
return FALSE;
}
......@@ -1922,7 +1922,7 @@ static int peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags,
hook.dwExtraInfo = msg_data->hardware.info;
TRACE( "calling keyboard LL hook vk %x scan %x flags %x time %u info %lx\n",
hook.vkCode, hook.scanCode, hook.flags, hook.time, hook.dwExtraInfo );
result = call_hooks( WH_KEYBOARD_LL, HC_ACTION, info.msg.wParam, (LPARAM)&hook, TRUE );
result = call_hooks( WH_KEYBOARD_LL, HC_ACTION, info.msg.wParam, (LPARAM)&hook );
}
else if (info.msg.message == WH_MOUSE_LL && size >= sizeof(msg_data->hardware))
{
......@@ -1935,7 +1935,7 @@ static int peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags,
hook.dwExtraInfo = msg_data->hardware.info;
TRACE( "calling mouse LL hook pos %d,%d data %x flags %x time %u info %lx\n",
hook.pt.x, hook.pt.y, hook.mouseData, hook.flags, hook.time, hook.dwExtraInfo );
result = call_hooks( WH_MOUSE_LL, HC_ACTION, info.msg.wParam, (LPARAM)&hook, TRUE );
result = call_hooks( WH_MOUSE_LL, HC_ACTION, info.msg.wParam, (LPARAM)&hook );
}
reply_message( &info, result, &info.msg );
continue;
......@@ -1965,7 +1965,7 @@ static int peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags,
thread_info->client_info.message_time = info.msg.time;
thread_info->client_info.message_extra = msg_data->hardware.info;
free( buffer );
call_hooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg, TRUE );
call_hooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg );
return 1;
}
continue;
......@@ -2018,7 +2018,7 @@ static int peek_message( MSG *msg, HWND hwnd, UINT first, UINT last, UINT flags,
thread_info->client_info.message_extra = 0;
thread_info->client_info.msg_source = msg_source_unavailable;
free( buffer );
call_hooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg, TRUE );
call_hooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)msg );
return 1;
}
......
......@@ -251,7 +251,7 @@ extern LRESULT handle_nc_hit_test( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
/* hook.c */
extern LRESULT call_current_hook( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
extern LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN;
extern LRESULT call_hooks( INT id, INT code, WPARAM wparam, LPARAM lparam ) DECLSPEC_HIDDEN;
extern BOOL is_hooked( INT id ) DECLSPEC_HIDDEN;
extern BOOL unhook_windows_hook( INT id, HOOKPROC proc ) DECLSPEC_HIDDEN;
......
......@@ -4040,7 +4040,7 @@ static UINT window_min_maximize( HWND hwnd, UINT cmd, RECT *rect )
wpl.length = sizeof(wpl);
NtUserGetWindowPlacement( hwnd, &wpl );
if (call_hooks( WH_CBT, HCBT_MINMAX, (WPARAM)hwnd, cmd, TRUE ))
if (call_hooks( WH_CBT, HCBT_MINMAX, (WPARAM)hwnd, cmd ))
return SWP_NOSIZE | SWP_NOMOVE;
if (is_iconic( hwnd ))
......@@ -4752,7 +4752,7 @@ BOOL WINAPI NtUserDestroyWindow( HWND hwnd )
TRACE( "(%p)\n", hwnd );
if (call_hooks( WH_CBT, HCBT_DESTROYWND, (WPARAM)hwnd, 0, TRUE )) return FALSE;
if (call_hooks( WH_CBT, HCBT_DESTROYWND, (WPARAM)hwnd, 0 )) return FALSE;
if (is_menu_active() == hwnd) NtUserEndMenu();
......@@ -4765,7 +4765,7 @@ BOOL WINAPI NtUserDestroyWindow( HWND hwnd )
}
else if (!get_window_relative( hwnd, GW_OWNER ))
{
call_hooks( WH_SHELL, HSHELL_WINDOWDESTROYED, (WPARAM)hwnd, 0L, TRUE );
call_hooks( WH_SHELL, HSHELL_WINDOWDESTROYED, (WPARAM)hwnd, 0 );
/* FIXME: clean up palette - see "Internals" p.352 */
}
......@@ -5154,7 +5154,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
release_win_ptr( win );
cbtc.hwndInsertAfter = HWND_TOP;
cbtc.lpcs = &cs;
if (call_hooks( WH_CBT, HCBT_CREATEWND, (WPARAM)hwnd, (LPARAM)&cbtc, TRUE ))
if (call_hooks( WH_CBT, HCBT_CREATEWND, (WPARAM)hwnd, (LPARAM)&cbtc ))
{
free_window_handle( hwnd );
return 0;
......@@ -5334,7 +5334,7 @@ HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
/* Call WH_SHELL hook */
if (!(get_window_long( hwnd, GWL_STYLE ) & WS_CHILD) && !get_window_relative( hwnd, GW_OWNER ))
call_hooks( WH_SHELL, HSHELL_WINDOWCREATED, (WPARAM)hwnd, 0, TRUE );
call_hooks( WH_SHELL, HSHELL_WINDOWCREATED, (WPARAM)hwnd, 0 );
TRACE( "created window %p\n", hwnd );
SetThreadDpiAwarenessContext( context );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment