win32u: Move NtUserPrintWindow implementation from user32.
[wine.git] / dlls / user32 / painting.c
blobde67cd97e5fa1d758951e9d193e387083133116c
1 /*
2 * Window painting functions
4 * Copyright 1993, 1994, 1995, 2001, 2004, 2005, 2008 Alexandre Julliard
5 * Copyright 1996, 1997, 1999 Alex Korobka
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "user_private.h"
25 /***********************************************************************
26 * UpdateWindow (USER32.@)
28 BOOL WINAPI UpdateWindow( HWND hwnd )
30 if (!hwnd)
32 SetLastError( ERROR_INVALID_WINDOW_HANDLE );
33 return FALSE;
36 return NtUserRedrawWindow( hwnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
40 /***********************************************************************
41 * ValidateRgn (USER32.@)
43 BOOL WINAPI ValidateRgn( HWND hwnd, HRGN hrgn )
45 if (!hwnd)
47 SetLastError( ERROR_INVALID_WINDOW_HANDLE );
48 return FALSE;
51 return NtUserRedrawWindow( hwnd, NULL, hrgn, RDW_VALIDATE );
55 /*************************************************************************
56 * ScrollWindow (USER32.@)
59 BOOL WINAPI ScrollWindow( HWND hwnd, INT dx, INT dy,
60 const RECT *rect, const RECT *clipRect )
62 UINT flags = SW_INVALIDATE | SW_ERASE | (rect ? 0 : SW_SCROLLCHILDREN) | SW_NODCCACHE;
63 return NtUserScrollWindowEx( hwnd, dx, dy, rect, clipRect, 0, NULL, flags );