win32u: Move NtUserWaitMessage implementation from user32.

This commit is contained in:
Jacek Caban 2022-12-09 12:31:54 +01:00 committed by Alexandre Julliard
parent 647bec85ee
commit ae7effbd78
8 changed files with 18 additions and 15 deletions

View file

@ -1026,19 +1026,6 @@ BOOL WINAPI GetCurrentInputMessageSource( INPUT_MESSAGE_SOURCE *source )
}
/***********************************************************************
* WaitMessage (USER.112) Suspend thread pending messages
* WaitMessage (USER32.@) Suspend thread pending messages
*
* WaitMessage() suspends a thread until events appear in the thread's
* queue.
*/
BOOL WINAPI WaitMessage(void)
{
return NtUserMsgWaitForMultipleObjectsEx( 0, NULL, INFINITE, QS_ALLINPUT, 0 ) != WAIT_FAILED;
}
/***********************************************************************
* MsgWaitForMultipleObjects (USER32.@)
*/

View file

@ -820,7 +820,7 @@
@ stdcall WINNLSGetIMEHotkey(long)
@ stub WNDPROC_CALLBACK
@ stdcall WaitForInputIdle(long long)
@ stdcall WaitMessage()
@ stdcall WaitMessage() NtUserWaitMessage
# @ stub Win32PoolAllocationStats
@ stdcall WinHelpA(long str long long)
@ stdcall WinHelpW(long wstr long long)

View file

@ -2256,6 +2256,14 @@ DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow )
return WAIT_TIMEOUT;
}
/***********************************************************************
* NtUserWaitMessage (win32u.@)
*/
BOOL WINAPI NtUserWaitMessage(void)
{
return NtUserMsgWaitForMultipleObjectsEx( 0, NULL, INFINITE, QS_ALLINPUT, 0 ) != WAIT_FAILED;
}
/***********************************************************************
* NtUserPeekMessage (win32u.@)
*/

View file

@ -308,6 +308,7 @@ static void * const syscalls[] =
NtUserValidateRect,
NtUserVkKeyScanEx,
NtUserWaitForInputIdle,
NtUserWaitMessage,
NtUserWindowFromDC,
NtUserWindowFromPoint,
};

View file

@ -1308,7 +1308,7 @@
@ stdcall -syscall NtUserWaitForInputIdle(long long long)
@ stub NtUserWaitForMsgAndEvent
@ stub NtUserWaitForRedirectionStartComplete
@ stub NtUserWaitMessage
@ stdcall -syscall NtUserWaitMessage()
@ stdcall -syscall NtUserWindowFromDC(long)
@ stub NtUserWindowFromPhysicalPoint
@ stdcall -syscall NtUserWindowFromPoint(long long)

View file

@ -294,6 +294,7 @@
SYSCALL_ENTRY( NtUserValidateRect ) \
SYSCALL_ENTRY( NtUserVkKeyScanEx ) \
SYSCALL_ENTRY( NtUserWaitForInputIdle ) \
SYSCALL_ENTRY( NtUserWaitMessage ) \
SYSCALL_ENTRY( NtUserWindowFromDC ) \
SYSCALL_ENTRY( NtUserWindowFromPoint )

View file

@ -4154,6 +4154,11 @@ NTSTATUS WINAPI wow64_NtUserWaitForInputIdle( UINT *args )
return NtUserWaitForInputIdle( process, timeout, wow );
}
NTSTATUS WINAPI wow64_NtUserWaitMessage( UINT *args )
{
return NtUserWaitMessage();
}
NTSTATUS WINAPI wow64_NtUserWindowFromDC( UINT *args )
{
HDC hdc = get_handle( &args );

View file

@ -898,6 +898,7 @@ BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *p
BOOL WINAPI NtUserValidateRect( HWND hwnd, const RECT *rect );
WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout );
DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow );
BOOL WINAPI NtUserWaitMessage(void);
HWND WINAPI NtUserWindowFromDC( HDC hdc );
HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y );