Author: jimtabor
Date: Fri Jan 29 01:58:19 2010
New Revision: 45307
URL:
http://svn.reactos.org/svn/reactos?rev=45307&view=rev
Log:
[User32]
- Make ValidateRect a direct call, update related. Update UpdateWindow and some code
sorting. Getting ready for WND switch.
Modified:
trunk/reactos/dll/win32/user32/include/ntwrapper.h
trunk/reactos/dll/win32/user32/user32.pspec
trunk/reactos/dll/win32/user32/windows/paint.c
Modified: trunk/reactos/dll/win32/user32/include/ntwrapper.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/n…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/ntwrapper.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/include/ntwrapper.h [iso-8859-1] Fri Jan 29 01:58:19
2010
@@ -503,3 +503,8 @@
{
return NtUserInvalidateRect(hWnd, lpRect, bErase);
}
+
+EXTINLINE BOOL WINAPI ValidateRect( HWND hWnd, CONST RECT *lpRect)
+{
+ return NtUserValidateRect(hWnd, lpRect);
+}
Modified: trunk/reactos/dll/win32/user32/user32.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/user32.ps…
==============================================================================
--- trunk/reactos/dll/win32/user32/user32.pspec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/user32.pspec [iso-8859-1] Fri Jan 29 01:58:19 2010
@@ -723,7 +723,7 @@
@ stub UserLpkTabbedTextOut
@ stdcall UserRealizePalette(long)
@ stdcall UserRegisterWowHandlers(ptr ptr)
-@ stdcall ValidateRect(long ptr) ; Direct call NtUserValidateRect
+@ stdcall ValidateRect(long ptr) NtUserValidateRect
@ stdcall ValidateRgn(long long)
@ stdcall VkKeyScanA(long)
@ stdcall VkKeyScanExA(long long)
Modified: trunk/reactos/dll/win32/user32/windows/paint.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/p…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/paint.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/paint.c [iso-8859-1] Fri Jan 29 01:58:19 2010
@@ -16,10 +16,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id$
- *
+/*
* PROJECT: ReactOS user32.dll
- * FILE: lib/user32/windows/paint.c
+ * FILE: dll/win32/user32/windows/paint.c
* PURPOSE: Input
* PROGRAMMER: Casper S. Hornstrup (chorns(a)users.sourceforge.net)
* UPDATE HISTORY:
@@ -114,8 +113,14 @@
* @implemented
*/
BOOL WINAPI
-ScrollDC(HDC hDC, int dx, int dy, CONST RECT *lprcScroll, CONST RECT *lprcClip,
- HRGN hrgnUpdate, LPRECT lprcUpdate)
+ScrollDC(
+ HDC hDC,
+ int dx,
+ int dy,
+ CONST RECT *lprcScroll,
+ CONST RECT *lprcClip,
+ HRGN hrgnUpdate,
+ LPRECT lprcUpdate)
{
if (hDC == NULL) return FALSE;
@@ -127,8 +132,13 @@
return TRUE;
}
- return NtUserScrollDC(hDC, dx, dy, lprcScroll, lprcClip, hrgnUpdate,
- lprcUpdate);
+ return NtUserScrollDC( hDC,
+ dx,
+ dy,
+ lprcScroll,
+ lprcClip,
+ hrgnUpdate,
+ lprcUpdate);
}
/*
@@ -179,24 +189,20 @@
UpdateWindow(
HWND hWnd)
{
- return RedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
-}
-
-
-/*
- * @implemented
- */
-BOOL
-WINAPI
-ValidateRect(
- HWND hWnd,
- CONST RECT *lpRect)
-{
- /* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
- but Wine dont so i removed it... */
- return RedrawWindow(hWnd, lpRect, 0, RDW_VALIDATE);
-}
-
+ PWND pWnd = ValidateHwnd(hWnd);
+
+ if (!pWnd)
+ return FALSE;
+/*
+ if ( pWnd->hrgnUpdate ||
+ pWnd->state & WNDS_INTERNALPAINT ||
+ pWnd->spwndChild )
+ {*/
+ return RedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
+// return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
+/* }
+ return TRUE;*/
+}
/*
* @implemented
@@ -210,8 +216,8 @@
/* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
but Wine dont so i removed it... */
return RedrawWindow( hWnd, NULL, hRgn, RDW_VALIDATE );
-}
-
+// return NtUserCallHwndParamLock(hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_VALIDATERGN);
+}
/*
* @implemented
@@ -224,7 +230,6 @@
{
return (int)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn,
TWOPARAM_ROUTINE_GETWINDOWRGN);
}
-
/*
* @implemented