[Win32k]
[reactos.git] / reactos / subsystems / win32 / win32k / include / region.h
index f6d1bb8..a7e531d 100644 (file)
@@ -1,6 +1,4 @@
-
-#ifndef __WIN32K_REGION_H
-#define __WIN32K_REGION_H
+#pragma once
 
 #include "gdiobj.h"
 
@@ -15,34 +13,48 @@ typedef struct _ROSRGNDATA
   BASEOBJECT    BaseObject;
 
   RGNDATAHEADER rdh;
-  PRECT         Buffer;
-} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
+  RECTL        *Buffer;
+} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA, REGION, *PREGION;
 
 
 /* Functions ******************************************************************/
 
 #define  REGION_FreeRgn(pRgn)  GDIOBJ_FreeObj((POBJ)pRgn, GDIObjType_RGN_TYPE)
-#define  REGION_FreeRgnByHandle(hRgn)  GDIOBJ_FreeObjbyHandle((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
+#define  REGION_FreeRgnByHandle(hRgn)  GDIOBJ_FreeObjByHandle((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
 #define  REGION_LockRgn(hRgn) ((PROSRGNDATA)GDIOBJ_LockObj((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION))
 #define  REGION_UnlockRgn(pRgn) GDIOBJ_UnlockObjByPtr((POBJ)pRgn)
 
 PROSRGNDATA FASTCALL REGION_AllocRgnWithHandle(INT n);
-VOID FASTCALL REGION_UnionRectWithRgn(ROSRGNDATA *rgn, CONST RECT *rect);
-INT FASTCALL REGION_GetRgnBox(PROSRGNDATA Rgn, LPRECT pRect);
-BOOL FASTCALL REGION_RectInRegion(PROSRGNDATA Rgn, CONST LPRECT rc);
-BOOL FASTCALL REGION_CropAndOffsetRegion(PROSRGNDATA rgnDst, PROSRGNDATA rgnSrc, const PRECT rect, const PPOINT off);
+PROSRGNDATA FASTCALL REGION_AllocUserRgnWithHandle(INT n);
+VOID FASTCALL REGION_UnionRectWithRgn(ROSRGNDATA *rgn, const RECTL *rect);
+INT FASTCALL REGION_GetRgnBox(PROSRGNDATA Rgn, RECTL *pRect);
+BOOL FASTCALL REGION_RectInRegion(PROSRGNDATA Rgn, const RECTL *rc);
+BOOL FASTCALL REGION_CropAndOffsetRegion(PROSRGNDATA rgnDst, PROSRGNDATA rgnSrc, const RECTL *rect, const POINT *off);
 VOID FASTCALL REGION_SetRectRgn(PROSRGNDATA pRgn, INT LeftRect, INT TopRect, INT RightRect, INT BottomRect);
 BOOL INTERNAL_CALL REGION_Cleanup(PVOID ObjectBody);
 
-INT STDCALL IntGdiGetRgnBox(HRGN, LPRECT);
+extern PROSRGNDATA prgnDefault;
+extern HRGN        hrgnDefault;
+
+VOID FASTCALL REGION_Delete(PROSRGNDATA);
+VOID FASTCALL IntGdiReleaseRaoRgn(PDC);
+VOID FASTCALL IntGdiReleaseVisRgn(PDC);
+
+INT APIENTRY IntGdiGetRgnBox(HRGN, RECTL*);
 BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN );
-HRGN FASTCALL GdiCreatePolyPolygonRgn(CONST PPOINT, CONST PINT, INT, INT );
+HRGN FASTCALL IntCreatePolyPolygonRgn(PPOINT, PULONG, INT, INT);
+INT FASTCALL IntGdiOffsetRgn(PROSRGNDATA,INT,INT);
+BOOL FASTCALL IntRectInRegion(HRGN,LPRECTL);
 
 INT FASTCALL IntGdiCombineRgn(PROSRGNDATA, PROSRGNDATA, PROSRGNDATA, INT);
 INT FASTCALL REGION_Complexity(PROSRGNDATA);
-PROSRGNDATA FASTCALL IntGdiCreateRectRgn(INT, INT, INT, INT);
+PROSRGNDATA FASTCALL RGNOBJAPI_Lock(HRGN,PRGN_ATTR *);
+VOID FASTCALL RGNOBJAPI_Unlock(PROSRGNDATA);
+HRGN FASTCALL IntSysCreateRectRgn(INT,INT,INT,INT);
+PROSRGNDATA FASTCALL IntSysCreateRectpRgn(INT,INT,INT,INT);
 
-#define UnsafeIntCreateRectRgnIndirect(prc) \
-  NtGdiCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
+#define IntSysCreateRectRgnIndirect(prc) \
+  IntSysCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
 
-#endif /* not __WIN32K_REGION_H */
+#define IntSysCreateRectpRgnIndirect(prc) \
+  IntSysCreateRectpRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)