mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 01: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"
|
#include "user_private.h"
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* GetWindowDC (USER32.@)
|
|
||||||
*/
|
|
||||||
HDC WINAPI GetWindowDC( HWND hwnd )
|
|
||||||
{
|
|
||||||
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* UpdateWindow (USER32.@)
|
* UpdateWindow (USER32.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -405,7 +405,7 @@
|
||||||
# @ stub GetWinStationInfo
|
# @ stub GetWinStationInfo
|
||||||
@ stdcall GetWindow(long long)
|
@ stdcall GetWindow(long long)
|
||||||
@ stdcall GetWindowContextHelpId(long)
|
@ stdcall GetWindowContextHelpId(long)
|
||||||
@ stdcall GetWindowDC(long)
|
@ stdcall GetWindowDC(long) NtUserGetWindowDC
|
||||||
@ stdcall GetWindowDisplayAffinity(long ptr)
|
@ stdcall GetWindowDisplayAffinity(long ptr)
|
||||||
@ stdcall GetWindowDpiAwarenessContext(long)
|
@ stdcall GetWindowDpiAwarenessContext(long)
|
||||||
@ stdcall GetWindowInfo(long ptr)
|
@ stdcall GetWindowInfo(long ptr)
|
||||||
|
|
|
@ -1038,6 +1038,14 @@ HDC WINAPI NtUserGetDC( HWND hwnd )
|
||||||
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE );
|
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* NtUserGetWindowDC (win32u.@)
|
||||||
|
*/
|
||||||
|
HDC WINAPI NtUserGetWindowDC( HWND hwnd )
|
||||||
|
{
|
||||||
|
return NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* NtUserWindowFromDC (win32u.@)
|
* 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 )
|
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 );
|
DWORD style = get_window_long( hwnd, GWL_STYLE );
|
||||||
HMENU sys_menu = NtUserGetSystemMenu(hwnd, FALSE);
|
HMENU sys_menu = NtUserGetSystemMenu(hwnd, FALSE);
|
||||||
void (*paint_button)( HWND, HDC, BOOL, BOOL );
|
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 the close item of the sysmenu is disabled or not present do nothing */
|
||||||
if((state & MF_DISABLED) || (state & MF_GRAYED) || state == 0xFFFFFFFF) return;
|
if((state & MF_DISABLED) || (state & MF_GRAYED) || state == 0xFFFFFFFF) return;
|
||||||
hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
hdc = NtUserGetWindowDC( hwnd );
|
||||||
NtUserSetCapture( hwnd );
|
NtUserSetCapture( hwnd );
|
||||||
draw_close_button( hwnd, hdc, TRUE, FALSE );
|
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:
|
case HTSYSMENU:
|
||||||
if (style & WS_SYSMENU)
|
if (style & WS_SYSMENU)
|
||||||
{
|
{
|
||||||
HDC hdc = NtUserGetDCEx( hwnd, 0, DCX_USESTYLE | DCX_WINDOW );
|
HDC hdc = NtUserGetWindowDC( hwnd );
|
||||||
draw_nc_sys_button( hwnd, hdc, TRUE );
|
draw_nc_sys_button( hwnd, hdc, TRUE );
|
||||||
NtUserReleaseDC( hwnd, hdc );
|
NtUserReleaseDC( hwnd, hdc );
|
||||||
send_message( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lparam );
|
send_message( hwnd, WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lparam );
|
||||||
|
|
|
@ -209,6 +209,7 @@ static void * const syscalls[] =
|
||||||
NtUserGetUpdateRect,
|
NtUserGetUpdateRect,
|
||||||
NtUserGetUpdateRgn,
|
NtUserGetUpdateRgn,
|
||||||
NtUserGetUpdatedClipboardFormats,
|
NtUserGetUpdatedClipboardFormats,
|
||||||
|
NtUserGetWindowDC,
|
||||||
NtUserGetWindowPlacement,
|
NtUserGetWindowPlacement,
|
||||||
NtUserGetWindowRgnEx,
|
NtUserGetWindowRgnEx,
|
||||||
NtUserHideCaret,
|
NtUserHideCaret,
|
||||||
|
|
|
@ -1009,7 +1009,7 @@
|
||||||
@ stub NtUserGetWindowBand
|
@ stub NtUserGetWindowBand
|
||||||
@ stub NtUserGetWindowCompositionAttribute
|
@ stub NtUserGetWindowCompositionAttribute
|
||||||
@ stub NtUserGetWindowCompositionInfo
|
@ stub NtUserGetWindowCompositionInfo
|
||||||
@ stub NtUserGetWindowDC
|
@ stdcall -syscall NtUserGetWindowDC(long)
|
||||||
@ stub NtUserGetWindowDisplayAffinity
|
@ stub NtUserGetWindowDisplayAffinity
|
||||||
@ stub NtUserGetWindowFeedbackSetting
|
@ stub NtUserGetWindowFeedbackSetting
|
||||||
@ stub NtUserGetWindowGroupId
|
@ stub NtUserGetWindowGroupId
|
||||||
|
|
|
@ -195,6 +195,7 @@
|
||||||
SYSCALL_ENTRY( NtUserGetUpdateRect ) \
|
SYSCALL_ENTRY( NtUserGetUpdateRect ) \
|
||||||
SYSCALL_ENTRY( NtUserGetUpdateRgn ) \
|
SYSCALL_ENTRY( NtUserGetUpdateRgn ) \
|
||||||
SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \
|
SYSCALL_ENTRY( NtUserGetUpdatedClipboardFormats ) \
|
||||||
|
SYSCALL_ENTRY( NtUserGetWindowDC ) \
|
||||||
SYSCALL_ENTRY( NtUserGetWindowPlacement ) \
|
SYSCALL_ENTRY( NtUserGetWindowPlacement ) \
|
||||||
SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \
|
SYSCALL_ENTRY( NtUserGetWindowRgnEx ) \
|
||||||
SYSCALL_ENTRY( NtUserHideCaret ) \
|
SYSCALL_ENTRY( NtUserHideCaret ) \
|
||||||
|
|
|
@ -2570,6 +2570,13 @@ NTSTATUS WINAPI wow64_NtUserGetUpdatedClipboardFormats( UINT *args )
|
||||||
return NtUserGetUpdatedClipboardFormats( formats, size, out_size );
|
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 )
|
NTSTATUS WINAPI wow64_NtUserGetWindowPlacement( UINT *args )
|
||||||
{
|
{
|
||||||
HWND hwnd = get_handle( &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 );
|
INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase );
|
||||||
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
|
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size );
|
||||||
BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase );
|
BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase );
|
||||||
|
HDC WINAPI NtUserGetWindowDC( HWND hwnd );
|
||||||
BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement );
|
BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement );
|
||||||
int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk );
|
int WINAPI NtUserGetWindowRgnEx( HWND hwnd, HRGN hrgn, UINT unk );
|
||||||
BOOL WINAPI NtUserHideCaret( HWND hwnd );
|
BOOL WINAPI NtUserHideCaret( HWND hwnd );
|
||||||
|
|
Loading…
Reference in a new issue