- Make ValidateRect a direct call, update related. Update UpdateWindow and some code sorting. Getting ready for WND switch.

svn path=/trunk/; revision=45307
This commit is contained in:
James Tabor 2010-01-29 00:58:19 +00:00
parent 69ae9c4e57
commit 49439aff5f
3 changed files with 35 additions and 25 deletions

View file

@ -503,3 +503,8 @@ InvalidateRect(HWND hWnd, CONST RECT* lpRect, BOOL bErase)
{ {
return NtUserInvalidateRect(hWnd, lpRect, bErase); return NtUserInvalidateRect(hWnd, lpRect, bErase);
} }
EXTINLINE BOOL WINAPI ValidateRect( HWND hWnd, CONST RECT *lpRect)
{
return NtUserValidateRect(hWnd, lpRect);
}

View file

@ -723,7 +723,7 @@
@ stub UserLpkTabbedTextOut @ stub UserLpkTabbedTextOut
@ stdcall UserRealizePalette(long) @ stdcall UserRealizePalette(long)
@ stdcall UserRegisterWowHandlers(ptr ptr) @ stdcall UserRegisterWowHandlers(ptr ptr)
@ stdcall ValidateRect(long ptr) ; Direct call NtUserValidateRect @ stdcall ValidateRect(long ptr) NtUserValidateRect
@ stdcall ValidateRgn(long long) @ stdcall ValidateRgn(long long)
@ stdcall VkKeyScanA(long) @ stdcall VkKeyScanA(long)
@ stdcall VkKeyScanExA(long long) @ stdcall VkKeyScanExA(long long)

View file

@ -16,10 +16,9 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id$ /*
*
* PROJECT: ReactOS user32.dll * PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/paint.c * FILE: dll/win32/user32/windows/paint.c
* PURPOSE: Input * PURPOSE: Input
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net) * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
* UPDATE HISTORY: * UPDATE HISTORY:
@ -114,8 +113,14 @@ GetUpdateRgn(
* @implemented * @implemented
*/ */
BOOL WINAPI BOOL WINAPI
ScrollDC(HDC hDC, int dx, int dy, CONST RECT *lprcScroll, CONST RECT *lprcClip, ScrollDC(
HRGN hrgnUpdate, LPRECT lprcUpdate) HDC hDC,
int dx,
int dy,
CONST RECT *lprcScroll,
CONST RECT *lprcClip,
HRGN hrgnUpdate,
LPRECT lprcUpdate)
{ {
if (hDC == NULL) return FALSE; if (hDC == NULL) return FALSE;
@ -127,7 +132,12 @@ ScrollDC(HDC hDC, int dx, int dy, CONST RECT *lprcScroll, CONST RECT *lprcClip,
return TRUE; return TRUE;
} }
return NtUserScrollDC(hDC, dx, dy, lprcScroll, lprcClip, hrgnUpdate, return NtUserScrollDC( hDC,
dx,
dy,
lprcScroll,
lprcClip,
hrgnUpdate,
lprcUpdate); lprcUpdate);
} }
@ -179,25 +189,21 @@ WINAPI
UpdateWindow( UpdateWindow(
HWND hWnd) HWND hWnd)
{ {
return RedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN ); PWND pWnd = ValidateHwnd(hWnd);
}
if (!pWnd)
return FALSE;
/* /*
* @implemented if ( pWnd->hrgnUpdate ||
*/ pWnd->state & WNDS_INTERNALPAINT ||
BOOL pWnd->spwndChild )
WINAPI {*/
ValidateRect( return RedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
HWND hWnd, // return NtUserCallHwndLock(hWnd, HWNDLOCK_ROUTINE_UPDATEWINDOW);
CONST RECT *lpRect) /* }
{ return TRUE;*/
/* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
but Wine dont so i removed it... */
return RedrawWindow(hWnd, lpRect, 0, RDW_VALIDATE);
} }
/* /*
* @implemented * @implemented
*/ */
@ -210,9 +216,9 @@ ValidateRgn(
/* FIXME: should RDW_NOCHILDREN be included too? Ros used to, /* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
but Wine dont so i removed it... */ but Wine dont so i removed it... */
return RedrawWindow( hWnd, NULL, hRgn, RDW_VALIDATE ); return RedrawWindow( hWnd, NULL, hRgn, RDW_VALIDATE );
// return NtUserCallHwndParamLock(hWnd, (DWORD)hRgn, TWOPARAM_ROUTINE_VALIDATERGN);
} }
/* /*
* @implemented * @implemented
*/ */
@ -225,7 +231,6 @@ GetWindowRgn(
return (int)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn, TWOPARAM_ROUTINE_GETWINDOWRGN); return (int)NtUserCallTwoParam((DWORD_PTR)hWnd, (DWORD_PTR)hRgn, TWOPARAM_ROUTINE_GETWINDOWRGN);
} }
/* /*
* @implemented * @implemented
*/ */