Commit a15df248 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Export NtUserGetWindowPlacement.

parent 9abd2ae8
...@@ -412,7 +412,7 @@ ...@@ -412,7 +412,7 @@
@ stdcall GetWindowModuleFileName(long ptr long) GetWindowModuleFileNameA @ stdcall GetWindowModuleFileName(long ptr long) GetWindowModuleFileNameA
@ stdcall GetWindowModuleFileNameA(long ptr long) @ stdcall GetWindowModuleFileNameA(long ptr long)
@ stdcall GetWindowModuleFileNameW(long ptr long) @ stdcall GetWindowModuleFileNameW(long ptr long)
@ stdcall GetWindowPlacement(long ptr) @ stdcall GetWindowPlacement(long ptr) NtUserGetWindowPlacement
@ stdcall GetWindowRect(long ptr) @ stdcall GetWindowRect(long ptr)
@ stdcall GetWindowRgn(long long) @ stdcall GetWindowRgn(long long)
@ stdcall GetWindowRgnBox(long ptr) @ stdcall GetWindowRgnBox(long ptr)
......
...@@ -225,7 +225,7 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd, ...@@ -225,7 +225,7 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
WINDOWPLACEMENT wndpl; WINDOWPLACEMENT wndpl;
wndpl.length = sizeof(wndpl); wndpl.length = sizeof(wndpl);
if (GetWindowPlacement( hwnd, &wndpl )) if (NtUserGetWindowPlacement( hwnd, &wndpl ))
{ {
if (rectWnd) *rectWnd = wndpl.rcNormalPosition; if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
if (ptIcon) *ptIcon = wndpl.ptMinPosition; if (ptIcon) *ptIcon = wndpl.ptMinPosition;
...@@ -236,18 +236,6 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd, ...@@ -236,18 +236,6 @@ UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
/*********************************************************************** /***********************************************************************
* GetWindowPlacement (USER32.@)
*
* Win95:
* Fails if wndpl->length of Win95 (!) apps is invalid.
*/
BOOL WINAPI GetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
{
return NtUserGetWindowPlacement( hwnd, wndpl );
}
/***********************************************************************
* AnimateWindow (USER32.@) * AnimateWindow (USER32.@)
* Shows/Hides a window with an animation * Shows/Hides a window with an animation
* NO ANIMATION YET * NO ANIMATION YET
......
...@@ -1184,6 +1184,7 @@ static struct unix_funcs unix_funcs = ...@@ -1184,6 +1184,7 @@ static struct unix_funcs unix_funcs =
NtUserGetUpdateRect, NtUserGetUpdateRect,
NtUserGetUpdateRgn, NtUserGetUpdateRgn,
NtUserGetUpdatedClipboardFormats, NtUserGetUpdatedClipboardFormats,
NtUserGetWindowPlacement,
NtUserHideCaret, NtUserHideCaret,
NtUserIsClipboardFormatAvailable, NtUserIsClipboardFormatAvailable,
NtUserMapVirtualKeyEx, NtUserMapVirtualKeyEx,
......
...@@ -2163,7 +2163,7 @@ HMONITOR monitor_from_window( HWND hwnd, DWORD flags, UINT dpi ) ...@@ -2163,7 +2163,7 @@ HMONITOR monitor_from_window( HWND hwnd, DWORD flags, UINT dpi )
TRACE( "(%p, 0x%08x)\n", hwnd, flags ); TRACE( "(%p, 0x%08x)\n", hwnd, flags );
wp.length = sizeof(wp); wp.length = sizeof(wp);
if (is_iconic( hwnd ) && get_window_placement( hwnd, &wp )) if (is_iconic( hwnd ) && NtUserGetWindowPlacement( hwnd, &wp ))
return monitor_from_rect( &wp.rcNormalPosition, flags, dpi ); return monitor_from_rect( &wp.rcNormalPosition, flags, dpi );
if (get_window_rect( hwnd, &rect, dpi )) if (get_window_rect( hwnd, &rect, dpi ))
......
...@@ -1014,7 +1014,7 @@ ...@@ -1014,7 +1014,7 @@
@ stub NtUserGetWindowFeedbackSetting @ stub NtUserGetWindowFeedbackSetting
@ stub NtUserGetWindowGroupId @ stub NtUserGetWindowGroupId
@ stub NtUserGetWindowMinimizeRect @ stub NtUserGetWindowMinimizeRect
@ stub NtUserGetWindowPlacement @ stdcall NtUserGetWindowPlacement(long ptr)
@ stub NtUserGetWindowProcessHandle @ stub NtUserGetWindowProcessHandle
@ stdcall -syscall NtUserGetWindowRgnEx(long long long) @ stdcall -syscall NtUserGetWindowRgnEx(long long long)
@ stub NtUserGhostWindowFromHungWindow @ stub NtUserGhostWindowFromHungWindow
......
...@@ -246,6 +246,7 @@ struct unix_funcs ...@@ -246,6 +246,7 @@ struct unix_funcs
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase ); BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase ); INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size ); BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
BOOL (WINAPI *pNtUserGetWindowPlacement)( HWND hwnd, WINDOWPLACEMENT *placement );
BOOL (WINAPI *pNtUserHideCaret)( HWND hwnd ); BOOL (WINAPI *pNtUserHideCaret)( HWND hwnd );
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format ); BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout ); UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
...@@ -442,7 +443,6 @@ extern HWND get_full_window_handle( HWND hwnd ) DECLSPEC_HIDDEN; ...@@ -442,7 +443,6 @@ extern HWND get_full_window_handle( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND get_parent( HWND hwnd ) DECLSPEC_HIDDEN; extern HWND get_parent( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN; extern HWND get_hwnd_message_parent(void) DECLSPEC_HIDDEN;
extern DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd ) DECLSPEC_HIDDEN; extern DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL get_window_placement( HWND hwnd, WINDOWPLACEMENT *placement ) DECLSPEC_HIDDEN;
extern MINMAXINFO get_min_max_info( HWND hwnd ) DECLSPEC_HIDDEN; extern MINMAXINFO get_min_max_info( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND get_window_relative( HWND hwnd, UINT rel ) DECLSPEC_HIDDEN; extern HWND get_window_relative( HWND hwnd, UINT rel ) DECLSPEC_HIDDEN;
extern DWORD get_window_thread( HWND hwnd, DWORD *process ) DECLSPEC_HIDDEN; extern DWORD get_window_thread( HWND hwnd, DWORD *process ) DECLSPEC_HIDDEN;
......
...@@ -2400,8 +2400,10 @@ static BOOL empty_point( POINT pt ) ...@@ -2400,8 +2400,10 @@ static BOOL empty_point( POINT pt )
return pt.x == -1 && pt.y == -1; return pt.x == -1 && pt.y == -1;
} }
/* see GetWindowPlacement */ /***********************************************************************
BOOL get_window_placement( HWND hwnd, WINDOWPLACEMENT *placement ) * NtUserGetWindowPlacement (win32u.@)
*/
BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement )
{ {
RECT work_rect = get_maximized_work_rect( hwnd ); RECT work_rect = get_maximized_work_rect( hwnd );
WND *win = get_win_ptr( hwnd ); WND *win = get_win_ptr( hwnd );
...@@ -4036,7 +4038,7 @@ static UINT window_min_maximize( HWND hwnd, UINT cmd, RECT *rect ) ...@@ -4036,7 +4038,7 @@ static UINT window_min_maximize( HWND hwnd, UINT cmd, RECT *rect )
TRACE( "%p %u\n", hwnd, cmd ); TRACE( "%p %u\n", hwnd, cmd );
wpl.length = sizeof(wpl); wpl.length = sizeof(wpl);
get_window_placement( hwnd, &wpl ); NtUserGetWindowPlacement( hwnd, &wpl );
if (call_hooks( WH_CBT, HCBT_MINMAX, (WPARAM)hwnd, cmd, TRUE )) if (call_hooks( WH_CBT, HCBT_MINMAX, (WPARAM)hwnd, cmd, TRUE ))
return SWP_NOSIZE | SWP_NOMOVE; return SWP_NOSIZE | SWP_NOMOVE;
...@@ -5393,9 +5395,6 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code ) ...@@ -5393,9 +5395,6 @@ ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
case NtUserCallHwndParam_GetWindowLongPtrW: case NtUserCallHwndParam_GetWindowLongPtrW:
return get_window_long_ptr( hwnd, param, FALSE ); return get_window_long_ptr( hwnd, param, FALSE );
case NtUserCallHwndParam_GetWindowPlacement:
return get_window_placement( hwnd, (WINDOWPLACEMENT *)param );
case NtUserCallHwndParam_GetWindowRect: case NtUserCallHwndParam_GetWindowRect:
return get_window_rect( hwnd, (RECT *)param, get_thread_dpi() ); return get_window_rect( hwnd, (RECT *)param, get_thread_dpi() );
......
...@@ -1023,6 +1023,12 @@ BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *ou ...@@ -1023,6 +1023,12 @@ BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *ou
return unix_funcs->pNtUserGetUpdatedClipboardFormats( formats, size, out_size ); return unix_funcs->pNtUserGetUpdatedClipboardFormats( formats, size, out_size );
} }
BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserGetWindowPlacement( hwnd, placement );
}
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format ) BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format )
{ {
if (!unix_funcs) return FALSE; if (!unix_funcs) return FALSE;
......
...@@ -577,6 +577,7 @@ HDESK WINAPI NtUserGetThreadDesktop( DWORD thread ); ...@@ -577,6 +577,7 @@ HDESK WINAPI NtUserGetThreadDesktop( DWORD thread );
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 );
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 );
NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs *client_procsA, NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs *client_procsA,
...@@ -1000,7 +1001,6 @@ enum ...@@ -1000,7 +1001,6 @@ enum
NtUserCallHwndParam_GetWindowLongW, NtUserCallHwndParam_GetWindowLongW,
NtUserCallHwndParam_GetWindowLongPtrA, NtUserCallHwndParam_GetWindowLongPtrA,
NtUserCallHwndParam_GetWindowLongPtrW, NtUserCallHwndParam_GetWindowLongPtrW,
NtUserCallHwndParam_GetWindowPlacement,
NtUserCallHwndParam_GetWindowRect, NtUserCallHwndParam_GetWindowRect,
NtUserCallHwndParam_GetWindowRelative, NtUserCallHwndParam_GetWindowRelative,
NtUserCallHwndParam_GetWindowThread, NtUserCallHwndParam_GetWindowThread,
...@@ -1093,12 +1093,6 @@ static inline LONG NtUserGetWindowLongW( HWND hwnd, INT offset ) ...@@ -1093,12 +1093,6 @@ static inline LONG NtUserGetWindowLongW( HWND hwnd, INT offset )
return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongW ); return NtUserCallHwndParam( hwnd, offset, NtUserCallHwndParam_GetWindowLongW );
} }
static inline BOOL NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *wndpl )
{
return NtUserCallHwndParam( hwnd, (UINT_PTR)wndpl,
NtUserCallHwndParam_GetWindowPlacement );
}
static inline BOOL NtUserGetWindowRect( HWND hwnd, RECT *rect ) static inline BOOL NtUserGetWindowRect( HWND hwnd, RECT *rect )
{ {
return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetWindowRect ); return NtUserCallHwndParam( hwnd, (UINT_PTR)rect, NtUserCallHwndParam_GetWindowRect );
......
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