Author: jimtabor
Date: Wed Jan 9 07:15:42 2008
New Revision: 31679
URL:
http://svn.reactos.org/svn/reactos?rev=31679&view=rev
Log:
Update SetMetaRgn, UpdateColors, ResizePalette and add support for windows client info
gdi.
Modified:
trunk/reactos/dll/win32/gdi32/misc/stubs.c
trunk/reactos/dll/win32/gdi32/objects/palette.c
trunk/reactos/dll/win32/gdi32/objects/region.c
trunk/reactos/include/reactos/win32k/ntgdityp.h
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/stubs.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Wed Jan 9 07:15:42 2008
@@ -185,18 +185,6 @@
/*
- * @implemented
- */
-int
-STDCALL
-GetMetaRgn(HDC hdc,
- HRGN hrgn)
-{
- return NtGdiGetRandomRgn(hdc,hrgn,2);
-}
-
-
-/*
* @unimplemented
*/
UINT
@@ -213,7 +201,6 @@
}
-
/*
* @unimplemented
*/
@@ -244,35 +231,6 @@
}
/*
- * @unimplemented
- */
-BOOL
-STDCALL
-ResizePalette(
- HPALETTE a0,
- UINT a1
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-SetMetaRgn(
- HDC hdc
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-/*
* @implemented
*/
UINT
@@ -315,21 +273,6 @@
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-UpdateColors(
- HDC hdc
- )
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
/*
* @unimplemented
Modified: trunk/reactos/dll/win32/gdi32/objects/palette.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pa…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/palette.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/palette.c Wed Jan 9 07:15:42 2008
@@ -89,7 +89,19 @@
return UserRealizePalette(hDC);
}
-
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+ResizePalette(
+ HPALETTE hPalette,
+ UINT nEntries
+ )
+{
+ return NtGdiResizePalette(hPalette, nEntries);
+}
+
/*
* @implemented
*/
@@ -110,4 +122,17 @@
return retValue;
}
+/*
+ * @implemented
+ */
+BOOL
+STDCALL
+UpdateColors(
+ HDC hdc
+ )
+{
+ ((PW32CLIENTINFO)NtCurrentTeb()->Win32ClientInfo)->cSpins = 0;
+ return NtGdiUpdateColors(hdc);
+}
+
/* EOF */
Modified: trunk/reactos/dll/win32/gdi32/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/re…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/region.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/region.c Wed Jan 9 07:15:42 2008
@@ -243,6 +243,17 @@
/*
* @implemented
*/
+int
+STDCALL
+GetMetaRgn(HDC hdc,
+ HRGN hrgn)
+{
+ return NtGdiGetRandomRgn(hdc,hrgn,2);
+}
+
+/*
+ * @implemented
+ */
BOOL
STDCALL
MirrorRgn(HWND hwnd, HRGN hrgn)
@@ -313,3 +324,28 @@
#endif
}
+/*
+ * @implemented
+ */
+int
+STDCALL
+SetMetaRgn( HDC hDC )
+{
+ if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)
+ return NtGdiSetMetaRgn(hDC);
+#if 0
+ PLDC pLDC = GdiGetLDC(hDC);
+ if ( pLDC && GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC )
+ {
+ if (pLDC->iType == LDC_EMFLDC || EMFDRV_SetMetaRgn(hDC))
+ {
+ return NtGdiSetMetaRgn(hDC);
+ }
+ else
+ SetLastError(ERROR_INVALID_HANDLE);
+ }
+#endif
+ return 0;
+}
+
+
Modified: trunk/reactos/include/reactos/win32k/ntgdityp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntgdityp.h (original)
+++ trunk/reactos/include/reactos/win32k/ntgdityp.h Wed Jan 9 07:15:42 2008
@@ -357,6 +357,16 @@
RECT r;
HBRUSH hBrush;
} PATRECT, * PPATRECT;
+
+typedef struct _W32CLIENTINFO
+{
+ ULONG CI_flags;
+ ULONG cSpins;
+ ULONG ulWindowsVersion;
+ ULONG ulAppCompatFlags;
+ ULONG ulAppCompatFlags2;
+ ULONG W32ClientInfo[57];
+} W32CLIENTINFO, *PW32CLIENTINFO;
#endif
typedef struct _GDIBSPPATBLT