END_CLEANUP;
}
-/*
- * @implemented
- */
-BOOL APIENTRY
-NtUserMoveWindow(
- HWND hWnd,
- int X,
- int Y,
- int nWidth,
- int nHeight,
- BOOL bRepaint)
-{
- return NtUserSetWindowPos(hWnd, 0, X, Y, nWidth, nHeight,
- (bRepaint ? SWP_NOZORDER | SWP_NOACTIVATE :
- SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW));
-}
-
/*
QueryWindow based on KJK::Hyperion and James Tabor.
END_CLEANUP;
}
-
-/*
- * @implemented
- */
-BOOL APIENTRY
-NtUserSetWindowPlacement(HWND hWnd,
- WINDOWPLACEMENT *lpwndpl)
-{
- PWND Wnd;
- WINDOWPLACEMENT Safepl;
- NTSTATUS Status;
- DECLARE_RETURN(BOOL);
- USER_REFERENCE_ENTRY Ref;
-
- DPRINT("Enter NtUserSetWindowPlacement\n");
- UserEnterExclusive();
-
- if (!(Wnd = UserGetWindowObject(hWnd)))
- {
- RETURN( FALSE);
- }
-
- Status = MmCopyFromCaller(&Safepl, lpwndpl, sizeof(WINDOWPLACEMENT));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- RETURN( FALSE);
- }
- if(Safepl.length != sizeof(WINDOWPLACEMENT))
- {
- RETURN( FALSE);
- }
-
- UserRefObjectCo(Wnd, &Ref);
-
- if ((Wnd->style & (WS_MAXIMIZE | WS_MINIMIZE)) == 0)
- {
- co_WinPosSetWindowPos(Wnd, NULL,
- Safepl.rcNormalPosition.left, Safepl.rcNormalPosition.top,
- Safepl.rcNormalPosition.right - Safepl.rcNormalPosition.left,
- Safepl.rcNormalPosition.bottom - Safepl.rcNormalPosition.top,
- SWP_NOZORDER | SWP_NOACTIVATE);
- }
-
- /* FIXME - change window status */
- co_WinPosShowWindow(Wnd, Safepl.showCmd);
-
- Wnd->InternalPosInitialized = TRUE;
- Wnd->InternalPos.NormalRect = Safepl.rcNormalPosition;
- Wnd->InternalPos.IconPos = Safepl.ptMinPosition;
- Wnd->InternalPos.MaxPos = Safepl.ptMaxPosition;
-
- UserDerefObjectCo(Wnd);
- RETURN(TRUE);
-
-CLEANUP:
- DPRINT("Leave NtUserSetWindowPlacement, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-
-/*
- * @implemented
- */
-BOOL APIENTRY
-NtUserSetWindowPos(
- HWND hWnd,
- HWND hWndInsertAfter,
- int X,
- int Y,
- int cx,
- int cy,
- UINT uFlags)
-{
- DECLARE_RETURN(BOOL);
- PWND Window;
- BOOL ret;
- USER_REFERENCE_ENTRY Ref;
-
- DPRINT("Enter NtUserSetWindowPos\n");
- UserEnterExclusive();
-
- if (!(Window = UserGetWindowObject(hWnd)))
- {
- RETURN(FALSE);
- }
-
- /* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */
- if (!(uFlags & SWP_NOMOVE))
- {
- if (X < -32768) X = -32768;
- else if (X > 32767) X = 32767;
- if (Y < -32768) Y = -32768;
- else if (Y > 32767) Y = 32767;
- }
- if (!(uFlags & SWP_NOSIZE))
- {
- if (cx < 0) cx = 0;
- else if (cx > 32767) cx = 32767;
- if (cy < 0) cy = 0;
- else if (cy > 32767) cy = 32767;
- }
-
- UserRefObjectCo(Window, &Ref);
- ret = co_WinPosSetWindowPos(Window, hWndInsertAfter, X, Y, cx, cy, uFlags);
- UserDerefObjectCo(Window);
-
- RETURN(ret);
-
-CLEANUP:
- DPRINT("Leave NtUserSetWindowPos, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-/*
- * @implemented
- */
-INT APIENTRY
-NtUserSetWindowRgn(
- HWND hWnd,
- HRGN hRgn,
- BOOL bRedraw)
-{
- HRGN hrgnCopy;
- PWND Window;
- INT flags = (SWP_NOCLIENTSIZE|SWP_NOCLIENTMOVE|SWP_NOACTIVATE|SWP_FRAMECHANGED|SWP_NOSIZE|SWP_NOMOVE);
- BOOLEAN Ret = FALSE;
- DECLARE_RETURN(INT);
-
- DPRINT("Enter NtUserSetWindowRgn\n");
- UserEnterExclusive();
-
- if (!(Window = UserGetWindowObject(hWnd)))
- {
- RETURN( 0);
- }
-
- if (hRgn) // The region will be deleted in user32.
- {
- if (GDIOBJ_ValidateHandle(hRgn, GDI_OBJECT_TYPE_REGION))
- {
- hrgnCopy = IntSysCreateRectRgn(0, 0, 0, 0);
-
- NtGdiCombineRgn(hrgnCopy, hRgn, 0, RGN_COPY);
- }
- else
- RETURN( 0);
- }
- else
- {
- hrgnCopy = NULL;
- }
-
- if (Window->hrgnClip)
- {
- /* Delete no longer needed region handle */
- GreDeleteObject(Window->hrgnClip);
- }
-
- if (hrgnCopy)
- {
- if (Window->fnid != FNID_DESKTOP)
- NtGdiOffsetRgn(hrgnCopy, Window->rcWindow.left, Window->rcWindow.top);
-
- /* Set public ownership */
- IntGdiSetRegionOwner(hrgnCopy, GDI_OBJ_HMGR_PUBLIC);
- }
- Window->hrgnClip = hrgnCopy;
-
- Ret = co_WinPosSetWindowPos(Window, HWND_TOP, 0, 0, 0, 0, bRedraw ? flags : (flags|SWP_NOREDRAW) );
-
- RETURN( (INT)Ret);
-
-CLEANUP:
- DPRINT("Leave NtUserSetWindowRgn, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-
-/*
- * @implemented
- */
-BOOL APIENTRY
-NtUserShowWindow(HWND hWnd, LONG nCmdShow)
-{
- PWND Window;
- BOOL ret;
- DECLARE_RETURN(BOOL);
- USER_REFERENCE_ENTRY Ref;
-
- DPRINT("Enter NtUserShowWindow\n");
- UserEnterExclusive();
-
- if (!(Window = UserGetWindowObject(hWnd)))
- {
- RETURN(FALSE);
- }
-
- UserRefObjectCo(Window, &Ref);
- ret = co_WinPosShowWindow(Window, nCmdShow);
- UserDerefObjectCo(Window);
-
- RETURN(ret);
-
-CLEANUP:
- DPRINT("Leave NtUserShowWindow, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL APIENTRY
-NtUserShowWindowAsync(HWND hWnd, LONG nCmdShow)
-{
-#if 0
- UNIMPLEMENTED
- return 0;
-#else
- return NtUserShowWindow(hWnd, nCmdShow);
-#endif
-}
-
/*
* @implemented
*/