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 | 10 +++- dlls/wow64win/user.c | 91 ++++++++++++++++++++++++++++++++++++ 7 files changed, 116 insertions(+), 73 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index c5316137df4..3b2c82601f7 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1140,10 +1140,7 @@ static struct unix_funcs unix_funcs = NtUserDrawMenuBarTemp, NtUserEndPaint, NtUserExcludeUpdateRgn, - NtUserFlashWindowEx, NtUserGetClassInfoEx, - NtUserGetWindowPlacement, - NtUserInternalGetWindowIcon, NtUserRegisterClassExWOW, NtUserReleaseDC, NtUserScrollDC, @@ -1151,15 +1148,10 @@ static struct unix_funcs unix_funcs = NtUserSetClassLong, NtUserSetClassLongPtr, NtUserSetClassWord, - NtUserSetLayeredWindowAttributes, - NtUserSetParent, - NtUserShowWindow, - NtUserShowWindowAsync, NtUserSystemParametersInfo, NtUserSystemParametersInfoForDpi, NtUserUnregisterClass, NtUserUpdateLayeredWindow, - NtUserWindowFromPoint,
SetDIBits, __wine_get_brush_bitmap_info, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 562febcf7e0..eb432ccc96a 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -150,6 +150,7 @@ static void * const syscalls[] = NtUserEnumDisplaySettings, NtUserFindExistingCursorIcon, NtUserFindWindowEx, + NtUserFlashWindowEx, NtUserGetAncestor, NtUserGetAsyncKeyState, NtUserGetAtomName, @@ -203,10 +204,12 @@ static void * const syscalls[] = NtUserGetUpdateRect, NtUserGetUpdateRgn, NtUserGetUpdatedClipboardFormats, + NtUserGetWindowPlacement, NtUserGetWindowRgnEx, NtUserHideCaret, NtUserHiliteMenuItem, NtUserInitializeClientPfnArrays, + NtUserInternalGetWindowIcon, NtUserInternalGetWindowText, NtUserInvalidateRect, NtUserInvalidateRgn, @@ -245,10 +248,12 @@ static void * const syscalls[] = NtUserSetFocus, NtUserSetInternalWindowPos, NtUserSetKeyboardState, + NtUserSetLayeredWindowAttributes, NtUserSetMenu, NtUserSetMenuContextHelpId, NtUserSetMenuDefaultItem, NtUserSetObjectInformation, + NtUserSetParent, NtUserSetProcessDpiAwarenessContext, NtUserSetProcessWindowStation, NtUserSetProp, @@ -269,6 +274,8 @@ static void * const syscalls[] = NtUserShowCaret, NtUserShowCursor, NtUserShowScrollBar, + NtUserShowWindow, + NtUserShowWindowAsync, NtUserThunkedMenuInfo, NtUserThunkedMenuItemInfo, NtUserToUnicodeEx, @@ -283,6 +290,7 @@ static void * const syscalls[] = NtUserVkKeyScanEx, NtUserWaitForInputIdle, NtUserWindowFromDC, + NtUserWindowFromPoint, };
static BYTE arguments[ARRAY_SIZE(syscalls)]; diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 18eb5e77d9c..85fe3ec7237 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -883,7 +883,7 @@ @ stub NtUserFillWindow @ stdcall -syscall NtUserFindExistingCursorIcon(ptr ptr ptr) @ stdcall -syscall NtUserFindWindowEx(long long ptr ptr long) -@ stdcall NtUserFlashWindowEx(ptr) +@ stdcall -syscall NtUserFlashWindowEx(ptr) @ stub NtUserForceWindowToDpiForTest @ stub NtUserFrostCrashedWindow @ stub NtUserFunctionalizeDisplayConfig @@ -1014,7 +1014,7 @@ @ stub NtUserGetWindowFeedbackSetting @ stub NtUserGetWindowGroupId @ stub NtUserGetWindowMinimizeRect -@ stdcall NtUserGetWindowPlacement(long ptr) +@ stdcall -syscall NtUserGetWindowPlacement(long ptr) @ stub NtUserGetWindowProcessHandle @ stdcall -syscall NtUserGetWindowRgnEx(long long long) @ stub NtUserGhostWindowFromHungWindow @@ -1044,7 +1044,7 @@ @ stub NtUserInjectPointerInput @ stub NtUserInjectTouchInput @ stub NtUserInteractiveControlQueryUsage -@ stdcall NtUserInternalGetWindowIcon(ptr long) +@ stdcall -syscall NtUserInternalGetWindowIcon(ptr long) @ stdcall -syscall NtUserInternalGetWindowText(long ptr long) @ stub NtUserInternalToUnicode @ stdcall -syscall NtUserInvalidateRect(long ptr long) @@ -1203,7 +1203,7 @@ @ stub NtUserSetInteractiveCtrlRotationAngle @ stdcall -syscall NtUserSetInternalWindowPos(long long ptr ptr) @ stdcall -syscall NtUserSetKeyboardState(ptr) -@ stdcall NtUserSetLayeredWindowAttributes(ptr long long long) +@ stdcall -syscall NtUserSetLayeredWindowAttributes(ptr long long long) @ stub NtUserSetMagnificationDesktopMagnifierOffsetsDWMUpdated @ stub NtUserSetManipulationInputTarget @ stdcall -syscall NtUserSetMenu(long long) @@ -1214,7 +1214,7 @@ @ stub NtUserSetMonitorWorkArea @ stub NtUserSetMouseInputRateLimitingTimer @ stdcall -syscall NtUserSetObjectInformation(long long ptr long) -@ stdcall NtUserSetParent(long long) +@ stdcall -syscall NtUserSetParent(long long) @ stub NtUserSetPrecisionTouchPadConfiguration @ stdcall -syscall NtUserSetProcessDpiAwarenessContext(long long) @ stub NtUserSetProcessInteractionFlags @@ -1261,8 +1261,8 @@ @ stdcall -syscall NtUserShowCursor(long) @ stdcall -syscall NtUserShowScrollBar(long long long) @ stub NtUserShowSystemCursor -@ stdcall NtUserShowWindow(long long) -@ stdcall NtUserShowWindowAsync(long long) +@ stdcall -syscall NtUserShowWindow(long long) +@ stdcall -syscall NtUserShowWindowAsync(long long) @ stub NtUserShutdownBlockReasonCreate @ stub NtUserShutdownBlockReasonQuery @ stub NtUserShutdownReasonDestroy @@ -1311,7 +1311,7 @@ @ stub NtUserWaitMessage @ stdcall -syscall NtUserWindowFromDC(long) @ stub NtUserWindowFromPhysicalPoint -@ stdcall NtUserWindowFromPoint(long long) +@ stdcall -syscall NtUserWindowFromPoint(long long) @ stub NtUserYieldTask @ stub NtValidateCompositionSurfaceHandle @ stub NtVisualCaptureBits diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 582facc0ddf..1376405cafb 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -191,11 +191,8 @@ struct unix_funcs DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); BOOL (WINAPI *pNtUserEndPaint)( HWND hwnd, const PAINTSTRUCT *ps ); 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 ); - BOOL (WINAPI *pNtUserGetWindowPlacement)( HWND hwnd, WINDOWPLACEMENT *placement ); - HICON (WINAPI *pNtUserInternalGetWindowIcon)( HWND hwnd, UINT type ); ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, @@ -207,10 +204,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 ); - BOOL (WINAPI *pNtUserSetLayeredWindowAttributes)( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ); - HWND (WINAPI *pNtUserSetParent)( HWND hwnd, HWND parent ); - 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 ); @@ -220,7 +213,6 @@ struct unix_funcs const SIZE *size, HDC hdc_src, const POINT *pts_src, COLORREF key, const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty ); - HWND (WINAPI *pNtUserWindowFromPoint)( LONG x, LONG y );
/* Wine-specific functions */ INT (WINAPI *pSetDIBits)( HDC hdc, HBITMAP hbitmap, UINT startscan, diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 290c4a51f1d..bd185129b65 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -744,12 +744,6 @@ INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd ) return unix_funcs->pNtUserExcludeUpdateRgn( hdc, hwnd ); }
-BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserFlashWindowEx( info ); -} - ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc, struct client_menu_name *menu_name, BOOL ansi ) { @@ -757,18 +751,6 @@ ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDC return unix_funcs->pNtUserGetClassInfoEx( instance, name, wc, menu_name, ansi ); }
-BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserGetWindowPlacement( hwnd, placement ); -} - -HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserInternalGetWindowIcon( hwnd, type ); -} - 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 ) @@ -814,30 +796,6 @@ WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval ) return unix_funcs->pNtUserSetClassWord( hwnd, offset, newval ); }
-BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserSetLayeredWindowAttributes( hwnd, key, alpha, flags ); -} - -HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserSetParent( hwnd, parent ); -} - -BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserShowWindowAsync( hwnd, cmd ); -} - -BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtUserShowWindow( hwnd, cmd ); -} - BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, PVOID ptr, UINT winini ) { if (!unix_funcs) return FALSE; @@ -866,12 +824,6 @@ BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_ key, blend, flags, dirty ); }
-HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtUserWindowFromPoint( x, y ); -} - INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines, const void *bits, const BITMAPINFO *info, UINT coloruse ) diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 6a42e1ee7d7..1477650f686 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -137,6 +137,7 @@ SYSCALL_ENTRY( NtUserEnumDisplaySettings ) \ SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \ SYSCALL_ENTRY( NtUserFindWindowEx ) \ + SYSCALL_ENTRY( NtUserFlashWindowEx ) \ SYSCALL_ENTRY( NtUserGetAncestor ) \ SYSCALL_ENTRY( NtUserGetAsyncKeyState ) \ SYSCALL_ENTRY( NtUserGetAtomName ) \ @@ -190,10 +191,12 @@ SYSCALL_ENTRY( NtUserGetUpdateRect ) \ SYSCALL_ENTRY( NtUserGetUpdateRgn ) \ SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \ + SYSCALL_ENTRY( NtUserGetWindowPlacement ) \ SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \ SYSCALL_ENTRY( NtUserHideCaret ) \ SYSCALL_ENTRY( NtUserHiliteMenuItem ) \ SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \ + SYSCALL_ENTRY( NtUserInternalGetWindowIcon ) \ SYSCALL_ENTRY( NtUserInternalGetWindowText ) \ SYSCALL_ENTRY( NtUserInvalidateRect ) \ SYSCALL_ENTRY( NtUserInvalidateRgn ) \ @@ -232,10 +235,12 @@ SYSCALL_ENTRY( NtUserSetFocus ) \ SYSCALL_ENTRY( NtUserSetInternalWindowPos ) \ SYSCALL_ENTRY( NtUserSetKeyboardState ) \ + SYSCALL_ENTRY( NtUserSetLayeredWindowAttributes ) \ SYSCALL_ENTRY( NtUserSetMenu ) \ SYSCALL_ENTRY( NtUserSetMenuContextHelpId ) \ SYSCALL_ENTRY( NtUserSetMenuDefaultItem ) \ SYSCALL_ENTRY( NtUserSetObjectInformation ) \ + SYSCALL_ENTRY( NtUserSetParent ) \ SYSCALL_ENTRY( NtUserSetProcessDpiAwarenessContext ) \ SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \ SYSCALL_ENTRY( NtUserSetProp ) \ @@ -256,6 +261,8 @@ SYSCALL_ENTRY( NtUserShowCaret ) \ SYSCALL_ENTRY( NtUserShowCursor ) \ SYSCALL_ENTRY( NtUserShowScrollBar ) \ + SYSCALL_ENTRY( NtUserShowWindow ) \ + SYSCALL_ENTRY( NtUserShowWindowAsync ) \ SYSCALL_ENTRY( NtUserThunkedMenuInfo ) \ SYSCALL_ENTRY( NtUserThunkedMenuItemInfo ) \ SYSCALL_ENTRY( NtUserToUnicodeEx ) \ @@ -269,6 +276,7 @@ SYSCALL_ENTRY( NtUserUpdateInputContext ) \ SYSCALL_ENTRY( NtUserVkKeyScanEx ) \ SYSCALL_ENTRY( NtUserWaitForInputIdle ) \ - SYSCALL_ENTRY( NtUserWindowFromDC ) + SYSCALL_ENTRY( NtUserWindowFromDC ) \ + SYSCALL_ENTRY( NtUserWindowFromPoint )
#endif /* __WOW64WIN_SYSCALL_H */ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 12ede1397c1..5ede6cb10b9 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -662,6 +662,39 @@ NTSTATUS WINAPI wow64_NtUserFindWindowEx( UINT *args ) return HandleToUlong( ret ); }
+NTSTATUS WINAPI wow64_NtUserFlashWindowEx( UINT *args ) +{ + struct + { + UINT cbSize; + ULONG hwnd; + DWORD dwFlags; + UINT uCount; + DWORD dwTimeout; + } *info32 = get_ptr( &args ); + + FLASHWINFO info; + + if (!info32) + { + SetLastError( ERROR_NOACCESS ); + return FALSE; + } + + if (info32->cbSize != sizeof(*info32)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + + info.cbSize = sizeof(info); + info.hwnd = UlongToHandle( info32->hwnd ); + info.dwFlags = info32->dwFlags; + info.uCount = info32->uCount; + info.dwTimeout = info32->dwTimeout; + return NtUserFlashWindowEx( &info ); +} + NTSTATUS WINAPI wow64_NtUserGetAncestor( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1357,6 +1390,14 @@ NTSTATUS WINAPI wow64_NtUserGetUpdatedClipboardFormats( UINT *args ) return NtUserGetUpdatedClipboardFormats( formats, size, out_size ); }
+NTSTATUS WINAPI wow64_NtUserGetWindowPlacement( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + WINDOWPLACEMENT *placement = get_ptr( &args ); + + return NtUserGetWindowPlacement( hwnd, placement ); +} + NTSTATUS WINAPI wow64_NtUserGetWindowRgnEx( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1389,6 +1430,14 @@ NTSTATUS WINAPI wow64_NtUserInitializeClientPfnArrays( UINT *args ) return STATUS_NOT_SUPPORTED; }
+NTSTATUS WINAPI wow64_NtUserInternalGetWindowIcon( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + UINT type = get_ulong( &args ); + + return HandleToUlong( NtUserInternalGetWindowIcon( hwnd, type )); +} + NTSTATUS WINAPI wow64_NtUserInternalGetWindowText( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1827,6 +1876,16 @@ NTSTATUS WINAPI wow64_NtUserSetKeyboardState( UINT *args ) return NtUserSetKeyboardState( state ); }
+NTSTATUS WINAPI wow64_NtUserSetLayeredWindowAttributes( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + COLORREF key = get_ulong( &args ); + BYTE alpha = get_ulong( &args ); + DWORD flags = get_ulong( &args ); + + return NtUserSetLayeredWindowAttributes( hwnd, key, alpha, flags ); +} + NTSTATUS WINAPI wow64_NtUserSetMenu( UINT *args ) { HWND hwnd = get_handle( &args ); @@ -1862,6 +1921,14 @@ NTSTATUS WINAPI wow64_NtUserSetObjectInformation( UINT *args ) return NtUserSetObjectInformation( handle, index, info, len ); }
+NTSTATUS WINAPI wow64_NtUserSetParent( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + HWND parent = get_handle( &args ); + + return HandleToUlong( NtUserSetParent( hwnd, parent )); +} + NTSTATUS WINAPI wow64_NtUserSetProcessDpiAwarenessContext( UINT *args ) { ULONG awareness = get_ulong( &args ); @@ -2057,6 +2124,22 @@ NTSTATUS WINAPI wow64_NtUserShowScrollBar( UINT *args ) return NtUserShowScrollBar( hwnd, bar, show ); }
+NTSTATUS WINAPI wow64_NtUserShowWindow( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + INT cmd = get_ulong( &args ); + + return NtUserShowWindow( hwnd, cmd ); +} + +NTSTATUS WINAPI wow64_NtUserShowWindowAsync( UINT *args ) +{ + HWND hwnd = get_handle( &args ); + INT cmd = get_ulong( &args ); + + return NtUserShowWindowAsync( hwnd, cmd ); +} + NTSTATUS WINAPI wow64_NtUserThunkedMenuInfo( UINT *args ) { HMENU menu = get_handle( &args ); @@ -2247,3 +2330,11 @@ NTSTATUS WINAPI wow64_NtUserWindowFromDC( UINT *args )
return HandleToUlong( NtUserWindowFromDC( hdc )); } + +NTSTATUS WINAPI wow64_NtUserWindowFromPoint( UINT *args ) +{ + LONG x = get_ulong( &args ); + LONG y = get_ulong( &args ); + + return HandleToUlong( NtUserWindowFromPoint( x, y )); +}