Commit 308ca7f6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move GetInputState implementation from user32.

parent a4245969
...@@ -450,18 +450,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key ) ...@@ -450,18 +450,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
*/ */
BOOL WINAPI GetInputState(void) BOOL WINAPI GetInputState(void)
{ {
DWORD ret; return NtUserCallNoParam( NtUserGetInputState );
check_for_events( QS_INPUT );
SERVER_START_REQ( get_queue_status )
{
req->clear_bits = 0;
wine_server_call( req );
ret = reply->wake_bits & (QS_KEY | QS_MOUSEBUTTON);
}
SERVER_END_REQ;
return ret;
} }
......
...@@ -1150,6 +1150,7 @@ static struct unix_funcs unix_funcs = ...@@ -1150,6 +1150,7 @@ static struct unix_funcs unix_funcs =
NtGdiUpdateColors, NtGdiUpdateColors,
NtGdiWidenPath, NtGdiWidenPath,
NtUserActivateKeyboardLayout, NtUserActivateKeyboardLayout,
NtUserCallNoParam,
NtUserCallOneParam, NtUserCallOneParam,
NtUserCallTwoParam, NtUserCallTwoParam,
NtUserChangeDisplaySettings, NtUserChangeDisplaySettings,
......
...@@ -160,6 +160,25 @@ DWORD WINAPI NtUserGetQueueStatus( UINT flags ) ...@@ -160,6 +160,25 @@ DWORD WINAPI NtUserGetQueueStatus( UINT flags )
} }
/*********************************************************************** /***********************************************************************
* get_input_state
*/
DWORD get_input_state(void)
{
DWORD ret;
check_for_events( QS_INPUT );
SERVER_START_REQ( get_queue_status )
{
req->clear_bits = 0;
wine_server_call( req );
ret = reply->wake_bits & (QS_KEY | QS_MOUSEBUTTON);
}
SERVER_END_REQ;
return ret;
}
/***********************************************************************
* get_locale_kbd_layout * get_locale_kbd_layout
*/ */
static HKL get_locale_kbd_layout(void) static HKL get_locale_kbd_layout(void)
......
...@@ -4486,6 +4486,21 @@ static BOOL message_beep( UINT i ) ...@@ -4486,6 +4486,21 @@ static BOOL message_beep( UINT i )
/*********************************************************************** /***********************************************************************
* NtUserCallOneParam (win32u.@) * NtUserCallOneParam (win32u.@)
*/ */
ULONG_PTR WINAPI NtUserCallNoParam( ULONG code )
{
switch(code)
{
case NtUserGetInputState:
return get_input_state();
default:
FIXME( "invalid code %u\n", code );
return 0;
}
}
/***********************************************************************
* NtUserCallOneParam (win32u.@)
*/
ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
{ {
switch(code) switch(code)
......
...@@ -778,7 +778,7 @@ ...@@ -778,7 +778,7 @@
@ stub NtUserCallHwndSafe @ stub NtUserCallHwndSafe
@ stub NtUserCallMsgFilter @ stub NtUserCallMsgFilter
@ stub NtUserCallNextHookEx @ stub NtUserCallNextHookEx
@ stub NtUserCallNoParam @ stdcall NtUserCallNoParam(long)
@ stdcall NtUserCallOneParam(long long) @ stdcall NtUserCallOneParam(long long)
@ stdcall NtUserCallTwoParam(long long long) @ stdcall NtUserCallTwoParam(long long long)
@ stub NtUserCanBrokerForceForeground @ stub NtUserCanBrokerForceForeground
......
...@@ -192,6 +192,7 @@ struct unix_funcs ...@@ -192,6 +192,7 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
HKL (WINAPI *pNtUserActivateKeyboardLayout)( HKL layout, UINT flags ); HKL (WINAPI *pNtUserActivateKeyboardLayout)( HKL layout, UINT flags );
ULONG_PTR (WINAPI *pNtUserCallNoParam)( ULONG code );
ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code ); ULONG_PTR (WINAPI *pNtUserCallOneParam)( ULONG_PTR arg, ULONG code );
ULONG_PTR (WINAPI *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ); ULONG_PTR (WINAPI *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
...@@ -248,6 +249,7 @@ extern BOOL get_clip_cursor( RECT *rect ) DECLSPEC_HIDDEN; ...@@ -248,6 +249,7 @@ extern BOOL get_clip_cursor( RECT *rect ) DECLSPEC_HIDDEN;
/* input.c */ /* input.c */
extern BOOL get_cursor_pos( POINT *pt ) DECLSPEC_HIDDEN; extern BOOL get_cursor_pos( POINT *pt ) DECLSPEC_HIDDEN;
extern DWORD get_input_state(void) DECLSPEC_HIDDEN;
/* sysparams.c */ /* sysparams.c */
extern RECT get_display_rect( const WCHAR *display ) DECLSPEC_HIDDEN; extern RECT get_display_rect( const WCHAR *display ) DECLSPEC_HIDDEN;
......
...@@ -701,6 +701,12 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags ) ...@@ -701,6 +701,12 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
return unix_funcs->pNtUserActivateKeyboardLayout( layout, flags ); return unix_funcs->pNtUserActivateKeyboardLayout( layout, flags );
} }
ULONG_PTR WINAPI NtUserCallNoParam( ULONG code )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserCallNoParam( code );
}
ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
{ {
if (!unix_funcs) return 0; if (!unix_funcs) return 0;
......
...@@ -49,6 +49,12 @@ struct enum_display_monitor_params ...@@ -49,6 +49,12 @@ struct enum_display_monitor_params
#define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022 #define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
#define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010 #define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
/* NtUserCallNoParam codes, not compatible with Windows */
enum
{
NtUserGetInputState,
};
/* NtUserCallOneParam codes, not compatible with Windows */ /* NtUserCallOneParam codes, not compatible with Windows */
enum enum
{ {
...@@ -133,6 +139,7 @@ BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd ); ...@@ -133,6 +139,7 @@ BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach ); BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach );
NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4, NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4,
ULONG thread_id, ULONG count, HWND *buffer, ULONG *size ); ULONG thread_id, ULONG count, HWND *buffer, ULONG *size );
ULONG_PTR WINAPI NtUserCallNoParam( ULONG code );
ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ); ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code );
ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code ); ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
......
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