- InvalidateRgn and InvalidateRect by Tim Jobling

svn path=/trunk/; revision=4437
This commit is contained in:
Richard Campbell 2003-03-27 02:25:14 +00:00
parent b47552e96f
commit 8923bf8701
3 changed files with 52 additions and 26 deletions

View file

@ -1,4 +1,4 @@
/* $Id: painting.c,v 1.11 2003/03/20 10:10:12 gvg Exp $
/* $Id: painting.c,v 1.12 2003/03/27 02:25:14 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -832,3 +832,52 @@ NtUserBeginPaint(HWND hWnd, PAINTSTRUCT* lPs)
ObmDereferenceObject(Window);
return(lPs->hdc);
}
DWORD
STDCALL
NtUserInvalidateRect(
HWND hWnd,
CONST RECT *lpRect,
WINBOOL bErase)
{
HRGN hRGN;
hRGN = W32kCreateRectRgnIndirect(lpRect);
return NtUserInvalidateRgn(hWnd, hRGN, bErase);
}
DWORD
STDCALL
NtUserInvalidateRgn(
HWND hWnd,
HRGN hRgn,
WINBOOL bErase)
{
PWINDOW_OBJECT WindowObject;
WindowObject = W32kGetWindowObject(hWnd);
if (WindowObject == NULL)
{
return(FALSE);
}
if( WindowObject->UpdateRegion == NULL )
{
WindowObject->UpdateRegion = W32kCreateRectRgn (0, 0, 1, 1);
if (!W32kCombineRgn(WindowObject->UpdateRegion, hRgn, hRgn, RGN_COPY ))
{
W32kReleaseWindowObject(WindowObject);
return(FALSE);
}
}
if (!W32kCombineRgn(WindowObject->UpdateRegion, WindowObject->UpdateRegion, hRgn, RGN_OR ))
{
W32kReleaseWindowObject(WindowObject);
return(FALSE);
}
W32kReleaseWindowObject(WindowObject);
W32kSendMessage(hWnd, WM_PAINT, 0, 0, FALSE);
return(TRUE);
}

View file

@ -1110,30 +1110,6 @@ NtUserInitTask(
return 0;
}
DWORD
STDCALL
NtUserInvalidateRect(
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserInvalidateRgn(
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserIsClipboardFormatAvailable(

View file

@ -1,4 +1,4 @@
/* $Id: dc.c,v 1.52 2003/03/24 22:49:54 gvg Exp $
/* $Id: dc.c,v 1.53 2003/03/27 02:25:14 rcampbell Exp $
*
* DC.C - Device context functions
*
@ -1324,6 +1324,7 @@ HDC DC_FindOpenDC(LPCWSTR Driver)
void DC_InitDC(HDC DCHandle)
{
// W32kRealizeDefaultPalette(DCHandle);
//W32kSelectObject(DCHandle, W32kGetStockObject( BLACK_PEN ));
W32kSelectObject(DCHandle, W32kGetStockObject( WHITE_BRUSH ));
//W32kSelectObject(DCHandle, hPen);