Author: jimtabor
Date: Thu Jan 21 03:58:52 2010
New Revision: 45171
URL:
http://svn.reactos.org/svn/reactos?rev=45171&view=rev
Log:
[Win32k]
- Add system region support functions.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/region.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Thu Jan 21
03:58:52 2010
@@ -2186,6 +2186,40 @@
These regions do not use attribute sections and when allocated, use gdiobj
level functions.
*/
+//
+// System Region Functions
+//
+INT
+FASTCALL
+IntSysRegComplexity(HRGN hRgn)
+{
+ PROSRGNDATA pRgn;
+ INT Ret;
+
+ pRgn = REGION_LockRgn(hRgn);
+ Ret = REGION_Complexity( pRgn );
+ REGION_UnlockRgn(pRgn);
+ return Ret;
+}
+
+HRGN
+FASTCALL
+IntSysCreateRectRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
+{
+ PROSRGNDATA pRgn;
+ HRGN hRgn;
+
+ pRgn = (PROSRGNDATA)GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_REGION);
+ if (!pRgn)
+ {
+ return NULL;
+ }
+ hRgn = pRgn->BaseObject.hHmgr;
+ pRgn->Buffer = &pRgn->rdh.rcBound;
+ REGION_SetRectRgn(pRgn, LeftRect, TopRect, RightRect, BottomRect);
+ REGION_UnlockRgn(pRgn);
+ return hRgn;
+}
BOOL INTERNAL_CALL
REGION_Cleanup(PVOID ObjectBody)
@@ -2196,6 +2230,7 @@
return TRUE;
}
+// use REGION_FreeRgnByHandle(hRgn); for systems regions.
VOID FASTCALL
REGION_Delete(PROSRGNDATA pRgn)
{