Commit 9639d0d6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for winpos functions.

parent d50112b4
......@@ -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,
......
......@@ -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,
......
......@@ -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
......
......@@ -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 );
......
......@@ -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;
......
......@@ -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 ) \
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment