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

win32u: Move NtUserGetQueueStatus implementation from user32.

parent a8b0b07c
...@@ -446,32 +446,6 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key ) ...@@ -446,32 +446,6 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
/*********************************************************************** /***********************************************************************
* GetQueueStatus (USER32.@)
*/
DWORD WINAPI GetQueueStatus( UINT flags )
{
DWORD ret;
if (flags & ~(QS_ALLINPUT | QS_ALLPOSTMESSAGE | QS_SMRESULT))
{
SetLastError( ERROR_INVALID_FLAGS );
return 0;
}
check_for_events( flags );
SERVER_START_REQ( get_queue_status )
{
req->clear_bits = flags;
wine_server_call( req );
ret = MAKELONG( reply->changed_bits & flags, reply->wake_bits & flags );
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* GetInputState (USER32.@) * GetInputState (USER32.@)
*/ */
BOOL WINAPI GetInputState(void) BOOL WINAPI GetInputState(void)
......
...@@ -365,7 +365,7 @@ ...@@ -365,7 +365,7 @@
@ stdcall GetProgmanWindow () @ stdcall GetProgmanWindow ()
@ stdcall GetPropA(long str) @ stdcall GetPropA(long str)
@ stdcall GetPropW(long wstr) @ stdcall GetPropW(long wstr)
@ stdcall GetQueueStatus(long) @ stdcall GetQueueStatus(long) NtUserGetQueueStatus
@ stdcall GetRawInputBuffer(ptr ptr long) @ stdcall GetRawInputBuffer(ptr ptr long)
@ stdcall GetRawInputData(ptr long ptr ptr long) @ stdcall GetRawInputData(ptr long ptr ptr long)
@ stdcall GetRawInputDeviceInfoA(ptr long ptr ptr) @ stdcall GetRawInputDeviceInfoA(ptr long ptr ptr)
......
...@@ -1064,6 +1064,7 @@ static const struct user_driver_funcs lazy_load_driver = ...@@ -1064,6 +1064,7 @@ static const struct user_driver_funcs lazy_load_driver =
.pEnumDisplaySettingsEx = loaderdrv_EnumDisplaySettingsEx, .pEnumDisplaySettingsEx = loaderdrv_EnumDisplaySettingsEx,
.pUpdateDisplayDevices = loaderdrv_UpdateDisplayDevices, .pUpdateDisplayDevices = loaderdrv_UpdateDisplayDevices,
/* windowing functions */ /* windowing functions */
.pMsgWaitForMultipleObjectsEx = nulldrv_MsgWaitForMultipleObjectsEx,
.pScrollDC = nulldrv_ScrollDC, .pScrollDC = nulldrv_ScrollDC,
/* system parameters */ /* system parameters */
.pSystemParametersInfo = nulldrv_SystemParametersInfo, .pSystemParametersInfo = nulldrv_SystemParametersInfo,
......
...@@ -1162,6 +1162,7 @@ static struct unix_funcs unix_funcs = ...@@ -1162,6 +1162,7 @@ static struct unix_funcs unix_funcs =
NtUserGetKeyNameText, NtUserGetKeyNameText,
NtUserGetKeyboardLayoutList, NtUserGetKeyboardLayoutList,
NtUserGetPriorityClipboardFormat, NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
NtUserGetUpdatedClipboardFormats, NtUserGetUpdatedClipboardFormats,
NtUserIsClipboardFormatAvailable, NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx, NtUserMapVirtualKeyEx,
......
...@@ -128,6 +128,37 @@ BOOL get_cursor_pos( POINT *pt ) ...@@ -128,6 +128,37 @@ BOOL get_cursor_pos( POINT *pt )
return ret; return ret;
} }
static void check_for_events( UINT flags )
{
if (user_driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, flags, 0 ) == WAIT_TIMEOUT)
flush_window_surfaces( TRUE );
}
/***********************************************************************
* NtUserGetQueueStatus (win32u.@)
*/
DWORD WINAPI NtUserGetQueueStatus( UINT flags )
{
DWORD ret;
if (flags & ~(QS_ALLINPUT | QS_ALLPOSTMESSAGE | QS_SMRESULT))
{
SetLastError( ERROR_INVALID_FLAGS );
return 0;
}
check_for_events( flags );
SERVER_START_REQ( get_queue_status )
{
req->clear_bits = flags;
wine_server_call( req );
ret = MAKELONG( reply->changed_bits & flags, reply->wake_bits & flags );
}
SERVER_END_REQ;
return ret;
}
/*********************************************************************** /***********************************************************************
* get_locale_kbd_layout * get_locale_kbd_layout
*/ */
......
...@@ -981,7 +981,7 @@ ...@@ -981,7 +981,7 @@
@ stub NtUserGetProcessUIContextInformation @ stub NtUserGetProcessUIContextInformation
@ stdcall -syscall NtUserGetProcessWindowStation() @ stdcall -syscall NtUserGetProcessWindowStation()
@ stdcall -syscall NtUserGetProp(long wstr) @ stdcall -syscall NtUserGetProp(long wstr)
@ stub NtUserGetQueueStatus @ stdcall NtUserGetQueueStatus(long)
@ stub NtUserGetQueueStatusReadonly @ stub NtUserGetQueueStatusReadonly
@ stub NtUserGetRawInputBuffer @ stub NtUserGetRawInputBuffer
@ stub NtUserGetRawInputData @ stub NtUserGetRawInputData
......
...@@ -208,6 +208,7 @@ struct unix_funcs ...@@ -208,6 +208,7 @@ struct unix_funcs
INT (WINAPI *pNtUserGetKeyNameText)( LONG lparam, WCHAR *buffer, INT size ); INT (WINAPI *pNtUserGetKeyNameText)( LONG lparam, WCHAR *buffer, INT size );
UINT (WINAPI *pNtUserGetKeyboardLayoutList)( INT size, HKL *layouts ); UINT (WINAPI *pNtUserGetKeyboardLayoutList)( INT size, HKL *layouts );
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count ); INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
......
...@@ -777,6 +777,12 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ) ...@@ -777,6 +777,12 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count )
return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count ); return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count );
} }
DWORD WINAPI NtUserGetQueueStatus( UINT flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetQueueStatus( flags );
}
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size ) BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{ {
if (!unix_funcs) return FALSE; if (!unix_funcs) return FALSE;
......
...@@ -176,6 +176,7 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ); ...@@ -176,6 +176,7 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count );
HWINSTA WINAPI NtUserGetProcessWindowStation(void); HWINSTA WINAPI NtUserGetProcessWindowStation(void);
HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str ); HANDLE WINAPI NtUserGetProp( HWND hwnd, const WCHAR *str );
ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process ); ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process );
DWORD WINAPI NtUserGetQueueStatus( UINT flags );
ULONG WINAPI NtUserGetSystemDpiForProcess( HANDLE process ); ULONG WINAPI NtUserGetSystemDpiForProcess( HANDLE process );
HDESK WINAPI NtUserGetThreadDesktop( DWORD thread ); HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size ); BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
......
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