mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 00:53:37 +00:00
win32u: Move NtUserGetWindowDC implementation from user32.
This commit is contained in:
parent
be6f5ed95a
commit
8bdfe2be19
|
@ -22,15 +22,6 @@
|
|||
#include "user_private.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetWindowDC (USER32.@)
|
||||
*/
|
||||
HDC WINAPI GetWindowDC( HWND hwnd )
|
||||
{
|
||||
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* UpdateWindow (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -405,7 +405,7 @@
|
|||
# @ stub GetWinStationInfo
|
||||
@ stdcall GetWindow(long long)
|
||||
@ stdcall GetWindowContextHelpId(long)
|
||||
@ stdcall GetWindowDC(long)
|
||||
@ stdcall GetWindowDC(long) NtUserGetWindowDC
|
||||
@ stdcall GetWindowDisplayAffinity(long ptr)
|
||||
@ stdcall GetWindowDpiAwarenessContext(long)
|
||||
@ stdcall GetWindowInfo(long ptr)
|
||||
|
|
|
@ -1038,6 +1038,14 @@ HDC WINAPI NtUserGetDC( HWND hwnd )
|
|||
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserGetWindowDC (win32u.@)
|
||||
*/
|
||||
HDC WINAPI NtUserGetWindowDC( HWND hwnd )
|
||||
{
|
||||
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* NtUserWindowFromDC (win32u.@)
|
||||
*/
|
||||
|
|
|
@ -2067,7 +2067,7 @@ LRESULT handle_nc_hit_test( HWND hwnd, POINT pt )
|
|||
|
||||
static void track_min_max_box( HWND hwnd, WORD wparam )
|
||||
{
|
||||
HDC hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
HDC hdc = NtUserGetWindowDC( hwnd );
|
||||
DWORD style = get_window_long( hwnd, GWL_STYLE );
|
||||
HMENU sys_menu = NtUserGetSystemMenu(hwnd, FALSE);
|
||||
void (*paint_button)( HWND, HDC, BOOL, BOOL );
|
||||
|
@ -2141,7 +2141,7 @@ static void track_close_button( HWND hwnd, WPARAM wparam, LPARAM lparam )
|
|||
|
||||
/* If the close item of the sysmenu is disabled or not present do nothing */
|
||||
if((state & MF_DISABLED) || (state & MF_GRAYED) || state == 0xFFFFFFFF) return;
|
||||
hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
hdc = NtUserGetWindowDC( hwnd );
|
||||
NtUserSetCapture( hwnd );
|
||||
draw_close_button( hwnd, hdc, TRUE, FALSE );
|
||||
|
||||
|
@ -2191,7 +2191,7 @@ static LRESULT handle_nc_lbutton_down( HWND hwnd, WPARAM wparam, LPARAM lparam )
|
|||
case HTSYSMENU:
|
||||
if (style & WS_SYSMENU)
|
||||
{
|
||||
HDC hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||
HDC hdc = NtUserGetWindowDC( hwnd );
|
||||
draw_nc_sys_button( hwnd, hdc, TRUE );
|
||||
NtUserReleaseDC( hwnd, hdc );
|
||||
send_message( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lparam );
|
||||
|
|
|
@ -209,6 +209,7 @@ static void * const syscalls[] =
|
|||
NtUserGetUpdateRect,
|
||||
NtUserGetUpdateRgn,
|
||||
NtUserGetUpdatedClipboardFormats,
|
||||
NtUserGetWindowDC,
|
||||
NtUserGetWindowPlacement,
|
||||
NtUserGetWindowRgnEx,
|
||||
NtUserHideCaret,
|
||||
|
|
|
@ -1009,7 +1009,7 @@
|
|||
@ stub NtUserGetWindowBand
|
||||
@ stub NtUserGetWindowCompositionAttribute
|
||||
@ stub NtUserGetWindowCompositionInfo
|
||||
@ stub NtUserGetWindowDC
|
||||
@ stdcall -syscall NtUserGetWindowDC(long)
|
||||
@ stub NtUserGetWindowDisplayAffinity
|
||||
@ stub NtUserGetWindowFeedbackSetting
|
||||
@ stub NtUserGetWindowGroupId
|
||||
|
|
|
@ -195,6 +195,7 @@
|
|||
SYSCALL_ENTRY( NtUserGetUpdateRect ) \
|
||||
SYSCALL_ENTRY( NtUserGetUpdateRgn ) \
|
||||
SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \
|
||||
SYSCALL_ENTRY( NtUserGetWindowDC ) \
|
||||
SYSCALL_ENTRY( NtUserGetWindowPlacement ) \
|
||||
SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \
|
||||
SYSCALL_ENTRY( NtUserHideCaret ) \
|
||||
|
|
|
@ -2570,6 +2570,13 @@ NTSTATUS WINAPI wow64_NtUserGetUpdatedClipboardFormats( UINT *args )
|
|||
return NtUserGetUpdatedClipboardFormats( formats, size, out_size );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserGetWindowDC( UINT *args )
|
||||
{
|
||||
HWND hwnd = get_handle( &args );
|
||||
|
||||
return HandleToUlong( NtUserGetWindowDC( hwnd ));
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserGetWindowPlacement( UINT *args )
|
||||
{
|
||||
HWND hwnd = get_handle( &args );
|
||||
|
|
|
@ -777,6 +777,7 @@ BOOL WINAPI NtUserGetTitleBarInfo( HWND hwnd, TITLEBARINFO *info );
|
|||
INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
|
||||
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
|
||||
BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase );
|
||||
HDC WINAPI NtUserGetWindowDC( HWND hwnd );
|
||||
BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement );
|
||||
int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk );
|
||||
BOOL WINAPI NtUserHideCaret( HWND hwnd );
|
||||
|
|
Loading…
Reference in a new issue