3 /* Type definitions ***********************************************************/
5 /* Internal region data.
6 Can't use RGNDATA structure because buffer is allocated statically */
7 typedef struct _ROSRGNDATA
9 /* Header for all gdi objects in the handle table.
10 Do not (re)move this. */
11 BASEOBJECT BaseObject
;
17 } ROSRGNDATA
, *PROSRGNDATA
, *LPROSRGNDATA
, REGION
, *PREGION
;
20 /* Functions ******************************************************************/
22 #define REGION_FreeRgn(pRgn) GDIOBJ_FreeObj((POBJ)pRgn, GDIObjType_RGN_TYPE)
23 #define REGION_FreeRgnByHandle(hRgn) GDIOBJ_FreeObjByHandle((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
25 PROSRGNDATA FASTCALL
REGION_AllocRgnWithHandle(INT n
);
26 PROSRGNDATA FASTCALL
REGION_AllocUserRgnWithHandle(INT n
);
27 VOID FASTCALL
REGION_UnionRectWithRgn(ROSRGNDATA
*rgn
, const RECTL
*rect
);
28 INT FASTCALL
REGION_GetRgnBox(PROSRGNDATA Rgn
, RECTL
*pRect
);
29 BOOL FASTCALL
REGION_RectInRegion(PROSRGNDATA Rgn
, const RECTL
*rc
);
30 BOOL FASTCALL
REGION_CropAndOffsetRegion(PROSRGNDATA rgnDst
, PROSRGNDATA rgnSrc
, const RECTL
*rect
, const POINT
*off
);
31 VOID FASTCALL
REGION_SetRectRgn(PROSRGNDATA pRgn
, INT LeftRect
, INT TopRect
, INT RightRect
, INT BottomRect
);
32 BOOL NTAPI
REGION_Cleanup(PVOID ObjectBody
);
34 extern PROSRGNDATA prgnDefault
;
35 extern HRGN hrgnDefault
;
37 VOID FASTCALL
REGION_Delete(PROSRGNDATA
);
38 VOID FASTCALL
IntGdiReleaseRaoRgn(PDC
);
39 VOID FASTCALL
IntGdiReleaseVisRgn(PDC
);
41 INT APIENTRY
IntGdiGetRgnBox(HRGN
, RECTL
*);
42 BOOL FASTCALL
IntGdiPaintRgn(PDC
, HRGN
);
43 HRGN FASTCALL
IntCreatePolyPolygonRgn(PPOINT
, PULONG
, INT
, INT
);
44 INT FASTCALL
IntGdiOffsetRgn(PROSRGNDATA
,INT
,INT
);
45 BOOL FASTCALL
IntRectInRegion(HRGN
,LPRECTL
);
47 INT FASTCALL
IntGdiCombineRgn(PROSRGNDATA
, PROSRGNDATA
, PROSRGNDATA
, INT
);
48 INT FASTCALL
REGION_Complexity(PROSRGNDATA
);
49 PROSRGNDATA FASTCALL
RGNOBJAPI_Lock(HRGN
,PRGN_ATTR
*);
50 VOID FASTCALL
RGNOBJAPI_Unlock(PROSRGNDATA
);
51 HRGN FASTCALL
IntSysCreateRectRgn(INT
,INT
,INT
,INT
);
52 PROSRGNDATA FASTCALL
IntSysCreateRectpRgn(INT
,INT
,INT
,INT
);
53 BOOL FASTCALL
IntGdiSetRegionOwner(HRGN
,DWORD
);
55 #define IntSysCreateRectRgnIndirect(prc) \
56 IntSysCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
58 #define IntSysCreateRectpRgnIndirect(prc) \
59 IntSysCreateRectpRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
63 IntSysCreateRectpRgn(INT LeftRect
, INT TopRect
, INT RightRect
, INT BottomRect
);
67 REGION_LockRgn(HRGN hrgn
)
69 return GDIOBJ_LockObject(hrgn
, GDIObjType_RGN_TYPE
);
74 REGION_UnlockRgn(PREGION prgn
)
76 GDIOBJ_vUnlockObject(&prgn
->BaseObject
);