summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-21 15:05:48 -0700
committerKeith Packard <keithp@keithp.com>2010-06-05 18:59:00 -0700
commit2dc138922b7588515d5f2447e4b9dcdc0bef15e0 (patch)
tree004ca1d730f94a78150c30b3fbc0c87af31f2895 /mi
parentd17e726e89ef644310de77b960b715c2d11088da (diff)
Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'mi')
-rw-r--r--mi/mi.h17
-rw-r--r--mi/mibitblt.c32
-rw-r--r--mi/micopy.c26
-rw-r--r--mi/miexpose.c110
-rw-r--r--mi/migc.c44
-rw-r--r--mi/mioverlay.c406
-rw-r--r--mi/mispans.h10
-rw-r--r--mi/mivaltree.c138
-rw-r--r--mi/miwindow.c118
9 files changed, 437 insertions, 464 deletions
diff --git a/mi/mi.h b/mi/mi.h
index 9f67d2e9a..fa32b6b62 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -418,23 +418,6 @@ extern _X_EXPORT void miPushPixels(
int /*yOrg*/
);
-/* miregion.c */
-
-/* see also region.h */
-
-extern _X_EXPORT Bool RegionRectAlloc(
- RegionPtr /*pRgn*/,
- int /*n*/
-);
-
-#ifdef DEBUG
-extern _X_EXPORT Bool RegionIsValid(
- RegionPtr /*prgn*/
-);
-#endif
-
-extern _X_EXPORT Bool RegionBroken(RegionPtr pReg);
-
/* miscrinit.c */
extern _X_EXPORT Bool miModifyPixmapHeader(
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 9c6e03d53..844848347 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -116,7 +116,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width;
box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height;
- prgnSrcClip = REGION_CREATE(pGC->pScreen, &box, 1);
+ prgnSrcClip = RegionCreate(&box, 1);
realSrcClip = 1;
}
else
@@ -145,8 +145,8 @@ miCopyArea(DrawablePtr pSrcDrawable,
pptFirst = ppt = malloc(heightSrc * sizeof(DDXPointRec));
pwidthFirst = pwidth = malloc(heightSrc * sizeof(unsigned int));
- numRects = REGION_NUM_RECTS(prgnSrcClip);
- boxes = REGION_RECTS(prgnSrcClip);
+ numRects = RegionNumRects(prgnSrcClip);
+ boxes = RegionRects(prgnSrcClip);
ordering = malloc(numRects * sizeof(unsigned int));
if(!pptFirst || !pwidthFirst || !ordering)
{
@@ -259,7 +259,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
widthSrc, heightSrc, xOut, yOut, (unsigned long)0);
if(realSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
free(ordering);
free(pwidthFirst);
@@ -443,9 +443,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc,
to destroy what it's sent. note that this means we don't
have to free prgnSrcClip ourselves.
*/
- prgnSrcClip = REGION_CREATE(pGCT->pScreen, NULL, 0);
- REGION_COPY(pGCT->pScreen, prgnSrcClip, prgnSrc);
- REGION_TRANSLATE(pGCT->pScreen, prgnSrcClip, srcx, 0);
+ prgnSrcClip = RegionCreate(NULL, 0);
+ RegionCopy(prgnSrcClip, prgnSrc);
+ RegionTranslate(prgnSrcClip, srcx, 0);
(*pGCT->funcs->ChangeClip)(pGCT, CT_REGION, prgnSrcClip, 0);
ValidateGC((DrawablePtr)pPixmap, pGCT);
@@ -578,7 +578,7 @@ miCopyPlane( DrawablePtr pSrcDrawable,
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
- prgnSrc = REGION_CREATE(pGC->pScreen, &box, 1);
+ prgnSrc = RegionCreate(&box, 1);
if (pSrcDrawable->type != DRAWABLE_PIXMAP) {
/* clip to visible drawable */
@@ -586,15 +586,15 @@ miCopyPlane( DrawablePtr pSrcDrawable,
if (pGC->subWindowMode == IncludeInferiors)
{
RegionPtr clipList = NotClippedByChildren ((WindowPtr) pSrcDrawable);
- REGION_INTERSECT(pGC->pScreen, prgnSrc, prgnSrc, clipList);
- REGION_DESTROY(pGC->pScreen, clipList);
+ RegionIntersect(prgnSrc, prgnSrc, clipList);
+ RegionDestroy(clipList);
} else
- REGION_INTERSECT(pGC->pScreen, prgnSrc, prgnSrc,
+ RegionIntersect(prgnSrc, prgnSrc,
&((WindowPtr)pSrcDrawable)->clipList);
}
- box = *REGION_EXTENTS(pGC->pScreen, prgnSrc);
- REGION_TRANSLATE(pGC->pScreen, prgnSrc, -box.x1, -box.y1);
+ box = *RegionExtents(prgnSrc);
+ RegionTranslate(prgnSrc, -box.x1, -box.y1);
if ((box.x2 > box.x1) && (box.y2 > box.y1))
{
@@ -618,7 +618,7 @@ miCopyPlane( DrawablePtr pSrcDrawable,
}
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
width, height, dstx, dsty, bitPlane);
- REGION_DESTROY(pGC->pScreen, prgnSrc);
+ RegionDestroy(prgnSrc);
return prgnExposed;
}
@@ -761,11 +761,11 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth,
box.y1 = 0;
box.x2 = w;
box.y2 = h;
- prgnSrc = REGION_CREATE(pGC->pScreen, &box, 1);
+ prgnSrc = RegionCreate(&box, 1);
miOpqStipDrawable(pDraw, pGC, prgnSrc, (MiBits *) pImage,
leftPad, w, h, x, y);
- REGION_DESTROY(pGC->pScreen, prgnSrc);
+ RegionDestroy(prgnSrc);
break;
case XYPixmap:
diff --git a/mi/micopy.c b/mi/micopy.c
index 6df9d88d9..157e32430 100644
--- a/mi/micopy.c
+++ b/mi/micopy.c
@@ -49,8 +49,8 @@ miCopyRegion (DrawablePtr pSrcDrawable,
int nbox;
BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp;
- pbox = REGION_RECTS(pDstRegion);
- nbox = REGION_NUM_RECTS(pDstRegion);
+ pbox = RegionRects(pDstRegion);
+ nbox = RegionNumRects(pDstRegion);
/* XXX we have to err on the side of safety when both are windows,
* because we don't know if IncludeInferiors is being used.
@@ -209,7 +209,7 @@ miDoCopy (DrawablePtr pSrcDrawable,
* VT is inactive, make sure the region isn't empty
*/
if (!((WindowPtr) pSrcDrawable)->parent &&
- REGION_NOTEMPTY (pSrcDrawable->pScreen,
+ RegionNotEmpty(
&((WindowPtr) pSrcDrawable)->borderClip))
{
/*
@@ -291,9 +291,9 @@ miDoCopy (DrawablePtr pSrcDrawable,
blown region and call intersect */
cclip = miGetCompositeClip(pGC);
- if (REGION_NUM_RECTS(cclip) == 1)
+ if (RegionNumRects(cclip) == 1)
{
- BoxPtr pBox = REGION_RECTS(cclip);
+ BoxPtr pBox = RegionRects(cclip);
if (box_x1 < pBox->x1) box_x1 = pBox->x1;
if (box_x2 > pBox->x2) box_x2 = pBox->x2;
@@ -306,7 +306,7 @@ miDoCopy (DrawablePtr pSrcDrawable,
/* Check to see if the region is empty */
if (box_x1 >= box_x2 || box_y1 >= box_y2)
{
- REGION_NULL(pGC->pScreen, &rgnDst);
+ RegionNull(&rgnDst);
}
else
{
@@ -315,25 +315,25 @@ miDoCopy (DrawablePtr pSrcDrawable,
box.y1 = box_y1;
box.x2 = box_x2;
box.y2 = box_y2;
- REGION_INIT(pGC->pScreen, &rgnDst, &box, 1);
+ RegionInit(&rgnDst, &box, 1);
}
/* Clip against complex source if needed */
if (!fastSrc)
{
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip);
- REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy);
+ RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip);
+ RegionTranslate(&rgnDst, -dx, -dy);
}
/* Clip against complex dest if needed */
if (!fastDst)
{
- REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst,
+ RegionIntersect(&rgnDst, &rgnDst,
miGetCompositeClip(pGC));
}
/* Do bit blitting */
- numRects = REGION_NUM_RECTS(&rgnDst);
+ numRects = RegionNumRects(&rgnDst);
if (numRects && widthSrc && heightSrc)
miCopyRegion (pSrcDrawable, pDstDrawable, pGC,
&rgnDst, dx, dy, copyProc, bitPlane, closure);
@@ -347,8 +347,8 @@ miDoCopy (DrawablePtr pSrcDrawable,
xOut - pDstDrawable->x,
yOut - pDstDrawable->y,
(unsigned long) bitPlane);
- REGION_UNINIT(pGC->pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (freeSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
return prgnExposed;
}
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 088149be7..2fd070d9e 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -175,21 +175,21 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
if (pGC->subWindowMode == IncludeInferiors)
{
prgnSrcClip = NotClippedByChildren (pSrcWin);
- if ((RECT_IN_REGION(pscr, prgnSrcClip, &TsrcBox)) == rgnIN)
+ if ((RegionContainsRect(prgnSrcClip, &TsrcBox)) == rgnIN)
{
- REGION_DESTROY(pscr, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
return NULL;
}
}
else
{
- if ((RECT_IN_REGION(pscr, &pSrcWin->clipList, &TsrcBox)) == rgnIN)
+ if ((RegionContainsRect(&pSrcWin->clipList, &TsrcBox)) == rgnIN)
return NULL;
prgnSrcClip = &rgnSrcRec;
- REGION_NULL(pscr, prgnSrcClip);
- REGION_COPY(pscr, prgnSrcClip, &pSrcWin->clipList);
+ RegionNull(prgnSrcClip);
+ RegionCopy(prgnSrcClip, &pSrcWin->clipList);
}
- REGION_TRANSLATE(pscr, prgnSrcClip,
+ RegionTranslate(prgnSrcClip,
-pSrcDrawable->x, -pSrcDrawable->y);
}
else
@@ -206,7 +206,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
box.x2 = pSrcDrawable->width;
box.y2 = pSrcDrawable->height;
prgnSrcClip = &rgnSrcRec;
- REGION_INIT(pscr, prgnSrcClip, &box, 1);
+ RegionInit(prgnSrcClip, &box, 1);
pSrcWin = NULL;
}
@@ -223,11 +223,11 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
else
{
prgnDstClip = &rgnDstRec;
- REGION_NULL(pscr, prgnDstClip);
- REGION_COPY(pscr, prgnDstClip,
+ RegionNull(prgnDstClip);
+ RegionCopy(prgnDstClip,
&((WindowPtr)pDstDrawable)->clipList);
}
- REGION_TRANSLATE(pscr, prgnDstClip,
+ RegionTranslate(prgnDstClip,
-pDstDrawable->x, -pDstDrawable->y);
}
else
@@ -239,24 +239,24 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
box.x2 = pDstDrawable->width;
box.y2 = pDstDrawable->height;
prgnDstClip = &rgnDstRec;
- REGION_INIT(pscr, prgnDstClip, &box, 1);
+ RegionInit(prgnDstClip, &box, 1);
}
/* drawable-relative source region */
- REGION_INIT(pscr, &rgnExposed, &srcBox, 1);
+ RegionInit(&rgnExposed, &srcBox, 1);
/* now get the hidden parts of the source box*/
- REGION_SUBTRACT(pscr, &rgnExposed, &rgnExposed, prgnSrcClip);
+ RegionSubtract(&rgnExposed, &rgnExposed, prgnSrcClip);
/* move them over the destination */
- REGION_TRANSLATE(pscr, &rgnExposed, dstx-srcx, dsty-srcy);
+ RegionTranslate(&rgnExposed, dstx-srcx, dsty-srcy);
/* intersect with visible areas of dest */
- REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, prgnDstClip);
+ RegionIntersect(&rgnExposed, &rgnExposed, prgnDstClip);
/* intersect with client clip region. */
if (pGC->clientClipType == CT_REGION)
- REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, pGC->clientClip);
+ RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip);
/*
* If we have LOTS of rectangles, we decide to take the extents
@@ -266,7 +266,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
* for windows.
*/
extents = pGC->graphicsExposures &&
- (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) &&
+ (RegionNumRects(&rgnExposed) > RECTLIMIT) &&
(pDstDrawable->type != DRAWABLE_PIXMAP);
if (pSrcWin)
{
@@ -278,13 +278,13 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
* exposed region will undo all our work!
*/
if (extents && pSrcWin && region &&
- (RECT_IN_REGION(pscr, region, &srcBox) != rgnIN))
+ (RegionContainsRect(region, &srcBox) != rgnIN))
extents = FALSE;
}
if (extents)
{
- expBox = *REGION_EXTENTS(pscr, &rgnExposed);
- REGION_RESET(pscr, &rgnExposed, &expBox);
+ expBox = *RegionExtents(&rgnExposed);
+ RegionReset(&rgnExposed, &expBox);
}
if ((pDstDrawable->type != DRAWABLE_PIXMAP) &&
(((WindowPtr)pDstDrawable)->backgroundState != None))
@@ -292,52 +292,52 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
WindowPtr pWin = (WindowPtr)pDstDrawable;
/* make the exposed area screen-relative */
- REGION_TRANSLATE(pscr, &rgnExposed,
+ RegionTranslate(&rgnExposed,
pDstDrawable->x, pDstDrawable->y);
if (extents)
{
/* miPaintWindow doesn't clip, so we have to */
- REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList);
+ RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList);
}
miPaintWindow((WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND);
if (extents)
{
- REGION_RESET(pscr, &rgnExposed, &expBox);
+ RegionReset(&rgnExposed, &expBox);
}
else
- REGION_TRANSLATE(pscr, &rgnExposed,
+ RegionTranslate(&rgnExposed,
-pDstDrawable->x, -pDstDrawable->y);
}
if (prgnDstClip == &rgnDstRec)
{
- REGION_UNINIT(pscr, prgnDstClip);
+ RegionUninit(prgnDstClip);
}
else if (prgnDstClip != prgnSrcClip)
{
- REGION_DESTROY(pscr, prgnDstClip);
+ RegionDestroy(prgnDstClip);
}
if (prgnSrcClip == &rgnSrcRec)
{
- REGION_UNINIT(pscr, prgnSrcClip);
+ RegionUninit(prgnSrcClip);
}
else
{
- REGION_DESTROY(pscr, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
}
if (pGC->graphicsExposures)
{
/* don't look */
- RegionPtr exposed = REGION_CREATE(pscr, NullBox, 0);
+ RegionPtr exposed = RegionCreate(NullBox, 0);
*exposed = rgnExposed;
return exposed;
}
else
{
- REGION_UNINIT(pscr, &rgnExposed);
+ RegionUninit(&rgnExposed);
return NULL;
}
}
@@ -348,7 +348,7 @@ void
miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable,
int major, int minor)
{
- if (pRgn && !REGION_NIL(pRgn))
+ if (pRgn && !RegionNil(pRgn))
{
xEvent *pEvent;
xEvent *pe;
@@ -356,8 +356,8 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable,
int i;
int numRects;
- numRects = REGION_NUM_RECTS(pRgn);
- pBox = REGION_RECTS(pRgn);
+ numRects = RegionNumRects(pRgn);
+ pBox = RegionRects(pRgn);
if(!(pEvent = malloc(numRects * sizeof(xEvent))))
return;
pe = pEvent;
@@ -401,8 +401,8 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
xEvent *pEvent, *pe;
int i;
- pBox = REGION_RECTS(pRgn);
- numRects = REGION_NUM_RECTS(pRgn);
+ pBox = RegionRects(pRgn);
+ numRects = RegionNumRects(pRgn);
if(!(pEvent = calloc(1, numRects * sizeof(xEvent))))
return;
@@ -457,8 +457,8 @@ void
miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
{
RegionPtr exposures = prgn;
- if ((prgn && !REGION_NIL(prgn)) ||
- (exposures && !REGION_NIL(exposures)) || other_exposed)
+ if ((prgn && !RegionNil(prgn)) ||
+ (exposures && !RegionNil(exposures)) || other_exposed)
{
RegionRec expRec;
int clientInterested;
@@ -471,15 +471,15 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
{
if (exposures)
{
- REGION_UNION(pWin->drawable.pScreen, other_exposed,
+ RegionUnion(other_exposed,
exposures,
other_exposed);
if (exposures != prgn)
- REGION_DESTROY(pWin->drawable.pScreen, exposures);
+ RegionDestroy(exposures);
}
exposures = other_exposed;
}
- if (clientInterested && exposures && (REGION_NUM_RECTS(exposures) > RECTLIMIT))
+ if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT))
{
/*
* If we have LOTS of rectangles, we decide to take the extents
@@ -489,34 +489,34 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
*/
BoxRec box;
- box = *REGION_EXTENTS( pWin->drawable.pScreen, exposures);
+ box = *RegionExtents(exposures);
if (exposures == prgn) {
exposures = &expRec;
- REGION_INIT( pWin->drawable.pScreen, exposures, &box, 1);
- REGION_RESET( pWin->drawable.pScreen, prgn, &box);
+ RegionInit(exposures, &box, 1);
+ RegionReset(prgn, &box);
} else {
- REGION_RESET( pWin->drawable.pScreen, exposures, &box);
- REGION_UNION( pWin->drawable.pScreen, prgn, prgn, exposures);
+ RegionReset(exposures, &box);
+ RegionUnion(prgn, prgn, exposures);
}
/* miPaintWindow doesn't clip, so we have to */
- REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList);
+ RegionIntersect(prgn, prgn, &pWin->clipList);
}
- if (prgn && !REGION_NIL(prgn))
+ if (prgn && !RegionNil(prgn))
miPaintWindow(pWin, prgn, PW_BACKGROUND);
- if (clientInterested && exposures && !REGION_NIL(exposures))
+ if (clientInterested && exposures && !RegionNil(exposures))
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
if (exposures == &expRec)
{
- REGION_UNINIT( pWin->drawable.pScreen, exposures);
+ RegionUninit(exposures);
}
else if (exposures && exposures != prgn && exposures != other_exposed)
- REGION_DESTROY( pWin->drawable.pScreen, exposures);
+ RegionDestroy(exposures);
if (prgn)
- REGION_EMPTY( pWin->drawable.pScreen, prgn);
+ RegionEmpty(prgn);
}
else if (exposures && exposures != prgn)
- REGION_DESTROY( pWin->drawable.pScreen, exposures);
+ RegionDestroy(exposures);
}
#ifdef ROOTLESS
@@ -647,7 +647,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin;
}
- prect = malloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle));
+ prect = malloc(RegionNumRects(prgn) * sizeof(xRectangle));
if (!prect)
return;
@@ -661,8 +661,8 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
ChangeGC (NullClient, pGC, gcmask, gcval);
ValidateGC (drawable, pGC);
- numRects = REGION_NUM_RECTS(prgn);
- pbox = REGION_RECTS(prgn);
+ numRects = RegionNumRects(prgn);
+ pbox = RegionRects(prgn);
for (i= numRects; --i >= 0; pbox++, prect++)
{
prect->x = pbox->x1 - draw_x_off;
diff --git a/mi/migc.c b/mi/migc.c
index 7b2b1c350..778c4b463 100644
--- a/mi/migc.c
+++ b/mi/migc.c
@@ -50,7 +50,7 @@ miDestroyGC(GCPtr pGC)
if (pGC->pRotatedPixmap)
(*pGC->pScreen->DestroyPixmap) (pGC->pRotatedPixmap);
if (pGC->freeCompClip)
- REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
+ RegionDestroy(pGC->pCompositeClip);
}
void
@@ -68,7 +68,7 @@ miDestroyClip(GCPtr pGC)
* we know we'll never have a list of rectangles, since ChangeClip
* immediately turns them into a region
*/
- REGION_DESTROY(pGC->pScreen, pGC->clientClip);
+ RegionDestroy(pGC->clientClip);
}
pGC->clientClip = NULL;
pGC->clientClipType = CT_NONE;
@@ -81,7 +81,7 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects)
if (type == CT_PIXMAP)
{
/* convert the pixmap to a region */
- pGC->clientClip = (pointer) BITMAP_TO_REGION(pGC->pScreen,
+ pGC->clientClip = (pointer) BitmapToRegion(pGC->pScreen,
(PixmapPtr) pvalue);
(*pGC->pScreen->DestroyPixmap) (pvalue);
}
@@ -92,7 +92,7 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects)
}
else if (type != CT_NONE)
{
- pGC->clientClip = (pointer) RECTS_TO_REGION(pGC->pScreen, nrects,
+ pGC->clientClip = (pointer) RegionFromRects(nrects,
(xRectangle *) pvalue,
type);
free(pvalue);
@@ -116,8 +116,8 @@ miCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
pgcSrc->clientClip, 0);
break;
case CT_REGION:
- prgnNew = REGION_CREATE(pgcSrc->pScreen, NULL, 1);
- REGION_COPY(pgcDst->pScreen, prgnNew,
+ prgnNew = RegionCreate(NULL, 1);
+ RegionCopy(prgnNew,
(RegionPtr) (pgcSrc->clientClip));
(*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0);
break;
@@ -167,7 +167,7 @@ miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable)
if (pGC->clientClipType == CT_NONE)
{
if (freeCompClip)
- REGION_DESTROY(pScreen, pGC->pCompositeClip);
+ RegionDestroy(pGC->pCompositeClip);
pGC->pCompositeClip = pregWin;
pGC->freeCompClip = freeTmpClip;
}
@@ -182,30 +182,30 @@ miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable)
* clip. if neither is real, create a new region.
*/
- REGION_TRANSLATE(pScreen, pGC->clientClip,
+ RegionTranslate(pGC->clientClip,
pDrawable->x + pGC->clipOrg.x,
pDrawable->y + pGC->clipOrg.y);
if (freeCompClip)
{
- REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
+ RegionIntersect(pGC->pCompositeClip,
pregWin, pGC->clientClip);
if (freeTmpClip)
- REGION_DESTROY(pScreen, pregWin);
+ RegionDestroy(pregWin);
}
else if (freeTmpClip)
{
- REGION_INTERSECT(pScreen, pregWin, pregWin, pGC->clientClip);
+ RegionIntersect(pregWin, pregWin, pGC->clientClip);
pGC->pCompositeClip = pregWin;
}
else
{
- pGC->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0);
- REGION_INTERSECT(pScreen, pGC->pCompositeClip,
+ pGC->pCompositeClip = RegionCreate(NullBox, 0);
+ RegionIntersect(pGC->pCompositeClip,
pregWin, pGC->clientClip);
}
pGC->freeCompClip = TRUE;
- REGION_TRANSLATE(pScreen, pGC->clientClip,
+ RegionTranslate(pGC->clientClip,
-(pDrawable->x + pGC->clipOrg.x),
-(pDrawable->y + pGC->clipOrg.y));
}
@@ -223,31 +223,31 @@ miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable)
if (pGC->freeCompClip)
{
- REGION_RESET(pScreen, pGC->pCompositeClip, &pixbounds);
+ RegionReset(pGC->pCompositeClip, &pixbounds);
}
else
{
pGC->freeCompClip = TRUE;
- pGC->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1);
+ pGC->pCompositeClip = RegionCreate(&pixbounds, 1);
}
if (pGC->clientClipType == CT_REGION)
{
if(pDrawable->x || pDrawable->y) {
- REGION_TRANSLATE(pScreen, pGC->clientClip,
+ RegionTranslate(pGC->clientClip,
pDrawable->x + pGC->clipOrg.x,
pDrawable->y + pGC->clipOrg.y);
- REGION_INTERSECT(pScreen, pGC->pCompositeClip,
+ RegionIntersect(pGC->pCompositeClip,
pGC->pCompositeClip, pGC->clientClip);
- REGION_TRANSLATE(pScreen, pGC->clientClip,
+ RegionTranslate(pGC->clientClip,
-(pDrawable->x + pGC->clipOrg.x),
-(pDrawable->y + pGC->clipOrg.y));
} else {
- REGION_TRANSLATE(pScreen, pGC->pCompositeClip,
+ RegionTranslate(pGC->pCompositeClip,
-pGC->clipOrg.x, -pGC->clipOrg.y);
- REGION_INTERSECT(pScreen, pGC->pCompositeClip,
+ RegionIntersect(pGC->pCompositeClip,
pGC->pCompositeClip, pGC->clientClip);
- REGION_TRANSLATE(pScreen, pGC->pCompositeClip,
+ RegionTranslate(pGC->pCompositeClip,
pGC->clipOrg.x, pGC->clipOrg.y);
}
}
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index da3ff4ae7..d8eb64278 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -201,8 +201,8 @@ miOverlayCreateWindow(WindowPtr pWin)
pTree->visibility = VisibilityNotViewable;
pWinPriv->tree = pTree;
if(pWin->parent) {
- REGION_NULL(pScreen, &(pTree->borderClip));
- REGION_NULL(pScreen, &(pTree->clipList));
+ RegionNull(&(pTree->borderClip));
+ RegionNull(&(pTree->clipList));
RebuildTree(pWin);
} else {
BoxRec fullBox;
@@ -210,8 +210,8 @@ miOverlayCreateWindow(WindowPtr pWin)
fullBox.y1 = 0;
fullBox.x2 = pScreen->width;
fullBox.y2 = pScreen->height;
- REGION_INIT(pScreen, &(pTree->borderClip), &fullBox, 1);
- REGION_INIT(pScreen, &(pTree->clipList), &fullBox, 1);
+ RegionInit(&(pTree->borderClip), &fullBox, 1);
+ RegionInit(&(pTree->clipList), &fullBox, 1);
}
} else free(pTree);
}
@@ -239,8 +239,8 @@ miOverlayDestroyWindow(WindowPtr pWin)
else if(pTree->parent)
pTree->parent->lastChild = pTree->prevSib;
- REGION_UNINIT(pScreen, &(pTree->borderClip));
- REGION_UNINIT(pScreen, &(pTree->clipList));
+ RegionUninit(&(pTree->borderClip));
+ RegionUninit(&(pTree->clipList));
free(pTree);
}
@@ -338,7 +338,7 @@ miOverlayMarkOverlappedWindows(
doUnderlay = (IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin));
- box = REGION_EXTENTS(pScreen, &pWin->borderSize);
+ box = RegionExtents(&pWin->borderSize);
if((pChild = pFirst)) {
pLast = pChild->parent->lastChild;
@@ -349,13 +349,13 @@ miOverlayMarkOverlappedWindows(
pTree = MIOVERLAY_GET_WINDOW_TREE(pChild);
if(pChild->viewable) {
- if (REGION_BROKEN (pScreen, &pChild->winSize))
+ if (RegionBroken(&pChild->winSize))
SetWinSize (pChild);
- if (REGION_BROKEN (pScreen, &pChild->borderSize))
+ if (RegionBroken(&pChild->borderSize))
SetBorderSize (pChild);
if (markAll ||
- RECT_IN_REGION(pScreen, &pChild->borderSize, box))
+ RegionContainsRect(&pChild->borderSize, box))
{
MARK_OVERLAY(pChild);
overMarked = TRUE;
@@ -410,12 +410,12 @@ miOverlayMarkOverlappedWindows(
while(1) {
if(tChild->pWin->viewable) {
- if (REGION_BROKEN (pScreen, &tChild->pWin->winSize))
+ if (RegionBroken(&tChild->pWin->winSize))
SetWinSize (tChild->pWin);
- if (REGION_BROKEN (pScreen, &tChild->pWin->borderSize))
+ if (RegionBroken(&tChild->pWin->borderSize))
SetBorderSize (tChild->pWin);
- if(RECT_IN_REGION(pScreen, &(tChild->pWin->borderSize), box))
+ if(RegionContainsRect(&(tChild->pWin->borderSize), box))
{
MARK_UNDERLAY(tChild->pWin);
underMarked = TRUE;
@@ -473,7 +473,7 @@ miOverlayComputeClips(
borderSize.y2 = dy;
oldVis = tParent->visibility;
- switch (RECT_IN_REGION( pScreen, universe, &borderSize)) {
+ switch (RegionContainsRect(universe, &borderSize)) {
case rgnIN:
newVis = VisibilityUnobscured;
break;
@@ -521,8 +521,8 @@ miOverlayComputeClips(
while (1) {
if (tChild->pWin->viewable) {
if (tChild->visibility != VisibilityFullyObscured) {
- REGION_TRANSLATE( pScreen, &tChild->borderClip, dx, dy);
- REGION_TRANSLATE( pScreen, &tChild->clipList, dx, dy);
+ RegionTranslate(&tChild->borderClip, dx, dy);
+ RegionTranslate(&tChild->clipList, dx, dy);
tChild->pWin->drawable.serialNumber =
NEXT_SERIAL_NUMBER;
@@ -530,14 +530,14 @@ miOverlayComputeClips(
(* pScreen->ClipNotify) (tChild->pWin, dx, dy);
}
if (tChild->valdata) {
- REGION_NULL(pScreen, &tChild->valdata->borderExposed);
+ RegionNull(&tChild->valdata->borderExposed);
if (HasParentRelativeBorder(tChild->pWin)){
- REGION_SUBTRACT(pScreen,
+ RegionSubtract(
&tChild->valdata->borderExposed,
&tChild->borderClip,
&tChild->pWin->winSize);
}
- REGION_NULL(pScreen, &tChild->valdata->exposed);
+ RegionNull(&tChild->valdata->exposed);
}
if (tChild->firstChild) {
tChild = tChild->firstChild;
@@ -555,50 +555,50 @@ miOverlayComputeClips(
/* fall through */
default:
if (dx || dy) {
- REGION_TRANSLATE( pScreen, &tParent->borderClip, dx, dy);
- REGION_TRANSLATE( pScreen, &tParent->clipList, dx, dy);
+ RegionTranslate(&tParent->borderClip, dx, dy);
+ RegionTranslate(&tParent->clipList, dx, dy);
}
break;
case VTBroken:
- REGION_EMPTY (pScreen, &tParent->borderClip);
- REGION_EMPTY (pScreen, &tParent->clipList);
+ RegionEmpty(&tParent->borderClip);
+ RegionEmpty(&tParent->clipList);
break;
}
borderVisible = tParent->valdata->borderVisible;
- REGION_NULL(pScreen, &tParent->valdata->borderExposed);
- REGION_NULL(pScreen, &tParent->valdata->exposed);
+ RegionNull(&tParent->valdata->borderExposed);
+ RegionNull(&tParent->valdata->exposed);
if (HasBorder (pParent)) {
if (borderVisible) {
- REGION_SUBTRACT( pScreen, exposed, universe, borderVisible);
- REGION_DESTROY( pScreen, borderVisible);
+ RegionSubtract(exposed, universe, borderVisible);
+ RegionDestroy(borderVisible);
} else
- REGION_SUBTRACT( pScreen, exposed, universe, &tParent->borderClip);
+ RegionSubtract(exposed, universe, &tParent->borderClip);
if (HasParentRelativeBorder(pParent) && (dx || dy))
- REGION_SUBTRACT( pScreen, &tParent->valdata->borderExposed,
+ RegionSubtract(&tParent->valdata->borderExposed,
universe, &pParent->winSize);
else
- REGION_SUBTRACT( pScreen, &tParent->valdata->borderExposed,
+ RegionSubtract(&tParent->valdata->borderExposed,
exposed, &pParent->winSize);
- REGION_COPY( pScreen, &tParent->borderClip, universe);
- REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize);
+ RegionCopy(&tParent->borderClip, universe);
+ RegionIntersect(universe, universe, &pParent->winSize);
}
else
- REGION_COPY( pScreen, &tParent->borderClip, universe);
+ RegionCopy(&tParent->borderClip, universe);
if ((tChild = tParent->firstChild) && pParent->mapped) {
- REGION_NULL(pScreen, &childUniverse);
- REGION_NULL(pScreen, &childUnion);
+ RegionNull(&childUniverse);
+ RegionNull(&childUnion);
for (; tChild; tChild = tChild->nextSib) {
if (tChild->pWin->viewable)
- REGION_APPEND( pScreen, &childUnion, &tChild->pWin->borderSize);
+ RegionAppend(&childUnion, &tChild->pWin->borderSize);
}
- REGION_VALIDATE( pScreen, &childUnion, &overlap);
+ RegionValidate(&childUnion, &overlap);
for (tChild = tParent->firstChild;
tChild;
@@ -606,31 +606,31 @@ miOverlayComputeClips(
{
if (tChild->pWin->viewable) {
if (tChild->valdata) {
- REGION_INTERSECT( pScreen, &childUniverse, universe,
+ RegionIntersect(&childUniverse, universe,
&tChild->pWin->borderSize);
miOverlayComputeClips (tChild->pWin, &childUniverse,
kind, exposed);
}
if (overlap)
- REGION_SUBTRACT( pScreen, universe, universe,
+ RegionSubtract(universe, universe,
&tChild->pWin->borderSize);
}
}
if (!overlap)
- REGION_SUBTRACT( pScreen, universe, universe, &childUnion);
- REGION_UNINIT( pScreen, &childUnion);
- REGION_UNINIT( pScreen, &childUniverse);
+ RegionSubtract(universe, universe, &childUnion);
+ RegionUninit(&childUnion);
+ RegionUninit(&childUniverse);
}
if (oldVis == VisibilityFullyObscured ||
oldVis == VisibilityNotViewable)
{
- REGION_COPY( pScreen, &tParent->valdata->exposed, universe);
+ RegionCopy(&tParent->valdata->exposed, universe);
}
else if (newVis != VisibilityFullyObscured &&
newVis != VisibilityNotViewable)
{
- REGION_SUBTRACT( pScreen, &tParent->valdata->exposed,
+ RegionSubtract(&tParent->valdata->exposed,
universe, &tParent->clipList);
}
@@ -708,14 +708,14 @@ miOverlayMarkUnrealizedWindow(
if ((pChild != pWin) || fromConfigure) {
miOverlayTreePtr pTree;
- REGION_EMPTY(pChild->drawable.pScreen, &pChild->clipList);
+ RegionEmpty(&pChild->clipList);
if (pChild->drawable.pScreen->ClipNotify)
(* pChild->drawable.pScreen->ClipNotify)(pChild, 0, 0);
- REGION_EMPTY(pChild->drawable.pScreen, &pChild->borderClip);
+ RegionEmpty(&pChild->borderClip);
if((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) {
if(pTree->valdata != (miOverlayValDataPtr)UnmapValData) {
- REGION_EMPTY(pChild->drawable.pScreen, &pTree->clipList);
- REGION_EMPTY(pChild->drawable.pScreen, &pTree->borderClip);
+ RegionEmpty(&pTree->clipList);
+ RegionEmpty(&pTree->borderClip);
}
}
}
@@ -740,9 +740,9 @@ miOverlayValidateTree(
if (!pChild) pChild = pParent->firstChild;
- REGION_NULL(pScreen, &totalClip);
- REGION_NULL(pScreen, &childClip);
- REGION_NULL(pScreen, &exposed);
+ RegionNull(&totalClip);
+ RegionNull(&childClip);
+ RegionNull(&exposed);
newParent = pParent;
@@ -756,52 +756,52 @@ miOverlayValidateTree(
else
tChild = tParent->firstChild;
- if (REGION_BROKEN (pScreen, &tParent->clipList) &&
- !REGION_BROKEN (pScreen, &tParent->borderClip))
+ if (RegionBroken(&tParent->clipList) &&
+ !RegionBroken(&tParent->borderClip))
{
kind = VTBroken;
- REGION_COPY (pScreen, &totalClip, &tParent->borderClip);
- REGION_INTERSECT (pScreen, &totalClip, &totalClip,
+ RegionCopy(&totalClip, &tParent->borderClip);
+ RegionIntersect(&totalClip, &totalClip,
&tParent->pWin->winSize);
for (tWin = tParent->firstChild; tWin != tChild; tWin = tWin->nextSib) {
if (tWin->pWin->viewable)
- REGION_SUBTRACT (pScreen, &totalClip, &totalClip,
+ RegionSubtract(&totalClip, &totalClip,
&tWin->pWin->borderSize);
}
- REGION_EMPTY (pScreen, &tParent->clipList);
+ RegionEmpty(&tParent->clipList);
} else {
for(tWin = tChild; tWin; tWin = tWin->nextSib) {
if(tWin->valdata)
- REGION_APPEND(pScreen, &totalClip, &tWin->borderClip);
+ RegionAppend(&totalClip, &tWin->borderClip);
}
- REGION_VALIDATE(pScreen, &totalClip, &overlap);
+ RegionValidate(&totalClip, &overlap);
}
if(kind != VTStack)
- REGION_UNION(pScreen, &totalClip, &totalClip, &tParent->clipList);
+ RegionUnion(&totalClip, &totalClip, &tParent->clipList);
for(tWin = tChild; tWin; tWin = tWin->nextSib) {
if(tWin->valdata) {
if(tWin->pWin->viewable) {
- REGION_INTERSECT(pScreen, &childClip, &totalClip,
+ RegionIntersect(&childClip, &totalClip,
&tWin->pWin->borderSize);
miOverlayComputeClips(tWin->pWin, &childClip, kind, &exposed);
- REGION_SUBTRACT(pScreen, &totalClip, &totalClip,
+ RegionSubtract(&totalClip, &totalClip,
&tWin->pWin->borderSize);
} else { /* Means we are unmapping */
- REGION_EMPTY(pScreen, &tWin->clipList);
- REGION_EMPTY( pScreen, &tWin->borderClip);
+ RegionEmpty(&tWin->clipList);
+ RegionEmpty(&tWin->borderClip);
tWin->valdata = NULL;
}
}
}
- REGION_UNINIT(pScreen, &childClip);
+ RegionUninit(&childClip);
if(!((*pPriv->InOverlay)(newParent))) {
- REGION_NULL(pScreen, &tParent->valdata->exposed);
- REGION_NULL(pScreen, &tParent->valdata->borderExposed);
+ RegionNull(&tParent->valdata->exposed);
+ RegionNull(&tParent->valdata->borderExposed);
}
switch (kind) {
@@ -809,18 +809,18 @@ miOverlayValidateTree(
break;
default:
if(!((*pPriv->InOverlay)(newParent)))
- REGION_SUBTRACT(pScreen, &tParent->valdata->exposed, &totalClip,
+ RegionSubtract(&tParent->valdata->exposed, &totalClip,
&tParent->clipList);
/* fall through */
case VTMap:
- REGION_COPY( pScreen, &tParent->clipList, &totalClip);
+ RegionCopy(&tParent->clipList, &totalClip);
if(!((*pPriv->InOverlay)(newParent)))
newParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;
break;
}
- REGION_UNINIT( pScreen, &totalClip);
- REGION_UNINIT( pScreen, &exposed);
+ RegionUninit(&totalClip);
+ RegionUninit(&exposed);
SKIP_UNDERLAY:
@@ -853,14 +853,14 @@ miOverlayHandleExposures(WindowPtr pWin)
while (1) {
if((mival = pTree->valdata)) {
if(!((*pPriv->InOverlay)(pTree->pWin))) {
- if (REGION_NOTEMPTY(pScreen, &mival->borderExposed)) {
+ if (RegionNotEmpty(&mival->borderExposed)) {
miPaintWindow(pTree->pWin, &mival->borderExposed,
PW_BORDER);
}
- REGION_UNINIT(pScreen, &mival->borderExposed);
+ RegionUninit(&mival->borderExposed);
(*WindowExposures)(pTree->pWin,&mival->exposed,NullRegion);
- REGION_UNINIT(pScreen, &mival->exposed);
+ RegionUninit(&mival->exposed);
}
free(mival);
pTree->valdata = NULL;
@@ -882,24 +882,24 @@ miOverlayHandleExposures(WindowPtr pWin)
while (1) {
if ( (val = pChild->valdata) ) {
if(!((*pPriv->InOverlay)(pChild))) {
- REGION_UNION(pScreen, &val->after.exposed, &val->after.exposed,
+ RegionUnion(&val->after.exposed, &val->after.exposed,
&val->after.borderExposed);
- if (REGION_NOTEMPTY(pScreen, &val->after.exposed)) {
+ if (RegionNotEmpty(&val->after.exposed)) {
(*(MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->MakeTransparent))(
pScreen,
- REGION_NUM_RECTS(&val->after.exposed),
- REGION_RECTS(&val->after.exposed));
+ RegionNumRects(&val->after.exposed),
+ RegionRects(&val->after.exposed));
}
} else {
- if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed)) {
+ if (RegionNotEmpty(&val->after.borderExposed)) {
miPaintWindow(pChild, &val->after.borderExposed,
PW_BORDER);
}
(*WindowExposures)(pChild, &val->after.exposed, NullRegion);
}
- REGION_UNINIT(pScreen, &val->after.borderExposed);
- REGION_UNINIT(pScreen, &val->after.exposed);
+ RegionUninit(&val->after.borderExposed);
+ RegionUninit(&val->after.exposed);
free(val);
pChild->valdata = NULL;
if (pChild->firstChild)
@@ -940,13 +940,13 @@ miOverlayMoveWindow(
oldpt.x = pWin->drawable.x;
oldpt.y = pWin->drawable.y;
if (WasViewable) {
- REGION_NULL(pScreen, &overReg);
- REGION_NULL(pScreen, &underReg);
+ RegionNull(&overReg);
+ RegionNull(&underReg);
if(pTree) {
- REGION_COPY(pScreen, &overReg, &pWin->borderClip);
- REGION_COPY(pScreen, &underReg, &pTree->borderClip);
+ RegionCopy(&overReg, &pWin->borderClip);
+ RegionCopy(&underReg, &pTree->borderClip);
} else {
- REGION_COPY(pScreen, &overReg, &pWin->borderClip);
+ RegionCopy(&overReg, &pWin->borderClip);
CollectUnderlayChildrenRegions(pWin, &underReg);
}
(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
@@ -971,16 +971,16 @@ miOverlayMoveWindow(
(*pScreen->ValidateTree)(pWin->parent, NullWindow, kind);
- if(REGION_NOTEMPTY(pScreen, &underReg)) {
+ if(RegionNotEmpty(&underReg)) {
pPriv->copyUnderlay = TRUE;
(* pWin->drawable.pScreen->CopyWindow)(pWin, oldpt, &underReg);
}
- REGION_UNINIT(pScreen, &underReg);
- if(REGION_NOTEMPTY(pScreen, &overReg)) {
+ RegionUninit(&underReg);
+ if(RegionNotEmpty(&overReg)) {
pPriv->copyUnderlay = FALSE;
(* pWin->drawable.pScreen->CopyWindow)(pWin, oldpt, &overReg);
}
- REGION_UNINIT(pScreen, &overReg);
+ RegionUninit(&overReg);
(*pScreen->HandleExposures)(pWin->parent);
if (pScreen->PostValidateTree)
@@ -1003,8 +1003,8 @@ miOverlayWindowExposures(
RegionPtr exposures = prgn;
ScreenPtr pScreen = pWin->drawable.pScreen;
- if ((prgn && !REGION_NIL(prgn)) ||
- (exposures && !REGION_NIL(exposures)) || other_exposed)
+ if ((prgn && !RegionNil(prgn)) ||
+ (exposures && !RegionNil(exposures)) || other_exposed)
{
RegionRec expRec;
int clientInterested;
@@ -1013,51 +1013,51 @@ miOverlayWindowExposures(
ExposureMask;
if (other_exposed) {
if (exposures) {
- REGION_UNION(pScreen, other_exposed, exposures, other_exposed);
+ RegionUnion(other_exposed, exposures, other_exposed);
if (exposures != prgn)
- REGION_DESTROY(pScreen, exposures);
+ RegionDestroy(exposures);
}
exposures = other_exposed;
}
if (clientInterested && exposures &&
- (REGION_NUM_RECTS(exposures) > RECTLIMIT))
+ (RegionNumRects(exposures) > RECTLIMIT))
{
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
BoxRec box;
- box = *REGION_EXTENTS(pScreen, exposures);
+ box = *RegionExtents(exposures);
if (exposures == prgn) {
exposures = &expRec;
- REGION_INIT(pScreen, exposures, &box, 1);
- REGION_RESET(pScreen, prgn, &box);
+ RegionInit(exposures, &box, 1);
+ RegionReset(prgn, &box);
} else {
- REGION_RESET(pScreen, exposures, &box);
- REGION_UNION(pScreen, prgn, prgn, exposures);
+ RegionReset(exposures, &box);
+ RegionUnion(prgn, prgn, exposures);
}
/* This is the only reason why we are replacing mi's version
of this file */
if(!((*pPriv->InOverlay)(pWin))) {
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
- REGION_INTERSECT(pScreen, prgn, prgn, &pTree->clipList);
+ RegionIntersect(prgn, prgn, &pTree->clipList);
} else
- REGION_INTERSECT(pScreen, prgn, prgn, &pWin->clipList);
+ RegionIntersect(prgn, prgn, &pWin->clipList);
}
- if (prgn && !REGION_NIL(prgn))
+ if (prgn && !RegionNil(prgn))
miPaintWindow(pWin, prgn, PW_BACKGROUND);
- if (clientInterested && exposures && !REGION_NIL(exposures))
+ if (clientInterested && exposures && !RegionNil(exposures))
miSendExposures(pWin, exposures,
pWin->drawable.x, pWin->drawable.y);
if (exposures == &expRec) {
- REGION_UNINIT(pScreen, exposures);
+ RegionUninit(exposures);
}
else if (exposures && exposures != prgn && exposures != other_exposed)
- REGION_DESTROY(pScreen, exposures);
+ RegionDestroy(exposures);
if (prgn)
- REGION_EMPTY(pScreen, prgn);
+ RegionEmpty(prgn);
}
else if (exposures && exposures != prgn)
- REGION_DESTROY(pScreen, exposures);
+ RegionDestroy(exposures);
}
@@ -1082,23 +1082,23 @@ miOverlayRecomputeExposures (
/*
* compute exposed regions of this window
*/
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed,
+ RegionSubtract(&pWin->valdata->after.exposed,
&pWin->clipList, pValid->over);
/*
* compute exposed regions of the border
*/
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed,
+ RegionSubtract(&pWin->valdata->after.borderExposed,
&pWin->borderClip, &pWin->winSize);
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed,
+ RegionSubtract(&pWin->valdata->after.borderExposed,
&pWin->valdata->after.borderExposed, pValid->over);
}
if(pTree && pTree->valdata) {
- REGION_SUBTRACT(pScreen, &pTree->valdata->exposed,
+ RegionSubtract(&pTree->valdata->exposed,
&pTree->clipList, pValid->under);
- REGION_SUBTRACT(pScreen, &pTree->valdata->borderExposed,
+ RegionSubtract(&pTree->valdata->borderExposed,
&pTree->borderClip, &pWin->winSize);
- REGION_SUBTRACT(pScreen, &pTree->valdata->borderExposed,
+ RegionSubtract(&pTree->valdata->borderExposed,
&pTree->valdata->borderExposed, pValid->under);
} else if (!pWin->valdata)
return WT_NOMATCH;
@@ -1154,11 +1154,11 @@ miOverlayResizeWindow(
/*
* save the visible region of the window
*/
- oldRegion = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldRegion, &pWin->winSize);
+ oldRegion = RegionCreate(NullBox, 1);
+ RegionCopy(oldRegion, &pWin->winSize);
if(doUnderlay) {
- oldRegion2 = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldRegion2, &pWin->winSize);
+ oldRegion2 = RegionCreate(NullBox, 1);
+ RegionCopy(oldRegion2, &pWin->winSize);
}
/*
@@ -1170,16 +1170,16 @@ miOverlayResizeWindow(
g = pChild->winGravity;
if (g != UnmapGravity) {
if (!gravitate[g])
- gravitate[g] = REGION_CREATE(pScreen, NullBox, 1);
- REGION_UNION(pScreen, gravitate[g],
+ gravitate[g] = RegionCreate(NullBox, 1);
+ RegionUnion(gravitate[g],
gravitate[g], &pChild->borderClip);
if(doUnderlay) {
if (!gravitate2[g])
- gravitate2[g] = REGION_CREATE(pScreen, NullBox, 0);
+ gravitate2[g] = RegionCreate(NullBox, 0);
if((tChild = MIOVERLAY_GET_WINDOW_TREE(pChild))) {
- REGION_UNION(pScreen, gravitate2[g],
+ RegionUnion(gravitate2[g],
gravitate2[g], &tChild->borderClip);
} else
CollectUnderlayChildrenRegions(pChild, gravitate2[g]);
@@ -1193,11 +1193,11 @@ miOverlayResizeWindow(
oldWinClip = oldWinClip2 = NULL;
if (pWin->bitGravity != ForgetGravity) {
- oldWinClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldWinClip, &pWin->clipList);
+ oldWinClip = RegionCreate(NullBox, 1);
+ RegionCopy(oldWinClip, &pWin->clipList);
if(pTree) {
- oldWinClip2 = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldWinClip2, &pTree->clipList);
+ oldWinClip2 = RegionCreate(NullBox, 1);
+ RegionCopy(oldWinClip2, &pTree->clipList);
}
}
/*
@@ -1213,26 +1213,26 @@ miOverlayResizeWindow(
if ((pWin->drawable.height != h || pWin->drawable.width != w) &&
HasBorder (pWin))
{
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
+ borderVisible = RegionCreate(NullBox, 1);
if(pTree)
- borderVisible2 = REGION_CREATE(pScreen, NullBox, 1);
+ borderVisible2 = RegionCreate(NullBox, 1);
/* for tiled borders, we punt and draw the whole thing */
if (pWin->borderIsPixel || !moved)
{
if (shrunk || moved)
- REGION_SUBTRACT(pScreen, borderVisible,
+ RegionSubtract(borderVisible,
&pWin->borderClip,
&pWin->winSize);
else
- REGION_COPY(pScreen, borderVisible,
+ RegionCopy(borderVisible,
&pWin->borderClip);
if(pTree) {
if (shrunk || moved)
- REGION_SUBTRACT(pScreen, borderVisible,
+ RegionSubtract(borderVisible,
&pTree->borderClip,
&pWin->winSize);
else
- REGION_COPY(pScreen, borderVisible,
+ RegionCopy(borderVisible,
&pTree->borderClip);
}
}
@@ -1259,7 +1259,7 @@ miOverlayResizeWindow(
pFirstChange = MoveWindowInStack(pWin, pSib);
if (WasViewable) {
- pRegion = REGION_CREATE(pScreen, NullBox, 1);
+ pRegion = RegionCreate(NullBox, 1);
(*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, NULL);
@@ -1274,9 +1274,9 @@ miOverlayResizeWindow(
* the entire window is trashed unless bitGravity
* recovers portions of it
*/
- REGION_COPY(pScreen, &pWin->valdata->after.exposed, &pWin->clipList);
+ RegionCopy(&pWin->valdata->after.exposed, &pWin->clipList);
if(pTree)
- REGION_COPY(pScreen, &pTree->valdata->exposed, &pTree->clipList);
+ RegionCopy(&pTree->valdata->exposed, &pTree->clipList);
}
GravityTranslate (x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny);
@@ -1304,20 +1304,20 @@ miOverlayResizeWindow(
dx = (oldx - nx) - offx;
dy = (oldy - ny) - offy;
if (dx || dy) {
- REGION_TRANSLATE(pScreen, &pWin->winSize, dx, dy);
+ RegionTranslate(&pWin->winSize, dx, dy);
offx += dx;
offy += dy;
}
if(gravitate[g])
- REGION_INTERSECT(pScreen, gravitate[g], gravitate[g],
+ RegionIntersect(gravitate[g], gravitate[g],
&pWin->winSize);
if(gravitate2[g])
- REGION_INTERSECT(pScreen, gravitate2[g], gravitate2[g],
+ RegionIntersect(gravitate2[g], gravitate2[g],
&pWin->winSize);
}
/* get winSize back where it belongs */
if (offx || offy)
- REGION_TRANSLATE(pScreen, &pWin->winSize, -offx, -offy);
+ RegionTranslate(&pWin->winSize, -offx, -offy);
}
/*
* add screen bits to the appropriate bucket
@@ -1325,22 +1325,22 @@ miOverlayResizeWindow(
if (oldWinClip2)
{
- REGION_COPY(pScreen, pRegion, oldWinClip2);
- REGION_TRANSLATE(pScreen, pRegion, nx - oldx, ny - oldy);
- REGION_INTERSECT(pScreen, oldWinClip2, pRegion, &pTree->clipList);
+ RegionCopy(pRegion, oldWinClip2);
+ RegionTranslate(pRegion, nx - oldx, ny - oldy);
+ RegionIntersect(oldWinClip2, pRegion, &pTree->clipList);
for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) {
if (gravitate2[g])
- REGION_SUBTRACT(pScreen, oldWinClip2, oldWinClip2,
+ RegionSubtract(oldWinClip2, oldWinClip2,
gravitate2[g]);
}
- REGION_TRANSLATE(pScreen, oldWinClip2, oldx - nx, oldy - ny);
+ RegionTranslate(oldWinClip2, oldx - nx, oldy - ny);
g = pWin->bitGravity;
if (!gravitate2[g])
gravitate2[g] = oldWinClip2;
else {
- REGION_UNION(pScreen,gravitate2[g],gravitate2[g],oldWinClip2);
- REGION_DESTROY(pScreen, oldWinClip2);
+ RegionUnion(gravitate2[g],gravitate2[g],oldWinClip2);
+ RegionDestroy(oldWinClip2);
}
}
@@ -1349,9 +1349,9 @@ miOverlayResizeWindow(
/*
* clip to new clipList
*/
- REGION_COPY(pScreen, pRegion, oldWinClip);
- REGION_TRANSLATE(pScreen, pRegion, nx - oldx, ny - oldy);
- REGION_INTERSECT(pScreen, oldWinClip, pRegion, &pWin->clipList);
+ RegionCopy(pRegion, oldWinClip);
+ RegionTranslate(pRegion, nx - oldx, ny - oldy);
+ RegionIntersect(oldWinClip, pRegion, &pWin->clipList);
/*
* don't step on any gravity bits which will be copied after this
* region. Note -- this assumes that the regions will be copied
@@ -1359,16 +1359,16 @@ miOverlayResizeWindow(
*/
for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) {
if (gravitate[g])
- REGION_SUBTRACT(pScreen, oldWinClip, oldWinClip,
+ RegionSubtract(oldWinClip, oldWinClip,
gravitate[g]);
}
- REGION_TRANSLATE(pScreen, oldWinClip, oldx - nx, oldy - ny);
+ RegionTranslate(oldWinClip, oldx - nx, oldy - ny);
g = pWin->bitGravity;
if (!gravitate[g])
gravitate[g] = oldWinClip;
else {
- REGION_UNION(pScreen, gravitate[g], gravitate[g], oldWinClip);
- REGION_DESTROY(pScreen, oldWinClip);
+ RegionUnion(gravitate[g], gravitate[g], oldWinClip);
+ RegionDestroy(oldWinClip);
}
}
@@ -1392,23 +1392,23 @@ miOverlayResizeWindow(
/* only copy the remaining useful bits */
if(gravitate[g])
- REGION_INTERSECT(pScreen, gravitate[g],
+ RegionIntersect(gravitate[g],
gravitate[g], oldRegion);
if(gravitate2[g])
- REGION_INTERSECT(pScreen, gravitate2[g],
+ RegionIntersect(gravitate2[g],
gravitate2[g], oldRegion2);
/* clip to not overwrite already copied areas */
if (destClip && gravitate[g]) {
- REGION_TRANSLATE(pScreen, destClip, oldpt.x - x, oldpt.y - y);
- REGION_SUBTRACT(pScreen, gravitate[g], gravitate[g], destClip);
- REGION_TRANSLATE(pScreen, destClip, x - oldpt.x, y - oldpt.y);
+ RegionTranslate(destClip, oldpt.x - x, oldpt.y - y);
+ RegionSubtract(gravitate[g], gravitate[g], destClip);
+ RegionTranslate(destClip, x - oldpt.x, y - oldpt.y);
}
if (destClip2 && gravitate2[g]) {
- REGION_TRANSLATE(pScreen, destClip2, oldpt.x - x, oldpt.y - y);
- REGION_SUBTRACT(pScreen,gravitate2[g],gravitate2[g],destClip2);
- REGION_TRANSLATE(pScreen, destClip2, x - oldpt.x, y - oldpt.y);
+ RegionTranslate(destClip2, oldpt.x - x, oldpt.y - y);
+ RegionSubtract(gravitate2[g],gravitate2[g],destClip2);
+ RegionTranslate(destClip2, x - oldpt.x, y - oldpt.y);
}
/* and move those bits */
@@ -1429,9 +1429,9 @@ miOverlayResizeWindow(
/* remove any overwritten bits from the remaining useful bits */
if(gravitate[g])
- REGION_SUBTRACT(pScreen, oldRegion, oldRegion, gravitate[g]);
+ RegionSubtract(oldRegion, oldRegion, gravitate[g]);
if(gravitate2[g])
- REGION_SUBTRACT(pScreen, oldRegion2, oldRegion2, gravitate2[g]);
+ RegionSubtract(oldRegion2, oldRegion2, gravitate2[g]);
/*
* recompute exposed regions of child windows
@@ -1456,38 +1456,38 @@ miOverlayResizeWindow(
if (g == pWin->bitGravity) {
if(gravitate[g])
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed,
+ RegionSubtract(&pWin->valdata->after.exposed,
&pWin->valdata->after.exposed, gravitate[g]);
if(gravitate2[g] && pTree)
- REGION_SUBTRACT(pScreen, &pTree->valdata->exposed,
+ RegionSubtract(&pTree->valdata->exposed,
&pTree->valdata->exposed, gravitate2[g]);
}
if(gravitate[g]) {
if (!destClip)
destClip = gravitate[g];
else {
- REGION_UNION(pScreen, destClip, destClip, gravitate[g]);
- REGION_DESTROY(pScreen, gravitate[g]);
+ RegionUnion(destClip, destClip, gravitate[g]);
+ RegionDestroy(gravitate[g]);
}
}
if(gravitate2[g]) {
if (!destClip2)
destClip2 = gravitate2[g];
else {
- REGION_UNION(pScreen, destClip2, destClip2, gravitate2[g]);
- REGION_DESTROY(pScreen, gravitate2[g]);
+ RegionUnion(destClip2, destClip2, gravitate2[g]);
+ RegionDestroy(gravitate2[g]);
}
}
}
- REGION_DESTROY(pScreen, pRegion);
- REGION_DESTROY(pScreen, oldRegion);
+ RegionDestroy(pRegion);
+ RegionDestroy(oldRegion);
if(doUnderlay)
- REGION_DESTROY(pScreen, oldRegion2);
+ RegionDestroy(oldRegion2);
if (destClip)
- REGION_DESTROY(pScreen, destClip);
+ RegionDestroy(destClip);
if (destClip2)
- REGION_DESTROY(pScreen, destClip2);
+ RegionDestroy(destClip2);
(*pScreen->HandleExposures)(pWin->parent);
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther);
@@ -1510,8 +1510,8 @@ miOverlaySetShape(WindowPtr pWin, int kind)
if (HasBorder (pWin)) {
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
pWin->valdata->before.resized = TRUE;
@@ -1519,8 +1519,8 @@ miOverlaySetShape(WindowPtr pWin, int kind)
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
RegionPtr borderVisible2;
- borderVisible2 = REGION_CREATE(pScreen, NULL, 1);
- REGION_SUBTRACT(pScreen, borderVisible2,
+ borderVisible2 = RegionCreate(NULL, 1);
+ RegionSubtract(borderVisible2,
&pTree->borderClip, &pWin->winSize);
pTree->valdata->borderVisible = borderVisible2;
}
@@ -1579,16 +1579,16 @@ miOverlayChangeBorderWidth(
if (HadBorder) {
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NULL, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NULL, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
if(IN_UNDERLAY(pWin)) {
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
RegionPtr borderVisible2;
- borderVisible2 = REGION_CREATE(pScreen, NULL, 1);
- REGION_SUBTRACT(pScreen, borderVisible2,
+ borderVisible2 = RegionCreate(NULL, 1);
+ RegionSubtract(borderVisible2,
&pTree->borderClip, &pWin->winSize);
pTree->valdata->borderVisible = borderVisible2;
}
@@ -1623,11 +1623,11 @@ miOverlaySetRootClip(ScreenPtr pScreen, Bool enable)
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_RESET(pScreen, &pTree->borderClip, &box);
+ RegionReset(&pTree->borderClip, &box);
} else
- REGION_EMPTY(pScreen, &pTree->borderClip);
+ RegionEmpty(&pTree->borderClip);
- REGION_BREAK(pScreen, &pTree->clipList);
+ RegionBreak(&pTree->clipList);
}
static void
@@ -1662,7 +1662,7 @@ miOverlayClearToBackground(
clipList = ((*pScreenPriv->InOverlay)(pWin)) ? &pWin->clipList :
&pTree->clipList;
- extents = REGION_EXTENTS(pScreen, clipList);
+ extents = RegionExtents(clipList);
if (x1 < extents->x1) x1 = extents->x1;
if (x2 > extents->x2) x2 = extents->x2;
@@ -1675,16 +1675,16 @@ miOverlayClearToBackground(
box.x1 = x1; box.x2 = x2;
box.y1 = y1; box.y2 = y2;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
- REGION_INTERSECT(pScreen, &reg, &reg, clipList);
+ RegionIntersect(&reg, &reg, clipList);
if (generateExposures)
(*pScreen->WindowExposures)(pWin, &reg, pBSReg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
if (pBSReg)
- REGION_DESTROY(pScreen, pBSReg);
+ RegionDestroy(pBSReg);
}
@@ -1738,12 +1738,12 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
}
if (pGC->subWindowMode == IncludeInferiors) {
- pregWin = REGION_CREATE(pScreen, NullBox, 1);
+ pregWin = RegionCreate(NullBox, 1);
freeTmpClip = TRUE;
if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) ||
!HasSaverWindow (pScreen))
{
- REGION_INTERSECT(pScreen,pregWin,&pTree->borderClip,&pWin->winSize);
+ RegionIntersect(pregWin,&pTree->borderClip,&pWin->winSize);
}
} else {
pregWin = &pTree->clipList;
@@ -1752,29 +1752,29 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin)
freeCompClip = pGC->freeCompClip;
if (pGC->clientClipType == CT_NONE) {
if (freeCompClip)
- REGION_DESTROY(pScreen, pGC->pCompositeClip);
+ RegionDestroy(pGC->pCompositeClip);
pGC->pCompositeClip = pregWin;
pGC->freeCompClip = freeTmpClip;
} else {
- REGION_TRANSLATE(pScreen, pGC->clientClip,
+ RegionTranslate(pGC->clientClip,
pWin->drawable.x + pGC->clipOrg.x,
pWin->drawable.y + pGC->clipOrg.y);
if (freeCompClip) {
- REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip,
+ RegionIntersect(pGC->pCompositeClip,
pregWin, pGC->clientClip);
if (freeTmpClip)
- REGION_DESTROY(pScreen, pregWin);
+ RegionDestroy(pregWin);
} else if (freeTmpClip) {
- REGION_INTERSECT(pScreen, pregWin, pregWin, pGC->clientClip);
+ RegionIntersect(pregWin, pregWin, pGC->clientClip);
pGC->pCompositeClip = pregWin;
} else {
- pGC->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0);
- REGION_INTERSECT(pScreen, pGC->pCompositeClip,
+ pGC->pCompositeClip = RegionCreate(NullBox, 0);
+ RegionIntersect(pGC->pCompositeClip,
pregWin, pGC->clientClip);
}
pGC->freeCompClip = TRUE;
- REGION_TRANSLATE(pScreen, pGC->clientClip,
+ RegionTranslate(pGC->clientClip,
-(pWin->drawable.x + pGC->clipOrg.x),
-(pWin->drawable.y + pGC->clipOrg.y));
}
@@ -1792,7 +1792,7 @@ miOverlayCollectUnderlayRegions(
return FALSE;
}
- *region = REGION_CREATE(pWin->drawable.pScreen, NullBox, 0);
+ *region = RegionCreate(NullBox, 0);
CollectUnderlayChildrenRegions(pWin, *region);
@@ -1913,7 +1913,7 @@ CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg)
while(1) {
if((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) {
- REGION_APPEND(pScreen, pReg, &pTree->borderClip);
+ RegionAppend(pReg, &pTree->borderClip);
hasUnderlay = TRUE;
} else
if(pChild->firstChild) {
@@ -1931,7 +1931,7 @@ CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg)
if(hasUnderlay) {
Bool overlap;
- REGION_VALIDATE(pScreen, pReg, &overlap);
+ RegionValidate(pReg, &overlap);
}
return hasUnderlay;
diff --git a/mi/mispans.h b/mi/mispans.h
index ef090bb51..c3a3e67ae 100644
--- a/mi/mispans.h
+++ b/mi/mispans.h
@@ -85,16 +85,6 @@ extern _X_EXPORT void miFreeSpanGroup(
SpanGroup * /*spanGroup*/
);
-extern _X_EXPORT int RegionClipSpans(
- RegionPtr /*prgnDst*/,
- DDXPointPtr /*ppt*/,
- int * /*pwidth*/,
- int /*nspans*/,
- DDXPointPtr /*pptNew*/,
- int * /*pwidthNew*/,
- int /*fSorted*/
-);
-
/* Rops which must use span groups */
#define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2)
#define miSpansEasyRop(rop) (!miSpansCarefulRop(rop))
diff --git a/mi/mivaltree.c b/mi/mivaltree.c
index cfcdab756..dc88c4d77 100644
--- a/mi/mivaltree.c
+++ b/mi/mivaltree.c
@@ -116,8 +116,8 @@ miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding,
Bool someIn, someOut;
int t, x1, y1, x2, y2;
- nbox = REGION_NUM_RECTS (bounding);
- boundBox = REGION_RECTS (bounding);
+ nbox = RegionNumRects (bounding);
+ boundBox = RegionRects (bounding);
someIn = someOut = FALSE;
x1 = rect->x1;
y1 = rect->y1;
@@ -141,7 +141,7 @@ miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding,
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
- switch (RECT_IN_REGION(pScreen, universe, &box))
+ switch (RegionContainsRect(universe, &box))
{
case rgnIN:
if (someOut)
@@ -252,15 +252,15 @@ miComputeClips (
if (miSetRedirectBorderClipProc)
{
if (TreatAsTransparent (pParent))
- REGION_EMPTY (pScreen, universe);
+ RegionEmpty(universe);
(*miSetRedirectBorderClipProc) (pParent, universe);
}
- REGION_COPY(pScreen, universe, &pParent->borderSize);
+ RegionCopy(universe, &pParent->borderSize);
}
#endif
oldVis = pParent->visibility;
- switch (RECT_IN_REGION( pScreen, universe, &borderSize))
+ switch (RegionContainsRect(universe, &borderSize))
{
case rgnIN:
newVis = VisibilityUnobscured;
@@ -320,9 +320,9 @@ miComputeClips (
{
if (pChild->visibility != VisibilityFullyObscured)
{
- REGION_TRANSLATE( pScreen, &pChild->borderClip,
+ RegionTranslate(&pChild->borderClip,
dx, dy);
- REGION_TRANSLATE( pScreen, &pChild->clipList,
+ RegionTranslate(&pChild->clipList,
dx, dy);
pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER;
if (pScreen->ClipNotify)
@@ -331,16 +331,16 @@ miComputeClips (
}
if (pChild->valdata)
{
- REGION_NULL(pScreen,
+ RegionNull(
&pChild->valdata->after.borderExposed);
if (HasParentRelativeBorder(pChild))
{
- REGION_SUBTRACT(pScreen,
+ RegionSubtract(
&pChild->valdata->after.borderExposed,
&pChild->borderClip,
&pChild->winSize);
}
- REGION_NULL(pScreen, &pChild->valdata->after.exposed);
+ RegionNull(&pChild->valdata->after.exposed);
}
if (pChild->firstChild)
{
@@ -369,20 +369,20 @@ miComputeClips (
* We translate the old clipList because that will be exposed or copied
* if gravity is right.
*/
- REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy);
- REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy);
+ RegionTranslate(&pParent->borderClip, dx, dy);
+ RegionTranslate(&pParent->clipList, dx, dy);
}
break;
case VTBroken:
- REGION_EMPTY (pScreen, &pParent->borderClip);
- REGION_EMPTY (pScreen, &pParent->clipList);
+ RegionEmpty(&pParent->borderClip);
+ RegionEmpty(&pParent->clipList);
break;
}
borderVisible = pParent->valdata->before.borderVisible;
resized = pParent->valdata->before.resized;
- REGION_NULL(pScreen, &pParent->valdata->after.borderExposed);
- REGION_NULL(pScreen, &pParent->valdata->after.exposed);
+ RegionNull(&pParent->valdata->after.borderExposed);
+ RegionNull(&pParent->valdata->after.exposed);
/*
* Since the borderClip must not be clipped by the children, we do
@@ -402,22 +402,22 @@ miComputeClips (
* of the border will be saved by DIX in borderVisible --
* use that region and destroy it
*/
- REGION_SUBTRACT( pScreen, exposed, universe, borderVisible);
- REGION_DESTROY( pScreen, borderVisible);
+ RegionSubtract(exposed, universe, borderVisible);
+ RegionDestroy(borderVisible);
}
else
{
- REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip);
+ RegionSubtract(exposed, universe, &pParent->borderClip);
}
if (HasParentRelativeBorder(pParent) && (dx || dy))
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed,
+ RegionSubtract(&pParent->valdata->after.borderExposed,
universe,
&pParent->winSize);
else
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed,
+ RegionSubtract(&pParent->valdata->after.borderExposed,
exposed, &pParent->winSize);
- REGION_COPY( pScreen, &pParent->borderClip, universe);
+ RegionCopy(&pParent->borderClip, universe);
/*
* To get the right clipList for the parent, and to make doubly sure
@@ -425,15 +425,15 @@ miComputeClips (
* border from the universe before proceeding.
*/
- REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize);
+ RegionIntersect(universe, universe, &pParent->winSize);
}
else
- REGION_COPY( pScreen, &pParent->borderClip, universe);
+ RegionCopy(&pParent->borderClip, universe);
if ((pChild = pParent->firstChild) && pParent->mapped)
{
- REGION_NULL(pScreen, &childUniverse);
- REGION_NULL(pScreen, &childUnion);
+ RegionNull(&childUniverse);
+ RegionNull(&childUnion);
if ((pChild->drawable.y < pParent->lastChild->drawable.y) ||
((pChild->drawable.y == pParent->lastChild->drawable.y) &&
(pChild->drawable.x < pParent->lastChild->drawable.x)))
@@ -441,7 +441,7 @@ miComputeClips (
for (; pChild; pChild = pChild->nextSib)
{
if (pChild->viewable && !TreatAsTransparent(pChild))
- REGION_APPEND( pScreen, &childUnion, &pChild->borderSize);
+ RegionAppend(&childUnion, &pChild->borderSize);
}
}
else
@@ -449,10 +449,10 @@ miComputeClips (
for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib)
{
if (pChild->viewable && !TreatAsTransparent(pChild))
- REGION_APPEND( pScreen, &childUnion, &pChild->borderSize);
+ RegionAppend(&childUnion, &pChild->borderSize);
}
}
- REGION_VALIDATE( pScreen, &childUnion, &overlap);
+ RegionValidate(&childUnion, &overlap);
for (pChild = pParent->firstChild;
pChild;
@@ -469,7 +469,7 @@ miComputeClips (
* Figure out the new universe from the child's
* perspective and recurse.
*/
- REGION_INTERSECT( pScreen, &childUniverse,
+ RegionIntersect(&childUniverse,
universe,
&pChild->borderSize);
miComputeClips (pChild, pScreen, &childUniverse, kind,
@@ -481,14 +481,14 @@ miComputeClips (
* other sibling.
*/
if (overlap && !TreatAsTransparent (pChild))
- REGION_SUBTRACT( pScreen, universe, universe,
+ RegionSubtract(universe, universe,
&pChild->borderSize);
}
}
if (!overlap)
- REGION_SUBTRACT( pScreen, universe, universe, &childUnion);
- REGION_UNINIT( pScreen, &childUnion);
- REGION_UNINIT( pScreen, &childUniverse);
+ RegionSubtract(universe, universe, &childUnion);
+ RegionUninit(&childUnion);
+ RegionUninit(&childUniverse);
} /* if any children */
/*
@@ -501,12 +501,12 @@ miComputeClips (
if (oldVis == VisibilityFullyObscured ||
oldVis == VisibilityNotViewable)
{
- REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe);
+ RegionCopy(&pParent->valdata->after.exposed, universe);
}
else if (newVis != VisibilityFullyObscured &&
newVis != VisibilityNotViewable)
{
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed,
+ RegionSubtract(&pParent->valdata->after.exposed,
universe, &pParent->clipList);
}
@@ -520,7 +520,7 @@ miComputeClips (
}
#ifdef NOTDEF
- REGION_COPY( pScreen, &pParent->clipList, universe);
+ RegionCopy(&pParent->clipList, universe);
#endif
pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -616,8 +616,8 @@ miValidateTree (
if (pChild == NullWindow)
pChild = pParent->firstChild;
- REGION_NULL(pScreen, &childClip);
- REGION_NULL(pScreen, &exposed);
+ RegionNull(&childClip);
+ RegionNull(&exposed);
/*
* compute the area of the parent window occupied
@@ -625,10 +625,10 @@ miValidateTree (
* is the area which can be divied up among the marked
* children in their new configuration.
*/
- REGION_NULL(pScreen, &totalClip);
+ RegionNull(&totalClip);
viewvals = 0;
- if (REGION_BROKEN (pScreen, &pParent->clipList) &&
- !REGION_BROKEN (pScreen, &pParent->borderClip))
+ if (RegionBroken(&pParent->clipList) &&
+ !RegionBroken(&pParent->borderClip))
{
kind = VTBroken;
/*
@@ -636,19 +636,19 @@ miValidateTree (
* assume everything is busted.
*/
forward = TRUE;
- REGION_COPY (pScreen, &totalClip, &pParent->borderClip);
- REGION_INTERSECT (pScreen, &totalClip, &totalClip, &pParent->winSize);
+ RegionCopy(&totalClip, &pParent->borderClip);
+ RegionIntersect(&totalClip, &totalClip, &pParent->winSize);
for (pWin = pParent->firstChild; pWin != pChild; pWin = pWin->nextSib)
{
if (pWin->viewable && !TreatAsTransparent (pWin))
- REGION_SUBTRACT (pScreen, &totalClip, &totalClip, &pWin->borderSize);
+ RegionSubtract(&totalClip, &totalClip, &pWin->borderSize);
}
for (pWin = pChild; pWin; pWin = pWin->nextSib)
if (pWin->valdata && pWin->viewable)
viewvals++;
- REGION_EMPTY (pScreen, &pParent->clipList);
+ RegionEmpty(&pParent->clipList);
}
else
{
@@ -666,7 +666,7 @@ miValidateTree (
if (pWin->redirectDraw != RedirectDrawNone && miGetRedirectBorderClipProc)
pBorderClip = (*miGetRedirectBorderClipProc)(pWin);
#endif
- REGION_APPEND( pScreen, &totalClip, pBorderClip );
+ RegionAppend(&totalClip, pBorderClip );
if (pWin->viewable)
viewvals++;
}
@@ -685,7 +685,7 @@ miValidateTree (
if (pWin->redirectDraw != RedirectDrawNone && miGetRedirectBorderClipProc)
pBorderClip = (*miGetRedirectBorderClipProc)(pWin);
#endif
- REGION_APPEND( pScreen, &totalClip, pBorderClip );
+ RegionAppend(&totalClip, pBorderClip );
if (pWin->viewable)
viewvals++;
}
@@ -694,7 +694,7 @@ miValidateTree (
pWin = pWin->prevSib;
}
}
- REGION_VALIDATE( pScreen, &totalClip, &overlap);
+ RegionValidate(&totalClip, &overlap);
}
/*
@@ -707,7 +707,7 @@ miValidateTree (
overlap = TRUE;
if (kind != VTStack)
{
- REGION_UNION( pScreen, &totalClip, &totalClip, &pParent->clipList);
+ RegionUnion(&totalClip, &totalClip, &pParent->clipList);
if (viewvals > 1)
{
/*
@@ -717,12 +717,12 @@ miValidateTree (
* lower than the cost of multiple Subtracts in the
* loop below.
*/
- REGION_NULL(pScreen, &childUnion);
+ RegionNull(&childUnion);
if (forward)
{
for (pWin = pChild; pWin; pWin = pWin->nextSib)
if (pWin->valdata && pWin->viewable && !TreatAsTransparent (pWin))
- REGION_APPEND( pScreen, &childUnion,
+ RegionAppend(&childUnion,
&pWin->borderSize);
}
else
@@ -731,16 +731,16 @@ miValidateTree (
while (1)
{
if (pWin->valdata && pWin->viewable && !TreatAsTransparent (pWin))
- REGION_APPEND( pScreen, &childUnion,
+ RegionAppend(&childUnion,
&pWin->borderSize);
if (pWin == pChild)
break;
pWin = pWin->prevSib;
}
}
- REGION_VALIDATE(pScreen, &childUnion, &overlap);
+ RegionValidate(&childUnion, &overlap);
if (overlap)
- REGION_UNINIT(pScreen, &childUnion);
+ RegionUninit(&childUnion);
}
}
@@ -750,13 +750,13 @@ miValidateTree (
{
if (pWin->viewable) {
if (pWin->valdata) {
- REGION_INTERSECT( pScreen, &childClip,
+ RegionIntersect(&childClip,
&totalClip,
&pWin->borderSize);
miComputeClips (pWin, pScreen, &childClip, kind, &exposed);
if (overlap && !TreatAsTransparent (pWin))
{
- REGION_SUBTRACT( pScreen, &totalClip,
+ RegionSubtract(&totalClip,
&totalClip,
&pWin->borderSize);
}
@@ -765,24 +765,24 @@ miValidateTree (
}
} else {
if (pWin->valdata) {
- REGION_EMPTY( pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->clipList);
if (pScreen->ClipNotify)
(* pScreen->ClipNotify) (pWin, 0, 0);
- REGION_EMPTY( pScreen, &pWin->borderClip);
+ RegionEmpty(&pWin->borderClip);
pWin->valdata = NULL;
}
}
}
- REGION_UNINIT( pScreen, &childClip);
+ RegionUninit(&childClip);
if (!overlap)
{
- REGION_SUBTRACT(pScreen, &totalClip, &totalClip, &childUnion);
- REGION_UNINIT(pScreen, &childUnion);
+ RegionSubtract(&totalClip, &totalClip, &childUnion);
+ RegionUninit(&childUnion);
}
- REGION_NULL(pScreen, &pParent->valdata->after.exposed);
- REGION_NULL(pScreen, &pParent->valdata->after.borderExposed);
+ RegionNull(&pParent->valdata->after.exposed);
+ RegionNull(&pParent->valdata->after.borderExposed);
/*
* each case below is responsible for updating the
@@ -798,17 +798,17 @@ miValidateTree (
* exposures and obscures as per miComputeClips and reset the parent's
* clipList.
*/
- REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed,
+ RegionSubtract(&pParent->valdata->after.exposed,
&totalClip, &pParent->clipList);
/* fall through */
case VTMap:
- REGION_COPY( pScreen, &pParent->clipList, &totalClip);
+ RegionCopy(&pParent->clipList, &totalClip);
pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;
break;
}
- REGION_UNINIT( pScreen, &totalClip);
- REGION_UNINIT( pScreen, &exposed);
+ RegionUninit(&totalClip);
+ RegionUninit(&exposed);
if (pScreen->ClipNotify)
(*pScreen->ClipNotify) (pParent, 0, 0);
return (1);
diff --git a/mi/miwindow.c b/mi/miwindow.c
index ce3597429..02b407486 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -112,16 +112,16 @@ miClearToBackground(WindowPtr pWin,
box.y2 = y2;
pScreen = pWin->drawable.pScreen;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
- REGION_INTERSECT(pScreen, &reg, &reg, &pWin->clipList);
+ RegionIntersect(&reg, &reg, &pWin->clipList);
if (generateExposures)
(*pScreen->WindowExposures)(pWin, &reg, pBSReg);
else if (pWin->backgroundState != None)
miPaintWindow(pWin, &reg, PW_BACKGROUND);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
if (pBSReg)
- REGION_DESTROY(pScreen, pBSReg);
+ RegionDestroy(pBSReg);
}
void
@@ -164,9 +164,9 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin)
{
if (pChild->viewable)
{
- if (REGION_BROKEN (pScreen, &pChild->winSize))
+ if (RegionBroken(&pChild->winSize))
SetWinSize (pChild);
- if (REGION_BROKEN (pScreen, &pChild->borderSize))
+ if (RegionBroken(&pChild->borderSize))
SetBorderSize (pChild);
(* MarkWindow)(pChild);
if (pChild->firstChild)
@@ -186,17 +186,17 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin)
}
if ( (pChild = pFirst) )
{
- box = REGION_EXTENTS(pChild->drawable.pScreen, &pWin->borderSize);
+ box = RegionExtents(&pWin->borderSize);
pLast = pChild->parent->lastChild;
while (1)
{
if (pChild->viewable)
{
- if (REGION_BROKEN (pScreen, &pChild->winSize))
+ if (RegionBroken(&pChild->winSize))
SetWinSize (pChild);
- if (REGION_BROKEN (pScreen, &pChild->borderSize))
+ if (RegionBroken(&pChild->borderSize))
SetBorderSize (pChild);
- if (RECT_IN_REGION(pScreen, &pChild->borderSize, box))
+ if (RegionContainsRect(&pChild->borderSize, box))
{
(* MarkWindow)(pChild);
anyMarked = TRUE;
@@ -241,11 +241,11 @@ miHandleValidateExposures(WindowPtr pWin)
{
if ( (val = pChild->valdata) )
{
- if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed))
+ if (RegionNotEmpty(&val->after.borderExposed))
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
- REGION_UNINIT(pScreen, &val->after.borderExposed);
+ RegionUninit(&val->after.borderExposed);
(*WindowExposures)(pChild, &val->after.exposed, NullRegion);
- REGION_UNINIT(pScreen, &val->after.exposed);
+ RegionUninit(&val->after.exposed);
free(val);
pChild->valdata = NULL;
if (pChild->firstChild)
@@ -285,8 +285,8 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
oldpt.y = pWin->drawable.y;
if (WasViewable)
{
- oldRegion = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldRegion, &pWin->borderClip);
+ oldRegion = RegionCreate(NullBox, 1);
+ RegionCopy(oldRegion, &pWin->borderClip);
anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, &pLayerWin);
}
pWin->origin.x = x + (int)bw;
@@ -317,7 +317,7 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
{
(*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, kind);
(* pWin->drawable.pScreen->CopyWindow)(pWin, oldpt, oldRegion);
- REGION_DESTROY(pScreen, oldRegion);
+ RegionDestroy(oldRegion);
/* XXX need to retile border if ParentRelative origin */
(*pScreen->HandleExposures)(pLayerWin->parent);
}
@@ -357,14 +357,14 @@ miRecomputeExposures (
/*
* compute exposed regions of this window
*/
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed,
+ RegionSubtract(&pWin->valdata->after.exposed,
&pWin->clipList, pValid);
/*
* compute exposed regions of the border
*/
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed,
+ RegionSubtract(&pWin->valdata->after.borderExposed,
&pWin->borderClip, &pWin->winSize);
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed,
+ RegionSubtract(&pWin->valdata->after.borderExposed,
&pWin->valdata->after.borderExposed, pValid);
return WT_WALKCHILDREN;
}
@@ -416,8 +416,8 @@ miSlideAndSizeWindow(WindowPtr pWin,
/*
* save the visible region of the window
*/
- oldRegion = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldRegion, &pWin->winSize);
+ oldRegion = RegionCreate(NullBox, 1);
+ RegionCopy(oldRegion, &pWin->winSize);
/*
* categorize child windows into regions to be moved
@@ -430,8 +430,8 @@ miSlideAndSizeWindow(WindowPtr pWin,
if (g != UnmapGravity)
{
if (!gravitate[g])
- gravitate[g] = REGION_CREATE(pScreen, NullBox, 1);
- REGION_UNION(pScreen, gravitate[g],
+ gravitate[g] = RegionCreate(NullBox, 1);
+ RegionUnion(gravitate[g],
gravitate[g], &pChild->borderClip);
}
else
@@ -446,8 +446,8 @@ miSlideAndSizeWindow(WindowPtr pWin,
oldWinClip = NULL;
if (pWin->bitGravity != ForgetGravity)
{
- oldWinClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, oldWinClip, &pWin->clipList);
+ oldWinClip = RegionCreate(NullBox, 1);
+ RegionCopy(oldWinClip, &pWin->clipList);
}
/*
* if the window is changing size, borderExposed
@@ -462,16 +462,16 @@ miSlideAndSizeWindow(WindowPtr pWin,
if ((pWin->drawable.height != h || pWin->drawable.width != w) &&
HasBorder (pWin))
{
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
+ borderVisible = RegionCreate(NullBox, 1);
/* for tiled borders, we punt and draw the whole thing */
if (pWin->borderIsPixel || !moved)
{
if (shrunk || moved)
- REGION_SUBTRACT(pScreen, borderVisible,
+ RegionSubtract(borderVisible,
&pWin->borderClip,
&pWin->winSize);
else
- REGION_COPY(pScreen, borderVisible,
+ RegionCopy(borderVisible,
&pWin->borderClip);
}
}
@@ -498,7 +498,7 @@ miSlideAndSizeWindow(WindowPtr pWin,
if (WasViewable)
{
- pRegion = REGION_CREATE(pScreen, NullBox, 1);
+ pRegion = RegionCreate(NullBox, 1);
if (pLayerWin == pWin)
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
@@ -520,7 +520,7 @@ miSlideAndSizeWindow(WindowPtr pWin,
* the entire window is trashed unless bitGravity
* recovers portions of it
*/
- REGION_COPY(pScreen, &pWin->valdata->after.exposed, &pWin->clipList);
+ RegionCopy(&pWin->valdata->after.exposed, &pWin->clipList);
}
GravityTranslate (x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny);
@@ -549,16 +549,16 @@ miSlideAndSizeWindow(WindowPtr pWin,
dy = (oldy - ny) - offy;
if (dx || dy)
{
- REGION_TRANSLATE(pScreen, &pWin->winSize, dx, dy);
+ RegionTranslate(&pWin->winSize, dx, dy);
offx += dx;
offy += dy;
}
- REGION_INTERSECT(pScreen, gravitate[g], gravitate[g],
+ RegionIntersect(gravitate[g], gravitate[g],
&pWin->winSize);
}
/* get winSize back where it belongs */
if (offx || offy)
- REGION_TRANSLATE(pScreen, &pWin->winSize, -offx, -offy);
+ RegionTranslate(&pWin->winSize, -offx, -offy);
}
/*
* add screen bits to the appropriate bucket
@@ -569,9 +569,9 @@ miSlideAndSizeWindow(WindowPtr pWin,
/*
* clip to new clipList
*/
- REGION_COPY(pScreen, pRegion, oldWinClip);
- REGION_TRANSLATE(pScreen, pRegion, nx - oldx, ny - oldy);
- REGION_INTERSECT(pScreen, oldWinClip, pRegion, &pWin->clipList);
+ RegionCopy(pRegion, oldWinClip);
+ RegionTranslate(pRegion, nx - oldx, ny - oldy);
+ RegionIntersect(oldWinClip, pRegion, &pWin->clipList);
/*
* don't step on any gravity bits which will be copied after this
* region. Note -- this assumes that the regions will be copied
@@ -580,17 +580,17 @@ miSlideAndSizeWindow(WindowPtr pWin,
for (g = pWin->bitGravity + 1; g <= StaticGravity; g++)
{
if (gravitate[g])
- REGION_SUBTRACT(pScreen, oldWinClip, oldWinClip,
+ RegionSubtract(oldWinClip, oldWinClip,
gravitate[g]);
}
- REGION_TRANSLATE(pScreen, oldWinClip, oldx - nx, oldy - ny);
+ RegionTranslate(oldWinClip, oldx - nx, oldy - ny);
g = pWin->bitGravity;
if (!gravitate[g])
gravitate[g] = oldWinClip;
else
{
- REGION_UNION(pScreen, gravitate[g], gravitate[g], oldWinClip);
- REGION_DESTROY(pScreen, oldWinClip);
+ RegionUnion(gravitate[g], gravitate[g], oldWinClip);
+ RegionDestroy(oldWinClip);
}
}
@@ -614,14 +614,14 @@ miSlideAndSizeWindow(WindowPtr pWin,
/* only copy the remaining useful bits */
- REGION_INTERSECT(pScreen, gravitate[g], gravitate[g], oldRegion);
+ RegionIntersect(gravitate[g], gravitate[g], oldRegion);
/* clip to not overwrite already copied areas */
if (destClip) {
- REGION_TRANSLATE(pScreen, destClip, oldpt.x - x, oldpt.y - y);
- REGION_SUBTRACT(pScreen, gravitate[g], gravitate[g], destClip);
- REGION_TRANSLATE(pScreen, destClip, x - oldpt.x, y - oldpt.y);
+ RegionTranslate(destClip, oldpt.x - x, oldpt.y - y);
+ RegionSubtract(gravitate[g], gravitate[g], destClip);
+ RegionTranslate(destClip, x - oldpt.x, y - oldpt.y);
}
/* and move those bits */
@@ -637,7 +637,7 @@ miSlideAndSizeWindow(WindowPtr pWin,
/* remove any overwritten bits from the remaining useful bits */
- REGION_SUBTRACT(pScreen, oldRegion, oldRegion, gravitate[g]);
+ RegionSubtract(oldRegion, oldRegion, gravitate[g]);
/*
* recompute exposed regions of child windows
@@ -647,7 +647,7 @@ miSlideAndSizeWindow(WindowPtr pWin,
{
if (pChild->winGravity != g)
continue;
- REGION_INTERSECT(pScreen, pRegion,
+ RegionIntersect(pRegion,
&pChild->borderClip, gravitate[g]);
TraverseTree (pChild, miRecomputeExposures, (pointer)pRegion);
}
@@ -658,21 +658,21 @@ miSlideAndSizeWindow(WindowPtr pWin,
*/
if (g == pWin->bitGravity)
- REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed,
+ RegionSubtract(&pWin->valdata->after.exposed,
&pWin->valdata->after.exposed, gravitate[g]);
if (!destClip)
destClip = gravitate[g];
else
{
- REGION_UNION(pScreen, destClip, destClip, gravitate[g]);
- REGION_DESTROY(pScreen, gravitate[g]);
+ RegionUnion(destClip, destClip, gravitate[g]);
+ RegionDestroy(gravitate[g]);
}
}
- REGION_DESTROY(pScreen, oldRegion);
- REGION_DESTROY(pScreen, pRegion);
+ RegionDestroy(oldRegion);
+ RegionDestroy(pRegion);
if (destClip)
- REGION_DESTROY(pScreen, destClip);
+ RegionDestroy(destClip);
if (anyMarked)
(*pScreen->HandleExposures)(pLayerWin->parent);
if (anyMarked && pScreen->PostValidateTree)
@@ -715,8 +715,8 @@ miSetShape(WindowPtr pWin, int kind)
{
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NullBox, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NullBox, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
}
@@ -789,8 +789,8 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
if (pWin->valdata && HadBorder)
{
RegionPtr borderVisible;
- borderVisible = REGION_CREATE(pScreen, NULL, 1);
- REGION_SUBTRACT(pScreen, borderVisible,
+ borderVisible = RegionCreate(NULL, 1);
+ RegionSubtract(borderVisible,
&pWin->borderClip, &pWin->winSize);
pWin->valdata->before.borderVisible = borderVisible;
}
@@ -814,10 +814,10 @@ miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure)
{
if ((pChild != pWin) || fromConfigure)
{
- REGION_EMPTY(pChild->drawable.pScreen, &pChild->clipList);
+ RegionEmpty(&pChild->clipList);
if (pChild->drawable.pScreen->ClipNotify)
(* pChild->drawable.pScreen->ClipNotify)(pChild, 0, 0);
- REGION_EMPTY(pChild->drawable.pScreen, &pChild->borderClip);
+ RegionEmpty(&pChild->borderClip);
}
}
@@ -832,7 +832,7 @@ miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth)
for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
{
if (pChild->drawable.depth == depth)
- REGION_UNION(pScreen, pReg, pReg, &pChild->borderClip);
+ RegionUnion(pReg, pReg, &pChild->borderClip);
if (pChild->firstChild)
miSegregateChildren(pChild, pReg, depth);