3 modified files
reactos/lib/gdi32/misc
diff -u -r1.58 -r1.59
--- stubs.c 25 Apr 2004 16:06:20 -0000 1.58
+++ stubs.c 25 Apr 2004 16:40:39 -0000 1.59
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.58 2004/04/25 16:06:20 weiden Exp $
+/* $Id: stubs.c,v 1.59 2004/04/25 16:40:39 weiden Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@@ -387,21 +387,6 @@
return FALSE;
}
-/*
- * @unimplemented
- */
-int
-STDCALL
-ExtSelectClipRgn(
- HDC a0,
- HRGN a1,
- int a2
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @unimplemented
reactos/lib/gdi32/objects
diff -u -r1.6 -r1.7
--- clip.c 25 Apr 2004 16:06:20 -0000 1.6
+++ clip.c 25 Apr 2004 16:40:39 -0000 1.7
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: clip.c,v 1.6 2004/04/25 16:06:20 weiden Exp $
+/* $Id: clip.c,v 1.7 2004/04/25 16:40:39 weiden Exp $
*
* PROJECT: ReactOS gdi32.dll
* FILE: lib/gdi32/objects/clip.c
@@ -70,3 +70,18 @@
{
return NtGdiExcludeClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
}
+
+/*
+ * @implemented
+ */
+int
+STDCALL
+ExtSelectClipRgn(
+ HDC hdc,
+ HRGN hrgn,
+ int fnMode
+ )
+{
+ return NtGdiExtSelectClipRgn(hdc, hrgn, fnMode);
+}
+
reactos/subsys/win32k/objects
diff -u -r1.34 -r1.35
--- cliprgn.c 25 Apr 2004 16:06:20 -0000 1.34
+++ cliprgn.c 25 Apr 2004 16:40:39 -0000 1.35
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: cliprgn.c,v 1.34 2004/04/25 16:06:20 weiden Exp $ */
+/* $Id: cliprgn.c,v 1.35 2004/04/25 16:40:39 weiden Exp $ */
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -153,7 +153,64 @@
HRGN hrgn,
int fnMode)
{
- UNIMPLEMENTED;
+ int retval;
+ DC *dc;
+
+ if (!(dc = DC_LockDc(hDC)))
+ {
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ return ERROR;
+ }
+
+ dc->w.flags &= ~DC_DIRTY;
+
+ if (!hrgn)
+ {
+ if (fnMode == RGN_COPY)
+ {
+ NtGdiDeleteObject(dc->w.hGCClipRgn);
+ dc->w.hGCClipRgn = NULL;
+ }
+ else
+ {
+ DC_UnlockDc( hDC );
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return ERROR;
+ }
+ }
+ else
+ {
+ if (!dc->w.hGCClipRgn)
+ {
+ PROSRGNDATA Rgn;
+ RECT rect;
+ if((Rgn = RGNDATA_LockRgn(dc->w.hVisRgn)))
+ {
+ UnsafeIntGetRgnBox(Rgn, &rect);
+ RGNDATA_UnlockRgn(dc->w.hVisRgn);
+ dc->w.hGCClipRgn = UnsafeIntCreateRectRgnIndirect(&rect);
+ }
+ else
+ {
+ dc->w.hGCClipRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
+ }
+ }
+ if(fnMode == RGN_COPY)
+ NtGdiCombineRgn(dc->w.hGCClipRgn, hrgn, 0, fnMode);
+ else
+ NtGdiCombineRgn(dc->w.hGCClipRgn, dc->w.hGCClipRgn, hrgn, fnMode);
+ }
+
+ if (dc->w.hVisRgn == NULL)
+ {
+ dc->w.hVisRgn = NtGdiCreateRectRgn(0, 0, 0, 0);
+ GDIOBJ_CopyOwnership(hDC, dc->w.hVisRgn);
+ }
+
+ CLIPPING_UpdateGCRegion(dc);
+ DC_UnlockDc( hDC );
+
+ return retval;
}
int FASTCALL
CVSspam 0.2.8