win32u: Move GetInputState implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a4245969f1
commit
308ca7f6b1
|
@ -450,18 +450,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState( INT key )
|
|||
*/
|
||||
BOOL WINAPI GetInputState(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;
|
||||
return NtUserCallNoParam( NtUserGetInputState );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1150,6 +1150,7 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiUpdateColors,
|
||||
NtGdiWidenPath,
|
||||
NtUserActivateKeyboardLayout,
|
||||
NtUserCallNoParam,
|
||||
NtUserCallOneParam,
|
||||
NtUserCallTwoParam,
|
||||
NtUserChangeDisplaySettings,
|
||||
|
|
|
@ -159,6 +159,25 @@ DWORD WINAPI NtUserGetQueueStatus( UINT flags )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -4483,6 +4483,21 @@ static BOOL message_beep( UINT i )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* 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.@)
|
||||
*/
|
||||
|
|
|
@ -778,7 +778,7 @@
|
|||
@ stub NtUserCallHwndSafe
|
||||
@ stub NtUserCallMsgFilter
|
||||
@ stub NtUserCallNextHookEx
|
||||
@ stub NtUserCallNoParam
|
||||
@ stdcall NtUserCallNoParam(long)
|
||||
@ stdcall NtUserCallOneParam(long long)
|
||||
@ stdcall NtUserCallTwoParam(long long long)
|
||||
@ stub NtUserCanBrokerForceForeground
|
||||
|
|
|
@ -192,6 +192,7 @@ struct unix_funcs
|
|||
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
|
||||
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
|
||||
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 *pNtUserCallTwoParam)( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
|
||||
LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
|
||||
|
@ -248,6 +249,7 @@ extern BOOL get_clip_cursor( RECT *rect ) DECLSPEC_HIDDEN;
|
|||
|
||||
/* input.c */
|
||||
extern BOOL get_cursor_pos( POINT *pt ) DECLSPEC_HIDDEN;
|
||||
extern DWORD get_input_state(void) DECLSPEC_HIDDEN;
|
||||
|
||||
/* sysparams.c */
|
||||
extern RECT get_display_rect( const WCHAR *display ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -701,6 +701,12 @@ HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT 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 )
|
||||
{
|
||||
if (!unix_funcs) return 0;
|
||||
|
|
|
@ -49,6 +49,12 @@ struct enum_display_monitor_params
|
|||
#define NTUSER_DPI_PER_MONITOR_AWARE_V2 0x00000022
|
||||
#define NTUSER_DPI_PER_UNAWARE_GDISCALED 0x40006010
|
||||
|
||||
/* NtUserCallNoParam codes, not compatible with Windows */
|
||||
enum
|
||||
{
|
||||
NtUserGetInputState,
|
||||
};
|
||||
|
||||
/* NtUserCallOneParam codes, not compatible with Windows */
|
||||
enum
|
||||
{
|
||||
|
@ -133,6 +139,7 @@ BOOL WINAPI NtUserAddClipboardFormatListener( HWND hwnd );
|
|||
BOOL WINAPI NtUserAttachThreadInput( DWORD from, DWORD to, BOOL attach );
|
||||
NTSTATUS WINAPI NtUserBuildHwndList( HDESK desktop, ULONG unk2, ULONG unk3, ULONG unk4,
|
||||
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 NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code );
|
||||
LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
|
||||
|
|
Loading…
Reference in New Issue