From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 11 ---- dlls/win32u/syscall.c | 11 ++++ dlls/win32u/win32u.spec | 22 +++---- dlls/win32u/win32u_private.h | 12 ---- dlls/win32u/wrappers.c | 67 --------------------- dlls/wow64win/syscall.h | 11 ++++ dlls/wow64win/user.c | 109 +++++++++++++++++++++++++++++++++++ 7 files changed, 142 insertions(+), 101 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index f6e918721a4..aeb043b33d1 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,11 +1136,8 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserChangeClipboardChain, NtUserChangeDisplaySettings, NtUserClipCursor, - NtUserCloseClipboard, - NtUserCountClipboardFormats, NtUserCreateCaret, NtUserCreateWindowEx, NtUserDeferWindowPosAndBand, @@ -1152,7 +1149,6 @@ static struct unix_funcs unix_funcs = NtUserDrawCaptionTemp, NtUserDrawIconEx, NtUserDrawMenuBarTemp, - NtUserEmptyClipboard, NtUserEnableMenuItem, NtUserEnableScrollBar, NtUserEndDeferWindowPosEx, @@ -1163,32 +1159,25 @@ static struct unix_funcs unix_funcs = NtUserExcludeUpdateRgn, NtUserFlashWindowEx, NtUserGetClassInfoEx, - NtUserGetClipboardData, NtUserGetDisplayConfigBufferSizes, NtUserGetIconInfo, NtUserGetMenuBarInfo, - NtUserGetPriorityClipboardFormat, NtUserGetScrollBarInfo, NtUserGetSystemMenu, - NtUserGetUpdatedClipboardFormats, NtUserGetWindowPlacement, NtUserHideCaret, NtUserHiliteMenuItem, NtUserInternalGetWindowIcon, - NtUserIsClipboardFormatAvailable, NtUserMoveWindow, - NtUserOpenClipboard, NtUserRegisterClassExWOW, NtUserReleaseDC, NtUserScrollDC, NtUserSelectPalette, NtUserSetActiveWindow, NtUserSetCapture, - NtUserSetClipboardData, NtUserSetClassLong, NtUserSetClassLongPtr, NtUserSetClassWord, - NtUserSetClipboardViewer, NtUserSetCursor, NtUserSetCursorIconData, NtUserSetFocus, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index ffe1703e1e7..3a4fc085ac6 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -113,11 +113,14 @@ static void * const syscalls[] = NtUserCallNoParam, NtUserCallOneParam, NtUserCallTwoParam, + NtUserChangeClipboardChain, NtUserCheckMenuItem, NtUserChildWindowFromPointEx, + NtUserCloseClipboard, NtUserCloseDesktop, NtUserCloseWindowStation, NtUserCopyAcceleratorTable, + NtUserCountClipboardFormats, NtUserCreateAcceleratorTable, NtUserCreateDesktopEx, NtUserCreateInputContext, @@ -126,6 +129,7 @@ static void * const syscalls[] = NtUserDestroyAcceleratorTable, NtUserDestroyInputContext, NtUserDispatchMessage, + NtUserEmptyClipboard, NtUserEndMenu, NtUserFindExistingCursorIcon, NtUserFindWindowEx, @@ -135,6 +139,7 @@ static void * const syscalls[] = NtUserGetCaretBlinkTime, NtUserGetCaretPos, NtUserGetClassName, + NtUserGetClipboardData, NtUserGetClipboardFormatName, NtUserGetClipboardOwner, NtUserGetClipboardSequenceNumber, @@ -160,6 +165,7 @@ static void * const syscalls[] = NtUserGetMouseMovePointsEx, NtUserGetObjectInformation, NtUserGetOpenClipboardWindow, + NtUserGetPriorityClipboardFormat, NtUserGetProcessDpiAwarenessContext, NtUserGetProcessWindowStation, NtUserGetProp, @@ -174,11 +180,13 @@ static void * const syscalls[] = NtUserGetTitleBarInfo, NtUserGetUpdateRect, NtUserGetUpdateRgn, + NtUserGetUpdatedClipboardFormats, NtUserGetWindowRgnEx, NtUserInitializeClientPfnArrays, NtUserInternalGetWindowText, NtUserInvalidateRect, NtUserInvalidateRgn, + NtUserIsClipboardFormatAvailable, NtUserKillTimer, NtUserLockWindowUpdate, NtUserMapVirtualKeyEx, @@ -186,6 +194,7 @@ static void * const syscalls[] = NtUserMessageCall, NtUserMsgWaitForMultipleObjectsEx, NtUserNotifyWinEvent, + NtUserOpenClipboard, NtUserOpenDesktop, NtUserOpenInputDesktop, NtUserOpenWindowStation, @@ -201,6 +210,8 @@ static void * const syscalls[] = NtUserRemoveProp, NtUserScrollWindowEx, NtUserSendInput, + NtUserSetClipboardData, + NtUserSetClipboardViewer, NtUserSetCursorPos, NtUserSetKeyboardState, NtUserSetMenuContextHelpId, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index d12b904d3bb..3db0092e8a9 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -782,7 +782,7 @@ @ stdcall -syscall NtUserCallOneParam(long long) @ stdcall -syscall NtUserCallTwoParam(long long long) @ stub NtUserCanBrokerForceForeground -@ stdcall NtUserChangeClipboardChain(long long) +@ stdcall -syscall NtUserChangeClipboardChain(long long) @ stdcall NtUserChangeDisplaySettings(ptr ptr long long ptr) @ stub NtUserChangeWindowMessageFilterEx @ stub NtUserCheckAccessForIntegrityLevel @@ -793,7 +793,7 @@ @ stdcall -syscall NtUserChildWindowFromPointEx(long long long long) @ stub NtUserClearForeground @ stdcall NtUserClipCursor(ptr) -@ stdcall NtUserCloseClipboard() +@ stdcall -syscall NtUserCloseClipboard() @ stdcall -syscall NtUserCloseDesktop(long) @ stdcall -syscall NtUserCloseWindowStation(long) @ stub NtUserCompositionInputSinkLuidFromPoint @@ -803,7 +803,7 @@ @ stub NtUserConsoleControl @ stub NtUserConvertMemHandle @ stdcall -syscall NtUserCopyAcceleratorTable(long ptr long) -@ stdcall NtUserCountClipboardFormats() +@ stdcall -syscall NtUserCountClipboardFormats() @ stdcall -syscall NtUserCreateAcceleratorTable(ptr long) @ stub NtUserCreateActivationGroup @ stub NtUserCreateActivationObject @@ -857,7 +857,7 @@ @ stub NtUserDwmKernelShutdown @ stub NtUserDwmKernelStartup @ stub NtUserDwmValidateWindow -@ stdcall NtUserEmptyClipboard() +@ stdcall -syscall NtUserEmptyClipboard() @ stub NtUserEnableChildWindowDpiMessage @ stub NtUserEnableIAMAccess @ stdcall NtUserEnableMenuItem(long long long) @@ -902,7 +902,7 @@ @ stdcall -syscall NtUserGetClassName(long long ptr) @ stub NtUserGetClipCursor @ stub NtUserGetClipboardAccessToken -@ stdcall NtUserGetClipboardData(long ptr) +@ stdcall -syscall NtUserGetClipboardData(long ptr) @ stdcall -syscall NtUserGetClipboardFormatName(long ptr long) @ stdcall -syscall NtUserGetClipboardOwner() @ stdcall -syscall NtUserGetClipboardSequenceNumber() @@ -976,7 +976,7 @@ @ stub NtUserGetPointerProprietaryId @ stub NtUserGetPointerType @ stub NtUserGetPrecisionTouchPadConfiguration -@ stdcall NtUserGetPriorityClipboardFormat(ptr long) +@ stdcall -syscall NtUserGetPriorityClipboardFormat(ptr long) @ stdcall -syscall NtUserGetProcessDpiAwarenessContext(long) @ stub NtUserGetProcessUIContextInformation @ stdcall -syscall NtUserGetProcessWindowStation() @@ -1004,7 +1004,7 @@ @ stub NtUserGetUniformSpaceMapping @ stdcall -syscall NtUserGetUpdateRect(long ptr long) @ stdcall -syscall NtUserGetUpdateRgn(long long long) -@ stdcall NtUserGetUpdatedClipboardFormats(ptr long ptr) +@ stdcall -syscall NtUserGetUpdatedClipboardFormats(ptr long ptr) @ stub NtUserGetWOWClass @ stub NtUserGetWindowBand @ stub NtUserGetWindowCompositionAttribute @@ -1050,7 +1050,7 @@ @ stdcall -syscall NtUserInvalidateRect(long ptr long) @ stdcall -syscall NtUserInvalidateRgn(long long long) @ stub NtUserIsChildWindowDpiMessageEnabled -@ stdcall NtUserIsClipboardFormatAvailable(long) +@ stdcall -syscall NtUserIsClipboardFormatAvailable(long) @ stub NtUserIsMouseInPointerEnabled @ stub NtUserIsMouseInputEnabled @ stub NtUserIsNonClientDpiScalingEnabled @@ -1090,7 +1090,7 @@ @ stub NtUserNotifyIMEStatus @ stub NtUserNotifyProcessCreate @ stdcall -syscall NtUserNotifyWinEvent(long long long long) -@ stdcall NtUserOpenClipboard(long long) +@ stdcall -syscall NtUserOpenClipboard(long long) @ stdcall -syscall NtUserOpenDesktop(ptr long long) @ stdcall -syscall NtUserOpenInputDesktop(long long long) @ stub NtUserOpenThreadDesktop @@ -1174,8 +1174,8 @@ @ stdcall NtUserSetClassLong(long long long long) @ stdcall NtUserSetClassLongPtr(long long long long) @ stdcall NtUserSetClassWord(long long long) -@ stdcall NtUserSetClipboardData(long ptr ptr) -@ stdcall NtUserSetClipboardViewer(long) +@ stdcall -syscall NtUserSetClipboardData(long ptr ptr) +@ stdcall -syscall NtUserSetClipboardViewer(long) @ stub NtUserSetCoreWindow @ stub NtUserSetCoreWindowPartner @ stdcall NtUserSetCursor(long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 4fa0b0e3493..5351f98022b 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,12 +186,9 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - BOOL (WINAPI *pNtUserChangeClipboardChain)( HWND hwnd, HWND next ); LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, DWORD flags, void *lparam ); BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect ); - BOOL (WINAPI *pNtUserCloseClipboard)(void); - INT (WINAPI *pNtUserCountClipboardFormats)(void); BOOL (WINAPI *pNtUserCreateCaret)( HWND hwnd, HBITMAP bitmap, int width, int height ); HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name, UNICODE_STRING *version, UNICODE_STRING *window_name, @@ -211,7 +208,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserDrawIconEx)( HDC hdc, INT x0, INT y0, HICON icon, INT width, INT height, UINT istep, HBRUSH hbr, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); - BOOL (WINAPI *pNtUserEmptyClipboard)(void); BOOL (WINAPI *pNtUserEnableMenuItem)( HMENU handle, UINT id, UINT flags ); BOOL (WINAPI *pNtUserEnableScrollBar)( HWND hwnd, UINT bar, UINT flags ); BOOL (WINAPI *pNtUserEndDeferWindowPosEx)( HDWP hdwp, BOOL async ); @@ -225,23 +221,18 @@ struct unix_funcs BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info ); 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 ); 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 ); BOOL (WINAPI *pNtUserGetMenuBarInfo)( HWND hwnd, LONG id, LONG item, MENUBARINFO *info ); - INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count ); BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info ); HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert ); - BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserGetWindowPlacement)( HWND hwnd, WINDOWPLACEMENT *placement ); BOOL (WINAPI *pNtUserHideCaret)( HWND hwnd ); BOOL (WINAPI *pNtUserHiliteMenuItem)( HWND hwnd, HMENU handle, UINT item, UINT hilite ); HICON (WINAPI *pNtUserInternalGetWindowIcon)( HWND hwnd, UINT type ); - BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); - BOOL (WINAPI *pNtUserOpenClipboard)( HWND hwnd, ULONG unk ); ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, @@ -252,12 +243,9 @@ struct unix_funcs HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg ); HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd ); HWND (WINAPI *pNtUserSetCapture)( HWND hwnd ); - NTSTATUS (WINAPI *pNtUserSetClipboardData)( UINT format, HANDLE handle, - struct set_clipboard_params *params ); DWORD (WINAPI *pNtUserSetClassLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi ); ULONG_PTR (WINAPI *pNtUserSetClassLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi ); WORD (WINAPI *pNtUserSetClassWord)( HWND hwnd, INT offset, WORD newval ); - HWND (WINAPI *pNtUserSetClipboardViewer)( HWND hwnd ); HCURSOR (WINAPI *pNtUserSetCursor)( HCURSOR cursor ); BOOL (WINAPI *pNtUserSetCursorIconData)( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name, struct cursoricon_desc *desc ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index c9cf89f5fe7..678cc6af6ef 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,18 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-BOOL WINAPI NtUserCloseClipboard(void) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserCloseClipboard(); -} - -BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next ) -{ - if (!unix_funcs) return DISP_CHANGE_FAILED; - return unix_funcs->pNtUserChangeClipboardChain( hwnd, next ); -} - LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, DWORD flags, void *lparam ) { @@ -750,12 +738,6 @@ BOOL WINAPI NtUserClipCursor( const RECT *rect ) return unix_funcs->pNtUserClipCursor( rect ); }
-INT WINAPI NtUserCountClipboardFormats(void) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCountClipboardFormats(); -} - BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height ) { if (!unix_funcs) return 0; @@ -851,12 +833,6 @@ BOOL WINAPI NtUserEndDeferWindowPosEx( HDWP hdwp, BOOL async ) return unix_funcs->pNtUserEndDeferWindowPosEx( hdwp, async ); }
-BOOL WINAPI NtUserEmptyClipboard(void) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserEmptyClipboard(); -} - NTSTATUS WINAPI NtUserEnumDisplayDevices( UNICODE_STRING *device, DWORD index, DISPLAY_DEVICEW *info, DWORD flags ) { @@ -896,12 +872,6 @@ ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDC return unix_funcs->pNtUserGetClassInfoEx( instance, name, wc, menu_name, ansi ); }
-HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params *params ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetClipboardData( format, params ); -} - LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info, UINT32 *num_mode_info ) { @@ -946,25 +916,12 @@ BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repa return unix_funcs->pNtUserMoveWindow( hwnd, x, y, cx, cy, repaint ); }
-INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count ); -} - BOOL WINAPI NtUserGetScrollBarInfo( HWND hwnd, LONG id, SCROLLBARINFO *info ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtUserGetScrollBarInfo( hwnd, id, info ); }
-BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserGetUpdatedClipboardFormats( formats, size, out_size ); -} - - BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement ) { if (!unix_funcs) return FALSE; @@ -977,18 +934,6 @@ HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type ) return unix_funcs->pNtUserInternalGetWindowIcon( hwnd, type ); }
-BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserIsClipboardFormatAvailable( format ); -} - -BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserOpenClipboard( hwnd, unk ); -} - ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags, DWORD *wow ) @@ -1028,12 +973,6 @@ HWND WINAPI NtUserSetCapture( HWND hwnd ) return unix_funcs->pNtUserSetCapture( hwnd ); }
-NTSTATUS WINAPI NtUserSetClipboardData( UINT format, HANDLE handle, struct set_clipboard_params *params ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetClipboardData( format, handle, params ); -} - HCURSOR WINAPI NtUserSetCursor( HCURSOR cursor ) { if (!unix_funcs) return 0; @@ -1058,12 +997,6 @@ WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval ) return unix_funcs->pNtUserSetClassWord( hwnd, offset, newval ); }
-HWND WINAPI NtUserSetClipboardViewer( HWND hwnd ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetClipboardViewer( hwnd ); -} - BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name, struct cursoricon_desc *desc ) { diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 8ff061ec7f8..82849ccd466 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -100,11 +100,14 @@ SYSCALL_ENTRY( NtUserCallNoParam ) \ SYSCALL_ENTRY( NtUserCallOneParam ) \ SYSCALL_ENTRY( NtUserCallTwoParam ) \ + SYSCALL_ENTRY( NtUserChangeClipboardChain ) \ SYSCALL_ENTRY( NtUserCheckMenuItem ) \ SYSCALL_ENTRY( NtUserChildWindowFromPointEx ) \ + SYSCALL_ENTRY( NtUserCloseClipboard ) \ SYSCALL_ENTRY( NtUserCloseDesktop ) \ SYSCALL_ENTRY( NtUserCloseWindowStation ) \ SYSCALL_ENTRY( NtUserCopyAcceleratorTable ) \ + SYSCALL_ENTRY( NtUserCountClipboardFormats ) \ SYSCALL_ENTRY( NtUserCreateAcceleratorTable ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ SYSCALL_ENTRY( NtUserCreateInputContext ) \ @@ -113,6 +116,7 @@ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserDestroyInputContext ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \ + SYSCALL_ENTRY( NtUserEmptyClipboard ) \ SYSCALL_ENTRY( NtUserEndMenu ) \ SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \ SYSCALL_ENTRY( NtUserFindWindowEx ) \ @@ -122,6 +126,7 @@ SYSCALL_ENTRY( NtUserGetCaretBlinkTime ) \ SYSCALL_ENTRY( NtUserGetCaretPos ) \ SYSCALL_ENTRY( NtUserGetClassName ) \ + SYSCALL_ENTRY( NtUserGetClipboardData ) \ SYSCALL_ENTRY( NtUserGetClipboardFormatName ) \ SYSCALL_ENTRY( NtUserGetClipboardOwner ) \ SYSCALL_ENTRY( NtUserGetClipboardSequenceNumber ) \ @@ -147,6 +152,7 @@ SYSCALL_ENTRY( NtUserGetMouseMovePointsEx ) \ SYSCALL_ENTRY( NtUserGetObjectInformation ) \ SYSCALL_ENTRY( NtUserGetOpenClipboardWindow ) \ + SYSCALL_ENTRY( NtUserGetPriorityClipboardFormat ) \ SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \ SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserGetProp ) \ @@ -161,11 +167,13 @@ SYSCALL_ENTRY( NtUserGetTitleBarInfo ) \ SYSCALL_ENTRY( NtUserGetUpdateRect ) \ SYSCALL_ENTRY( NtUserGetUpdateRgn ) \ + SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \ SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \ SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \ SYSCALL_ENTRY( NtUserInternalGetWindowText ) \ SYSCALL_ENTRY( NtUserInvalidateRect ) \ SYSCALL_ENTRY( NtUserInvalidateRgn ) \ + SYSCALL_ENTRY( NtUserIsClipboardFormatAvailable ) \ SYSCALL_ENTRY( NtUserKillTimer ) \ SYSCALL_ENTRY( NtUserLockWindowUpdate ) \ SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \ @@ -173,6 +181,7 @@ SYSCALL_ENTRY( NtUserMessageCall ) \ SYSCALL_ENTRY( NtUserMsgWaitForMultipleObjectsEx ) \ SYSCALL_ENTRY( NtUserNotifyWinEvent ) \ + SYSCALL_ENTRY( NtUserOpenClipboard ) \ SYSCALL_ENTRY( NtUserOpenDesktop ) \ SYSCALL_ENTRY( NtUserOpenInputDesktop ) \ SYSCALL_ENTRY( NtUserOpenWindowStation ) \ @@ -188,6 +197,8 @@ SYSCALL_ENTRY( NtUserRemoveProp ) \ SYSCALL_ENTRY( NtUserScrollWindowEx ) \ SYSCALL_ENTRY( NtUserSendInput ) \ + SYSCALL_ENTRY( NtUserSetClipboardData ) \ + SYSCALL_ENTRY( NtUserSetClipboardViewer ) \ SYSCALL_ENTRY( NtUserSetCursorPos ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 68d444a7c83..564f17f720b 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -286,6 +286,14 @@ NTSTATUS WINAPI wow64_NtUserCallTwoParam( UINT *args ) return 0; }
+NTSTATUS WINAPI wow64_NtUserChangeClipboardChain( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HWND next = get_handle( &args ); + + return NtUserChangeClipboardChain( hwnd, next ); +} + NTSTATUS WINAPI wow64_NtUserCheckMenuItem( UINT *args ) { HMENU handle = get_handle( &args ); @@ -305,6 +313,11 @@ NTSTATUS WINAPI wow64_NtUserChildWindowFromPointEx( UINT *args ) return HandleToUlong( NtUserChildWindowFromPointEx( parent, x, y, flags )); }
+NTSTATUS WINAPI wow64_NtUserCloseClipboard( UINT *args ) +{ + return NtUserCloseClipboard(); +} + NTSTATUS WINAPI wow64_NtUserCloseDesktop( UINT *args ) { HDESK handle = get_handle( &args ); @@ -328,6 +341,11 @@ NTSTATUS WINAPI wow64_NtUserCopyAcceleratorTable( UINT *args ) return NtUserCopyAcceleratorTable( src, dst, count ); }
+NTSTATUS WINAPI wow64_NtUserCountClipboardFormats( UINT *args ) +{ + return NtUserCountClipboardFormats(); +} + NTSTATUS WINAPI wow64_NtUserCreateAcceleratorTable( UINT *args ) { ACCEL *table = get_ptr( &args ); @@ -409,6 +427,11 @@ NTSTATUS WINAPI wow64_NtUserDispatchMessage( UINT *args ) return NtUserDispatchMessage( msg_32to64( &msg, msg32 )); }
+NTSTATUS WINAPI wow64_NtUserEmptyClipboard( UINT *args ) +{ + return NtUserEmptyClipboard(); +} + NTSTATUS WINAPI wow64_NtUserEndMenu( UINT *args ) { return NtUserEndMenu(); @@ -493,6 +516,32 @@ NTSTATUS WINAPI wow64_NtUserGetClassName( UINT *args ) return NtUserGetClassName( hwnd, real, unicode_str_32to64( &str, str32 )); }
+NTSTATUS WINAPI wow64_NtUserGetClipboardData( UINT *args ) +{ + UINT format = get_ulong( &args ); + struct + { + UINT32 data; + UINT32 size; + UINT32 data_size; + UINT seqno; + BOOL data_only; + } *params32 = get_ptr( &args ); + + struct get_clipboard_params params; + HANDLE ret; + + params.data = UlongToPtr( params32->data ); + params.size = params32->size; + + ret = NtUserGetClipboardData( format, ¶ms ); + + params32->data_size = params.data_size; + params32->seqno = params.seqno; + params32->data_only = params.data_only; + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtUserGetClipboardFormatName( UINT *args ) { UINT format = get_ulong( &args ); @@ -740,6 +789,14 @@ NTSTATUS WINAPI wow64_NtUserGetOpenClipboardWindow( UINT *args ) return HandleToUlong( NtUserGetOpenClipboardWindow() ); }
+NTSTATUS WINAPI wow64_NtUserGetPriorityClipboardFormat( UINT *args ) +{ + UINT *list = get_ptr( &args ); + INT count = get_ulong( &args ); + + return NtUserGetPriorityClipboardFormat( list, count ); +} + NTSTATUS WINAPI wow64_NtUserGetProcessDpiAwarenessContext( UINT *args ) { HANDLE process = get_handle( &args ); @@ -1006,6 +1063,15 @@ NTSTATUS WINAPI wow64_NtUserGetUpdateRgn( UINT *args ) return NtUserGetUpdateRgn( hwnd, hrgn, erase ); }
+NTSTATUS WINAPI wow64_NtUserGetUpdatedClipboardFormats( UINT *args ) +{ + UINT *formats = get_ptr( &args ); + UINT size = get_ulong( &args ); + UINT *out_size = get_ptr( &args ); + + return NtUserGetUpdatedClipboardFormats( formats, size, out_size ); +} + NTSTATUS WINAPI wow64_NtUserGetWindowRgnEx( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1048,6 +1114,13 @@ NTSTATUS WINAPI wow64_NtUserInvalidateRgn( UINT *args ) return NtUserInvalidateRgn( hwnd, hrgn, erase ); }
+NTSTATUS WINAPI wow64_NtUserIsClipboardFormatAvailable( UINT *args ) +{ + UINT format = get_ulong( &args ); + + return NtUserIsClipboardFormatAvailable( format ); +} + NTSTATUS WINAPI wow64_NtUserKillTimer( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1128,6 +1201,14 @@ NTSTATUS WINAPI wow64_NtUserNotifyWinEvent( UINT *args ) return 0; }
+NTSTATUS WINAPI wow64_NtUserOpenClipboard( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + ULONG unk = get_ulong( &args ); + + return NtUserOpenClipboard( hwnd, unk ); +} + NTSTATUS WINAPI wow64_NtUserOpenDesktop( UINT *args ) { OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); @@ -1339,6 +1420,34 @@ NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args ) return NtUserSendInput( count, inputs, sizeof(*inputs) ); }
+NTSTATUS WINAPI wow64_NtUserSetClipboardData( UINT *args ) +{ + UINT format = get_ulong( &args ); + HANDLE handle = get_handle( &args ); + struct + { + UINT32 data; + UINT32 size; + BOOL cache_only; + UINT seqno; + } *params32 = get_ptr( &args ); + + struct set_clipboard_params params; + params.data = UlongToPtr( params32->data ); + params.size = params32->size; + params.cache_only = params32->cache_only; + params.seqno = params32->seqno; + + return NtUserSetClipboardData( format, handle, ¶ms ); +} + +NTSTATUS WINAPI wow64_NtUserSetClipboardViewer( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return HandleToUlong( NtUserSetClipboardViewer( hwnd )); +} + NTSTATUS WINAPI wow64_NtUserSetCursorPos( UINT *args ) { INT x = get_ulong( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 6 ---- dlls/win32u/syscall.c | 6 ++++ dlls/win32u/sysparams.c | 5 ++- dlls/win32u/win32u.spec | 12 +++---- dlls/win32u/win32u_private.h | 17 --------- dlls/win32u/wrappers.c | 40 --------------------- dlls/wow64win/syscall.h | 6 ++++ dlls/wow64win/user.c | 67 ++++++++++++++++++++++++++++++++++++ 8 files changed, 89 insertions(+), 70 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index aeb043b33d1..4ccfd77dfa0 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,7 +1136,6 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserChangeDisplaySettings, NtUserClipCursor, NtUserCreateCaret, NtUserCreateWindowEx, @@ -1153,13 +1152,9 @@ static struct unix_funcs unix_funcs = NtUserEnableScrollBar, NtUserEndDeferWindowPosEx, NtUserEndPaint, - NtUserEnumDisplayDevices, - NtUserEnumDisplayMonitors, - NtUserEnumDisplaySettings, NtUserExcludeUpdateRgn, NtUserFlashWindowEx, NtUserGetClassInfoEx, - NtUserGetDisplayConfigBufferSizes, NtUserGetIconInfo, NtUserGetMenuBarInfo, NtUserGetScrollBarInfo, @@ -1186,7 +1181,6 @@ static struct unix_funcs unix_funcs = NtUserSetMenu, NtUserSetParent, NtUserSetScrollInfo, - NtUserSetSysColors, NtUserSetSystemMenu, NtUserSetWindowLong, NtUserSetWindowLongPtr, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 3a4fc085ac6..982a75a0bd9 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -114,6 +114,7 @@ static void * const syscalls[] = NtUserCallOneParam, NtUserCallTwoParam, NtUserChangeClipboardChain, + NtUserChangeDisplaySettings, NtUserCheckMenuItem, NtUserChildWindowFromPointEx, NtUserCloseClipboard, @@ -131,6 +132,9 @@ static void * const syscalls[] = NtUserDispatchMessage, NtUserEmptyClipboard, NtUserEndMenu, + NtUserEnumDisplayDevices, + NtUserEnumDisplayMonitors, + NtUserEnumDisplaySettings, NtUserFindExistingCursorIcon, NtUserFindWindowEx, NtUserGetAncestor, @@ -148,6 +152,7 @@ static void * const syscalls[] = NtUserGetCursorFrameInfo, NtUserGetCursorInfo, NtUserGetDCEx, + NtUserGetDisplayConfigBufferSizes, NtUserGetDoubleClickTime, NtUserGetDpiForMonitor, NtUserGetForegroundWindow, @@ -220,6 +225,7 @@ static void * const syscalls[] = NtUserSetProcessDpiAwarenessContext, NtUserSetProcessWindowStation, NtUserSetProp, + NtUserSetSysColors, NtUserSetSystemTimer, NtUserSetThreadDesktop, NtUserSetTimer, diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 8bb6b46397e..056a0e2a40b 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -2155,9 +2155,12 @@ BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc params.lparam = lparam; for (i = 0; i < count; i++) { + void *ret_ptr; + ULONG ret_len; params.monitor = enum_info[i].handle; params.rect = enum_info[i].rect; - if (!user32_call( NtUserCallEnumDisplayMonitor, ¶ms, sizeof(params) )) + if (!KeUserModeCallback( NtUserCallEnumDisplayMonitor, ¶ms, sizeof(params), + &ret_ptr, &ret_len )) { ret = FALSE; break; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 3db0092e8a9..a15e1cadbd3 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -783,7 +783,7 @@ @ stdcall -syscall NtUserCallTwoParam(long long long) @ stub NtUserCanBrokerForceForeground @ stdcall -syscall NtUserChangeClipboardChain(long long) -@ stdcall NtUserChangeDisplaySettings(ptr ptr long long ptr) +@ stdcall -syscall NtUserChangeDisplaySettings(ptr ptr long long ptr) @ stub NtUserChangeWindowMessageFilterEx @ stub NtUserCheckAccessForIntegrityLevel @ stdcall -syscall NtUserCheckMenuItem(long long long) @@ -875,9 +875,9 @@ @ stdcall NtUserEndDeferWindowPosEx(long long) @ stdcall -syscall NtUserEndMenu() @ stdcall NtUserEndPaint(long ptr) -@ stdcall NtUserEnumDisplayDevices(ptr long ptr long) -@ stdcall NtUserEnumDisplayMonitors(long ptr ptr long) -@ stdcall NtUserEnumDisplaySettings(ptr long ptr long) +@ stdcall -syscall NtUserEnumDisplayDevices(ptr long ptr long) +@ stdcall -syscall NtUserEnumDisplayMonitors(long ptr ptr long) +@ stdcall -syscall NtUserEnumDisplaySettings(ptr long ptr long) @ stub NtUserEvent @ stdcall NtUserExcludeUpdateRgn(long long) @ stub NtUserFillWindow @@ -921,7 +921,7 @@ @ stub NtUserGetDesktopID @ stub NtUserGetDisplayAutoRotationPreferences @ stub NtUserGetDisplayAutoRotationPreferencesByProcessId -@ stdcall NtUserGetDisplayConfigBufferSizes(long ptr ptr) +@ stdcall -syscall NtUserGetDisplayConfigBufferSizes(long ptr ptr) @ stdcall -syscall NtUserGetDoubleClickTime() @ stub NtUserGetDpiForCurrentProcess @ stdcall -syscall NtUserGetDpiForMonitor(long long ptr ptr) @@ -1227,7 +1227,7 @@ @ stub NtUserSetSensorPresence @ stub NtUserSetSharedWindowData @ stub NtUserSetShellWindowEx -@ stdcall NtUserSetSysColors(long ptr ptr) +@ stdcall -syscall NtUserSetSysColors(long ptr ptr) @ stub NtUserSetSystemCursor @ stdcall NtUserSetSystemMenu(long long) @ stdcall -syscall NtUserSetSystemTimer(long long long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 5351f98022b..50236ea2c63 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,8 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - LONG (WINAPI *pNtUserChangeDisplaySettings)( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, - DWORD flags, void *lparam ); BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect ); BOOL (WINAPI *pNtUserCreateCaret)( HWND hwnd, HBITMAP bitmap, int width, int height ); HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name, @@ -212,17 +210,10 @@ struct unix_funcs BOOL (WINAPI *pNtUserEnableScrollBar)( HWND hwnd, UINT bar, UINT flags ); BOOL (WINAPI *pNtUserEndDeferWindowPosEx)( HDWP hdwp, BOOL async ); BOOL (WINAPI *pNtUserEndPaint)( HWND hwnd, const PAINTSTRUCT *ps ); - NTSTATUS (WINAPI *pNtUserEnumDisplayDevices)( UNICODE_STRING *device, DWORD index, - DISPLAY_DEVICEW *info, DWORD flags ); - BOOL (WINAPI *pNtUserEnumDisplayMonitors)( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp ); - BOOL (WINAPI *pNtUserEnumDisplaySettings)( UNICODE_STRING *device, DWORD mode, - DEVMODEW *dev_mode, DWORD flags ); INT (WINAPI *pNtUserExcludeUpdateRgn)( HDC hdc, HWND hwnd ); BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info ); ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc, struct client_menu_name *menu_name, BOOL ansi ); - 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 ); BOOL (WINAPI *pNtUserGetMenuBarInfo)( HWND hwnd, LONG id, LONG item, MENUBARINFO *info ); @@ -255,7 +246,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserSetMenu)( HWND hwnd, HMENU menu ); HWND (WINAPI *pNtUserSetParent)( HWND hwnd, HWND parent ); INT (WINAPI *pNtUserSetScrollInfo)( HWND hwnd, INT bar, const SCROLLINFO *info, BOOL redraw ); - BOOL (WINAPI *pNtUserSetSysColors)( INT count, const INT *colors, const COLORREF *values ); BOOL (WINAPI *pNtUserSetSystemMenu)( HWND hwnd, HMENU menu ); LONG (WINAPI *pNtUserSetWindowLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi ); LONG_PTR (WINAPI *pNtUserSetWindowLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi ); @@ -520,13 +510,6 @@ static inline struct user_thread_info *get_user_thread_info(void)
extern const struct user_driver_funcs *user_driver DECLSPEC_HIDDEN;
-static inline NTSTATUS user32_call( ULONG id, void *args, ULONG len ) -{ - /* FIXME: use KeUserModeCallback instead */ - NTSTATUS (WINAPI *func)(void *, ULONG) = ((void **)NtCurrentTeb()->Peb->KernelCallbackTable)[id]; - return func( args, len ); -} - static inline BOOL set_ntstatus( NTSTATUS status ) { if (status) SetLastError( RtlNtStatusToDosError( status )); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 678cc6af6ef..5b0e4f19b0f 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,13 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd, - DWORD flags, void *lparam ) -{ - if (!unix_funcs) return DISP_CHANGE_FAILED; - return unix_funcs->pNtUserChangeDisplaySettings( devname, devmode, hwnd, flags, lparam ); -} - BOOL WINAPI NtUserClipCursor( const RECT *rect ) { if (!unix_funcs) return FALSE; @@ -833,26 +826,6 @@ BOOL WINAPI NtUserEndDeferWindowPosEx( HDWP hdwp, BOOL async ) return unix_funcs->pNtUserEndDeferWindowPosEx( hdwp, async ); }
-NTSTATUS WINAPI NtUserEnumDisplayDevices( UNICODE_STRING *device, DWORD index, - DISPLAY_DEVICEW *info, DWORD flags ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserEnumDisplayDevices( device, index, info, flags ); -} - -BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserEnumDisplayMonitors( hdc, rect, proc, lp ); -} - -BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD mode, - DEVMODEW *dev_mode, DWORD flags ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserEnumDisplaySettings( device, mode, dev_mode, flags ); -} - INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd ) { if (!unix_funcs) return ERROR; @@ -872,13 +845,6 @@ ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDC return unix_funcs->pNtUserGetClassInfoEx( instance, name, wc, menu_name, ansi ); }
-LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info, - UINT32 *num_mode_info ) -{ - if (!unix_funcs) return ERROR_NOT_SUPPORTED; - return unix_funcs->pNtUserGetDisplayConfigBufferSizes( flags, num_path_info, num_mode_info ); -} - BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *module, UNICODE_STRING *res_name, DWORD *bpp, LONG unk ) { @@ -1040,12 +1006,6 @@ INT WINAPI NtUserSetScrollInfo( HWND hwnd, INT bar, const SCROLLINFO *info, BOOL return unix_funcs->pNtUserSetScrollInfo( hwnd, bar, info, redraw ); }
-BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserSetSysColors( count, colors, values ); -} - BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 82849ccd466..b5fa4cb9e48 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -101,6 +101,7 @@ SYSCALL_ENTRY( NtUserCallOneParam ) \ SYSCALL_ENTRY( NtUserCallTwoParam ) \ SYSCALL_ENTRY( NtUserChangeClipboardChain ) \ + SYSCALL_ENTRY( NtUserChangeDisplaySettings ) \ SYSCALL_ENTRY( NtUserCheckMenuItem ) \ SYSCALL_ENTRY( NtUserChildWindowFromPointEx ) \ SYSCALL_ENTRY( NtUserCloseClipboard ) \ @@ -118,6 +119,9 @@ SYSCALL_ENTRY( NtUserDispatchMessage ) \ SYSCALL_ENTRY( NtUserEmptyClipboard ) \ SYSCALL_ENTRY( NtUserEndMenu ) \ + SYSCALL_ENTRY( NtUserEnumDisplayDevices ) \ + SYSCALL_ENTRY( NtUserEnumDisplayMonitors ) \ + SYSCALL_ENTRY( NtUserEnumDisplaySettings ) \ SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \ SYSCALL_ENTRY( NtUserFindWindowEx ) \ SYSCALL_ENTRY( NtUserGetAncestor ) \ @@ -135,6 +139,7 @@ SYSCALL_ENTRY( NtUserGetCursorFrameInfo ) \ SYSCALL_ENTRY( NtUserGetCursorInfo ) \ SYSCALL_ENTRY( NtUserGetDCEx ) \ + SYSCALL_ENTRY( NtUserGetDisplayConfigBufferSizes ) \ SYSCALL_ENTRY( NtUserGetDoubleClickTime ) \ SYSCALL_ENTRY( NtUserGetDpiForMonitor ) \ SYSCALL_ENTRY( NtUserGetForegroundWindow ) \ @@ -207,6 +212,7 @@ SYSCALL_ENTRY( NtUserSetProcessDpiAwarenessContext ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserSetProp ) \ + SYSCALL_ENTRY( NtUserSetSysColors ) \ SYSCALL_ENTRY( NtUserSetSystemTimer ) \ SYSCALL_ENTRY( NtUserSetThreadDesktop ) \ SYSCALL_ENTRY( NtUserSetTimer ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 564f17f720b..8b81baa0e58 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -294,6 +294,20 @@ NTSTATUS WINAPI wow64_NtUserChangeClipboardChain( UINT *args ) return NtUserChangeClipboardChain( hwnd, next ); }
+NTSTATUS WINAPI wow64_NtUserChangeDisplaySettings( UINT *args ) +{ + UNICODE_STRING32 *devname32 = get_ptr( &args ); + DEVMODEW *devmode = get_ptr( &args ); + HWND hwnd = get_handle( &args ); + DWORD flags = get_ulong( &args ); + void *lparam = get_ptr( &args ); + + UNICODE_STRING devname; + + return NtUserChangeDisplaySettings( unicode_str_32to64( &devname, devname32 ), + devmode, hwnd, flags, lparam ); +} + NTSTATUS WINAPI wow64_NtUserCheckMenuItem( UINT *args ) { HMENU handle = get_handle( &args ); @@ -437,6 +451,41 @@ NTSTATUS WINAPI wow64_NtUserEndMenu( UINT *args ) return NtUserEndMenu(); }
+NTSTATUS WINAPI wow64_NtUserEnumDisplayDevices( UINT *args ) +{ + UNICODE_STRING32 *device32 = get_ptr( &args ); + DWORD index = get_ulong( &args ); + DISPLAY_DEVICEW *info = get_ptr( &args ); + DWORD flags = get_ulong( &args ); + + UNICODE_STRING device; + + return NtUserEnumDisplayDevices( unicode_str_32to64( &device, device32 ), index, info, flags ); +} + +NTSTATUS WINAPI wow64_NtUserEnumDisplayMonitors( UINT *args ) +{ + HDC hdc = get_handle( &args ); + RECT *rect = get_ptr( &args ); + MONITORENUMPROC proc = get_ptr( &args ); + LPARAM lp = get_ulong( &args ); + + return NtUserEnumDisplayMonitors( hdc, rect, proc, lp ); +} + +NTSTATUS WINAPI wow64_NtUserEnumDisplaySettings( UINT *args ) +{ + UNICODE_STRING32 *device32 = get_ptr( &args ); + DWORD mode = get_ulong( &args ); + DEVMODEW *dev_mode = get_ptr( &args ); + DWORD flags = get_ulong( &args ); + + UNICODE_STRING device; + + return NtUserEnumDisplaySettings( unicode_str_32to64( &device, device32 ), + mode, dev_mode, flags ); +} + NTSTATUS WINAPI wow64_NtUserFindExistingCursorIcon( UINT *args ) { UNICODE_STRING32 *module32 = get_ptr( &args ); @@ -610,6 +659,15 @@ NTSTATUS WINAPI wow64_NtUserGetDCEx( UINT *args ) return HandleToUlong( NtUserGetDCEx( hwnd, clip_rgn, flags )); }
+NTSTATUS WINAPI wow64_NtUserGetDisplayConfigBufferSizes( UINT *args ) +{ + UINT32 flags = get_ulong( &args ); + UINT32 *num_path_info = get_ptr( &args ); + UINT32 *num_mode_info = get_ptr( &args ); + + return NtUserGetDisplayConfigBufferSizes( flags, num_path_info, num_mode_info ); +} + NTSTATUS WINAPI wow64_NtUserGetDoubleClickTime( UINT *args ) { return NtUserGetDoubleClickTime(); @@ -1514,6 +1572,15 @@ NTSTATUS WINAPI wow64_NtUserSetProp( UINT *args ) return NtUserSetProp( hwnd, str, handle ); }
+NTSTATUS WINAPI wow64_NtUserSetSysColors( UINT *args ) +{ + INT count = get_ulong( &args ); + const INT *colors = get_ptr( &args ); + const COLORREF *values = get_ptr( &args ); + + return NtUserSetSysColors( count, colors, values ); +} + NTSTATUS WINAPI wow64_NtUserSetSystemTimer( UINT *args ) { HWND hwnd = get_handle( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 7 --- dlls/win32u/syscall.c | 7 +++ dlls/win32u/win32u.spec | 14 +++--- dlls/win32u/win32u_private.h | 10 ---- dlls/win32u/wrappers.c | 45 ------------------ dlls/wow64win/syscall.h | 7 +++ dlls/wow64win/user.c | 88 ++++++++++++++++++++++++++++++++++++ 7 files changed, 109 insertions(+), 69 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 4ccfd77dfa0..6244e7ab472 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,17 +1136,14 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserClipCursor, NtUserCreateCaret, NtUserCreateWindowEx, NtUserDeferWindowPosAndBand, - NtUserDestroyCursor, NtUserDestroyMenu, NtUserDestroyWindow, NtUserDisableThreadIme, NtUserDragDetect, NtUserDrawCaptionTemp, - NtUserDrawIconEx, NtUserDrawMenuBarTemp, NtUserEnableMenuItem, NtUserEnableScrollBar, @@ -1155,7 +1152,6 @@ static struct unix_funcs unix_funcs = NtUserExcludeUpdateRgn, NtUserFlashWindowEx, NtUserGetClassInfoEx, - NtUserGetIconInfo, NtUserGetMenuBarInfo, NtUserGetScrollBarInfo, NtUserGetSystemMenu, @@ -1173,8 +1169,6 @@ static struct unix_funcs unix_funcs = NtUserSetClassLong, NtUserSetClassLongPtr, NtUserSetClassWord, - NtUserSetCursor, - NtUserSetCursorIconData, NtUserSetFocus, NtUserSetInternalWindowPos, NtUserSetLayeredWindowAttributes, @@ -1189,7 +1183,6 @@ static struct unix_funcs unix_funcs = NtUserSetWindowRgn, NtUserSetWindowWord, NtUserShowCaret, - NtUserShowCursor, NtUserShowScrollBar, NtUserShowWindow, NtUserShowWindowAsync, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 982a75a0bd9..2bc178db91d 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -117,6 +117,7 @@ static void * const syscalls[] = NtUserChangeDisplaySettings, NtUserCheckMenuItem, NtUserChildWindowFromPointEx, + NtUserClipCursor, NtUserCloseClipboard, NtUserCloseDesktop, NtUserCloseWindowStation, @@ -128,8 +129,10 @@ static void * const syscalls[] = NtUserCreateWindowStation, NtUserDeleteMenu, NtUserDestroyAcceleratorTable, + NtUserDestroyCursor, NtUserDestroyInputContext, NtUserDispatchMessage, + NtUserDrawIconEx, NtUserEmptyClipboard, NtUserEndMenu, NtUserEnumDisplayDevices, @@ -157,6 +160,7 @@ static void * const syscalls[] = NtUserGetDpiForMonitor, NtUserGetForegroundWindow, NtUserGetGUIThreadInfo, + NtUserGetIconInfo, NtUserGetIconSize, NtUserGetKeyNameText, NtUserGetKeyState, @@ -217,6 +221,8 @@ static void * const syscalls[] = NtUserSendInput, NtUserSetClipboardData, NtUserSetClipboardViewer, + NtUserSetCursor, + NtUserSetCursorIconData, NtUserSetCursorPos, NtUserSetKeyboardState, NtUserSetMenuContextHelpId, @@ -231,6 +237,7 @@ static void * const syscalls[] = NtUserSetTimer, NtUserSetWinEventHook, NtUserSetWindowsHookEx, + NtUserShowCursor, NtUserThunkedMenuInfo, NtUserThunkedMenuItemInfo, NtUserToUnicodeEx, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index a15e1cadbd3..fb61addd3a8 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -792,7 +792,7 @@ @ stub NtUserCheckWindowThreadDesktop @ stdcall -syscall NtUserChildWindowFromPointEx(long long long long) @ stub NtUserClearForeground -@ stdcall NtUserClipCursor(ptr) +@ stdcall -syscall NtUserClipCursor(ptr) @ stdcall -syscall NtUserCloseClipboard() @ stdcall -syscall NtUserCloseDesktop(long) @ stdcall -syscall NtUserCloseWindowStation(long) @@ -829,7 +829,7 @@ @ stdcall -syscall NtUserDestroyAcceleratorTable(long) @ stub NtUserDestroyActivationGroup @ stub NtUserDestroyActivationObject -@ stdcall NtUserDestroyCursor(long long) +@ stdcall -syscall NtUserDestroyCursor(long long) @ stub NtUserDestroyDCompositionHwndTarget @ stdcall -syscall NtUserDestroyInputContext(long) @ stdcall NtUserDestroyMenu(long) @@ -850,7 +850,7 @@ @ stub NtUserDrawAnimatedRects @ stub NtUserDrawCaption @ stdcall NtUserDrawCaptionTemp(long long ptr long long wstr long) -@ stdcall NtUserDrawIconEx(long long long long long long long long long) +@ stdcall -syscall NtUserDrawIconEx(long long long long long long long long long) @ stdcall NtUserDrawMenuBarTemp(long long ptr long long) @ stub NtUserDwmGetRemoteSessionOcclusionEvent @ stub NtUserDwmGetRemoteSessionOcclusionState @@ -934,7 +934,7 @@ @ stub NtUserGetGuiResources @ stub NtUserGetHDevName @ stub NtUserGetHimetricScaleFactorFromPixelLocation -@ stdcall NtUserGetIconInfo(long ptr ptr ptr ptr long) +@ stdcall -syscall NtUserGetIconInfo(long ptr ptr ptr ptr long) @ stdcall -syscall NtUserGetIconSize(long long ptr ptr) @ stub NtUserGetImeHotKey @ stub NtUserGetImeInfoEx @@ -1178,9 +1178,9 @@ @ stdcall -syscall NtUserSetClipboardViewer(long) @ stub NtUserSetCoreWindow @ stub NtUserSetCoreWindowPartner -@ stdcall NtUserSetCursor(long) +@ stdcall -syscall NtUserSetCursor(long) @ stub NtUserSetCursorContents -@ stdcall NtUserSetCursorIconData(long ptr ptr ptr) +@ stdcall -syscall NtUserSetCursorIconData(long ptr ptr ptr) @ stdcall -syscall NtUserSetCursorPos(long long) @ stub NtUserSetDesktopColorTransform @ stub NtUserSetDesktopVisualInputSink @@ -1258,7 +1258,7 @@ @ stub NtUserSetWindowsHookAW @ stdcall -syscall NtUserSetWindowsHookEx(ptr ptr long long ptr long) @ stdcall NtUserShowCaret(long) -@ stdcall NtUserShowCursor(long) +@ stdcall -syscall NtUserShowCursor(long) @ stdcall NtUserShowScrollBar(long long long) @ stub NtUserShowSystemCursor @ stdcall NtUserShowWindow(long long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 50236ea2c63..b96d02e12f4 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,7 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - BOOL (WINAPI *pNtUserClipCursor)( const RECT *rect ); BOOL (WINAPI *pNtUserCreateCaret)( HWND hwnd, HBITMAP bitmap, int width, int height ); HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name, UNICODE_STRING *version, UNICODE_STRING *window_name, @@ -196,15 +195,12 @@ struct unix_funcs HDWP (WINAPI *pNtUserDeferWindowPosAndBand)( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags, UINT unk1, UINT unk2 ); - BOOL (WINAPI *pNtUserDestroyCursor)( HCURSOR cursor, ULONG arg ); BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle ); BOOL (WINAPI *pNtUserDestroyWindow)( HWND hwnd ); BOOL (WINAPI *pNtUserDisableThreadIme)( DWORD thread_id ); BOOL (WINAPI *pNtUserDragDetect)( HWND hwnd, int x, int y ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); - BOOL (WINAPI *pNtUserDrawIconEx)( HDC hdc, INT x0, INT y0, HICON icon, INT width, - INT height, UINT istep, HBRUSH hbr, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); BOOL (WINAPI *pNtUserEnableMenuItem)( HMENU handle, UINT id, UINT flags ); BOOL (WINAPI *pNtUserEnableScrollBar)( HWND hwnd, UINT bar, UINT flags ); @@ -214,8 +210,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info ); ATOM (WINAPI *pNtUserGetClassInfoEx)( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc, struct client_menu_name *menu_name, BOOL ansi ); - BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module, - UNICODE_STRING *res_name, DWORD *bpp, LONG unk ); BOOL (WINAPI *pNtUserGetMenuBarInfo)( HWND hwnd, LONG id, LONG item, MENUBARINFO *info ); BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info ); HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert ); @@ -237,9 +231,6 @@ struct unix_funcs DWORD (WINAPI *pNtUserSetClassLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi ); ULONG_PTR (WINAPI *pNtUserSetClassLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi ); WORD (WINAPI *pNtUserSetClassWord)( HWND hwnd, INT offset, WORD newval ); - HCURSOR (WINAPI *pNtUserSetCursor)( HCURSOR cursor ); - BOOL (WINAPI *pNtUserSetCursorIconData)( HCURSOR cursor, UNICODE_STRING *module, - UNICODE_STRING *res_name, struct cursoricon_desc *desc ); 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 ); @@ -254,7 +245,6 @@ struct unix_funcs int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw ); WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval ); BOOL (WINAPI *pNtUserShowCaret)( HWND hwnd ); - INT (WINAPI *pNtUserShowCursor)( BOOL show ); BOOL (WINAPI *pNtUserShowScrollBar)( HWND hwnd, INT bar, BOOL show ); BOOL (WINAPI *pNtUserShowWindow)( HWND hwnd, INT cmd ); BOOL (WINAPI *pNtUserShowWindowAsync)( HWND hwnd, INT cmd ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 5b0e4f19b0f..98f8638c193 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,12 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-BOOL WINAPI NtUserClipCursor( const RECT *rect ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserClipCursor( rect ); -} - BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height ) { if (!unix_funcs) return 0; @@ -758,12 +752,6 @@ HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, flags, unk1, unk2 ); }
-BOOL WINAPI NtUserDestroyCursor( HCURSOR cursor, ULONG arg ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserDestroyCursor( cursor, arg ); -} - BOOL WINAPI NtUserDestroyMenu( HMENU handle ) { if (!unix_funcs) return FALSE; @@ -795,13 +783,6 @@ BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT f return unix_funcs->pNtUserDrawCaptionTemp( hwnd, hdc, rect, font, icon, str, flags ); }
-BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width, - INT height, UINT istep, HBRUSH hbr, UINT flags ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserDrawIconEx( hdc, x0, y0, icon, width, height, istep, hbr, flags ); -} - DWORD WINAPI NtUserDrawMenuBarTemp( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ) { if (!unix_funcs) return 0; @@ -845,13 +826,6 @@ ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDC return unix_funcs->pNtUserGetClassInfoEx( instance, name, wc, menu_name, ansi ); }
-BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *module, - UNICODE_STRING *res_name, DWORD *bpp, LONG unk ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserGetIconInfo( icon, info, module, res_name, bpp, unk ); -} - BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *info ) { if (!unix_funcs) return 0; @@ -939,12 +913,6 @@ HWND WINAPI NtUserSetCapture( HWND hwnd ) return unix_funcs->pNtUserSetCapture( hwnd ); }
-HCURSOR WINAPI NtUserSetCursor( HCURSOR cursor ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetCursor( cursor ); -} - DWORD WINAPI NtUserSetClassLong( HWND hwnd, INT offset, LONG newval, BOOL ansi ) { if (!unix_funcs) return 0; @@ -963,13 +931,6 @@ WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval ) return unix_funcs->pNtUserSetClassWord( hwnd, offset, newval ); }
-BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name, - struct cursoricon_desc *desc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserSetCursorIconData( cursor, module, res_name, desc ); -} - HWND WINAPI NtUserSetFocus( HWND hwnd ) { if (!unix_funcs) return FALSE; @@ -1054,12 +1015,6 @@ BOOL WINAPI NtUserShowCaret( HWND hwnd ) return unix_funcs->pNtUserShowCaret( hwnd ); }
-INT WINAPI NtUserShowCursor( BOOL show ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserShowCursor( show ); -} - BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index b5fa4cb9e48..0f6217fee63 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -104,6 +104,7 @@ SYSCALL_ENTRY( NtUserChangeDisplaySettings ) \ SYSCALL_ENTRY( NtUserCheckMenuItem ) \ SYSCALL_ENTRY( NtUserChildWindowFromPointEx ) \ + SYSCALL_ENTRY( NtUserClipCursor ) \ SYSCALL_ENTRY( NtUserCloseClipboard ) \ SYSCALL_ENTRY( NtUserCloseDesktop ) \ SYSCALL_ENTRY( NtUserCloseWindowStation ) \ @@ -115,8 +116,10 @@ SYSCALL_ENTRY( NtUserCreateWindowStation ) \ SYSCALL_ENTRY( NtUserDeleteMenu ) \ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ + SYSCALL_ENTRY( NtUserDestroyCursor ) \ SYSCALL_ENTRY( NtUserDestroyInputContext ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \ + SYSCALL_ENTRY( NtUserDrawIconEx ) \ SYSCALL_ENTRY( NtUserEmptyClipboard ) \ SYSCALL_ENTRY( NtUserEndMenu ) \ SYSCALL_ENTRY( NtUserEnumDisplayDevices ) \ @@ -144,6 +147,7 @@ SYSCALL_ENTRY( NtUserGetDpiForMonitor ) \ SYSCALL_ENTRY( NtUserGetForegroundWindow ) \ SYSCALL_ENTRY( NtUserGetGUIThreadInfo ) \ + SYSCALL_ENTRY( NtUserGetIconInfo ) \ SYSCALL_ENTRY( NtUserGetIconSize ) \ SYSCALL_ENTRY( NtUserGetKeyNameText ) \ SYSCALL_ENTRY( NtUserGetKeyState ) \ @@ -204,6 +208,8 @@ SYSCALL_ENTRY( NtUserSendInput ) \ SYSCALL_ENTRY( NtUserSetClipboardData ) \ SYSCALL_ENTRY( NtUserSetClipboardViewer ) \ + SYSCALL_ENTRY( NtUserSetCursor ) \ + SYSCALL_ENTRY( NtUserSetCursorIconData ) \ SYSCALL_ENTRY( NtUserSetCursorPos ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ @@ -218,6 +224,7 @@ SYSCALL_ENTRY( NtUserSetTimer ) \ SYSCALL_ENTRY( NtUserSetWinEventHook ) \ SYSCALL_ENTRY( NtUserSetWindowsHookEx ) \ + SYSCALL_ENTRY( NtUserShowCursor ) \ SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \ SYSCALL_ENTRY( NtUserToUnicodeEx ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 8b81baa0e58..2eb53272ca4 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -327,6 +327,13 @@ NTSTATUS WINAPI wow64_NtUserChildWindowFromPointEx( UINT *args ) return HandleToUlong( NtUserChildWindowFromPointEx( parent, x, y, flags )); }
+NTSTATUS WINAPI wow64_NtUserClipCursor( UINT *args ) +{ + const RECT *rect = get_ptr( &args ); + + return NtUserClipCursor( rect ); +} + NTSTATUS WINAPI wow64_NtUserCloseClipboard( UINT *args ) { return NtUserCloseClipboard(); @@ -426,6 +433,14 @@ NTSTATUS WINAPI wow64_NtUserDestroyAcceleratorTable( UINT *args ) return NtUserDestroyAcceleratorTable( handle ); }
+NTSTATUS WINAPI wow64_NtUserDestroyCursor( UINT *args ) +{ + HCURSOR cursor = get_handle( &args ); + ULONG arg = get_ulong( &args ); + + return NtUserDestroyCursor( cursor, arg ); +} + NTSTATUS WINAPI wow64_NtUserDestroyInputContext( UINT *args ) { HIMC handle = get_handle( &args ); @@ -441,6 +456,21 @@ NTSTATUS WINAPI wow64_NtUserDispatchMessage( UINT *args ) return NtUserDispatchMessage( msg_32to64( &msg, msg32 )); }
+NTSTATUS WINAPI wow64_NtUserDrawIconEx( UINT *args ) +{ + HDC hdc = get_handle( &args ); + int x0 = get_ulong( &args ); + int y0 = get_ulong( &args ); + HICON icon = get_handle( &args ); + int width = get_ulong( &args ); + int height = get_ulong( &args ); + UINT istep = get_ulong( &args ); + HBRUSH hbr = get_handle( &args ); + UINT flags = get_ulong( &args ); + + return NtUserDrawIconEx( hdc, x0, y0, icon, width, height, istep, hbr, flags ); +} + NTSTATUS WINAPI wow64_NtUserEmptyClipboard( UINT *args ) { return NtUserEmptyClipboard(); @@ -724,6 +754,39 @@ NTSTATUS WINAPI wow64_NtUserGetGUIThreadInfo( UINT *args ) return TRUE; }
+NTSTATUS WINAPI wow64_NtUserGetIconInfo( UINT *args ) +{ + HICON icon = get_handle( &args ); + struct + { + BOOL fIcon; + DWORD xHotspot; + DWORD yHotspot; + UINT32 hbmMask; + UINT32 hbmColor; + } *info32 = get_ptr( &args ); + UNICODE_STRING32 *module32 = get_ptr( &args ); + UNICODE_STRING32 *res_name32 = get_ptr( &args ); + DWORD *bpp = get_ptr( &args ); + LONG unk = get_ulong( &args ); + + ICONINFO info; + UNICODE_STRING module, res_name; + + if (!NtUserGetIconInfo( icon, &info, unicode_str_32to64( &module, module32 ), + unicode_str_32to64( &res_name, res_name32 ), bpp, unk )) + return FALSE; + + info32->fIcon = info.fIcon; + info32->xHotspot = info.xHotspot; + info32->yHotspot = info.yHotspot; + info32->hbmMask = HandleToUlong( info.hbmMask ); + info32->hbmColor = HandleToUlong( info.hbmColor ); + if (module32) module32->Length = module.Length; + if (res_name32) res_name32->Length = res_name.Length; + return TRUE; +} + NTSTATUS WINAPI wow64_NtUserGetIconSize( UINT *args ) { HICON handle = get_handle( &args ); @@ -1506,6 +1569,24 @@ NTSTATUS WINAPI wow64_NtUserSetClipboardViewer( UINT *args ) return HandleToUlong( NtUserSetClipboardViewer( hwnd )); }
+NTSTATUS WINAPI wow64_NtUserSetCursor( UINT *args ) +{ + HCURSOR cursor = get_handle( &args ); + + return HandleToUlong( NtUserSetCursor( cursor )); +} + +NTSTATUS WINAPI wow64_NtUserSetCursorIconData( UINT *args ) +{ + HCURSOR cursor = get_handle( &args ); + UNICODE_STRING32 *module32 = get_ptr( &args ); + UNICODE_STRING32 *res_name32 = get_ptr( &args ); + void *desc = get_ptr( &args ); + + FIXME( "%p %p %p %p\n", cursor, module32, res_name32, desc ); + return 0; +} + NTSTATUS WINAPI wow64_NtUserSetCursorPos( UINT *args ) { INT x = get_ulong( &args ); @@ -1643,6 +1724,13 @@ NTSTATUS WINAPI wow64_NtUserSetWindowsHookEx( UINT *args ) return HandleToUlong( ret ); }
+NTSTATUS WINAPI wow64_NtUserShowCursor( UINT *args ) +{ + BOOL show = get_ulong( &args ); + + return NtUserShowCursor( show ); +} + NTSTATUS WINAPI wow64_NtUserThunkedMenuInfo( UINT *args ) { HMENU menu = get_handle( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 8 ---- dlls/win32u/syscall.c | 8 ++++ dlls/win32u/win32u.spec | 16 ++++---- dlls/win32u/win32u_private.h | 8 ---- dlls/win32u/wrappers.c | 48 ---------------------- dlls/wow64win/syscall.h | 8 ++++ dlls/wow64win/user.c | 78 ++++++++++++++++++++++++++++++++++++ 7 files changed, 102 insertions(+), 72 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 6244e7ab472..f7df8f88cb6 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,13 +1136,11 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserCreateCaret, NtUserCreateWindowEx, NtUserDeferWindowPosAndBand, NtUserDestroyMenu, NtUserDestroyWindow, NtUserDisableThreadIme, - NtUserDragDetect, NtUserDrawCaptionTemp, NtUserDrawMenuBarTemp, NtUserEnableMenuItem, @@ -1156,7 +1154,6 @@ static struct unix_funcs unix_funcs = NtUserGetScrollBarInfo, NtUserGetSystemMenu, NtUserGetWindowPlacement, - NtUserHideCaret, NtUserHiliteMenuItem, NtUserInternalGetWindowIcon, NtUserMoveWindow, @@ -1164,12 +1161,9 @@ static struct unix_funcs unix_funcs = NtUserReleaseDC, NtUserScrollDC, NtUserSelectPalette, - NtUserSetActiveWindow, - NtUserSetCapture, NtUserSetClassLong, NtUserSetClassLongPtr, NtUserSetClassWord, - NtUserSetFocus, NtUserSetInternalWindowPos, NtUserSetLayeredWindowAttributes, NtUserSetMenu, @@ -1182,13 +1176,11 @@ static struct unix_funcs unix_funcs = NtUserSetWindowPos, NtUserSetWindowRgn, NtUserSetWindowWord, - NtUserShowCaret, NtUserShowScrollBar, NtUserShowWindow, NtUserShowWindowAsync, NtUserSystemParametersInfo, NtUserSystemParametersInfoForDpi, - NtUserTrackMouseEvent, NtUserTranslateAccelerator, NtUserUnregisterClass, NtUserUpdateLayeredWindow, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 2bc178db91d..92077671eb6 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -124,6 +124,7 @@ static void * const syscalls[] = NtUserCopyAcceleratorTable, NtUserCountClipboardFormats, NtUserCreateAcceleratorTable, + NtUserCreateCaret, NtUserCreateDesktopEx, NtUserCreateInputContext, NtUserCreateWindowStation, @@ -132,6 +133,7 @@ static void * const syscalls[] = NtUserDestroyCursor, NtUserDestroyInputContext, NtUserDispatchMessage, + NtUserDragDetect, NtUserDrawIconEx, NtUserEmptyClipboard, NtUserEndMenu, @@ -191,6 +193,7 @@ static void * const syscalls[] = NtUserGetUpdateRgn, NtUserGetUpdatedClipboardFormats, NtUserGetWindowRgnEx, + NtUserHideCaret, NtUserInitializeClientPfnArrays, NtUserInternalGetWindowText, NtUserInvalidateRect, @@ -219,11 +222,14 @@ static void * const syscalls[] = NtUserRemoveProp, NtUserScrollWindowEx, NtUserSendInput, + NtUserSetActiveWindow, + NtUserSetCapture, NtUserSetClipboardData, NtUserSetClipboardViewer, NtUserSetCursor, NtUserSetCursorIconData, NtUserSetCursorPos, + NtUserSetFocus, NtUserSetKeyboardState, NtUserSetMenuContextHelpId, NtUserSetMenuDefaultItem, @@ -237,10 +243,12 @@ static void * const syscalls[] = NtUserSetTimer, NtUserSetWinEventHook, NtUserSetWindowsHookEx, + NtUserShowCaret, NtUserShowCursor, NtUserThunkedMenuInfo, NtUserThunkedMenuItemInfo, NtUserToUnicodeEx, + NtUserTrackMouseEvent, NtUserTrackPopupMenuEx, NtUserTranslateMessage, NtUserUnhookWinEvent, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index fb61addd3a8..c0ad2866b48 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -807,7 +807,7 @@ @ stdcall -syscall NtUserCreateAcceleratorTable(ptr long) @ stub NtUserCreateActivationGroup @ stub NtUserCreateActivationObject -@ stdcall NtUserCreateCaret(long long long long) +@ stdcall -syscall NtUserCreateCaret(long long long long) @ stub NtUserCreateDCompositionHwndTarget @ stdcall -syscall NtUserCreateDesktopEx(ptr ptr ptr long long long) @ stub NtUserCreateEmptyCursorObject @@ -845,7 +845,7 @@ @ stub NtUserDoSoundConnect @ stub NtUserDoSoundDisconnect @ stub NtUserDownlevelTouchpad -@ stdcall NtUserDragDetect(long long long) +@ stdcall -syscall NtUserDragDetect(long long long) @ stub NtUserDragObject @ stub NtUserDrawAnimatedRects @ stub NtUserDrawCaption @@ -1020,7 +1020,7 @@ @ stub NtUserGhostWindowFromHungWindow @ stub NtUserHandleDelegatedInput @ stub NtUserHardErrorControl -@ stdcall NtUserHideCaret(long) +@ stdcall -syscall NtUserHideCaret(long) @ stub NtUserHidePointerContactVisualization @ stdcall NtUserHiliteMenuItem(long long long long) @ stub NtUserHungWindowFromGhostWindow @@ -1163,13 +1163,13 @@ @ stub NtUserSendInteracsetiveControlHapticsReport @ stub NtUserSetActivationFilter @ stub NtUserSetActiveProcessForMonitor -@ stdcall NtUserSetActiveWindow(long) +@ stdcall -syscall NtUserSetActiveWindow(long) @ stub NtUserSetAppImeLevel @ stub NtUserSetAutoRotation @ stub NtUserSetBridgeWindowChild @ stub NtUserSetBrokeredForeground @ stub NtUserSetCalibrationData -@ stdcall NtUserSetCapture(long) +@ stdcall -syscall NtUserSetCapture(long) @ stub NtUserSetChildWindowNoActivate @ stdcall NtUserSetClassLong(long long long long) @ stdcall NtUserSetClassLongPtr(long long long long) @@ -1190,7 +1190,7 @@ @ stub NtUserSetDisplayMapping @ stub NtUserSetFallbackForeground @ stub NtUserSetFeatureReportResponse -@ stdcall NtUserSetFocus(long) +@ stdcall -syscall NtUserSetFocus(long) @ stub NtUserSetForegroundWindowForApplication @ stub NtUserSetFullscreenMagnifierOffsetsDWMUpdated @ stub NtUserSetGestureConfig @@ -1257,7 +1257,7 @@ @ stdcall NtUserSetWindowWord(long long long) @ stub NtUserSetWindowsHookAW @ stdcall -syscall NtUserSetWindowsHookEx(ptr ptr long long ptr long) -@ stdcall NtUserShowCaret(long) +@ stdcall -syscall NtUserShowCaret(long) @ stdcall -syscall NtUserShowCursor(long) @ stdcall NtUserShowScrollBar(long long long) @ stub NtUserShowSystemCursor @@ -1277,7 +1277,7 @@ @ stdcall -syscall NtUserThunkedMenuInfo(long ptr) @ stdcall -syscall NtUserThunkedMenuItemInfo(long long long long ptr ptr) @ stdcall -syscall NtUserToUnicodeEx(long long ptr ptr long long long) -@ stdcall NtUserTrackMouseEvent(ptr) +@ stdcall -syscall NtUserTrackMouseEvent(ptr) @ stdcall -syscall NtUserTrackPopupMenuEx(long long long long long ptr) @ stub NtUserTransformPoint @ stub NtUserTransformRect diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index b96d02e12f4..722bee43944 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,7 +186,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - BOOL (WINAPI *pNtUserCreateCaret)( HWND hwnd, HBITMAP bitmap, int width, int height ); HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name, UNICODE_STRING *version, UNICODE_STRING *window_name, DWORD style, INT x, INT y, INT width, INT height, @@ -198,7 +197,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle ); BOOL (WINAPI *pNtUserDestroyWindow)( HWND hwnd ); BOOL (WINAPI *pNtUserDisableThreadIme)( DWORD thread_id ); - BOOL (WINAPI *pNtUserDragDetect)( HWND hwnd, int x, int y ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); @@ -214,7 +212,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserGetScrollBarInfo)( HWND hwnd, LONG id, SCROLLBARINFO *info ); HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert ); BOOL (WINAPI *pNtUserGetWindowPlacement)( HWND hwnd, WINDOWPLACEMENT *placement ); - BOOL (WINAPI *pNtUserHideCaret)( HWND hwnd ); BOOL (WINAPI *pNtUserHiliteMenuItem)( HWND hwnd, HMENU handle, UINT item, UINT hilite ); HICON (WINAPI *pNtUserInternalGetWindowIcon)( HWND hwnd, UINT type ); BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); @@ -226,12 +223,9 @@ struct unix_funcs BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip, HRGN ret_update_rgn, RECT *update_rect ); HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg ); - HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd ); - HWND (WINAPI *pNtUserSetCapture)( HWND hwnd ); DWORD (WINAPI *pNtUserSetClassLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi ); ULONG_PTR (WINAPI *pNtUserSetClassLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi ); WORD (WINAPI *pNtUserSetClassWord)( HWND hwnd, INT offset, WORD newval ); - 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 ); BOOL (WINAPI *pNtUserSetMenu)( HWND hwnd, HMENU menu ); @@ -244,14 +238,12 @@ struct unix_funcs BOOL (WINAPI *pNtUserSetWindowPos)( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags ); int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw ); WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval ); - BOOL (WINAPI *pNtUserShowCaret)( HWND hwnd ); BOOL (WINAPI *pNtUserShowScrollBar)( HWND hwnd, INT bar, BOOL show ); BOOL (WINAPI *pNtUserShowWindow)( HWND hwnd, INT cmd ); BOOL (WINAPI *pNtUserShowWindowAsync)( HWND hwnd, INT cmd ); BOOL (WINAPI *pNtUserSystemParametersInfo)( UINT action, UINT val, PVOID ptr, UINT winini ); BOOL (WINAPI *pNtUserSystemParametersInfoForDpi)( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi ); - 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 ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 98f8638c193..9694c203fcb 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,12 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCreateCaret( hwnd, bitmap, width, height ); -} - HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name, UNICODE_STRING *version, UNICODE_STRING *window_name, DWORD style, INT x, INT y, INT width, INT height, @@ -770,12 +764,6 @@ BOOL WINAPI NtUserDisableThreadIme( DWORD thread_id ) return unix_funcs->pNtUserDisableThreadIme( thread_id ); }
-BOOL WINAPI NtUserDragDetect( HWND hwnd, int x, int y ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserDragDetect( hwnd, x, y ); -} - BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ) { @@ -838,12 +826,6 @@ HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert ) return unix_funcs->pNtUserGetSystemMenu( hwnd, revert ); }
-BOOL WINAPI NtUserHideCaret( HWND hwnd ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserHideCaret( hwnd ); -} - BOOL WINAPI NtUserHiliteMenuItem( HWND hwnd, HMENU handle, UINT item, UINT hilite ) { if (!unix_funcs) return FALSE; @@ -901,18 +883,6 @@ HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg ) return unix_funcs->pNtUserSelectPalette( hdc, hpal, bkg ); }
-HWND WINAPI NtUserSetActiveWindow( HWND hwnd ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetActiveWindow( hwnd ); -} - -HWND WINAPI NtUserSetCapture( HWND hwnd ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetCapture( hwnd ); -} - DWORD WINAPI NtUserSetClassLong( HWND hwnd, INT offset, LONG newval, BOOL ansi ) { if (!unix_funcs) return 0; @@ -931,12 +901,6 @@ WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval ) return unix_funcs->pNtUserSetClassWord( hwnd, offset, newval ); }
-HWND WINAPI NtUserSetFocus( HWND hwnd ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserSetFocus( hwnd ); -} - void WINAPI NtUserSetInternalWindowPos( HWND hwnd, UINT cmd, RECT *rect, POINT *pt ) { if (!unix_funcs) return; @@ -1009,12 +973,6 @@ WORD WINAPI NtUserSetWindowWord( HWND hwnd, INT offset, WORD newval ) return unix_funcs->pNtUserSetWindowWord( hwnd, offset, newval ); }
-BOOL WINAPI NtUserShowCaret( HWND hwnd ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserShowCaret( hwnd ); -} - BOOL WINAPI NtUserShowScrollBar( HWND hwnd, INT bar, BOOL show ) { if (!unix_funcs) return FALSE; @@ -1045,12 +1003,6 @@ BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, return unix_funcs->pNtUserSystemParametersInfoForDpi( action, val, ptr, winini, dpi ); }
-BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserTrackMouseEvent( info ); -} - INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg ) { if (!unix_funcs) return 0; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 0f6217fee63..7bdf8dd32cd 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -111,6 +111,7 @@ SYSCALL_ENTRY( NtUserCopyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserCountClipboardFormats ) \ SYSCALL_ENTRY( NtUserCreateAcceleratorTable ) \ + SYSCALL_ENTRY( NtUserCreateCaret ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ SYSCALL_ENTRY( NtUserCreateInputContext ) \ SYSCALL_ENTRY( NtUserCreateWindowStation ) \ @@ -119,6 +120,7 @@ SYSCALL_ENTRY( NtUserDestroyCursor ) \ SYSCALL_ENTRY( NtUserDestroyInputContext ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \ + SYSCALL_ENTRY( NtUserDragDetect ) \ SYSCALL_ENTRY( NtUserDrawIconEx ) \ SYSCALL_ENTRY( NtUserEmptyClipboard ) \ SYSCALL_ENTRY( NtUserEndMenu ) \ @@ -178,6 +180,7 @@ SYSCALL_ENTRY( NtUserGetUpdateRgn ) \ SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \ SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \ + SYSCALL_ENTRY( NtUserHideCaret ) \ SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \ SYSCALL_ENTRY( NtUserInternalGetWindowText ) \ SYSCALL_ENTRY( NtUserInvalidateRect ) \ @@ -206,11 +209,14 @@ SYSCALL_ENTRY( NtUserRemoveProp ) \ SYSCALL_ENTRY( NtUserScrollWindowEx ) \ SYSCALL_ENTRY( NtUserSendInput ) \ + SYSCALL_ENTRY( NtUserSetActiveWindow ) \ + SYSCALL_ENTRY( NtUserSetCapture ) \ SYSCALL_ENTRY( NtUserSetClipboardData ) \ SYSCALL_ENTRY( NtUserSetClipboardViewer ) \ SYSCALL_ENTRY( NtUserSetCursor ) \ SYSCALL_ENTRY( NtUserSetCursorIconData ) \ SYSCALL_ENTRY( NtUserSetCursorPos ) \ + SYSCALL_ENTRY( NtUserSetFocus ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ SYSCALL_ENTRY( NtUserSetMenuDefaultItem ) \ @@ -224,10 +230,12 @@ SYSCALL_ENTRY( NtUserSetTimer ) \ SYSCALL_ENTRY( NtUserSetWinEventHook ) \ SYSCALL_ENTRY( NtUserSetWindowsHookEx ) \ + SYSCALL_ENTRY( NtUserShowCaret ) \ SYSCALL_ENTRY( NtUserShowCursor ) \ SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \ SYSCALL_ENTRY( NtUserToUnicodeEx ) \ + SYSCALL_ENTRY( NtUserTrackMouseEvent ) \ SYSCALL_ENTRY( NtUserTrackPopupMenuEx ) \ SYSCALL_ENTRY( NtUserTranslateMessage ) \ SYSCALL_ENTRY( NtUserUnhookWinEvent ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 2eb53272ca4..8c971154448 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -375,6 +375,16 @@ NTSTATUS WINAPI wow64_NtUserCreateAcceleratorTable( UINT *args ) return HandleToUlong( NtUserCreateAcceleratorTable( table, count )); }
+NTSTATUS WINAPI wow64_NtUserCreateCaret( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HBITMAP bitmap = get_handle( &args ); + int width = get_ulong( &args ); + int height = get_ulong( &args ); + + return NtUserCreateCaret( hwnd, bitmap, width, height ); +} + NTSTATUS WINAPI wow64_NtUserCreateDesktopEx( UINT *args ) { OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); @@ -456,6 +466,15 @@ NTSTATUS WINAPI wow64_NtUserDispatchMessage( UINT *args ) return NtUserDispatchMessage( msg_32to64( &msg, msg32 )); }
+NTSTATUS WINAPI wow64_NtUserDragDetect( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + int x = get_ulong( &args ); + int y = get_ulong( &args ); + + return NtUserDragDetect( hwnd, x, y ); +} + NTSTATUS WINAPI wow64_NtUserDrawIconEx( UINT *args ) { HDC hdc = get_handle( &args ); @@ -1202,6 +1221,13 @@ NTSTATUS WINAPI wow64_NtUserGetWindowRgnEx( UINT *args ) return NtUserGetWindowRgnEx( hwnd, hrgn, unk ); }
+NTSTATUS WINAPI wow64_NtUserHideCaret( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return NtUserHideCaret( hwnd ); +} + NTSTATUS WINAPI wow64_NtUserInitializeClientPfnArrays( UINT *args ) { FIXME( "\n" ); @@ -1541,6 +1567,20 @@ NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args ) return NtUserSendInput( count, inputs, sizeof(*inputs) ); }
+NTSTATUS WINAPI wow64_NtUserSetActiveWindow( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return HandleToUlong( NtUserSetActiveWindow( hwnd )); +} + +NTSTATUS WINAPI wow64_NtUserSetCapture( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return HandleToUlong( NtUserSetCapture( hwnd )); +} + NTSTATUS WINAPI wow64_NtUserSetClipboardData( UINT *args ) { UINT format = get_ulong( &args ); @@ -1595,6 +1635,13 @@ NTSTATUS WINAPI wow64_NtUserSetCursorPos( UINT *args ) return NtUserSetCursorPos( x, y ); }
+NTSTATUS WINAPI wow64_NtUserSetFocus( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return HandleToUlong( NtUserSetFocus( hwnd )); +} + NTSTATUS WINAPI wow64_NtUserSetKeyboardState( UINT *args ) { BYTE *state = get_ptr( &args ); @@ -1724,6 +1771,13 @@ NTSTATUS WINAPI wow64_NtUserSetWindowsHookEx( UINT *args ) return HandleToUlong( ret ); }
+NTSTATUS WINAPI wow64_NtUserShowCaret( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return NtUserShowCaret( hwnd ); +} + NTSTATUS WINAPI wow64_NtUserShowCursor( UINT *args ) { BOOL show = get_ulong( &args ); @@ -1811,6 +1865,30 @@ NTSTATUS WINAPI wow64_NtUserToUnicodeEx( UINT *args ) return NtUserToUnicodeEx( virt, scan, state, str, size, flags, layout ); }
+NTSTATUS WINAPI wow64_NtUserTrackMouseEvent( UINT *args ) +{ + struct + { + DWORD cbSize; + DWORD dwFlags; + UINT32 hwndTrack; + DWORD dwHoverTime; + } *info32 = get_ptr( &args ); + TRACKMOUSEEVENT info; + + if (info32->cbSize != sizeof(*info32)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + + info.cbSize = sizeof(info); + info.dwFlags = info32->dwFlags; + info.hwndTrack = UlongToHandle( info32->hwndTrack ); + info.dwHoverTime = info32->dwHoverTime; + return NtUserTrackMouseEvent( &info ); +} + NTSTATUS WINAPI wow64_NtUserTrackPopupMenuEx( UINT *args ) { HMENU handle = get_handle( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 1 - dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 1 - dlls/win32u/wrappers.c | 6 ------ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 7 +++++++ 7 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index f7df8f88cb6..d4c9a1a3861 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1140,7 +1140,6 @@ static struct unix_funcs unix_funcs = NtUserDeferWindowPosAndBand, NtUserDestroyMenu, NtUserDestroyWindow, - NtUserDisableThreadIme, NtUserDrawCaptionTemp, NtUserDrawMenuBarTemp, NtUserEnableMenuItem, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 92077671eb6..d04e4dc2cf3 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -132,6 +132,7 @@ static void * const syscalls[] = NtUserDestroyAcceleratorTable, NtUserDestroyCursor, NtUserDestroyInputContext, + NtUserDisableThreadIme, NtUserDispatchMessage, NtUserDragDetect, NtUserDrawIconEx, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index c0ad2866b48..555aaecdfb5 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -837,7 +837,7 @@ @ stdcall NtUserDestroyWindow(long) @ stub NtUserDisableImmersiveOwner @ stub NtUserDisableProcessWindowFiltering -@ stdcall NtUserDisableThreadIme(long) +@ stdcall -syscall NtUserDisableThreadIme(long) @ stub NtUserDiscardPointerFrameMessages @ stdcall -syscall NtUserDispatchMessage(ptr) @ stub NtUserDisplayConfigGetDeviceInfo diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 722bee43944..c7aac2edd75 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -196,7 +196,6 @@ struct unix_funcs UINT flags, UINT unk1, UINT unk2 ); BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle ); BOOL (WINAPI *pNtUserDestroyWindow)( HWND hwnd ); - BOOL (WINAPI *pNtUserDisableThreadIme)( DWORD thread_id ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 9694c203fcb..f4847d06480 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -758,12 +758,6 @@ BOOL WINAPI NtUserDestroyWindow( HWND hwnd ) return unix_funcs->pNtUserDestroyWindow( hwnd ); }
-BOOL WINAPI NtUserDisableThreadIme( DWORD thread_id ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserDisableThreadIme( thread_id ); -} - BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ) { diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 7bdf8dd32cd..95ceeb9e16d 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -119,6 +119,7 @@ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserDestroyCursor ) \ SYSCALL_ENTRY( NtUserDestroyInputContext ) \ + SYSCALL_ENTRY( NtUserDisableThreadIme ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \ SYSCALL_ENTRY( NtUserDragDetect ) \ SYSCALL_ENTRY( NtUserDrawIconEx ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 8c971154448..a3e880c46ed 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -458,6 +458,13 @@ NTSTATUS WINAPI wow64_NtUserDestroyInputContext( UINT *args ) return NtUserDestroyInputContext( handle ); }
+NTSTATUS WINAPI wow64_NtUserDisableThreadIme( UINT *args ) +{ + DWORD thread_id = get_ulong( &args ); + + return NtUserDisableThreadIme( thread_id ); +} + NTSTATUS WINAPI wow64_NtUserDispatchMessage( UINT *args ) { const MSG32 *msg32 = get_ptr( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 2 -- dlls/win32u/syscall.c | 2 ++ dlls/win32u/win32u.spec | 4 ++-- dlls/win32u/win32u_private.h | 6 ------ dlls/win32u/wrappers.c | 18 ----------------- dlls/wow64win/syscall.h | 2 ++ dlls/wow64win/user.c | 39 ++++++++++++++++++++++++++++++++++++ 7 files changed, 45 insertions(+), 28 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index d4c9a1a3861..b3db2b11531 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,10 +1136,8 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserCreateWindowEx, NtUserDeferWindowPosAndBand, NtUserDestroyMenu, - NtUserDestroyWindow, NtUserDrawCaptionTemp, NtUserDrawMenuBarTemp, NtUserEnableMenuItem, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index d04e4dc2cf3..02a845f1a48 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -127,11 +127,13 @@ static void * const syscalls[] = NtUserCreateCaret, NtUserCreateDesktopEx, NtUserCreateInputContext, + NtUserCreateWindowEx, NtUserCreateWindowStation, NtUserDeleteMenu, NtUserDestroyAcceleratorTable, NtUserDestroyCursor, NtUserDestroyInputContext, + NtUserDestroyWindow, NtUserDisableThreadIme, NtUserDispatchMessage, NtUserDragDetect, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 555aaecdfb5..9d9bec9dfb8 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -814,7 +814,7 @@ @ stdcall -syscall NtUserCreateInputContext(ptr) @ stub NtUserCreateLocalMemHandle @ stub NtUserCreatePalmRejectionDelayZone -@ stdcall NtUserCreateWindowEx(long ptr ptr ptr long long long long long long long long ptr long long long long) +@ stdcall -syscall NtUserCreateWindowEx(long ptr ptr ptr long long long long long long long long ptr long long long long) @ stub NtUserCreateWindowGroup @ stdcall -syscall NtUserCreateWindowStation(ptr long long long long long long) @ stub NtUserCtxDisplayIOCtl @@ -834,7 +834,7 @@ @ stdcall -syscall NtUserDestroyInputContext(long) @ stdcall NtUserDestroyMenu(long) @ stub NtUserDestroyPalmRejectionDelayZone -@ stdcall NtUserDestroyWindow(long) +@ stdcall -syscall NtUserDestroyWindow(long) @ stub NtUserDisableImmersiveOwner @ stub NtUserDisableProcessWindowFiltering @ stdcall -syscall NtUserDisableThreadIme(long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index c7aac2edd75..392c167bf95 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,16 +186,10 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - HWND (WINAPI *pNtUserCreateWindowEx)( DWORD ex_style, UNICODE_STRING *class_name, - UNICODE_STRING *version, UNICODE_STRING *window_name, - DWORD style, INT x, INT y, INT width, INT height, - HWND parent, HMENU menu, HINSTANCE instance, void *params, - DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi ); HDWP (WINAPI *pNtUserDeferWindowPosAndBand)( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags, UINT unk1, UINT unk2 ); BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle ); - BOOL (WINAPI *pNtUserDestroyWindow)( HWND hwnd ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index f4847d06480..a3e617fe75f 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,18 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name, - UNICODE_STRING *version, UNICODE_STRING *window_name, - DWORD style, INT x, INT y, INT width, INT height, - HWND parent, HMENU menu, HINSTANCE instance, void *params, - DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserCreateWindowEx( ex_style, class_name, version, window_name, - style, x, y, width, height, parent, menu, - instance, params, flags, cbtc, unk, ansi ); -} - HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags, UINT unk1, UINT unk2 ) @@ -752,12 +740,6 @@ BOOL WINAPI NtUserDestroyMenu( HMENU handle ) return unix_funcs->pNtUserDestroyMenu( handle ); }
-BOOL WINAPI NtUserDestroyWindow( HWND hwnd ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserDestroyWindow( hwnd ); -} - BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ) { diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 95ceeb9e16d..7125838dd35 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -114,11 +114,13 @@ SYSCALL_ENTRY( NtUserCreateCaret ) \ SYSCALL_ENTRY( NtUserCreateDesktopEx ) \ SYSCALL_ENTRY( NtUserCreateInputContext ) \ + SYSCALL_ENTRY( NtUserCreateWindowEx ) \ SYSCALL_ENTRY( NtUserCreateWindowStation ) \ SYSCALL_ENTRY( NtUserDeleteMenu ) \ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserDestroyCursor ) \ SYSCALL_ENTRY( NtUserDestroyInputContext ) \ + SYSCALL_ENTRY( NtUserDestroyWindow ) \ SYSCALL_ENTRY( NtUserDisableThreadIme ) \ SYSCALL_ENTRY( NtUserDispatchMessage ) \ SYSCALL_ENTRY( NtUserDragDetect ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index a3e880c46ed..20648a6620f 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -411,6 +411,38 @@ NTSTATUS WINAPI wow64_NtUserCreateInputContext( UINT *args ) return HandleToUlong( NtUserCreateInputContext( client_ptr )); }
+NTSTATUS WINAPI wow64_NtUserCreateWindowEx( UINT *args ) +{ + DWORD ex_style = get_ulong( &args ); + UNICODE_STRING32 *class_name32 = get_ptr( &args ); + UNICODE_STRING32 *version32 = get_ptr( &args ); + UNICODE_STRING32 *window_name32 = get_ptr( &args ); + DWORD style = get_ulong( &args ); + int x = get_ulong( &args ); + int y = get_ulong( &args ); + int width = get_ulong( &args ); + int height = get_ulong( &args ); + HWND parent = get_handle( &args ); + HMENU menu = get_handle( &args ); + HINSTANCE instance = get_handle( &args ); + void *params = get_ptr( &args ); + DWORD flags = get_ulong( &args ); + void *cbtc = get_ptr( &args ); + DWORD unk = get_ulong( &args ); + BOOL ansi = get_ulong( &args ); + + UNICODE_STRING class_name, version, window_name; + HWND ret; + + ret = NtUserCreateWindowEx( ex_style, + unicode_str_32to64( &class_name, class_name32), + unicode_str_32to64( &version, version32 ), + unicode_str_32to64( &window_name, window_name32 ), + style, x, y, width, height, parent, menu, + instance, params, flags, cbtc, unk, ansi ); + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtUserCreateWindowStation( UINT *args ) { OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); @@ -458,6 +490,13 @@ NTSTATUS WINAPI wow64_NtUserDestroyInputContext( UINT *args ) return NtUserDestroyInputContext( handle ); }
+NTSTATUS WINAPI wow64_NtUserDestroyWindow( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + + return NtUserDestroyWindow( hwnd ); +} + NTSTATUS WINAPI wow64_NtUserDisableThreadIme( UINT *args ) { DWORD thread_id = get_ulong( &args );
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 5 --- dlls/win32u/syscall.c | 5 +++ dlls/win32u/win32u.spec | 10 +++--- dlls/win32u/win32u_private.h | 7 ----- dlls/win32u/wrappers.c | 33 ------------------- dlls/wow64win/syscall.h | 5 +++ dlls/wow64win/user.c | 61 ++++++++++++++++++++++++++++++++++++ 7 files changed, 76 insertions(+), 50 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index b3db2b11531..2bb7011cf69 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1136,13 +1136,11 @@ static struct unix_funcs unix_funcs = NtGdiUnrealizeObject, NtGdiUpdateColors, NtGdiWidenPath, - NtUserDeferWindowPosAndBand, NtUserDestroyMenu, NtUserDrawCaptionTemp, NtUserDrawMenuBarTemp, NtUserEnableMenuItem, NtUserEnableScrollBar, - NtUserEndDeferWindowPosEx, NtUserEndPaint, NtUserExcludeUpdateRgn, NtUserFlashWindowEx, @@ -1153,7 +1151,6 @@ static struct unix_funcs unix_funcs = NtUserGetWindowPlacement, NtUserHiliteMenuItem, NtUserInternalGetWindowIcon, - NtUserMoveWindow, NtUserRegisterClassExWOW, NtUserReleaseDC, NtUserScrollDC, @@ -1161,7 +1158,6 @@ static struct unix_funcs unix_funcs = NtUserSetClassLong, NtUserSetClassLongPtr, NtUserSetClassWord, - NtUserSetInternalWindowPos, NtUserSetLayeredWindowAttributes, NtUserSetMenu, NtUserSetParent, @@ -1170,7 +1166,6 @@ static struct unix_funcs unix_funcs = NtUserSetWindowLong, NtUserSetWindowLongPtr, NtUserSetWindowPlacement, - NtUserSetWindowPos, NtUserSetWindowRgn, NtUserSetWindowWord, NtUserShowScrollBar, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 02a845f1a48..7c95d7d4848 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -129,6 +129,7 @@ static void * const syscalls[] = NtUserCreateInputContext, NtUserCreateWindowEx, NtUserCreateWindowStation, + NtUserDeferWindowPosAndBand, NtUserDeleteMenu, NtUserDestroyAcceleratorTable, NtUserDestroyCursor, @@ -139,6 +140,7 @@ static void * const syscalls[] = NtUserDragDetect, NtUserDrawIconEx, NtUserEmptyClipboard, + NtUserEndDeferWindowPosEx, NtUserEndMenu, NtUserEnumDisplayDevices, NtUserEnumDisplayMonitors, @@ -207,6 +209,7 @@ static void * const syscalls[] = NtUserMapVirtualKeyEx, NtUserMenuItemFromPoint, NtUserMessageCall, + NtUserMoveWindow, NtUserMsgWaitForMultipleObjectsEx, NtUserNotifyWinEvent, NtUserOpenClipboard, @@ -233,6 +236,7 @@ static void * const syscalls[] = NtUserSetCursorIconData, NtUserSetCursorPos, NtUserSetFocus, + NtUserSetInternalWindowPos, NtUserSetKeyboardState, NtUserSetMenuContextHelpId, NtUserSetMenuDefaultItem, @@ -245,6 +249,7 @@ static void * const syscalls[] = NtUserSetThreadDesktop, NtUserSetTimer, NtUserSetWinEventHook, + NtUserSetWindowPos, NtUserSetWindowsHookEx, NtUserShowCaret, NtUserShowCursor, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 9d9bec9dfb8..1c91fef03da 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -821,7 +821,7 @@ @ stub NtUserDdeInitialize @ stub NtUserDefSetText @ stub NtUserDeferWindowDpiChanges -@ stdcall NtUserDeferWindowPosAndBand(long long long long long long long long long long) +@ stdcall -syscall NtUserDeferWindowPosAndBand(long long long long long long long long long long) @ stub NtUserDelegateCapturePointers @ stub NtUserDelegateInput @ stdcall -syscall NtUserDeleteMenu(long long long) @@ -872,7 +872,7 @@ @ stub NtUserEnableWindowGDIScaledDpiMessage @ stub NtUserEnableWindowGroupPolicy @ stub NtUserEnableWindowResizeOptimization -@ stdcall NtUserEndDeferWindowPosEx(long long) +@ stdcall -syscall NtUserEndDeferWindowPosEx(long long) @ stdcall -syscall NtUserEndMenu() @ stdcall NtUserEndPaint(long ptr) @ stdcall -syscall NtUserEnumDisplayDevices(ptr long ptr long) @@ -1084,7 +1084,7 @@ @ stub NtUserMinMaximize @ stub NtUserModifyUserStartupInfoFlags @ stub NtUserModifyWindowTouchCapability -@ stdcall NtUserMoveWindow(long long long long long long) +@ stdcall -syscall NtUserMoveWindow(long long long long long long) @ stdcall -syscall NtUserMsgWaitForMultipleObjectsEx(long ptr long long long) @ stub NtUserNavigateFocus @ stub NtUserNotifyIMEStatus @@ -1201,7 +1201,7 @@ @ stub NtUserSetInputServiceState @ stub NtUserSetInteractiveControlFocus @ stub NtUserSetInteractiveCtrlRotationAngle -@ stdcall NtUserSetInternalWindowPos(long long ptr ptr) +@ stdcall -syscall NtUserSetInternalWindowPos(long long ptr ptr) @ stdcall -syscall NtUserSetKeyboardState(ptr) @ stdcall NtUserSetLayeredWindowAttributes(ptr long long long) @ stub NtUserSetMagnificationDesktopMagnifierOffsetsDWMUpdated @@ -1249,7 +1249,7 @@ @ stdcall NtUserSetWindowLong(long long long long) @ stdcall NtUserSetWindowLongPtr(long long long long) @ stdcall NtUserSetWindowPlacement(long ptr) -@ stdcall NtUserSetWindowPos(long long long long long long long) +@ stdcall -syscall NtUserSetWindowPos(long long long long long long long) @ stdcall NtUserSetWindowRgn(long long long) @ stub NtUserSetWindowRgnEx @ stub NtUserSetWindowShowState diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 392c167bf95..a4d7d5e940f 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -186,16 +186,12 @@ struct unix_funcs BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); - HDWP (WINAPI *pNtUserDeferWindowPosAndBand)( HDWP hdwp, HWND hwnd, HWND after, - INT x, INT y, INT cx, INT cy, - UINT flags, UINT unk1, UINT unk2 ); BOOL (WINAPI *pNtUserDestroyMenu)( HMENU handle ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); BOOL (WINAPI *pNtUserEnableMenuItem)( HMENU handle, UINT id, UINT flags ); BOOL (WINAPI *pNtUserEnableScrollBar)( HWND hwnd, UINT bar, UINT flags ); - BOOL (WINAPI *pNtUserEndDeferWindowPosEx)( HDWP hdwp, BOOL async ); BOOL (WINAPI *pNtUserEndPaint)( HWND hwnd, const PAINTSTRUCT *ps ); INT (WINAPI *pNtUserExcludeUpdateRgn)( HDC hdc, HWND hwnd ); BOOL (WINAPI *pNtUserFlashWindowEx)( FLASHWINFO *info ); @@ -207,7 +203,6 @@ struct unix_funcs BOOL (WINAPI *pNtUserGetWindowPlacement)( HWND hwnd, WINDOWPLACEMENT *placement ); BOOL (WINAPI *pNtUserHiliteMenuItem)( HWND hwnd, HMENU handle, UINT item, UINT hilite ); HICON (WINAPI *pNtUserInternalGetWindowIcon)( HWND hwnd, UINT type ); - BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ); ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, @@ -219,7 +214,6 @@ struct unix_funcs DWORD (WINAPI *pNtUserSetClassLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi ); ULONG_PTR (WINAPI *pNtUserSetClassLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi ); WORD (WINAPI *pNtUserSetClassWord)( HWND hwnd, INT offset, WORD newval ); - void (WINAPI *pNtUserSetInternalWindowPos)( HWND hwnd, UINT cmd, RECT *rect, POINT *pt ); BOOL (WINAPI *pNtUserSetLayeredWindowAttributes)( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ); BOOL (WINAPI *pNtUserSetMenu)( HWND hwnd, HMENU menu ); HWND (WINAPI *pNtUserSetParent)( HWND hwnd, HWND parent ); @@ -228,7 +222,6 @@ struct unix_funcs LONG (WINAPI *pNtUserSetWindowLong)( HWND hwnd, INT offset, LONG newval, BOOL ansi ); LONG_PTR (WINAPI *pNtUserSetWindowLongPtr)( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi ); BOOL (WINAPI *pNtUserSetWindowPlacement)( HWND hwnd, const WINDOWPLACEMENT *wpl ); - BOOL (WINAPI *pNtUserSetWindowPos)( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags ); int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw ); WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval ); BOOL (WINAPI *pNtUserShowScrollBar)( HWND hwnd, INT bar, BOOL show ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index a3e617fe75f..97acdda8982 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -725,15 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc ); }
-HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after, - INT x, INT y, INT cx, INT cy, - UINT flags, UINT unk1, UINT unk2 ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserDeferWindowPosAndBand( hdwp, hwnd, after, x, y, cx, cy, - flags, unk1, unk2 ); -} - BOOL WINAPI NtUserDestroyMenu( HMENU handle ) { if (!unix_funcs) return FALSE; @@ -765,12 +756,6 @@ BOOL WINAPI NtUserEnableScrollBar( HWND hwnd, UINT bar, UINT flags ) return unix_funcs->pNtUserEnableScrollBar( hwnd, bar, flags ); }
-BOOL WINAPI NtUserEndDeferWindowPosEx( HDWP hdwp, BOOL async ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserEndDeferWindowPosEx( hdwp, async ); -} - INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd ) { if (!unix_funcs) return ERROR; @@ -808,12 +793,6 @@ BOOL WINAPI NtUserHiliteMenuItem( HWND hwnd, HMENU handle, UINT item, UINT hilit return unix_funcs->pNtUserHiliteMenuItem( hwnd, handle, item, hilite ); }
-BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserMoveWindow( hwnd, x, y, cx, cy, repaint ); -} - BOOL WINAPI NtUserGetScrollBarInfo( HWND hwnd, LONG id, SCROLLBARINFO *info ) { if (!unix_funcs) return FALSE; @@ -877,12 +856,6 @@ WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval ) return unix_funcs->pNtUserSetClassWord( hwnd, offset, newval ); }
-void WINAPI NtUserSetInternalWindowPos( HWND hwnd, UINT cmd, RECT *rect, POINT *pt ) -{ - if (!unix_funcs) return; - return unix_funcs->pNtUserSetInternalWindowPos( hwnd, cmd, rect, pt ); -} - BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) { if (!unix_funcs) return FALSE; @@ -931,12 +904,6 @@ BOOL WINAPI NtUserSetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl ) return unix_funcs->pNtUserSetWindowPlacement( hwnd, wpl ); }
-BOOL WINAPI NtUserSetWindowPos( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetWindowPos( hwnd, after, x, y, cx, cy, flags ); -} - int WINAPI NtUserSetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw ) { if (!unix_funcs) return 0; diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 7125838dd35..9b2e1f020f8 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -116,6 +116,7 @@ SYSCALL_ENTRY( NtUserCreateInputContext ) \ SYSCALL_ENTRY( NtUserCreateWindowEx ) \ SYSCALL_ENTRY( NtUserCreateWindowStation ) \ + SYSCALL_ENTRY( NtUserDeferWindowPosAndBand ) \ SYSCALL_ENTRY( NtUserDeleteMenu ) \ SYSCALL_ENTRY( NtUserDestroyAcceleratorTable ) \ SYSCALL_ENTRY( NtUserDestroyCursor ) \ @@ -126,6 +127,7 @@ SYSCALL_ENTRY( NtUserDragDetect ) \ SYSCALL_ENTRY( NtUserDrawIconEx ) \ SYSCALL_ENTRY( NtUserEmptyClipboard ) \ + SYSCALL_ENTRY( NtUserEndDeferWindowPosEx ) \ SYSCALL_ENTRY( NtUserEndMenu ) \ SYSCALL_ENTRY( NtUserEnumDisplayDevices ) \ SYSCALL_ENTRY( NtUserEnumDisplayMonitors ) \ @@ -194,6 +196,7 @@ SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \ SYSCALL_ENTRY( NtUserMenuItemFromPoint ) \ SYSCALL_ENTRY( NtUserMessageCall ) \ + SYSCALL_ENTRY( NtUserMoveWindow ) \ SYSCALL_ENTRY( NtUserMsgWaitForMultipleObjectsEx ) \ SYSCALL_ENTRY( NtUserNotifyWinEvent ) \ SYSCALL_ENTRY( NtUserOpenClipboard ) \ @@ -220,6 +223,7 @@ SYSCALL_ENTRY( NtUserSetCursorIconData ) \ SYSCALL_ENTRY( NtUserSetCursorPos ) \ SYSCALL_ENTRY( NtUserSetFocus ) \ + SYSCALL_ENTRY( NtUserSetInternalWindowPos ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ SYSCALL_ENTRY( NtUserSetMenuDefaultItem ) \ @@ -232,6 +236,7 @@ SYSCALL_ENTRY( NtUserSetThreadDesktop ) \ SYSCALL_ENTRY( NtUserSetTimer ) \ SYSCALL_ENTRY( NtUserSetWinEventHook ) \ + SYSCALL_ENTRY( NtUserSetWindowPos ) \ SYSCALL_ENTRY( NtUserSetWindowsHookEx ) \ SYSCALL_ENTRY( NtUserShowCaret ) \ SYSCALL_ENTRY( NtUserShowCursor ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 20648a6620f..c54e96d53c6 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -459,6 +459,23 @@ NTSTATUS WINAPI wow64_NtUserCreateWindowStation( UINT *args ) arg3, arg4, arg5, arg6, arg7 )); }
+NTSTATUS WINAPI wow64_NtUserDeferWindowPosAndBand( UINT *args ) +{ + HDWP hdwp = get_handle( &args ); + HWND hwnd = get_handle( &args ); + HWND after = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + INT cx = get_ulong( &args ); + INT cy = get_ulong( &args ); + UINT flags = get_ulong( &args ); + UINT unk1 = get_ulong( &args ); + UINT unk2 = get_ulong( &args ); + + HDWP ret = NtUserDeferWindowPosAndBand( hdwp, hwnd, after, x, y, cx, cy, flags, unk1, unk2 ); + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtUserDeleteMenu( UINT *args ) { HMENU menu = get_handle( &args ); @@ -541,6 +558,14 @@ NTSTATUS WINAPI wow64_NtUserEmptyClipboard( UINT *args ) return NtUserEmptyClipboard(); }
+NTSTATUS WINAPI wow64_NtUserEndDeferWindowPosEx( UINT *args ) +{ + HDWP hdwp = get_handle( &args ); + BOOL async = get_ulong( &args ); + + return NtUserEndDeferWindowPosEx( hdwp, async ); +} + NTSTATUS WINAPI wow64_NtUserEndMenu( UINT *args ) { return NtUserEndMenu(); @@ -1362,6 +1387,18 @@ NTSTATUS WINAPI wow64_NtUserMessageCall( UINT *args ) return 0; }
+NTSTATUS WINAPI wow64_NtUserMoveWindow( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + INT cx = get_ulong( &args ); + INT cy = get_ulong( &args ); + BOOL repaint = get_ulong( &args ); + + return NtUserMoveWindow( hwnd, x, y, cx, cy, repaint ); +} + NTSTATUS WINAPI wow64_NtUserMsgWaitForMultipleObjectsEx( UINT *args ) { DWORD count = get_ulong( &args ); @@ -1688,6 +1725,17 @@ NTSTATUS WINAPI wow64_NtUserSetFocus( UINT *args ) return HandleToUlong( NtUserSetFocus( hwnd )); }
+NTSTATUS WINAPI wow64_NtUserSetInternalWindowPos( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + UINT cmd = get_ulong( &args ); + RECT *rect = get_ptr( &args ); + POINT *pt = get_ptr( &args ); + + NtUserSetInternalWindowPos( hwnd, cmd, rect, pt ); + return 0; +} + NTSTATUS WINAPI wow64_NtUserSetKeyboardState( UINT *args ) { BYTE *state = get_ptr( &args ); @@ -1801,6 +1849,19 @@ NTSTATUS WINAPI wow64_NtUserSetWinEventHook( UINT *args ) return HandleToUlong( ret ); }
+NTSTATUS WINAPI wow64_NtUserSetWindowPos( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HWND after = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + INT cx = get_ulong( &args ); + INT cy = get_ulong( &args ); + UINT flags = get_ulong( &args ); + + return NtUserSetWindowPos( hwnd, after, x, y, cx, cy, flags ); +} + NTSTATUS WINAPI wow64_NtUserSetWindowsHookEx( UINT *args ) { HINSTANCE inst = get_handle( &args );
This merge request was approved by Huw Davies.