Commit a53330b9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for message functions.

parent 0d6d8f38
...@@ -1197,9 +1197,6 @@ static struct unix_funcs unix_funcs = ...@@ -1197,9 +1197,6 @@ static struct unix_funcs unix_funcs =
NtUserMapVirtualKeyEx, NtUserMapVirtualKeyEx,
NtUserMoveWindow, NtUserMoveWindow,
NtUserOpenClipboard, NtUserOpenClipboard,
NtUserPeekMessage,
NtUserPostMessage,
NtUserPostThreadMessage,
NtUserRedrawWindow, NtUserRedrawWindow,
NtUserRegisterClassExWOW, NtUserRegisterClassExWOW,
NtUserRegisterHotKey, NtUserRegisterHotKey,
...@@ -1242,12 +1239,10 @@ static struct unix_funcs unix_funcs = ...@@ -1242,12 +1239,10 @@ static struct unix_funcs unix_funcs =
NtUserToUnicodeEx, NtUserToUnicodeEx,
NtUserTrackMouseEvent, NtUserTrackMouseEvent,
NtUserTranslateAccelerator, NtUserTranslateAccelerator,
NtUserTranslateMessage,
NtUserUnregisterClass, NtUserUnregisterClass,
NtUserUnregisterHotKey, NtUserUnregisterHotKey,
NtUserUpdateLayeredWindow, NtUserUpdateLayeredWindow,
NtUserVkKeyScanEx, NtUserVkKeyScanEx,
NtUserWaitForInputIdle,
NtUserWindowFromPoint, NtUserWindowFromPoint,
SetDIBits, SetDIBits,
......
...@@ -170,6 +170,9 @@ static void * const syscalls[] = ...@@ -170,6 +170,9 @@ static void * const syscalls[] =
NtUserOpenDesktop, NtUserOpenDesktop,
NtUserOpenInputDesktop, NtUserOpenInputDesktop,
NtUserOpenWindowStation, NtUserOpenWindowStation,
NtUserPeekMessage,
NtUserPostMessage,
NtUserPostThreadMessage,
NtUserQueryInputContext, NtUserQueryInputContext,
NtUserRegisterRawInputDevices, NtUserRegisterRawInputDevices,
NtUserRemoveClipboardFormatListener, NtUserRemoveClipboardFormatListener,
...@@ -190,9 +193,11 @@ static void * const syscalls[] = ...@@ -190,9 +193,11 @@ static void * const syscalls[] =
NtUserThunkedMenuInfo, NtUserThunkedMenuInfo,
NtUserThunkedMenuItemInfo, NtUserThunkedMenuItemInfo,
NtUserTrackPopupMenuEx, NtUserTrackPopupMenuEx,
NtUserTranslateMessage,
NtUserUnhookWinEvent, NtUserUnhookWinEvent,
NtUserUnhookWindowsHookEx, NtUserUnhookWindowsHookEx,
NtUserUpdateInputContext, NtUserUpdateInputContext,
NtUserWaitForInputIdle,
NtUserWindowFromDC, NtUserWindowFromDC,
}; };
......
...@@ -1098,13 +1098,13 @@ ...@@ -1098,13 +1098,13 @@
@ stub NtUserPaintDesktop @ stub NtUserPaintDesktop
@ stub NtUserPaintMenuBar @ stub NtUserPaintMenuBar
@ stub NtUserPaintMonitor @ stub NtUserPaintMonitor
@ stdcall NtUserPeekMessage(ptr long long long long) @ stdcall -syscall NtUserPeekMessage(ptr long long long long)
@ stub NtUserPerMonitorDPIPhysicalToLogicalPoint @ stub NtUserPerMonitorDPIPhysicalToLogicalPoint
@ stub NtUserPhysicalToLogicalDpiPointForWindow @ stub NtUserPhysicalToLogicalDpiPointForWindow
@ stub NtUserPhysicalToLogicalPoint @ stub NtUserPhysicalToLogicalPoint
@ stub NtUserPostKeyboardInputMessage @ stub NtUserPostKeyboardInputMessage
@ stdcall NtUserPostMessage(long long long long) @ stdcall -syscall NtUserPostMessage(long long long long)
@ stdcall NtUserPostThreadMessage(long long long long) @ stdcall -syscall NtUserPostThreadMessage(long long long long)
@ stub NtUserPrintWindow @ stub NtUserPrintWindow
@ stub NtUserProcessConnect @ stub NtUserProcessConnect
@ stub NtUserProcessInkFeedbackCommand @ stub NtUserProcessInkFeedbackCommand
...@@ -1282,7 +1282,7 @@ ...@@ -1282,7 +1282,7 @@
@ stub NtUserTransformPoint @ stub NtUserTransformPoint
@ stub NtUserTransformRect @ stub NtUserTransformRect
@ stdcall NtUserTranslateAccelerator(long long ptr) @ stdcall NtUserTranslateAccelerator(long long ptr)
@ stdcall NtUserTranslateMessage(ptr long) @ stdcall -syscall NtUserTranslateMessage(ptr long)
@ stub NtUserUndelegateInput @ stub NtUserUndelegateInput
@ stdcall -syscall NtUserUnhookWinEvent(long) @ stdcall -syscall NtUserUnhookWinEvent(long)
@ stdcall -syscall NtUserUnhookWindowsHookEx(long) @ stdcall -syscall NtUserUnhookWindowsHookEx(long)
...@@ -1305,7 +1305,7 @@ ...@@ -1305,7 +1305,7 @@
@ stdcall NtUserVkKeyScanEx(long long) @ stdcall NtUserVkKeyScanEx(long long)
@ stub NtUserWOWCleanup @ stub NtUserWOWCleanup
@ stub NtUserWaitAvailableMessageEx @ stub NtUserWaitAvailableMessageEx
@ stdcall NtUserWaitForInputIdle(long long long) @ stdcall -syscall NtUserWaitForInputIdle(long long long)
@ stub NtUserWaitForMsgAndEvent @ stub NtUserWaitForMsgAndEvent
@ stub NtUserWaitForRedirectionStartComplete @ stub NtUserWaitForRedirectionStartComplete
@ stub NtUserWaitMessage @ stub NtUserWaitMessage
......
...@@ -261,9 +261,6 @@ struct unix_funcs ...@@ -261,9 +261,6 @@ struct unix_funcs
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk ); BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk );
BOOL (WINAPI *pNtUserPeekMessage)( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags );
BOOL (WINAPI *pNtUserPostMessage)( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam );
BOOL (WINAPI *pNtUserPostThreadMessage)( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam );
BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ); BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name,
UNICODE_STRING *version, UNICODE_STRING *version,
...@@ -316,7 +313,6 @@ struct unix_funcs ...@@ -316,7 +313,6 @@ struct unix_funcs
WCHAR *str, int size, UINT flags, HKL layout ); WCHAR *str, int size, UINT flags, HKL layout );
BOOL (WINAPI *pNtUserTrackMouseEvent)( TRACKMOUSEEVENT *info ); BOOL (WINAPI *pNtUserTrackMouseEvent)( TRACKMOUSEEVENT *info );
INT (WINAPI *pNtUserTranslateAccelerator)( HWND hwnd, HACCEL accel, MSG *msg ); INT (WINAPI *pNtUserTranslateAccelerator)( HWND hwnd, HACCEL accel, MSG *msg );
BOOL (WINAPI *pNtUserTranslateMessage)( const MSG *msg, UINT flags );
BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance, BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance,
struct client_menu_name *client_menu_name ); struct client_menu_name *client_menu_name );
BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id ); BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id );
...@@ -325,7 +321,6 @@ struct unix_funcs ...@@ -325,7 +321,6 @@ struct unix_funcs
COLORREF key, const BLENDFUNCTION *blend, COLORREF key, const BLENDFUNCTION *blend,
DWORD flags, const RECT *dirty ); DWORD flags, const RECT *dirty );
WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout ); WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout );
DWORD (WINAPI *pNtUserWaitForInputIdle)( HANDLE process, DWORD timeout, BOOL wow );
HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y ); HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y );
/* Wine-specific functions */ /* Wine-specific functions */
......
...@@ -1103,24 +1103,6 @@ BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk ) ...@@ -1103,24 +1103,6 @@ BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk )
return unix_funcs->pNtUserOpenClipboard( hwnd, unk ); return unix_funcs->pNtUserOpenClipboard( hwnd, unk );
} }
BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserPeekMessage( msg_out, hwnd, first, last, flags );
}
BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserPostMessage( hwnd, msg, wparam, lparam );
}
BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserPostThreadMessage( thread, msg, wparam, lparam );
}
BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ) BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
{ {
if (!unix_funcs) return FALSE; if (!unix_funcs) return FALSE;
...@@ -1381,12 +1363,6 @@ INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg ) ...@@ -1381,12 +1363,6 @@ INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg )
return unix_funcs->pNtUserTranslateAccelerator( hwnd, accel, msg ); return unix_funcs->pNtUserTranslateAccelerator( hwnd, accel, msg );
} }
BOOL WINAPI NtUserTranslateMessage( const MSG *msg, UINT flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserTranslateMessage( msg, flags );
}
BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance, BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
struct client_menu_name *client_menu_name ) struct client_menu_name *client_menu_name )
{ {
...@@ -1415,12 +1391,6 @@ WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout ) ...@@ -1415,12 +1391,6 @@ WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout )
return unix_funcs->pNtUserVkKeyScanEx( chr, layout ); return unix_funcs->pNtUserVkKeyScanEx( chr, layout );
} }
DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserWaitForInputIdle( process, timeout, wow );
}
HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y ) HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y )
{ {
if (!unix_funcs) return 0; if (!unix_funcs) return 0;
......
...@@ -157,6 +157,9 @@ ...@@ -157,6 +157,9 @@
SYSCALL_ENTRY( NtUserOpenDesktop ) \ SYSCALL_ENTRY( NtUserOpenDesktop ) \
SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \
SYSCALL_ENTRY( NtUserOpenWindowStation ) \ SYSCALL_ENTRY( NtUserOpenWindowStation ) \
SYSCALL_ENTRY( NtUserPeekMessage ) \
SYSCALL_ENTRY( NtUserPostMessage ) \
SYSCALL_ENTRY( NtUserPostThreadMessage ) \
SYSCALL_ENTRY( NtUserQueryInputContext ) \ SYSCALL_ENTRY( NtUserQueryInputContext ) \
SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \ SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
...@@ -177,9 +180,11 @@ ...@@ -177,9 +180,11 @@
SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \
SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \
SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \ SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \
SYSCALL_ENTRY( NtUserTranslateMessage ) \
SYSCALL_ENTRY( NtUserUnhookWinEvent ) \ SYSCALL_ENTRY( NtUserUnhookWinEvent ) \
SYSCALL_ENTRY( NtUserUnhookWindowsHookEx ) \ SYSCALL_ENTRY( NtUserUnhookWindowsHookEx ) \
SYSCALL_ENTRY( NtUserUpdateInputContext ) \ SYSCALL_ENTRY( NtUserUpdateInputContext ) \
SYSCALL_ENTRY( NtUserWaitForInputIdle ) \
SYSCALL_ENTRY( NtUserWindowFromDC ) SYSCALL_ENTRY( NtUserWindowFromDC )
#endif /* __WOW64WIN_SYSCALL_H */ #endif /* __WOW64WIN_SYSCALL_H */
...@@ -927,6 +927,40 @@ NTSTATUS WINAPI wow64_NtUserOpenWindowStation( UINT *args ) ...@@ -927,6 +927,40 @@ NTSTATUS WINAPI wow64_NtUserOpenWindowStation( UINT *args )
return HandleToUlong( NtUserOpenWindowStation( objattr_32to64( &attr, attr32 ), access )); return HandleToUlong( NtUserOpenWindowStation( objattr_32to64( &attr, attr32 ), access ));
} }
NTSTATUS WINAPI wow64_NtUserPeekMessage( UINT *args )
{
MSG32 *msg32 = get_ptr( &args );
HWND hwnd = get_handle( &args );
UINT first = get_ulong( &args );
UINT last = get_ulong( &args );
UINT flags = get_ulong( &args );
MSG msg;
if (!NtUserPeekMessage( &msg, hwnd, first, last, flags )) return FALSE;
msg_64to32( &msg, msg32 );
return TRUE;
}
NTSTATUS WINAPI wow64_NtUserPostMessage( UINT *args )
{
HWND hwnd = get_handle( &args );
UINT msg = get_ulong( &args );
WPARAM wparam = get_ulong( &args );
LPARAM lparam = get_ulong( &args );
return NtUserPostMessage( hwnd, msg, wparam, lparam );
}
NTSTATUS WINAPI wow64_NtUserPostThreadMessage( UINT *args )
{
DWORD thread = get_ulong( &args );
UINT msg = get_ulong( &args );
WPARAM wparam = get_ulong( &args );
LPARAM lparam = get_ulong( &args );
return NtUserPostThreadMessage( thread, msg, wparam, lparam );
}
NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args ) NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args )
{ {
HIMC handle = get_handle( &args ); HIMC handle = get_handle( &args );
...@@ -1190,6 +1224,15 @@ NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args ) ...@@ -1190,6 +1224,15 @@ NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args )
return NtUserTrackPopupMenuEx( handle, flags, x, y, hwnd, params ); return NtUserTrackPopupMenuEx( handle, flags, x, y, hwnd, params );
} }
NTSTATUS WINAPI wow64_NtUserTranslateMessage( UINT *args )
{
const MSG32 *msg32 = get_ptr( &args );
UINT flags = get_ulong( &args );
MSG msg;
return NtUserTranslateMessage( msg_32to64( &msg, msg32 ), flags );
}
NTSTATUS WINAPI wow64_NtUserUnhookWinEvent( UINT *args ) NTSTATUS WINAPI wow64_NtUserUnhookWinEvent( UINT *args )
{ {
HWINEVENTHOOK handle = get_handle( &args ); HWINEVENTHOOK handle = get_handle( &args );
...@@ -1213,6 +1256,15 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args ) ...@@ -1213,6 +1256,15 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args )
return NtUserUpdateInputContext( handle, attr, value ); return NtUserUpdateInputContext( handle, attr, value );
} }
NTSTATUS WINAPI wow64_NtUserWaitForInputIdle( UINT *args )
{
HANDLE process = get_handle( &args );
DWORD timeout = get_ulong( &args );
BOOL wow = get_ulong( &args );
return NtUserWaitForInputIdle( process, timeout, wow );
}
NTSTATUS WINAPI wow64_NtUserWindowFromDC( UINT *args ) NTSTATUS WINAPI wow64_NtUserWindowFromDC( UINT *args )
{ {
HDC hdc = get_handle( &args ); HDC hdc = get_handle( &args );
......
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