Commit 47dd8a6a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for more user painting functions.

parent 81df0bc7
......@@ -1136,7 +1136,6 @@ static struct unix_funcs unix_funcs =
NtGdiUnrealizeObject,
NtGdiUpdateColors,
NtGdiWidenPath,
NtUserBeginPaint,
NtUserCallHwnd,
NtUserCallHwndParam,
NtUserCallNextHookEx,
......@@ -1171,30 +1170,23 @@ static struct unix_funcs unix_funcs =
NtUserFlashWindowEx,
NtUserGetClassInfoEx,
NtUserGetClipboardData,
NtUserGetDCEx,
NtUserGetDisplayConfigBufferSizes,
NtUserGetIconInfo,
NtUserGetMenuBarInfo,
NtUserGetPriorityClipboardFormat,
NtUserGetScrollBarInfo,
NtUserGetSystemMenu,
NtUserGetUpdateRect,
NtUserGetUpdateRgn,
NtUserGetUpdatedClipboardFormats,
NtUserGetWindowPlacement,
NtUserHideCaret,
NtUserHiliteMenuItem,
NtUserInternalGetWindowIcon,
NtUserInvalidateRect,
NtUserInvalidateRgn,
NtUserIsClipboardFormatAvailable,
NtUserMoveWindow,
NtUserOpenClipboard,
NtUserRedrawWindow,
NtUserRegisterClassExWOW,
NtUserReleaseDC,
NtUserScrollDC,
NtUserScrollWindowEx,
NtUserSelectPalette,
NtUserSetActiveWindow,
NtUserSetCapture,
......
......@@ -104,6 +104,7 @@ static void * const syscalls[] =
NtUserAddClipboardFormatListener,
NtUserAssociateInputContext,
NtUserAttachThreadInput,
NtUserBeginPaint,
NtUserBuildHwndList,
NtUserCallMsgFilter,
NtUserCheckMenuItem,
......@@ -135,6 +136,7 @@ static void * const syscalls[] =
NtUserGetCursor,
NtUserGetCursorFrameInfo,
NtUserGetCursorInfo,
NtUserGetDCEx,
NtUserGetDoubleClickTime,
NtUserGetDpiForMonitor,
NtUserGetForegroundWindow,
......@@ -164,9 +166,13 @@ static void * const syscalls[] =
NtUserGetSystemDpiForProcess,
NtUserGetThreadDesktop,
NtUserGetTitleBarInfo,
NtUserGetUpdateRect,
NtUserGetUpdateRgn,
NtUserGetWindowRgnEx,
NtUserInitializeClientPfnArrays,
NtUserInternalGetWindowText,
NtUserInvalidateRect,
NtUserInvalidateRgn,
NtUserKillTimer,
NtUserLockWindowUpdate,
NtUserMapVirtualKeyEx,
......@@ -181,11 +187,13 @@ static void * const syscalls[] =
NtUserPostMessage,
NtUserPostThreadMessage,
NtUserQueryInputContext,
NtUserRedrawWindow,
NtUserRegisterHotKey,
NtUserRegisterRawInputDevices,
NtUserRemoveClipboardFormatListener,
NtUserRemoveMenu,
NtUserRemoveProp,
NtUserScrollWindowEx,
NtUserSendInput,
NtUserSetCursorPos,
NtUserSetKeyboardState,
......
......@@ -758,7 +758,7 @@
@ stub NtUserAutoPromoteMouseInPointer
@ stub NtUserAutoRotateScreen
@ stub NtUserBeginLayoutUpdate
@ stdcall NtUserBeginPaint(long ptr)
@ stdcall -syscall NtUserBeginPaint(long ptr)
@ stub NtUserBitBltSysBmp
@ stub NtUserBlockInput
@ stub NtUserBroadcastThemeChangeEvent
......@@ -916,7 +916,7 @@
@ stdcall -syscall NtUserGetCursorFrameInfo(long long ptr ptr)
@ stdcall -syscall NtUserGetCursorInfo(ptr)
@ stub NtUserGetDC
@ stdcall NtUserGetDCEx(long long long)
@ stdcall -syscall NtUserGetDCEx(long long long)
@ stub NtUserGetDManipHookInitFunction
@ stub NtUserGetDesktopID
@ stub NtUserGetDisplayAutoRotationPreferences
......@@ -1002,8 +1002,8 @@
@ stub NtUserGetTouchInputInfo
@ stub NtUserGetTouchValidationStatus
@ stub NtUserGetUniformSpaceMapping
@ stdcall NtUserGetUpdateRect(long ptr long)
@ stdcall NtUserGetUpdateRgn(long long long)
@ stdcall -syscall NtUserGetUpdateRect(long ptr long)
@ stdcall -syscall NtUserGetUpdateRgn(long long long)
@ stdcall NtUserGetUpdatedClipboardFormats(ptr long ptr)
@ stub NtUserGetWOWClass
@ stub NtUserGetWindowBand
......@@ -1047,8 +1047,8 @@
@ stdcall NtUserInternalGetWindowIcon(ptr long)
@ stdcall -syscall NtUserInternalGetWindowText(long ptr long)
@ stub NtUserInternalToUnicode
@ stdcall NtUserInvalidateRect(long ptr long)
@ stdcall NtUserInvalidateRgn(long long long)
@ stdcall -syscall NtUserInvalidateRect(long ptr long)
@ stdcall -syscall NtUserInvalidateRgn(long long long)
@ stub NtUserIsChildWindowDpiMessageEnabled
@ stdcall NtUserIsClipboardFormatAvailable(long)
@ stub NtUserIsMouseInPointerEnabled
......@@ -1120,7 +1120,7 @@
@ stub NtUserRealChildWindowFromPoint
@ stub NtUserRealInternalGetMessage
@ stub NtUserRealWaitMessageEx
@ stdcall NtUserRedrawWindow(long ptr long long)
@ stdcall -syscall NtUserRedrawWindow(long ptr long long)
@ stub NtUserRegisterBSDRWindow
@ stdcall NtUserRegisterClassExWOW(ptr ptr ptr ptr long long long)
@ stub NtUserRegisterDManipHook
......@@ -1156,7 +1156,7 @@
@ stub NtUserRestoreWindowDpiChanges
@ stub NtUserSBGetParms
@ stdcall NtUserScrollDC(long long long ptr ptr long ptr)
@ stdcall NtUserScrollWindowEx(long long long ptr ptr long ptr long)
@ stdcall -syscall NtUserScrollWindowEx(long long long ptr ptr long ptr long)
@ stdcall NtUserSelectPalette(long long long)
@ stub NtUserSendEventMessage
@ stdcall -syscall NtUserSendInput(long ptr long)
......
......@@ -186,7 +186,6 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj );
BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc );
BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc );
HDC (WINAPI *pNtUserBeginPaint)( HWND hwnd, PAINTSTRUCT *ps );
ULONG_PTR (WINAPI *pNtUserCallHwnd)( HWND hwnd, DWORD code );
ULONG_PTR (WINAPI *pNtUserCallHwndParam)( HWND hwnd, DWORD_PTR param, DWORD code );
LRESULT (WINAPI *pNtUserCallNextHookEx)( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam );
......@@ -233,7 +232,6 @@ struct unix_funcs
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 );
HDC (WINAPI *pNtUserGetDCEx)( HWND hwnd, HRGN clip_rgn, DWORD flags );
LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info,
UINT32 *num_mode_info );
BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module,
......@@ -242,19 +240,14 @@ struct unix_funcs
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 *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
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 *pNtUserInvalidateRect)( HWND hwnd, const RECT *rect, BOOL erase );
BOOL (WINAPI *pNtUserInvalidateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
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 );
BOOL (WINAPI *pNtUserRedrawWindow)( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags );
ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name,
UNICODE_STRING *version,
struct client_menu_name *client_menu_name,
......@@ -262,9 +255,6 @@ struct unix_funcs
INT (WINAPI *pNtUserReleaseDC)( HWND hwnd, HDC hdc );
BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
HRGN ret_update_rgn, RECT *update_rect );
INT (WINAPI *pNtUserScrollWindowEx)( HWND hwnd, INT dx, INT dy, const RECT *rect,
const RECT *clip_rect, HRGN update_rgn,
RECT *update_rect, UINT flags );
HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg );
HWND (WINAPI *pNtUserSetActiveWindow)( HWND hwnd );
HWND (WINAPI *pNtUserSetCapture)( HWND hwnd );
......
......@@ -725,12 +725,6 @@ NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER
return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc );
}
HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserBeginPaint( hwnd, ps );
}
LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam )
{
if (!unix_funcs) return 0;
......@@ -944,12 +938,6 @@ HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params *
return unix_funcs->pNtUserGetClipboardData( format, params );
}
HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetDCEx( hwnd, clip_rgn, flags );
}
LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
UINT32 *num_mode_info )
{
......@@ -976,18 +964,6 @@ HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert )
return unix_funcs->pNtUserGetSystemMenu( hwnd, revert );
}
BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserGetUpdateRect( hwnd, rect, erase );
}
INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserGetUpdateRgn( hwnd, hrgn, erase );
}
BOOL WINAPI NtUserHideCaret( HWND hwnd )
{
if (!unix_funcs) return FALSE;
......@@ -1037,18 +1013,6 @@ HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type )
return unix_funcs->pNtUserInternalGetWindowIcon( hwnd, type );
}
BOOL WINAPI NtUserInvalidateRect( HWND hwnd, const RECT *rect, BOOL erase )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserInvalidateRect( hwnd, rect, erase );
}
BOOL WINAPI NtUserInvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserInvalidateRgn( hwnd, hrgn, erase );
}
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format )
{
if (!unix_funcs) return FALSE;
......@@ -1061,12 +1025,6 @@ BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk )
return unix_funcs->pNtUserOpenClipboard( hwnd, unk );
}
BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserRedrawWindow( hwnd, rect, hrgn, flags );
}
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 )
......@@ -1088,15 +1046,6 @@ BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const R
return unix_funcs->pNtUserScrollDC( hdc, dx, dy, scroll, clip, ret_update_rgn, update_rect );
}
INT WINAPI NtUserScrollWindowEx( HWND hwnd, INT dx, INT dy, const RECT *rect,
const RECT *clip_rect, HRGN update_rgn,
RECT *update_rect, UINT flags )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect,
update_rgn, update_rect, flags );
}
HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg )
{
if (!unix_funcs) return 0;
......
......@@ -91,6 +91,7 @@
SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserAssociateInputContext ) \
SYSCALL_ENTRY( NtUserAttachThreadInput ) \
SYSCALL_ENTRY( NtUserBeginPaint ) \
SYSCALL_ENTRY( NtUserBuildHwndList ) \
SYSCALL_ENTRY( NtUserCallMsgFilter ) \
SYSCALL_ENTRY( NtUserCheckMenuItem ) \
......@@ -122,6 +123,7 @@
SYSCALL_ENTRY( NtUserGetCursor ) \
SYSCALL_ENTRY( NtUserGetCursorFrameInfo ) \
SYSCALL_ENTRY( NtUserGetCursorInfo ) \
SYSCALL_ENTRY( NtUserGetDCEx ) \
SYSCALL_ENTRY( NtUserGetDoubleClickTime ) \
SYSCALL_ENTRY( NtUserGetDpiForMonitor ) \
SYSCALL_ENTRY( NtUserGetForegroundWindow ) \
......@@ -151,9 +153,13 @@
SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
SYSCALL_ENTRY( NtUserGetTitleBarInfo ) \
SYSCALL_ENTRY( NtUserGetUpdateRect ) \
SYSCALL_ENTRY( NtUserGetUpdateRgn ) \
SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \
SYSCALL_ENTRY( NtUserInitializeClientPfnArrays ) \
SYSCALL_ENTRY( NtUserInternalGetWindowText ) \
SYSCALL_ENTRY( NtUserInvalidateRect ) \
SYSCALL_ENTRY( NtUserInvalidateRgn ) \
SYSCALL_ENTRY( NtUserKillTimer ) \
SYSCALL_ENTRY( NtUserLockWindowUpdate ) \
SYSCALL_ENTRY( NtUserMapVirtualKeyEx ) \
......@@ -168,11 +174,13 @@
SYSCALL_ENTRY( NtUserPostMessage ) \
SYSCALL_ENTRY( NtUserPostThreadMessage ) \
SYSCALL_ENTRY( NtUserQueryInputContext ) \
SYSCALL_ENTRY( NtUserRedrawWindow ) \
SYSCALL_ENTRY( NtUserRegisterHotKey ) \
SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserRemoveMenu ) \
SYSCALL_ENTRY( NtUserRemoveProp ) \
SYSCALL_ENTRY( NtUserScrollWindowEx ) \
SYSCALL_ENTRY( NtUserSendInput ) \
SYSCALL_ENTRY( NtUserSetCursorPos ) \
SYSCALL_ENTRY( NtUserSetKeyboardState ) \
......
......@@ -108,6 +108,16 @@ typedef struct
} DUMMYUNIONNAME;
} INPUT32;
typedef struct
{
UINT32 hdc;
BOOL fErase;
RECT rcPaint;
BOOL fRestore;
BOOL fIncUpdate;
BYTE rgbReserved[32];
} PAINTSTRUCT32;
static MSG *msg_32to64( MSG *msg, const MSG32 *msg32 )
{
if (!msg32) return NULL;
......@@ -167,6 +177,24 @@ NTSTATUS WINAPI wow64_NtUserAttachThreadInput( UINT *args )
return NtUserAttachThreadInput( from, to, attach );
}
NTSTATUS WINAPI wow64_NtUserBeginPaint( UINT *args )
{
HWND hwnd = get_handle( &args );
PAINTSTRUCT32 *ps32 = get_ptr( &args );
PAINTSTRUCT ps;
HDC ret;
ret = NtUserBeginPaint( hwnd, ps32 ? & ps : NULL );
if (ret && ps32)
{
ps32->hdc = HandleToUlong( ps.hdc );
ps32->fErase = ps.fErase;
ps32->rcPaint = ps.rcPaint;
}
return HandleToUlong( ret );
}
NTSTATUS WINAPI wow64_NtUserBuildHwndList( UINT *args )
{
HDESK desktop = get_handle( &args );
......@@ -470,6 +498,15 @@ NTSTATUS WINAPI wow64_NtUserGetCursorInfo( UINT *args )
return TRUE;
}
NTSTATUS WINAPI wow64_NtUserGetDCEx( UINT *args )
{
HWND hwnd = get_handle( &args );
HRGN clip_rgn = get_handle( &args );
DWORD flags = get_ulong( &args );
return HandleToUlong( NtUserGetDCEx( hwnd, clip_rgn, flags ));
}
NTSTATUS WINAPI wow64_NtUserGetDoubleClickTime( UINT *args )
{
return NtUserGetDoubleClickTime();
......@@ -897,6 +934,24 @@ NTSTATUS WINAPI wow64_NtUserGetTitleBarInfo( UINT *args )
return NtUserGetTitleBarInfo( hwnd, info );
}
NTSTATUS WINAPI wow64_NtUserGetUpdateRect( UINT *args )
{
HWND hwnd = get_handle( &args );
RECT *rect = get_ptr( &args );
BOOL erase = get_ulong( &args );
return NtUserGetUpdateRect( hwnd, rect, erase );
}
NTSTATUS WINAPI wow64_NtUserGetUpdateRgn( UINT *args )
{
HWND hwnd = get_handle( &args );
HRGN hrgn = get_handle( &args );
BOOL erase = get_ulong( &args );
return NtUserGetUpdateRgn( hwnd, hrgn, erase );
}
NTSTATUS WINAPI wow64_NtUserGetWindowRgnEx( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -921,6 +976,24 @@ NTSTATUS WINAPI wow64_NtUserInternalGetWindowText( UINT *args )
return NtUserInternalGetWindowText( hwnd, text, count );
}
NTSTATUS WINAPI wow64_NtUserInvalidateRect( UINT *args )
{
HWND hwnd = get_handle( &args );
const RECT *rect = get_ptr( &args );
BOOL erase = get_ulong( &args );
return NtUserInvalidateRect( hwnd, rect, erase );
}
NTSTATUS WINAPI wow64_NtUserInvalidateRgn( UINT *args )
{
HWND hwnd = get_handle( &args );
HRGN hrgn = get_handle( &args );
BOOL erase = get_ulong( &args );
return NtUserInvalidateRgn( hwnd, hrgn, erase );
}
NTSTATUS WINAPI wow64_NtUserKillTimer( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -1075,6 +1148,16 @@ NTSTATUS WINAPI wow64_NtUserQueryInputContext( UINT *args )
return NtUserQueryInputContext( handle, attr );
}
NTSTATUS WINAPI wow64_NtUserRedrawWindow( UINT *args )
{
HWND hwnd = get_handle( &args );
const RECT *rect = get_ptr( &args );
HRGN hrgn = get_handle( &args );
UINT flags = get_ulong( &args );
return NtUserRedrawWindow( hwnd, rect, hrgn, flags );
}
NTSTATUS WINAPI wow64_NtUserRegisterHotKey( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -1141,6 +1224,20 @@ NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args )
return HandleToUlong( NtUserRemoveProp( hwnd, str ));
}
NTSTATUS WINAPI wow64_NtUserScrollWindowEx( UINT *args )
{
HWND hwnd = get_handle( &args );
INT dx = get_ulong( &args );
INT dy = get_ulong( &args );
const RECT *rect = get_ptr( &args );
const RECT *clip_rect = get_ptr( &args );
HRGN update_rgn = get_handle( &args );
RECT *update_rect = get_ptr( &args );
UINT flags = get_ulong( &args );
return NtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect, update_rgn, update_rect, flags );
}
NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args )
{
UINT count = get_ulong( &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