win32u: Move NtUserGetInternalWindowPos implementation from user32.

This commit is contained in:
Jacek Caban 2022-12-08 01:08:25 +01:00 committed by Alexandre Julliard
parent 026700027e
commit f5c8275329
8 changed files with 28 additions and 21 deletions

View file

@ -314,7 +314,7 @@
@ stdcall GetIconInfoExW(long ptr)
@ stub GetInputDesktop
@ stdcall GetInputState()
@ stdcall GetInternalWindowPos(long ptr ptr)
@ stdcall GetInternalWindowPos(long ptr ptr) NtUserGetInternalWindowPos
@ stdcall GetKBCodePage()
@ stdcall GetKeyNameTextA(long ptr long)
@ stdcall GetKeyNameTextW(long ptr long) NtUserGetKeyNameText

View file

@ -195,25 +195,6 @@ BOOL WINAPI BringWindowToTop( HWND hwnd )
}
/***********************************************************************
* GetInternalWindowPos (USER32.@)
*/
UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
LPPOINT ptIcon )
{
WINDOWPLACEMENT wndpl;
wndpl.length = sizeof(wndpl);
if (NtUserGetWindowPlacement( hwnd, &wndpl ))
{
if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
if (ptIcon) *ptIcon = wndpl.ptMinPosition;
return wndpl.showCmd;
}
return 0;
}
/***********************************************************************
* AnimateWindow (USER32.@)
* Shows/Hides a window with an animation

View file

@ -178,6 +178,7 @@ static void * const syscalls[] =
NtUserGetGUIThreadInfo,
NtUserGetIconInfo,
NtUserGetIconSize,
NtUserGetInternalWindowPos,
NtUserGetKeyNameText,
NtUserGetKeyState,
NtUserGetKeyboardLayout,

View file

@ -943,7 +943,7 @@
@ stub NtUserGetInteractiveControlDeviceInfo
@ stub NtUserGetInteractiveControlInfo
@ stub NtUserGetInteractiveCtrlSupportedWaveforms
@ stub NtUserGetInternalWindowPos
@ stdcall -syscall NtUserGetInternalWindowPos(long ptr ptr)
@ stdcall -syscall NtUserGetKeyNameText(long ptr long)
@ stdcall -syscall NtUserGetKeyState(long)
@ stdcall -syscall NtUserGetKeyboardLayout(long)

View file

@ -2495,6 +2495,20 @@ static void make_rect_onscreen( RECT *rect )
}
}
/***********************************************************************
* NtUserGetInternalWindowPos (win32u.@)
*/
UINT WINAPI NtUserGetInternalWindowPos( HWND hwnd, RECT *rect, POINT *pt )
{
WINDOWPLACEMENT placement;
placement.length = sizeof(placement);
if (!NtUserGetWindowPlacement( hwnd, &placement )) return 0;
if (rect) *rect = placement.rcNormalPosition;
if (pt) *pt = placement.ptMinPosition;
return placement.showCmd;
}
/* make sure the specified point is visible on screen */
static void make_point_onscreen( POINT *pt )
{

View file

@ -164,6 +164,7 @@
SYSCALL_ENTRY( NtUserGetGUIThreadInfo ) \
SYSCALL_ENTRY( NtUserGetIconInfo ) \
SYSCALL_ENTRY( NtUserGetIconSize ) \
SYSCALL_ENTRY( NtUserGetInternalWindowPos ) \
SYSCALL_ENTRY( NtUserGetKeyNameText ) \
SYSCALL_ENTRY( NtUserGetKeyState ) \
SYSCALL_ENTRY( NtUserGetKeyboardLayout ) \

View file

@ -2050,6 +2050,15 @@ NTSTATUS WINAPI wow64_NtUserGetIconSize( UINT *args )
return NtUserGetIconSize( handle, step, width, height );
}
NTSTATUS WINAPI wow64_NtUserGetInternalWindowPos( UINT *args )
{
HWND hwnd = get_handle( &args );
RECT *rect = get_ptr( &args );
POINT *pt = get_ptr( &args );
return NtUserGetInternalWindowPos( hwnd, rect, pt );
}
NTSTATUS WINAPI wow64_NtUserGetKeyNameText( UINT *args )
{
LONG lparam = get_ulong( &args );

View file

@ -744,6 +744,7 @@ BOOL WINAPI NtUserGetGUIThreadInfo( DWORD id, GUITHREADINFO *info );
BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *module,
UNICODE_STRING *res_name, DWORD *bpp, LONG unk );
BOOL WINAPI NtUserGetIconSize( HICON handle, UINT step, LONG *width, LONG *height );
UINT WINAPI NtUserGetInternalWindowPos( HWND hwnd, RECT *rect, POINT *pt );
INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size );
SHORT WINAPI NtUserGetKeyState( INT vkey );
HKL WINAPI NtUserGetKeyboardLayout( DWORD thread_id );