2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
#include "gdiobj.h"
|
|
|
|
|
2008-02-26 01:00:34 +00:00
|
|
|
/* Type definitions ***********************************************************/
|
|
|
|
|
|
|
|
/* Internal region data.
|
|
|
|
Can't use RGNDATA structure because buffer is allocated statically */
|
|
|
|
typedef struct _ROSRGNDATA
|
|
|
|
{
|
|
|
|
/* Header for all gdi objects in the handle table.
|
|
|
|
Do not (re)move this. */
|
|
|
|
BASEOBJECT BaseObject;
|
2007-11-30 12:16:32 +00:00
|
|
|
|
2006-11-08 11:47:44 +00:00
|
|
|
RGNDATAHEADER rdh;
|
2009-03-19 01:42:34 +00:00
|
|
|
RECTL *Buffer;
|
2006-11-08 11:47:44 +00:00
|
|
|
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
|
|
|
|
|
|
|
|
|
2008-02-26 01:00:34 +00:00
|
|
|
/* Functions ******************************************************************/
|
|
|
|
|
2008-03-19 00:56:40 +00:00
|
|
|
#define REGION_FreeRgn(pRgn) GDIOBJ_FreeObj((POBJ)pRgn, GDIObjType_RGN_TYPE)
|
2008-06-23 17:57:41 +00:00
|
|
|
#define REGION_FreeRgnByHandle(hRgn) GDIOBJ_FreeObjByHandle((HGDIOBJ)hRgn, GDI_OBJECT_TYPE_REGION)
|
2008-03-17 22:17:48 +00:00
|
|
|
#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);
|
2010-01-25 01:33:01 +00:00
|
|
|
PROSRGNDATA FASTCALL REGION_AllocUserRgnWithHandle(INT n);
|
2009-03-19 01:42:34 +00:00
|
|
|
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);
|
2008-03-17 22:17:48 +00:00
|
|
|
VOID FASTCALL REGION_SetRectRgn(PROSRGNDATA pRgn, INT LeftRect, INT TopRect, INT RightRect, INT BottomRect);
|
|
|
|
BOOL INTERNAL_CALL REGION_Cleanup(PVOID ObjectBody);
|
|
|
|
|
2008-06-17 05:19:08 +00:00
|
|
|
extern PROSRGNDATA prgnDefault;
|
|
|
|
extern HRGN hrgnDefault;
|
|
|
|
|
|
|
|
VOID FASTCALL REGION_Delete(PROSRGNDATA);
|
|
|
|
VOID FASTCALL IntGdiReleaseRaoRgn(PDC);
|
|
|
|
VOID FASTCALL IntGdiReleaseVisRgn(PDC);
|
|
|
|
|
2009-03-19 01:42:34 +00:00
|
|
|
INT APIENTRY IntGdiGetRgnBox(HRGN, RECTL*);
|
2007-08-21 09:28:51 +00:00
|
|
|
BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN );
|
2008-10-07 23:02:41 +00:00
|
|
|
HRGN FASTCALL IntCreatePolyPolygonRgn(PPOINT, PULONG, INT, INT);
|
2010-01-25 01:33:01 +00:00
|
|
|
INT FASTCALL IntGdiOffsetRgn(PROSRGNDATA,INT,INT);
|
2008-03-17 22:17:48 +00:00
|
|
|
|
2008-05-21 22:32:13 +00:00
|
|
|
INT FASTCALL IntGdiCombineRgn(PROSRGNDATA, PROSRGNDATA, PROSRGNDATA, INT);
|
|
|
|
INT FASTCALL REGION_Complexity(PROSRGNDATA);
|
2009-12-29 21:07:04 +00:00
|
|
|
PROSRGNDATA FASTCALL RGNOBJAPI_Lock(HRGN,PRGN_ATTR *);
|
|
|
|
VOID FASTCALL RGNOBJAPI_Unlock(PROSRGNDATA);
|
2010-01-21 13:18:33 +00:00
|
|
|
HRGN FASTCALL IntSysCreateRectRgn(INT,INT,INT,INT);
|
2010-01-25 01:33:01 +00:00
|
|
|
PROSRGNDATA FASTCALL IntSysCreateRectpRgn(INT,INT,INT,INT);
|
2008-05-21 22:32:13 +00:00
|
|
|
|
2010-01-21 13:18:33 +00:00
|
|
|
#define IntSysCreateRectRgnIndirect(prc) \
|
|
|
|
IntSysCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
|
2007-08-21 09:28:51 +00:00
|
|
|
|
2010-01-25 01:33:01 +00:00
|
|
|
#define IntSysCreateRectpRgnIndirect(prc) \
|
|
|
|
IntSysCreateRectpRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom)
|