Commit 81df0bc7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for more input functions.

parent 7df56c9b
......@@ -1136,7 +1136,6 @@ static struct unix_funcs unix_funcs =
NtGdiUnrealizeObject,
NtGdiUpdateColors,
NtGdiWidenPath,
NtUserActivateKeyboardLayout,
NtUserBeginPaint,
NtUserCallHwnd,
NtUserCallHwndParam,
......@@ -1170,18 +1169,13 @@ static struct unix_funcs unix_funcs =
NtUserEnumDisplaySettings,
NtUserExcludeUpdateRgn,
NtUserFlashWindowEx,
NtUserGetAsyncKeyState,
NtUserGetClassInfoEx,
NtUserGetClipboardData,
NtUserGetCursorInfo,
NtUserGetDCEx,
NtUserGetDisplayConfigBufferSizes,
NtUserGetIconInfo,
NtUserGetKeyNameText,
NtUserGetKeyboardLayoutList,
NtUserGetMenuBarInfo,
NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
NtUserGetScrollBarInfo,
NtUserGetSystemMenu,
NtUserGetUpdateRect,
......@@ -1194,17 +1188,14 @@ static struct unix_funcs unix_funcs =
NtUserInvalidateRect,
NtUserInvalidateRgn,
NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx,
NtUserMoveWindow,
NtUserOpenClipboard,
NtUserRedrawWindow,
NtUserRegisterClassExWOW,
NtUserRegisterHotKey,
NtUserReleaseDC,
NtUserScrollDC,
NtUserScrollWindowEx,
NtUserSelectPalette,
NtUserSendInput,
NtUserSetActiveWindow,
NtUserSetCapture,
NtUserSetClipboardData,
......@@ -1214,7 +1205,6 @@ static struct unix_funcs unix_funcs =
NtUserSetClipboardViewer,
NtUserSetCursor,
NtUserSetCursorIconData,
NtUserSetCursorPos,
NtUserSetFocus,
NtUserSetInternalWindowPos,
NtUserSetLayeredWindowAttributes,
......@@ -1236,13 +1226,10 @@ static struct unix_funcs unix_funcs =
NtUserShowWindowAsync,
NtUserSystemParametersInfo,
NtUserSystemParametersInfoForDpi,
NtUserToUnicodeEx,
NtUserTrackMouseEvent,
NtUserTranslateAccelerator,
NtUserUnregisterClass,
NtUserUnregisterHotKey,
NtUserUpdateLayeredWindow,
NtUserVkKeyScanEx,
NtUserWindowFromPoint,
SetDIBits,
......
......@@ -100,6 +100,7 @@ static void * const syscalls[] =
NtGdiSetVirtualResolution,
NtGdiSwapBuffers,
NtGdiTransformPoints,
NtUserActivateKeyboardLayout,
NtUserAddClipboardFormatListener,
NtUserAssociateInputContext,
NtUserAttachThreadInput,
......@@ -122,6 +123,7 @@ static void * const syscalls[] =
NtUserFindExistingCursorIcon,
NtUserFindWindowEx,
NtUserGetAncestor,
NtUserGetAsyncKeyState,
NtUserGetAtomName,
NtUserGetCaretBlinkTime,
NtUserGetCaretPos,
......@@ -132,13 +134,16 @@ static void * const syscalls[] =
NtUserGetClipboardViewer,
NtUserGetCursor,
NtUserGetCursorFrameInfo,
NtUserGetCursorInfo,
NtUserGetDoubleClickTime,
NtUserGetDpiForMonitor,
NtUserGetForegroundWindow,
NtUserGetGUIThreadInfo,
NtUserGetIconSize,
NtUserGetKeyNameText,
NtUserGetKeyState,
NtUserGetKeyboardLayout,
NtUserGetKeyboardLayoutList,
NtUserGetKeyboardLayoutName,
NtUserGetKeyboardState,
NtUserGetLayeredWindowAttributes,
......@@ -150,6 +155,7 @@ static void * const syscalls[] =
NtUserGetProcessDpiAwarenessContext,
NtUserGetProcessWindowStation,
NtUserGetProp,
NtUserGetQueueStatus,
NtUserGetRawInputBuffer,
NtUserGetRawInputData,
NtUserGetRawInputDeviceInfo,
......@@ -163,6 +169,7 @@ static void * const syscalls[] =
NtUserInternalGetWindowText,
NtUserKillTimer,
NtUserLockWindowUpdate,
NtUserMapVirtualKeyEx,
NtUserMenuItemFromPoint,
NtUserMessageCall,
NtUserMsgWaitForMultipleObjectsEx,
......@@ -174,10 +181,13 @@ static void * const syscalls[] =
NtUserPostMessage,
NtUserPostThreadMessage,
NtUserQueryInputContext,
NtUserRegisterHotKey,
NtUserRegisterRawInputDevices,
NtUserRemoveClipboardFormatListener,
NtUserRemoveMenu,
NtUserRemoveProp,
NtUserSendInput,
NtUserSetCursorPos,
NtUserSetKeyboardState,
NtUserSetMenuContextHelpId,
NtUserSetMenuDefaultItem,
......@@ -192,11 +202,14 @@ static void * const syscalls[] =
NtUserSetWindowsHookEx,
NtUserThunkedMenuInfo,
NtUserThunkedMenuItemInfo,
NtUserToUnicodeEx,
NtUserTrackPopupMenuEx,
NtUserTranslateMessage,
NtUserUnhookWinEvent,
NtUserUnhookWindowsHookEx,
NtUserUnregisterHotKey,
NtUserUpdateInputContext,
NtUserVkKeyScanEx,
NtUserWaitForInputIdle,
NtUserWindowFromDC,
};
......
......@@ -749,7 +749,7 @@
@ stub NtUpdateInputSinkTransforms
@ stub NtUserAcquireIAMKey
@ stub NtUserAcquireInteractiveControlBackgroundAccess
@ stdcall NtUserActivateKeyboardLayout(long long)
@ stdcall -syscall NtUserActivateKeyboardLayout(long long)
@ stdcall -syscall NtUserAddClipboardFormatListener(long)
@ stub NtUserAddVisualIdentifier
@ stub NtUserAlterWindowStyle
......@@ -891,7 +891,7 @@
@ stub NtUserGetAltTabInfo
@ stdcall -syscall NtUserGetAncestor(long long)
@ stub NtUserGetAppImeLevel
@ stdcall NtUserGetAsyncKeyState(long)
@ stdcall -syscall NtUserGetAsyncKeyState(long)
@ stdcall -syscall NtUserGetAtomName(long ptr)
@ stub NtUserGetAutoRotationState
@ stub NtUserGetCIMSSM
......@@ -914,7 +914,7 @@
@ stub NtUserGetCurrentInputMessageSource
@ stdcall -syscall NtUserGetCursor()
@ stdcall -syscall NtUserGetCursorFrameInfo(long long ptr ptr)
@ stdcall NtUserGetCursorInfo(ptr)
@ stdcall -syscall NtUserGetCursorInfo(ptr)
@ stub NtUserGetDC
@ stdcall NtUserGetDCEx(long long long)
@ stub NtUserGetDManipHookInitFunction
......@@ -944,10 +944,10 @@
@ stub NtUserGetInteractiveControlInfo
@ stub NtUserGetInteractiveCtrlSupportedWaveforms
@ stub NtUserGetInternalWindowPos
@ stdcall NtUserGetKeyNameText(long ptr long)
@ stdcall -syscall NtUserGetKeyNameText(long ptr long)
@ stdcall -syscall NtUserGetKeyState(long)
@ stdcall -syscall NtUserGetKeyboardLayout(long)
@ stdcall NtUserGetKeyboardLayoutList(long ptr)
@ stdcall -syscall NtUserGetKeyboardLayoutList(long ptr)
@ stdcall -syscall NtUserGetKeyboardLayoutName(ptr)
@ stdcall -syscall NtUserGetKeyboardState(ptr)
@ stdcall -syscall NtUserGetLayeredWindowAttributes(long ptr ptr ptr)
......@@ -981,7 +981,7 @@
@ stub NtUserGetProcessUIContextInformation
@ stdcall -syscall NtUserGetProcessWindowStation()
@ stdcall -syscall NtUserGetProp(long wstr)
@ stdcall NtUserGetQueueStatus(long)
@ stdcall -syscall NtUserGetQueueStatus(long)
@ stub NtUserGetQueueStatusReadonly
@ stdcall -syscall NtUserGetRawInputBuffer(ptr ptr long)
@ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long)
......@@ -1076,7 +1076,7 @@
@ stub NtUserMagGetContextInformation
@ stub NtUserMagSetContextInformation
@ stub NtUserMapPointsByVisualIdentifier
@ stdcall NtUserMapVirtualKeyEx(long long long)
@ stdcall -syscall NtUserMapVirtualKeyEx(long long long)
@ stub NtUserMarkWindowForRawMouse
@ stdcall -syscall NtUserMenuItemFromPoint(long long long long)
@ stdcall -syscall NtUserMessageCall(long long long long long long long)
......@@ -1126,7 +1126,7 @@
@ stub NtUserRegisterDManipHook
@ stub NtUserRegisterEdgy
@ stub NtUserRegisterErrorReportingDialog
@ stdcall NtUserRegisterHotKey(long long long long)
@ stdcall -syscall NtUserRegisterHotKey(long long long long)
@ stub NtUserRegisterManipulationThread
@ stub NtUserRegisterPointerDeviceNotifications
@ stub NtUserRegisterPointerInputTarget
......@@ -1159,8 +1159,8 @@
@ stdcall NtUserScrollWindowEx(long long long ptr ptr long ptr long)
@ stdcall NtUserSelectPalette(long long long)
@ stub NtUserSendEventMessage
@ stdcall NtUserSendInput(long ptr long)
@ stub NtUserSendInteractiveControlHapticsReport
@ stdcall -syscall NtUserSendInput(long ptr long)
@ stub NtUserSendInteracsetiveControlHapticsReport
@ stub NtUserSetActivationFilter
@ stub NtUserSetActiveProcessForMonitor
@ stdcall NtUserSetActiveWindow(long)
......@@ -1181,7 +1181,7 @@
@ stdcall NtUserSetCursor(long)
@ stub NtUserSetCursorContents
@ stdcall NtUserSetCursorIconData(long ptr ptr ptr)
@ stdcall NtUserSetCursorPos(long long)
@ stdcall -syscall NtUserSetCursorPos(long long)
@ stub NtUserSetDesktopColorTransform
@ stub NtUserSetDesktopVisualInputSink
@ stub NtUserSetDialogControlDpiChangeBehavior
......@@ -1276,7 +1276,7 @@
@ stub NtUserTestForInteractiveUser
@ stdcall -syscall NtUserThunkedMenuInfo(long ptr)
@ stdcall -syscall NtUserThunkedMenuItemInfo(long long long long ptr ptr)
@ stdcall NtUserToUnicodeEx(long long ptr ptr long long long)
@ stdcall -syscall NtUserToUnicodeEx(long long ptr ptr long long long)
@ stdcall NtUserTrackMouseEvent(ptr)
@ stdcall -syscall NtUserTrackPopupMenuEx(long long long long long ptr)
@ stub NtUserTransformPoint
......@@ -1289,7 +1289,7 @@
@ stub NtUserUnloadKeyboardLayout
@ stub NtUserUnlockWindowStation
@ stdcall NtUserUnregisterClass(ptr ptr ptr)
@ stdcall NtUserUnregisterHotKey(long long)
@ stdcall -syscall NtUserUnregisterHotKey(long long)
@ stub NtUserUnregisterSessionPort
@ stub NtUserUnregisterUserApiHook
@ stub NtUserUpdateDefaultDesktopThumbnail
......@@ -1302,7 +1302,7 @@
@ stub NtUserUserHandleGrantAccess
@ stub NtUserValidateRect
@ stub NtUserValidateTimerCallback
@ stdcall NtUserVkKeyScanEx(long long)
@ stdcall -syscall NtUserVkKeyScanEx(long long)
@ stub NtUserWOWCleanup
@ stub NtUserWaitAvailableMessageEx
@ stdcall -syscall NtUserWaitForInputIdle(long long long)
......
......@@ -186,7 +186,6 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj );
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
HKL (WINAPI *pNtUserActivateKeyboardLayout)( HKL layout, UINT flags );
HDC (WINAPI *pNtUserBeginPaint)( HWND hwnd, PAINTSTRUCT *ps );
ULONG_PTR (WINAPI *pNtUserCallHwnd)( HWND hwnd, DWORD code );
ULONG_PTR (WINAPI *pNtUserCallHwndParam)( HWND hwnd, DWORD_PTR param, DWORD code );
......@@ -231,21 +230,16 @@ struct unix_funcs
DEVMODEW *dev_mode, DWORD flags );
INT (WINAPI *pNtUserExcludeUpdateRgn)( HDC hdc, HWND hwnd );
BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info );
SHORT (WINAPI *pNtUserGetAsyncKeyState)( INT key );
ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
struct client_menu_name *menu_name, BOOL ansi );
HANDLE (WINAPI *pNtUserGetClipboardData)( UINT format, struct get_clipboard_params *params );
BOOL (WINAPI *pNtUserGetCursorInfo)( CURSORINFO *info );
HDC (WINAPI *pNtUserGetDCEx)( HWND hwnd, HRGN clip_rgn, DWORD flags );
LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info,
UINT32 *num_mode_info );
BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module,
UNICODE_STRING *res_name, DWORD *bpp, LONG unk );
INT (WINAPI *pNtUserGetKeyNameText)( LONG lparam, WCHAR *buffer, INT size );
UINT (WINAPI *pNtUserGetKeyboardLayoutList)( INT size, HKL *layouts );
BOOL (WINAPI *pNtUserGetMenuBarInfo)( HWND hwnd, LONG id, LONG item, MENUBARINFO *info );
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info );
HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert );
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
......@@ -258,7 +252,6 @@ struct unix_funcs
BOOL (WINAPI *pNtUserInvalidateRect)( HWND hwnd, const RECT *rect, BOOL erase );
BOOL (WINAPI *pNtUserInvalidateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk );
BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
......@@ -266,7 +259,6 @@ struct unix_funcs
UNICODE_STRING *version,
struct client_menu_name *client_menu_name,
DWORD fnid, DWORD flags, DWORD *wow );
BOOL (WINAPI *pNtUserRegisterHotKey)( HWND hwnd, INT id, UINT modifiers, UINT vk );
INT (WINAPI *pNtUserReleaseDC)( HWND hwnd, HDC hdc );
BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
HRGN ret_update_rgn, RECT *update_rect );
......@@ -274,7 +266,6 @@ struct unix_funcs
const RECT *clip_rect, HRGN update_rgn,
RECT *update_rect, UINT flags );
HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg );
UINT (WINAPI *pNtUserSendInput)( UINT count, INPUT *inputs, int size );
HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd );
HWND (WINAPI *pNtUserSetCapture)( HWND hwnd );
NTSTATUS (WINAPI *pNtUserSetClipboardData)( UINT format, HANDLE handle,
......@@ -286,7 +277,6 @@ struct unix_funcs
HCURSOR (WINAPI *pNtUserSetCursor)( HCURSOR cursor );
BOOL (WINAPI *pNtUserSetCursorIconData)( HCURSOR cursor, UNICODE_STRING *module,
UNICODE_STRING *res_name, struct cursoricon_desc *desc );
BOOL (WINAPI *pNtUserSetCursorPos)( INT x, INT y );
HWND (WINAPI *pNtUserSetFocus)( HWND hwnd );
void (WINAPI *pNtUserSetInternalWindowPos)( HWND hwnd, UINT cmd, RECT *rect, POINT *pt );
BOOL (WINAPI *pNtUserSetLayeredWindowAttributes)( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags );
......@@ -309,18 +299,14 @@ struct unix_funcs
BOOL (WINAPI *pNtUserSystemParametersInfo)( UINT action, UINT val, PVOID ptr, UINT winini );
BOOL (WINAPI *pNtUserSystemParametersInfoForDpi)( UINT action, UINT val, PVOID ptr,
UINT winini, UINT dpi );
INT (WINAPI *pNtUserToUnicodeEx)( UINT virt, UINT scan, const BYTE *state,
WCHAR *str, int size, UINT flags, HKL layout );
BOOL (WINAPI *pNtUserTrackMouseEvent)( TRACKMOUSEEVENT *info );
INT (WINAPI *pNtUserTranslateAccelerator)( HWND hwnd, HACCEL accel, MSG *msg );
BOOL (WINAPI *pNtUserUnregisterClass)( UNICODE_STRING *name, HINSTANCE instance,
struct client_menu_name *client_menu_name );
BOOL (WINAPI *pNtUserUnregisterHotKey)( HWND hwnd, INT id );
BOOL (WINAPI *pNtUserUpdateLayeredWindow)( HWND hwnd, HDC hdc_dst, const POINT *pts_dst,
const SIZE *size, HDC hdc_src, const POINT *pts_src,
COLORREF key, const BLENDFUNCTION *blend,
DWORD flags, const RECT *dirty );
WORD (WINAPI *pNtUserVkKeyScanEx)( WCHAR chr, HKL layout );
HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y );
/* Wine-specific functions */
......
......@@ -725,12 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER
return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc );
}
HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserActivateKeyboardLayout( layout, flags );
}
HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps )
{
if (!unix_funcs) return 0;
......@@ -937,12 +931,6 @@ BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info )
return unix_funcs->pNtUserFlashWindowEx( info );
}
SHORT WINAPI NtUserGetAsyncKeyState( INT key )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetAsyncKeyState( key );
}
ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
struct client_menu_name *menu_name, BOOL ansi )
{
......@@ -956,12 +944,6 @@ HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params *
return unix_funcs->pNtUserGetClipboardData( format, params );
}
BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserGetCursorInfo( info );
}
HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags )
{
if (!unix_funcs) return 0;
......@@ -982,18 +964,6 @@ BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *modul
return unix_funcs->pNtUserGetIconInfo( icon, info, module, res_name, bpp, unk );
}
UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetKeyboardLayoutList( size, layouts );
}
INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetKeyNameText( lparam, buffer, size );
}
BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *info )
{
if (!unix_funcs) return 0;
......@@ -1042,12 +1012,6 @@ INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count )
return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count );
}
DWORD WINAPI NtUserGetQueueStatus( UINT flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetQueueStatus( flags );
}
BOOL WINAPI NtUserGetScrollBarInfo( HWND hwnd, LONG id, SCROLLBARINFO *info )
{
if (!unix_funcs) return FALSE;
......@@ -1091,12 +1055,6 @@ BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format )
return unix_funcs->pNtUserIsClipboardFormatAvailable( format );
}
UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout )
{
if (!unix_funcs) return -1;
return unix_funcs->pNtUserMapVirtualKeyEx( code, type, layout );
}
BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk )
{
if (!unix_funcs) return FALSE;
......@@ -1117,12 +1075,6 @@ ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *nam
return unix_funcs->pNtUserRegisterClassExWOW( wc, name, version, client_menu_name, fnid, flags, wow );
}
BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserRegisterHotKey( hwnd, id, modifiers, vk );
}
INT WINAPI NtUserReleaseDC( HWND hwnd, HDC hdc )
{
if (!unix_funcs) return 0;
......@@ -1151,12 +1103,6 @@ HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg )
return unix_funcs->pNtUserSelectPalette( hdc, hpal, bkg );
}
UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserSendInput( count, inputs, size );
}
HWND WINAPI NtUserSetActiveWindow( HWND hwnd )
{
if (!unix_funcs) return 0;
......@@ -1212,12 +1158,6 @@ BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNI
return unix_funcs->pNtUserSetCursorIconData( cursor, module, res_name, desc );
}
BOOL WINAPI NtUserSetCursorPos( INT x, INT y )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserSetCursorPos( x, y );
}
HWND WINAPI NtUserSetFocus( HWND hwnd )
{
if (!unix_funcs) return FALSE;
......@@ -1344,13 +1284,6 @@ BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr,
return unix_funcs->pNtUserSystemParametersInfoForDpi( action, val, ptr, winini, dpi );
}
INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
WCHAR *str, int size, UINT flags, HKL layout )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserToUnicodeEx( virt, scan, state, str, size, flags, layout );
}
BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info )
{
if (!unix_funcs) return FALSE;
......@@ -1370,12 +1303,6 @@ BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
return unix_funcs->pNtUserUnregisterClass( name, instance, client_menu_name );
}
BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserUnregisterHotKey( hwnd, id );
}
BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size,
HDC hdc_src, const POINT *pts_src, COLORREF key,
const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty )
......@@ -1385,12 +1312,6 @@ BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_
key, blend, flags, dirty );
}
WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserVkKeyScanEx( chr, layout );
}
HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y )
{
if (!unix_funcs) return 0;
......
......@@ -87,6 +87,7 @@
SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \
SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtUserActivateKeyboardLayout ) \
SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserAssociateInputContext ) \
SYSCALL_ENTRY( NtUserAttachThreadInput ) \
......@@ -109,6 +110,7 @@
SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \
SYSCALL_ENTRY( NtUserFindWindowEx ) \
SYSCALL_ENTRY( NtUserGetAncestor ) \
SYSCALL_ENTRY( NtUserGetAsyncKeyState ) \
SYSCALL_ENTRY( NtUserGetAtomName ) \
SYSCALL_ENTRY( NtUserGetCaretBlinkTime ) \
SYSCALL_ENTRY( NtUserGetCaretPos ) \
......@@ -119,13 +121,16 @@
SYSCALL_ENTRY( NtUserGetClipboardViewer ) \
SYSCALL_ENTRY( NtUserGetCursor ) \
SYSCALL_ENTRY( NtUserGetCursorFrameInfo ) \
SYSCALL_ENTRY( NtUserGetCursorInfo ) \
SYSCALL_ENTRY( NtUserGetDoubleClickTime ) \
SYSCALL_ENTRY( NtUserGetDpiForMonitor ) \
SYSCALL_ENTRY( NtUserGetForegroundWindow ) \
SYSCALL_ENTRY( NtUserGetGUIThreadInfo ) \
SYSCALL_ENTRY( NtUserGetIconSize ) \
SYSCALL_ENTRY( NtUserGetKeyNameText ) \
SYSCALL_ENTRY( NtUserGetKeyState ) \
SYSCALL_ENTRY( NtUserGetKeyboardLayout ) \
SYSCALL_ENTRY( NtUserGetKeyboardLayoutList ) \
SYSCALL_ENTRY( NtUserGetKeyboardLayoutName ) \
SYSCALL_ENTRY( NtUserGetKeyboardState ) \
SYSCALL_ENTRY( NtUserGetLayeredWindowAttributes ) \
......@@ -137,6 +142,7 @@
SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetProp ) \
SYSCALL_ENTRY( NtUserGetQueueStatus ) \
SYSCALL_ENTRY( NtUserGetRawInputBuffer ) \
SYSCALL_ENTRY( NtUserGetRawInputData ) \
SYSCALL_ENTRY( NtUserGetRawInputDeviceInfo ) \
......@@ -150,6 +156,7 @@
SYSCALL_ENTRY( NtUserInternalGetWindowText ) \
SYSCALL_ENTRY( NtUserKillTimer ) \
SYSCALL_ENTRY( NtUserLockWindowUpdate ) \
SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \
SYSCALL_ENTRY( NtUserMenuItemFromPoint ) \
SYSCALL_ENTRY( NtUserMessageCall ) \
SYSCALL_ENTRY( NtUserMsgWaitForMultipleObjectsEx ) \
......@@ -161,10 +168,13 @@
SYSCALL_ENTRY( NtUserPostMessage ) \
SYSCALL_ENTRY( NtUserPostThreadMessage ) \
SYSCALL_ENTRY( NtUserQueryInputContext ) \
SYSCALL_ENTRY( NtUserRegisterHotKey ) \
SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserRemoveMenu ) \
SYSCALL_ENTRY( NtUserRemoveProp ) \
SYSCALL_ENTRY( NtUserSendInput ) \
SYSCALL_ENTRY( NtUserSetCursorPos ) \
SYSCALL_ENTRY( NtUserSetKeyboardState ) \
SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \
SYSCALL_ENTRY( NtUserSetMenuDefaultItem ) \
......@@ -179,11 +189,14 @@
SYSCALL_ENTRY( NtUserSetWindowsHookEx ) \
SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \
SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \
SYSCALL_ENTRY( NtUserToUnicodeEx ) \
SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \
SYSCALL_ENTRY( NtUserTranslateMessage ) \
SYSCALL_ENTRY( NtUserUnhookWinEvent ) \
SYSCALL_ENTRY( NtUserUnhookWindowsHookEx ) \
SYSCALL_ENTRY( NtUserUnregisterHotKey ) \
SYSCALL_ENTRY( NtUserUpdateInputContext ) \
SYSCALL_ENTRY( NtUserVkKeyScanEx ) \
SYSCALL_ENTRY( NtUserWaitForInputIdle ) \
SYSCALL_ENTRY( NtUserWindowFromDC )
......
......@@ -78,6 +78,36 @@ typedef struct
DWORD dwType;
} RAWINPUTDEVICELIST32;
typedef struct
{
LONG dx;
LONG dy;
DWORD mouseData;
DWORD dwFlags;
DWORD time;
ULONG dwExtraInfo;
} MOUSEINPUT32;
typedef struct
{
WORD wVk;
WORD wScan;
DWORD dwFlags;
DWORD time;
ULONG dwExtraInfo;
} KEYBDINPUT32;
typedef struct
{
DWORD type;
union
{
MOUSEINPUT32 mi;
KEYBDINPUT32 ki;
HARDWAREINPUT hi;
} DUMMYUNIONNAME;
} INPUT32;
static MSG *msg_32to64( MSG *msg, const MSG32 *msg32 )
{
if (!msg32) return NULL;
......@@ -104,6 +134,14 @@ static MSG32 *msg_64to32( MSG *msg, MSG32 *msg32 )
return msg32;
}
NTSTATUS WINAPI wow64_NtUserActivateKeyboardLayout( UINT *args )
{
HKL layout = get_handle( &args );
UINT flags = get_ulong( &args );
return HandleToUlong( NtUserActivateKeyboardLayout( layout, flags ));
}
NTSTATUS WINAPI wow64_NtUserAddClipboardFormatListener( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -333,6 +371,13 @@ NTSTATUS WINAPI wow64_NtUserGetAncestor( UINT *args )
return HandleToUlong( NtUserGetAncestor( hwnd, type ));
}
NTSTATUS WINAPI wow64_NtUserGetAsyncKeyState( UINT *args )
{
INT key = get_ulong( &args );
return NtUserGetAsyncKeyState( key );
}
NTSTATUS WINAPI wow64_NtUserGetAtomName( UINT *args )
{
ATOM atom = get_ulong( &args );
......@@ -405,6 +450,26 @@ NTSTATUS WINAPI wow64_NtUserGetCursorFrameInfo( UINT *args )
return HandleToUlong( NtUserGetCursorFrameInfo( cursor, istep, rate_jiffies, num_steps ));
}
NTSTATUS WINAPI wow64_NtUserGetCursorInfo( UINT *args )
{
struct
{
DWORD cbSize;
DWORD flags;
ULONG hCursor;
POINT ptScreenPos;
} *info32 = get_ptr( &args );
CURSORINFO info;
if (!info32) return FALSE;
info.cbSize = sizeof(info);
if (!NtUserGetCursorInfo( &info )) return FALSE;
info32->flags = info.flags;
info32->hCursor = HandleToUlong( info.hCursor );
info32->ptScreenPos = info.ptScreenPos;
return TRUE;
}
NTSTATUS WINAPI wow64_NtUserGetDoubleClickTime( UINT *args )
{
return NtUserGetDoubleClickTime();
......@@ -471,6 +536,15 @@ NTSTATUS WINAPI wow64_NtUserGetIconSize( UINT *args )
return NtUserGetIconSize( handle, step, width, height );
}
NTSTATUS WINAPI wow64_NtUserGetKeyNameText( UINT *args )
{
LONG lparam = get_ulong( &args );
WCHAR *buffer = get_ptr( &args );
INT size = get_ulong( &args );
return NtUserGetKeyNameText( lparam, buffer, size );
}
NTSTATUS WINAPI wow64_NtUserGetKeyState( UINT *args )
{
INT vkey = get_ulong( &args );
......@@ -485,6 +559,22 @@ NTSTATUS WINAPI wow64_NtUserGetKeyboardLayout( UINT *args )
return HandleToUlong( NtUserGetKeyboardLayout( tid ));
}
NTSTATUS WINAPI wow64_NtUserGetKeyboardLayoutList( UINT *args )
{
INT size = get_ulong( &args );
UINT32 *layouts32 = get_ptr( &args );
HKL *layouts = NULL;
UINT ret, i;
if (layouts32 && size && !(layouts = Wow64AllocateTemp( size * sizeof(*layouts) )))
return 0;
ret = NtUserGetKeyboardLayoutList( size, layouts );
if (layouts)
for (i = 0; i < ret; i++) layouts32[i] = HandleToUlong( layouts[i] );
return ret;
}
NTSTATUS WINAPI wow64_NtUserGetKeyboardLayoutName( UINT *args )
{
WCHAR *name = get_ptr( &args );
......@@ -579,6 +669,13 @@ NTSTATUS WINAPI wow64_NtUserGetProp( UINT *args )
return HandleToUlong( NtUserGetProp( hwnd, str ));
}
NTSTATUS WINAPI wow64_NtUserGetQueueStatus( UINT *args )
{
UINT flags = get_ulong( &args );
return NtUserGetQueueStatus( flags );
}
NTSTATUS WINAPI wow64_NtUserGetRawInputBuffer( UINT *args )
{
RAWINPUT *data = get_ptr( &args );
......@@ -839,6 +936,15 @@ NTSTATUS WINAPI wow64_NtUserLockWindowUpdate( UINT *args )
return NtUserLockWindowUpdate( hwnd );
}
NTSTATUS WINAPI wow64_NtUserMapVirtualKeyEx( UINT *args )
{
UINT code = get_ulong( &args );
UINT type = get_ulong( &args );
HKL layout = get_handle( &args );
return NtUserMapVirtualKeyEx( code, type, layout );
}
NTSTATUS WINAPI wow64_NtUserMenuItemFromPoint( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -969,6 +1075,16 @@ NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args )
return NtUserQueryInputContext( handle, attr );
}
NTSTATUS WINAPI wow64_NtUserRegisterHotKey( UINT *args )
{
HWND hwnd = get_handle( &args );
INT id = get_ulong( &args );
UINT modifiers = get_ulong( &args );
UINT vk = get_ulong( &args );
return NtUserRegisterHotKey( hwnd, id, modifiers, vk );
}
NTSTATUS WINAPI wow64_NtUserRegisterRawInputDevices( UINT *args )
{
const RAWINPUTDEVICE32 *devices32 = get_ptr( &args );
......@@ -1025,6 +1141,61 @@ NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args )
return HandleToUlong( NtUserRemoveProp( hwnd, str ));
}
NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args )
{
UINT count = get_ulong( &args );
INPUT32 *inputs32 = get_ptr( &args );
int size = get_ulong( &args );
INPUT *inputs = NULL;
unsigned int i;
if (size != sizeof(*inputs32))
{
SetLastError( ERROR_INVALID_PARAMETER );
return 0;
}
if (count && !(inputs = Wow64AllocateTemp( count * sizeof(*inputs) )))
return 0;
for (i = 0; i < count; i++)
{
inputs[i].type = inputs32[i].type;
switch (inputs[i].type)
{
case INPUT_MOUSE:
inputs[i].mi.dx = inputs32[i].mi.dx;
inputs[i].mi.dy = inputs32[i].mi.dy;
inputs[i].mi.mouseData = inputs32[i].mi.mouseData;
inputs[i].mi.dwFlags = inputs32[i].mi.dwFlags;
inputs[i].mi.time = inputs32[i].mi.time;
inputs[i].mi.dwExtraInfo = inputs32[i].mi.dwExtraInfo;
break;
case INPUT_KEYBOARD:
inputs[i].ki.wVk = inputs32[i].ki.wVk;
inputs[i].ki.wScan = inputs32[i].ki.wScan;
inputs[i].ki.dwFlags = inputs32[i].ki.dwFlags;
inputs[i].ki.time = inputs32[i].ki.time;
inputs[i].ki.dwExtraInfo = inputs32[i].ki.dwExtraInfo;
break;
case INPUT_HARDWARE:
inputs[i].hi = inputs32[i].hi;
break;
}
}
return NtUserSendInput( count, inputs, sizeof(*inputs) );
}
NTSTATUS WINAPI wow64_NtUserSetCursorPos( UINT *args )
{
INT x = get_ulong( &args );
INT y = get_ulong( &args );
return NtUserSetCursorPos( x, y );
}
NTSTATUS WINAPI wow64_NtUserSetKeyboardState( UINT *args )
{
BYTE *state = get_ptr( &args );
......@@ -1212,6 +1383,19 @@ NTSTATUS WINAPI wow64_NtUserThunkedMenuItemInfo( UINT *args )
unicode_str_32to64( &str, str32 ));
}
NTSTATUS WINAPI wow64_NtUserToUnicodeEx( UINT *args )
{
UINT virt = get_ulong( &args );
UINT scan = get_ulong( &args );
const BYTE *state = get_ptr( &args );
WCHAR *str = get_ptr( &args );
int size = get_ulong( &args );
UINT flags = get_ulong( &args );
HKL layout = get_handle( &args );
return NtUserToUnicodeEx( virt, scan, state, str, size, flags, layout );
}
NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args )
{
HMENU handle = get_handle( &args );
......@@ -1247,6 +1431,14 @@ NTSTATUS WINAPI wow64_NtUserUnhookWindowsHookEx( UINT *args )
return NtUserUnhookWindowsHookEx( handle );
}
NTSTATUS WINAPI wow64_NtUserUnregisterHotKey( UINT *args )
{
HWND hwnd = get_handle( &args );
int id = get_ulong( &args );
return NtUserUnregisterHotKey( hwnd, id );
}
NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args )
{
HIMC handle = get_handle( &args );
......@@ -1256,6 +1448,14 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args )
return NtUserUpdateInputContext( handle, attr, value );
}
NTSTATUS WINAPI wow64_NtUserVkKeyScanEx( UINT *args )
{
WCHAR chr = get_ulong( &args );
HKL layout = get_handle( &args );
return NtUserVkKeyScanEx( chr, layout );
}
NTSTATUS WINAPI wow64_NtUserWaitForInputIdle( UINT *args )
{
HANDLE process = get_handle( &args );
......
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