mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 02:46:32 +00:00
win32u: Move NtUserGetKeyboardState 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
d99f61dd9a
commit
deb455ec25
8 changed files with 34 additions and 26 deletions
|
@ -593,29 +593,6 @@ BOOL WINAPI GetLastInputInfo(PLASTINPUTINFO plii)
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* GetKeyboardState (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI DECLSPEC_HOTPATCH GetKeyboardState( LPBYTE state )
|
||||
{
|
||||
BOOL ret;
|
||||
UINT i;
|
||||
|
||||
TRACE("(%p)\n", state);
|
||||
|
||||
memset( state, 0, 256 );
|
||||
SERVER_START_REQ( get_key_state )
|
||||
{
|
||||
req->key = -1;
|
||||
wine_server_set_reply( req, state, 256 );
|
||||
ret = !wine_server_call_err( req );
|
||||
for (i = 0; i < 256; i++) state[i] &= 0x81;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetKeyboardState (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -3888,7 +3888,7 @@ BOOL WINAPI TranslateMessage( const MSG *msg )
|
|||
return ImmTranslateMessage(msg->hwnd, msg->message, msg->wParam, msg->lParam);
|
||||
}
|
||||
|
||||
GetKeyboardState( state );
|
||||
NtUserGetKeyboardState( state );
|
||||
len = ToUnicode(msg->wParam, HIWORD(msg->lParam), state, wp, ARRAY_SIZE(wp), 0);
|
||||
if (len == -1)
|
||||
{
|
||||
|
|
|
@ -321,7 +321,7 @@
|
|||
@ stdcall GetKeyboardLayoutList(long ptr)
|
||||
@ stdcall GetKeyboardLayoutNameA(ptr)
|
||||
@ stdcall GetKeyboardLayoutNameW(ptr)
|
||||
@ stdcall GetKeyboardState(ptr)
|
||||
@ stdcall -import GetKeyboardState(ptr) NtUserGetKeyboardState
|
||||
@ stdcall GetKeyboardType(long)
|
||||
@ stdcall GetLastActivePopup(long)
|
||||
@ stdcall GetLastInputInfo(ptr)
|
||||
|
|
|
@ -71,3 +71,25 @@ SHORT WINAPI NtUserGetKeyState( INT vkey )
|
|||
TRACE("key (0x%x) -> %x\n", vkey, retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* NtUserGetKeyboardState (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI NtUserGetKeyboardState( BYTE *state )
|
||||
{
|
||||
BOOL ret;
|
||||
UINT i;
|
||||
|
||||
TRACE("(%p)\n", state);
|
||||
|
||||
memset( state, 0, 256 );
|
||||
SERVER_START_REQ( get_key_state )
|
||||
{
|
||||
req->key = -1;
|
||||
wine_server_set_reply( req, state, 256 );
|
||||
ret = !wine_server_call_err( req );
|
||||
for (i = 0; i < 256; i++) state[i] &= 0x81;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ static void * const syscalls[] =
|
|||
NtUserGetClipboardSequenceNumber,
|
||||
NtUserGetClipboardViewer,
|
||||
NtUserGetKeyState,
|
||||
NtUserGetKeyboardState,
|
||||
NtUserGetLayeredWindowAttributes,
|
||||
NtUserGetObjectInformation,
|
||||
NtUserGetProcessWindowStation,
|
||||
|
|
|
@ -949,7 +949,7 @@
|
|||
@ stub NtUserGetKeyboardLayout
|
||||
@ stub NtUserGetKeyboardLayoutList
|
||||
@ stub NtUserGetKeyboardLayoutName
|
||||
@ stub NtUserGetKeyboardState
|
||||
@ stdcall -syscall NtUserGetKeyboardState(ptr)
|
||||
@ stdcall -syscall NtUserGetLayeredWindowAttributes(long ptr ptr ptr)
|
||||
@ stub NtUserGetListBoxInfo
|
||||
@ stub NtUserGetMenuBarInfo
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
SYSCALL_ENTRY( NtUserGetClipboardSequenceNumber ) \
|
||||
SYSCALL_ENTRY( NtUserGetClipboardViewer ) \
|
||||
SYSCALL_ENTRY( NtUserGetKeyState ) \
|
||||
SYSCALL_ENTRY( NtUserGetKeyboardState ) \
|
||||
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
|
||||
SYSCALL_ENTRY( NtUserGetObjectInformation ) \
|
||||
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
|
||||
|
|
|
@ -244,3 +244,10 @@ NTSTATUS WINAPI wow64_NtUserGetKeyState( UINT *args )
|
|||
|
||||
return NtUserGetKeyState( vkey );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserGetKeyboardState( UINT *args )
|
||||
{
|
||||
BYTE *state = get_ptr( &args );
|
||||
|
||||
return NtUserGetKeyboardState( state );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue