From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/winpos.c | 3 +-- dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 8 ++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 9 +++++++++ include/ntuser.h | 1 + 7 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index cee549d1ea9..00f82c33538 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -107,8 +107,7 @@ HWND WINAPI ChildWindowFromPoint( HWND parent, POINT pt ) */ HWND WINAPI RealChildWindowFromPoint( HWND parent, POINT pt ) { - return NtUserChildWindowFromPointEx( parent, pt.x, pt.y, - CWP_SKIPTRANSPARENT | CWP_SKIPINVISIBLE ); + return NtUserRealChildWindowFromPoint( parent, pt.x, pt.y ); }
/******************************************************************* diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 558edc0257e..6aacfa47f2b 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -239,6 +239,7 @@ static void * const syscalls[] = NtUserPostThreadMessage, NtUserPrintWindow, NtUserQueryInputContext, + NtUserRealChildWindowFromPoint, NtUserRedrawWindow, NtUserRegisterClassExWOW, NtUserRegisterHotKey, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 1d85a450748..e2d84238008 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1117,7 +1117,7 @@ @ stdcall -syscall NtUserQueryInputContext(long long) @ stub NtUserQuerySendMessage @ stub NtUserQueryWindow -@ stub NtUserRealChildWindowFromPoint +@ stdcall -syscall NtUserRealChildWindowFromPoint(long long long) @ stub NtUserRealInternalGetMessage @ stub NtUserRealWaitMessageEx @ stdcall -syscall NtUserRedrawWindow(long ptr long long) diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 9a8963ce2a1..5074f255fd8 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -2296,6 +2296,14 @@ HWND WINAPI NtUserChildWindowFromPointEx( HWND parent, LONG x, LONG y, UINT flag return ret; }
+/******************************************************************* + * NtUserRealChildWindowFromPoint (win32u.@) + */ +HWND WINAPI NtUserRealChildWindowFromPoint( HWND parent, LONG x, LONG y ) +{ + return NtUserChildWindowFromPointEx( parent, x, y, CWP_SKIPTRANSPARENT | CWP_SKIPINVISIBLE ); +} + /******************************************************************* * get_work_rect * diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 8573fa743a5..1730b6a1f60 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -225,6 +225,7 @@ SYSCALL_ENTRY( NtUserPostThreadMessage ) \ SYSCALL_ENTRY( NtUserPrintWindow ) \ SYSCALL_ENTRY( NtUserQueryInputContext ) \ + SYSCALL_ENTRY( NtUserRealChildWindowFromPoint ) \ SYSCALL_ENTRY( NtUserRedrawWindow ) \ SYSCALL_ENTRY( NtUserRegisterClassExWOW ) \ SYSCALL_ENTRY( NtUserRegisterHotKey ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index afc73ca1322..831ee2e84fc 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -2423,6 +2423,15 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputDeviceList( UINT *args ) } }
+NTSTATUS WINAPI wow64_NtUserRealChildWindowFromPoint( UINT *args ) +{ + HWND parent = get_handle( &args ); + LONG x = get_ulong( &args ); + LONG y = get_ulong( &args ); + + return HandleToUlong( NtUserRealChildWindowFromPoint( parent, x, y )); +} + NTSTATUS WINAPI wow64_NtUserRegisterClassExWOW( UINT *args ) { const WNDCLASSEXW32 *wc32 = get_ptr( &args ); diff --git a/include/ntuser.h b/include/ntuser.h index 3c41e435712..34e7f5240e7 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -812,6 +812,7 @@ BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam ); BOOL WINAPI NtUserPrintWindow( HWND hwnd, HDC hdc, UINT flags ); UINT_PTR WINAPI NtUserQueryInputContext( HIMC handle, UINT attr ); +HWND WINAPI NtUserRealChildWindowFromPoint( HWND parent, LONG x, LONG y ); BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags ); ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version, struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,
From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/user32.spec | 2 +- dlls/user32/winpos.c | 19 ------------------- dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/window.c | 14 ++++++++++++++ dlls/wow64win/syscall.h | 1 + dlls/wow64win/user.c | 9 +++++++++ include/ntuser.h | 1 + 8 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 6f827144935..a53d02cd064 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -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 diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 00f82c33538..6e2c892f2b7 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -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 diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 6aacfa47f2b..6c59c91b5b0 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -178,6 +178,7 @@ static void * const syscalls[] = NtUserGetGUIThreadInfo, NtUserGetIconInfo, NtUserGetIconSize, + NtUserGetInternalWindowPos, NtUserGetKeyNameText, NtUserGetKeyState, NtUserGetKeyboardLayout, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index e2d84238008..1ffcfcaef5a 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -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) diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 5074f255fd8..24931eab199 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -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 ) { diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 1730b6a1f60..24e52a2a476 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -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 ) \ diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c index 831ee2e84fc..c8354e6b04a 100644 --- a/dlls/wow64win/user.c +++ b/dlls/wow64win/user.c @@ -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 ); diff --git a/include/ntuser.h b/include/ntuser.h index 34e7f5240e7..2ca383c6e69 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -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 );
From: Jacek Caban jacek@codeweavers.com
--- dlls/user32/Makefile.in | 1 - dlls/user32/win.c | 228 +++++++++++++++++++++++++++++++++++ dlls/user32/winpos.c | 258 ---------------------------------------- 3 files changed, 228 insertions(+), 259 deletions(-) delete mode 100644 dlls/user32/winpos.c
diff --git a/dlls/user32/Makefile.in b/dlls/user32/Makefile.in index 1a29970e112..0cf2d575e87 100644 --- a/dlls/user32/Makefile.in +++ b/dlls/user32/Makefile.in @@ -42,7 +42,6 @@ C_SRCS = \ user_main.c \ win.c \ winhelp.c \ - winpos.c \ winproc.c \ winstation.c \ wsprintf.c diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 150c334b9d8..28cf40441d9 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -648,6 +648,234 @@ UINT WINAPI GetDpiForWindow( HWND hwnd ) }
+/*********************************************************************** + * SwitchToThisWindow (USER32.@) + */ +void WINAPI SwitchToThisWindow( HWND hwnd, BOOL alt_tab ) +{ + if (IsIconic( hwnd )) NtUserShowWindow( hwnd, SW_RESTORE ); + else BringWindowToTop( hwnd ); +} + + +/*********************************************************************** + * GetWindowRect (USER32.@) + */ +BOOL WINAPI GetWindowRect( HWND hwnd, RECT *rect ) +{ + BOOL ret = NtUserGetWindowRect( hwnd, rect ); + if (ret) TRACE( "hwnd %p %s\n", hwnd, wine_dbgstr_rect(rect) ); + return ret; +} + + +/*********************************************************************** + * GetWindowRgn (USER32.@) + */ +int WINAPI GetWindowRgn( HWND hwnd, HRGN hrgn ) +{ + return NtUserGetWindowRgnEx( hwnd, hrgn, 0 ); +} + + +/*********************************************************************** + * GetWindowRgnBox (USER32.@) + */ +int WINAPI GetWindowRgnBox( HWND hwnd, RECT *rect ) +{ + int ret = ERROR; + HRGN hrgn; + + if (!rect) + return ERROR; + + if ((hrgn = CreateRectRgn( 0, 0, 0, 0 ))) + { + if ((ret = GetWindowRgn( hwnd, hrgn )) != ERROR ) + ret = GetRgnBox( hrgn, rect ); + DeleteObject( hrgn ); + } + + return ret; +} + + +/*********************************************************************** + * GetClientRect (USER32.@) + */ +BOOL WINAPI GetClientRect( HWND hwnd, RECT *rect ) +{ + return NtUserGetClientRect( hwnd, rect ); +} + + +/******************************************************************* + * WindowFromPoint (USER32.@) + */ +HWND WINAPI WindowFromPoint( POINT pt ) +{ + return NtUserWindowFromPoint( pt.x, pt.y ); +} + + +/******************************************************************* + * ChildWindowFromPoint (USER32.@) + */ +HWND WINAPI ChildWindowFromPoint( HWND parent, POINT pt ) +{ + return NtUserChildWindowFromPointEx( parent, pt.x, pt.y, CWP_ALL ); +} + +/******************************************************************* + * RealChildWindowFromPoint (USER32.@) + */ +HWND WINAPI RealChildWindowFromPoint( HWND parent, POINT pt ) +{ + return NtUserRealChildWindowFromPoint( parent, pt.x, pt.y ); +} + +/******************************************************************* + * ChildWindowFromPointEx (USER32.@) + */ +HWND WINAPI ChildWindowFromPointEx( HWND parent, POINT pt, UINT flags ) +{ + return NtUserChildWindowFromPointEx( parent, pt.x, pt.y, flags ); +} + + +/******************************************************************* + * MapWindowPoints (USER32.@) + */ +INT WINAPI MapWindowPoints( HWND hwnd_from, HWND hwnd_to, POINT *points, UINT count ) +{ + return NtUserMapWindowPoints( hwnd_from, hwnd_to, points, count ); +} + + +/******************************************************************* + * ClientToScreen (USER32.@) + */ +BOOL WINAPI ClientToScreen( HWND hwnd, POINT *pt ) +{ + return NtUserClientToScreen( hwnd, pt ); +} + + +/******************************************************************* + * ScreenToClient (USER32.@) + */ +BOOL WINAPI ScreenToClient( HWND hwnd, POINT *pt ) +{ + return NtUserScreenToClient( hwnd, pt ); +} + + +/*********************************************************************** + * IsIconic (USER32.@) + */ +BOOL WINAPI IsIconic( HWND hwnd ) +{ + return (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MINIMIZE) != 0; +} + + +/*********************************************************************** + * IsZoomed (USER32.@) + */ +BOOL WINAPI IsZoomed( HWND hwnd ) +{ + return (GetWindowLongW( hwnd, GWL_STYLE ) & WS_MAXIMIZE) != 0; +} + + +/******************************************************************* + * AllowSetForegroundWindow (USER32.@) + */ +BOOL WINAPI AllowSetForegroundWindow( DWORD procid ) +{ + /* FIXME: If Win98/2000 style SetForegroundWindow behavior is + * implemented, then fix this function. */ + return TRUE; +} + + +/******************************************************************* + * LockSetForegroundWindow (USER32.@) + */ +BOOL WINAPI LockSetForegroundWindow( UINT lockcode ) +{ + /* FIXME: If Win98/2000 style SetForegroundWindow behavior is + * implemented, then fix this function. */ + return TRUE; +} + + +/*********************************************************************** + * BringWindowToTop (USER32.@) + */ +BOOL WINAPI BringWindowToTop( HWND hwnd ) +{ + return NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); +} + + +/*********************************************************************** + * AnimateWindow (USER32.@) + */ +BOOL WINAPI AnimateWindow( HWND hwnd, DWORD time, DWORD flags ) +{ + FIXME( "partial stub\n" ); + + /* If trying to show/hide and it's already shown/hidden or invalid window, + * fail with invalid parameter. */ + if (!IsWindow( hwnd ) || (!(flags & AW_HIDE)) == IsWindowVisible( hwnd )) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + NtUserShowWindow( hwnd, (flags & AW_HIDE) ? SW_HIDE : ((flags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA) ); + return TRUE; +} + + +/*********************************************************************** + * BeginDeferWindowPos (USER32.@) + */ +HDWP WINAPI BeginDeferWindowPos( INT count ) +{ + return NtUserBeginDeferWindowPos( count ); +} + + +/*********************************************************************** + * DeferWindowPos (USER32.@) + */ +HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y, + INT cx, INT cy, UINT flags ) +{ + return NtUserDeferWindowPosAndBand( hdwp, hwnd, after, x, y, cx, cy, flags, 0, 0 ); +} + + +/*********************************************************************** + * EndDeferWindowPos (USER32.@) + */ +BOOL WINAPI EndDeferWindowPos( HDWP hdwp ) +{ + return NtUserEndDeferWindowPosEx( hdwp, FALSE ); +} + + +/*********************************************************************** + * ArrangeIconicWindows (USER32.@) + */ +UINT WINAPI ArrangeIconicWindows( HWND parent ) +{ + return NtUserArrangeIconicWindows( parent ); +} + + /********************************************************************** * GetWindowWord (USER32.@) */ diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c deleted file mode 100644 index 6e2c892f2b7..00000000000 --- a/dlls/user32/winpos.c +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Window position related functions. - * - * Copyright 1993, 1994, 1995 Alexandre Julliard - * 1995, 1996, 1999 Alex Korobka - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "user_private.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(win); - - -/*********************************************************************** - * SwitchToThisWindow (USER32.@) - */ -void WINAPI SwitchToThisWindow( HWND hwnd, BOOL alt_tab ) -{ - if (IsIconic( hwnd )) NtUserShowWindow( hwnd, SW_RESTORE ); - else BringWindowToTop( hwnd ); -} - - -/*********************************************************************** - * GetWindowRect (USER32.@) - */ -BOOL WINAPI GetWindowRect( HWND hwnd, LPRECT rect ) -{ - BOOL ret = NtUserGetWindowRect( hwnd, rect ); - if (ret) TRACE( "hwnd %p %s\n", hwnd, wine_dbgstr_rect(rect) ); - return ret; -} - - -/*********************************************************************** - * GetWindowRgn (USER32.@) - */ -int WINAPI GetWindowRgn( HWND hwnd, HRGN hrgn ) -{ - return NtUserGetWindowRgnEx( hwnd, hrgn, 0 ); -} - -/*********************************************************************** - * GetWindowRgnBox (USER32.@) - */ -int WINAPI GetWindowRgnBox( HWND hwnd, LPRECT prect ) -{ - int ret = ERROR; - HRGN hrgn; - - if (!prect) - return ERROR; - - if ((hrgn = CreateRectRgn(0, 0, 0, 0))) - { - if ((ret = GetWindowRgn( hwnd, hrgn )) != ERROR ) - ret = GetRgnBox( hrgn, prect ); - DeleteObject(hrgn); - } - - return ret; -} - - -/*********************************************************************** - * GetClientRect (USER32.@) - */ -BOOL WINAPI GetClientRect( HWND hwnd, LPRECT rect ) -{ - return NtUserGetClientRect( hwnd, rect ); -} - - -/******************************************************************* - * WindowFromPoint (USER32.@) - */ -HWND WINAPI WindowFromPoint( POINT pt ) -{ - return NtUserWindowFromPoint( pt.x, pt.y ); -} - - -/******************************************************************* - * ChildWindowFromPoint (USER32.@) - */ -HWND WINAPI ChildWindowFromPoint( HWND parent, POINT pt ) -{ - return NtUserChildWindowFromPointEx( parent, pt.x, pt.y, CWP_ALL ); -} - -/******************************************************************* - * RealChildWindowFromPoint (USER32.@) - */ -HWND WINAPI RealChildWindowFromPoint( HWND parent, POINT pt ) -{ - return NtUserRealChildWindowFromPoint( parent, pt.x, pt.y ); -} - -/******************************************************************* - * ChildWindowFromPointEx (USER32.@) - */ -HWND WINAPI ChildWindowFromPointEx( HWND parent, POINT pt, UINT flags ) -{ - return NtUserChildWindowFromPointEx( parent, pt.x, pt.y, flags ); -} - - -/******************************************************************* - * MapWindowPoints (USER32.@) - */ -INT WINAPI MapWindowPoints( HWND hwnd_from, HWND hwnd_to, POINT *points, UINT count ) -{ - return NtUserMapWindowPoints( hwnd_from, hwnd_to, points, count ); -} - - -/******************************************************************* - * ClientToScreen (USER32.@) - */ -BOOL WINAPI ClientToScreen( HWND hwnd, POINT *pt ) -{ - return NtUserClientToScreen( hwnd, pt ); -} - - -/******************************************************************* - * ScreenToClient (USER32.@) - */ -BOOL WINAPI ScreenToClient( HWND hwnd, POINT *pt ) -{ - return NtUserScreenToClient( hwnd, pt ); -} - - -/*********************************************************************** - * IsIconic (USER32.@) - */ -BOOL WINAPI IsIconic(HWND hWnd) -{ - return (GetWindowLongW( hWnd, GWL_STYLE ) & WS_MINIMIZE) != 0; -} - - -/*********************************************************************** - * IsZoomed (USER32.@) - */ -BOOL WINAPI IsZoomed(HWND hWnd) -{ - return (GetWindowLongW( hWnd, GWL_STYLE ) & WS_MAXIMIZE) != 0; -} - - -/******************************************************************* - * AllowSetForegroundWindow (USER32.@) - */ -BOOL WINAPI AllowSetForegroundWindow( DWORD procid ) -{ - /* FIXME: If Win98/2000 style SetForegroundWindow behavior is - * implemented, then fix this function. */ - return TRUE; -} - - -/******************************************************************* - * LockSetForegroundWindow (USER32.@) - */ -BOOL WINAPI LockSetForegroundWindow( UINT lockcode ) -{ - /* FIXME: If Win98/2000 style SetForegroundWindow behavior is - * implemented, then fix this function. */ - return TRUE; -} - - -/*********************************************************************** - * BringWindowToTop (USER32.@) - */ -BOOL WINAPI BringWindowToTop( HWND hwnd ) -{ - return NtUserSetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE ); -} - - -/*********************************************************************** - * AnimateWindow (USER32.@) - * Shows/Hides a window with an animation - * NO ANIMATION YET - */ -BOOL WINAPI AnimateWindow(HWND hwnd, DWORD dwTime, DWORD dwFlags) -{ - FIXME("partial stub\n"); - - /* If trying to show/hide and it's already * - * shown/hidden or invalid window, fail with * - * invalid parameter */ - if(!IsWindow(hwnd) || - (IsWindowVisible(hwnd) && !(dwFlags & AW_HIDE)) || - (!IsWindowVisible(hwnd) && (dwFlags & AW_HIDE))) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - NtUserShowWindow( hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA) ); - - return TRUE; -} - - -/*********************************************************************** - * BeginDeferWindowPos (USER32.@) - */ -HDWP WINAPI BeginDeferWindowPos( INT count ) -{ - return NtUserBeginDeferWindowPos( count ); -} - - -/*********************************************************************** - * DeferWindowPos (USER32.@) - */ -HDWP WINAPI DeferWindowPos( HDWP hdwp, HWND hwnd, HWND after, INT x, INT y, - INT cx, INT cy, UINT flags ) -{ - return NtUserDeferWindowPosAndBand( hdwp, hwnd, after, x, y, cx, cy, flags, 0, 0 ); -} - - -/*********************************************************************** - * EndDeferWindowPos (USER32.@) - */ -BOOL WINAPI EndDeferWindowPos( HDWP hdwp ) -{ - return NtUserEndDeferWindowPosEx( hdwp, FALSE ); -} - - -/*********************************************************************** - * ArrangeIconicWindows (USER32.@) - */ -UINT WINAPI ArrangeIconicWindows( HWND parent ) -{ - return NtUserArrangeIconicWindows( parent ); -}
This merge request was approved by Huw Davies.