summaryrefslogtreecommitdiff
path: root/include/regionstr.h
diff options
context:
space:
mode:
authorKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
committerKaleb Keithley <kaleb@freedesktop.org>2003-11-14 16:49:22 +0000
commitd568221710959cf7d783e6ff0fb80fb43a231124 (patch)
tree8d6f039393294c6ffac8533639afdebe5d68bfc1 /include/regionstr.h
parent9508a382f8a9f241dab097d921b6d290c1c3a776 (diff)
XFree86 4.3.0.1
Diffstat (limited to 'include/regionstr.h')
-rw-r--r--include/regionstr.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/include/regionstr.h b/include/regionstr.h
index 55dc99656..1ac3f2f07 100644
--- a/include/regionstr.h
+++ b/include/regionstr.h
@@ -45,6 +45,8 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
+/* $XFree86: xc/programs/Xserver/include/regionstr.h,v 1.7 2001/12/14 19:59:56 dawes Exp $ */
+
#ifndef REGIONSTRUCT_H
#define REGIONSTRUCT_H
@@ -75,8 +77,11 @@ typedef struct _Region {
extern BoxRec miEmptyBox;
extern RegDataRec miEmptyData;
+extern RegDataRec miBrokenData;
#define REGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
+/* not a region */
+#define REGION_NAR(reg) ((reg)->data == &miBrokenData)
#define REGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1)
#define REGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0)
#define REGION_RECTS(reg) ((reg)->data ? (BoxPtr)((reg)->data + 1) \
@@ -131,6 +136,12 @@ extern RegDataRec miEmptyData;
#define REGION_NOTEMPTY(_pScreen, _pReg) \
(*(_pScreen)->RegionNotEmpty)(_pReg)
+#define REGION_BROKEN(_pScreen, _pReg) \
+ (*(_pScreen)->RegionBroken)(_pReg)
+
+#define REGION_BREAK(_pScreen, _pReg) \
+ (*(_pScreen)->RegionBreak)(_pReg)
+
#define REGION_EMPTY(_pScreen, _pReg) \
(*(_pScreen)->RegionEmpty)(_pReg)
@@ -193,6 +204,9 @@ extern RegDataRec miEmptyData;
#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \
miRectsToRegion(nrects, prect, ctype)
+#define REGION_BREAK(_pScreen, _pReg) \
+ miRegionBreak(_pReg)
+
#ifdef DONT_INLINE_REGION_OPS
#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
@@ -207,6 +221,9 @@ extern RegDataRec miEmptyData;
#define REGION_NOTEMPTY(_pScreen, _pReg) \
miRegionNotEmpty(_pReg)
+#define REGION_BROKEN(_pScreen, _pReg) \
+ miRegionBroken(_pReg)
+
#define REGION_EMPTY(_pScreen, _pReg) \
miRegionEmpty(_pReg)
@@ -238,7 +255,10 @@ extern RegDataRec miEmptyData;
#define REGION_UNINIT(_pScreen, _pReg) \
{ \
- if ((_pReg)->data && (_pReg)->data->size) xfree((_pReg)->data); \
+ if ((_pReg)->data && (_pReg)->data->size) { \
+ xfree((_pReg)->data); \
+ (_pReg)->data = NULL; \
+ } \
}
#define REGION_RESET(_pScreen, _pReg, _pBox) \
@@ -251,6 +271,9 @@ extern RegDataRec miEmptyData;
#define REGION_NOTEMPTY(_pScreen, _pReg) \
!REGION_NIL(_pReg)
+#define REGION_BROKEN(_pScreen, _pReg) \
+ REGION_NAR(_pReg)
+
#define REGION_EMPTY(_pScreen, _pReg) \
{ \
REGION_UNINIT(_pScreen, _pReg); \
@@ -378,6 +401,12 @@ extern void miRegionReset(
#endif
);
+extern Bool miRegionBreak(
+#if NeedFunctionPrototypes
+ RegionPtr /*pReg*/
+#endif
+);
+
extern Bool miPointInRegion(
#if NeedFunctionPrototypes
RegionPtr /*pReg*/,