aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/Xext/mbuf.c20
-rw-r--r--nx-X11/programs/Xserver/Xext/mbufbf.c78
-rw-r--r--nx-X11/programs/Xserver/Xext/mbufpx.c26
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiX.c34
-rw-r--r--nx-X11/programs/Xserver/Xext/panoramiXprocs.c24
-rw-r--r--nx-X11/programs/Xserver/Xext/security.c14
-rw-r--r--nx-X11/programs/Xserver/Xext/shape.c48
-rw-r--r--nx-X11/programs/Xserver/Xext/xtest.c4
-rw-r--r--nx-X11/programs/Xserver/composite/compalloc.c6
-rw-r--r--nx-X11/programs/Xserver/composite/compext.c2
-rw-r--r--nx-X11/programs/Xserver/composite/compwindow.c42
-rwxr-xr-xnx-X11/programs/Xserver/damageext/damageext.c8
-rw-r--r--nx-X11/programs/Xserver/dix/dispatch.c12
-rw-r--r--nx-X11/programs/Xserver/dix/events.c62
-rw-r--r--nx-X11/programs/Xserver/dix/window.c112
-rw-r--r--nx-X11/programs/Xserver/fb/fb.h2
-rw-r--r--nx-X11/programs/Xserver/fb/fb24_32.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fbarc.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbbits.h4
-rw-r--r--nx-X11/programs/Xserver/fb/fbbstore.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fbcompose.c36
-rw-r--r--nx-X11/programs/Xserver/fb/fbcopy.c26
-rw-r--r--nx-X11/programs/Xserver/fb/fbfill.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbfillrect.c6
-rw-r--r--nx-X11/programs/Xserver/fb/fbfillsp.c6
-rw-r--r--nx-X11/programs/Xserver/fb/fbgc.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbglyph.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbimage.c8
-rw-r--r--nx-X11/programs/Xserver/fb/fbline.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fboverlay.c42
-rw-r--r--nx-X11/programs/Xserver/fb/fbpict.c6
-rw-r--r--nx-X11/programs/Xserver/fb/fbpixmap.c10
-rw-r--r--nx-X11/programs/Xserver/fb/fbpoint.c2
-rw-r--r--nx-X11/programs/Xserver/fb/fbpseudocolor.c130
-rw-r--r--nx-X11/programs/Xserver/fb/fbpush.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbseg.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbsetsp.c4
-rw-r--r--nx-X11/programs/Xserver/fb/fbwindow.c18
-rwxr-xr-xnx-X11/programs/Xserver/fix-region40
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c232
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.h8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c74
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GC.c44
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/GCOps.c68
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdamage.c86
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c12
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c62
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c114
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c156
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXpicture.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c112
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixmap.c10
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c118
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Split.c14
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c124
-rw-r--r--nx-X11/programs/Xserver/include/regionstr.h114
-rw-r--r--nx-X11/programs/Xserver/mi/mibank.c92
-rw-r--r--nx-X11/programs/Xserver/mi/mibitblt.c32
-rw-r--r--nx-X11/programs/Xserver/mi/mibstore.c288
-rw-r--r--nx-X11/programs/Xserver/mi/miexpose.c112
-rw-r--r--nx-X11/programs/Xserver/mi/migc.c44
-rw-r--r--nx-X11/programs/Xserver/mi/mioverlay.c424
-rw-r--r--nx-X11/programs/Xserver/mi/miregion.c154
-rw-r--r--nx-X11/programs/Xserver/mi/misprite.c6
-rw-r--r--nx-X11/programs/Xserver/mi/mivaltree.c140
-rw-r--r--nx-X11/programs/Xserver/mi/miwindow.c154
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw.c30
-rw-r--r--nx-X11/programs/Xserver/miext/cw/cw_ops.c4
-rwxr-xr-xnx-X11/programs/Xserver/miext/damage/damage.c86
-rw-r--r--nx-X11/programs/Xserver/render/mipict.c80
-rw-r--r--nx-X11/programs/Xserver/render/mirect.c4
-rw-r--r--nx-X11/programs/Xserver/render/picture.c18
-rwxr-xr-xnx-X11/programs/Xserver/xfixes/region.c60
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxFakeMtn.c8
76 files changed, 2017 insertions, 1977 deletions
diff --git a/nx-X11/programs/Xserver/Xext/mbuf.c b/nx-X11/programs/Xserver/Xext/mbuf.c
index e6dec8f6f..5379f2656 100644
--- a/nx-X11/programs/Xserver/Xext/mbuf.c
+++ b/nx-X11/programs/Xserver/Xext/mbuf.c
@@ -903,9 +903,9 @@ ProcClearImageBufferArea (client)
box.y1 = clearRect.y;
box.x2 = clearRect.x + clearRect.width;
box.y2 = clearRect.y + clearRect.height;
- REGION_INIT(pScreen, &region, &box, 1);
+ RegionInit(&region, &box, 1);
MultibufferExpose(pMultibuffer, &region);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
}
return Success;
}
@@ -1202,13 +1202,13 @@ PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf)
* window-relative so that region ops involving
* pExposed and pWinSize behave sensibly.
*/
- REGION_TRANSLATE(pWin->drawable.pScreen, pWinSize,
+ RegionTranslate(pWinSize,
-pWin->drawable.x, -pWin->drawable.y);
- REGION_INTERSECT(pWin->drawable.pScreen, pExposed,
+ RegionIntersect(pExposed,
pExposed, pWinSize);
- REGION_DESTROY(pWin->drawable.pScreen, pWinSize);
+ RegionDestroy(pWinSize);
MultibufferExpose (pPrevMultibuffer, pExposed);
- REGION_DESTROY(pWin->drawable.pScreen, pExposed);
+ RegionDestroy(pExposed);
}
graphicsExpose = FALSE;
DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE);
@@ -1371,7 +1371,7 @@ MultibufferExpose (pMultibuffer, pRegion)
MultibufferPtr pMultibuffer;
RegionPtr pRegion;
{
- if (pRegion && !REGION_NIL(pRegion))
+ if (pRegion && !RegionNil(pRegion))
{
xEvent *pEvent;
PixmapPtr pPixmap;
@@ -1381,11 +1381,11 @@ MultibufferExpose (pMultibuffer, pRegion)
int numRects;
pPixmap = pMultibuffer->pPixmap;
- REGION_TRANSLATE(pPixmap->drawable.pScreen, pRegion,
+ RegionTranslate(pRegion,
-pPixmap->drawable.x, -pPixmap->drawable.y);
/* XXX MultibufferExpose "knows" the region representation */
- numRects = REGION_NUM_RECTS(pRegion);
- pBox = REGION_RECTS(pRegion);
+ numRects = RegionNumRects(pRegion);
+ pBox = RegionRects(pRegion);
pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent));
if (pEvent) {
diff --git a/nx-X11/programs/Xserver/Xext/mbufbf.c b/nx-X11/programs/Xserver/Xext/mbufbf.c
index 318fa6756..359fb63aa 100644
--- a/nx-X11/programs/Xserver/Xext/mbufbf.c
+++ b/nx-X11/programs/Xserver/Xext/mbufbf.c
@@ -245,9 +245,9 @@ bufMultibufferInit(pScreen, pMBScreen)
box.y2 = pScreen->height;
pMBPriv->rgnChanged = TRUE;
- REGION_INIT(pScreen, &pMBPriv->backBuffer, &box, 1);
- REGION_INIT(pScreen, &pMBPriv->subtractRgn, &box, 1);
- REGION_NULL(pScreen, &pMBPriv->unionRgn);
+ RegionInit(&pMBPriv->backBuffer, &box, 1);
+ RegionInit(&pMBPriv->subtractRgn, &box, 1);
+ RegionNull(&pMBPriv->unionRgn);
/* Misc functions */
pMBPriv->CopyBufferBits = bufCopyBufferBitsFunc[pScreen->myNum];
@@ -374,10 +374,10 @@ bufCreateImageBuffers (pWin, nbuf, ids, action, hint)
pMBScreen = MB_SCREEN_PRIV(pScreen);
pMBWindow = MB_WINDOW_PRIV(pWin);
- pMBWindow->devPrivate.ptr = (void *) REGION_CREATE(pScreen, 0,0);
+ pMBWindow->devPrivate.ptr = (void *) RegionCreate(0,0);
if (!pMBWindow->devPrivate.ptr)
return(0);
- REGION_COPY(pScreen, (RegionPtr) pMBWindow->devPrivate.ptr,
+ RegionCopy((RegionPtr) pMBWindow->devPrivate.ptr,
&pWin->clipList);
for (i = 0; i < nbuf; i++)
@@ -429,7 +429,7 @@ bufDestroyImageBuffers(pWin)
if (pWin->realized && (pMBWindow->displayedMultibuffer == BACK_BUFFER))
{
(* pMBPriv->CopyBufferBits)(pMBWindow, BACK_BUFFER, FRONT_BUFFER);
- REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer,
+ RegionSubtract(&pMBPriv->backBuffer,
&pMBPriv->backBuffer, &pWin->clipList);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&pWin->clipList, FRONT_BUFFER);
@@ -439,7 +439,7 @@ bufDestroyImageBuffers(pWin)
pWin->devPrivates[frameWindowPrivateIndex] =
pMBPriv->frameBuffer[FRONT_BUFFER];
- REGION_DESTROY(pScreen, (RegionPtr) pMBWindow->devPrivate.ptr);
+ RegionDestroy((RegionPtr) pMBWindow->devPrivate.ptr);
pMBWindow->devPrivate.ptr = NULL;
}
}
@@ -506,7 +506,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
box.y2 = y2;
pScreen = pBuffer->drawable.pScreen;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
if (pBuffer->backStorage)
{
/*
@@ -520,7 +520,7 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
generateExposures);
}
- REGION_INTERSECT(pScreen, &reg, &reg, &pBuffer->clipList);
+ RegionIntersect(&reg, &reg, &pBuffer->clipList);
if (pBuffer->backgroundState != None)
(*pScreen->PaintWindowBackground)(pBuffer, &reg, PW_BACKGROUND);
if (generateExposures)
@@ -537,9 +537,9 @@ bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures)
else if (pBuffer->backgroundState != None)
(*pScreen->PaintWindowBackground)(pBuffer, &reg, PW_BACKGROUND);
#endif
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
if (pBSReg)
- REGION_DESTROY(pScreen, pBSReg);
+ RegionDestroy(pBSReg);
}
static void
@@ -567,9 +567,9 @@ bufResetProc(pScreen)
* whoever called RegisterDoubleBufferHardware
*/
- REGION_UNINIT(pScreen, &pMBPriv->backBuffer);
- REGION_UNINIT(pScreen, &pMBPriv->subtractRgn);
- REGION_UNINIT(pScreen, &pMBPriv->unionRgn);
+ RegionUninit(&pMBPriv->backBuffer);
+ RegionUninit(&pMBPriv->subtractRgn);
+ RegionUninit(&pMBPriv->unionRgn);
xfree(pMBPriv);
}
@@ -624,7 +624,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
int numRects;
XID value;
- if (REGION_NUM_RECTS(prgn) == 0)
+ if (RegionNumRects(prgn) == 0)
return;
pDrawable = (DrawablePtr) selectPlane.ptr;
@@ -632,7 +632,7 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
if (!pGC)
return;
- prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) *
+ prect = (xRectangle *)ALLOCATE_LOCAL(RegionNumRects(prgn) *
sizeof(xRectangle));
if (!prect)
{
@@ -644,8 +644,8 @@ bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum)
DoChangeGC(pGC, GCForeground, &value, 0);
ValidateGC(pDrawable, 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;
@@ -697,10 +697,10 @@ bufDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf)
&pWin->clipList, number);
if (number == BACK_BUFFER)
- REGION_UNION(pScreen, backBuffer, backBuffer,
+ RegionUnion(backBuffer, backBuffer,
&pWin->clipList);
else
- REGION_SUBTRACT(pScreen, backBuffer, backBuffer,
+ RegionSubtract(backBuffer, backBuffer,
&pWin->clipList);
/* Switch which framebuffer the window draws into */
@@ -764,36 +764,36 @@ bufPostValidateTree(pParent, pChild, kind)
pSubtractRgn = &pMBPriv->subtractRgn;
pUnionRgn = &pMBPriv->unionRgn;
- REGION_VALIDATE(pScreen, pSubtractRgn, &overlap);
+ RegionValidate(pSubtractRgn, &overlap);
#ifdef DEBUG
if (overlap)
FatalError("bufPostValidateTree: subtractRgn overlaps");
#endif
- REGION_VALIDATE(pScreen, pUnionRgn, &overlap);
+ RegionValidate(pUnionRgn, &overlap);
#ifdef DEBUG
if (overlap)
FatalError("bufPostValidateTree: unionRgn overlaps");
#endif
/* Update backBuffer: subtract must come before union */
- REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer,
+ RegionSubtract(&pMBPriv->backBuffer, &pMBPriv->backBuffer,
pSubtractRgn);
- REGION_UNION(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer,
+ RegionUnion(&pMBPriv->backBuffer, &pMBPriv->backBuffer,
pUnionRgn);
/* Paint gained and lost backbuffer areas in select plane */
- REGION_NULL(pScreen, &exposed);
- REGION_SUBTRACT(pScreen, &exposed, pSubtractRgn, pUnionRgn);
+ RegionNull(&exposed);
+ RegionSubtract(&exposed, pSubtractRgn, pUnionRgn);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&exposed, FRONT_BUFFER);
- REGION_SUBTRACT(pScreen, &exposed, pUnionRgn, pSubtractRgn);
+ RegionSubtract(&exposed, pUnionRgn, pSubtractRgn);
(* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane,
&exposed, BACK_BUFFER);
- REGION_UNINIT(pScreen, &exposed);
- REGION_EMPTY(pScreen, pSubtractRgn);
- REGION_EMPTY(pScreen, pUnionRgn);
+ RegionUninit(&exposed);
+ RegionEmpty(pSubtractRgn);
+ RegionEmpty(pUnionRgn);
}
}
@@ -826,16 +826,16 @@ bufClipNotify(pWin, dx,dy)
{
RegionPtr pOldClipList = (RegionPtr) pMBWindow->devPrivate.ptr;
- if (! REGION_EQUAL(pScreen, pOldClipList, &pWin->clipList))
+ if (! RegionEqual(pOldClipList, &pWin->clipList))
{
if (pMBWindow->displayedMultibuffer == BACK_BUFFER)
{
pMBPriv->rgnChanged = TRUE;
- REGION_APPEND(pScreen, &pMBPriv->subtractRgn, pOldClipList);
- REGION_APPEND(pScreen, &pMBPriv->unionRgn, &pWin->clipList);
+ RegionAppend(&pMBPriv->subtractRgn, pOldClipList);
+ RegionAppend(&pMBPriv->unionRgn, &pWin->clipList);
}
- REGION_COPY(pScreen, pOldClipList,&pWin->clipList);
+ RegionCopy(pOldClipList,&pWin->clipList);
}
/* Update buffer x,y,w,h, and clipList */
@@ -912,13 +912,13 @@ bufWindowExposures(pWin, prgn, other_exposed)
handleBuffers = (!pMBPriv->inClearToBackground) &&
(pWin->drawable.type == DRAWABLE_WINDOW) &&
- pMBWindow && (prgn && !REGION_NIL(prgn));
+ pMBWindow && (prgn && !RegionNil(prgn));
/* miWindowExposures munges prgn and other_exposed. */
if (handleBuffers)
{
- REGION_NULL(pScreen, &tmp_rgn);
- REGION_COPY(pScreen, &tmp_rgn, prgn);
+ RegionNull(&tmp_rgn);
+ RegionCopy(&tmp_rgn, prgn);
}
UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures);
@@ -950,7 +950,7 @@ bufWindowExposures(pWin, prgn, other_exposed)
MultibufferExpose(pMBBuffer, &tmp_rgn);
}
- REGION_UNINIT(pScreen, &tmp_rgn);
+ RegionUninit(&tmp_rgn);
}
/*
@@ -1018,7 +1018,7 @@ bufCopyWindow(pWin, ptOldOrg, prgnSrc)
*/
/* CopyWindow translates prgnSrc... translate it back for 2nd call. */
- REGION_TRANSLATE(pScreen, prgnSrc,
+ RegionTranslate(prgnSrc,
ptOldOrg.x - pWin->drawable.x,
ptOldOrg.y - pWin->drawable.y);
pwinroot->devPrivates[frameWindowPrivateIndex] =
diff --git a/nx-X11/programs/Xserver/Xext/mbufpx.c b/nx-X11/programs/Xserver/Xext/mbufpx.c
index 0e9ae1628..3d28d3ff3 100644
--- a/nx-X11/programs/Xserver/Xext/mbufpx.c
+++ b/nx-X11/programs/Xserver/Xext/mbufpx.c
@@ -262,8 +262,8 @@ MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion)
RegionPtr pRegion;
{
xRectangle *pRects;
- int nrects = REGION_NUM_RECTS(pRegion);
- BoxPtr pbox = REGION_RECTS(pRegion);
+ int nrects = RegionNumRects(pRegion);
+ BoxPtr pbox = RegionRects(pRegion);
pRects = (xRectangle *)ALLOCATE_LOCAL(nrects * sizeof(xRectangle));
if (pRects)
@@ -390,13 +390,13 @@ pixDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf)
* window-relative so that region ops involving
* pExposed and pWinSize behave sensibly.
*/
- REGION_TRANSLATE(pScreen, pWinSize,
+ RegionTranslate(pWinSize,
-pWin->drawable.x,
-pWin->drawable.y);
- REGION_INTERSECT(pScreen, pExposed, pExposed, pWinSize);
- REGION_DESTROY(pScreen, pWinSize);
+ RegionIntersect(pExposed, pExposed, pWinSize);
+ RegionDestroy(pWinSize);
MultibufferExpose (pPrevMBBuffer, pExposed);
- REGION_DESTROY(pScreen, pExposed);
+ RegionDestroy(pExposed);
}
bool = FALSE;
DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE);
@@ -522,7 +522,7 @@ pixPositionWindow (pWin, x, y)
box.x1 = box.y1 = 0;
box.x2 = width;
box.y2 = height;
- REGION_INIT(pScreen, &exposedRegion, &box, 1);
+ RegionInit(&exposedRegion, &box, 1);
if (pWin->bitGravity != ForgetGravity)
{
RegionRec preservedRegion;
@@ -530,9 +530,9 @@ pixPositionWindow (pWin, x, y)
box.y1 = desty;
box.x2 = destx + savewidth;
box.y2 = desty + saveheight;
- REGION_INIT(pScreen, &preservedRegion, &box, 1);
- REGION_SUBTRACT(pScreen, &exposedRegion, &exposedRegion, &preservedRegion);
- REGION_UNINIT(pScreen, &preservedRegion);
+ RegionInit(&preservedRegion, &box, 1);
+ RegionSubtract(&exposedRegion, &exposedRegion, &preservedRegion);
+ RegionUninit(&preservedRegion);
}
} /* end if (clear) */
@@ -575,7 +575,7 @@ pixPositionWindow (pWin, x, y)
}
FreeScratchGC (pGC);
if (clear)
- REGION_UNINIT(pScreen, &exposedRegion);
+ RegionUninit(&exposedRegion);
return TRUE;
}
@@ -628,7 +628,7 @@ pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures)
if (box.x2 > w_width) box.x2 = w_width;
if (box.y2 > w_height) box.y2 = w_height;
- REGION_INIT(pScreen, &region, &box, 1);
+ RegionInit(&region, &box, 1);
if (pMBBuffer->number == pMBBuffer->pMBWindow->displayedMultibuffer)
pDrawable = (DrawablePtr) pWin;
@@ -640,7 +640,7 @@ pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures)
if (exposures)
MultibufferExpose(pMBBuffer, &region);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
}
static void
diff --git a/nx-X11/programs/Xserver/Xext/panoramiX.c b/nx-X11/programs/Xserver/Xext/panoramiX.c
index 000c4bf04..2671ba0d3 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiX.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiX.c
@@ -161,9 +161,9 @@ XineramaCloseScreen (int i, ScreenPtr pScreen)
pScreen->CloseScreen = pScreenPriv->CloseScreen;
pScreen->CreateGC = pScreenPriv->CreateGC;
- REGION_UNINIT(pScreen, &XineramaScreenRegions[pScreen->myNum]);
+ RegionUninit(&XineramaScreenRegions[pScreen->myNum]);
if (pScreen->myNum == 0)
- REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
+ RegionUninit(&PanoramiXScreenRegion);
xfree ((void *) pScreenPriv);
@@ -434,7 +434,7 @@ static void XineramaInitData(ScreenPtr pScreen)
{
int i, w, h;
- REGION_NULL(pScreen, &PanoramiXScreenRegion)
+ RegionNull(&PanoramiXScreenRegion);
for (i = 0; i < PanoramiXNumScreens; i++) {
BoxRec TheBox;
@@ -450,8 +450,8 @@ static void XineramaInitData(ScreenPtr pScreen)
TheBox.y1 = panoramiXdataPtr[i].y;
TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height;
- REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1);
- REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion,
+ RegionInit(&XineramaScreenRegions[i], &TheBox, 1);
+ RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion,
&XineramaScreenRegions[i]);
}
@@ -473,9 +473,9 @@ void XineramaReinitData(ScreenPtr pScreen)
{
int i;
- REGION_UNINIT(pScreen, &PanoramiXScreenRegion);
+ RegionUninit(&PanoramiXScreenRegion);
for (i = 0; i < PanoramiXNumScreens; i++)
- REGION_UNINIT(pScreen, &XineramaScreenRegions[i]);
+ RegionUninit(&XineramaScreenRegions[i]);
XineramaInitData(pScreen);
}
@@ -1182,15 +1182,15 @@ XineramaGetImageData(
SrcBox.x2 = SrcBox.x1 + width;
SrcBox.y2 = SrcBox.y1 + height;
- REGION_INIT(pScreen, &SrcRegion, &SrcBox, 1);
- REGION_NULL(pScreen, &GrabRegion);
+ RegionInit(&SrcRegion, &SrcBox, 1);
+ RegionNull(&GrabRegion);
depth = (format == XYPixmap) ? 1 : pDraw->depth;
for(i = 0; i < PanoramiXNumScreens; i++) {
pDraw = pDrawables[i];
- inOut = RECT_IN_REGION(pScreen,&XineramaScreenRegions[i],&SrcBox);
+ inOut = RegionContainsRect(&XineramaScreenRegions[i],&SrcBox);
if(inOut == rgnIN) {
(*pDraw->pScreen->GetImage)(pDraw,
@@ -1201,13 +1201,13 @@ XineramaGetImageData(
} else if (inOut == rgnOUT)
continue;
- REGION_INTERSECT(pScreen, &GrabRegion, &SrcRegion,
+ RegionIntersect(&GrabRegion, &SrcRegion,
&XineramaScreenRegions[i]);
- nbox = REGION_NUM_RECTS(&GrabRegion);
+ nbox = RegionNumRects(&GrabRegion);
if(nbox) {
- pbox = REGION_RECTS(&GrabRegion);
+ pbox = RegionRects(&GrabRegion);
while(nbox--) {
w = pbox->x2 - pbox->x1;
@@ -1284,8 +1284,8 @@ XineramaGetImageData(
pbox++;
}
- REGION_SUBTRACT(pScreen, &SrcRegion, &SrcRegion, &GrabRegion);
- if(!REGION_NOTEMPTY(pScreen, &SrcRegion))
+ RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion);
+ if(!RegionNotEmpty(&SrcRegion))
break;
}
@@ -1294,6 +1294,6 @@ XineramaGetImageData(
if(ScratchMem)
xfree(ScratchMem);
- REGION_UNINIT(pScreen, &SrcRegion);
- REGION_UNINIT(pScreen, &GrabRegion);
+ RegionUninit(&SrcRegion);
+ RegionUninit(&GrabRegion);
}
diff --git a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
index 2f2b2c63e..8078e2bd0 100644
--- a/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
+++ b/nx-X11/programs/Xserver/Xext/panoramiXprocs.c
@@ -621,7 +621,7 @@ int PanoramiXTranslateCoords(ClientPtr client)
* borderSize
*/
&& (!wBoundingShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wBoundingShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
@@ -1109,21 +1109,21 @@ int PanoramiXCopyArea(ClientPtr client)
RegionRec totalReg;
Bool overlap;
- REGION_NULL(pScreen, &totalReg);
+ RegionNull(&totalReg);
FOR_NSCREENS_BACKWARD(j) {
if(pRgn[j]) {
if(srcIsRoot) {
- REGION_TRANSLATE(pScreen, pRgn[j],
+ RegionTranslate(pRgn[j],
panoramiXdataPtr[j].x, panoramiXdataPtr[j].y);
}
- REGION_APPEND(pScreen, &totalReg, pRgn[j]);
- REGION_DESTROY(pScreen, pRgn[j]);
+ RegionAppend(&totalReg, pRgn[j]);
+ RegionDestroy(pRgn[j]);
}
}
- REGION_VALIDATE(pScreen, &totalReg, &overlap);
+ RegionValidate(&totalReg, &overlap);
(*pScreen->SendGraphicsExpose)(
client, &totalReg, stuff->dstDrawable, X_CopyArea, 0);
- REGION_UNINIT(pScreen, &totalReg);
+ RegionUninit(&totalReg);
}
result = client->noClientException;
@@ -1220,17 +1220,17 @@ int PanoramiXCopyPlane(ClientPtr client)
RegionRec totalReg;
Bool overlap;
- REGION_NULL(pScreen, &totalReg);
+ RegionNull(&totalReg);
FOR_NSCREENS_BACKWARD(j) {
if(pRgn[j]) {
- REGION_APPEND(pScreen, &totalReg, pRgn[j]);
- REGION_DESTROY(pScreen, pRgn[j]);
+ RegionAppend(&totalReg, pRgn[j]);
+ RegionDestroy(pRgn[j]);
}
}
- REGION_VALIDATE(pScreen, &totalReg, &overlap);
+ RegionValidate(&totalReg, &overlap);
(*pScreen->SendGraphicsExpose)(
client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0);
- REGION_UNINIT(pScreen, &totalReg);
+ RegionUninit(&totalReg);
}
return (client->noClientException);
diff --git a/nx-X11/programs/Xserver/Xext/security.c b/nx-X11/programs/Xserver/Xext/security.c
index bcc8574cb..ccf80b401 100644
--- a/nx-X11/programs/Xserver/Xext/security.c
+++ b/nx-X11/programs/Xserver/Xext/security.c
@@ -1400,12 +1400,12 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
imageBox.y1 = y;
imageBox.x2 = x + w;
imageBox.y2 = y + h;
- REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
- REGION_NULL(pScreen, &censorRegion);
+ RegionInit(&imageRegion, &imageBox, 1);
+ RegionNull(&censorRegion);
/* censorRegion = imageRegion - visibleRegion */
- REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
- nRects = REGION_NUM_RECTS(&censorRegion);
+ RegionSubtract(&censorRegion, &imageRegion, pVisibleRegion);
+ nRects = RegionNumRects(&censorRegion);
if (nRects > 0)
{ /* we have something to censor */
GCPtr pScratchGC = NULL;
@@ -1425,7 +1425,7 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
failed = TRUE;
goto failSafe;
}
- for (pBox = REGION_RECTS(&censorRegion), i = 0;
+ for (pBox = RegionRects(&censorRegion), i = 0;
i < nRects;
i++, pBox++)
{
@@ -1475,8 +1475,8 @@ SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
if (pScratchGC) FreeScratchGC(pScratchGC);
if (pPix) FreeScratchPixmapHeader(pPix);
}
- REGION_UNINIT(pScreen, &imageRegion);
- REGION_UNINIT(pScreen, &censorRegion);
+ RegionUninit(&imageRegion);
+ RegionUninit(&censorRegion);
} /* SecurityCensorImage */
/**********************************************************************/
diff --git a/nx-X11/programs/Xserver/Xext/shape.c b/nx-X11/programs/Xserver/Xext/shape.c
index 78d3be319..8516192c0 100644
--- a/nx-X11/programs/Xserver/Xext/shape.c
+++ b/nx-X11/programs/Xserver/Xext/shape.c
@@ -186,11 +186,11 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
ScreenPtr pScreen = pWin->drawable.pScreen;
if (srcRgn && (xoff || yoff))
- REGION_TRANSLATE(pScreen, srcRgn, xoff, yoff);
+ RegionTranslate(srcRgn, xoff, yoff);
if (!pWin->parent)
{
if (srcRgn)
- REGION_DESTROY(pScreen, srcRgn);
+ RegionDestroy(srcRgn);
return Success;
}
@@ -201,7 +201,7 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
*/
if (srcRgn == NULL) {
if (*destRgnp != NULL) {
- REGION_DESTROY (pScreen, *destRgnp);
+ RegionDestroy(*destRgnp);
*destRgnp = 0;
/* go on to remove shape and generate ShapeNotify */
}
@@ -220,17 +220,17 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
else switch (op) {
case ShapeSet:
if (*destRgnp)
- REGION_DESTROY(pScreen, *destRgnp);
+ RegionDestroy(*destRgnp);
*destRgnp = srcRgn;
srcRgn = 0;
break;
case ShapeUnion:
if (*destRgnp)
- REGION_UNION(pScreen, *destRgnp, *destRgnp, srcRgn);
+ RegionUnion(*destRgnp, *destRgnp, srcRgn);
break;
case ShapeIntersect:
if (*destRgnp)
- REGION_INTERSECT(pScreen, *destRgnp, *destRgnp, srcRgn);
+ RegionIntersect(*destRgnp, *destRgnp, srcRgn);
else {
*destRgnp = srcRgn;
srcRgn = 0;
@@ -239,20 +239,20 @@ RegionOperate (client, pWin, kind, destRgnp, srcRgn, op, xoff, yoff, create)
case ShapeSubtract:
if (!*destRgnp)
*destRgnp = (*create)(pWin);
- REGION_SUBTRACT(pScreen, *destRgnp, *destRgnp, srcRgn);
+ RegionSubtract(*destRgnp, *destRgnp, srcRgn);
break;
case ShapeInvert:
if (!*destRgnp)
- *destRgnp = REGION_CREATE(pScreen, (BoxPtr) 0, 0);
+ *destRgnp = RegionCreate((BoxPtr) 0, 0);
else
- REGION_SUBTRACT(pScreen, *destRgnp, srcRgn, *destRgnp);
+ RegionSubtract(*destRgnp, srcRgn, *destRgnp);
break;
default:
client->errorValue = op;
return BadValue;
}
if (srcRgn)
- REGION_DESTROY(pScreen, srcRgn);
+ RegionDestroy(srcRgn);
(*pScreen->SetShape) (pWin);
SendShapeNotify (pWin, kind);
return Success;
@@ -268,7 +268,7 @@ CreateBoundingShape (pWin)
extents.y1 = -wBorderWidth (pWin);
extents.x2 = pWin->drawable.width + wBorderWidth (pWin);
extents.y2 = pWin->drawable.height + wBorderWidth (pWin);
- return REGION_CREATE(pWin->drawable.pScreen, &extents, 1);
+ return RegionCreate(&extents, 1);
}
RegionPtr
@@ -281,7 +281,7 @@ CreateClipShape (pWin)
extents.y1 = 0;
extents.x2 = pWin->drawable.width;
extents.y2 = pWin->drawable.height;
- return REGION_CREATE(pWin->drawable.pScreen, &extents, 1);
+ return RegionCreate(&extents, 1);
}
static int
@@ -360,7 +360,7 @@ ProcShapeRectangles (client)
ctype = VerifyRectOrder(nrects, prects, (int)stuff->ordering);
if (ctype < 0)
return BadMatch;
- srcRgn = RECTS_TO_REGION(pScreen, nrects, prects, ctype);
+ srcRgn = RegionFromRects(nrects, prects, ctype);
if (!pWin->optional)
MakeWindowOptional (pWin);
@@ -455,7 +455,7 @@ ProcShapeMask (client)
if (pPixmap->drawable.pScreen != pScreen ||
pPixmap->drawable.depth != 1)
return BadMatch;
- srcRgn = BITMAP_TO_REGION(pScreen, pPixmap);
+ srcRgn = BitmapToRegion(pScreen, pPixmap);
if (!srcRgn)
return BadAlloc;
}
@@ -581,8 +581,8 @@ ProcShapeCombine (client)
}
if (srcRgn) {
- tmp = REGION_CREATE(pScreen, (BoxPtr) 0, 0);
- REGION_COPY(pScreen, tmp, srcRgn);
+ tmp = RegionCreate((BoxPtr) 0, 0);
+ RegionCopy(tmp, srcRgn);
srcRgn = tmp;
} else
srcRgn = (*createSrc) (pSrcWin);
@@ -673,7 +673,7 @@ ProcShapeOffset (client)
pScreen = pWin->drawable.pScreen;
if (srcRgn)
{
- REGION_TRANSLATE(pScreen, srcRgn, stuff->xOff, stuff->yOff);
+ RegionTranslate(srcRgn, stuff->xOff, stuff->yOff);
(*pScreen->SetShape) (pWin);
}
SendShapeNotify (pWin, (int)stuff->destKind);
@@ -729,7 +729,7 @@ ProcShapeQueryExtents (client)
rep.clipShaped = (wClipShape(pWin) != 0);
if ((region = wBoundingShape(pWin))) {
/* this is done in two steps because of a compiler bug on SunOS 4.1.3 */
- pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region);
+ pExtents = RegionExtents(region);
extents = *pExtents;
} else {
extents.x1 = -wBorderWidth (pWin);
@@ -743,7 +743,7 @@ ProcShapeQueryExtents (client)
rep.heightBoundingShape = extents.y2 - extents.y1;
if ((region = wClipShape(pWin))) {
/* this is done in two steps because of a compiler bug on SunOS 4.1.3 */
- pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region);
+ pExtents = RegionExtents(region);
extents = *pExtents;
} else {
extents.x1 = 0;
@@ -932,7 +932,7 @@ SendShapeNotify (pWin, which)
case ShapeBounding:
region = wBoundingShape(pWin);
if (region) {
- extents = *REGION_EXTENTS(pWin->drawable.pScreen, region);
+ extents = *RegionExtents(region);
shaped = xTrue;
} else {
extents.x1 = -wBorderWidth (pWin);
@@ -945,7 +945,7 @@ SendShapeNotify (pWin, which)
case ShapeClip:
region = wClipShape(pWin);
if (region) {
- extents = *REGION_EXTENTS(pWin->drawable.pScreen, region);
+ extents = *RegionExtents(region);
shaped = xTrue;
} else {
extents.x1 = 0;
@@ -958,7 +958,7 @@ SendShapeNotify (pWin, which)
case ShapeInput:
region = wInputShape(pWin);
if (region) {
- extents = *REGION_EXTENTS(pWin->drawable.pScreen, region);
+ extents = *RegionExtents(region);
shaped = xTrue;
} else {
extents.x1 = -wBorderWidth (pWin);
@@ -1087,8 +1087,8 @@ ProcShapeGetRectangles (client)
}
} else {
BoxPtr box;
- nrects = REGION_NUM_RECTS(region);
- box = REGION_RECTS(region);
+ nrects = RegionNumRects(region);
+ box = RegionRects(region);
rects = (xRectangle *) ALLOCATE_LOCAL (nrects * sizeof (xRectangle));
if (!rects && nrects)
return BadAlloc;
diff --git a/nx-X11/programs/Xserver/Xext/xtest.c b/nx-X11/programs/Xserver/Xext/xtest.c
index 482ad91d4..8a03db5f9 100644
--- a/nx-X11/programs/Xserver/Xext/xtest.c
+++ b/nx-X11/programs/Xserver/Xext/xtest.c
@@ -402,11 +402,11 @@ ProcXTestFakeInput(client)
int i;
int x = ev->u.keyButtonPointer.rootX + panoramiXdataPtr[0].x;
int y = ev->u.keyButtonPointer.rootY + panoramiXdataPtr[0].y;
- if (!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
+ if (!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box)) {
FOR_NSCREENS(i) {
if (i == pScreen->myNum) continue;
- if (POINT_IN_REGION(pScreen,
+ if (RegionContainsPoint(
&XineramaScreenRegions[i],
x, y, &box)) {
root = WindowTable[i];
diff --git a/nx-X11/programs/Xserver/composite/compalloc.c b/nx-X11/programs/Xserver/composite/compalloc.c
index d496ee9ba..f66a90989 100644
--- a/nx-X11/programs/Xserver/composite/compalloc.c
+++ b/nx-X11/programs/Xserver/composite/compalloc.c
@@ -103,7 +103,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update)
if (wasMapped)
UnmapWindow (pWin, FALSE);
- REGION_NULL (pScreen, &cw->borderClip);
+ RegionNull(&cw->borderClip);
cw->update = CompositeRedirectAutomatic;
cw->clients = 0;
cw->oldx = COMP_ORIGIN_INVALID;
@@ -177,7 +177,7 @@ compFreeClientWindow (WindowPtr pWin, XID id)
if (cw->damage)
DamageDestroy (cw->damage);
- REGION_UNINIT (pScreen, &cw->borderClip);
+ RegionUninit(&cw->borderClip);
pWin->devPrivates[CompWindowPrivateIndex].ptr = 0;
xfree (cw);
@@ -503,7 +503,7 @@ compFreePixmap (WindowPtr pWin)
* case correctly. Unmap adds the window borderClip to the
* parent exposed area; regions beyond the parent cause crashes
*/
- REGION_COPY (pScreen, &pWin->borderClip, &cw->borderClip);
+ RegionCopy(&pWin->borderClip, &cw->borderClip);
pRedirectPixmap = (*pScreen->GetWindowPixmap) (pWin);
pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent);
pWin->redirectDraw = FALSE;
diff --git a/nx-X11/programs/Xserver/composite/compext.c b/nx-X11/programs/Xserver/composite/compext.c
index d182da1fd..f57235d46 100644
--- a/nx-X11/programs/Xserver/composite/compext.c
+++ b/nx-X11/programs/Xserver/composite/compext.c
@@ -201,7 +201,7 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client)
pRegion = XFixesRegionCopy (pBorderClip);
if (!pRegion)
return BadAlloc;
- REGION_TRANSLATE (pScreen, pRegion, -pWin->drawable.x, -pWin->drawable.y);
+ RegionTranslate(pRegion, -pWin->drawable.x, -pWin->drawable.y);
if (!AddResource (stuff->region, RegionResType, (void *) pRegion))
return BadAlloc;
diff --git a/nx-X11/programs/Xserver/composite/compwindow.c b/nx-X11/programs/Xserver/composite/compwindow.c
index 2bb581329..fbdc44420 100644
--- a/nx-X11/programs/Xserver/composite/compwindow.c
+++ b/nx-X11/programs/Xserver/composite/compwindow.c
@@ -79,10 +79,10 @@ compRepaintBorder (ClientPtr pClient, void * closure)
{
RegionRec exposed;
- REGION_NULL(pScreen, &exposed);
- REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize);
+ RegionNull(&exposed);
+ RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize);
(*pWindow->drawable.pScreen->PaintWindowBorder)(pWindow, &exposed, PW_BORDER);
- REGION_UNINIT(pScreen, &exposed);
+ RegionUninit(&exposed);
}
return TRUE;
}
@@ -245,7 +245,7 @@ compClipNotify (WindowPtr pWin, int dx, int dy)
if (cw->borderClipX != pWin->drawable.x ||
cw->borderClipY != pWin->drawable.y)
{
- REGION_TRANSLATE (pScreen, &cw->borderClip,
+ RegionTranslate(&cw->borderClip,
pWin->drawable.x - cw->borderClipX,
pWin->drawable.y - cw->borderClipY);
cw->borderClipX = pWin->drawable.x;
@@ -492,14 +492,14 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
- REGION_NULL (pWin->drawable.pScreen, &rgnDst);
+ RegionNull(&rgnDst);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst,
+ RegionIntersect(&rgnDst,
&pWin->borderClip, prgnSrc);
- REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
+ RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
dx = dx + pPixmap->screen_x - cw->oldx;
@@ -507,8 +507,8 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
pGC = GetScratchGC (pPixmap->drawable.depth, pScreen);
if (pGC)
{
- BoxPtr pBox = REGION_RECTS (&rgnDst);
- int nBox = REGION_NUM_RECTS (&rgnDst);
+ BoxPtr pBox = RegionRects (&rgnDst);
+ int nBox = RegionNumRects (&rgnDst);
ValidateGC(&pPixmap->drawable, pGC);
while (nBox--)
@@ -536,16 +536,16 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y)
{
if (dx || dy)
- REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
+ RegionTranslate(prgnSrc, dx, dy);
(*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc);
if (dx || dy)
- REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
}
else
{
ptOldOrg.x -= dx;
ptOldOrg.y -= dy;
- REGION_TRANSLATE (prgnSrc, prgnSrc,
+ RegionTranslate(prgnSrc,
pWin->drawable.x - ptOldOrg.x,
pWin->drawable.y - ptOldOrg.y);
DamageDamageRegion (&pWin->drawable, prgnSrc);
@@ -613,26 +613,26 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion)
CompWindowPtr cw = GetCompWindow (pWin);
RegionRec damage;
- REGION_NULL (pScreen, &damage);
+ RegionNull(&damage);
/*
* Align old border clip with new border clip
*/
- REGION_TRANSLATE (pScreen, &cw->borderClip,
+ RegionTranslate(&cw->borderClip,
pWin->drawable.x - cw->borderClipX,
pWin->drawable.y - cw->borderClipY);
/*
* Compute newly visible portion of window for repaint
*/
- REGION_SUBTRACT (pScreen, &damage, pRegion, &cw->borderClip);
+ RegionSubtract(&damage, pRegion, &cw->borderClip);
/*
* Report that as damaged so it will be redrawn
*/
DamageDamageRegion (&pWin->drawable, &damage);
- REGION_UNINIT (pScreen, &damage);
+ RegionUninit(&damage);
/*
* Save the new border clip region
*/
- REGION_COPY (pScreen, &cw->borderClip, pRegion);
+ RegionCopy(&cw->borderClip, pRegion);
cw->borderClipX = pWin->drawable.x;
cw->borderClipY = pWin->drawable.y;
}
@@ -694,18 +694,18 @@ compWindowUpdateAutomatic (WindowPtr pWin)
/*
* First move the region from window to screen coordinates
*/
- REGION_TRANSLATE (pScreen, pRegion,
+ RegionTranslate(pRegion,
pWin->drawable.x, pWin->drawable.y);
/*
* Clip against the "real" border clip
*/
- REGION_INTERSECT (pScreen, pRegion, pRegion, &cw->borderClip);
+ RegionIntersect(pRegion, pRegion, &cw->borderClip);
/*
* Now translate from screen to dest coordinates
*/
- REGION_TRANSLATE (pScreen, pRegion,
+ RegionTranslate(pRegion,
-pParent->drawable.x, -pParent->drawable.y);
/*
diff --git a/nx-X11/programs/Xserver/damageext/damageext.c b/nx-X11/programs/Xserver/damageext/damageext.c
index 33cbb5f7b..8d03dfed5 100755
--- a/nx-X11/programs/Xserver/damageext/damageext.c
+++ b/nx-X11/programs/Xserver/damageext/damageext.c
@@ -99,10 +99,10 @@ DamageExtReport (DamagePtr pDamage, RegionPtr pRegion, void *closure)
switch (pDamageExt->level) {
case DamageReportRawRegion:
case DamageReportDeltaRegion:
- DamageExtNotify (pDamageExt, REGION_RECTS(pRegion), REGION_NUM_RECTS(pRegion));
+ DamageExtNotify (pDamageExt, RegionRects(pRegion), RegionNumRects(pRegion));
break;
case DamageReportBoundingBox:
- DamageExtNotify (pDamageExt, REGION_EXTENTS(prScreen, pRegion), 1);
+ DamageExtNotify (pDamageExt, RegionExtents(pRegion), 1);
break;
case DamageReportNonEmpty:
DamageExtNotify (pDamageExt, NullBox, 0);
@@ -261,14 +261,14 @@ ProcDamageSubtract (ClientPtr client)
if (pRepair)
{
if (pParts)
- REGION_INTERSECT (prScreen, pParts, DamageRegion (pDamage), pRepair);
+ RegionIntersect(pParts, DamageRegion (pDamage), pRepair);
if (DamageSubtract (pDamage, pRepair))
DamageExtReport (pDamage, DamageRegion (pDamage), (void *) pDamageExt);
}
else
{
if (pParts)
- REGION_COPY (prScreen, pParts, DamageRegion (pDamage));
+ RegionCopy(pParts, DamageRegion (pDamage));
DamageEmpty (pDamage);
}
}
diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c
index b6010e627..009e1ac08 100644
--- a/nx-X11/programs/Xserver/dix/dispatch.c
+++ b/nx-X11/programs/Xserver/dix/dispatch.c
@@ -1266,11 +1266,11 @@ ProcTranslateCoords(register ClientPtr client)
* borderSize
*/
&& (!wBoundingShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
&pWin->borderSize, x, y, &box))
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
@@ -1758,7 +1758,7 @@ ProcCopyArea(register ClientPtr client)
(*pDst->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
if (pRgn)
- REGION_DESTROY(pDst->pScreen, pRgn);
+ RegionDestroy(pRgn);
}
return(client->noClientException);
@@ -1806,7 +1806,7 @@ ProcCopyPlane(register ClientPtr client)
(*pdstDraw->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
if (pRgn)
- REGION_DESTROY(pdstDraw->pScreen, pRgn);
+ RegionDestroy(pRgn);
}
return(client->noClientException);
}
@@ -2228,7 +2228,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
if (pVisibleRegion)
{
- REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y);
+ RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
}
}
#endif
@@ -2322,7 +2322,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
}
#ifdef XCSECURITY
if (pVisibleRegion)
- REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
+ RegionDestroy(pVisibleRegion);
#endif
if (!im_return)
DEALLOCATE_LOCAL(pBuf);
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index 1166bf84b..3163270f4 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -346,14 +346,14 @@ XineramaSetCursorPosition(
x += panoramiXdataPtr[0].x;
y += panoramiXdataPtr[0].y;
- if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
+ if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box))
{
FOR_NSCREENS(i)
{
if(i == pScreen->myNum)
continue;
- if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box))
+ if(RegionContainsPoint(&XineramaScreenRegions[i], x, y, &box))
{
pScreen = screenInfo.screens[i];
break;
@@ -483,7 +483,7 @@ XineramaCheckVirtualMotion(
i = PanoramiXNumScreens - 1;
- REGION_COPY(sprite.screen, &sprite.Reg2,
+ RegionCopy(&sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
@@ -493,16 +493,16 @@ XineramaCheckVirtualMotion(
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
- REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
+ RegionTranslate(&sprite.Reg2, x, y);
- REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
+ RegionUnion(&sprite.Reg2, &sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
- lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
+ lims = *RegionExtents(&sprite.Reg2);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
@@ -525,7 +525,7 @@ XineramaCheckVirtualMotion(
#endif
sprite.hot.y = lims.y2 - 1;
- if (REGION_NUM_RECTS(&sprite.Reg2) > 1)
+ if (RegionNumRects(&sprite.Reg2) > 1)
ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y);
if (qe)
@@ -632,7 +632,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
i = PanoramiXNumScreens - 1;
- REGION_COPY(sprite.screen, &sprite.Reg1,
+ RegionCopy(&sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
@@ -642,18 +642,18 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
- REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
+ RegionTranslate(&sprite.Reg1, x, y);
- REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
+ RegionUnion(&sprite.Reg1, &sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
- sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
+ sprite.hotLimits = *RegionExtents(&sprite.Reg1);
- if(REGION_NUM_RECTS(&sprite.Reg1) > 1)
+ if(RegionNumRects(&sprite.Reg1) > 1)
sprite.hotShape = &sprite.Reg1;
else
sprite.hotShape = NullRegion;
@@ -732,9 +732,9 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
int x = *px, y = *py;
int incx = 1, incy = 1;
- if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box))
+ if (RegionContainsPoint(shape, x, y, &box))
return;
- box = *REGION_EXTENTS(sprite.hot.pScreen, shape);
+ box = *RegionExtents(shape);
/* this is rather crude */
do {
x += incx;
@@ -756,7 +756,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
else if (y < box.y1)
return; /* should never get here! */
}
- } while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box));
+ } while (!RegionContainsPoint(shape, x, y, &box));
*px = x;
*py = y;
}
@@ -844,7 +844,7 @@ CheckVirtualMotion(
#endif
sprite.hot.x = sprite.hot.y = 0;
}
- lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize);
+ lims = *RegionExtents(&pWin->borderSize);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
xeviehot.x =
@@ -898,7 +898,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
}
else
{
- sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
+ sprite.hotLimits = *RegionExtents(&pWin->borderSize);
#ifdef SHAPE
sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize
: NullRegion;
@@ -1972,7 +1972,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
{
BoxRec box;
- if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box))
+ if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
return TRUE;
#ifdef PANORAMIX
@@ -1980,7 +1980,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
- if(POINT_IN_REGION(sprite.screen,
+ if(RegionContainsPoint(
&sprite.windows[i]->borderSize,
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
@@ -2016,7 +2016,7 @@ XYToWindow(int x, int y)
*/
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
@@ -2156,10 +2156,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
sprite.hotLimits.x2 -= xoff;
sprite.hotLimits.y2 -= yoff;
- if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1))
- REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff);
- if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2))
- REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff);
+ if (RegionNotEmpty(&sprite.Reg1))
+ RegionTranslate(&sprite.Reg1, xoff, yoff);
+ if (RegionNotEmpty(&sprite.Reg2))
+ RegionTranslate(&sprite.Reg2, xoff, yoff);
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
if ((grab = inputInfo.pointer->grab) && grab->confineTo) {
@@ -2211,8 +2211,8 @@ DefineInitialRootWindow(register WindowPtr win)
#endif
sprite.screen = pScreen;
/* gotta UNINIT these someplace */
- REGION_NULL(pScreen, &sprite.Reg1);
- REGION_NULL(pScreen, &sprite.Reg2);
+ RegionNull(&sprite.Reg1);
+ RegionNull(&sprite.Reg2);
}
#endif
}
@@ -2278,7 +2278,7 @@ XineramaPointInWindowIsVisible(
if (!pWin->realized) return FALSE;
- if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
+ if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
return TRUE;
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
@@ -2292,9 +2292,9 @@ XineramaPointInWindowIsVisible(
x = xoff - panoramiXdataPtr[i].x;
y = yoff - panoramiXdataPtr[i].y;
- if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
+ if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
@@ -2470,7 +2470,7 @@ ProcWarpPointer(ClientPtr client)
static Bool
BorderSizeNotEmpty(WindowPtr pWin)
{
- if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
+ if(RegionNotEmpty(&pWin->borderSize))
return TRUE;
#ifdef PANORAMIX
@@ -2478,7 +2478,7 @@ BorderSizeNotEmpty(WindowPtr pWin)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
- if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
+ if(RegionNotEmpty(&sprite.windows[i]->borderSize))
return TRUE;
}
}
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index 5854f2e95..ce94dc8a5 100644
--- a/nx-X11/programs/Xserver/dix/window.c
+++ b/nx-X11/programs/Xserver/dix/window.c
@@ -439,10 +439,10 @@ CreateRootWindow(ScreenPtr pScreen)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT(pScreen, &pWin->clipList, &box, 1);
- REGION_INIT(pScreen, &pWin->winSize, &box, 1);
- REGION_INIT(pScreen, &pWin->borderSize, &box, 1);
- REGION_INIT(pScreen, &pWin->borderClip, &box, 1);
+ RegionInit(&pWin->clipList, &box, 1);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
+ RegionInit(&pWin->borderClip, &box, 1);
pWin->drawable.class = InputOutput;
pWin->optional->visual = pScreen->rootVisual;
@@ -515,7 +515,7 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
ScreenPtr pScreen = pWin->drawable.pScreen;
BoxRec box;
- box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
+ box = *(RegionExtents(&pWin->winSize));
/* we do these calculations to avoid overflows */
if (x > box.x1)
box.x1 = x;
@@ -531,8 +531,8 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
- REGION_RESET(pScreen, Rgn, &box);
- REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize);
+ RegionReset(Rgn, &box);
+ RegionIntersect(Rgn, Rgn, &pWin->winSize);
}
WindowPtr
@@ -713,10 +713,10 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
pWin->drawable.y = pParent->drawable.y + y + (int)bw;
/* set up clip list correctly for unobscured WindowPtr */
- REGION_NULL(pScreen, &pWin->clipList);
- REGION_NULL(pScreen, &pWin->borderClip);
- REGION_NULL(pScreen, &pWin->winSize);
- REGION_NULL(pScreen, &pWin->borderSize);
+ RegionNull(&pWin->clipList);
+ RegionNull(&pWin->borderClip);
+ RegionNull(&pWin->winSize);
+ RegionNull(&pWin->borderSize);
pHead = RealChildHead(pParent);
if (pHead)
@@ -797,17 +797,17 @@ FreeWindowResources(register WindowPtr pWin)
DeleteWindowFromAnySaveSet(pWin);
DeleteWindowFromAnySelections(pWin);
DeleteWindowFromAnyEvents(pWin, TRUE);
- REGION_UNINIT(pScreen, &pWin->clipList);
- REGION_UNINIT(pScreen, &pWin->winSize);
- REGION_UNINIT(pScreen, &pWin->borderClip);
- REGION_UNINIT(pScreen, &pWin->borderSize);
+ RegionUninit(&pWin->clipList);
+ RegionUninit(&pWin->winSize);
+ RegionUninit(&pWin->borderClip);
+ RegionUninit(&pWin->borderSize);
#ifdef SHAPE
if (wBoundingShape (pWin))
- REGION_DESTROY(pScreen, wBoundingShape (pWin));
+ RegionDestroy(wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_DESTROY(pScreen, wClipShape (pWin));
+ RegionDestroy(wClipShape (pWin));
if (wInputShape (pWin))
- REGION_DESTROY(pScreen, wInputShape (pWin));
+ RegionDestroy(wInputShape (pWin));
#endif
if (pWin->borderIsPixel == FALSE)
(*pScreen->DestroyPixmap)(pWin->border.pixmap);
@@ -1467,10 +1467,10 @@ PatchUp:
{
RegionRec exposed;
- REGION_NULL(pScreen, &exposed);
- REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize);
+ RegionNull(&exposed);
+ RegionSubtract(&exposed, &pWin->borderClip, &pWin->winSize);
(*pWin->drawable.pScreen->PaintWindowBorder)(pWin, &exposed, PW_BORDER);
- REGION_UNINIT(pScreen, &exposed);
+ RegionUninit(&exposed);
}
return error;
}
@@ -1611,18 +1611,18 @@ CreateUnclippedWinSize (register WindowPtr pWin)
box.y1 = pWin->drawable.y;
box.x2 = pWin->drawable.x + (int) pWin->drawable.width;
box.y2 = pWin->drawable.y + (int) pWin->drawable.height;
- pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
+ pRgn = RegionCreate(&box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
- REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
+ RegionTranslate(pRgn, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
- REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin));
+ RegionIntersect(pRgn, pRgn, wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin));
- REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y);
+ RegionIntersect(pRgn, pRgn, wClipShape (pWin));
+ RegionTranslate(pRgn, pWin->drawable.x, pWin->drawable.y);
}
#endif
return pRgn;
@@ -1640,7 +1640,7 @@ SetWinSize (register WindowPtr pWin)
box.y1 = pWin->drawable.y;
box.x2 = pWin->drawable.x + pWin->drawable.width;
box.y2 = pWin->drawable.y + pWin->drawable.height;
- REGION_RESET (pScreen, &pWin->winSize, &box);
+ RegionReset(&pWin->winSize, &box);
}
else
#endif
@@ -1652,15 +1652,15 @@ SetWinSize (register WindowPtr pWin)
if (wBoundingShape (pWin) || wClipShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
- REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
+ RegionTranslate(&pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
- REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize,
+ RegionIntersect(&pWin->winSize, &pWin->winSize,
wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize,
+ RegionIntersect(&pWin->winSize, &pWin->winSize,
wClipShape (pWin));
- REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x,
+ RegionTranslate(&pWin->winSize, pWin->drawable.x,
pWin->drawable.y);
}
#endif
@@ -1682,7 +1682,7 @@ SetBorderSize (register WindowPtr pWin)
box.y1 = pWin->drawable.y - bw;
box.x2 = pWin->drawable.x + pWin->drawable.width + bw;
box.y2 = pWin->drawable.y + pWin->drawable.height + bw;
- REGION_RESET (pScreen, &pWin->borderSize, &box);
+ RegionReset(&pWin->borderSize, &box);
}
else
#endif
@@ -1694,18 +1694,18 @@ SetBorderSize (register WindowPtr pWin)
if (wBoundingShape (pWin)) {
ScreenPtr pScreen = pWin->drawable.pScreen;
- REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
+ RegionTranslate(&pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
- REGION_INTERSECT(pScreen, &pWin->borderSize, &pWin->borderSize,
+ RegionIntersect(&pWin->borderSize, &pWin->borderSize,
wBoundingShape (pWin));
- REGION_TRANSLATE(pScreen, &pWin->borderSize, pWin->drawable.x,
+ RegionTranslate(&pWin->borderSize, pWin->drawable.x,
pWin->drawable.y);
- REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize,
+ RegionUnion(&pWin->borderSize, &pWin->borderSize,
&pWin->winSize);
}
#endif
} else {
- REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize,
+ RegionCopy(&pWin->borderSize,
&pWin->winSize);
}
}
@@ -1905,12 +1905,12 @@ MakeBoundingRegion (
RegionPtr pRgn;
ScreenPtr pScreen = pWin->drawable.pScreen;
- pRgn = REGION_CREATE(pScreen, pBox, 1);
+ pRgn = RegionCreate(pBox, 1);
if (wBoundingShape (pWin)) {
- REGION_TRANSLATE(pScreen, pRgn, -pWin->origin.x,
+ RegionTranslate(pRgn, -pWin->origin.x,
-pWin->origin.y);
- REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin));
- REGION_TRANSLATE(pScreen, pRgn, pWin->origin.x,
+ RegionIntersect(pRgn, pRgn, wBoundingShape (pWin));
+ RegionTranslate(pRgn, pWin->origin.x,
pWin->origin.y);
}
return pRgn;
@@ -1932,10 +1932,10 @@ ShapeOverlap (
pScreen = pWin->drawable.pScreen;
pWinRgn = MakeBoundingRegion (pWin, pWinBox);
pSibRgn = MakeBoundingRegion (pSib, pSibBox);
- REGION_INTERSECT(pScreen, pWinRgn, pWinRgn, pSibRgn);
- ret = REGION_NOTEMPTY(pScreen, pWinRgn);
- REGION_DESTROY(pScreen, pWinRgn);
- REGION_DESTROY(pScreen, pSibRgn);
+ RegionIntersect(pWinRgn, pWinRgn, pSibRgn);
+ ret = RegionNotEmpty(pWinRgn);
+ RegionDestroy(pWinRgn);
+ RegionDestroy(pSibRgn);
return ret;
}
#endif
@@ -2066,7 +2066,7 @@ WhereDoIGoInTheStack(
else if (pSib)
{
if ((IsSiblingAboveMe(pWin, pSib) == Above) &&
- (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT))
+ (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT))
return(pFirst);
else
return(pWin->nextSib);
@@ -2081,7 +2081,7 @@ WhereDoIGoInTheStack(
else if (pSib)
{
if ((IsSiblingAboveMe(pWin, pSib) == Below) &&
- (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT))
+ (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT))
return NullWindow;
else
return(pWin->nextSib);
@@ -2095,7 +2095,7 @@ WhereDoIGoInTheStack(
return(pWin->nextSib);
else if (pSib)
{
- if (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)
+ if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)
{
if (IsSiblingAboveMe(pWin, pSib) == Above)
return(pFirst);
@@ -2785,10 +2785,10 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
(*pScreen->ClipNotify) (pWin, 0, 0);
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(NullWindow, pWin, VTMap);
- REGION_NULL(pScreen, &temp);
- REGION_COPY(pScreen, &temp, &pWin->clipList);
+ RegionNull(&temp);
+ RegionCopy(&temp, &pWin->clipList);
(*pScreen->WindowExposures) (pWin, &temp, NullRegion);
- REGION_UNINIT(pScreen, &temp);
+ RegionUninit(&temp);
}
return(Success);
@@ -3184,7 +3184,7 @@ VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
{
if (!pWin->realized)
return (FALSE);
- if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box))
+ if (RegionContainsPoint(&pWin->clipList, x, y, box))
return(TRUE);
return(FALSE);
}
@@ -3200,10 +3200,10 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
if (!pWin->realized)
return (FALSE);
- if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderClip,
+ if (RegionContainsPoint(&pWin->borderClip,
x, y, &box)
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
@@ -3219,12 +3219,12 @@ NotClippedByChildren(register WindowPtr pWin)
RegionPtr pReg;
pScreen = pWin->drawable.pScreen;
- pReg = REGION_CREATE(pScreen, NullBox, 1);
+ pReg = RegionCreate(NullBox, 1);
if (pWin->parent ||
screenIsSaved != SCREEN_SAVER_ON ||
!HasSaverWindow (pWin->drawable.pScreen->myNum))
{
- REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize);
+ RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize);
}
return(pReg);
}
diff --git a/nx-X11/programs/Xserver/fb/fb.h b/nx-X11/programs/Xserver/fb/fb.h
index b64f3a227..1da5d2470 100644
--- a/nx-X11/programs/Xserver/fb/fb.h
+++ b/nx-X11/programs/Xserver/fb/fb.h
@@ -703,7 +703,7 @@ typedef struct {
*/
#define fbWindowEnabled(pWin) \
- REGION_NOTEMPTY((pWin)->drawable.pScreen, \
+ RegionNotEmpty(\
&WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
#define fbDrawableEnabled(pDrawable) \
diff --git a/nx-X11/programs/Xserver/fb/fb24_32.c b/nx-X11/programs/Xserver/fb/fb24_32.c
index 68e0ef84d..350055c14 100644
--- a/nx-X11/programs/Xserver/fb/fb24_32.c
+++ b/nx-X11/programs/Xserver/fb/fb24_32.c
@@ -338,8 +338,8 @@ fb24_32SetSpans (DrawablePtr pDrawable,
{
d = dst + (ppt->y + dstYoff) * dstStride;
s = (CARD8 *) src;
- n = REGION_NUM_RECTS(pClip);
- pbox = REGION_RECTS (pClip);
+ n = RegionNumRects(pClip);
+ pbox = RegionRects (pClip);
while (n--)
{
if (pbox->y1 > ppt->y)
@@ -400,8 +400,8 @@ fb24_32PutZImage (DrawablePtr pDrawable,
dstStride *= sizeof(FbBits);
dst = (CARD8 *) dstBits;
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/nx-X11/programs/Xserver/fb/fbarc.c b/nx-X11/programs/Xserver/fb/fbarc.c
index 315aa181c..0b386f70e 100644
--- a/nx-X11/programs/Xserver/fb/fbarc.c
+++ b/nx-X11/programs/Xserver/fb/fbarc.c
@@ -101,7 +101,7 @@ fbPolyArc (DrawablePtr pDrawable,
y2 = box.y1 + (int)parcs->height + 1;
box.y2 = y2;
if ( (x2 <= MAXSHORT) && (y2 <= MAXSHORT) &&
- (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) )
+ (RegionContainsRect(cclip, &box) == rgnIN) )
(*arc) (dst, dstStride, dstBpp,
parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff,
pPriv->and, pPriv->xor);
diff --git a/nx-X11/programs/Xserver/fb/fbbits.h b/nx-X11/programs/Xserver/fb/fbbits.h
index 7dfff58b4..5cd7ae70f 100644
--- a/nx-X11/programs/Xserver/fb/fbbits.h
+++ b/nx-X11/programs/Xserver/fb/fbbits.h
@@ -668,7 +668,7 @@ POLYLINE (DrawablePtr pDrawable,
int xoff = pDrawable->x;
int yoff = pDrawable->y;
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
- BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC));
+ BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
int dstStride;
@@ -800,7 +800,7 @@ POLYSEGMENT (DrawablePtr pDrawable,
int xoff = pDrawable->x;
int yoff = pDrawable->y;
unsigned int bias = miGetZeroLineBias(pDrawable->pScreen);
- BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC));
+ BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC));
FbBits *dst;
int dstStride;
diff --git a/nx-X11/programs/Xserver/fb/fbbstore.c b/nx-X11/programs/Xserver/fb/fbbstore.c
index 01ec9b7e0..e9eedde5b 100644
--- a/nx-X11/programs/Xserver/fb/fbbstore.c
+++ b/nx-X11/programs/Xserver/fb/fbbstore.c
@@ -39,8 +39,8 @@ fbSaveAreas(PixmapPtr pPixmap,
fbCopyWindowProc (&pWin->drawable,
&pPixmap->drawable,
0,
- REGION_RECTS(prgnSave),
- REGION_NUM_RECTS(prgnSave),
+ RegionRects(prgnSave),
+ RegionNumRects(prgnSave),
xorg, yorg,
FALSE,
FALSE,
@@ -57,8 +57,8 @@ fbRestoreAreas(PixmapPtr pPixmap,
fbCopyWindowProc (&pPixmap->drawable,
&pWin->drawable,
0,
- REGION_RECTS(prgnRestore),
- REGION_NUM_RECTS(prgnRestore),
+ RegionRects(prgnRestore),
+ RegionNumRects(prgnRestore),
-xorg, -yorg,
FALSE,
FALSE,
diff --git a/nx-X11/programs/Xserver/fb/fbcompose.c b/nx-X11/programs/Xserver/fb/fbcompose.c
index f8169995f..07ae9490f 100644
--- a/nx-X11/programs/Xserver/fb/fbcompose.c
+++ b/nx-X11/programs/Xserver/fb/fbcompose.c
@@ -2896,7 +2896,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
if (pict->filter == PictFilterNearest)
{
if (pict->repeatType == RepeatNormal) {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -2927,7 +2927,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = MOD(v.vector[1]>>16, pict->pDrawable->height);
x = MOD(v.vector[0]>>16, pict->pDrawable->width);
}
- if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
+ if (RegionContainsPoint(pict->pCompositeClip, x, y, &box))
buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
else
buffer[i] = 0;
@@ -2938,7 +2938,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
}
} else {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -2970,7 +2970,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
y = v.vector[1]>>16;
x = v.vector[0]>>16;
}
- if (POINT_IN_REGION (0, pict->pCompositeClip, x, y, &box))
+ if (RegionContainsPoint(pict->pCompositeClip, x, y, &box))
buffer[i] = fetch(bits + (y + pict->pDrawable->y)*stride, x + pict->pDrawable->x, indexed);
else
buffer[i] = 0;
@@ -2983,7 +2983,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
} else if (pict->filter == PictFilterBilinear) {
if (pict->repeatType == RepeatNormal) {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -3082,14 +3082,14 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
b = bits + (y1 + pict->pDrawable->y)*stride;
- tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
+ tl = RegionContainsPoint(pict->pCompositeClip, x1, y1, &box)
? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
- tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
+ tr = RegionContainsPoint(pict->pCompositeClip, x2, y1, &box)
? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
b = bits + (y2 + pict->pDrawable->y)*stride;
- bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
+ bl = RegionContainsPoint(pict->pCompositeClip, x1, y2, &box)
? fetch(b, x1 + pict->pDrawable->x, indexed) : 0;
- br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
+ br = RegionContainsPoint(pict->pCompositeClip, x2, y2, &box)
? fetch(b, x2 + pict->pDrawable->x, indexed) : 0;
ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
@@ -3112,7 +3112,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
}
}
} else {
- if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) {
+ if (RegionNumRects(pict->pCompositeClip) == 1) {
box = pict->pCompositeClip->extents;
for (i = 0; i < width; ++i) {
if (!v.vector[2]) {
@@ -3209,14 +3209,14 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
b = bits + (y1 + pict->pDrawable->y)*stride;
x_off = x1 + pict->pDrawable->x;
- tl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y1, &box)
+ tl = RegionContainsPoint(pict->pCompositeClip, x1, y1, &box)
? fetch(b, x_off, indexed) : 0;
- tr = POINT_IN_REGION(0, pict->pCompositeClip, x2, y1, &box)
+ tr = RegionContainsPoint(pict->pCompositeClip, x2, y1, &box)
? fetch(b, x_off + 1, indexed) : 0;
b += stride;
- bl = POINT_IN_REGION(0, pict->pCompositeClip, x1, y2, &box)
+ bl = RegionContainsPoint(pict->pCompositeClip, x1, y2, &box)
? fetch(b, x_off, indexed) : 0;
- br = POINT_IN_REGION(0, pict->pCompositeClip, x2, y2, &box)
+ br = RegionContainsPoint(pict->pCompositeClip, x2, y2, &box)
? fetch(b, x_off + 1, indexed) : 0;
ft = FbGet8(tl,0) * idistx + FbGet8(tr,0) * distx;
@@ -3274,7 +3274,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
for (x = x1; x < x2; x++) {
if (*p) {
int tx = (pict->repeatType == RepeatNormal) ? MOD (x, pict->pDrawable->width) : x;
- if (POINT_IN_REGION (0, pict->pCompositeClip, tx, ty, &box)) {
+ if (RegionContainsPoint(pict->pCompositeClip, tx, ty, &box)) {
FbBits *b = bits + (ty + pict->pDrawable->y)*stride;
CARD32 c = fetch(b, tx + pict->pDrawable->x, indexed);
@@ -3563,8 +3563,8 @@ fbCompositeGeneral (CARD8 op,
if (width > SCANLINE_BUFFER_LENGTH)
scanline_buffer = (CARD32 *) malloc(width * 3 * sizeof(CARD32));
- n = REGION_NUM_RECTS (&region);
- pbox = REGION_RECTS (&region);
+ n = RegionNumRects (&region);
+ pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
@@ -3618,7 +3618,7 @@ fbCompositeGeneral (CARD8 op,
}
pbox++;
}
- REGION_UNINIT (pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
if (scanline_buffer != _scanline_buffer)
free(scanline_buffer);
diff --git a/nx-X11/programs/Xserver/fb/fbcopy.c b/nx-X11/programs/Xserver/fb/fbcopy.c
index 1e7b93435..f68811ebb 100644
--- a/nx-X11/programs/Xserver/fb/fbcopy.c
+++ b/nx-X11/programs/Xserver/fb/fbcopy.c
@@ -306,8 +306,8 @@ fbCopyRegion (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.
@@ -466,7 +466,7 @@ fbDoCopy (DrawablePtr pSrcDrawable,
* VT is inactive, make sure the region isn't empty
*/
if (!((WindowPtr) pSrcDrawable)->parent &&
- REGION_NOTEMPTY (pSrcDrawable->pScreen,
+ RegionNotEmpty(
&((WindowPtr) pSrcDrawable)->borderClip))
{
/*
@@ -548,9 +548,9 @@ fbDoCopy (DrawablePtr pSrcDrawable,
blown region and call intersect */
cclip = fbGetCompositeClip(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;
@@ -563,7 +563,7 @@ fbDoCopy (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
{
@@ -572,25 +572,25 @@ fbDoCopy (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,
fbGetCompositeClip(pGC));
}
/* Do bit blitting */
- numRects = REGION_NUM_RECTS(&rgnDst);
+ numRects = RegionNumRects(&rgnDst);
if (numRects && widthSrc && heightSrc)
fbCopyRegion (pSrcDrawable, pDstDrawable, pGC,
&rgnDst, dx, dy, copyProc, bitPlane, closure);
@@ -604,9 +604,9 @@ fbDoCopy (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);
fbValidateDrawable (pDstDrawable);
return prgnExposed;
}
diff --git a/nx-X11/programs/Xserver/fb/fbfill.c b/nx-X11/programs/Xserver/fb/fbfill.c
index c61ff3b4c..be6723c01 100644
--- a/nx-X11/programs/Xserver/fb/fbfill.c
+++ b/nx-X11/programs/Xserver/fb/fbfill.c
@@ -184,7 +184,7 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
- for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/nx-X11/programs/Xserver/fb/fbfillrect.c b/nx-X11/programs/Xserver/fb/fbfillrect.c
index 2a60da165..37a7b20f7 100644
--- a/nx-X11/programs/Xserver/fb/fbfillrect.c
+++ b/nx-X11/programs/Xserver/fb/fbfillrect.c
@@ -47,7 +47,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
xorg = pDrawable->x;
yorg = pDrawable->y;
- pextent = REGION_EXTENTS(pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
@@ -74,7 +74,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
if ((fullX1 >= fullX2) || (fullY1 >= fullY2))
continue;
- n = REGION_NUM_RECTS (pClip);
+ n = RegionNumRects (pClip);
if (n == 1)
{
fbFill (pDrawable,
@@ -83,7 +83,7 @@ fbPolyFillRect(DrawablePtr pDrawable,
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
/*
* clip the rectangle to each box in the clip region
* this is logically equivalent to calling Intersect()
diff --git a/nx-X11/programs/Xserver/fb/fbfillsp.c b/nx-X11/programs/Xserver/fb/fbfillsp.c
index e2bb71e3a..5d465482f 100644
--- a/nx-X11/programs/Xserver/fb/fbfillsp.c
+++ b/nx-X11/programs/Xserver/fb/fbfillsp.c
@@ -44,7 +44,7 @@ fbFillSpans (DrawablePtr pDrawable,
int fullX1, fullX2, fullY1;
int partX1, partX2;
- pextent = REGION_EXTENTS(pGC->pScreen, pClip);
+ pextent = RegionExtents(pClip);
extentX1 = pextent->x1;
extentY1 = pextent->y1;
extentX2 = pextent->x2;
@@ -69,7 +69,7 @@ fbFillSpans (DrawablePtr pDrawable,
if (fullX1 >= fullX2)
continue;
- nbox = REGION_NUM_RECTS (pClip);
+ nbox = RegionNumRects (pClip);
if (nbox == 1)
{
fbFill (pDrawable,
@@ -78,7 +78,7 @@ fbFillSpans (DrawablePtr pDrawable,
}
else
{
- pbox = REGION_RECTS(pClip);
+ pbox = RegionRects(pClip);
while(nbox--)
{
if (pbox->y1 <= fullY1 && fullY1 < pbox->y2)
diff --git a/nx-X11/programs/Xserver/fb/fbgc.c b/nx-X11/programs/Xserver/fb/fbgc.c
index fdd7a319c..a980023ef 100644
--- a/nx-X11/programs/Xserver/fb/fbgc.c
+++ b/nx-X11/programs/Xserver/fb/fbgc.c
@@ -211,7 +211,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
)
{
miComputeCompositeClip (pGC, pDrawable);
- pPriv->oneRect = REGION_NUM_RECTS(fbGetCompositeClip(pGC)) == 1;
+ pPriv->oneRect = RegionNumRects(fbGetCompositeClip(pGC)) == 1;
}
#ifdef FB_24_32BIT
diff --git a/nx-X11/programs/Xserver/fb/fbglyph.c b/nx-X11/programs/Xserver/fb/fbglyph.c
index bb0dda669..3c0913cf8 100644
--- a/nx-X11/programs/Xserver/fb/fbglyph.c
+++ b/nx-X11/programs/Xserver/fb/fbglyph.c
@@ -41,7 +41,7 @@ fbGlyphIn (RegionPtr pRegion,
int height)
{
BoxRec box;
- BoxPtr pExtents = REGION_EXTENTS (dummyScreen, pRegion);
+ BoxPtr pExtents = RegionExtents(pRegion);
/*
* Check extents by hand to avoid 16 bit overflows
@@ -58,7 +58,7 @@ fbGlyphIn (RegionPtr pRegion,
box.x2 = x + width;
box.y1 = y;
box.y2 = y + height;
- return RECT_IN_REGION (dummyScreen, pRegion, &box) == rgnIN;
+ return RegionContainsRect(pRegion, &box) == rgnIN;
}
#ifdef FB_24BIT
diff --git a/nx-X11/programs/Xserver/fb/fbimage.c b/nx-X11/programs/Xserver/fb/fbimage.c
index 96bd8cf95..06b501b41 100644
--- a/nx-X11/programs/Xserver/fb/fbimage.c
+++ b/nx-X11/programs/Xserver/fb/fbimage.c
@@ -140,8 +140,8 @@ fbPutZImage (DrawablePtr pDrawable,
fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
@@ -228,8 +228,8 @@ fbPutXYImage (DrawablePtr pDrawable,
}
}
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/nx-X11/programs/Xserver/fb/fbline.c b/nx-X11/programs/Xserver/fb/fbline.c
index 8e99dd99f..0a9954998 100644
--- a/nx-X11/programs/Xserver/fb/fbline.c
+++ b/nx-X11/programs/Xserver/fb/fbline.c
@@ -119,7 +119,7 @@ fbPolyLine (DrawablePtr pDrawable,
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid &&
- REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
+ RegionNumRects (fbGetCompositeClip(pGC)) == 1)
{
switch (pDrawable->bitsPerPixel) {
case 8: line = fbPolyline8; break;
@@ -156,7 +156,7 @@ fbPolySegment (DrawablePtr pDrawable,
#ifndef FBNOPIXADDR
if (pGC->fillStyle == FillSolid &&
pGC->lineStyle == LineSolid &&
- REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1)
+ RegionNumRects (fbGetCompositeClip(pGC)) == 1)
{
switch (pDrawable->bitsPerPixel) {
case 8: seg = fbPolySegment8; break;
diff --git a/nx-X11/programs/Xserver/fb/fboverlay.c b/nx-X11/programs/Xserver/fb/fboverlay.c
index 81c54316f..49623ba4f 100644
--- a/nx-X11/programs/Xserver/fb/fboverlay.c
+++ b/nx-X11/programs/Xserver/fb/fboverlay.c
@@ -74,7 +74,7 @@ fbOverlayCreateWindow(WindowPtr pWin)
*/
if (!pWin->parent)
{
- REGION_EMPTY (pWin->drawable.pScreen,
+ RegionEmpty(
&pScrPriv->layer[i].u.run.region);
}
return TRUE;
@@ -92,7 +92,7 @@ fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen)
for (i = 0; i < pScrPriv->nlayers; i++)
{
(*pScreen->DestroyPixmap)(pScrPriv->layer[i].u.run.pixmap);
- REGION_UNINIT (pScreen, &pScrPriv->layer[i].u.run.region);
+ RegionUninit(&pScrPriv->layer[i].u.run.region);
}
return TRUE;
}
@@ -146,7 +146,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen)
pbits))
return FALSE;
pScrPriv->layer[i].u.run.pixmap = pPixmap;
- REGION_INIT(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0);
+ RegionInit(&pScrPriv->layer[i].u.run.region, &box, 0);
}
pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap;
return TRUE;
@@ -174,24 +174,24 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
int i;
RegionRec rgnNew;
- if (!prgn || !REGION_NOTEMPTY(pScreen, prgn))
+ if (!prgn || !RegionNotEmpty(prgn))
return;
for (i = 0; i < pScrPriv->nlayers; i++)
{
if (i == layer)
{
/* add new piece to this fb */
- REGION_UNION (pScreen,
+ RegionUnion(
&pScrPriv->layer[i].u.run.region,
&pScrPriv->layer[i].u.run.region,
prgn);
}
- else if (REGION_NOTEMPTY (pScreen,
+ else if (RegionNotEmpty(
&pScrPriv->layer[i].u.run.region))
{
/* paint new piece with chroma key */
- REGION_NULL (pScreen, &rgnNew);
- REGION_INTERSECT (pScreen,
+ RegionNull(&rgnNew);
+ RegionIntersect(
&rgnNew,
prgn,
&pScrPriv->layer[i].u.run.region);
@@ -199,9 +199,9 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen,
&rgnNew,
pScrPriv->layer[i].key,
i);
- REGION_UNINIT(pScreen, &rgnNew);
+ RegionUninit(&rgnNew);
/* remove piece from other fbs */
- REGION_SUBTRACT (pScreen,
+ RegionSubtract(
&pScrPriv->layer[i].u.run.region,
&pScrPriv->layer[i].u.run.region,
prgn);
@@ -231,21 +231,21 @@ fbOverlayCopyWindow(WindowPtr pWin,
/*
* Clip to existing bits
*/
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
- REGION_NULL (pScreen, &rgnDst);
- REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
- REGION_TRANSLATE(pScreen, &rgnDst, dx, dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
+ RegionNull(&rgnDst);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
+ RegionTranslate(&rgnDst, dx, dy);
/*
* Compute the portion of each fb affected by this copy
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
- REGION_NULL (pScreen, &layerRgn[i]);
- REGION_INTERSECT(pScreen, &layerRgn[i], &rgnDst,
+ RegionNull(&layerRgn[i]);
+ RegionIntersect(&layerRgn[i], &rgnDst,
&pScrPriv->layer[i].u.run.region);
- if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
+ if (RegionNotEmpty(&layerRgn[i]))
{
- REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy);
+ RegionTranslate(&layerRgn[i], -dx, -dy);
pPixmap = pScrPriv->layer[i].u.run.pixmap;
fbCopyRegion (&pPixmap->drawable, &pPixmap->drawable,
0,
@@ -258,12 +258,12 @@ fbOverlayCopyWindow(WindowPtr pWin,
*/
for (i = 0; i < pScrPriv->nlayers; i++)
{
- if (REGION_NOTEMPTY (pScreen, &layerRgn[i]))
+ if (RegionNotEmpty(&layerRgn[i]))
fbOverlayUpdateLayerRegion (pScreen, i, &layerRgn[i]);
- REGION_UNINIT(pScreen, &layerRgn[i]);
+ RegionUninit(&layerRgn[i]);
}
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
}
void
diff --git a/nx-X11/programs/Xserver/fb/fbpict.c b/nx-X11/programs/Xserver/fb/fbpict.c
index 5ab3756b9..330c55de3 100644
--- a/nx-X11/programs/Xserver/fb/fbpict.c
+++ b/nx-X11/programs/Xserver/fb/fbpict.c
@@ -1248,8 +1248,8 @@ fbComposite (CARD8 op,
height))
return;
- n = REGION_NUM_RECTS (&region);
- pbox = REGION_RECTS (&region);
+ n = RegionNumRects (&region);
+ pbox = RegionRects (&region);
while (n--)
{
h = pbox->y2 - pbox->y1;
@@ -1309,7 +1309,7 @@ fbComposite (CARD8 op,
}
pbox++;
}
- REGION_UNINIT (pDst->pDrawable->pScreen, &region);
+ RegionUninit(&region);
}
#endif /* RENDER */
diff --git a/nx-X11/programs/Xserver/fb/fbpixmap.c b/nx-X11/programs/Xserver/fb/fbpixmap.c
index 7ea288cb1..6c2cafd94 100644
--- a/nx-X11/programs/Xserver/fb/fbpixmap.c
+++ b/nx-X11/programs/Xserver/fb/fbpixmap.c
@@ -119,7 +119,7 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \
if ((reg)->data->numRects == (reg)->data->size) \
{ \
miRectAlloc(reg, 1); \
- fr = REGION_BOXPTR(reg); \
+ fr = RegionBoxptr(reg); \
r = fr + (reg)->data->numRects; \
} \
r->x1 = (rx1); \
@@ -156,10 +156,10 @@ fbPixmapToRegion(PixmapPtr pPix)
FbBits *pwLine;
int nWidth;
- pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1);
+ pReg = RegionCreate(NULL, 1);
if(!pReg)
return NullRegion;
- FirstRect = REGION_BOXPTR(pReg);
+ FirstRect = RegionBoxptr(pReg);
rects = FirstRect;
pwLine = (FbBits *) pPix->devPrivate.ptr;
@@ -305,8 +305,8 @@ fbPixmapToRegion(PixmapPtr pPix)
pReg->extents.x1 = pReg->extents.x2 = 0;
else
{
- pReg->extents.y1 = REGION_BOXPTR(pReg)->y1;
- pReg->extents.y2 = REGION_END(pReg)->y2;
+ pReg->extents.y1 = RegionBoxptr(pReg)->y1;
+ pReg->extents.y2 = RegionEnd(pReg)->y2;
if (pReg->data->numRects == 1)
{
xfree(pReg->data);
diff --git a/nx-X11/programs/Xserver/fb/fbpoint.c b/nx-X11/programs/Xserver/fb/fbpoint.c
index 5229d6970..06d8662ba 100644
--- a/nx-X11/programs/Xserver/fb/fbpoint.c
+++ b/nx-X11/programs/Xserver/fb/fbpoint.c
@@ -157,7 +157,7 @@ fbPolyPoint (DrawablePtr pDrawable,
case 32: dots = fbDots32; break;
}
#endif
- for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip);
+ for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip);
nBox--; pBox++)
(*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit,
pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor);
diff --git a/nx-X11/programs/Xserver/fb/fbpseudocolor.c b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
index 469f3ea08..51f21ed21 100644
--- a/nx-X11/programs/Xserver/fb/fbpseudocolor.c
+++ b/nx-X11/programs/Xserver/fb/fbpseudocolor.c
@@ -166,10 +166,10 @@ int xxGeneration;
# define PRINT_RECTS(rec) {\
int i;\
BoxPtr box;\
- ErrorF("RECTS: %i\n",REGION_NUM_RECTS(&rec));\
- if (REGION_NUM_RECTS(&rec) > 1) { \
- for (i = 0; i < REGION_NUM_RECTS(&rec); i++ ) {\
- box = REGION_BOX(&rec,i);\
+ ErrorF("RECTS: %i\n",RegionNumRects(&rec));\
+ if (RegionNumRects(&rec) > 1) { \
+ for (i = 0; i < RegionNumRects(&rec); i++ ) {\
+ box = RegionBox(&rec,i);\
ErrorF("x1: %hi x2: %hi y1: %hi y2: %hi\n", \
box->x1,box->x2,box->y1,box->y2);\
}\
@@ -308,8 +308,8 @@ xxCreateScreenResources(ScreenPtr pScreen)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_NULL(pScreen, &pScrPriv->region);
- REGION_INIT(pScreen, &pScrPriv->bRegion, &box, 0);
+ RegionNull(&pScrPriv->region);
+ RegionInit(&pScrPriv->bRegion, &box, 0);
return TRUE;
}
@@ -323,7 +323,7 @@ xxCloseScreen (int iScreen, ScreenPtr pScreen)
(*pScreen->DestroyPixmap)(pScrPriv->pPixmap);
/* We don't need to free the baseColormap as FreeClientResourcess
will have taken care of it. */
- REGION_UNINIT (pScreen, &pScrPriv->region);
+ RegionUninit(&pScrPriv->region);
unwrap (pScrPriv,pScreen, CloseScreen);
ret = pScreen->CloseScreen(iScreen,pScreen);
@@ -678,7 +678,7 @@ xxCreateWindow(WindowPtr pWin)
pWin->devPrivates[fbWinPrivateIndex].ptr = (void *) pScrPriv->pPixmap;
PRINT_RECTS(pScrPriv->region);
if (!pWin->parent) {
- REGION_EMPTY (pWin->drawable.pScreen, &pScrPriv->region);
+ RegionEmpty(&pScrPriv->region);
}
PRINT_RECTS(pScrPriv->region);
@@ -694,11 +694,11 @@ xxWalkChildren(WindowPtr pWin, RegionPtr pReg, PixmapPtr pPixmap)
do {
if (fbGetWindowPixmap(pCurWin) == pPixmap) {
DBG("WalkWindow Add\n");
- REGION_UNION(pWin->drawable.pScreen,pReg,pReg,
+ RegionUnion(pReg,pReg,
&pCurWin->borderClip);
} else {
DBG("WalkWindow Sub\n");
- REGION_SUBTRACT(pWin->drawable.pScreen,pReg,pReg,
+ RegionSubtract(pReg,pReg,
&pCurWin->borderClip);
}
if (pCurWin->lastChild)
@@ -713,7 +713,7 @@ xxPickMyWindows(WindowPtr pWin, RegionPtr pRgn)
xxScrPriv(pScreen);
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
- REGION_UNION(pWin->drawable.pScreen,pRgn,pRgn,&pWin->borderClip);
+ RegionUnion(pRgn,pRgn,&pWin->borderClip);
}
if (pWin->lastChild)
xxWalkChildren(pWin->lastChild,pRgn,pScrPriv->pPixmap);
@@ -736,11 +736,11 @@ xxCopyWindow(WindowPtr pWin,
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_NULL(pScreen, &rgn_new);
- REGION_UNION(pScreen, &rgn_new,&rgn_new,prgnSrc);
- REGION_TRANSLATE(pScreen,&rgn_new,-dx,-dy);
+ RegionNull(&rgn_new);
+ RegionUnion(&rgn_new,&rgn_new,prgnSrc);
+ RegionTranslate(&rgn_new,-dx,-dy);
- REGION_NULL(pScreen, &rgn);
+ RegionNull(&rgn);
xxPickMyWindows(pWin,&rgn);
unwrap (pScrPriv, pScreen, CopyWindow);
@@ -749,19 +749,19 @@ xxCopyWindow(WindowPtr pWin,
pWin->devPrivates[fbWinPrivateIndex].ptr = pPixmap;
wrap(pScrPriv, pScreen, CopyWindow, xxCopyWindow);
- REGION_INTERSECT(pScreen,&rgn,&rgn,&rgn_new);
- if (REGION_NOTEMPTY (pScreen,&rgn)) {
+ RegionIntersect(&rgn,&rgn,&rgn_new);
+ if (RegionNotEmpty(&rgn)) {
fbCopyRegion(&pScrPriv->pPixmap->drawable,&pScrPriv->pPixmap->drawable,
0,&rgn,dx,dy,fbCopyWindowProc,0,(void*)0);
- REGION_TRANSLATE(pScreen,&rgn,dx,dy);
- REGION_INTERSECT(pScreen,&rgn_new,&pScrPriv->region,&rgn);
- REGION_SUBTRACT(pScreen,&pScrPriv->region,&pScrPriv->region,&rgn);
- REGION_TRANSLATE(pScreen,&rgn_new,-dx,-dy);
- REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&rgn_new);
+ RegionTranslate(&rgn,dx,dy);
+ RegionIntersect(&rgn_new,&pScrPriv->region,&rgn);
+ RegionSubtract(&pScrPriv->region,&pScrPriv->region,&rgn);
+ RegionTranslate(&rgn_new,-dx,-dy);
+ RegionUnion(&pScrPriv->region,&pScrPriv->region,&rgn_new);
}
#if 1
- REGION_UNINIT(pScreen,&rgn_new);
- REGION_UNINIT(pScreen,&rgn);
+ RegionUninit(&rgn_new);
+ RegionUninit(&rgn);
#endif
}
@@ -775,14 +775,14 @@ xxWindowExposures (WindowPtr pWin,
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
DBG("WindowExposures\n");
PRINT_RECTS(pScrPriv->region);
- REGION_UNION(pWin->drawable.pScreen,&pScrPriv->region,
+ RegionUnion(&pScrPriv->region,
&pScrPriv->region,
prgn);
PRINT_RECTS(pScrPriv->region);
} else {
DBG("WindowExposures NonPseudo\n");
PRINT_RECTS(pScrPriv->region);
- REGION_SUBTRACT(pWin->drawable.pScreen,&pScrPriv->region,
+ RegionSubtract(&pScrPriv->region,
&pScrPriv->region,
prgn);
PRINT_RECTS(pScrPriv->region);
@@ -800,23 +800,23 @@ xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
DBG("xxPaintWindow\n");
- REGION_NULL (pWin->drawable.pScreen, &rgni);
+ RegionNull(&rgni);
#if 0
- REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, &pWin->borderClip);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgni, &rgni, pRegion);
+ RegionUnion(&rgni, &rgni, &pWin->borderClip);
+ RegionIntersect(&rgni, &rgni, pRegion);
#else
- REGION_UNION (pWin->drawable.pScreen, &rgni, &rgni, pRegion);
+ RegionUnion(&rgni, &rgni, pRegion);
#endif
switch (what) {
case PW_BORDER:
- REGION_SUBTRACT (pWin->drawable.pScreen, &rgni, &rgni, &pWin->winSize);
+ RegionSubtract(&rgni, &rgni, &pWin->winSize);
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
DBG("PaintWindowBorder\n");
- REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionUnion(&pScrPriv->region,
&pScrPriv->region, &rgni);
} else {
DBG("PaintWindowBorder NoOverlay\n");
- REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region,
&pScrPriv->region, &rgni);
}
unwrap (pScrPriv, pWin->drawable.pScreen, PaintWindowBorder);
@@ -829,15 +829,15 @@ xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
case None:
break;
default:
- REGION_INTERSECT (pWin->drawable.pScreen, &rgni,
+ RegionIntersect(&rgni,
&rgni,&pWin->winSize);
if (fbGetWindowPixmap(pWin) == pScrPriv->pPixmap) {
DBG("PaintWindowBackground\n");
- REGION_UNION (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionUnion(&pScrPriv->region,
&pScrPriv->region, &rgni);
} else {
DBG("PaintWindowBackground NoOverlay\n");
- REGION_SUBTRACT (pWin->drawable.pScreen, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region,
&pScrPriv->region, &rgni);
}
break;
@@ -852,7 +852,7 @@ xxPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
PRINT_RECTS(rgni);
PRINT_RECTS(pScrPriv->region);
#if 1
- REGION_UNINIT(pWin->drawable.pScreen,&rgni);
+ RegionUninit(&rgni);
#endif
}
@@ -862,8 +862,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
{
xxScrPriv(pScreen);
CARD32 mask = (1 << pScrPriv->myDepth) - 1;
- int num = REGION_NUM_RECTS(pReg);
- BoxPtr pbox = REGION_RECTS(pReg);
+ int num = RegionNumRects(pReg);
+ BoxPtr pbox = RegionRects(pReg);
int width, height;
CARD8 *src;
CARD16 *dst, *dst_base;
@@ -905,8 +905,8 @@ xxUpdateCmapPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
{
xxScrPriv(pScreen);
CARD32 mask = (1 << pScrPriv->myDepth) - 1;
- int num = REGION_NUM_RECTS(pReg);
- BoxPtr pbox = REGION_RECTS(pReg);
+ int num = RegionNumRects(pReg);
+ BoxPtr pbox = RegionRects(pReg);
int width, height;
CARD8 *src;
CARD16 *dst, *dst_base;
@@ -950,14 +950,14 @@ xxUpdateCmapPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg,
static void
xxGetWindowRegion(WindowPtr pWin,RegionPtr winreg)
{
- REGION_NULL(pWin->drawable.pScreen,winreg);
+ RegionNull(winreg);
/* get visible part of the border ...Argh */
- REGION_SUBTRACT(pWin->drawable.pScreen,winreg,&pWin->borderSize,
+ RegionSubtract(winreg,&pWin->borderSize,
&pWin->winSize);
- REGION_INTERSECT(pWin->drawable.pScreen,winreg,winreg,
+ RegionIntersect(winreg,winreg,
&pWin->borderClip);
/* add window interior excluding children */
- REGION_UNION(pWin->drawable.pScreen,winreg,winreg,
+ RegionUnion(winreg,winreg,
&pWin->clipList);
}
@@ -985,18 +985,18 @@ xxUpdateRegion(WindowPtr pWin, void * unused)
if (!pCmapPriv->dirty)
goto CONTINUE;
- REGION_NULL (pScreen, &rgni);
+ RegionNull(&rgni);
/* This will be taken care of when damaged regions are updated */
- REGION_SUBTRACT(pScreen, &rgni, &winreg, &pScrPriv->region);
- if (REGION_NOTEMPTY (pScreen,&rgni))
+ RegionSubtract(&rgni, &winreg, &pScrPriv->region);
+ if (RegionNotEmpty(&rgni))
xxUpdateCmapPseudocolorRegion(pScreen,&rgni, pCmapPriv);
}
CONTINUE:
- REGION_NULL (pScreen, &rgni);
- REGION_INTERSECT (pScreen, &rgni, &winreg, &pScrPriv->region);
+ RegionNull(&rgni);
+ RegionIntersect(&rgni, &winreg, &pScrPriv->region);
- if (REGION_NOTEMPTY (pScreen,&rgni)) {
+ if (RegionNotEmpty(&rgni)) {
if (pmap == (void *) -1) {
pmap =
(ColormapPtr)LookupIDByType(wColormap(pWin),RT_COLORMAP);
@@ -1008,12 +1008,12 @@ xxUpdateRegion(WindowPtr pWin, void * unused)
if (pCmapPriv != (void *)-1)
xxCopyPseudocolorRegion(pScreen,&rgni, pCmapPriv);
- REGION_SUBTRACT(pScreen, &pScrPriv->region, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region, &pScrPriv->region,
&rgni);
}
#if 1
- REGION_UNINIT(pScreen,&rgni);
- REGION_UNINIT(pScreen,&winreg);
+ RegionUninit(&rgni);
+ RegionUninit(&winreg);
#endif
}
return WT_WALKCHILDREN;
@@ -1033,7 +1033,7 @@ xxUpdateFb(ScreenPtr pScreen)
WalkTree(pScreen,xxUpdateRegion,NULL);
#if 0
- if (REGION_NOTEMPTY (pScreen,&pScrPriv->region)) {
+ if (RegionNotEmpty(&pScrPriv->region)) {
ColormapPtr pmap = (void *) -1;
xxCmapPrivPtr pCmapPriv;
@@ -1042,7 +1042,7 @@ xxUpdateFb(ScreenPtr pScreen)
pCmapPriv = xxGetCmapPriv(pmap);
if (pCmapPriv != (void *)-1)
xxCopyPseudocolorRegion(pScreen,&pScrPriv->region, pCmapPriv);
- REGION_SUBTRACT(pScreen, &pScrPriv->region, &pScrPriv->region,
+ RegionSubtract(&pScrPriv->region, &pScrPriv->region,
&pScrPriv->region);
}
#endif
@@ -1071,7 +1071,7 @@ xxBlockHandler (void * data,
ScreenPtr pScreen = (ScreenPtr) data;
xxScrPriv(pScreen);
- if (REGION_NOTEMPTY (pScreen,&pScrPriv->region) || pScrPriv->colormapDirty)
+ if (RegionNotEmpty(&pScrPriv->region) || pScrPriv->colormapDirty)
xxUpdateFb (pScreen);
}
@@ -1241,15 +1241,15 @@ GCOps xxGCOps = {
if (BOX_NOT_EMPTY(box)) { \
RegionRec region; \
ScreenPtr pScreen = pGC->pScreen;\
- REGION_INIT (pScreen, &region, &box, 1); \
- REGION_INTERSECT(pScreen,&region,&region,\
+ RegionInit(&region, &box, 1); \
+ RegionIntersect(&region,&region,\
(pGC)->pCompositeClip);\
- if (REGION_NOTEMPTY(pScreen,&region)) { \
+ if (RegionNotEmpty(&region)) { \
xxScrPriv(pScreen);\
PRINT_RECTS(pScrPriv->region);\
- REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&region);\
+ RegionUnion(&pScrPriv->region,&pScrPriv->region,&region);\
PRINT_RECTS(pScrPriv->region);\
- REGION_UNINIT(pScreen,&region);\
+ RegionUninit(&region);\
}\
}\
}
@@ -2234,11 +2234,11 @@ xxPushPixels(
RegionRec region; \
xxScrPriv(pScreen);\
ScreenPtr pScreen = pScreen;\
- REGION_INIT (pScreen, &region, &box, 1); \
+ RegionInit(&region, &box, 1); \
PRINT_RECTS(pScrPriv->region);\
- REGION_UNION(pScreen,&pScrPriv->region,&pScrPriv->region,&region);\
+ RegionUnion(&pScrPriv->region,&pScrPriv->region,&region);\
PRINT_RECTS(pScrPriv->region);\
- REGION_UNINIT(pScreen,&region);\
+ RegionUninit(&region);\
}\
}
diff --git a/nx-X11/programs/Xserver/fb/fbpush.c b/nx-X11/programs/Xserver/fb/fbpush.c
index 8f1336963..78d2e450d 100644
--- a/nx-X11/programs/Xserver/fb/fbpush.c
+++ b/nx-X11/programs/Xserver/fb/fbpush.c
@@ -192,8 +192,8 @@ fbPushImage (DrawablePtr pDrawable,
BoxPtr pbox;
int x1, y1, x2, y2;
- for (nbox = REGION_NUM_RECTS (pClip),
- pbox = REGION_RECTS(pClip);
+ for (nbox = RegionNumRects (pClip),
+ pbox = RegionRects(pClip);
nbox--;
pbox++)
{
diff --git a/nx-X11/programs/Xserver/fb/fbseg.c b/nx-X11/programs/Xserver/fb/fbseg.c
index 18a996e0c..2947992a6 100644
--- a/nx-X11/programs/Xserver/fb/fbseg.c
+++ b/nx-X11/programs/Xserver/fb/fbseg.c
@@ -615,8 +615,8 @@ fbSegment (DrawablePtr pDrawable,
unsigned int oc1; /* outcode of point 1 */
unsigned int oc2; /* outcode of point 2 */
- nBox = REGION_NUM_RECTS (pClip);
- pBox = REGION_RECTS (pClip);
+ nBox = RegionNumRects (pClip);
+ pBox = RegionRects (pClip);
bres = fbSelectBres (pDrawable, pGC);
diff --git a/nx-X11/programs/Xserver/fb/fbsetsp.c b/nx-X11/programs/Xserver/fb/fbsetsp.c
index eefc2da82..c7074f036 100644
--- a/nx-X11/programs/Xserver/fb/fbsetsp.c
+++ b/nx-X11/programs/Xserver/fb/fbsetsp.c
@@ -63,8 +63,8 @@ fbSetSpans (DrawablePtr pDrawable,
xoff = (int) (((long) src) & (FB_MASK >> 3));
s = (FbBits *) (src - xoff);
xoff <<= 3;
- n = REGION_NUM_RECTS(pClip);
- pbox = REGION_RECTS (pClip);
+ n = RegionNumRects(pClip);
+ pbox = RegionRects (pClip);
while (n--)
{
if (pbox->y1 > ppt->y)
diff --git a/nx-X11/programs/Xserver/fb/fbwindow.c b/nx-X11/programs/Xserver/fb/fbwindow.c
index 1269902b9..5ce7ba729 100644
--- a/nx-X11/programs/Xserver/fb/fbwindow.c
+++ b/nx-X11/programs/Xserver/fb/fbwindow.c
@@ -132,15 +132,15 @@ fbCopyWindow(WindowPtr pWin,
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
- REGION_NULL (pWin->drawable.pScreen, &rgnDst);
+ RegionNull(&rgnDst);
- REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc);
+ RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc);
#ifdef COMPOSITE
if (pPixmap->screen_x || pPixmap->screen_y)
- REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst,
+ RegionTranslate(&rgnDst,
-pPixmap->screen_x, -pPixmap->screen_y);
#endif
@@ -148,7 +148,7 @@ fbCopyWindow(WindowPtr pWin,
0,
&rgnDst, dx, dy, fbCopyWindowProc, 0, 0);
- REGION_UNINIT(pWin->drawable.pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
fbValidateDrawable (&pWin->drawable);
}
@@ -215,8 +215,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
FbStride dstStride;
int dstBpp;
int dstXoff, dstYoff;
- int n = REGION_NUM_RECTS(pRegion);
- BoxPtr pbox = REGION_RECTS(pRegion);
+ int n = RegionNumRects(pRegion);
+ BoxPtr pbox = RegionRects(pRegion);
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
@@ -253,8 +253,8 @@ fbFillRegionTiled (DrawablePtr pDrawable,
int tileBpp;
int tileXoff, tileYoff; /* XXX assumed to be zero */
int tileWidth, tileHeight;
- int n = REGION_NUM_RECTS(pRegion);
- BoxPtr pbox = REGION_RECTS(pRegion);
+ int n = RegionNumRects(pRegion);
+ BoxPtr pbox = RegionRects(pRegion);
int xRot = pDrawable->x;
int yRot = pDrawable->y;
diff --git a/nx-X11/programs/Xserver/fix-region b/nx-X11/programs/Xserver/fix-region
new file mode 100755
index 000000000..61fe6e0fb
--- /dev/null
+++ b/nx-X11/programs/Xserver/fix-region
@@ -0,0 +1,40 @@
+#!/bin/sh
+sed -i \
+ -e 's/REGION_NIL\b/RegionNil/g' \
+ -e 's/REGION_NAR\b/RegionNar/g' \
+ -e 's/REGION_NUM_RECTS\b/RegionNumRects/g' \
+ -e 's/REGION_SIZE\b/RegionSize/g' \
+ -e 's/REGION_RECTS\b/RegionRects/g' \
+ -e 's/REGION_BOXPTR\b/RegionBoxptr/g' \
+ -e 's/REGION_BOX\b/RegionBox/g' \
+ -e 's/REGION_TOP\b/RegionTop/g' \
+ -e 's/REGION_END\b/RegionEnd/g' \
+ -e 's/REGION_SZOF\b/RegionSizeof/g' \
+ -e 's/REGION_CREATE *([^,]*, */RegionCreate(/g' \
+ -e 's/REGION_COPY *([^,]*, */RegionCopy(/g' \
+ -e 's/REGION_DESTROY *([^,]*, */RegionDestroy(/g' \
+ -e 's/REGION_INTERSECT *([^,]*, */RegionIntersect(/g' \
+ -e 's/REGION_UNION *([^,]*, */RegionUnion(/g' \
+ -e 's/REGION_SUBTRACT *([^,]*, */RegionSubtract(/g' \
+ -e 's/REGION_INVERSE *([^,]*, */RegionInverse(/g' \
+ -e 's/REGION_TRANSLATE *([^,]*, */RegionTranslate(/g' \
+ -e 's/RECT_IN_REGION *([^,]*, */RegionContainsRect(/g' \
+ -e 's/POINT_IN_REGION *([^,]*, */RegionContainsPoint(/g' \
+ -e 's/REGION_EQUAL *([^,]*, */RegionEqual(/g' \
+ -e 's/REGION_APPEND *([^,]*, */RegionAppend(/g' \
+ -e 's/REGION_VALIDATE *([^,]*, */RegionValidate(/g' \
+ -e 's/BITMAP_TO_REGION\b/BitmapToRegion/g' \
+ -e 's/RECTS_TO_REGION *([^,]*, */RegionFromRects(/g' \
+ -e 's/REGION_BREAK *([^,]*, */RegionBreak(/g' \
+ -e 's/REGION_INIT *([^,]*, */RegionInit(/g' \
+ -e 's/REGION_UNINIT *([^,]*, */RegionUninit(/g' \
+ -e 's/REGION_RESET *([^,]*, */RegionReset(/g' \
+ -e 's/REGION_NOTEMPTY *([^,]*, */RegionNotEmpty(/g' \
+ -e 's/REGION_BROKEN *([^,]*, */RegionBroken(/g' \
+ -e 's/REGION_EMPTY *([^,]*, */RegionEmpty(/g' \
+ -e 's/REGION_EXTENTS *([^,]*, */RegionExtents(/g' \
+ -e 's/REGION_NUM_RECTS *([^,]*, */RegionNumRects(/g' \
+ -e 's/REGION_RECTS *([^,]*, */RegionRects(/g' \
+ -e 's/REGION_NULL *([^,]*, */RegionNull(/g' \
+ -e 's/REGION_NULL$/RegionNull/g' \
+ "$@"
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 34781e816..7fa984eee 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -47,7 +47,7 @@
/*
* The list of rectangles composing a region
* s returned by nxagentGetOptimizedRegion-
- * Boxes() instead of REGION_RECTS().
+ * Boxes() instead of RegionRects().
*/
#define USE_OPTIMIZED_BOXES
@@ -412,10 +412,10 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
clipRegion = NullRegion;
#ifdef COLLECTED_UPDATES
- REGION_INIT(pDrawable -> pScreen, &collectedUpdates, NullBox, 1);
+ RegionInit(&collectedUpdates, NullBox, 1);
#endif
- REGION_INIT(pDrawable -> pScreen, &exposeRegion, NullBox, 1);
+ RegionInit(&exposeRegion, NullBox, 1);
if (nxagentDrawableBitmap(pDrawable) != NullPixmap &&
nxagentDrawableStatus((DrawablePtr) nxagentDrawableBitmap(pDrawable)) == Synchronized)
@@ -447,7 +447,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y1,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x2,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y2,
- REGION_NUM_RECTS(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
+ RegionNumRects(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
#endif
clipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
@@ -458,7 +458,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* a previous loop.
*/
- REGION_INTERSECT(pDrawable -> pScreen, clipRegion, clipRegion,
+ RegionIntersect(clipRegion, clipRegion,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)));
/*
@@ -470,14 +470,14 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* ronization will fix the error.
*/
- REGION_INTERSECT(pDrawable -> pScreen, clipRegion, clipRegion,
+ RegionIntersect(clipRegion, clipRegion,
nxagentCorruptedRegion(pDrawable));
/*
* The bitmap to synchronize is clipped.
*/
- if (REGION_NIL(clipRegion) == 1)
+ if (RegionNil(clipRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: The bitmap region [%d,%d,%d,%d] is not viewable. "
@@ -499,7 +499,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
}
else
{
- if (pRegion != NullRegion && REGION_NIL(pRegion) == 1)
+ if (pRegion != NullRegion && RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Region [%d,%d,%d,%d] is nil. Skipping synchronization.\n",
@@ -531,9 +531,9 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* can skip the synchronization.
*/
- REGION_INTERSECT(pDrawable -> pScreen, clipRegion, clipRegion, nxagentCorruptedRegion(pDrawable));
+ RegionIntersect(clipRegion, clipRegion, nxagentCorruptedRegion(pDrawable));
- if (REGION_NIL(clipRegion) == 1)
+ if (RegionNil(clipRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: The corrupted region [%d,%d,%d,%d] is not viewable "
@@ -554,9 +554,9 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (pRegion != NullRegion)
{
- REGION_INTERSECT(pDrawable -> pScreen, clipRegion, clipRegion, pRegion);
+ RegionIntersect(clipRegion, clipRegion, pRegion);
- if (REGION_NIL(clipRegion) == 1)
+ if (RegionNil(clipRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Region requested [%d,%d,%d,%d] already "
@@ -604,7 +604,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Going to synchronize [%ld] rects of [%s] at [%p].\n",
- REGION_NUM_RECTS(clipRegion), nxagentDrawableType(pDrawable), (void *) pDrawable);
+ RegionNumRects(clipRegion), nxagentDrawableType(pDrawable), (void *) pDrawable);
fprintf(stderr, "nxagentSynchronizeRegion: Extents geometry [%d,%d,%d,%d].\n",
clipRegion -> extents.x1, clipRegion -> extents.y1, clipRegion -> extents.x2, clipRegion -> extents.y2);
@@ -648,7 +648,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (length == 0)
{
fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] with region geometry [%ld][%d,%d,%d,%d].\n",
- nxagentDrawableType(pDrawable), (void *) pDrawable, REGION_NUM_RECTS(clipRegion),
+ nxagentDrawableType(pDrawable), (void *) pDrawable, RegionNumRects(clipRegion),
clipRegion -> extents.x1, clipRegion -> extents.y1,
clipRegion -> extents.x2, clipRegion -> extents.y2);
}
@@ -660,7 +660,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
#ifndef USE_OPTIMIZED_BOXES
- pBox = REGION_RECTS(clipRegion);
+ pBox = RegionRects(clipRegion);
#else
@@ -668,7 +668,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
#endif /* USE_OPTIMIZED_BOXES */
- nBox = REGION_NUM_RECTS(clipRegion);
+ nBox = RegionNumRects(clipRegion);
now = GetTimeInMillis();
@@ -794,12 +794,12 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* region.
*/
- REGION_INIT(pDrawable -> pScreen, &tileRegion, &tileBox, 1);
+ RegionInit(&tileRegion, &tileBox, 1);
- REGION_UNION(pDrawable -> pScreen, &exposeRegion, &exposeRegion, &tileRegion);
+ RegionUnion(&exposeRegion, &exposeRegion, &tileRegion);
#ifdef COLLECTED_UPDATES
- REGION_APPEND(pDrawable -> pScreen, &collectedUpdates, &tileRegion);
+ RegionAppend(&collectedUpdates, &tileRegion);
#endif
if (useStoredBitmap != 0)
@@ -812,7 +812,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
* associated to this pixmap.
*/
- REGION_SUBTRACT(pDrawable -> pScreen, nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)),
+ RegionSubtract(nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)),
nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)), &tileRegion);
/*
@@ -875,7 +875,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
(void *) nxagentDrawableBitmap(pDrawable));
#endif
- REGION_SUBTRACT(pDrawable -> pScreen, nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)),
+ RegionSubtract(nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)),
nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)), &tileRegion);
}
}
@@ -888,7 +888,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentRealizeImage(pDrawable, pGC, pDrawable -> depth,
x, y, w, h, leftPad, format, data);
- REGION_UNINIT(pDrawable -> pScreen, &tileRegion);
+ RegionUninit(&tileRegion);
#if !defined(COLLECTED_UPDATES)
@@ -990,7 +990,7 @@ nxagentSynchronizeRegionStop:
if (pDrawable -> type == DRAWABLE_PIXMAP &&
nxagentIsCorruptedBackground((PixmapPtr) pDrawable) == 1 &&
- REGION_NIL(&exposeRegion) == 0)
+ RegionNil(&exposeRegion) == 0)
{
struct nxagentExposeBackground eb;
@@ -1016,14 +1016,14 @@ nxagentSynchronizeRegionStop:
{
int overlap = 0;
- REGION_VALIDATE(pDrawable -> pScreen, &collectedUpdates, &overlap);
+ RegionValidate(&collectedUpdates, &overlap);
- for (i = 0; i < REGION_NUM_RECTS(&collectedUpdates); i++)
+ for (i = 0; i < RegionNumRects(&collectedUpdates); i++)
{
- x = REGION_RECTS(&collectedUpdates)[i].x1;
- y = REGION_RECTS(&collectedUpdates)[i].y1;
- w = REGION_RECTS(&collectedUpdates)[i].x2 - REGION_RECTS(&collectedUpdates)[i].x1;
- h = REGION_RECTS(&collectedUpdates)[i].y2 - REGION_RECTS(&collectedUpdates)[i].y1;
+ x = RegionRects(&collectedUpdates)[i].x1;
+ y = RegionRects(&collectedUpdates)[i].y1;
+ w = RegionRects(&collectedUpdates)[i].x2 - RegionRects(&collectedUpdates)[i].x1;
+ h = RegionRects(&collectedUpdates)[i].y2 - RegionRects(&collectedUpdates)[i].y1;
if (nxagentOption(Shadow) == 1 &&
(nxagentOption(XRatio) != DONT_SCALE ||
@@ -1063,11 +1063,11 @@ nxagentSynchronizeRegionFree:
xfree(data);
}
- REGION_UNINIT(pDrawable -> pScreen, &exposeRegion);
+ RegionUninit(&exposeRegion);
#ifdef COLLECTED_UPDATES
- REGION_UNINIT(pDrawable -> pScreen, &collectedUpdates);
+ RegionUninit(&collectedUpdates);
#endif /* #ifdef COLLECTED_UPDATES */
@@ -1108,7 +1108,7 @@ void nxagentSynchronizeBox(DrawablePtr pDrawable, BoxPtr pBox, unsigned int brea
pBox -> x2 - pBox -> x1, pBox -> y2 - pBox -> y1);
- if (REGION_NIL(pRegion) == 1)
+ if (RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeBox: Resulting region [%d,%d,%d,%d] is nil. Skipping synchronization.\n",
@@ -1273,7 +1273,7 @@ FIXME: This condition sounds only as a
"with [%ld] rects.\n", nxagentCorruptedRegion(pDrawable) -> extents.x1,
nxagentCorruptedRegion(pDrawable) -> extents.y1, nxagentCorruptedRegion(pDrawable) ->
extents.x2, nxagentCorruptedRegion(pDrawable) -> extents.y2,
- REGION_NUM_RECTS(nxagentCorruptedRegion(pDrawable)));
+ RegionNumRects(nxagentCorruptedRegion(pDrawable)));
#endif
/*
@@ -1518,7 +1518,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
box.x2 = x + width;
box.y2 = y + height;
- pRegion = REGION_CREATE(pDrawable -> pScreen, &box, 1);
+ pRegion = RegionCreate(&box, 1);
/*
* Clipping the region.
@@ -1543,11 +1543,11 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
tmpBox.x2 = pDrawable -> width;
tmpBox.y2 = pDrawable -> height;
- REGION_INIT(pDrawable -> pScreen, &tmpRegion, &tmpBox, 1);
+ RegionInit(&tmpRegion, &tmpBox, 1);
- REGION_INTERSECT(pDrawable -> pScreen, pRegion, &tmpRegion, pRegion);
+ RegionIntersect(pRegion, &tmpRegion, pRegion);
- REGION_UNINIT(pDrawable -> pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
}
else
@@ -1558,19 +1558,19 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
* by its children.
*/
- REGION_TRANSLATE(pDrawable -> pScreen, pRegion,
+ RegionTranslate(pRegion,
pDrawable -> x, pDrawable -> y);
if (nxagentWindowPriv((WindowPtr) pDrawable) -> hasTransparentChildren == 1)
{
- REGION_INTERSECT(pDrawable -> pScreen, pRegion, pRegion, &((WindowPtr) pDrawable) -> borderClip);
+ RegionIntersect(pRegion, pRegion, &((WindowPtr) pDrawable) -> borderClip);
}
else
{
- REGION_INTERSECT(pDrawable -> pScreen, pRegion, pRegion, &((WindowPtr) pDrawable) -> clipList);
+ RegionIntersect(pRegion, pRegion, &((WindowPtr) pDrawable) -> clipList);
}
- REGION_TRANSLATE(pDrawable -> pScreen, pRegion,
+ RegionTranslate(pRegion,
-pDrawable -> x, -pDrawable -> y);
}
@@ -1585,15 +1585,15 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
* to intersect it with the GC's clipmask.
*/
- if (REGION_NIL(pRegion) == 0 &&
+ if (RegionNil(pRegion) == 0 &&
pGC != NULL && pGC -> clientClip != NULL &&
pGC -> clientClipType == CT_REGION)
{
RegionRec clipRegion;
- REGION_INIT(pDrawable -> pScreen, &clipRegion, NullBox, 1);
+ RegionInit(&clipRegion, NullBox, 1);
- REGION_COPY(pDrawable -> pScreen, &clipRegion, (RegionPtr) pGC -> clientClip);
+ RegionCopy(&clipRegion, (RegionPtr) pGC -> clientClip);
/*
* The clip origin is relative to the origin of
@@ -1603,7 +1603,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0)
{
- REGION_TRANSLATE(pDrawable -> pScreen, &clipRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
+ RegionTranslate(&clipRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
}
#ifdef TEST
@@ -1612,9 +1612,9 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
clipRegion.extents.x2, clipRegion.extents.y2);
#endif
- REGION_INTERSECT(pDrawable -> pScreen, pRegion, pRegion, &clipRegion);
+ RegionIntersect(pRegion, pRegion, &clipRegion);
- REGION_UNINIT(pDrawable -> pScreen, &clipRegion);
+ RegionUninit(&clipRegion);
}
return pRegion;
@@ -1627,7 +1627,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
int width;
int height;
- if (pRegion != NullRegion && REGION_NIL(pRegion) == 1)
+ if (pRegion != NullRegion && RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentMarkCorruptedRegion: Region [%d,%d,%d,%d] is nil. Skipping operation.\n",
@@ -1672,7 +1672,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
nxagentValidateSplit(pDrawable, pRegion);
- REGION_UNION(pDrawable -> pScreen, nxagentCorruptedRegion(pDrawable),
+ RegionUnion(nxagentCorruptedRegion(pDrawable),
nxagentCorruptedRegion(pDrawable), pRegion);
nxagentFreeRegion(pDrawable, pRegion);
@@ -1695,7 +1695,7 @@ void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
nxagentValidateSplit(pDrawable, pRegion);
- REGION_UNION(pDrawable -> pScreen, nxagentCorruptedRegion(pDrawable),
+ RegionUnion(nxagentCorruptedRegion(pDrawable),
nxagentCorruptedRegion(pDrawable), pRegion);
}
}
@@ -1704,7 +1704,7 @@ void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
{
int oldStatus;
- if (pRegion != NullRegion && REGION_NIL(pRegion) == 1)
+ if (pRegion != NullRegion && RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentUnmarkCorruptedRegion: Region [%d,%d,%d,%d] is nil. Skipping operation.\n",
@@ -1735,7 +1735,7 @@ void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
nxagentValidateSplit(pDrawable, NULL);
- REGION_EMPTY(pDrawable -> pScreen, nxagentCorruptedRegion(pDrawable));
+ RegionEmpty(nxagentCorruptedRegion(pDrawable));
}
else
{
@@ -1749,7 +1749,7 @@ void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion)
nxagentValidateSplit(pDrawable, pRegion);
- REGION_SUBTRACT(pDrawable -> pScreen, nxagentCorruptedRegion(pDrawable),
+ RegionSubtract(nxagentCorruptedRegion(pDrawable),
nxagentCorruptedRegion(pDrawable), pRegion);
}
@@ -1817,7 +1817,7 @@ void nxagentMoveCorruptedRegion(WindowPtr pWin, unsigned int mask)
nx, ny, (void *) pWin);
#endif
- REGION_TRANSLATE(pWin -> pScreen, nxagentCorruptedRegion((DrawablePtr) pWin),
+ RegionTranslate(nxagentCorruptedRegion((DrawablePtr) pWin),
nx, ny);
/*
@@ -1886,9 +1886,9 @@ BoxPtr nxagentGetOptimizedRegionBoxes(RegionPtr pRegion)
int nBoxOptim;
#endif
- pBox = REGION_RECTS(pRegion);
+ pBox = RegionRects(pRegion);
- nBox = REGION_NUM_RECTS(pRegion);
+ nBox = RegionNumRects(pRegion);
#ifdef TEST
fprintf(stderr, "nxagentGetOptimizedRegionBoxes: Going to optimize region at [%p] with [%d] rects.\n",
@@ -2183,7 +2183,7 @@ unsigned long nxagentGetRegionColor(DrawablePtr pDrawable, RegionPtr pRegion)
{
int xPicker, yPicker;
- if (REGION_NIL(pRegion) == 1)
+ if (RegionNil(pRegion) == 1)
{
return nxagentGetDrawableColor(pDrawable);
}
@@ -2251,7 +2251,7 @@ void nxagentClearRegion(DrawablePtr pDrawable, RegionPtr pRegion)
return;
}
- if (pRegion == NullRegion || REGION_NIL(pRegion) == 1)
+ if (pRegion == NullRegion || RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentClearRegion: The region is empty. Exiting.\n");
@@ -2306,7 +2306,7 @@ void nxagentClearRegion(DrawablePtr pDrawable, RegionPtr pRegion)
pBox = nxagentGetOptimizedRegionBoxes(pRegion);
- nBox = REGION_NUM_RECTS(pRegion);
+ nBox = RegionNumRects(pRegion);
for (i = 0; i < nBox; i++)
{
@@ -2348,14 +2348,14 @@ void nxagentFillRemoteRegion(DrawablePtr pDrawable, RegionPtr pRegion)
int nrects;
int i;
- if (REGION_NIL(pRegion) == 1)
+ if (RegionNil(pRegion) == 1)
{
return;
}
pGC = nxagentGetGraphicContext(pDrawable);
- nrects = REGION_NUM_RECTS(pRegion);
+ nrects = RegionNumRects(pRegion);
#ifdef TEST
fprintf(stderr, "nxagentFillRemoteRegion: Going to fill remote region [%d,%d,%d,%d] rects [%d] with color [%lu].\n",
@@ -2372,7 +2372,7 @@ void nxagentFillRemoteRegion(DrawablePtr pDrawable, RegionPtr pRegion)
}
else
{
- pBox = REGION_RECTS(pRegion);
+ pBox = RegionRects(pRegion);
pRects = xalloc(nrects * sizeof(XRectangle));
@@ -2440,7 +2440,7 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
np = nPoints;
xp = pPoints;
- pRegion = REGION_CREATE(pDrawable -> pScreen, NullBox, 1);
+ pRegion = RegionCreate(NullBox, 1);
while (np--)
{
@@ -2465,28 +2465,28 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
* this loop could become less expensive.
*/
- REGION_INIT(pDrawable -> pScreen, &tmpRegion, &box, 1);
+ RegionInit(&tmpRegion, &box, 1);
- REGION_UNION(pDrawable -> pScreen, pRegion, pRegion, &tmpRegion);
+ RegionUnion(pRegion, pRegion, &tmpRegion);
- REGION_UNINIT(pDrawable -> pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
xp++;
}
- extents = *REGION_EXTENTS(pDrawable -> pScreen, pRegion);
+ extents = *RegionExtents(pRegion);
- REGION_RESET(pDrawable -> pScreen, pRegion, &extents);
+ RegionReset(pRegion, &extents);
#ifdef TEST
fprintf(stderr, "nxagentPointsToDirtyRegion: The resulting dirty region has [%ld] rects and"
- " extents (%d,%d,%d,%d).\n", REGION_NUM_RECTS(pRegion), extents.x1,
+ " extents (%d,%d,%d,%d).\n", RegionNumRects(pRegion), extents.x1,
extents.y1, extents.x2, extents.y2);
#endif
nxagentMarkCorruptedRegion(pDrawable, pRegion);
- REGION_DESTROY(pDrawable -> pScreen, pRegion);
+ RegionDestroy(pRegion);
}
#ifdef DUMP
@@ -2533,20 +2533,20 @@ void nxagentCorruptedRegionOnWindow(void *p0, XID x, void *p2)
clipRegion = nxagentCreateRegion((DrawablePtr) pWin, NULL, 0, 0,
pWin -> drawable.width, pWin -> drawable.height);
- REGION_INIT(pWin -> drawable.pScreen, &visRegion, NullBox, 1);
+ RegionInit(&visRegion, NullBox, 1);
- REGION_INTERSECT(pWin -> drawable.pScreen, &visRegion, clipRegion, nxagentCorruptedRegion((DrawablePtr) pWin));
+ RegionIntersect(&visRegion, clipRegion, nxagentCorruptedRegion((DrawablePtr) pWin));
nxagentFreeRegion(pWin -> drawable.pScreen, clipRegion);
- if (REGION_NIL(&visRegion) == 1)
+ if (RegionNil(&visRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentCorruptedRegionOnWindow: The corrupted region of window at [%p] is hidden.\n",
(void *) pWin);
#endif
- REGION_UNINIT(pWin -> drawable.pScreen, &visRegion);
+ RegionUninit(&visRegion);
return;
}
@@ -2569,7 +2569,7 @@ void nxagentCorruptedRegionOnWindow(void *p0, XID x, void *p2)
gc = XCreateGC(nxagentDisplay, nxagentWindow(pWin), GCForeground | GCSubwindowMode, &value);
- nrectangles = REGION_NUM_RECTS(&visRegion);
+ nrectangles = RegionNumRects(&visRegion);
#ifdef TEST
fprintf(stderr, "nxagentCorruptedRegionOnWindow: Going to draw the region with extents [%d,%d,%d,%d] and [%d] rects.\n",
@@ -2594,7 +2594,7 @@ void nxagentCorruptedRegionOnWindow(void *p0, XID x, void *p2)
XFreeGC(nxagentDisplay, gc);
- REGION_UNINIT(pWin -> drawable.pScreen, &visRegion);
+ RegionUninit(&visRegion);
}
void nxagentRegionsOnScreen()
@@ -2673,9 +2673,9 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
pClipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
- REGION_INTERSECT(pDrawable -> pScreen, pClipRegion, pClipRegion, nxagentCorruptedRegion(pDrawable));
+ RegionIntersect(pClipRegion, pClipRegion, nxagentCorruptedRegion(pDrawable));
- if (REGION_NIL(pClipRegion) == 1)
+ if (RegionNil(pClipRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentCreateDrawableBitmap: The corrupted region is not visible. Skipping bitmap creation.\n");
@@ -2716,7 +2716,7 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
nxagentCopyArea(pDrawable, (DrawablePtr) pBitmap, pGC, x, y, w, h, x, y);
- REGION_UNION(pDrawable -> pScreen, nxagentCorruptedRegion((DrawablePtr) pBitmap),
+ RegionUnion(nxagentCorruptedRegion((DrawablePtr) pBitmap),
nxagentCorruptedRegion((DrawablePtr) pBitmap), pClipRegion);
if (pDrawable -> type == DRAWABLE_PIXMAP)
@@ -3002,19 +3002,19 @@ void nxagentUnmarkExposedRegion(WindowPtr pWin, RegionPtr pRegion, RegionPtr pOt
{
RegionRec clipRegion;
- if (pRegion != NullRegion && REGION_NIL(pRegion) == 0 &&
+ if (pRegion != NullRegion && RegionNil(pRegion) == 0 &&
nxagentDrawableStatus((DrawablePtr) pWin) == NotSynchronized)
{
- REGION_INIT(pWin -> drawable.pScreen, &clipRegion, NullBox, 1);
+ RegionInit(&clipRegion, NullBox, 1);
- REGION_COPY(pWin -> drawable.pScreen, &clipRegion, pRegion);
+ RegionCopy(&clipRegion, pRegion);
- if (pOther != NullRegion && REGION_NIL(pOther) == 0)
+ if (pOther != NullRegion && RegionNil(pOther) == 0)
{
- REGION_UNION(pWin -> drawable.pScreen, &clipRegion, &clipRegion, pOther);
+ RegionUnion(&clipRegion, &clipRegion, pOther);
}
- REGION_TRANSLATE(pWin -> drawable.pScreen, &clipRegion, -pWin -> drawable.x, -pWin -> drawable.y);
+ RegionTranslate(&clipRegion, -pWin -> drawable.x, -pWin -> drawable.y);
#ifdef TEST
fprintf(stderr, "nxagentUnmarkExposedRegion: Validating expose region [%d,%d,%d,%d] "
@@ -3024,7 +3024,7 @@ void nxagentUnmarkExposedRegion(WindowPtr pWin, RegionPtr pRegion, RegionPtr pOt
nxagentUnmarkCorruptedRegion((DrawablePtr) pWin, &clipRegion);
- REGION_UNINIT(pWin -> drawable.pScreen, &clipRegion);
+ RegionUninit(&clipRegion);
}
}
@@ -3061,7 +3061,7 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
RegionRec expose;
miBSWindowPtr pBackingStore;
- REGION_INIT(pWin -> pScreen, &expose, NullBox, 1);
+ RegionInit(&expose, NullBox, 1);
#ifdef DEBUG
fprintf(stderr, "nxagentSendBackgroundExpose: Original expose region is [%d,%d,%d,%d].\n",
@@ -3084,25 +3084,25 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
pWin -> drawable.width, pWin -> drawable.height);
#endif
- REGION_COPY(pWin -> pScreen, &expose, &pWin -> winSize);
+ RegionCopy(&expose, &pWin -> winSize);
}
else
{
- REGION_COPY(pWin -> pScreen, &expose, pExpose);
+ RegionCopy(&expose, pExpose);
- REGION_TRANSLATE(pWin -> pScreen, &expose, pWin -> drawable.x, pWin -> drawable.y);
+ RegionTranslate(&expose, pWin -> drawable.x, pWin -> drawable.y);
}
- REGION_SUBTRACT(pWin -> pScreen, &expose, &expose, nxagentCorruptedRegion((DrawablePtr) pWin));
+ RegionSubtract(&expose, &expose, nxagentCorruptedRegion((DrawablePtr) pWin));
- if (REGION_NIL(&pWin -> clipList) != 0)
+ if (RegionNil(&pWin -> clipList) != 0)
{
#ifdef TEST
fprintf(stderr, "nxagentSendBackgroundExpose: Exposures deferred because the window "
"is hidden.\n");
#endif
- REGION_UNION(pWin -> pScreen, nxagentDeferredBackgroundExposures,
+ RegionUnion(nxagentDeferredBackgroundExposures,
nxagentDeferredBackgroundExposures, &expose);
nxagentWindowPriv(pWin) -> deferredBackgroundExpose = 1;
@@ -3121,32 +3121,32 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
pBackingStore = (miBSWindowPtr)pWin->backStorage;
- if ((pBackingStore != NULL) && (REGION_NIL(&pBackingStore->SavedRegion) == 0))
+ if ((pBackingStore != NULL) && (RegionNil(&pBackingStore->SavedRegion) == 0))
{
- REGION_TRANSLATE(pWin -> pScreen, &expose, -pWin -> drawable.x, -pWin -> drawable.y);
+ RegionTranslate(&expose, -pWin -> drawable.x, -pWin -> drawable.y);
- REGION_SUBTRACT(pWin -> pScreen, &expose, &expose, &pBackingStore -> SavedRegion);
+ RegionSubtract(&expose, &expose, &pBackingStore -> SavedRegion);
- REGION_TRANSLATE(pWin -> pScreen, &expose, pWin -> drawable.x, pWin -> drawable.y);
+ RegionTranslate(&expose, pWin -> drawable.x, pWin -> drawable.y);
}
- REGION_INTERSECT(pWin -> pScreen, &expose, &expose, &pWin -> clipList);
+ RegionIntersect(&expose, &expose, &pWin -> clipList);
/*
* Reduce the overall region to expose.
*/
- REGION_TRANSLATE(pWin -> pScreen, &expose, -pWin -> drawable.x, -pWin -> drawable.y);
+ RegionTranslate(&expose, -pWin -> drawable.x, -pWin -> drawable.y);
- REGION_SUBTRACT(pWin -> pScreen, pExpose, pExpose, &expose);
+ RegionSubtract(pExpose, pExpose, &expose);
- REGION_TRANSLATE(pWin -> pScreen, &expose, pWin -> drawable.x, pWin -> drawable.y);
+ RegionTranslate(&expose, pWin -> drawable.x, pWin -> drawable.y);
miWindowExposures(pWin, &expose, &expose);
nxagentSendBackgroundExposeEnd:
- REGION_UNINIT(pWin -> pScreen, &expose);
+ RegionUninit(&expose);
}
void nxagentExposeBackgroundPredicate(void *p0, XID x1, void *p2)
@@ -3156,7 +3156,7 @@ void nxagentExposeBackgroundPredicate(void *p0, XID x1, void *p2)
struct nxagentExposeBackground *pPair = p2;
- if (REGION_NIL(pPair -> pExpose) != 0)
+ if (RegionNil(pPair -> pExpose) != 0)
{
return;
}
@@ -3217,21 +3217,21 @@ int nxagentClipAndSendClearExpose(WindowPtr pWin, void * ptr)
if (nxagentWindowPriv(pWin) -> deferredBackgroundExpose == 1)
{
- exposeRgn = REGION_CREATE(pWin -> drawable.pScreen, NULL, 1);
+ exposeRgn = RegionCreate(NULL, 1);
#ifdef DEBUG
- box = *REGION_EXTENTS(pWin->drawable.pScreen, remoteExposeRgn);
+ box = *RegionExtents(remoteExposeRgn);
fprintf(stderr, "nxagentClipAndSendClearExpose: Background expose extents: [%d,%d,%d,%d].\n",
box.x1, box.y1, box.x2, box.y2);
- box = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin -> clipList);
+ box = *RegionExtents(&pWin -> clipList);
fprintf(stderr, "nxagentClipAndSendClearExpose: Clip list extents for window at [%p]: [%d,%d,%d,%d].\n",
(void *) pWin, box.x1, box.y1, box.x2, box.y2);
#endif
- REGION_INTERSECT(pWin -> drawable.pScreen, exposeRgn, remoteExposeRgn, &pWin -> clipList);
+ RegionIntersect(exposeRgn, remoteExposeRgn, &pWin -> clipList);
/*
* If the region will be synchronized,
@@ -3239,28 +3239,28 @@ int nxagentClipAndSendClearExpose(WindowPtr pWin, void * ptr)
* be ignored.
*/
- REGION_SUBTRACT(pWin -> drawable.pScreen, exposeRgn, exposeRgn, nxagentCorruptedRegion((DrawablePtr) pWin));
+ RegionSubtract(exposeRgn, exposeRgn, nxagentCorruptedRegion((DrawablePtr) pWin));
- if (REGION_NOTEMPTY(pWin -> drawable.pScreen, exposeRgn))
+ if (RegionNotEmpty(exposeRgn))
{
#ifdef DEBUG
- box = *REGION_EXTENTS(pWin->drawable.pScreen, exposeRgn);
+ box = *RegionExtents(exposeRgn);
fprintf(stderr, "nxagentClipAndSendClearExpose: Forwarding expose [%d,%d,%d,%d] to window at [%p] pWin.\n",
box.x1, box.y1, box.x2, box.y2, (void *) pWin);
#endif
- REGION_SUBTRACT(pWin -> drawable.pScreen, remoteExposeRgn, remoteExposeRgn, exposeRgn);
+ RegionSubtract(remoteExposeRgn, remoteExposeRgn, exposeRgn);
miWindowExposures(pWin, exposeRgn, exposeRgn);
}
- REGION_DESTROY(pWin -> drawable.pScreen, exposeRgn);
+ RegionDestroy(exposeRgn);
nxagentWindowPriv(pWin) -> deferredBackgroundExpose = 0;
}
- if (REGION_NOTEMPTY(pWin -> drawable.pScreen, remoteExposeRgn))
+ if (RegionNotEmpty(remoteExposeRgn))
{
#ifdef DEBUG
fprintf(stderr, "nxagentClipAndSendClearExpose: Region not empty. Walk children.\n");
@@ -3283,10 +3283,10 @@ void nxagentSendDeferredBackgroundExposures(void)
{
if (nxagentDeferredBackgroundExposures == NullRegion)
{
- nxagentDeferredBackgroundExposures = REGION_CREATE(WindowTable[0] -> drawable.pScreen, NullBox, 1);
+ nxagentDeferredBackgroundExposures = RegionCreate(NullBox, 1);
}
- if (REGION_NOTEMPTY(WindowTable[0] -> drawable.pScreen, nxagentDeferredBackgroundExposures) != 0)
+ if (RegionNotEmpty(nxagentDeferredBackgroundExposures) != 0)
{
#ifdef TEST
fprintf(stderr, "nxagentSendDeferredBackgroundExposures: Going to send deferred exposures to the root window.\n");
@@ -3294,7 +3294,7 @@ void nxagentSendDeferredBackgroundExposures(void)
TraverseTree(WindowTable[0], nxagentClipAndSendClearExpose, (void *) nxagentDeferredBackgroundExposures);
- REGION_EMPTY(WindowTable[0] -> drawable.pScreen, nxagentDeferredBackgroundExposures);
+ RegionEmpty(nxagentDeferredBackgroundExposures);
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.h b/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
index 4ebbc928e..d05eebf19 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.h
@@ -107,7 +107,7 @@ enum SynchronizationPredicate
nxagentWindowCorruptedRegion((WindowPtr) pDrawable))
#define nxagentDrawableStatus(pDrawable) \
- (REGION_NIL(nxagentCorruptedRegion(pDrawable)) ? \
+ (RegionNil(nxagentCorruptedRegion(pDrawable)) ? \
Synchronized : NotSynchronized)
#define nxagentDrawableContainGlyphs(pDrawable) \
@@ -155,7 +155,7 @@ extern RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, in
int width, int height);
#define nxagentFreeRegion(pDrawable, pRegion) \
- REGION_DESTROY((pDrawable) -> pScreen, pRegion);
+ RegionDestroy(pRegion);
extern void nxagentMarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion);
extern void nxagentUnmarkCorruptedRegion(DrawablePtr pDrawable, RegionPtr pRegion);
@@ -204,8 +204,8 @@ do \
break; \
} \
\
- numRects = REGION_NUM_RECTS(pRegion); \
- pBox = REGION_RECTS(pRegion); \
+ numRects = RegionNumRects(pRegion); \
+ pBox = RegionRects(pRegion); \
\
fprintf(stderr, "printRegionBoxes:: Region " strRegion " at [%p] has [%d] boxes:\n", \
(void *) (pRegion), numRects); \
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index c04481c92..d1d1a5f59 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -2414,7 +2414,7 @@ int nxagentHandleExposeEvent(XEvent *X)
if (pWin != NULL)
{
- REGION_INIT(pWin -> drawable.pScreen, &sum, (BoxRec *) NULL, 1);
+ RegionInit(&sum, (BoxRec *) NULL, 1);
/*
FIXME: This can be maybe optimized by consuming the
events that do not match the predicate.
@@ -2445,11 +2445,11 @@ FIXME: This can be maybe optimized by consuming the
box.x2 = box.x1 + X -> xexpose.width;
box.y2 = box.y1 + X -> xexpose.height;
- REGION_INIT(pWin -> drawable.pScreen, &add, &box, 1);
+ RegionInit(&add, &box, 1);
- REGION_APPEND(pWin -> drawable.pScreen, &sum, &add);
+ RegionAppend(&sum, &add);
- REGION_UNINIT(pWin -> drawable.pScreen, &add);
+ RegionUninit(&add);
if (X -> xexpose.count == 0)
{
@@ -2459,9 +2459,9 @@ FIXME: This can be maybe optimized by consuming the
while (nxagentCheckEvents(nxagentDisplay, X, nxagentExposurePredicate,
(XPointer) &window) == 1);
- REGION_VALIDATE(pWin -> drawable.pScreen, &sum, &overlap);
+ RegionValidate(&sum, &overlap);
- REGION_INTERSECT(pWin->drawable.pScreen, &sum, &sum,
+ RegionIntersect(&sum, &sum,
&WindowTable[pWin->drawable.pScreen->myNum]->winSize);
#ifdef DEBUG
@@ -2482,14 +2482,14 @@ FIXME: This can be maybe optimized by consuming the
}
else
{
- REGION_TRANSLATE(pWin -> drawable.pScreen, &sum, -pWin -> drawable.x, -pWin -> drawable.y);
+ RegionTranslate(&sum, -pWin -> drawable.x, -pWin -> drawable.y);
if (nxagentExposeQueue.exposures[index].remoteRegion == NullRegion)
{
- nxagentExposeQueue.exposures[index].remoteRegion = REGION_CREATE(pwin -> drawable.pScreen, NULL, 1);
+ nxagentExposeQueue.exposures[index].remoteRegion = RegionCreate(NULL, 1);
}
- REGION_UNION(pWin -> drawable.pScreen, nxagentExposeQueue.exposures[index].remoteRegion,
+ RegionUnion(nxagentExposeQueue.exposures[index].remoteRegion,
nxagentExposeQueue.exposures[index].remoteRegion, &sum);
#ifdef TEST
@@ -2521,7 +2521,7 @@ FIXME: This can be maybe optimized by consuming the
}
}
- REGION_UNINIT(pWin -> drawable.pScreen, &sum);
+ RegionUninit(&sum);
}
return 1;
@@ -2593,7 +2593,7 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
rect.x2 = rect.x1 + X -> xgraphicsexpose.width;
rect.y2 = rect.y1 + X -> xgraphicsexpose.height;
- exposeRegion = REGION_CREATE(pScreen, &rect, 0);
+ exposeRegion = RegionCreate(&rect, 0);
if (drawableType == DRAWABLE_PIXMAP)
{
@@ -2610,7 +2610,7 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
* window.
*/
- REGION_TRANSLATE(pScreen, exposeRegion, pStoringPixmapRec -> backingStoreX,
+ RegionTranslate(exposeRegion, pStoringPixmapRec -> backingStoreX,
pStoringPixmapRec -> backingStoreY);
/*
@@ -2618,7 +2618,7 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
* affected by the GraphicsExpose event.
*/
- REGION_SUBTRACT(pScreen, &(pBSwindow -> SavedRegion), &(pBSwindow -> SavedRegion),
+ RegionSubtract(&(pBSwindow -> SavedRegion), &(pBSwindow -> SavedRegion),
exposeRegion);
}
@@ -2628,11 +2628,11 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X)
* must be relative to the screen.
*/
- REGION_TRANSLATE(pScreen, exposeRegion, pWin -> drawable.x, pWin -> drawable.y);
+ RegionTranslate(exposeRegion, pWin -> drawable.x, pWin -> drawable.y);
- REGION_UNION(pScreen, nxagentRemoteExposeRegion, nxagentRemoteExposeRegion, exposeRegion);
+ RegionUnion(nxagentRemoteExposeRegion, nxagentRemoteExposeRegion, exposeRegion);
- REGION_DESTROY(pScreen, exposeRegion);
+ RegionDestroy(exposeRegion);
return 1;
}
@@ -4091,30 +4091,30 @@ void nxagentSynchronizeExpose(void)
{
if ((nxagentExposeQueueHead.localRegion) != NullRegion)
{
- REGION_TRANSLATE(pWin -> drawable.pScreen, (nxagentExposeQueueHead.localRegion),
+ RegionTranslate((nxagentExposeQueueHead.localRegion),
pWin -> drawable.x, pWin -> drawable.y);
}
if ((nxagentExposeQueueHead.remoteRegion) != NullRegion)
{
- REGION_TRANSLATE(pWin -> drawable.pScreen, (nxagentExposeQueueHead.remoteRegion),
+ RegionTranslate((nxagentExposeQueueHead.remoteRegion),
pWin -> drawable.x, pWin -> drawable.y);
}
if ((nxagentExposeQueueHead.localRegion) != NullRegion &&
(nxagentExposeQueueHead.remoteRegion) != NullRegion)
{
- REGION_SUBTRACT(pWin -> drawable.pScreen, (nxagentExposeQueueHead.remoteRegion),
+ RegionSubtract((nxagentExposeQueueHead.remoteRegion),
(nxagentExposeQueueHead.remoteRegion),
(nxagentExposeQueueHead.localRegion));
- if (REGION_NIL(nxagentExposeQueueHead.remoteRegion) == 0 &&
+ if (RegionNil(nxagentExposeQueueHead.remoteRegion) == 0 &&
((pWin -> eventMask|wOtherEventMasks(pWin)) & ExposureMask))
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeExpose: Going to call miWindowExposures"
" for window [%ld] - rects [%ld].\n", nxagentWindow(pWin),
- REGION_NUM_RECTS(nxagentExposeQueueHead.remoteRegion));
+ RegionNumRects(nxagentExposeQueueHead.remoteRegion));
#endif
miWindowExposures(pWin, nxagentExposeQueueHead.remoteRegion, NullRegion);
@@ -4126,14 +4126,14 @@ void nxagentSynchronizeExpose(void)
if (nxagentExposeQueueHead.localRegion != NullRegion)
{
- REGION_DESTROY(nxagentDefaultScreen, nxagentExposeQueueHead.localRegion);
+ RegionDestroy(nxagentExposeQueueHead.localRegion);
}
nxagentExposeQueueHead.localRegion = NullRegion;
if (nxagentExposeQueueHead.remoteRegion != NullRegion)
{
- REGION_DESTROY(nxagentDefaultScreen, nxagentExposeQueueHead.remoteRegion);
+ RegionDestroy(nxagentExposeQueueHead.remoteRegion);
}
nxagentExposeQueueHead.remoteRegion = NullRegion;
@@ -4260,7 +4260,7 @@ void nxagentInitRemoteExposeRegion(void)
{
if (nxagentRemoteExposeRegion == NULL)
{
- nxagentRemoteExposeRegion = REGION_CREATE(pWin -> drawable.pScreen, NULL, 1);
+ nxagentRemoteExposeRegion = RegionCreate(NULL, 1);
if (nxagentRemoteExposeRegion == NULL)
{
@@ -4273,7 +4273,7 @@ void nxagentInitRemoteExposeRegion(void)
void nxagentForwardRemoteExpose(void)
{
- if (REGION_NOTEMPTY(WindowTable[0] -> drawable.pScreen, nxagentRemoteExposeRegion))
+ if (RegionNotEmpty(nxagentRemoteExposeRegion))
{
#ifdef DEBUG
fprintf(stderr, "nxagentForwardRemoteExpose: Going to forward events.\n");
@@ -4285,7 +4285,7 @@ void nxagentForwardRemoteExpose(void)
* Now this region should be empty.
*/
- REGION_EMPTY(WindowTable[0] -> drawable.pScreen, nxagentRemoteExposeRegion);
+ RegionEmpty(nxagentRemoteExposeRegion);
}
}
@@ -4298,12 +4298,12 @@ void nxagentAddRectToRemoteExposeRegion(BoxPtr rect)
return;
}
- REGION_INIT(nxagentDefaultScreen, &exposeRegion, rect, 1);
+ RegionInit(&exposeRegion, rect, 1);
- REGION_UNION(nxagentDefaultScreen, nxagentRemoteExposeRegion,
+ RegionUnion(nxagentRemoteExposeRegion,
nxagentRemoteExposeRegion, &exposeRegion);
- REGION_UNINIT(nxagentDefaultScreen, &exposeRegion);
+ RegionUninit(&exposeRegion);
}
int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr)
@@ -4320,25 +4320,25 @@ int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr)
if (pWin -> drawable.class != InputOnly)
{
- exposeRgn = REGION_CREATE(pWin -> drawable.pScreen, NULL, 1);
+ exposeRgn = RegionCreate(NULL, 1);
- box = *REGION_EXTENTS(pWin->drawable.pScreen, remoteExposeRgn);
+ box = *RegionExtents(remoteExposeRgn);
#ifdef DEBUG
fprintf(stderr, "nxagentClipAndSendExpose: Root expose extents: [%d] [%d] [%d] [%d].\n",
box.x1, box.y1, box.x2, box.y2);
#endif
- box = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin -> clipList);
+ box = *RegionExtents(&pWin -> clipList);
#ifdef DEBUG
fprintf(stderr, "nxagentClipAndSendExpose: Clip list extents for window at [%p]: [%d] [%d] [%d] [%d].\n",
pWin, box.x1, box.y1, box.x2, box.y2);
#endif
- REGION_INTERSECT(pWin -> drawable.pScreen, exposeRgn, remoteExposeRgn, &pWin -> clipList);
+ RegionIntersect(exposeRgn, remoteExposeRgn, &pWin -> clipList);
- if (REGION_NOTEMPTY(pWin -> drawable.pScreen, exposeRgn))
+ if (RegionNotEmpty(exposeRgn))
{
#ifdef DEBUG
fprintf(stderr, "nxagentClipAndSendExpose: Forwarding expose to window at [%p] pWin.\n",
@@ -4351,15 +4351,15 @@ int nxagentClipAndSendExpose(WindowPtr pWin, void * ptr)
* ration must be done before calling it.
*/
- REGION_SUBTRACT(pWin -> drawable.pScreen, remoteExposeRgn, remoteExposeRgn, exposeRgn);
+ RegionSubtract(remoteExposeRgn, remoteExposeRgn, exposeRgn);
miWindowExposures(pWin, exposeRgn, NullRegion);
}
- REGION_DESTROY(pWin -> drawable.pScreen, exposeRgn);
+ RegionDestroy(exposeRgn);
}
- if (REGION_NOTEMPTY(pWin -> drawable.pScreen, remoteExposeRgn))
+ if (RegionNotEmpty(remoteExposeRgn))
{
#ifdef DEBUG
fprintf(stderr, "nxagentClipAndSendExpose: Region not empty. Walk children.\n");
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c
index 808220346..c06e56a00 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GC.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c
@@ -633,11 +633,11 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
case CT_YXSORTED:
case CT_YXBANDED:
{
- RegionPtr pReg = RECTS_TO_REGION(pGC->pScreen, nRects, (xRectangle *)pValue, type);
+ RegionPtr pReg = RegionFromRects(nRects, (xRectangle *)pValue, type);
clipsMatch = nxagentCompareRegions(pGC -> clientClip, pReg);
- REGION_DESTROY(pGC->pScreen, pReg);
+ RegionDestroy(pReg);
break;
}
@@ -671,10 +671,10 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
{
if (clipsMatch == 0 && nxagentGCTrap == 0)
{
- nRects = REGION_NUM_RECTS((RegionPtr)pValue);
+ nRects = RegionNumRects((RegionPtr)pValue);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) xalloc(size);
- pBox = REGION_RECTS((RegionPtr)pValue);
+ pBox = RegionRects((RegionPtr)pValue);
for (i = nRects; i-- > 0;)
{
@@ -768,7 +768,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
* CT_REGION client clips.
*/
- pGC->clientClip = (void *) RECTS_TO_REGION(pGC->pScreen, nRects,
+ pGC->clientClip = (void *) RegionFromRects(nRects,
(xRectangle *)pValue, type);
xfree(pValue);
@@ -820,7 +820,7 @@ void nxagentDestroyClipHelper(GCPtr pGC)
case CT_NONE:
break;
case CT_REGION:
- REGION_DESTROY(pGC->pScreen, pGC->clientClip);
+ RegionDestroy(pGC->clientClip);
break;
case CT_PIXMAP:
nxagentDestroyPixmap((PixmapPtr)pGC->clientClip);
@@ -848,8 +848,8 @@ void nxagentCopyClip(GCPtr pGCDst, GCPtr pGCSrc)
case CT_REGION:
if (nxagentGCPriv(pGCSrc)->pPixmap == NULL)
{
- pRgn = REGION_CREATE(pGCDst->pScreen, NULL, 1);
- REGION_COPY(pGCDst->pScreen, pRgn, pGCSrc->clientClip);
+ pRgn = RegionCreate(NULL, 1);
+ RegionCopy(pRgn, pGCSrc->clientClip);
nxagentChangeClip(pGCDst, CT_REGION, pRgn, 0);
}
else
@@ -1281,10 +1281,10 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
case CT_REGION:
if (nxagentGCPriv(pGC)->pPixmap == NULL)
{
- nRects = REGION_NUM_RECTS((RegionPtr)pValue);
+ nRects = RegionNumRects((RegionPtr)pValue);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) xalloc(size);
- pBox = REGION_RECTS((RegionPtr)pValue);
+ pBox = RegionRects((RegionPtr)pValue);
for (i = nRects; i-- > 0;) {
pRects[i].x = pBox[i].x1;
pRects[i].y = pBox[i].y1;
@@ -1370,7 +1370,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
* CT_PIXMAP and CT_REGION client clips.
*/
- pGC->clientClip = (void *) RECTS_TO_REGION(pGC->pScreen, nRects,
+ pGC->clientClip = (void *) RegionFromRects(nRects,
(xRectangle *)pValue, type);
xfree(pValue);
pValue = pGC->clientClip;
@@ -1403,26 +1403,26 @@ static int nxagentCompareRegions(RegionPtr r1, RegionPtr r2)
return 0;
}
- if (REGION_NUM_RECTS(r1) != REGION_NUM_RECTS(r2))
+ if (RegionNumRects(r1) != RegionNumRects(r2))
{
return 0;
}
- else if (REGION_NUM_RECTS(r1) == 0)
+ else if (RegionNumRects(r1) == 0)
{
return 1;
}
- else if ((*REGION_EXTENTS(pScreen, r1)).x1 != (*REGION_EXTENTS(pScreen, r2)).x1) return 0;
- else if ((*REGION_EXTENTS(pScreen, r1)).x2 != (*REGION_EXTENTS(pScreen, r2)).x2) return 0;
- else if ((*REGION_EXTENTS(pScreen, r1)).y1 != (*REGION_EXTENTS(pScreen, r2)).y1) return 0;
- else if ((*REGION_EXTENTS(pScreen, r1)).y2 != (*REGION_EXTENTS(pScreen, r2)).y2) return 0;
+ else if ((*RegionExtents(r1)).x1 != (*RegionExtents(r2)).x1) return 0;
+ else if ((*RegionExtents(r1)).x2 != (*RegionExtents(r2)).x2) return 0;
+ else if ((*RegionExtents(r1)).y1 != (*RegionExtents(r2)).y1) return 0;
+ else if ((*RegionExtents(r1)).y2 != (*RegionExtents(r2)).y2) return 0;
else
{
- for (i = 0; i < REGION_NUM_RECTS(r1); i++)
+ for (i = 0; i < RegionNumRects(r1); i++)
{
- if (REGION_RECTS(r1)[i].x1 != REGION_RECTS(r2)[i].x1) return 0;
- else if (REGION_RECTS(r1)[i].x2 != REGION_RECTS(r2)[i].x2) return 0;
- else if (REGION_RECTS(r1)[i].y1 != REGION_RECTS(r2)[i].y1) return 0;
- else if (REGION_RECTS(r1)[i].y2 != REGION_RECTS(r2)[i].y2) return 0;
+ if (RegionRects(r1)[i].x1 != RegionRects(r2)[i].x1) return 0;
+ else if (RegionRects(r1)[i].x2 != RegionRects(r2)[i].x2) return 0;
+ else if (RegionRects(r1)[i].y1 != RegionRects(r2)[i].y1) return 0;
+ else if (RegionRects(r1)[i].y2 != RegionRects(r2)[i].y2) return 0;
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
index 25f5fa6d7..604b1d85a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c
@@ -306,12 +306,12 @@ FIXME: The popup could be synchronized with one
pSrcRegion -> extents.x2, pSrcRegion -> extents.y2);
#endif
- REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1);
+ RegionInit(&corruptedRegion, NullBox, 1);
- REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion,
+ RegionIntersect(&corruptedRegion,
pSrcRegion, nxagentCorruptedRegion(pSrcDrawable));
- if (REGION_NIL(&corruptedRegion) == 0)
+ if (RegionNil(&corruptedRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].\n",
@@ -321,7 +321,7 @@ FIXME: The popup could be synchronized with one
nxagentSynchronizeRegion(pSrcDrawable, &corruptedRegion, EVENT_BREAK, NULL);
}
- REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion);
+ RegionUninit(&corruptedRegion);
nxagentFreeRegion(pSrcDrawable, pSrcRegion);
@@ -361,7 +361,7 @@ FIXME: The popup could be synchronized with one
pClipRegion -> extents.x2, pClipRegion -> extents.y2);
#endif
- REGION_SUBTRACT(pSrcDrawable -> pScreen, pClipRegion, pClipRegion, nxagentCorruptedRegion(pSrcDrawable));
+ RegionSubtract(pClipRegion, pClipRegion, nxagentCorruptedRegion(pSrcDrawable));
#ifdef DEBUG
fprintf(stderr, "nxagentDeferCopyArea: Usable copy area source region is [%d,%d,%d,%d].\n",
@@ -381,11 +381,11 @@ FIXME: The popup could be synchronized with one
#endif
- REGION_TRANSLATE(pSrcDrawable -> pScreen, pClipRegion, dstx - srcx, dsty - srcy);
+ RegionTranslate(pClipRegion, dstx - srcx, dsty - srcy);
}
else
{
- REGION_INIT(pDstDrawable -> pScreen, &tmpRegion, NullBox, 1);
+ RegionInit(&tmpRegion, NullBox, 1);
#ifdef DEBUG
fprintf(stderr, "nxagentDeferCopyArea: Going to modify the original GC [%p] with clip mask "
@@ -396,18 +396,18 @@ FIXME: The popup could be synchronized with one
pGC -> clipOrg.x, pGC -> clipOrg.y);
#endif
- REGION_COPY(pDstDrawable -> pScreen, &tmpRegion, (RegionPtr) pGC -> clientClip);
+ RegionCopy(&tmpRegion, (RegionPtr) pGC -> clientClip);
if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0)
{
- REGION_TRANSLATE(pDstDrawable -> pScreen, &tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
+ RegionTranslate(&tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
}
- REGION_TRANSLATE(pSrcDrawable -> pScreen, pClipRegion, dstx - srcx, dsty - srcy);
+ RegionTranslate(pClipRegion, dstx - srcx, dsty - srcy);
- REGION_INTERSECT(pSrcDrawable -> pScreen, pClipRegion, &tmpRegion, pClipRegion);
+ RegionIntersect(pClipRegion, &tmpRegion, pClipRegion);
- REGION_UNINIT(pSrcDrawable -> pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
/*
@@ -416,18 +416,18 @@ FIXME: The popup could be synchronized with one
* destination that we are not going to copy.
*/
- REGION_SUBTRACT(pSrcDrawable -> pScreen, pCorruptedRegion, pCorruptedRegion, pClipRegion);
+ RegionSubtract(pCorruptedRegion, pCorruptedRegion, pClipRegion);
#ifdef DEBUG
fprintf(stderr, "nxagentDeferCopyArea: Recomputed clip region is [%d,%d,%d,%d][%ld].\n",
pClipRegion -> extents.x1, pClipRegion -> extents.y1,
pClipRegion -> extents.x2, pClipRegion -> extents.y2,
- REGION_NUM_RECTS(pClipRegion));
+ RegionNumRects(pClipRegion));
fprintf(stderr, "nxagentDeferCopyArea: Inherited corrupted region is [%d,%d,%d,%d][%ld].\n",
pCorruptedRegion -> extents.x1, pCorruptedRegion -> extents.y1,
pCorruptedRegion -> extents.x2, pCorruptedRegion -> extents.y2,
- REGION_NUM_RECTS(pCorruptedRegion));
+ RegionNumRects(pCorruptedRegion));
#endif
/*
@@ -435,17 +435,17 @@ FIXME: The popup could be synchronized with one
* synchronized and the corrupted region.
*/
- if (REGION_NIL(pClipRegion) == 0)
+ if (RegionNil(pClipRegion) == 0)
{
nxagentUnmarkCorruptedRegion(pDstDrawable, pClipRegion);
}
- if (REGION_NIL(pCorruptedRegion) == 0)
+ if (RegionNil(pCorruptedRegion) == 0)
{
nxagentMarkCorruptedRegion(pDstDrawable, pCorruptedRegion);
}
- if (REGION_NIL(pClipRegion) == 0)
+ if (RegionNil(pClipRegion) == 0)
{
GCPtr targetGC;
@@ -468,7 +468,7 @@ FIXME: The popup could be synchronized with one
GCClipXOrigin | GCClipYOrigin | GCClipMask | GCForeground |
GCBackground | GCGraphicsExposures);
- if (REGION_NUM_RECTS(pClipRegion) == 1)
+ if (RegionNumRects(pClipRegion) == 1)
{
/*
* If the region to copy is formed by one
@@ -563,12 +563,12 @@ FIXME: The popup could be synchronized with one
pSrcRegion -> extents.x2, pSrcRegion -> extents.y2);
#endif
- REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1);
+ RegionInit(&corruptedRegion, NullBox, 1);
- REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion,
+ RegionIntersect(&corruptedRegion,
pSrcRegion, nxagentCorruptedRegion(pSrcDrawable));
- if (REGION_NIL(&corruptedRegion) == 0)
+ if (RegionNil(&corruptedRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentDeferCopyArea: Forcing the synchronization of source drawable at [%p].\n",
@@ -578,7 +578,7 @@ FIXME: The popup could be synchronized with one
nxagentSynchronizeRegion(pSrcDrawable, &corruptedRegion /*pSrcRegion*/, NEVER_BREAK, NULL);
}
- REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion);
+ RegionUninit(&corruptedRegion);
nxagentFreeRegion(pSrcDrawable, pSrcRegion);
}
@@ -1032,12 +1032,12 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
{
pSrcRegion = nxagentCreateRegion(pSrcDrawable, NULL, srcx, srcy, width, height);
- REGION_INIT(pSrcDrawable -> pScreen, &corruptedRegion, NullBox, 1);
+ RegionInit(&corruptedRegion, NullBox, 1);
- REGION_INTERSECT(pSrcDrawable -> pScreen, &corruptedRegion,
+ RegionIntersect(&corruptedRegion,
pSrcRegion, nxagentCorruptedRegion(pSrcDrawable));
- if (REGION_NIL(&corruptedRegion) == 0)
+ if (RegionNil(&corruptedRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentCopyPlane: Forcing the synchronization of source drawable at [%p].\n",
@@ -1053,7 +1053,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
nxagentFreeRegion(pDstDrawable, pDstRegion);
}
- REGION_UNINIT(pSrcDrawable -> pScreen, &corruptedRegion);
+ RegionUninit(&corruptedRegion);
nxagentFreeRegion(pSrcDrawable, pSrcRegion);
}
@@ -1615,24 +1615,24 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
if (inheritCorruptedRegion == 1 || nxagentDrawableStatus(pDrawable) == NotSynchronized)
{
- rectRegion = RECTS_TO_REGION(pDrawable -> pScreen, nRectangles, pRectangles, CT_REGION);
+ rectRegion = RegionFromRects(nRectangles, pRectangles, CT_REGION);
if (pGC -> clientClip != NULL)
{
RegionRec tmpRegion;
- REGION_INIT(pDrawable -> pScreen, &tmpRegion, NullBox, 1);
+ RegionInit(&tmpRegion, NullBox, 1);
- REGION_COPY(pDrawable -> pScreen, &tmpRegion, ((RegionPtr) pGC -> clientClip));
+ RegionCopy(&tmpRegion, ((RegionPtr) pGC -> clientClip));
if (pGC -> clipOrg.x != 0 || pGC -> clipOrg.y != 0)
{
- REGION_TRANSLATE(pDrawable -> pScreen, &tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
+ RegionTranslate(&tmpRegion, pGC -> clipOrg.x, pGC -> clipOrg.y);
}
- REGION_INTERSECT(pDrawable -> pScreen, rectRegion, rectRegion, &tmpRegion);
+ RegionIntersect(rectRegion, rectRegion, &tmpRegion);
- REGION_UNINIT(pDrawable -> pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
if (inheritCorruptedRegion == 1)
@@ -1672,7 +1672,7 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC,
}
}
- REGION_DESTROY(pDrawable -> pScreen, rectRegion);
+ RegionDestroy(rectRegion);
}
if ((pDrawable)->type == DRAWABLE_PIXMAP)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index 1f0b735b0..c84d3b7ed 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -566,7 +566,7 @@ void nxagentPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
pRegion = nxagentCreateRegion(pDrawable, pGC, dstX, dstY, dstWidth, dstHeight);
- if (REGION_NIL(pRegion) == 1)
+ if (RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentPutImage: WARNING! Prevented operation on fully clipped "
@@ -1036,7 +1036,7 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
clipRegion = nxagentCreateRegion(pDrawable, pGC, x, y, w, h);
}
- if (clipRegion == NullRegion || REGION_NIL(clipRegion) == 0)
+ if (clipRegion == NullRegion || RegionNil(clipRegion) == 0)
{
nxagentPutSubImage(pDrawable, pGC, depth, x, y, w, h,
leftPad, format, data, pVisual);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c b/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c
index d18840dad..278e0727c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c
@@ -154,7 +154,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
#endif
/* short circuit for empty regions */
- if (!REGION_NOTEMPTY(pScreen, pRegion))
+ if (!RegionNotEmpty(pRegion))
return;
#ifdef COMPOSITE
@@ -169,7 +169,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y;
}
if (screen_x || screen_y)
- REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y);
+ RegionTranslate(pRegion, screen_x, screen_y);
#endif
if (pDrawable->type == DRAWABLE_WINDOW &&
@@ -177,22 +177,22 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
if (subWindowMode == ClipByChildren)
{
- REGION_INTERSECT(pScreen, pRegion, pRegion,
+ RegionIntersect(pRegion, pRegion,
&((WindowPtr)(pDrawable))->clipList);
}
else if (subWindowMode == IncludeInferiors)
{
RegionPtr pTempRegion =
NotClippedByChildren((WindowPtr)(pDrawable));
- REGION_INTERSECT(pScreen, pRegion, pRegion, pTempRegion);
- REGION_DESTROY(pScreen, pTempRegion);
+ RegionIntersect(pRegion, pRegion, pTempRegion);
+ RegionDestroy(pTempRegion);
}
/* If subWindowMode is set to an invalid value, don't perform
* any drawable-based clipping. */
}
- REGION_NULL (pScreen, &clippedRec);
+ RegionNull(&clippedRec);
for (; pDamage; pDamage = pNext)
{
pNext = pDamage->pNext;
@@ -240,7 +240,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
pDamageRegion = &clippedRec;
if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
- REGION_INTERSECT (pScreen, pDamageRegion, pRegion,
+ RegionIntersect(pDamageRegion, pRegion,
&((WindowPtr)(pDamage->pDrawable))->borderClip);
} else {
BoxRec box;
@@ -248,14 +248,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
box.y1 = draw_y;
box.x2 = draw_x + pDamage->pDrawable->width;
box.y2 = draw_y + pDamage->pDrawable->height;
- REGION_INIT(pScreen, &pixClip, &box, 1);
- REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip);
- REGION_UNINIT(pScreen, &pixClip);
+ RegionInit(&pixClip, &box, 1);
+ RegionIntersect(pDamageRegion, pRegion, &pixClip);
+ RegionUninit(&pixClip);
}
/*
* Short circuit empty results
*/
- if (!REGION_NOTEMPTY(pScreen, pDamageRegion))
+ if (!RegionNotEmpty(pDamageRegion))
continue;
}
@@ -270,39 +270,39 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* Move region to target coordinate space
*/
if (draw_x || draw_y)
- REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y);
+ RegionTranslate(pDamageRegion, -draw_x, -draw_y);
switch (pDamage->damageLevel) {
case DamageReportRawRegion:
(*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
break;
case DamageReportDeltaRegion:
- REGION_NULL (pScreen, &tmpRegion);
- REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, &pDamage->damage);
- if (REGION_NOTEMPTY (pScreen, &tmpRegion))
+ RegionNull(&tmpRegion);
+ RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
+ if (RegionNotEmpty(&tmpRegion))
{
- REGION_UNION(pScreen, &pDamage->damage,
+ RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
(*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
}
- REGION_UNINIT(pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
break;
case DamageReportBoundingBox:
- tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage);
- REGION_UNION(pScreen, &pDamage->damage,
+ tmpBox = *RegionExtents(&pDamage->damage);
+ RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
- if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &pDamage->damage)))
+ if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage)))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNonEmpty:
- was_empty = !REGION_NOTEMPTY(pScreen, &pDamage->damage);
- REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
+ was_empty = !RegionNotEmpty(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
- if (was_empty && REGION_NOTEMPTY(pScreen, &pDamage->damage))
+ if (was_empty && RegionNotEmpty(&pDamage->damage))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNone:
- REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
+ RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
break;
}
@@ -310,14 +310,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* translate original region back
*/
if (pDamageRegion == pRegion && (draw_x || draw_y))
- REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y);
+ RegionTranslate(pDamageRegion, draw_x, draw_y);
}
#ifdef COMPOSITE
if (screen_x || screen_y)
- REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y);
+ RegionTranslate(pRegion, -screen_x, -screen_y);
#endif
- REGION_UNINIT (pScreen, &clippedRec);
+ RegionUninit(&clippedRec);
}
#if DAMAGE_DEBUG_ENABLE
@@ -331,13 +331,13 @@ damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode)
{
RegionRec region;
- REGION_INIT (pDrawable->pScreen, &region, pBox, 1);
+ RegionInit(&region, pBox, 1);
#if DAMAGE_DEBUG_ENABLE
_damageDamageRegion (pDrawable, &region, TRUE, subWindowMode, where);
#else
damageDamageRegion (pDrawable, &region, TRUE, subWindowMode);
#endif
- REGION_UNINIT (pDrawable->pScreen, &region);
+ RegionUninit(&region);
}
static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
@@ -506,7 +506,7 @@ damageDestroyClip(GCPtr pGC)
#define checkGCDamage(d,g) (getDrawableDamage(d) && \
(!g->pCompositeClip ||\
- REGION_NOTEMPTY(d->pScreen, \
+ RegionNotEmpty(\
g->pCompositeClip)))
#ifdef RENDER
@@ -520,7 +520,7 @@ damageDestroyClip(GCPtr pGC)
}
#define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \
- REGION_NOTEMPTY(pScreen, p->pCompositeClip))
+ RegionNotEmpty(p->pCompositeClip))
static void
damageComposite (CARD8 op,
@@ -1722,9 +1722,9 @@ damageCopyWindow(WindowPtr pWindow,
* The region comes in source relative, but the damage occurs
* at the destination location. Translate back and forth.
*/
- REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
+ RegionTranslate(prgnSrc, dx, dy);
damageDamageRegion (&pWindow->drawable, prgnSrc, FALSE, -1);
- REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
}
unwrap (pScrPriv, pScreen, CopyWindow);
(*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
@@ -1927,7 +1927,7 @@ DamageCreate (DamageReportFunc damageReport,
return 0;
pDamage->pNext = 0;
pDamage->pNextWin = 0;
- REGION_NULL(pScreen, &pDamage->damage);
+ RegionNull(&pDamage->damage);
pDamage->damageLevel = damageLevel;
pDamage->isInternal = isInternal;
@@ -2016,7 +2016,7 @@ DamageDestroy (DamagePtr pDamage)
{
if (pDamage->damageDestroy)
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
- REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->damage);
+ RegionUninit(&pDamage->damage);
xfree (pDamage);
}
@@ -2028,7 +2028,7 @@ DamageSubtract (DamagePtr pDamage,
RegionRec pixmapClip;
DrawablePtr pDrawable = pDamage->pDrawable;
- REGION_SUBTRACT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pRegion);
+ RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
if (pDrawable)
{
if (pDrawable->type == DRAWABLE_WINDOW)
@@ -2041,22 +2041,22 @@ DamageSubtract (DamagePtr pDamage,
box.y1 = pDrawable->y;
box.x2 = pDrawable->x + pDrawable->width;
box.y2 = pDrawable->y + pDrawable->height;
- REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1);
+ RegionInit(&pixmapClip, &box, 1);
pClip = &pixmapClip;
}
- REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
- REGION_INTERSECT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pClip);
- REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y);
+ RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
+ RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
+ RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
if (pDrawable->type != DRAWABLE_WINDOW)
- REGION_UNINIT(pDrawable->pScreen, &pixmapClip);
+ RegionUninit(&pixmapClip);
}
- return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage);
+ return RegionNotEmpty(&pDamage->damage);
}
void
DamageEmpty (DamagePtr pDamage)
{
- REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage);
+ RegionEmpty(&pDamage->damage);
}
RegionPtr
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 704bfcc0d..6a1f2ac6a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -1669,11 +1669,11 @@ ProcTranslateCoords(register ClientPtr client)
* borderSize
*/
&& (!wBoundingShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
&pWin->borderSize, x, y, &box))
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
@@ -2291,7 +2291,7 @@ ProcCopyArea(register ClientPtr client)
(*pDst->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
if (pRgn)
- REGION_DESTROY(pDst->pScreen, pRgn);
+ RegionDestroy(pRgn);
}
return(client->noClientException);
@@ -2339,7 +2339,7 @@ ProcCopyPlane(register ClientPtr client)
(*pdstDraw->pScreen->SendGraphicsExpose)
(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
if (pRgn)
- REGION_DESTROY(pdstDraw->pScreen, pRgn);
+ RegionDestroy(pRgn);
}
return(client->noClientException);
}
@@ -2777,7 +2777,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw);
if (pVisibleRegion)
{
- REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y);
+ RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y);
}
}
#endif
@@ -2871,7 +2871,7 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable,
}
#ifdef XCSECURITY
if (pVisibleRegion)
- REGION_DESTROY(pDraw->pScreen, pVisibleRegion);
+ RegionDestroy(pVisibleRegion);
#endif
if (!im_return)
DEALLOCATE_LOCAL(pBuf);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 11ff62947..117203103 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -379,14 +379,14 @@ XineramaSetCursorPosition(
x += panoramiXdataPtr[0].x;
y += panoramiXdataPtr[0].y;
- if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
+ if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
x, y, &box))
{
FOR_NSCREENS(i)
{
if(i == pScreen->myNum)
continue;
- if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box))
+ if(RegionContainsPoint(&XineramaScreenRegions[i], x, y, &box))
{
pScreen = screenInfo.screens[i];
break;
@@ -516,7 +516,7 @@ XineramaCheckVirtualMotion(
i = PanoramiXNumScreens - 1;
- REGION_COPY(sprite.screen, &sprite.Reg2,
+ RegionCopy(&sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
@@ -526,16 +526,16 @@ XineramaCheckVirtualMotion(
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
- REGION_TRANSLATE(sprite.screen, &sprite.Reg2, x, y);
+ RegionTranslate(&sprite.Reg2, x, y);
- REGION_UNION(sprite.screen, &sprite.Reg2, &sprite.Reg2,
+ RegionUnion(&sprite.Reg2, &sprite.Reg2,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
- lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2);
+ lims = *RegionExtents(&sprite.Reg2);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
@@ -558,7 +558,7 @@ XineramaCheckVirtualMotion(
#endif
sprite.hot.y = lims.y2 - 1;
- if (REGION_NUM_RECTS(&sprite.Reg2) > 1)
+ if (RegionNumRects(&sprite.Reg2) > 1)
ConfineToShape(&sprite.Reg2, &sprite.hot.x, &sprite.hot.y);
if (qe)
@@ -665,7 +665,7 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
i = PanoramiXNumScreens - 1;
- REGION_COPY(sprite.screen, &sprite.Reg1,
+ RegionCopy(&sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
@@ -675,18 +675,18 @@ XineramaConfineCursorToWindow(WindowPtr pWin, Bool generateEvents)
y = off_y - panoramiXdataPtr[i].y;
if(x || y)
- REGION_TRANSLATE(sprite.screen, &sprite.Reg1, x, y);
+ RegionTranslate(&sprite.Reg1, x, y);
- REGION_UNION(sprite.screen, &sprite.Reg1, &sprite.Reg1,
+ RegionUnion(&sprite.Reg1, &sprite.Reg1,
&sprite.windows[i]->borderSize);
off_x = panoramiXdataPtr[i].x;
off_y = panoramiXdataPtr[i].y;
}
- sprite.hotLimits = *REGION_EXTENTS(sprite.screen, &sprite.Reg1);
+ sprite.hotLimits = *RegionExtents(&sprite.Reg1);
- if(REGION_NUM_RECTS(&sprite.Reg1) > 1)
+ if(RegionNumRects(&sprite.Reg1) > 1)
sprite.hotShape = &sprite.Reg1;
else
sprite.hotShape = NullRegion;
@@ -765,9 +765,9 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
int x = *px, y = *py;
int incx = 1, incy = 1;
- if (POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box))
+ if (RegionContainsPoint(shape, x, y, &box))
return;
- box = *REGION_EXTENTS(sprite.hot.pScreen, shape);
+ box = *RegionExtents(shape);
/* this is rather crude */
do {
x += incx;
@@ -789,7 +789,7 @@ ConfineToShape(RegionPtr shape, int *px, int *py)
else if (y < box.y1)
return; /* should never get here! */
}
- } while (!POINT_IN_REGION(sprite.hot.pScreen, shape, x, y, &box));
+ } while (!RegionContainsPoint(shape, x, y, &box));
*px = x;
*py = y;
}
@@ -877,7 +877,7 @@ CheckVirtualMotion(
#endif
sprite.hot.x = sprite.hot.y = 0;
}
- lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize);
+ lims = *RegionExtents(&pWin->borderSize);
if (sprite.hot.x < lims.x1)
#ifdef XEVIE
xeviehot.x =
@@ -931,7 +931,7 @@ ConfineCursorToWindow(WindowPtr pWin, Bool generateEvents, Bool confineToScreen)
}
else
{
- sprite.hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize);
+ sprite.hotLimits = *RegionExtents(&pWin->borderSize);
#ifdef SHAPE
sprite.hotShape = wBoundingShape(pWin) ? &pWin->borderSize
: NullRegion;
@@ -2117,7 +2117,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
{
BoxRec box;
- if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box))
+ if(RegionContainsPoint(&pWin->borderSize, x, y, &box))
return TRUE;
#ifdef PANORAMIX
@@ -2125,7 +2125,7 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
- if(POINT_IN_REGION(sprite.screen,
+ if(RegionContainsPoint(
&sprite.windows[i]->borderSize,
x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x,
y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y,
@@ -2180,7 +2180,7 @@ XYToWindow(int x, int y)
*/
&& (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y))
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box))
@@ -2329,10 +2329,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff)
sprite.hotLimits.x2 -= xoff;
sprite.hotLimits.y2 -= yoff;
- if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1))
- REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff);
- if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2))
- REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff);
+ if (RegionNotEmpty(&sprite.Reg1))
+ RegionTranslate(&sprite.Reg1, xoff, yoff);
+ if (RegionNotEmpty(&sprite.Reg2))
+ RegionTranslate(&sprite.Reg2, xoff, yoff);
/* FIXME: if we call ConfineCursorToWindow, must we do anything else? */
if ((grab = inputInfo.pointer->grab) && grab->confineTo) {
@@ -2388,8 +2388,8 @@ DefineInitialRootWindow(register WindowPtr win)
#endif
sprite.screen = pScreen;
/* gotta UNINIT these someplace */
- REGION_NULL(pScreen, &sprite.Reg1);
- REGION_NULL(pScreen, &sprite.Reg2);
+ RegionNull(&sprite.Reg1);
+ RegionNull(&sprite.Reg2);
}
#endif
@@ -2467,7 +2467,7 @@ XineramaPointInWindowIsVisible(
if (!pWin->realized) return FALSE;
- if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box))
+ if (RegionContainsPoint(&pWin->borderClip, x, y, &box))
return TRUE;
if(!XineramaSetWindowPntrs(pWin)) return FALSE;
@@ -2481,9 +2481,9 @@ XineramaPointInWindowIsVisible(
x = xoff - panoramiXdataPtr[i].x;
y = yoff - panoramiXdataPtr[i].y;
- if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)
+ if(RegionContainsPoint(&pWin->borderClip, x, y, &box)
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
@@ -2659,7 +2659,7 @@ ProcWarpPointer(ClientPtr client)
static Bool
BorderSizeNotEmpty(WindowPtr pWin)
{
- if(REGION_NOTEMPTY(sprite.hotPhys.pScreen, &pWin->borderSize))
+ if(RegionNotEmpty(&pWin->borderSize))
return TRUE;
#ifdef PANORAMIX
@@ -2667,7 +2667,7 @@ BorderSizeNotEmpty(WindowPtr pWin)
int i;
for(i = 1; i < PanoramiXNumScreens; i++) {
- if(REGION_NOTEMPTY(sprite.screen, &sprite.windows[i]->borderSize))
+ if(RegionNotEmpty(&sprite.windows[i]->borderSize))
return TRUE;
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
index aa3c606f8..201d6d83b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
@@ -222,21 +222,21 @@ miHandleExposures(pSrcDrawable, 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
@@ -253,7 +253,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
box.x2 = pSrcDrawable->width;
box.y2 = pSrcDrawable->height;
prgnSrcClip = &rgnSrcRec;
- REGION_INIT(pscr, prgnSrcClip, &box, 1);
+ RegionInit(prgnSrcClip, &box, 1);
pSrcWin = (WindowPtr)NULL;
}
@@ -270,11 +270,11 @@ miHandleExposures(pSrcDrawable, 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
@@ -286,14 +286,14 @@ miHandleExposures(pSrcDrawable, 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);
if (pSrcWin && pSrcWin->backStorage)
{
@@ -311,10 +311,10 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
}
/* 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);
/*
* If we have LOTS of rectangles, we decide to take the extents
@@ -324,7 +324,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
* for windows.
*/
extents = pGC->graphicsExposures &&
- (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) &&
+ (RegionNumRects(&rgnExposed) > RECTLIMIT) &&
(pDstDrawable->type != DRAWABLE_PIXMAP);
#ifdef SHAPE
if (pSrcWin)
@@ -337,7 +337,7 @@ miHandleExposures(pSrcDrawable, 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;
}
#endif
@@ -345,8 +345,8 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
{
WindowPtr pWin = (WindowPtr)pDstDrawable;
- expBox = *REGION_EXTENTS(pscr, &rgnExposed);
- REGION_RESET(pscr, &rgnExposed, &expBox);
+ expBox = *RegionExtents(&rgnExposed);
+ RegionReset(&rgnExposed, &expBox);
/* need to clear out new areas of backing store */
if (pWin->backStorage)
(void) (* pWin->drawable.pScreen->ClearBackingStore)(
@@ -363,53 +363,53 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
WindowPtr pWin = (WindowPtr)pDstDrawable;
/* make the exposed area screen-relative */
- REGION_TRANSLATE(pscr, &rgnExposed,
+ RegionTranslate(&rgnExposed,
pDstDrawable->x, pDstDrawable->y);
if (extents)
{
/* PaintWindowBackground doesn't clip, so we have to */
- REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList);
+ RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList);
}
(*pWin->drawable.pScreen->PaintWindowBackground)(
(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;
}
}
@@ -424,7 +424,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
int major;
int minor;
{
- if (pRgn && !REGION_NIL(pRgn))
+ if (pRgn && !RegionNil(pRgn))
{
xEvent *pEvent;
register xEvent *pe;
@@ -432,8 +432,8 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
register int i;
int numRects;
- numRects = REGION_NUM_RECTS(pRgn);
- pBox = REGION_RECTS(pRgn);
+ numRects = RegionNumRects(pRgn);
+ pBox = RegionRects(pRgn);
if(!(pEvent = (xEvent *)ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
return;
pe = pEvent;
@@ -479,8 +479,8 @@ miSendExposures(pWin, pRgn, dx, dy)
register xEvent *pEvent, *pe;
register int i;
- pBox = REGION_RECTS(pRgn);
- numRects = REGION_NUM_RECTS(pRgn);
+ pBox = RegionRects(pRgn);
+ numRects = RegionNumRects(pRgn);
if(!(pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
return;
memset(pEvent, 0, numRects * sizeof(xEvent));
@@ -554,8 +554,8 @@ miWindowExposures(pWin, prgn, other_exposed)
* no areas will be repainted.
*/
exposures = (*pWin->drawable.pScreen->RestoreAreas)(pWin, 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;
@@ -568,11 +568,11 @@ miWindowExposures(pWin, prgn, 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;
}
@@ -583,12 +583,12 @@ miWindowExposures(pWin, prgn, other_exposed)
* than 4, let the function decide.
*/
- total = REGION_NUM_RECTS(exposures);
+ total = RegionNumRects(exposures);
if (clientInterested && exposures && (total > RECTLIMIT ||
(total > 4 && nxagentExtentsPredicate(total) == 1)))
#else
- if (clientInterested && exposures && (REGION_NUM_RECTS(exposures) > RECTLIMIT))
+ if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT))
#endif
{
/*
@@ -599,17 +599,17 @@ miWindowExposures(pWin, prgn, 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);
}
/* PaintWindowBackground doesn't clip, so we have to */
- REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList);
+ RegionIntersect(prgn, prgn, &pWin->clipList);
/* need to clear out new areas of backing store, too */
if (pWin->backStorage)
(void) (* pWin->drawable.pScreen->ClearBackingStore)(
@@ -620,22 +620,22 @@ miWindowExposures(pWin, prgn, other_exposed)
box.y2 - box.y1,
FALSE);
}
- if (prgn && !REGION_NIL(prgn))
+ if (prgn && !RegionNil(prgn))
(*pWin->drawable.pScreen->PaintWindowBackground)(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);
}
@@ -779,7 +779,7 @@ int what;
}
}
- prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) *
+ prect = (xRectangle *)ALLOCATE_LOCAL(RegionNumRects(prgn) *
sizeof(xRectangle));
if (!prect)
return;
@@ -822,7 +822,7 @@ int what;
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT(pScreen, &pWin->clipList, &box, 1);
+ RegionInit(&pWin->clipList, &box, 1);
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
newValues[ABSX].val = pBgWin->drawable.x;
newValues[ABSY].val = pBgWin->drawable.y;
@@ -925,8 +925,8 @@ int what;
if (pWin->drawable.serialNumber != pGC->serialNumber)
ValidateGC((DrawablePtr)pWin, 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 - pWin->drawable.x;
@@ -945,7 +945,7 @@ int what;
{
if (what == PW_BORDER)
{
- REGION_UNINIT(pScreen, &pWin->clipList);
+ RegionUninit(&pWin->clipList);
pWin->clipList = prgnWin;
pWin->drawable.x = oldCorner.x;
pWin->drawable.y = oldCorner.y;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
index a720cafbf..08c052294 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
@@ -131,7 +131,7 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
box.y2 = y2;
pScreen = pWin->drawable.pScreen;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
if (pWin->backStorage)
{
/*
@@ -145,14 +145,14 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
generateExposures);
}
- REGION_INTERSECT(pScreen, &reg, &reg, &pWin->clipList);
+ RegionIntersect(&reg, &reg, &pWin->clipList);
if (generateExposures)
(*pScreen->WindowExposures)(pWin, &reg, pBSReg);
else if (pWin->backgroundState != None)
(*pScreen->PaintWindowBackground)(pWin, &reg, PW_BACKGROUND);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
if (pBSReg)
- REGION_DESTROY(pScreen, pBSReg);
+ RegionDestroy(pBSReg);
}
/*
@@ -198,7 +198,7 @@ miCheckSubSaveUnder(
for (; pChild != pFirst; pChild = pChild->nextSib)
if (pChild->viewable && pChild->saveUnder)
- REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
+ RegionUnion(pRegion, pRegion, &pChild->borderSize);
/*
* check region below and including first changed window
@@ -217,10 +217,10 @@ miCheckSubSaveUnder(
{
if (!subInited)
{
- REGION_NULL(pScreen, &SubRegion);
+ RegionNull(&SubRegion);
subInited = TRUE;
}
- REGION_COPY(pScreen, &SubRegion, pRegion);
+ RegionCopy(&SubRegion, pRegion);
res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
&SubRegion);
}
@@ -231,12 +231,12 @@ miCheckSubSaveUnder(
}
if (pChild->saveUnder)
- REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
+ RegionUnion(pRegion, pRegion, &pChild->borderSize);
}
}
if (subInited)
- REGION_UNINIT(pScreen, &SubRegion);
+ RegionUninit(&SubRegion);
}
/*
@@ -247,8 +247,8 @@ miCheckSubSaveUnder(
if (pParent->viewable &&
((pParent->eventMask | wOtherEventMasks(pParent)) & ExposureMask) &&
- REGION_NOTEMPTY(pScreen, &pParent->borderSize) &&
- RECT_IN_REGION(pScreen, pRegion, REGION_EXTENTS(pScreen,
+ RegionNotEmpty(&pParent->borderSize) &&
+ RegionContainsRect(pRegion, RegionExtents(
&pParent->borderSize)) != rgnOUT)
{
if (!pParent->DIXsaveUnder)
@@ -300,11 +300,11 @@ miChangeSaveUnder(pWin, first)
numSaveUndersViewable += deltaSaveUndersViewable;
deltaSaveUndersViewable = 0;
pScreen = pWin->drawable.pScreen;
- REGION_NULL(pScreen, &rgn);
+ RegionNull(&rgn);
res = miCheckSubSaveUnder (pWin->parent,
pWin->saveUnder ? first : pWin->nextSib,
&rgn);
- REGION_UNINIT(pScreen, &rgn);
+ RegionUninit(&rgn);
return res;
}
@@ -403,9 +403,9 @@ miMarkOverlappedWindows(pWin, pFirst, 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)
@@ -425,17 +425,17 @@ miMarkOverlappedWindows(pWin, pFirst, 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;
@@ -481,13 +481,13 @@ miHandleValidateExposures(pWin)
{
if ( (val = pChild->valdata) )
{
- if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed))
+ if (RegionNotEmpty(&val->after.borderExposed))
(*pChild->drawable.pScreen->PaintWindowBorder)(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);
xfree(val);
pChild->valdata = (ValidatePtr)NULL;
if (pChild->firstChild)
@@ -534,8 +534,8 @@ miMoveWindow(pWin, x, y, pNextSib, 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;
@@ -572,7 +572,7 @@ miMoveWindow(pWin, x, y, pNextSib, 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);
}
@@ -607,14 +607,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;
}
@@ -671,8 +671,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/*
* 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
@@ -685,8 +685,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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
@@ -701,8 +701,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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
@@ -717,16 +717,16 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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);
}
}
@@ -753,9 +753,9 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
if (WasViewable)
{
- pRegion = REGION_CREATE(pScreen, NullBox, 1);
+ pRegion = RegionCreate(NullBox, 1);
if (pWin->backStorage)
- REGION_COPY(pScreen, pRegion, &pWin->clipList);
+ RegionCopy(pRegion, &pWin->clipList);
if (pLayerWin == pWin)
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
@@ -783,7 +783,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
* 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);
@@ -827,16 +827,16 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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
@@ -847,9 +847,9 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/*
* 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
@@ -858,17 +858,17 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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);
}
}
@@ -892,14 +892,14 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/* 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 */
@@ -915,7 +915,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/* 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
@@ -925,7 +925,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
{
if (pChild->winGravity != g)
continue;
- REGION_INTERSECT(pScreen, pRegion,
+ RegionIntersect(pRegion,
&pChild->borderClip, gravitate[g]);
TraverseTree (pChild, miRecomputeExposures, (void *)pRegion);
}
@@ -936,21 +936,21 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
*/
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 (bsExposed)
{
RegionPtr valExposed = NullRegion;
@@ -959,8 +959,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
if (anyMarked)
(*pScreen->HandleExposures)(pLayerWin->parent);
@@ -977,7 +977,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
else if (bsExposed)
{
(*pScreen->WindowExposures) (pWin, NullRegion, bsExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionDestroy(bsExposed);
}
if (pWin->realized)
WindowsRestructured ();
@@ -1021,8 +1021,8 @@ miSetShape(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;
}
@@ -1039,8 +1039,8 @@ miSetShape(pWin)
{
if (pWin->backStorage)
{
- pOldClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ pOldClip = RegionCreate(NullBox, 1);
+ RegionCopy(pOldClip, &pWin->clipList);
}
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
@@ -1083,10 +1083,10 @@ miSetShape(pWin)
*/
if (WasViewable && pOldClip)
- REGION_DESTROY(pScreen, pOldClip);
+ RegionDestroy(pOldClip);
#else
if (WasViewable)
- REGION_DESTROY(pScreen, pOldClip);
+ RegionDestroy(pOldClip);
#endif
if (bsExposed)
{
@@ -1096,8 +1096,8 @@ miSetShape(pWin)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
}
if (WasViewable)
@@ -1158,8 +1158,8 @@ miChangeBorderWidth(pWin, 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;
}
@@ -1196,10 +1196,10 @@ miMarkUnrealizedWindow(pChild, pWin, 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);
}
}
@@ -1214,7 +1214,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);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
index 9c438394a..725f5137e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c
@@ -1537,7 +1537,7 @@ SetPictureClipRects (PicturePtr pPicture,
RegionPtr clientClip;
int result;
- clientClip = RECTS_TO_REGION(pScreen,
+ clientClip = RegionFromRects(
nRect, rects, CT_UNSORTED);
if (!clientClip)
return BadAlloc;
@@ -1568,14 +1568,14 @@ SetPictureClipRegion (PicturePtr pPicture,
if (pRegion)
{
type = CT_REGION;
- clientClip = REGION_CREATE (pScreen,
- REGION_EXTENTS(pScreen, pRegion),
- REGION_NUM_RECTS(pRegion));
+ clientClip = RegionCreate(
+ RegionExtents(pRegion),
+ RegionNumRects(pRegion));
if (!clientClip)
return BadAlloc;
- if (!REGION_COPY (pSCreen, clientClip, pRegion))
+ if (!RegionCopy(clientClip, pRegion))
{
- REGION_DESTROY (pScreen, clientClip);
+ RegionDestroy(clientClip);
return BadAlloc;
}
}
@@ -1685,9 +1685,9 @@ CopyPicture (PicturePtr pSrc,
RegionPtr clientClip;
RegionPtr srcClientClip = (RegionPtr)pSrc->clientClip;
- clientClip = REGION_CREATE(pSrc->pDrawable->pScreen,
- REGION_EXTENTS(pSrc->pDrawable->pScreen, srcClientClip),
- REGION_NUM_RECTS(srcClientClip));
+ clientClip = RegionCreate(
+ RegionExtents(srcClientClip),
+ RegionNumRects(srcClientClip));
(*ps->ChangePictureClip)(pDst, CT_REGION, clientClip, 0);
}
break;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index 013f26e28..a3d791ff8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -509,10 +509,10 @@ CreateRootWindow(ScreenPtr pScreen)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT(pScreen, &pWin->clipList, &box, 1);
- REGION_INIT(pScreen, &pWin->winSize, &box, 1);
- REGION_INIT(pScreen, &pWin->borderSize, &box, 1);
- REGION_INIT(pScreen, &pWin->borderClip, &box, 1);
+ RegionInit(&pWin->clipList, &box, 1);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
+ RegionInit(&pWin->borderClip, &box, 1);
pWin->drawable.class = InputOutput;
pWin->optional->visual = pScreen->rootVisual;
@@ -697,7 +697,7 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
#endif /* NXAGENT_SERVER */
BoxRec box;
- box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
+ box = *(RegionExtents(&pWin->winSize));
/* we do these calculations to avoid overflows */
if (x > box.x1)
box.x1 = x;
@@ -713,8 +713,8 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
box.x2 = box.x1;
if (box.y1 > box.y2)
box.y2 = box.y1;
- REGION_RESET(pScreen, Rgn, &box);
- REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize);
+ RegionReset(Rgn, &box);
+ RegionIntersect(Rgn, Rgn, &pWin->winSize);
}
WindowPtr
@@ -895,10 +895,10 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w,
pWin->drawable.y = pParent->drawable.y + y + (int)bw;
/* set up clip list correctly for unobscured WindowPtr */
- REGION_NULL(pScreen, &pWin->clipList);
- REGION_NULL(pScreen, &pWin->borderClip);
- REGION_NULL(pScreen, &pWin->winSize);
- REGION_NULL(pScreen, &pWin->borderSize);
+ RegionNull(&pWin->clipList);
+ RegionNull(&pWin->borderClip);
+ RegionNull(&pWin->winSize);
+ RegionNull(&pWin->borderSize);
pHead = RealChildHead(pParent);
if (pHead)
@@ -979,17 +979,17 @@ FreeWindowResources(register WindowPtr pWin)
DeleteWindowFromAnySaveSet(pWin);
DeleteWindowFromAnySelections(pWin);
DeleteWindowFromAnyEvents(pWin, TRUE);
- REGION_UNINIT(pScreen, &pWin->clipList);
- REGION_UNINIT(pScreen, &pWin->winSize);
- REGION_UNINIT(pScreen, &pWin->borderClip);
- REGION_UNINIT(pScreen, &pWin->borderSize);
+ RegionUninit(&pWin->clipList);
+ RegionUninit(&pWin->winSize);
+ RegionUninit(&pWin->borderClip);
+ RegionUninit(&pWin->borderSize);
#ifdef SHAPE
if (wBoundingShape (pWin))
- REGION_DESTROY(pScreen, wBoundingShape (pWin));
+ RegionDestroy(wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_DESTROY(pScreen, wClipShape (pWin));
+ RegionDestroy(wClipShape (pWin));
if (wInputShape (pWin))
- REGION_DESTROY(pScreen, wInputShape (pWin));
+ RegionDestroy(wInputShape (pWin));
#endif
if (pWin->borderIsPixel == FALSE)
(*pScreen->DestroyPixmap)(pWin->border.pixmap);
@@ -1679,10 +1679,10 @@ PatchUp:
{
RegionRec exposed;
- REGION_NULL(pScreen, &exposed);
- REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize);
+ RegionNull(&exposed);
+ RegionSubtract(&exposed, &pWin->borderClip, &pWin->winSize);
(*pWin->drawable.pScreen->PaintWindowBorder)(pWin, &exposed, PW_BORDER);
- REGION_UNINIT(pScreen, &exposed);
+ RegionUninit(&exposed);
}
return error;
}
@@ -1823,19 +1823,19 @@ CreateUnclippedWinSize (register WindowPtr pWin)
box.y1 = pWin->drawable.y;
box.x2 = pWin->drawable.x + (int) pWin->drawable.width;
box.y2 = pWin->drawable.y + (int) pWin->drawable.height;
- pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
+ pRgn = RegionCreate(&box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
#ifndef NXAGENT_SERVER
ScreenPtr pScreen = pWin->drawable.pScreen;
#endif /* NXAGENT_SERVER */
- REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
+ RegionTranslate(pRgn, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
- REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin));
+ RegionIntersect(pRgn, pRgn, wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin));
- REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y);
+ RegionIntersect(pRgn, pRgn, wClipShape (pWin));
+ RegionTranslate(pRgn, pWin->drawable.x, pWin->drawable.y);
}
#endif
return pRgn;
@@ -1853,7 +1853,7 @@ SetWinSize (register WindowPtr pWin)
box.y1 = pWin->drawable.y;
box.x2 = pWin->drawable.x + pWin->drawable.width;
box.y2 = pWin->drawable.y + pWin->drawable.height;
- REGION_RESET (pScreen, &pWin->winSize, &box);
+ RegionReset(&pWin->winSize, &box);
}
else
#endif
@@ -1866,15 +1866,15 @@ SetWinSize (register WindowPtr pWin)
#ifndef NXAGENT_SERVER
ScreenPtr pScreen = pWin->drawable.pScreen;
#endif /* NXAGENT_SERVER */
- REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
+ RegionTranslate(&pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
- REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize,
+ RegionIntersect(&pWin->winSize, &pWin->winSize,
wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize,
+ RegionIntersect(&pWin->winSize, &pWin->winSize,
wClipShape (pWin));
- REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x,
+ RegionTranslate(&pWin->winSize, pWin->drawable.x,
pWin->drawable.y);
}
#endif
@@ -1896,7 +1896,7 @@ SetBorderSize (register WindowPtr pWin)
box.y1 = pWin->drawable.y - bw;
box.x2 = pWin->drawable.x + pWin->drawable.width + bw;
box.y2 = pWin->drawable.y + pWin->drawable.height + bw;
- REGION_RESET (pScreen, &pWin->borderSize, &box);
+ RegionReset(&pWin->borderSize, &box);
}
else
#endif
@@ -1909,18 +1909,18 @@ SetBorderSize (register WindowPtr pWin)
#ifndef NXAGENT_SERVER
ScreenPtr pScreen = pWin->drawable.pScreen;
#endif /* NXAGENT_SERVER */
- REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
+ RegionTranslate(&pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
- REGION_INTERSECT(pScreen, &pWin->borderSize, &pWin->borderSize,
+ RegionIntersect(&pWin->borderSize, &pWin->borderSize,
wBoundingShape (pWin));
- REGION_TRANSLATE(pScreen, &pWin->borderSize, pWin->drawable.x,
+ RegionTranslate(&pWin->borderSize, pWin->drawable.x,
pWin->drawable.y);
- REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize,
+ RegionUnion(&pWin->borderSize, &pWin->borderSize,
&pWin->winSize);
}
#endif
} else {
- REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize,
+ RegionCopy(&pWin->borderSize,
&pWin->winSize);
}
}
@@ -2135,12 +2135,12 @@ MakeBoundingRegion (
#ifndef NXAGENT_SERVER
ScreenPtr pScreen = pWin->drawable.pScreen;
#endif /* NXAGENT_SERVER */
- pRgn = REGION_CREATE(pScreen, pBox, 1);
+ pRgn = RegionCreate(pBox, 1);
if (wBoundingShape (pWin)) {
- REGION_TRANSLATE(pScreen, pRgn, -pWin->origin.x,
+ RegionTranslate(pRgn, -pWin->origin.x,
-pWin->origin.y);
- REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin));
- REGION_TRANSLATE(pScreen, pRgn, pWin->origin.x,
+ RegionIntersect(pRgn, pRgn, wBoundingShape (pWin));
+ RegionTranslate(pRgn, pWin->origin.x,
pWin->origin.y);
}
return pRgn;
@@ -2162,10 +2162,10 @@ ShapeOverlap (
pScreen = pWin->drawable.pScreen;
pWinRgn = MakeBoundingRegion (pWin, pWinBox);
pSibRgn = MakeBoundingRegion (pSib, pSibBox);
- REGION_INTERSECT(pScreen, pWinRgn, pWinRgn, pSibRgn);
- ret = REGION_NOTEMPTY(pScreen, pWinRgn);
- REGION_DESTROY(pScreen, pWinRgn);
- REGION_DESTROY(pScreen, pSibRgn);
+ RegionIntersect(pWinRgn, pWinRgn, pSibRgn);
+ ret = RegionNotEmpty(pWinRgn);
+ RegionDestroy(pWinRgn);
+ RegionDestroy(pSibRgn);
return ret;
}
#endif
@@ -2296,7 +2296,7 @@ WhereDoIGoInTheStack(
else if (pSib)
{
if ((IsSiblingAboveMe(pWin, pSib) == Above) &&
- (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT))
+ (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT))
return(pFirst);
else
return(pWin->nextSib);
@@ -2311,7 +2311,7 @@ WhereDoIGoInTheStack(
else if (pSib)
{
if ((IsSiblingAboveMe(pWin, pSib) == Below) &&
- (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT))
+ (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT))
return NullWindow;
else
return(pWin->nextSib);
@@ -2325,7 +2325,7 @@ WhereDoIGoInTheStack(
return(pWin->nextSib);
else if (pSib)
{
- if (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)
+ if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)
{
if (IsSiblingAboveMe(pWin, pSib) == Above)
return(pFirst);
@@ -3069,10 +3069,10 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
(*pScreen->ClipNotify) (pWin, 0, 0);
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(NullWindow, pWin, VTMap);
- REGION_NULL(pScreen, &temp);
- REGION_COPY(pScreen, &temp, &pWin->clipList);
+ RegionNull(&temp);
+ RegionCopy(&temp, &pWin->clipList);
(*pScreen->WindowExposures) (pWin, &temp, NullRegion);
- REGION_UNINIT(pScreen, &temp);
+ RegionUninit(&temp);
}
nxagentFlushConfigureWindow();
@@ -3478,7 +3478,7 @@ VisibleBoundingBoxFromPoint(register WindowPtr pWin, int x, int y, BoxPtr box)
{
if (!pWin->realized)
return (FALSE);
- if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->clipList, x, y, box))
+ if (RegionContainsPoint(&pWin->clipList, x, y, box))
return(TRUE);
return(FALSE);
}
@@ -3494,10 +3494,10 @@ PointInWindowIsVisible(register WindowPtr pWin, int x, int y)
if (!pWin->realized)
return (FALSE);
- if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderClip,
+ if (RegionContainsPoint(&pWin->borderClip,
x, y, &box)
&& (!wInputShape(pWin) ||
- POINT_IN_REGION(pWin->drawable.pScreen,
+ RegionContainsPoint(
wInputShape(pWin),
x - pWin->drawable.x,
y - pWin->drawable.y, &box)))
@@ -3513,12 +3513,12 @@ NotClippedByChildren(register WindowPtr pWin)
RegionPtr pReg;
pScreen = pWin->drawable.pScreen;
- pReg = REGION_CREATE(pScreen, NullBox, 1);
+ pReg = RegionCreate(NullBox, 1);
if (pWin->parent ||
screenIsSaved != SCREEN_SAVER_ON ||
!HasSaverWindow (pWin->drawable.pScreen->myNum))
{
- REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize);
+ RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize);
}
return(pReg);
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 1dbd059ac..cd2234492 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -160,11 +160,11 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
box.x2 = width;
box.y2 = height;
- pPixmapPriv -> corruptedRegion = REGION_CREATE(pPixmap -> drawable.pScreen, &box, 1);
+ pPixmapPriv -> corruptedRegion = RegionCreate(&box, 1);
}
else
{
- pPixmapPriv -> corruptedRegion = REGION_CREATE(pPixmap -> drawable.pScreen, (BoxRec *) NULL, 1);
+ pPixmapPriv -> corruptedRegion = RegionCreate((BoxRec *) NULL, 1);
}
pPixmapPriv -> corruptedBackground = 0;
@@ -269,7 +269,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width,
pVirtualPriv -> isVirtual = True;
pVirtualPriv -> isShared = nxagentShmPixmapTrap;
- pVirtualPriv -> corruptedRegion = REGION_CREATE(pVirtual -> drawable.pScreen, (BoxRec *) NULL, 1);
+ pVirtualPriv -> corruptedRegion = RegionCreate((BoxRec *) NULL, 1);
pVirtualPriv -> corruptedBackground = 0;
@@ -444,7 +444,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap)
if (pPixmapPriv -> corruptedRegion != NullRegion)
{
- REGION_DESTROY(pPixmap -> drawable.pScreen, pPixmapPriv -> corruptedRegion);
+ RegionDestroy(pPixmapPriv -> corruptedRegion);
pPixmapPriv -> corruptedRegion = NullRegion;
}
@@ -512,7 +512,7 @@ Bool nxagentDestroyVirtualPixmap(PixmapPtr pPixmap)
if (pVirtualPriv -> corruptedRegion != NullRegion)
{
- REGION_DESTROY(pVirtual -> drawable.pScreen, pVirtualPriv -> corruptedRegion);
+ RegionDestroy(pVirtualPriv -> corruptedRegion);
pVirtualPriv -> corruptedRegion = NullRegion;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 8bf1ac0bf..de1ad1207 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -1240,7 +1240,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
pRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, glyphBox.x1, glyphBox.y1,
glyphBox.x2 - glyphBox.x1, glyphBox.y2 - glyphBox.y1);
- if (REGION_NIL(pRegion) == 1)
+ if (RegionNil(pRegion) == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: WARNING! Glyphs prevented on hidden window at [%p].\n",
@@ -1602,24 +1602,24 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
(op == PictOpSrc ||
(op == PictOpOver && color -> alpha == 0xffff)))
{
- rectRegion = RECTS_TO_REGION(pDst -> pDrawable -> pScreen, nRect, rects, CT_REGION);
+ rectRegion = RegionFromRects(nRect, rects, CT_REGION);
if (pDst -> clientClipType != CT_NONE)
{
RegionRec tmpRegion;
- REGION_INIT(pDst -> pDrawable -> pScreen, &tmpRegion, NullBox, 1);
+ RegionInit(&tmpRegion, NullBox, 1);
- REGION_COPY(pDst -> pDrawable -> pScreen, &tmpRegion, (RegionPtr) pDst -> clientClip);
+ RegionCopy(&tmpRegion, (RegionPtr) pDst -> clientClip);
if (pDst -> clipOrigin.x != 0 || pDst -> clipOrigin.y != 0)
{
- REGION_TRANSLATE(pDst -> pDrawable -> pScreen, &tmpRegion, pDst -> clipOrigin.x, pDst -> clipOrigin.y);
+ RegionTranslate(&tmpRegion, pDst -> clipOrigin.x, pDst -> clipOrigin.y);
}
- REGION_INTERSECT(pDst -> pDrawable -> pScreen, rectRegion, rectRegion, &tmpRegion);
+ RegionIntersect(rectRegion, rectRegion, &tmpRegion);
- REGION_UNINIT(pDst -> pDrawable -> pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
#ifdef TEST
@@ -1629,7 +1629,7 @@ void nxagentCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color,
nxagentUnmarkCorruptedRegion(pDst -> pDrawable, rectRegion);
- REGION_DESTROY(pDrawable -> pScreen, rectRegion);
+ RegionDestroy(rectRegion);
}
XRenderFillRectangles(nxagentDisplay,
@@ -1716,7 +1716,7 @@ FIXME: Is this useful or just a waste of bandwidth?
*/
if (nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized &&
- RECT_IN_REGION(pDst -> pDrawable -> pScreen, nxagentCorruptedRegion(pDst -> pDrawable),
+ RegionContainsRect(nxagentCorruptedRegion(pDst -> pDrawable),
nxagentTrapezoidExtents) == rgnIN)
{
#ifdef TEST
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index a677b7eb4..6131775d9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -2147,8 +2147,8 @@ static void nxagentSetRootClip (ScreenPtr pScreen, Bool enable)
{
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;
}
@@ -2167,18 +2167,18 @@ static void nxagentSetRootClip (ScreenPtr pScreen, Bool enable)
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT (pScreen, &pWin->winSize, &box, 1);
- REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
+ RegionInit(&pWin->winSize, &box, 1);
+ RegionInit(&pWin->borderSize, &box, 1);
if (WasViewable)
- REGION_RESET(pScreen, &pWin->borderClip, &box);
+ RegionReset(&pWin->borderClip, &box);
pWin->drawable.width = pScreen->width;
pWin->drawable.height = pScreen->height;
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionBreak(&pWin->clipList);
}
else
{
- REGION_EMPTY(pScreen, &pWin->borderClip);
- REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
+ RegionEmpty(&pWin->borderClip);
+ RegionBreak(&pWin->clipList);
}
ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
@@ -2187,8 +2187,8 @@ static void nxagentSetRootClip (ScreenPtr pScreen, Bool enable)
{
if (pWin->backStorage)
{
- pOldClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ pOldClip = RegionCreate(NullBox, 1);
+ RegionCopy(pOldClip, &pWin->clipList);
}
if (pWin->firstChild)
@@ -2223,7 +2223,7 @@ static void nxagentSetRootClip (ScreenPtr pScreen, Bool enable)
(pWin, 0, 0, pOldClip,
pWin->drawable.x, pWin->drawable.y);
if (WasViewable)
- REGION_DESTROY(pScreen, pOldClip);
+ RegionDestroy(pOldClip);
if (bsExposed)
{
RegionPtr valExposed = NullRegion;
@@ -2232,8 +2232,8 @@ static void nxagentSetRootClip (ScreenPtr pScreen, Bool enable)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
}
if (WasViewable)
@@ -2418,10 +2418,10 @@ FIXME: We should try to restore the previously
WindowTable[pScreen -> myNum] -> drawable.x = 0;
WindowTable[pScreen -> myNum] -> drawable.y = 0;
- REGION_INIT(pScreen, &WindowTable[pScreen -> myNum] -> borderSize, &box, 1);
- REGION_INIT(pScreen, &WindowTable[pScreen -> myNum] -> winSize, &box, 1);
- REGION_INIT(pScreen, &WindowTable[pScreen -> myNum] -> clipList, &box, 1);
- REGION_INIT(pScreen, &WindowTable[pScreen -> myNum] -> borderClip, &box, 1);
+ RegionInit(&WindowTable[pScreen -> myNum] -> borderSize, &box, 1);
+ RegionInit(&WindowTable[pScreen -> myNum] -> winSize, &box, 1);
+ RegionInit(&WindowTable[pScreen -> myNum] -> clipList, &box, 1);
+ RegionInit(&WindowTable[pScreen -> myNum] -> borderClip, &box, 1);
(*pScreen -> PositionWindow)(WindowTable[pScreen -> myNum], 0, 0);
@@ -2819,7 +2819,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
XFreeGC(nxagentDisplay, gc);
- REGION_INIT(pScreen, &nxagentShadowUpdateRegion, (BoxRec*)NULL, 1);
+ RegionInit(&nxagentShadowUpdateRegion, (BoxRec*)NULL, 1);
return 0;
}
@@ -2973,14 +2973,14 @@ int nxagentShadowSendUpdates(int *suspended)
{
*suspended = 0;
- if (REGION_NIL(&nxagentShadowUpdateRegion) == 1)
+ if (RegionNil(&nxagentShadowUpdateRegion) == 1)
{
return 0;
}
nxagentMarkCorruptedRegion((DrawablePtr)nxagentShadowPixmapPtr, &nxagentShadowUpdateRegion);
- REGION_EMPTY(nxagentShadowPixmapPtr -> drawable.pScreen, &nxagentShadowUpdateRegion);
+ RegionEmpty(&nxagentShadowUpdateRegion);
return 1;
}
@@ -3002,9 +3002,9 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
int overlap;
- REGION_NULL(pScreen, &updateRegion);
+ RegionNull(&updateRegion);
- REGION_NULL(pScreen, &tempRegion);
+ RegionNull(&tempRegion);
#ifdef __CYGWIN32__
@@ -3116,15 +3116,15 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
box.y1 = y;
box.y2 = y + height;
- REGION_INIT(pScreen, &tempRegion, &box, 1);
+ RegionInit(&tempRegion, &box, 1);
- REGION_APPEND(pScreen, &updateRegion, &tempRegion);
+ RegionAppend(&updateRegion, &tempRegion);
- REGION_UNINIT(pScreen, &tempRegion);
+ RegionUninit(&tempRegion);
- REGION_VALIDATE(pScreen, &updateRegion, &overlap);
+ RegionValidate(&updateRegion, &overlap);
- REGION_UNION(pScreen, &nxagentShadowUpdateRegion, &nxagentShadowUpdateRegion, &updateRegion);
+ RegionUnion(&nxagentShadowUpdateRegion, &nxagentShadowUpdateRegion, &updateRegion);
}
if (tBuffer)
@@ -3132,7 +3132,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
xfree(tBuffer);
}
- REGION_UNINIT(pScreen, &updateRegion);
+ RegionUninit(&updateRegion);
}
else if (result == -1)
{
@@ -4131,8 +4131,8 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg,
pPrivPixmap -> isBackingPixmap = 1;
- fbCopyWindowProc(&pWin -> drawable, &pVirtualPixmap -> drawable, 0, REGION_RECTS(prgnSave),
- REGION_NUM_RECTS(prgnSave), xorg, yorg, FALSE, FALSE, 0, 0);
+ fbCopyWindowProc(&pWin -> drawable, &pVirtualPixmap -> drawable, 0, RegionRects(prgnSave),
+ RegionNumRects(prgnSave), xorg, yorg, FALSE, FALSE, 0, 0);
pDrawable = &pWin -> drawable;
@@ -4145,34 +4145,34 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg,
* Coordinates are relative to the window.
*/
- REGION_INIT(pWin -> pScreen, &cleanRegion, NullBox, 1);
+ RegionInit(&cleanRegion, NullBox, 1);
- REGION_COPY(pWin -> pScreen, &cleanRegion, nxagentCorruptedRegion((DrawablePtr) pWin));
+ RegionCopy(&cleanRegion, nxagentCorruptedRegion((DrawablePtr) pWin));
/*
* Subtract the corrupted region from the saved region.
*/
- REGION_SUBTRACT(pWin -> pScreen, &pBackingStore -> SavedRegion, &pBackingStore -> SavedRegion, &cleanRegion);
+ RegionSubtract(&pBackingStore -> SavedRegion, &pBackingStore -> SavedRegion, &cleanRegion);
/*
* Translate the corrupted region. Coordinates
* are relative to the backing store pixmap.
*/
- REGION_TRANSLATE(pWin -> pScreen, &cleanRegion, -pBackingStore -> x, -pBackingStore -> y);
+ RegionTranslate(&cleanRegion, -pBackingStore -> x, -pBackingStore -> y);
/*
* Compute the clean region to be saved: subtract
* the corrupted region from the region to be saved.
*/
- REGION_SUBTRACT(pWin -> pScreen, &cleanRegion, prgnSave, &cleanRegion);
+ RegionSubtract(&cleanRegion, prgnSave, &cleanRegion);
- nRects = REGION_NUM_RECTS(&cleanRegion);
+ nRects = RegionNumRects(&cleanRegion);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) xalloc(size);
- pBox = REGION_RECTS(&cleanRegion);
+ pBox = RegionRects(&cleanRegion);
for (i = nRects; i-- > 0;)
{
@@ -4186,9 +4186,9 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg,
xfree((char *) pRects);
- extents = *REGION_EXTENTS(pWin -> pScreen, &cleanRegion);
+ extents = *RegionExtents(&cleanRegion);
- REGION_UNINIT(pWin -> pScreen, &cleanRegion);
+ RegionUninit(&cleanRegion);
xDst = extents.x1;
yDst = extents.y1;
@@ -4248,15 +4248,15 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
* root window size.
*/
- REGION_INTERSECT(pWin -> pScreen, prgnRestore, prgnRestore,
+ RegionIntersect(prgnRestore, prgnRestore,
&WindowTable[pWin -> drawable.pScreen -> myNum] -> winSize);
pBackingStore = (miBSWindowPtr) pWin -> backStorage;
pVirtualPixmap = nxagentVirtualPixmap(pPixmap);
- fbCopyWindowProc(&pVirtualPixmap -> drawable, &pWin -> drawable, 0, REGION_RECTS(prgnRestore),
- REGION_NUM_RECTS(prgnRestore), -xorg, -yorg, FALSE, FALSE, 0, 0);
+ fbCopyWindowProc(&pVirtualPixmap -> drawable, &pWin -> drawable, 0, RegionRects(prgnRestore),
+ RegionNumRects(prgnRestore), -xorg, -yorg, FALSE, FALSE, 0, 0);
pDrawable = &pVirtualPixmap -> drawable;
@@ -4268,7 +4268,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
* Translate the reference point to the origin of the window.
*/
- REGION_TRANSLATE(pWin -> drawable.pScreen, prgnRestore,
+ RegionTranslate(prgnRestore,
-pWin -> drawable.x - pWin -> borderWidth,
-pWin -> drawable.y - pWin -> borderWidth);
@@ -4276,26 +4276,26 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
if (nxagentDrawableStatus((DrawablePtr) pPixmap) == NotSynchronized)
{
- clipRegion = REGION_CREATE(pPixmap -> drawable -> pScreen, NullBox, 1);
+ clipRegion = RegionCreate(NullBox, 1);
- REGION_COPY(pPixmap -> drawable -> pScreen, clipRegion,
+ RegionCopy(clipRegion,
nxagentCorruptedRegion((DrawablePtr) pPixmap));
/*
* Translate the reference point to the origin of the window.
*/
- REGION_TRANSLATE(pPixmap -> drawable -> pScreen, clipRegion,
+ RegionTranslate(clipRegion,
pBackingStore -> x, pBackingStore -> y);
- REGION_INTERSECT(pPixmap -> drawable -> pScreen, clipRegion, prgnRestore, clipRegion);
+ RegionIntersect(clipRegion, prgnRestore, clipRegion);
/*
* Subtract the corrupted region from the saved areas.
* miBSRestoreAreas will return the exposure region.
*/
- REGION_SUBTRACT(pPixmap -> drawable -> pScreen, &pBackingStore->SavedRegion,
+ RegionSubtract(&pBackingStore->SavedRegion,
&pBackingStore->SavedRegion, clipRegion);
/*
@@ -4304,24 +4304,24 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
if (nxagentRemoteExposeRegion != NULL)
{
- REGION_TRANSLATE(pPixmap -> drawable -> pScreen, clipRegion, pWin -> drawable.x, pWin -> drawable.y);
+ RegionTranslate(clipRegion, pWin -> drawable.x, pWin -> drawable.y);
- REGION_UNION(pScreen, nxagentRemoteExposeRegion, nxagentRemoteExposeRegion, clipRegion);
+ RegionUnion(nxagentRemoteExposeRegion, nxagentRemoteExposeRegion, clipRegion);
- REGION_TRANSLATE(pPixmap -> drawable -> pScreen, clipRegion, -pWin -> drawable.x, -pWin -> drawable.y);
+ RegionTranslate(clipRegion, -pWin -> drawable.x, -pWin -> drawable.y);
}
/*
* Compute the region to be restored.
*/
- REGION_SUBTRACT(pPixmap -> drawable -> pScreen, clipRegion, prgnRestore, clipRegion);
+ RegionSubtract(clipRegion, prgnRestore, clipRegion);
}
- nRects = REGION_NUM_RECTS(clipRegion);
+ nRects = RegionNumRects(clipRegion);
size = nRects * sizeof(*pRects);
pRects = (XRectangle *) xalloc(size);
- pBox = REGION_RECTS(clipRegion);
+ pBox = RegionRects(clipRegion);
for (i = nRects; i-- > 0;)
{
@@ -4335,7 +4335,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
xfree(pRects);
- extents = *REGION_EXTENTS(pWin -> pScreen, clipRegion);
+ extents = *RegionExtents(clipRegion);
xDst = extents.x1;
yDst = extents.y1;
@@ -4355,14 +4355,14 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
if (clipRegion != NULL && clipRegion != prgnRestore)
{
- REGION_DESTROY(pPixmap -> drawable -> pScreen, clipRegion);
+ RegionDestroy(clipRegion);
}
/*
* Restore the reference point to the origin of the screen.
*/
- REGION_TRANSLATE(pWin -> drawable.pScreen, prgnRestore,
+ RegionTranslate(prgnRestore,
pWin -> drawable.x - pWin -> borderWidth,
pWin -> drawable.y + pWin -> borderWidth);
@@ -4437,11 +4437,11 @@ void nxagentShadowAdaptToRatio(void)
box.x2 = nxagentShadowPixmapPtr -> drawable.width;
box.y2 = nxagentShadowPixmapPtr -> drawable.height;
- REGION_INIT(pScreen, &region, &box, 1);
+ RegionInit(&region, &box, 1);
nxagentMarkCorruptedRegion((DrawablePtr)nxagentShadowPixmapPtr, &region);
- REGION_UNINIT(pScreen, &region);
+ RegionUninit(&region);
}
void nxagentPrintGeometry()
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c
index 4cc2ea607..1840328e4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Split.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c
@@ -502,7 +502,7 @@ void nxagentReleaseSplit(DrawablePtr pDrawable)
(void *) pDrawable);
#endif
- REGION_DESTROY(pDrawable -> pScreen, pResource -> region);
+ RegionDestroy(pResource -> region);
pResource -> region = NullRegion;
}
@@ -623,11 +623,11 @@ void nxagentValidateSplit(DrawablePtr pDrawable, RegionPtr pRegion)
* streamed.
*/
- REGION_INIT(pDrawable -> pScreen, &tmpRegion, NullBox, 1);
+ RegionInit(&tmpRegion, NullBox, 1);
- REGION_INTERSECT(pDrawable -> pScreen, &tmpRegion, pResource -> region, pRegion);
+ RegionIntersect(&tmpRegion, pResource -> region, pRegion);
- if (REGION_NIL(&tmpRegion) == 0)
+ if (RegionNil(&tmpRegion) == 0)
{
#ifdef TEST
fprintf(stderr, "nxagentValidateSplit: Marking the overlapping commits as invalid "
@@ -644,7 +644,7 @@ void nxagentValidateSplit(DrawablePtr pDrawable, RegionPtr pRegion)
}
#endif
- REGION_UNINIT(pDrawable -> pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
}
}
@@ -1097,9 +1097,9 @@ void nxagentHandleEndSplitEvent(int resource)
if (pResource -> drawable != NULL &&
pResource -> region != NullRegion)
{
- if (REGION_NIL(pResource -> region) == 0)
+ if (RegionNil(pResource -> region) == 0)
{
- REGION_SUBTRACT(pResource -> drawable -> pScreen,
+ RegionSubtract(
nxagentCorruptedRegion(pResource -> drawable),
nxagentCorruptedRegion(pResource -> drawable),
pResource -> region);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 782ab9c9c..9201df197 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -388,7 +388,7 @@ FIXME: We need to set save under on the real display?
nxagentWindowPriv(pWin) -> visibilityState = VisibilityUnobscured;
- nxagentWindowPriv(pWin) -> corruptedRegion = REGION_CREATE(pWin -> drawable.pScreen, NULL, 1);
+ nxagentWindowPriv(pWin) -> corruptedRegion = RegionCreate(NULL, 1);
nxagentWindowPriv(pWin) -> hasTransparentChildren = 0;
@@ -486,8 +486,8 @@ FIXME: Do all the windows for which nxagentWindowTopLevel(pWin)
#endif /* SHAPE */
#else
#ifdef SHAPE
- nxagentWindowPriv(pWin)->boundingShape = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
- nxagentWindowPriv(pWin)->clipShape = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+ nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1);
+ nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1);
#endif /* SHAPE */
#endif
@@ -546,14 +546,14 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
{
if (nxagentExposeQueue.exposures[i].localRegion != NullRegion)
{
- REGION_DESTROY(pWin -> drawable.pScreen, nxagentExposeQueue.exposures[i].localRegion);
+ RegionDestroy(nxagentExposeQueue.exposures[i].localRegion);
}
nxagentExposeQueue.exposures[i].localRegion = NullRegion;
if (nxagentExposeQueue.exposures[i].remoteRegion != NullRegion)
{
- REGION_DESTROY(pWin -> drawable.pScreen, nxagentExposeQueue.exposures[i].remoteRegion);
+ RegionDestroy(nxagentExposeQueue.exposures[i].remoteRegion);
}
nxagentExposeQueue.exposures[i].remoteRegion = NullRegion;
@@ -576,13 +576,13 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
if (pWindowPriv->boundingShape)
{
- REGION_DESTROY(pWin->drawable.pScreen,
+ RegionDestroy(
pWindowPriv->boundingShape);
}
if (pWindowPriv->clipShape)
{
- REGION_DESTROY(pWin->drawable.pScreen,
+ RegionDestroy(
pWindowPriv->clipShape);
}
@@ -590,17 +590,17 @@ Bool nxagentDestroyWindow(WindowPtr pWin)
#else
- REGION_DESTROY(pWin->drawable.pScreen,
+ RegionDestroy(
pWindowPriv->boundingShape);
- REGION_DESTROY(pWin->drawable.pScreen,
+ RegionDestroy(
pWindowPriv->clipShape);
#endif
if (pWindowPriv -> corruptedRegion)
{
- REGION_DESTROY(pWin -> drawable.pScreen,
+ RegionDestroy(
pWindowPriv -> corruptedRegion);
pWindowPriv -> corruptedRegion = NULL;
@@ -1342,7 +1342,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask)
if (nxagentExposeQueue.exposures[i].pWindow == pWin &&
nxagentExposeQueue.exposures[i].remoteRegion != NullRegion)
{
- REGION_TRANSLATE(pWin -> drawable.pScreen, nxagentExposeQueue.exposures[i].remoteRegion, offX, offY);
+ RegionTranslate(nxagentExposeQueue.exposures[i].remoteRegion, offX, offY);
}
}
}
@@ -1989,9 +1989,9 @@ void nxagentPaintWindowBackground(pWin, pRegion, what)
{
BoxPtr pBox;
- pBox = REGION_RECTS(pRegion);
+ pBox = RegionRects(pRegion);
- for (i = 0; i < REGION_NUM_RECTS(pRegion); i++)
+ for (i = 0; i < RegionNumRects(pRegion); i++)
{
XClearArea(nxagentDisplay, nxagentWindow(pWin),
pBox[i].x1 - pWin->drawable.x,
@@ -2015,13 +2015,13 @@ void nxagentPaintWindowBackground(pWin, pRegion, what)
* so we need to clip ourselves.
*/
- REGION_INIT(pWin -> drawable.pScreen, &temp, NullBox, 1);
+ RegionInit(&temp, NullBox, 1);
- REGION_INTERSECT(pWin -> drawable.pScreen, &temp, pRegion, &pWin -> clipList);
+ RegionIntersect(&temp, pRegion, &pWin -> clipList);
nxagentFrameBufferPaintWindow(pWin, &temp, what);
- REGION_UNINIT(pWin -> drawable.pScreen, &temp);
+ RegionUninit(&temp);
}
void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
@@ -2034,13 +2034,13 @@ void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
* so we need to clip ourselves.
*/
- REGION_INIT(pWin -> drawable.pScreen, &temp, NullBox, 1);
+ RegionInit(&temp, NullBox, 1);
- REGION_INTERSECT(pWin -> drawable.pScreen, &temp, pRegion, &pWin -> borderClip);
+ RegionIntersect(&temp, pRegion, &pWin -> borderClip);
nxagentFrameBufferPaintWindow(pWin, &temp, what);
- REGION_UNINIT(pWin -> drawable.pScreen, &temp);
+ RegionUninit(&temp);
}
void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion)
@@ -2149,29 +2149,29 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentExposeArrayIsInitialized = 1;
}
- REGION_INIT(pWin -> drawable.pScreen, &temp, (BoxRec *) NULL, 1);
+ RegionInit(&temp, (BoxRec *) NULL, 1);
if (pRgn != NULL)
{
- if (REGION_NUM_RECTS(pRgn) > RECTLIMIT)
+ if (RegionNumRects(pRgn) > RECTLIMIT)
{
- box = *REGION_EXTENTS(pWin -> drawable.pScreen, pRgn);
+ box = *RegionExtents(pRgn);
- REGION_EMPTY(pWin -> drawable.pScreen, pRgn);
- REGION_INIT(pWin -> drawable.pScreen, pRgn, &box, 1);
+ RegionEmpty(pRgn);
+ RegionInit(pRgn, &box, 1);
}
- REGION_UNION(pWin -> drawable.pScreen, &temp, &temp, pRgn);
+ RegionUnion(&temp, &temp, pRgn);
}
if (other_exposed != NULL)
{
- REGION_UNION(pWin -> drawable.pScreen, &temp, &temp, other_exposed);
+ RegionUnion(&temp, &temp, other_exposed);
}
- if (REGION_NIL(&temp) == 0)
+ if (RegionNil(&temp) == 0)
{
- REGION_TRANSLATE(pWin -> drawable.pScreen, &temp,
+ RegionTranslate(&temp,
-(pWin -> drawable.x), -(pWin -> drawable.y));
if (nxagentExposeQueue.length < EXPOSED_SIZE)
@@ -2183,15 +2183,15 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
nxagentExposeQueue.exposures[index].pWindow = pWin;
- nxagentExposeQueue.exposures[index].localRegion = REGION_CREATE(pwin -> drawable.pScreen, NULL, 1);
+ nxagentExposeQueue.exposures[index].localRegion = RegionCreate(NULL, 1);
if (nxagentOption(Rootless) && nxagentWindowPriv(pWin) &&
(nxagentWindowPriv(pWin) -> isMapped == 0 ||
nxagentWindowPriv(pWin) -> visibilityState != VisibilityUnobscured))
{
- nxagentExposeQueue.exposures[index].remoteRegion = REGION_CREATE(pwin -> drawable.pScreen, NULL, 1);
+ nxagentExposeQueue.exposures[index].remoteRegion = RegionCreate(NULL, 1);
- REGION_UNION(pWin -> drawable.pScreen, nxagentExposeQueue.exposures[index].remoteRegion,
+ RegionUnion(nxagentExposeQueue.exposures[index].remoteRegion,
nxagentExposeQueue.exposures[index].remoteRegion, &temp);
#ifdef TEST
@@ -2201,7 +2201,7 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
}
else
{
- REGION_UNION(pWin -> drawable.pScreen, nxagentExposeQueue.exposures[index].localRegion,
+ RegionUnion(nxagentExposeQueue.exposures[index].localRegion,
nxagentExposeQueue.exposures[index].localRegion, &temp);
#ifdef TEST
@@ -2234,21 +2234,21 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
(nxagentWindowPriv(pWin) -> isMapped == 0 ||
nxagentWindowPriv(pWin) -> visibilityState != VisibilityUnobscured))
{
- REGION_UNINIT(pWin -> drawable.pScreen, &temp);
+ RegionUninit(&temp);
return;
}
}
else
{
- REGION_UNINIT(pWin -> drawable.pScreen, &temp);
+ RegionUninit(&temp);
#ifdef TEST
fprintf(stderr, "nxagentWindowExposures: WARNING! Reached maximum size of collect exposures vector.\n");
#endif
- if ((pRgn != NULL && REGION_NOTEMPTY(pWin -> drawable.pScreen, pRgn) != 0) ||
- (other_exposed != NULL && REGION_NOTEMPTY(pWin -> drawable.pScreen, other_exposed) != 0))
+ if ((pRgn != NULL && RegionNotEmpty(pRgn) != 0) ||
+ (other_exposed != NULL && RegionNotEmpty(other_exposed) != 0))
{
nxagentUnmarkExposedRegion(pWin, pRgn, other_exposed);
@@ -2259,11 +2259,11 @@ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_expo
}
}
- REGION_UNINIT(pWin -> drawable.pScreen, &temp);
+ RegionUninit(&temp);
}
- if ((pRgn != NULL && REGION_NOTEMPTY(pWin -> drawable.pScreen, pRgn) != 0) ||
- (other_exposed != NULL && REGION_NOTEMPTY(pWin -> drawable.pScreen, other_exposed) != 0))
+ if ((pRgn != NULL && RegionNotEmpty(pRgn) != 0) ||
+ (other_exposed != NULL && RegionNotEmpty(other_exposed) != 0))
{
nxagentUnmarkExposedRegion(pWin, pRgn, other_exposed);
@@ -2283,11 +2283,11 @@ static Bool nxagentRegionEqual(RegionPtr pReg1, RegionPtr pReg2)
if (pReg1 == NullRegion || pReg2 == NullRegion) return False;
- pBox1 = REGION_RECTS(pReg1);
- n1 = REGION_NUM_RECTS(pReg1);
+ pBox1 = RegionRects(pReg1);
+ n1 = RegionNumRects(pReg1);
- pBox2 = REGION_RECTS(pReg2);
- n2 = REGION_NUM_RECTS(pReg2);
+ pBox2 = RegionRects(pReg2);
+ n2 = RegionNumRects(pReg2);
if (n1 != n2) return False;
@@ -2326,23 +2326,23 @@ void nxagentShapeWindow(WindowPtr pWin)
{
#ifdef DEBUG
fprintf(stderr, "nxagentShapeWindow: wBounding shape has [%ld] rects.\n",
- REGION_NUM_RECTS(wBoundingShape(pWin)));
+ RegionNumRects(wBoundingShape(pWin)));
#endif
#ifdef NXAGENT_SHAPE2
if (!nxagentWindowPriv(pWin)->boundingShape)
{
- nxagentWindowPriv(pWin)->boundingShape = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+ nxagentWindowPriv(pWin)->boundingShape = RegionCreate(NULL, 1);
}
#endif
- REGION_COPY(pWin->drawable.pScreen,
+ RegionCopy(
nxagentWindowPriv(pWin)->boundingShape, wBoundingShape(pWin));
reg = XCreateRegion();
- pBox = REGION_RECTS(nxagentWindowPriv(pWin)->boundingShape);
+ pBox = RegionRects(nxagentWindowPriv(pWin)->boundingShape);
for (i = 0;
- i < REGION_NUM_RECTS(nxagentWindowPriv(pWin)->boundingShape);
+ i < RegionNumRects(nxagentWindowPriv(pWin)->boundingShape);
i++)
{
rect.x = pBox[i].x1;
@@ -2365,7 +2365,7 @@ void nxagentShapeWindow(WindowPtr pWin)
fprintf(stderr, "nxagentShapeWindow: wBounding shape does not exist. Removing the shape.\n");
#endif
- REGION_EMPTY(pWin->drawable.pScreen,
+ RegionEmpty(
nxagentWindowPriv(pWin)->boundingShape);
#ifndef NXAGENT_SHAPE
@@ -2386,23 +2386,23 @@ void nxagentShapeWindow(WindowPtr pWin)
{
#ifdef DEBUG
fprintf(stderr, "nxagentShapeWindow: wClip shape has [%ld] rects.\n",
- REGION_NUM_RECTS(wClipShape(pWin)));
+ RegionNumRects(wClipShape(pWin)));
#endif
#ifdef NXAGENT_SHAPE2
if (!nxagentWindowPriv(pWin)->clipShape)
{
- nxagentWindowPriv(pWin)->clipShape = REGION_CREATE(pWin->drawable.pScreen, NULL, 1);
+ nxagentWindowPriv(pWin)->clipShape = RegionCreate(NULL, 1);
}
#endif
- REGION_COPY(pWin->drawable.pScreen,
+ RegionCopy(
nxagentWindowPriv(pWin)->clipShape, wClipShape(pWin));
reg = XCreateRegion();
- pBox = REGION_RECTS(nxagentWindowPriv(pWin)->clipShape);
+ pBox = RegionRects(nxagentWindowPriv(pWin)->clipShape);
for (i = 0;
- i < REGION_NUM_RECTS(nxagentWindowPriv(pWin)->clipShape);
+ i < RegionNumRects(nxagentWindowPriv(pWin)->clipShape);
i++)
{
rect.x = pBox[i].x1;
@@ -2425,7 +2425,7 @@ void nxagentShapeWindow(WindowPtr pWin)
fprintf(stderr, "nxagentShapeWindow: wClip shape does not exist. Removing the shape.\n");
#endif
- REGION_EMPTY(pWin->drawable.pScreen,
+ RegionEmpty(
nxagentWindowPriv(pWin)->clipShape);
#ifndef NXAGENT_SHAPE
@@ -2450,15 +2450,15 @@ static int nxagentForceExposure(WindowPtr pWin, void * ptr)
Box.x2 = Box.x1 + pWin->drawable.width;
Box.y2 = Box.y1 + pWin->drawable.height;
- exposedRgn = REGION_CREATE(pWin->drawable.pScreen, &Box, 1);
- REGION_INTERSECT(pWin->drawable.pScreen, exposedRgn, exposedRgn, &pRoot->winSize);
+ exposedRgn = RegionCreate(&Box, 1);
+ RegionIntersect(exposedRgn, exposedRgn, &pRoot->winSize);
- if (exposedRgn != NULL && REGION_NOTEMPTY(pWin -> drawable.pScreen, exposedRgn) != 0)
+ if (exposedRgn != NULL && RegionNotEmpty(exposedRgn) != 0)
{
miWindowExposures(pWin, exposedRgn, NullRegion);
}
- REGION_DESTROY(pWin->drawable.pScreen, exposedRgn);
+ RegionDestroy(exposedRgn);
}
return WT_WALKCHILDREN;
@@ -3186,14 +3186,14 @@ static void nxagentReconfigureWindow(void * param0, XID param1, void * data_buff
#ifdef SHAPE
if (nxagentWindowPriv(pWin) -> boundingShape)
{
- REGION_DESTROY(pWin -> drawable.pScreen,
+ RegionDestroy(
nxagentWindowPriv(pWin) -> boundingShape);
nxagentWindowPriv(pWin) -> boundingShape = NULL;
}
if (nxagentWindowPriv(pWin) -> clipShape)
{
- REGION_DESTROY(pWin -> drawable.pScreen,
+ RegionDestroy(
nxagentWindowPriv(pWin) -> clipShape);
nxagentWindowPriv(pWin) -> clipShape = NULL;
}
@@ -3740,7 +3740,7 @@ void nxagentEmptyBackingStoreRegion(void * param0, XID param1, void * data_buffe
if (pBackingStore != NULL)
{
- REGION_EMPTY(pWin -> pScreen, &pBackingStore->SavedRegion);
+ RegionEmpty(&pBackingStore->SavedRegion);
#ifdef TEST
fprintf(stderr, "nxagentEmptyBackingStoreRegion: Emptying saved region for window at [%p].\n", (void*) pWin);
diff --git a/nx-X11/programs/Xserver/include/regionstr.h b/nx-X11/programs/Xserver/include/regionstr.h
index cf41170a6..b1eb100a5 100644
--- a/nx-X11/programs/Xserver/include/regionstr.h
+++ b/nx-X11/programs/Xserver/include/regionstr.h
@@ -103,73 +103,73 @@ extern RegDataRec miBrokenData;
#ifdef NEED_SCREEN_REGIONS
-#define REGION_CREATE(_pScreen, _rect, _size) \
+#define RegionCreate(_rect, _size) \
(*(REG_pScreen)->RegionCreate)(_rect, _size)
-#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
+#define RegionInit(_pReg, _rect, _size) \
(*(REG_pScreen)->RegionInit)(_pReg, _rect, _size)
-#define REGION_COPY(_pScreen, dst, src) \
+#define RegionCopy(dst, src) \
(*(REG_pScreen)->RegionCopy)(dst, src)
-#define REGION_DESTROY(_pScreen, _pReg) \
+#define RegionDestroy(_pReg) \
(*(REG_pScreen)->RegionDestroy)(_pReg)
-#define REGION_UNINIT(_pScreen, _pReg) \
+#define RegionUninit(_pReg) \
(*(REG_pScreen)->RegionUninit)(_pReg)
-#define REGION_INTERSECT(_pScreen, newReg, reg1, reg2) \
+#define RegionIntersect(newReg, reg1, reg2) \
(*(REG_pScreen)->Intersect)(newReg, reg1, reg2)
-#define REGION_UNION(_pScreen, newReg, reg1, reg2) \
+#define RegionUnion(newReg, reg1, reg2) \
(*(REG_pScreen)->Union)(newReg, reg1, reg2)
-#define REGION_SUBTRACT(_pScreen, newReg, reg1, reg2) \
+#define RegionSubtract(newReg, reg1, reg2) \
(*(REG_pScreen)->Subtract)(newReg, reg1, reg2)
-#define REGION_INVERSE(_pScreen, newReg, reg1, invRect) \
+#define RegionInverse(newReg, reg1, invRect) \
(*(REG_pScreen)->Inverse)(newReg, reg1, invRect)
-#define REGION_RESET(_pScreen, _pReg, _pBox) \
+#define RegionReset(_pReg, _pBox) \
(*(REG_pScreen)->RegionReset)(_pReg, _pBox)
-#define REGION_TRANSLATE(_pScreen, _pReg, _x, _y) \
+#define RegionTranslate(_pReg, _x, _y) \
(*(REG_pScreen)->TranslateRegion)(_pReg, _x, _y)
-#define RECT_IN_REGION(_pScreen, _pReg, prect) \
+#define RegionContainsRect(_pReg, prect) \
(*(REG_pScreen)->RectIn)(_pReg, prect)
-#define POINT_IN_REGION(_pScreen, _pReg, _x, _y, prect) \
+#define RegionContainsPoint(_pReg, _x, _y, prect) \
(*(REG_pScreen)->PointInRegion)(_pReg, _x, _y, prect)
-#define REGION_NOTEMPTY(_pScreen, _pReg) \
+#define RegionNotEmpty(_pReg) \
(*(REG_pScreen)->RegionNotEmpty)(_pReg)
-#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \
+#define RegionEqual(_pReg1, _pReg2) \
(*(REG_pScreen)->RegionEqual)(_pReg1, _pReg2)
-#define REGION_BROKEN(_pScreen, _pReg) \
+#define RegionBroken(_pReg) \
(*(REG_pScreen)->RegionBroken)(_pReg)
-#define REGION_BREAK(_pScreen, _pReg) \
+#define RegionBreak(_pReg) \
(*(REG_pScreen)->RegionBreak)(_pReg)
-#define REGION_EMPTY(_pScreen, _pReg) \
+#define RegionEmpty(_pReg) \
(*(REG_pScreen)->RegionEmpty)(_pReg)
-#define REGION_EXTENTS(_pScreen, _pReg) \
+#define RegionExtents(_pReg) \
(*(REG_pScreen)->RegionExtents)(_pReg)
-#define REGION_APPEND(_pScreen, dstrgn, rgn) \
+#define RegionAppend(dstrgn, rgn) \
(*(REG_pScreen)->RegionAppend)(dstrgn, rgn)
-#define REGION_VALIDATE(_pScreen, badreg, pOverlap) \
+#define RegionValidate(badreg, pOverlap) \
(*(REG_pScreen)->RegionValidate)(badreg, pOverlap)
#define BITMAP_TO_REGION(_pScreen, pPix) \
(*(REG_pScreen)->BitmapToRegion)(pPix)
-#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \
+#define RegionFromRects(nrects, prect, ctype) \
(*(REG_pScreen)->RectsToRegion)(nrects, prect, ctype)
#else /* !NEED_SCREEN_REGIONS */
@@ -177,80 +177,80 @@ extern RegDataRec miBrokenData;
/* Reference _pScreen macro argument and check its type */
#define REGION_SCREEN(_pScreen) (void)((REG_pScreen)->myNum)
-#define REGION_CREATE(_pScreen, _rect, _size) \
+#define RegionCreate(_rect, _size) \
(REGION_SCREEN(_pScreen), miRegionCreate(_rect, _size))
-#define REGION_COPY(_pScreen, dst, src) \
+#define RegionCopy(dst, src) \
(REGION_SCREEN(_pScreen), miRegionCopy(dst, src))
-#define REGION_DESTROY(_pScreen, _pReg) \
+#define RegionDestroy(_pReg) \
(REGION_SCREEN(_pScreen), miRegionDestroy(_pReg))
-#define REGION_INTERSECT(_pScreen, newReg, reg1, reg2) \
+#define RegionIntersect(newReg, reg1, reg2) \
(REGION_SCREEN(_pScreen), miIntersect(newReg, reg1, reg2))
-#define REGION_UNION(_pScreen, newReg, reg1, reg2) \
+#define RegionUnion(newReg, reg1, reg2) \
(REGION_SCREEN(_pScreen), miUnion(newReg, reg1, reg2))
-#define REGION_SUBTRACT(_pScreen, newReg, reg1, reg2) \
+#define RegionSubtract(newReg, reg1, reg2) \
(REGION_SCREEN(_pScreen), miSubtract(newReg, reg1, reg2))
-#define REGION_INVERSE(_pScreen, newReg, reg1, invRect) \
+#define RegionInverse(newReg, reg1, invRect) \
(REGION_SCREEN(_pScreen), miInverse(newReg, reg1, invRect))
-#define REGION_TRANSLATE(_pScreen, _pReg, _x, _y) \
+#define RegionTranslate(_pReg, _x, _y) \
(REGION_SCREEN(_pScreen), miTranslateRegion(_pReg, _x, _y))
-#define RECT_IN_REGION(_pScreen, _pReg, prect) \
+#define RegionContainsRect(_pReg, prect) \
(REGION_SCREEN(_pScreen), miRectIn(_pReg, prect))
-#define POINT_IN_REGION(_pScreen, _pReg, _x, _y, prect) \
+#define RegionContainsPoint(_pReg, _x, _y, prect) \
(REGION_SCREEN(_pScreen), miPointInRegion(_pReg, _x, _y, prect))
-#define REGION_APPEND(_pScreen, dstrgn, rgn) \
+#define RegionAppend(dstrgn, rgn) \
(REGION_SCREEN(_pScreen), miRegionAppend(dstrgn, rgn))
-#define REGION_VALIDATE(_pScreen, badreg, pOverlap) \
+#define RegionValidate(badreg, pOverlap) \
(REGION_SCREEN(_pScreen), miRegionValidate(badreg, pOverlap))
#define BITMAP_TO_REGION(_pScreen, pPix) \
(*(_pScreen)->BitmapToRegion)(pPix) /* no mi version?! */
-#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \
+#define RegionFromRects(nrects, prect, ctype) \
(REGION_SCREEN(_pScreen), miRectsToRegion(nrects, prect, ctype))
-#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \
+#define RegionEqual(_pReg1, _pReg2) \
(REGION_SCREEN(_pScreen), miRegionEqual(_pReg1, _pReg2))
-#define REGION_BREAK(_pScreen, _pReg) \
+#define RegionBreak(_pReg) \
(REGION_SCREEN(_pScreen), miRegionBreak(_pReg))
#ifdef DONT_INLINE_REGION_OPS
-#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
+#define RegionInit(_pReg, _rect, _size) \
(REGION_SCREEN(_pScreen), miRegionInit(_pReg, _rect, _size))
-#define REGION_UNINIT(_pScreen, _pReg) \
+#define RegionUninit(_pReg) \
(REGION_SCREEN(_pScreen), miRegionUninit(_pReg))
-#define REGION_RESET(_pScreen, _pReg, _pBox) \
+#define RegionReset(_pReg, _pBox) \
(REGION_SCREEN(_pScreen), miRegionReset(_pReg, _pBox))
-#define REGION_NOTEMPTY(_pScreen, _pReg) \
+#define RegionNotEmpty(_pReg) \
(REGION_SCREEN(_pScreen), miRegionNotEmpty(_pReg))
-#define REGION_BROKEN(_pScreen, _pReg) \
+#define RegionBroken(_pReg) \
(REGION_SCREEN(_pScreen), miRegionBroken(_pReg))
-#define REGION_EMPTY(_pScreen, _pReg) \
+#define RegionEmpty(_pReg) \
(REGION_SCREEN(_pScreen), miRegionEmpty(_pReg))
-#define REGION_EXTENTS(_pScreen, _pReg) \
+#define RegionExtents(_pReg) \
(REGION_SCREEN(_pScreen), miRegionExtents(_pReg))
#else /* inline certain simple region ops for performance */
-#define REGION_INIT(_pScreen, _pReg, _rect, _size) \
+#define RegionInit(_pReg, _rect, _size) \
{ \
REGION_SCREEN(_pScreen); \
if (_rect) \
@@ -274,7 +274,7 @@ extern RegDataRec miBrokenData;
}
-#define REGION_UNINIT(_pScreen, _pReg) \
+#define RegionUninit(_pReg) \
{ \
REGION_SCREEN(_pScreen); \
if ((_pReg)->data && (_pReg)->data->size) { \
@@ -283,32 +283,32 @@ extern RegDataRec miBrokenData;
} \
}
-#define REGION_RESET(_pScreen, _pReg, _pBox) \
+#define RegionReset(_pReg, _pBox) \
{ \
REGION_SCREEN(_pScreen); \
(_pReg)->extents = *(_pBox); \
- REGION_UNINIT(_pScreen, _pReg); \
+ RegionUninit(_pReg); \
(_pReg)->data = (RegDataPtr)NULL; \
}
-#define REGION_NOTEMPTY(_pScreen, _pReg) \
+#define RegionNotEmpty(_pReg) \
(REGION_SCREEN(_pScreen), !REGION_NIL(_pReg))
-#define REGION_BROKEN(_pScreen, _pReg) \
+#define RegionBroken(_pReg) \
(REGION_SCREEN(_pScreen), REGION_NAR(_pReg))
-#define REGION_EMPTY(_pScreen, _pReg) \
+#define RegionEmpty(_pReg) \
{ \
- REGION_UNINIT(_pScreen, _pReg); \
+ RegionUninit(_pReg); \
(_pReg)->extents.x2 = (_pReg)->extents.x1; \
(_pReg)->extents.y2 = (_pReg)->extents.y1; \
(_pReg)->data = &miEmptyData; \
}
-#define REGION_EXTENTS(_pScreen, _pReg) \
+#define RegionExtents(_pReg) \
(REGION_SCREEN(_pScreen), &(_pReg)->extents)
-#define REGION_NULL(_pScreen, _pReg) \
+#define RegionNull(_pReg) \
{ \
REGION_SCREEN(_pScreen); \
(_pReg)->extents = miEmptyBox; \
@@ -319,9 +319,9 @@ extern RegDataRec miBrokenData;
#endif /* NEED_SCREEN_REGIONS */
-#ifndef REGION_NULL
-#define REGION_NULL(_pScreen, _pReg) \
- REGION_INIT(_pScreen, _pReg, NullBox, 1)
+#ifndef RegionNull
+#define RegionNull(_pReg) \
+ RegionInit(_pReg, NullBox, 1)
#endif
/* moved from mi.h */
diff --git a/nx-X11/programs/Xserver/mi/mibank.c b/nx-X11/programs/Xserver/mi/mibank.c
index b5da2267f..24e202094 100644
--- a/nx-X11/programs/Xserver/mi/mibank.c
+++ b/nx-X11/programs/Xserver/mi/mibank.c
@@ -607,8 +607,8 @@ miBankCopy(
if (!pScreenPriv->pBanks[ns])
continue;
- nBox = REGION_NUM_RECTS(pScreenPriv->pBanks[ns]);
- pBox = REGION_RECTS(pScreenPriv->pBanks[ns]);
+ nBox = RegionNumRects(pScreenPriv->pBanks[ns]);
+ pBox = RegionRects(pScreenPriv->pBanks[ns]);
for (; nBox--; pBox++)
{
@@ -668,8 +668,8 @@ miBankCopy(
* It's faster to let the lower-level CopyArea do the clipping
* within each bank.
*/
- nBox = REGION_NUM_RECTS(pScreenPriv->pBanks[nd]);
- pBox = REGION_RECTS(pScreenPriv->pBanks[nd]);
+ nBox = RegionNumRects(pScreenPriv->pBanks[nd]);
+ pBox = RegionRects(pScreenPriv->pBanks[nd]);
for (; nBox--; pBox++)
{
@@ -775,10 +775,10 @@ miBankCopy(
}
else
{
- REGION_INIT(pScreen, &rgnDst, &fastBox, 1);
- REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrcClip);
- pBox = REGION_RECTS(&rgnDst);
- nBox = REGION_NUM_RECTS(&rgnDst);
+ RegionInit(&rgnDst, &fastBox, 1);
+ RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip);
+ pBox = RegionRects(&rgnDst);
+ nBox = RegionNumRects(&rgnDst);
}
/*
@@ -804,8 +804,8 @@ miBankCopy(
if (!pScreenPriv->pBanks[ns])
continue;
- nBoxClipSrc = REGION_NUM_RECTS(pScreenPriv->pBanks[ns]);
- pBoxClipSrc = REGION_RECTS(pScreenPriv->pBanks[ns]);
+ nBoxClipSrc = RegionNumRects(pScreenPriv->pBanks[ns]);
+ pBoxClipSrc = RegionRects(pScreenPriv->pBanks[ns]);
for (; nBoxClipSrc--; pBoxClipSrc++)
{
@@ -836,9 +836,9 @@ miBankCopy(
* so use the bank clips here instead.
*/
nBoxClipDst =
- REGION_NUM_RECTS(pScreenPriv->pBanks[nd]);
+ RegionNumRects(pScreenPriv->pBanks[nd]);
pBoxClipDst =
- REGION_RECTS(pScreenPriv->pBanks[nd]);
+ RegionRects(pScreenPriv->pBanks[nd]);
for (; nBoxClipDst--; pBoxClipDst++)
{
@@ -878,7 +878,7 @@ miBankCopy(
pScreenPriv->nPixelsPerScanlinePadUnit) ||
(ccBox.x2 %
pScreenPriv->nPixelsPerScanlinePadUnit) ||
- (RECT_IN_REGION(pScreen,
+ (RegionContainsRect(
pGCPriv->pBankedClips[nd], &ccBox) !=
rgnIN)))
pQueue->fastBlit = FALSE;
@@ -892,9 +892,9 @@ miBankCopy(
if (!fastClip)
{
- REGION_UNINIT(pScreen, &rgnDst);
+ RegionUninit(&rgnDst);
if (freeSrcClip)
- REGION_DESTROY(pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
}
pQueueNew = pQueue;
@@ -1405,16 +1405,16 @@ miBankValidateGC(
continue;
if (!(prgnClip = pGCPriv->pBankedClips[i]))
- prgnClip = REGION_CREATE(pScreen, NULL, 1);
+ prgnClip = RegionCreate(NULL, 1);
- REGION_INTERSECT(pScreen, prgnClip,
+ RegionIntersect(prgnClip,
pScreenPriv->pBanks[i], pGC->pCompositeClip);
- if ((REGION_NUM_RECTS(prgnClip) <= 1) &&
+ if ((RegionNumRects(prgnClip) <= 1) &&
((prgnClip->extents.x1 == prgnClip->extents.x2) ||
(prgnClip->extents.y1 == prgnClip->extents.y2)))
{
- REGION_DESTROY(pScreen, prgnClip);
+ RegionDestroy(prgnClip);
pGCPriv->pBankedClips[i] = NULL;
}
else
@@ -1469,7 +1469,7 @@ miBankValidateGC(
if (!pGCPriv->pBankedClips[i])
continue;
- REGION_DESTROY(pScreen, pGCPriv->pBankedClips[i]);
+ RegionDestroy(pGCPriv->pBankedClips[i]);
pGCPriv->pBankedClips[i] = NULL;
}
}
@@ -1528,7 +1528,7 @@ miBankDestroyGC(
if (!pGCPriv->pBankedClips[i])
continue;
- REGION_DESTROY(pScreen, pGCPriv->pBankedClips[i]);
+ RegionDestroy(pGCPriv->pBankedClips[i]);
pGCPriv->pBankedClips[i] = NULL;
}
@@ -1707,7 +1707,7 @@ miBankCloseScreen(
/* Delete bank clips */
for (i = 0; i < pScreenPriv->nBanks; i++)
if (pScreenPriv->pBanks[i])
- REGION_DESTROY(pScreen, pScreenPriv->pBanks[i]);
+ RegionDestroy(pScreenPriv->pBanks[i]);
Xfree(pScreenPriv->pBanks);
@@ -1915,17 +1915,17 @@ miBankPaintWindow(
}
else
{
- REGION_NULL(pScreen, &tmpReg);
+ RegionNull(&tmpReg);
for (i = 0; i < pScreenPriv->nBanks; i++)
{
if (!pScreenPriv->pBanks[i])
continue;
- REGION_INTERSECT(pScreen, &tmpReg, pRegion,
+ RegionIntersect(&tmpReg, pRegion,
pScreenPriv->pBanks[i]);
- if (REGION_NIL(&tmpReg))
+ if (RegionNil(&tmpReg))
continue;
SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i);
@@ -1933,7 +1933,7 @@ miBankPaintWindow(
(*PaintWindow)(pWin, &tmpReg, what);
}
- REGION_UNINIT(pScreen, &tmpReg);
+ RegionUninit(&tmpReg);
}
if (what == PW_BORDER)
@@ -1968,15 +1968,15 @@ miBankCopyWindow(
ChangeGC(pGC, GCSubwindowMode, &subWindowMode);
ValidateGC(pDrawable, pGC);
- pRgnDst = REGION_CREATE(pScreen, NULL, 1);
+ pRgnDst = RegionCreate(NULL, 1);
dx = ptOldOrg.x - pWindow->drawable.x;
dy = ptOldOrg.y - pWindow->drawable.y;
- REGION_TRANSLATE(pScreen, pRgnSrc, -dx, -dy);
- REGION_INTERSECT(pScreen, pRgnDst, &pWindow->borderClip, pRgnSrc);
+ RegionTranslate(pRgnSrc, -dx, -dy);
+ RegionIntersect(pRgnDst, &pWindow->borderClip, pRgnSrc);
- pBox = REGION_RECTS(pRgnDst);
- nBox = REGION_NUM_RECTS(pRgnDst);
+ pBox = RegionRects(pRgnDst);
+ nBox = RegionNumRects(pRgnDst);
pBoxNew1 = NULL;
pBoxNew2 = NULL;
@@ -2052,7 +2052,7 @@ miBankCopyWindow(
FreeScratchGC(pGC);
- REGION_DESTROY(pScreen, pRgnDst);
+ RegionDestroy(pRgnDst);
DEALLOCATE_LOCAL(pBoxNew2);
DEALLOCATE_LOCAL(pBoxNew1);
@@ -2086,30 +2086,30 @@ miBankSaveAreas(
}
else
{
- REGION_NULL(pScreen, &rgnClipped);
- REGION_TRANSLATE(pScreen, prgnSave, xorg, yorg);
+ RegionNull(&rgnClipped);
+ RegionTranslate(prgnSave, xorg, yorg);
for (i = 0; i < pScreenPriv->nBanks; i++)
{
if (!pScreenPriv->pBanks[i])
continue;
- REGION_INTERSECT(pScreen, &rgnClipped,
+ RegionIntersect(&rgnClipped,
prgnSave, pScreenPriv->pBanks[i]);
- if (REGION_NIL(&rgnClipped))
+ if (RegionNil(&rgnClipped))
continue;
SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i);
- REGION_TRANSLATE(pScreen, &rgnClipped, -xorg, -yorg);
+ RegionTranslate(&rgnClipped, -xorg, -yorg);
(*pScreen->BackingStoreFuncs.SaveAreas)(pPixmap, &rgnClipped,
xorg, yorg, pWin);
}
- REGION_TRANSLATE(pScreen, prgnSave, -xorg, -yorg);
- REGION_UNINIT(pScreen, &rgnClipped);
+ RegionTranslate(prgnSave, -xorg, -yorg);
+ RegionUninit(&rgnClipped);
}
SCREEN_WRAP(BackingStoreFuncs.SaveAreas, miBankSaveAreas);
@@ -2140,17 +2140,17 @@ miBankRestoreAreas(
}
else
{
- REGION_NULL(pScreen, &rgnClipped);
+ RegionNull(&rgnClipped);
for (i = 0; i < pScreenPriv->nBanks; i++)
{
if (!pScreenPriv->pBanks[i])
continue;
- REGION_INTERSECT(pScreen, &rgnClipped,
+ RegionIntersect(&rgnClipped,
prgnRestore, pScreenPriv->pBanks[i]);
- if (REGION_NIL(&rgnClipped))
+ if (RegionNil(&rgnClipped))
continue;
SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i);
@@ -2159,7 +2159,7 @@ miBankRestoreAreas(
xorg, yorg, pWin);
}
- REGION_UNINIT(pScreen, &rgnClipped);
+ RegionUninit(&rgnClipped);
}
SCREEN_WRAP(BackingStoreFuncs.RestoreAreas, miBankRestoreAreas);
@@ -2345,9 +2345,9 @@ miInitializeBanking(
}
pScreenPriv->pBanks[iBank] =
- RECTS_TO_REGION(pScreen, pRect - pRects, pRects, 0);
+ RegionFromRects(pRect - pRects, pRects, 0);
if (!pScreenPriv->pBanks[iBank] ||
- REGION_NAR(pScreenPriv->pBanks[iBank]))
+ RegionNar(pScreenPriv->pBanks[iBank]))
{
we = 1;
break;
@@ -2358,7 +2358,7 @@ miInitializeBanking(
{
for (i = iBank; i >= 0; i--)
if (pScreenPriv->pBanks[i])
- REGION_DESTROY(pScreen, pScreenPriv->pBanks[i]);
+ RegionDestroy(pScreenPriv->pBanks[i]);
Xfree(pScreenPriv->pBanks);
Xfree(pScreenPriv);
diff --git a/nx-X11/programs/Xserver/mi/mibitblt.c b/nx-X11/programs/Xserver/mi/mibitblt.c
index 60318a046..b19a15900 100644
--- a/nx-X11/programs/Xserver/mi/mibitblt.c
+++ b/nx-X11/programs/Xserver/mi/mibitblt.c
@@ -117,7 +117,7 @@ miCopyArea(pSrcDrawable, pDstDrawable,
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
@@ -148,8 +148,8 @@ miCopyArea(pSrcDrawable, pDstDrawable,
ALLOCATE_LOCAL(heightSrc * sizeof(DDXPointRec));
pwidthFirst = pwidth = (unsigned int *)
ALLOCATE_LOCAL(heightSrc * sizeof(unsigned int));
- numRects = REGION_NUM_RECTS(prgnSrcClip);
- boxes = REGION_RECTS(prgnSrcClip);
+ numRects = RegionNumRects(prgnSrcClip);
+ boxes = RegionRects(prgnSrcClip);
ordering = (unsigned int *)
ALLOCATE_LOCAL(numRects * sizeof(unsigned int));
if(!pptFirst || !pwidthFirst || !ordering)
@@ -264,7 +264,7 @@ miCopyArea(pSrcDrawable, pDstDrawable,
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
widthSrc, heightSrc, xOut, yOut, (unsigned long)0);
if(realSrcClip)
- REGION_DESTROY(pGC->pScreen, prgnSrcClip);
+ RegionDestroy(prgnSrcClip);
DEALLOCATE_LOCAL(ordering);
DEALLOCATE_LOCAL(pwidthFirst);
@@ -452,9 +452,9 @@ miOpqStipDrawable(pDraw, pGC, prgnSrc, pbits, srcx, w, h, dstx, dsty)
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);
@@ -587,7 +587,7 @@ miCopyPlane(pSrcDrawable, pDstDrawable,
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 */
@@ -595,15 +595,15 @@ miCopyPlane(pSrcDrawable, pDstDrawable,
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))
{
@@ -627,7 +627,7 @@ miCopyPlane(pSrcDrawable, pDstDrawable,
}
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
width, height, dstx, dsty, bitPlane);
- REGION_DESTROY(pGC->pScreen, prgnSrc);
+ RegionDestroy(prgnSrc);
return prgnExposed;
}
@@ -776,11 +776,11 @@ miPutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage)
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/nx-X11/programs/Xserver/mi/mibstore.c b/nx-X11/programs/Xserver/mi/mibstore.c
index 875ec87f3..a24e2cbcd 100644
--- a/nx-X11/programs/Xserver/mi/mibstore.c
+++ b/nx-X11/programs/Xserver/mi/mibstore.c
@@ -477,7 +477,7 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
bounds.y1 = sy + pDrawable->y;
bounds.x2 = bounds.x1 + w;
bounds.y2 = bounds.y1 + h;
- REGION_INIT(pScreen, &Remaining, &bounds, 0);
+ RegionInit(&Remaining, &bounds, 0);
for (;;)
{
bounds.x1 = sx + pDrawable->x - pWin->drawable.x;
@@ -486,11 +486,11 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
bounds.y2 = bounds.y1 + h;
if (pWin->viewable && pWin->backStorage &&
pWin->drawable.depth == depth &&
- (RECT_IN_REGION(pScreen, &(pWindowPriv =
+ (RegionContainsRect(&(pWindowPriv =
(miBSWindowPtr) pWin->backStorage)->SavedRegion,
&bounds) != rgnOUT ||
- RECT_IN_REGION(pScreen, &Remaining,
- REGION_EXTENTS(pScreen, &pWin->borderSize)) != rgnOUT))
+ RegionContainsRect(&Remaining,
+ RegionExtents(&pWin->borderSize)) != rgnOUT))
{
if (!pPixmap)
{
@@ -508,8 +508,8 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
}
ChangeGC (pGC, GCSubwindowMode, &subWindowMode);
ValidateGC ((DrawablePtr)pPixmap, pGC);
- REGION_NULL(pScreen, &Border);
- REGION_NULL(pScreen, &Inside);
+ RegionNull(&Border);
+ RegionNull(&Inside);
pSrcWin = (WindowPtr) pDrawable;
x = sx;
y = sy;
@@ -523,28 +523,28 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
(DrawablePtr)pPixmap, pGC,
x, y, w, h,
0, 0);
- REGION_SUBTRACT(pScreen, &Remaining, &Remaining,
+ RegionSubtract(&Remaining, &Remaining,
&((WindowPtr) pDrawable)->borderClip);
}
- REGION_INTERSECT(pScreen, &Inside, &Remaining, &pWin->winSize);
- REGION_TRANSLATE(pScreen, &Inside,
+ RegionIntersect(&Inside, &Remaining, &pWin->winSize);
+ RegionTranslate(&Inside,
-pWin->drawable.x,
-pWin->drawable.y);
- REGION_INTERSECT(pScreen, &Inside, &Inside,
+ RegionIntersect(&Inside, &Inside,
&pWindowPriv->SavedRegion);
/* offset of sub-window in GetImage pixmap */
xoff = pWin->drawable.x - pDrawable->x - sx;
yoff = pWin->drawable.y - pDrawable->y - sy;
- if (REGION_NUM_RECTS(&Inside) > 0)
+ if (RegionNumRects(&Inside) > 0)
{
switch (pWindowPriv->status)
{
case StatusContents:
- pBox = REGION_RECTS(&Inside);
- for (n = REGION_NUM_RECTS(&Inside); --n >= 0;)
+ pBox = RegionRects(&Inside);
+ for (n = RegionNumRects(&Inside); --n >= 0;)
{
(*pGC->ops->CopyArea) (
(DrawablePtr)pWindowPriv->pBackingPixmap,
@@ -569,12 +569,12 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
break;
}
}
- REGION_SUBTRACT(pScreen, &Border, &pWin->borderSize,
+ RegionSubtract(&Border, &pWin->borderSize,
&pWin->winSize);
- REGION_INTERSECT(pScreen, &Border, &Border, &Remaining);
- if (REGION_NUM_RECTS(&Border) > 0)
+ RegionIntersect(&Border, &Border, &Remaining);
+ if (RegionNumRects(&Border) > 0)
{
- REGION_TRANSLATE(pScreen, &Border, -pWin->drawable.x,
+ RegionTranslate(&Border, -pWin->drawable.x,
-pWin->drawable.y);
miBSFillVirtualBits ((DrawablePtr) pPixmap, pGC, &Border,
xoff, yoff,
@@ -595,12 +595,12 @@ miBSGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
}
}
- REGION_UNINIT(pScreen, &Remaining);
+ RegionUninit(&Remaining);
if (pPixmap)
{
- REGION_UNINIT(pScreen, &Border);
- REGION_UNINIT(pScreen, &Inside);
+ RegionUninit(&Border);
+ RegionUninit(&Inside);
(*pScreen->GetImage) ((DrawablePtr) pPixmap,
0, 0, w, h, format, planemask, pdstLine);
(*pScreen->DestroyPixmap) (pPixmap);
@@ -664,7 +664,7 @@ miBSGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
bounds.y2 = ppt[i].y;
}
- switch (RECT_IN_REGION(pScreen, &pWindowPriv->SavedRegion, &bounds))
+ switch (RegionContainsRect(&pWindowPriv->SavedRegion, &bounds))
{
case rgnPART:
if (!pPixmap)
@@ -1177,39 +1177,39 @@ miBSDoCopy(
box.y1 = srcy + pWin->drawable.y;
box.y2 = box.y1 + h;
- pRgnExp = REGION_CREATE(pGC->pScreen, &box, 1);
- REGION_INTERSECT(pGC->pScreen, pRgnExp, pRgnExp, &pWin->clipList);
- pRgnObs = REGION_CREATE(pGC->pScreen, NULL, 1);
- REGION_INVERSE( pGC->pScreen, pRgnObs, pRgnExp, &box);
+ pRgnExp = RegionCreate(&box, 1);
+ RegionIntersect(pRgnExp, pRgnExp, &pWin->clipList);
+ pRgnObs = RegionCreate(NULL, 1);
+ RegionInverse(pRgnObs, pRgnExp, &box);
/*
* Translate regions into window coordinates for proper calls
* to the copyProc, then make sure none of the obscured region sticks
* into invalid areas of the backing pixmap.
*/
- REGION_TRANSLATE(pGC->pScreen, pRgnExp,
+ RegionTranslate(pRgnExp,
-pWin->drawable.x,
-pWin->drawable.y);
- REGION_TRANSLATE(pGC->pScreen, pRgnObs,
+ RegionTranslate(pRgnObs,
-pWin->drawable.x,
-pWin->drawable.y);
- REGION_INTERSECT(pGC->pScreen, pRgnObs, pRgnObs, &pBackingStore->SavedRegion);
+ RegionIntersect(pRgnObs, pRgnObs, &pBackingStore->SavedRegion);
/*
* If the obscured region is empty, there's no point being fancy.
*/
- if (!REGION_NOTEMPTY(pGC->pScreen, pRgnObs))
+ if (!RegionNotEmpty(pRgnObs))
{
- REGION_DESTROY(pGC->pScreen, pRgnExp);
- REGION_DESTROY(pGC->pScreen, pRgnObs);
+ RegionDestroy(pRgnExp);
+ RegionDestroy(pRgnObs);
return (FALSE);
}
- numRectsExp = REGION_NUM_RECTS(pRgnExp);
- pBoxExp = REGION_RECTS(pRgnExp);
- pBoxObs = REGION_RECTS(pRgnObs);
- numRectsObs = REGION_NUM_RECTS(pRgnObs);
+ numRectsExp = RegionNumRects(pRgnExp);
+ pBoxExp = RegionRects(pRgnExp);
+ pBoxObs = RegionRects(pRgnObs);
+ numRectsObs = RegionNumRects(pRgnObs);
nrects = numRectsExp + numRectsObs;
boxes = (struct BoxDraw *)ALLOCATE_LOCAL(nrects * sizeof(struct BoxDraw));
@@ -1220,8 +1220,8 @@ miBSDoCopy(
{
if (sequence) DEALLOCATE_LOCAL(sequence);
if (boxes) DEALLOCATE_LOCAL(boxes);
- REGION_DESTROY(pGC->pScreen, pRgnExp);
- REGION_DESTROY(pGC->pScreen, pRgnObs);
+ RegionDestroy(pRgnExp);
+ RegionDestroy(pRgnObs);
return(TRUE);
}
@@ -1437,25 +1437,25 @@ miBSDoCopy(
* to return to dispatch which will send the appropriate expose
* events.
*/
- REGION_UNION(pGC->pScreen, pRgnExp, pRgnExp, pRgnObs);
+ RegionUnion(pRgnExp, pRgnExp, pRgnObs);
box.x1 = srcx;
box.x2 = srcx + w;
box.y1 = srcy;
box.y2 = srcy + h;
- if (RECT_IN_REGION(pGC->pScreen, pRgnExp, &box) == rgnIN)
+ if (RegionContainsRect(pRgnExp, &box) == rgnIN)
{
- REGION_EMPTY(pGC->pScreen, pRgnExp);
+ RegionEmpty(pRgnExp);
}
else
{
- REGION_INVERSE( pGC->pScreen, pRgnExp, pRgnExp, &box);
- REGION_TRANSLATE( pGC->pScreen, pRgnExp,
+ RegionInverse(pRgnExp, pRgnExp, &box);
+ RegionTranslate(pRgnExp,
dx + pWin->drawable.x,
dy + pWin->drawable.y);
- REGION_INTERSECT( pGC->pScreen, pRgnObs, pRgnExp, &pWin->clipList);
+ RegionIntersect(pRgnObs, pRgnExp, &pWin->clipList);
(*pWin->drawable.pScreen->PaintWindowBackground) (pWin,
pRgnObs, PW_BACKGROUND);
- REGION_TRANSLATE( pGC->pScreen, pRgnExp,
+ RegionTranslate(pRgnExp,
-pWin->drawable.x,
-pWin->drawable.y);
miBSClearBackingRegion (pWin, pRgnExp);
@@ -1463,8 +1463,8 @@ miBSDoCopy(
if (graphicsExposures)
*ppRgn = pRgnExp;
else
- REGION_DESTROY(pGC->pScreen, pRgnExp);
- REGION_DESTROY(pGC->pScreen, pRgnObs);
+ RegionDestroy(pRgnExp);
+ RegionDestroy(pRgnObs);
return (TRUE);
}
@@ -1524,7 +1524,7 @@ miBSCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty)
* the backing store. An unnecessary optimisation,
* but a useful one when GetSpans is slow.
*/
- pExtents = REGION_EXTENTS(pDst->pScreen,
+ pExtents = RegionExtents(
(RegionPtr)pBackingGC->clientClip);
bsrcx = srcx;
bsrcy = srcy;
@@ -1573,8 +1573,8 @@ miBSCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty)
if (winExposed)
{
if (pixExposed){
- REGION_UNION(pDst->pScreen, winExposed, winExposed, pixExposed);
- REGION_DESTROY(pDst->pScreen, pixExposed);
+ RegionUnion(winExposed, winExposed, pixExposed);
+ RegionDestroy(pixExposed);
}
} else
winExposed = pixExposed;
@@ -1633,7 +1633,7 @@ miBSCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane)
* the backing store. An unnecessary optimisation,
* but a useful one when GetSpans is slow.
*/
- pExtents = REGION_EXTENTS(pDst->pScreen,
+ pExtents = RegionExtents(
(RegionPtr)pBackingGC->clientClip);
bsrcx = srcx;
bsrcy = srcy;
@@ -1687,8 +1687,8 @@ miBSCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane)
{
if (pixExposed)
{
- REGION_UNION(pDst->pScreen, winExposed, winExposed, pixExposed);
- REGION_DESTROY(pDst->pScreen, pixExposed);
+ RegionUnion(winExposed, winExposed, pixExposed);
+ RegionDestroy(pixExposed);
}
} else
winExposed = pixExposed;
@@ -2312,12 +2312,12 @@ miBSClearBackingStore(pWin, x, y, w, h, generateExposures)
box.y1 = y;
box.x2 = x + w;
box.y2 = y + h;
- pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
+ pRgn = RegionCreate(&box, 1);
if (!pRgn)
return NullRegion;
- REGION_INTERSECT( pScreen, pRgn, pRgn, &pBackingStore->SavedRegion);
+ RegionIntersect(pRgn, pRgn, &pBackingStore->SavedRegion);
- if (REGION_NOTEMPTY( pScreen, pRgn))
+ if (RegionNotEmpty(pRgn))
{
/*
* if clearing entire window, simply make new virtual
@@ -2393,12 +2393,12 @@ miBSClearBackingStore(pWin, x, y, w, h, generateExposures)
* Figure out the array of rectangles to fill and fill them with
* PolyFillRect in the proper mode, as set in the GC above.
*/
- numRects = REGION_NUM_RECTS(pRgn);
+ numRects = RegionNumRects(pRgn);
rects = (xRectangle *)ALLOCATE_LOCAL(numRects*sizeof(xRectangle));
if (rects)
{
- for (i = 0, pBox = REGION_RECTS(pRgn);
+ for (i = 0, pBox = RegionRects(pRgn);
i < numRects;
i++, pBox++)
{
@@ -2418,7 +2418,7 @@ miBSClearBackingStore(pWin, x, y, w, h, generateExposures)
if (!generateExposures)
{
- REGION_DESTROY(pScreen, pRgn);
+ RegionDestroy(pRgn);
pRgn = NULL;
}
else
@@ -2427,13 +2427,13 @@ miBSClearBackingStore(pWin, x, y, w, h, generateExposures)
* result must be screen relative, but is currently
* drawable relative.
*/
- REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x,
+ RegionTranslate(pRgn, pWin->drawable.x,
pWin->drawable.y);
}
}
else
{
- REGION_DESTROY( pScreen, pRgn);
+ RegionDestroy(pRgn);
pRgn = NULL;
}
return pRgn;
@@ -2447,8 +2447,8 @@ miBSClearBackingRegion (pWin, pRgn)
BoxPtr pBox;
int i;
- i = REGION_NUM_RECTS(pRgn);
- pBox = REGION_RECTS(pRgn);
+ i = RegionNumRects(pRgn);
+ pBox = RegionRects(pRgn);
while (i--)
{
(void) miBSClearBackingStore(pWin, pBox->x1, pBox->y1,
@@ -2485,7 +2485,7 @@ miBSFillVirtualBits (pDrawable, pGC, pRgn, x, y, state, pixunion, planeMask)
if (state == None)
return;
- numRects = REGION_NUM_RECTS(pRgn);
+ numRects = RegionNumRects(pRgn);
pRect = (xRectangle *)ALLOCATE_LOCAL(numRects * sizeof(xRectangle));
if (!pRect)
return;
@@ -2545,7 +2545,7 @@ miBSFillVirtualBits (pDrawable, pGC, pRgn, x, y, state, pixunion, planeMask)
if (pDrawable->serialNumber != pGC->serialNumber)
ValidateGC (pDrawable, pGC);
- pBox = REGION_RECTS(pRgn);
+ pBox = RegionRects(pRgn);
for (i = numRects; --i >= 0; pBox++, pRect++)
{
pRect->x = pBox->x1 + x;
@@ -2588,7 +2588,7 @@ miBSAllocate(pWin)
pBackingStore->pBackingPixmap = NullPixmap;
pBackingStore->x = 0;
pBackingStore->y = 0;
- REGION_NULL( pScreen, &pBackingStore->SavedRegion);
+ RegionNull(&pBackingStore->SavedRegion);
pBackingStore->viewable = (char)pWin->viewable;
pBackingStore->status = StatusNoPixmap;
pBackingStore->backgroundState = None;
@@ -2617,16 +2617,16 @@ miBSAllocate(pWin)
box.y1 = pWin->drawable.y;
box.y2 = pWin->drawable.y + (int) pWin->drawable.height;
- REGION_INVERSE( pScreen, pSavedRegion, &pWin->clipList, &box);
- REGION_TRANSLATE( pScreen, pSavedRegion,
+ RegionInverse(pSavedRegion, &pWin->clipList, &box);
+ RegionTranslate(pSavedRegion,
-pWin->drawable.x,
-pWin->drawable.y);
#ifdef SHAPE
if (wBoundingShape (pWin))
- REGION_INTERSECT(pScreen, pSavedRegion, pSavedRegion,
+ RegionIntersect(pSavedRegion, pSavedRegion,
wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT(pScreen, pSavedRegion, pSavedRegion,
+ RegionIntersect(pSavedRegion, pSavedRegion,
wClipShape (pWin));
#endif
/* if window is already on-screen, assume it has been drawn to */
@@ -2649,7 +2649,7 @@ miBSAllocate(pWin)
*/
if (pBackingStore->status != StatusNoPixmap)
{
- REGION_EMPTY( pScreen, &pBackingStore->SavedRegion);
+ RegionEmpty(&pBackingStore->SavedRegion);
miDestroyBSPixmap (pWin);
}
}
@@ -2683,7 +2683,7 @@ miBSFree(pWin)
{
miDestroyBSPixmap (pWin);
- REGION_UNINIT( pScreen, &pBackingStore->SavedRegion);
+ RegionUninit(&pBackingStore->SavedRegion);
xfree(pBackingStore);
pWin->backStorage = NULL;
@@ -2726,7 +2726,7 @@ miResizeBackingStore(
if (!pBackingPixmap)
return;
pScreen = pWin->drawable.pScreen;
- extents = REGION_EXTENTS(pScreen, &pBackingStore->SavedRegion);
+ extents = RegionExtents(&pBackingStore->SavedRegion);
pNewPixmap = pBackingPixmap;
nw = extents->x2 - extents->x1;
@@ -2838,7 +2838,7 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
pBackingStore->viewable = (char)pWin->viewable;
if (pWin->backingStore != Always)
{
- REGION_EMPTY( pScreen, &pBackingStore->SavedRegion);
+ RegionEmpty(&pBackingStore->SavedRegion);
miDestroyBSPixmap (pWin);
return;
}
@@ -2851,14 +2851,14 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
(pBackingStore->backgroundState == None))
return;
- if (REGION_NOTEMPTY(pScreen, pObscured))
+ if (RegionNotEmpty(pObscured))
{
BoxRec oldExtents;
x = pWin->drawable.x;
y = pWin->drawable.y;
- REGION_TRANSLATE(pScreen, pObscured, -x, -y);
- oldExtents = *REGION_EXTENTS(pScreen, &pBackingStore->SavedRegion);
- REGION_UNION( pScreen, &pBackingStore->SavedRegion,
+ RegionTranslate(pObscured, -x, -y);
+ oldExtents = *RegionExtents(&pBackingStore->SavedRegion);
+ RegionUnion(&pBackingStore->SavedRegion,
&pBackingStore->SavedRegion,
pObscured);
/*
@@ -2875,7 +2875,7 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
if (pBackingStore->pBackingPixmap) {
if (pBackingStore->x | pBackingStore->y)
{
- REGION_TRANSLATE( pScreen, pObscured,
+ RegionTranslate(pObscured,
-pBackingStore->x,
-pBackingStore->y);
x += pBackingStore->x;
@@ -2886,13 +2886,13 @@ miBSSaveDoomedAreas(pWin, pObscured, dx, dy)
x - dx, y - dy, pWin);
}
}
- REGION_TRANSLATE(pScreen, pObscured, x, y);
+ RegionTranslate(pObscured, x, y);
}
else
{
- if (REGION_BROKEN (pScreen, pObscured))
+ if (RegionBroken(pObscured))
{
- REGION_EMPTY( pScreen, &pBackingStore->SavedRegion);
+ RegionEmpty(&pBackingStore->SavedRegion);
miDestroyBSPixmap (pWin);
return;
}
@@ -2943,11 +2943,11 @@ miBSRestoreAreas(pWin, prgnExposed)
if (pBackingStore->status == StatusContents)
{
- REGION_TRANSLATE(pScreen, prgnSaved, pWin->drawable.x,
+ RegionTranslate(prgnSaved, pWin->drawable.x,
pWin->drawable.y);
- prgnRestored = REGION_CREATE( pScreen, (BoxPtr)NULL, 1);
- REGION_INTERSECT( pScreen, prgnRestored, prgnExposed, prgnSaved);
+ prgnRestored = RegionCreate((BoxPtr)NULL, 1);
+ RegionIntersect(prgnRestored, prgnExposed, prgnSaved);
/*
* Since prgnExposed is no longer obscured, we no longer
@@ -2956,10 +2956,10 @@ miBSRestoreAreas(pWin, prgnExposed)
* from the area to be exposed.
*/
- if (REGION_NOTEMPTY( pScreen, prgnRestored))
+ if (RegionNotEmpty(prgnRestored))
{
- REGION_SUBTRACT( pScreen, prgnSaved, prgnSaved, prgnExposed);
- REGION_SUBTRACT( pScreen, prgnExposed, prgnExposed, prgnRestored);
+ RegionSubtract(prgnSaved, prgnSaved, prgnExposed);
+ RegionSubtract(prgnExposed, prgnExposed, prgnRestored);
/*
* Do the actual restoration
@@ -2975,9 +2975,9 @@ miBSRestoreAreas(pWin, prgnExposed)
* region to window relative
*/
- if (REGION_NOTEMPTY(pScreen, prgnSaved))
+ if (RegionNotEmpty(prgnSaved))
{
- REGION_TRANSLATE(pScreen, prgnSaved,
+ RegionTranslate(prgnSaved,
-pWin->drawable.x,
-pWin->drawable.y);
miResizeBackingStore(pWin, 0, 0, TRUE);
@@ -2986,33 +2986,33 @@ miBSRestoreAreas(pWin, prgnExposed)
miDestroyBSPixmap (pWin);
}
else
- REGION_TRANSLATE(pScreen, prgnSaved,
+ RegionTranslate(prgnSaved,
-pWin->drawable.x, -pWin->drawable.y);
- REGION_DESTROY( pScreen, prgnRestored);
+ RegionDestroy(prgnRestored);
}
else if ((pBackingStore->status == StatusVirtual) ||
(pBackingStore->status == StatusVDirty))
{
- REGION_TRANSLATE(pScreen, prgnSaved,
+ RegionTranslate(prgnSaved,
pWin->drawable.x, pWin->drawable.y);
- exposures = REGION_CREATE( pScreen, NullBox, 1);
+ exposures = RegionCreate(NullBox, 1);
if (SameBackground (pBackingStore->backgroundState,
pBackingStore->background,
pWin->backgroundState,
pWin->background))
{
- REGION_SUBTRACT( pScreen, exposures, prgnExposed, prgnSaved);
+ RegionSubtract(exposures, prgnExposed, prgnSaved);
}
else
{
miTileVirtualBS(pWin);
/* we need to expose all we have (virtually) retiled */
- REGION_UNION( pScreen, exposures, prgnExposed, prgnSaved);
+ RegionUnion(exposures, prgnExposed, prgnSaved);
}
- REGION_SUBTRACT( pScreen, prgnSaved, prgnSaved, prgnExposed);
- REGION_TRANSLATE(pScreen, prgnSaved,
+ RegionSubtract(prgnSaved, prgnSaved, prgnExposed);
+ RegionTranslate(prgnSaved,
-pWin->drawable.x, -pWin->drawable.y);
}
else if (pWin->viewable && !pBackingStore->viewable &&
@@ -3034,21 +3034,21 @@ miBSRestoreAreas(pWin, prgnExposed)
box.y1 = pWin->drawable.y;
box.y2 = box.y1 + (int) pWin->drawable.height;
- REGION_INVERSE( pScreen, prgnSaved, &pWin->clipList, &box);
- REGION_TRANSLATE( pScreen, prgnSaved,
+ RegionInverse(prgnSaved, &pWin->clipList, &box);
+ RegionTranslate(prgnSaved,
-pWin->drawable.x,
-pWin->drawable.y);
#ifdef SHAPE
if (wBoundingShape (pWin))
- REGION_INTERSECT(pScreen, prgnSaved, prgnSaved,
+ RegionIntersect(prgnSaved, prgnSaved,
wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT(pScreen, prgnSaved, prgnSaved,
+ RegionIntersect(prgnSaved, prgnSaved,
wClipShape (pWin));
#endif
miTileVirtualBS(pWin);
- exposures = REGION_CREATE( pScreen, &box, 1);
+ exposures = RegionCreate(&box, 1);
}
pBackingStore->viewable = (char)pWin->viewable;
return exposures;
@@ -3143,22 +3143,22 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
* Compute the new saved region
*/
- newSaved = REGION_CREATE( pScreen, NullBox, 1);
+ newSaved = RegionCreate(NullBox, 1);
extents.x1 = pWin->drawable.x;
extents.x2 = pWin->drawable.x + (int) pWin->drawable.width;
extents.y1 = pWin->drawable.y;
extents.y2 = pWin->drawable.y + (int) pWin->drawable.height;
- REGION_INVERSE( pScreen, newSaved, &pWin->clipList, &extents);
+ RegionInverse(newSaved, &pWin->clipList, &extents);
- REGION_TRANSLATE( pScreen, newSaved,
+ RegionTranslate(newSaved,
-pWin->drawable.x, -pWin->drawable.y);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
if (wBoundingShape (pWin))
- REGION_INTERSECT( pScreen, newSaved, newSaved,
+ RegionIntersect(newSaved, newSaved,
wBoundingShape (pWin));
if (wClipShape (pWin))
- REGION_INTERSECT( pScreen, newSaved, newSaved, wClipShape (pWin));
+ RegionIntersect(newSaved, newSaved, wClipShape (pWin));
}
#endif
@@ -3191,23 +3191,23 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
* bits on the screen which can be put into the
* new backing store
*/
- REGION_TRANSLATE( pScreen, oldClip, windx - oldx, windy - oldy);
- doomed = REGION_CREATE( pScreen, NullBox, 1);
- REGION_INTERSECT( pScreen, doomed, oldClip, newSaved);
- REGION_TRANSLATE( pScreen, oldClip, oldx - windx, oldy - windy);
+ RegionTranslate(oldClip, windx - oldx, windy - oldy);
+ doomed = RegionCreate(NullBox, 1);
+ RegionIntersect(doomed, oldClip, newSaved);
+ RegionTranslate(oldClip, oldx - windx, oldy - windy);
/*
* Translate the old saved region to the position in the
* window where it will appear to be
*/
- REGION_TRANSLATE( pScreen, pSavedRegion, windx, windy);
+ RegionTranslate(pSavedRegion, windx, windy);
/*
* Add the old saved region to the new saved region, so
* that calls to RestoreAreas will be able to fetch those
* bits back
*/
- REGION_UNION( pScreen, newSaved, newSaved, pSavedRegion);
+ RegionUnion(newSaved, newSaved, pSavedRegion);
/*
* Swap the new saved region into the window
@@ -3227,47 +3227,47 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
* set to background in the backing pixmap and
* sent as exposure events to the client.
*/
- REGION_SUBTRACT( pScreen, newSaved, pSavedRegion, newSaved);
+ RegionSubtract(newSaved, pSavedRegion, newSaved);
/*
* Fetch bits which will be obscured from
* the screen
*/
- if (REGION_NOTEMPTY( pScreen, doomed))
+ if (RegionNotEmpty(doomed))
{
/*
* Don't clear regions which have bits on the
* screen
*/
- REGION_SUBTRACT( pScreen, newSaved, newSaved, doomed);
+ RegionSubtract(newSaved, newSaved, doomed);
/*
* Make the region to SaveDoomedAreas absolute, instead
* of window relative.
*/
- REGION_TRANSLATE( pScreen, doomed,
+ RegionTranslate(doomed,
pWin->drawable.x, pWin->drawable.y);
(* pScreen->SaveDoomedAreas) (pWin, doomed, scrdx, scrdy);
}
- REGION_DESTROY(pScreen, doomed);
+ RegionDestroy(doomed);
/*
* and clear whatever there is that's new
*/
- if (REGION_NOTEMPTY( pScreen, newSaved))
+ if (RegionNotEmpty(newSaved))
{
miBSClearBackingRegion (pWin, newSaved);
/*
* Make the exposed region absolute
*/
- REGION_TRANSLATE(pScreen, newSaved,
+ RegionTranslate(newSaved,
pWin->drawable.x,
pWin->drawable.y);
}
else
{
- REGION_DESTROY(pScreen, newSaved);
+ RegionDestroy(newSaved);
newSaved = NullRegion;
}
}
@@ -3277,8 +3277,8 @@ miBSTranslateBackingStore(pWin, windx, windy, oldClip, oldx, oldy)
* ForgetGravity: just reset backing store and
* expose the whole mess
*/
- REGION_COPY( pScreen, pSavedRegion, newSaved);
- REGION_TRANSLATE( pScreen, newSaved,
+ RegionCopy(pSavedRegion, newSaved);
+ RegionTranslate(newSaved,
pWin->drawable.x, pWin->drawable.y);
miResizeBackingStore (pWin, 0, 0, FALSE);
@@ -3409,13 +3409,13 @@ miBSValidateGC (pGC, stateChanges, pDrawable)
((pDrawable->serialNumber != pPriv->serialNumber) ||
(stateChanges&(GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode))))
{
- if (REGION_NOTEMPTY(pGC->pScreen, &pWindowPriv->SavedRegion))
+ if (RegionNotEmpty(&pWindowPriv->SavedRegion))
{
- backingCompositeClip = REGION_CREATE(pGC->pScreen, NULL, 1);
+ backingCompositeClip = RegionCreate(NULL, 1);
if ((pGC->clientClipType == CT_NONE) ||
(pGC->clientClipType == CT_PIXMAP))
{
- REGION_COPY(pGC->pScreen, backingCompositeClip,
+ RegionCopy(backingCompositeClip,
&pWindowPriv->SavedRegion);
}
else
@@ -3425,12 +3425,12 @@ miBSValidateGC (pGC, stateChanges, pDrawable)
* its proper origin.
*/
- REGION_COPY(pGC->pScreen, backingCompositeClip,
+ RegionCopy(backingCompositeClip,
pGC->clientClip);
- REGION_TRANSLATE(pGC->pScreen, backingCompositeClip,
+ RegionTranslate(backingCompositeClip,
pGC->clipOrg.x,
pGC->clipOrg.y);
- REGION_INTERSECT(pGC->pScreen, backingCompositeClip,
+ RegionIntersect(backingCompositeClip,
backingCompositeClip,
&pWindowPriv->SavedRegion);
}
@@ -3444,14 +3444,14 @@ miBSValidateGC (pGC, stateChanges, pDrawable)
* can be fixed only at great cost to the shadow routines.
*/
translatedClip = NotClippedByChildren (pWin);
- REGION_TRANSLATE(pGC->pScreen, translatedClip,
+ RegionTranslate(translatedClip,
-pDrawable->x,
-pDrawable->y);
- REGION_SUBTRACT(pGC->pScreen, backingCompositeClip,
+ RegionSubtract(backingCompositeClip,
backingCompositeClip, translatedClip);
- REGION_DESTROY(pGC->pScreen, translatedClip);
+ RegionDestroy(translatedClip);
}
- if (!REGION_NOTEMPTY(pGC->pScreen, backingCompositeClip))
+ if (!RegionNotEmpty(backingCompositeClip))
lift_functions = TRUE;
}
else
@@ -3508,7 +3508,7 @@ miBSValidateGC (pGC, stateChanges, pDrawable)
if (lift_functions)
{
if (backingCompositeClip)
- REGION_DESTROY( pGC->pScreen, backingCompositeClip);
+ RegionDestroy(backingCompositeClip);
/* unwrap the GC again */
miBSDestroyGCPrivate (pGC);
@@ -3541,14 +3541,14 @@ miBSValidateGC (pGC, stateChanges, pDrawable)
if (pGC->clientClipType == CT_PIXMAP)
{
(*pBackingGC->funcs->CopyClip)(pBackingGC, pGC);
- REGION_TRANSLATE(pGC->pScreen, backingCompositeClip,
+ RegionTranslate(backingCompositeClip,
-pGC->clipOrg.x, -pGC->clipOrg.y);
vals[0] = pGC->clipOrg.x - pWindowPriv->x;
vals[1] = pGC->clipOrg.y - pWindowPriv->y;
DoChangeGC(pBackingGC, GCClipXOrigin|GCClipYOrigin, vals, 0);
(* pGC->pScreen->BackingStoreFuncs.SetClipmaskRgn)
(pBackingGC, backingCompositeClip);
- REGION_DESTROY( pGC->pScreen, backingCompositeClip);
+ RegionDestroy(backingCompositeClip);
}
else
{
@@ -3732,7 +3732,7 @@ miCreateBSPixmap (pWin, pExtents)
backSet = ((pBackingStore->status == StatusVirtual) ||
(pBackingStore->status == StatusVDirty));
- extents = REGION_EXTENTS( pScreen, &pBackingStore->SavedRegion);
+ extents = RegionExtents(&pBackingStore->SavedRegion);
if (!pBackingStore->pBackingPixmap &&
extents->x2 != extents->x1 &&
@@ -3797,7 +3797,7 @@ miCreateBSPixmap (pWin, pExtents)
if (exposed)
{
miSendExposures(pWin, exposed, pWin->drawable.x, pWin->drawable.y);
- REGION_DESTROY( pScreen, exposed);
+ RegionDestroy(exposed);
}
}
@@ -3846,7 +3846,7 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
register int dx, dy;
BITS32 gcMask;
- if (!REGION_NOTEMPTY(pGC->pScreen, prgnExposed))
+ if (!RegionNotEmpty(prgnExposed))
return;
pBackingStore = (miBSWindowPtr)pSrc->backStorage;
@@ -3854,10 +3854,10 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
(pBackingStore->status == StatusBadAlloc))
return;
- REGION_NULL( pGC->pScreen, &tempRgn);
- REGION_INTERSECT( pGC->pScreen, &tempRgn, prgnExposed,
+ RegionNull(&tempRgn);
+ RegionIntersect(&tempRgn, prgnExposed,
&pBackingStore->SavedRegion);
- REGION_SUBTRACT( pGC->pScreen, prgnExposed, prgnExposed, &tempRgn);
+ RegionSubtract(prgnExposed, prgnExposed, &tempRgn);
if (plane != 0) {
copyProc = pGC->ops->CopyPlane;
@@ -3889,7 +3889,7 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
}
break;
case StatusContents:
- for (i = REGION_NUM_RECTS(&tempRgn), pBox = REGION_RECTS(&tempRgn);
+ for (i = RegionNumRects(&tempRgn), pBox = RegionRects(&tempRgn);
--i >= 0;
pBox++)
{
@@ -3901,5 +3901,5 @@ miBSExposeCopy (pSrc, pDst, pGC, prgnExposed, srcx, srcy, dstx, dsty, plane)
}
break;
}
- REGION_UNINIT( pGC->pScreen, &tempRgn);
+ RegionUninit(&tempRgn);
}
diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c
index 782ddad49..379dd380f 100644
--- a/nx-X11/programs/Xserver/mi/miexpose.c
+++ b/nx-X11/programs/Xserver/mi/miexpose.c
@@ -185,21 +185,21 @@ miHandleExposures(pSrcDrawable, 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
@@ -216,7 +216,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
box.x2 = pSrcDrawable->width;
box.y2 = pSrcDrawable->height;
prgnSrcClip = &rgnSrcRec;
- REGION_INIT(pscr, prgnSrcClip, &box, 1);
+ RegionInit(prgnSrcClip, &box, 1);
pSrcWin = (WindowPtr)NULL;
}
@@ -233,11 +233,11 @@ miHandleExposures(pSrcDrawable, 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
@@ -249,14 +249,14 @@ miHandleExposures(pSrcDrawable, 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);
if (pSrcWin && pSrcWin->backStorage)
{
@@ -274,10 +274,10 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
}
/* 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);
/*
* If we have LOTS of rectangles, we decide to take the extents
@@ -287,7 +287,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
* for windows.
*/
extents = pGC->graphicsExposures &&
- (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) &&
+ (RegionNumRects(&rgnExposed) > RECTLIMIT) &&
(pDstDrawable->type != DRAWABLE_PIXMAP);
#ifdef SHAPE
if (pSrcWin)
@@ -300,7 +300,7 @@ miHandleExposures(pSrcDrawable, 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;
}
#endif
@@ -308,8 +308,8 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
{
WindowPtr pWin = (WindowPtr)pDstDrawable;
- expBox = *REGION_EXTENTS(pscr, &rgnExposed);
- REGION_RESET(pscr, &rgnExposed, &expBox);
+ expBox = *RegionExtents(&rgnExposed);
+ RegionReset(&rgnExposed, &expBox);
/* need to clear out new areas of backing store */
if (pWin->backStorage)
(void) (* pWin->drawable.pScreen->ClearBackingStore)(
@@ -326,53 +326,53 @@ miHandleExposures(pSrcDrawable, pDstDrawable,
WindowPtr pWin = (WindowPtr)pDstDrawable;
/* make the exposed area screen-relative */
- REGION_TRANSLATE(pscr, &rgnExposed,
+ RegionTranslate(&rgnExposed,
pDstDrawable->x, pDstDrawable->y);
if (extents)
{
/* PaintWindowBackground doesn't clip, so we have to */
- REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList);
+ RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList);
}
(*pWin->drawable.pScreen->PaintWindowBackground)(
(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;
}
}
@@ -387,7 +387,7 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
int major;
int minor;
{
- if (pRgn && !REGION_NIL(pRgn))
+ if (pRgn && !RegionNil(pRgn))
{
xEvent *pEvent;
register xEvent *pe;
@@ -395,8 +395,8 @@ miSendGraphicsExpose (client, pRgn, drawable, major, minor)
register int i;
int numRects;
- numRects = REGION_NUM_RECTS(pRgn);
- pBox = REGION_RECTS(pRgn);
+ numRects = RegionNumRects(pRgn);
+ pBox = RegionRects(pRgn);
if(!(pEvent = (xEvent *)ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
return;
pe = pEvent;
@@ -442,8 +442,8 @@ miSendExposures(pWin, pRgn, dx, dy)
register xEvent *pEvent, *pe;
register int i;
- pBox = REGION_RECTS(pRgn);
- numRects = REGION_NUM_RECTS(pRgn);
+ pBox = RegionRects(pRgn);
+ numRects = RegionNumRects(pRgn);
if(!(pEvent = (xEvent *) ALLOCATE_LOCAL(numRects * sizeof(xEvent))))
return;
memset(pEvent, 0, numRects * sizeof(xEvent));
@@ -513,8 +513,8 @@ miWindowExposures(pWin, prgn, other_exposed)
* no areas will be repainted.
*/
exposures = (*pWin->drawable.pScreen->RestoreAreas)(pWin, 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;
@@ -527,15 +527,15 @@ miWindowExposures(pWin, prgn, 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
@@ -545,17 +545,17 @@ miWindowExposures(pWin, prgn, 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);
}
/* PaintWindowBackground doesn't clip, so we have to */
- REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList);
+ RegionIntersect(prgn, prgn, &pWin->clipList);
/* need to clear out new areas of backing store, too */
if (pWin->backStorage)
(void) (* pWin->drawable.pScreen->ClearBackingStore)(
@@ -566,22 +566,22 @@ miWindowExposures(pWin, prgn, other_exposed)
box.y2 - box.y1,
FALSE);
}
- if (prgn && !REGION_NIL(prgn))
+ if (prgn && !RegionNil(prgn))
(*pWin->drawable.pScreen->PaintWindowBackground)(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);
}
@@ -706,7 +706,7 @@ int what;
}
}
- prect = (xRectangle *)ALLOCATE_LOCAL(REGION_NUM_RECTS(prgn) *
+ prect = (xRectangle *)ALLOCATE_LOCAL(RegionNumRects(prgn) *
sizeof(xRectangle));
if (!prect)
return;
@@ -749,7 +749,7 @@ int what;
box.y1 = 0;
box.x2 = pScreen->width;
box.y2 = pScreen->height;
- REGION_INIT(pScreen, &pWin->clipList, &box, 1);
+ RegionInit(&pWin->clipList, &box, 1);
pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER;
newValues[ABSX].val = pBgWin->drawable.x;
newValues[ABSY].val = pBgWin->drawable.y;
@@ -852,8 +852,8 @@ int what;
if (pWin->drawable.serialNumber != pGC->serialNumber)
ValidateGC((DrawablePtr)pWin, 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 - pWin->drawable.x;
@@ -872,7 +872,7 @@ int what;
{
if (what == PW_BORDER)
{
- REGION_UNINIT(pScreen, &pWin->clipList);
+ RegionUninit(&pWin->clipList);
pWin->clipList = prgnWin;
pWin->drawable.x = oldCorner.x;
pWin->drawable.y = oldCorner.y;
diff --git a/nx-X11/programs/Xserver/mi/migc.c b/nx-X11/programs/Xserver/mi/migc.c
index 2b38b257d..167e63d0a 100644
--- a/nx-X11/programs/Xserver/mi/migc.c
+++ b/nx-X11/programs/Xserver/mi/migc.c
@@ -55,7 +55,7 @@ miDestroyGC(pGC)
if (pGC->pRotatedPixmap)
(*pGC->pScreen->DestroyPixmap) (pGC->pRotatedPixmap);
if (pGC->freeCompClip)
- REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip);
+ RegionDestroy(pGC->pCompositeClip);
miDestroyGCOps(pGC->ops);
}
@@ -104,7 +104,7 @@ miDestroyClip(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;
@@ -121,7 +121,7 @@ miChangeClip(pGC, type, pvalue, nrects)
if (type == CT_PIXMAP)
{
/* convert the pixmap to a region */
- pGC->clientClip = (void *) BITMAP_TO_REGION(pGC->pScreen,
+ pGC->clientClip = (void *) BitmapToRegion(pGC->pScreen,
(PixmapPtr) pvalue);
(*pGC->pScreen->DestroyPixmap) (pvalue);
}
@@ -132,7 +132,7 @@ miChangeClip(pGC, type, pvalue, nrects)
}
else if (type != CT_NONE)
{
- pGC->clientClip = (void *) RECTS_TO_REGION(pGC->pScreen, nrects,
+ pGC->clientClip = (void *) RegionFromRects(nrects,
(xRectangle *) pvalue,
type);
xfree(pvalue);
@@ -157,8 +157,8 @@ miCopyClip(pgcDst, 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, (void *) prgnNew, 0);
break;
@@ -213,7 +213,7 @@ miComputeCompositeClip(pGC, pDrawable)
if (pGC->clientClipType == CT_NONE)
{
if (freeCompClip)
- REGION_DESTROY(pScreen, pGC->pCompositeClip);
+ RegionDestroy(pGC->pCompositeClip);
pGC->pCompositeClip = pregWin;
pGC->freeCompClip = freeTmpClip;
}
@@ -228,30 +228,30 @@ miComputeCompositeClip(pGC, 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));
}
@@ -269,31 +269,31 @@ miComputeCompositeClip(pGC, 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/nx-X11/programs/Xserver/mi/mioverlay.c b/nx-X11/programs/Xserver/mi/mioverlay.c
index f67704e11..96d5cc4f0 100644
--- a/nx-X11/programs/Xserver/mi/mioverlay.c
+++ b/nx-X11/programs/Xserver/mi/mioverlay.c
@@ -212,8 +212,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;
@@ -221,8 +221,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 xfree(pTree);
}
@@ -250,8 +250,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));
xfree(pTree);
}
@@ -349,7 +349,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;
@@ -360,13 +360,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;
@@ -421,12 +421,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;
@@ -484,7 +484,7 @@ miOverlayComputeClips(
borderSize.y2 = dy;
oldVis = tParent->visibility;
- switch (RECT_IN_REGION( pScreen, universe, &borderSize)) {
+ switch (RegionContainsRect(universe, &borderSize)) {
case rgnIN:
newVis = VisibilityUnobscured;
break;
@@ -534,8 +534,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;
@@ -543,14 +543,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;
@@ -568,50 +568,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;
@@ -619,31 +619,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);
}
@@ -721,14 +721,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);
}
}
}
@@ -753,9 +753,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;
@@ -769,52 +769,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) {
@@ -822,18 +822,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:
@@ -866,13 +866,13 @@ miOverlayHandleExposures(WindowPtr pWin)
while (1) {
if((mival = pTree->valdata)) {
if(!((*pPriv->InOverlay)(pTree->pWin))) {
- if (REGION_NOTEMPTY(pScreen, &mival->borderExposed))
+ if (RegionNotEmpty(&mival->borderExposed))
(*pWin->drawable.pScreen->PaintWindowBorder)(
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);
}
xfree(mival);
pTree->valdata = NULL;
@@ -894,24 +894,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))
(*pChild->drawable.pScreen->PaintWindowBorder)(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);
xfree(val);
pChild->valdata = (ValidatePtr)NULL;
if (pChild->firstChild)
@@ -955,13 +955,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);
@@ -990,16 +990,16 @@ miOverlayMoveWindow(
#endif /* DO_SAVE_UNDERS */
(*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);
#ifdef DO_SAVE_UNDERS
@@ -1028,8 +1028,8 @@ miOverlayWindowExposures(
if (pWin->backStorage && prgn)
exposures = (*pScreen->RestoreAreas)(pWin, 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;
@@ -1038,35 +1038,35 @@ 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);
/* need to clear out new areas of backing store, too */
if (pWin->backStorage)
@@ -1078,22 +1078,22 @@ miOverlayWindowExposures(
box.y2 - box.y1,
FALSE);
}
- if (prgn && !REGION_NIL(prgn))
+ if (prgn && !RegionNil(prgn))
(*pScreen->PaintWindowBackground)(
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);
}
@@ -1118,23 +1118,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;
@@ -1194,11 +1194,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);
}
/*
@@ -1210,16 +1210,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]);
@@ -1233,11 +1233,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);
}
}
/*
@@ -1253,26 +1253,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);
}
}
@@ -1299,9 +1299,9 @@ miOverlayResizeWindow(
pFirstChange = MoveWindowInStack(pWin, pSib);
if (WasViewable) {
- pRegion = REGION_CREATE(pScreen, NullBox, 1);
+ pRegion = RegionCreate(NullBox, 1);
if (pWin->backStorage)
- REGION_COPY(pScreen, pRegion, &pWin->clipList);
+ RegionCopy(pRegion, &pWin->clipList);
(*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, NULL);
@@ -1320,9 +1320,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);
@@ -1361,20 +1361,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
@@ -1382,22 +1382,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);
}
}
@@ -1406,9 +1406,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
@@ -1416,16 +1416,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);
}
}
@@ -1449,23 +1449,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 */
@@ -1486,9 +1486,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
@@ -1513,38 +1513,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);
if (bsExposed) {
RegionPtr valExposed = NullRegion;
@@ -1552,8 +1552,8 @@ miOverlayResizeWindow(
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
(*pScreen->HandleExposures)(pWin->parent);
#ifdef DO_SAVE_UNDERS
@@ -1565,7 +1565,7 @@ miOverlayResizeWindow(
}
else if (bsExposed) {
(*pScreen->WindowExposures) (pWin, NullRegion, bsExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionDestroy(bsExposed);
}
if (pWin->realized)
WindowsRestructured ();
@@ -1589,8 +1589,8 @@ miOverlaySetShape(WindowPtr pWin)
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;
@@ -1598,8 +1598,8 @@ miOverlaySetShape(WindowPtr 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;
}
@@ -1613,8 +1613,8 @@ miOverlaySetShape(WindowPtr pWin)
if (WasViewable) {
if (pWin->backStorage) {
- pOldClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ pOldClip = RegionCreate(NullBox, 1);
+ RegionCopy(pOldClip, &pWin->clipList);
}
(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
@@ -1634,7 +1634,7 @@ miOverlaySetShape(WindowPtr pWin)
(pWin, 0, 0, pOldClip,
pWin->drawable.x, pWin->drawable.y);
if (WasViewable)
- REGION_DESTROY(pScreen, pOldClip);
+ RegionDestroy(pOldClip);
if (bsExposed)
{
RegionPtr valExposed = NullRegion;
@@ -1643,8 +1643,8 @@ miOverlaySetShape(WindowPtr pWin)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
}
if (WasViewable) {
@@ -1694,16 +1694,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;
}
@@ -1746,11 +1746,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
@@ -1785,7 +1785,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;
@@ -1798,20 +1798,20 @@ miOverlayClearToBackground(
box.x1 = x1; box.x2 = x2;
box.y1 = y1; box.y2 = y2;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
if (pWin->backStorage) {
pBSReg = (* pScreen->ClearBackingStore)(pWin, x, y, w, h,
generateExposures);
}
- REGION_INTERSECT(pScreen, &reg, &reg, clipList);
+ RegionIntersect(&reg, &reg, clipList);
if (generateExposures)
(*pScreen->WindowExposures)(pWin, &reg, pBSReg);
else if (pWin->backgroundState != None)
(*pScreen->PaintWindowBackground)(pWin, &reg, PW_BACKGROUND);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
if (pBSReg)
- REGION_DESTROY(pScreen, pBSReg);
+ RegionDestroy(pBSReg);
}
@@ -1865,12 +1865,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->myNum))
{
- REGION_INTERSECT(pScreen,pregWin,&pTree->borderClip,&pWin->winSize);
+ RegionIntersect(pregWin,&pTree->borderClip,&pWin->winSize);
}
} else {
pregWin = &pTree->clipList;
@@ -1879,29 +1879,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));
}
@@ -1919,7 +1919,7 @@ miOverlayCollectUnderlayRegions(
return FALSE;
}
- *region = REGION_CREATE(pWin->drawable.pScreen, NullBox, 0);
+ *region = RegionCreate(NullBox, 0);
CollectUnderlayChildrenRegions(pWin, *region);
@@ -2041,7 +2041,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) {
@@ -2059,7 +2059,7 @@ CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg)
if(hasUnderlay) {
Bool overlap;
- REGION_VALIDATE(pScreen, pReg, &overlap);
+ RegionValidate(pReg, &overlap);
}
return hasUnderlay;
diff --git a/nx-X11/programs/Xserver/mi/miregion.c b/nx-X11/programs/Xserver/mi/miregion.c
index 1df0dcc46..b8216e1bb 100644
--- a/nx-X11/programs/Xserver/mi/miregion.c
+++ b/nx-X11/programs/Xserver/mi/miregion.c
@@ -197,7 +197,7 @@ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
{ \
if (!miRectAlloc(pReg, 1)) \
return FALSE; \
- pNextRect = REGION_TOP(pReg); \
+ pNextRect = RegionTop(pReg); \
} \
ADDRECT(pNextRect,nx1,ny1,nx2,ny2); \
pReg->data->numRects++; \
@@ -208,7 +208,7 @@ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \
#define DOWNSIZE(reg,numRects) \
if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
{ \
- size_t NewSize = REGION_SZOF(numRects); \
+ size_t NewSize = RegionSizeof(numRects); \
RegDataPtr NewData = \
(NewSize > 0) ? (RegDataPtr)xrealloc((reg)->data, NewSize) : NULL; \
if (NewData) \
@@ -234,9 +234,9 @@ miPrintRegion(rgn)
register int i;
BoxPtr rects;
- num = REGION_NUM_RECTS(rgn);
- size = REGION_SIZE(rgn);
- rects = REGION_RECTS(rgn);
+ num = RegionNumRects(rgn);
+ size = RegionSize(rgn);
+ rects = RegionRects(rgn);
ErrorF("num: %d size: %d\n", num, size);
ErrorF("extents: %d %d %d %d\n",
rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2);
@@ -261,11 +261,11 @@ miRegionEqual(reg1, reg2)
if (reg1->extents.y1 != reg2->extents.y1) return FALSE;
if (reg1->extents.y2 != reg2->extents.y2) return FALSE;
- num = REGION_NUM_RECTS(reg1);
- if (num != REGION_NUM_RECTS(reg2)) return FALSE;
+ num = RegionNumRects(reg1);
+ if (num != RegionNumRects(reg2)) return FALSE;
- rects1 = REGION_RECTS(reg1);
- rects2 = REGION_RECTS(reg2);
+ rects1 = RegionRects(reg1);
+ rects2 = RegionRects(reg2);
for (i = 0; i != num; i++) {
if (rects1[i].x1 != rects2[i].x1) return FALSE;
if (rects1[i].x2 != rects2[i].x2) return FALSE;
@@ -285,7 +285,7 @@ miValidRegion(reg)
if ((reg->extents.x1 > reg->extents.x2) ||
(reg->extents.y1 > reg->extents.y2))
return FALSE;
- numRects = REGION_NUM_RECTS(reg);
+ numRects = RegionNumRects(reg);
if (!numRects)
return ((reg->extents.x1 == reg->extents.x2) &&
(reg->extents.y1 == reg->extents.y2) &&
@@ -297,7 +297,7 @@ miValidRegion(reg)
register BoxPtr pboxP, pboxN;
BoxRec box;
- pboxP = REGION_RECTS(reg);
+ pboxP = RegionRects(reg);
box = *pboxP;
box.y2 = pboxP[numRects-1].y2;
pboxN = pboxP + 1;
@@ -349,7 +349,7 @@ miRegionCreate(rect, size)
else
{
pReg->extents = miEmptyBox;
- newSize = REGION_SZOF(size);
+ newSize = RegionSizeof(size);
if ((size > 1) && (newSize > 0) &&
(pReg->data = xalloc(newSize)))
{
@@ -383,7 +383,7 @@ miRegionInit(pReg, rect, size)
else
{
pReg->extents = miEmptyBox;
- newSize = REGION_SZOF(size);
+ newSize = RegionSizeof(size);
if ((size > 1) && (newSize > 0) &&
(pReg->data = xalloc(newSize)))
{
@@ -434,16 +434,16 @@ miRectAlloc(
if (!pRgn->data)
{
n++;
- rgnSize = REGION_SZOF(n);
+ rgnSize = RegionSizeof(n);
pRgn->data = (rgnSize > 0) ? xalloc(rgnSize) : NULL;
if (!pRgn->data)
return miRegionBreak (pRgn);
pRgn->data->numRects = 1;
- *REGION_BOXPTR(pRgn) = pRgn->extents;
+ *RegionBoxptr(pRgn) = pRgn->extents;
}
else if (!pRgn->data->size)
{
- rgnSize = REGION_SZOF(n);
+ rgnSize = RegionSizeof(n);
pRgn->data = (rgnSize > 0) ? xalloc(rgnSize) : NULL;
if (!pRgn->data)
return miRegionBreak (pRgn);
@@ -458,7 +458,7 @@ miRectAlloc(
n = 250;
}
n += pRgn->data->numRects;
- rgnSize = REGION_SZOF(n);
+ rgnSize = RegionSizeof(n);
data = (rgnSize > 0) ? xrealloc(pRgn->data, rgnSize) : NULL;
if (!data)
return miRegionBreak (pRgn);
@@ -486,7 +486,7 @@ miRegionCopy(dst, src)
}
if (!dst->data || (dst->data->size < src->data->numRects))
{
- size_t newSize = REGION_SZOF(src->data->numRects);
+ size_t newSize = RegionSizeof(src->data->numRects);
xfreeData(dst);
dst->data = newSize > 0 ? xalloc(newSize) : NULL;
@@ -495,7 +495,7 @@ miRegionCopy(dst, src)
dst->data->size = src->data->numRects;
}
dst->data->numRects = src->data->numRects;
- memmove((char *)REGION_BOXPTR(dst),(char *)REGION_BOXPTR(src),
+ memmove((char *)RegionBoxptr(dst),(char *)RegionBoxptr(src),
dst->data->numRects * sizeof(BoxRec));
return TRUE;
}
@@ -545,8 +545,8 @@ miCoalesce (
* The bands may only be coalesced if the bottom of the previous
* matches the top scanline of the current.
*/
- pPrevBox = REGION_BOX(pReg, prevStart);
- pCurBox = REGION_BOX(pReg, curStart);
+ pPrevBox = RegionBox(pReg, prevStart);
+ pCurBox = RegionBox(pReg, curStart);
if (pPrevBox->y2 != pCurBox->y1) return curStart;
/*
@@ -625,7 +625,7 @@ miAppendNonO (
/* Make sure we have enough space for all rectangles to be added */
RECTALLOC(pReg, newRects);
- pNextRect = REGION_TOP(pReg);
+ pNextRect = RegionTop(pReg);
pReg->data->numRects += newRects;
do {
assert(r->x1 < r->x2);
@@ -650,7 +650,7 @@ miAppendNonO (
int newRects; \
if ((newRects = rEnd - r)) { \
RECTALLOC(newReg, newRects); \
- memmove((char *)REGION_TOP(newReg),(char *)r, \
+ memmove((char *)RegionTop(newReg),(char *)r, \
newRects * sizeof(BoxRec)); \
newReg->data->numRects += newRects; \
} \
@@ -731,7 +731,7 @@ miRegionOp(
/*
* Break any region computed from a broken region
*/
- if (REGION_NAR (reg1) || REGION_NAR(reg2))
+ if (RegionNar (reg1) || RegionNar(reg2))
return miRegionBreak (newReg);
/*
@@ -742,11 +742,11 @@ miRegionOp(
* another array of rectangles for it to use.
*/
- r1 = REGION_RECTS(reg1);
- newSize = REGION_NUM_RECTS(reg1);
+ r1 = RegionRects(reg1);
+ newSize = RegionNumRects(reg1);
r1End = r1 + newSize;
- numRects = REGION_NUM_RECTS(reg2);
- r2 = REGION_RECTS(reg2);
+ numRects = RegionNumRects(reg2);
+ r2 = RegionRects(reg2);
r2End = r2 + numRects;
assert(r1 != r1End);
assert(r2 != r2End);
@@ -903,7 +903,7 @@ miRegionOp(
}
else if (numRects == 1)
{
- newReg->extents = *REGION_BOXPTR(newReg);
+ newReg->extents = *RegionBoxptr(newReg);
xfreeData(newReg);
newReg->data = (RegDataPtr)NULL;
}
@@ -945,8 +945,8 @@ miSetExtents (pReg)
return;
}
- pBox = REGION_BOXPTR(pReg);
- pBoxEnd = REGION_END(pReg);
+ pBox = RegionBoxptr(pReg);
+ pBoxEnd = RegionEnd(pReg);
/*
* Since pBox is the first rectangle in the region, it must have the
@@ -1004,7 +1004,7 @@ miIntersectO (
register int x2;
register BoxPtr pNextRect;
- pNextRect = REGION_TOP(pReg);
+ pNextRect = RegionTop(pReg);
assert(y1 < y2);
assert(r1 != r1End && r2 != r2End);
@@ -1047,14 +1047,14 @@ miIntersect(newReg, reg1, reg2)
good(reg2);
good(newReg);
/* check for trivial reject */
- if (REGION_NIL(reg1) || REGION_NIL(reg2) ||
+ if (RegionNil(reg1) || RegionNil(reg2) ||
!EXTENTCHECK(&reg1->extents, &reg2->extents))
{
/* Covers about 20% of all cases */
xfreeData(newReg);
newReg->extents.x2 = newReg->extents.x1;
newReg->extents.y2 = newReg->extents.y1;
- if (REGION_NAR(reg1) || REGION_NAR(reg2))
+ if (RegionNar(reg1) || RegionNar(reg2))
{
newReg->data = &miBrokenData;
return FALSE;
@@ -1150,7 +1150,7 @@ miUnionO (
assert (y1 < y2);
assert(r1 != r1End && r2 != r2End);
- pNextRect = REGION_TOP(pReg);
+ pNextRect = RegionTop(pReg);
/* Start off current rectangle */
if (r1->x1 < r2->x1)
@@ -1217,9 +1217,9 @@ miUnion(newReg, reg1, reg2)
/*
* Region 1 is empty
*/
- if (REGION_NIL(reg1))
+ if (RegionNil(reg1))
{
- if (REGION_NAR(reg1))
+ if (RegionNar(reg1))
return miRegionBreak (newReg);
if (newReg != reg2)
return miRegionCopy(newReg, reg2);
@@ -1229,9 +1229,9 @@ miUnion(newReg, reg1, reg2)
/*
* Region 2 is empty
*/
- if (REGION_NIL(reg2))
+ if (RegionNil(reg2))
{
- if (REGION_NAR(reg2))
+ if (RegionNar(reg2))
return miRegionBreak (newReg);
if (newReg != reg1)
return miRegionCopy(newReg, reg1);
@@ -1300,7 +1300,7 @@ miRegionAppend(dstrgn, rgn)
BoxPtr new, old;
Bool prepend;
- if (REGION_NAR(rgn))
+ if (RegionNar(rgn))
return miRegionBreak (dstrgn);
if (!rgn->data && (dstrgn->data == &miEmptyData))
@@ -1310,16 +1310,16 @@ miRegionAppend(dstrgn, rgn)
return TRUE;
}
- numRects = REGION_NUM_RECTS(rgn);
+ numRects = RegionNumRects(rgn);
if (!numRects)
return TRUE;
prepend = FALSE;
size = numRects;
- dnumRects = REGION_NUM_RECTS(dstrgn);
+ dnumRects = RegionNumRects(dstrgn);
if (!dnumRects && (size < 200))
size = 200; /* XXX pick numbers out of a hat */
RECTALLOC(dstrgn, size);
- old = REGION_RECTS(rgn);
+ old = RegionRects(rgn);
if (!dnumRects)
dstrgn->extents = rgn->extents;
else if (dstrgn->extents.x2 > dstrgn->extents.x1)
@@ -1327,7 +1327,7 @@ miRegionAppend(dstrgn, rgn)
register BoxPtr first, last;
first = old;
- last = REGION_BOXPTR(dstrgn) + (dnumRects - 1);
+ last = RegionBoxptr(dstrgn) + (dnumRects - 1);
if ((first->y1 > last->y2) ||
((first->y1 == last->y1) && (first->y2 == last->y2) &&
(first->x1 > last->x2)))
@@ -1340,7 +1340,7 @@ miRegionAppend(dstrgn, rgn)
}
else
{
- first = REGION_BOXPTR(dstrgn);
+ first = RegionBoxptr(dstrgn);
last = old + (numRects - 1);
if ((first->y1 > last->y2) ||
((first->y1 == last->y1) && (first->y2 == last->y2) &&
@@ -1359,16 +1359,16 @@ miRegionAppend(dstrgn, rgn)
}
if (prepend)
{
- new = REGION_BOX(dstrgn, numRects);
+ new = RegionBox(dstrgn, numRects);
if (dnumRects == 1)
- *new = *REGION_BOXPTR(dstrgn);
+ *new = *RegionBoxptr(dstrgn);
else
- memmove((char *)new,(char *)REGION_BOXPTR(dstrgn),
+ memmove((char *)new,(char *)RegionBoxptr(dstrgn),
dnumRects * sizeof(BoxRec));
- new = REGION_BOXPTR(dstrgn);
+ new = RegionBoxptr(dstrgn);
}
else
- new = REGION_BOXPTR(dstrgn) + dnumRects;
+ new = RegionBoxptr(dstrgn) + dnumRects;
if (numRects == 1)
*new = *old;
else
@@ -1511,7 +1511,7 @@ miRegionValidate(badreg, pOverlap)
numRects = badreg->data->numRects;
if (!numRects)
{
- if (REGION_NAR(badreg))
+ if (RegionNar(badreg))
return FALSE;
good(badreg);
return TRUE;
@@ -1532,7 +1532,7 @@ miRegionValidate(badreg, pOverlap)
}
/* Step 1: Sort the rects array into ascending (y1, x1) order */
- QuickSortRects(REGION_BOXPTR(badreg), numRects);
+ QuickSortRects(RegionBoxptr(badreg), numRects);
/* Step 2: Scatter the sorted array into the minimum number of regions */
@@ -1546,7 +1546,7 @@ miRegionValidate(badreg, pOverlap)
ri[0].prevBand = 0;
ri[0].curBand = 0;
ri[0].reg = *badreg;
- box = REGION_BOXPTR(&ri[0].reg);
+ box = RegionBoxptr(&ri[0].reg);
ri[0].reg.extents = *box;
ri[0].reg.data->numRects = 1;
@@ -1563,7 +1563,7 @@ miRegionValidate(badreg, pOverlap)
for (j = numRI, rit = ri; --j >= 0; rit++)
{
reg = &rit->reg;
- riBox = REGION_END(reg);
+ riBox = RegionEnd(reg);
if (box->y1 == riBox->y1 && box->y2 == riBox->y2)
{
@@ -1577,7 +1577,7 @@ miRegionValidate(badreg, pOverlap)
else
{
RECTALLOC_BAIL(reg, 1, bail);
- *REGION_TOP(reg) = *box;
+ *RegionTop(reg) = *box;
reg->data->numRects++;
}
goto NextRect; /* So sue me */
@@ -1590,7 +1590,7 @@ miRegionValidate(badreg, pOverlap)
Coalesce(reg, rit->prevBand, rit->curBand);
rit->curBand = reg->data->numRects;
RECTALLOC_BAIL(reg, 1, bail);
- *REGION_TOP(reg) = *box;
+ *RegionTop(reg) = *box;
reg->data->numRects++;
goto NextRect;
}
@@ -1624,7 +1624,7 @@ NextRect: ;
for (j = numRI, rit = ri; --j >= 0; rit++)
{
reg = &rit->reg;
- riBox = REGION_END(reg);
+ riBox = RegionEnd(reg);
reg->extents.y2 = riBox->y2;
if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2;
Coalesce(reg, rit->prevBand, rit->curBand);
@@ -1682,7 +1682,7 @@ miRectsToRegion(nrects, prect, ctype)
size_t newSize;
pRgn = miRegionCreate(NullBox, 0);
- if (REGION_NAR (pRgn))
+ if (RegionNar (pRgn))
return pRgn;
if (!nrects)
return pRgn;
@@ -1704,7 +1704,7 @@ miRectsToRegion(nrects, prect, ctype)
}
return pRgn;
}
- newSize = REGION_SZOF(nrects);
+ newSize = RegionSizeof(nrects);
pData = newSize > 0 ? xalloc(newSize) : NULL;
if (!pData)
{
@@ -1790,7 +1790,7 @@ miSubtractO (
assert(y1<y2);
assert(r1 != r1End && r2 != r2End);
- pNextRect = REGION_TOP(pReg);
+ pNextRect = RegionTop(pReg);
do
{
@@ -1907,10 +1907,10 @@ miSubtract(regD, regM, regS)
good(regS);
good(regD);
/* check for trivial rejects */
- if (REGION_NIL(regM) || REGION_NIL(regS) ||
+ if (RegionNil(regM) || RegionNil(regS) ||
!EXTENTCHECK(&regM->extents, &regS->extents))
{
- if (REGION_NAR (regS))
+ if (RegionNar (regS))
return miRegionBreak (regD);
return miRegionCopy(regD, regM);
}
@@ -1973,9 +1973,9 @@ miInverse(newReg, reg1, invRect)
good(reg1);
good(newReg);
/* check for trivial rejects */
- if (REGION_NIL(reg1) || !EXTENTCHECK(invRect, &reg1->extents))
+ if (RegionNil(reg1) || !EXTENTCHECK(invRect, &reg1->extents))
{
- if (REGION_NAR(reg1))
+ if (RegionNar(reg1))
return miRegionBreak (newReg);
newReg->extents = *invRect;
xfreeData(newReg);
@@ -2033,7 +2033,7 @@ miRectIn(region, prect)
int numRects;
good(region);
- numRects = REGION_NUM_RECTS(region);
+ numRects = RegionNumRects(region);
/* useful optimization */
if (!numRects || !EXTENTCHECK(&region->extents, prect))
return(rgnOUT);
@@ -2055,7 +2055,7 @@ miRectIn(region, prect)
y = prect->y1;
/* can stop when both partOut and partIn are TRUE, or we reach prect->y2 */
- for (pbox = REGION_BOXPTR(region), pboxEnd = pbox + numRects;
+ for (pbox = RegionBoxptr(region), pboxEnd = pbox + numRects;
pbox != pboxEnd;
pbox++)
{
@@ -2135,7 +2135,7 @@ miTranslateRegion(pReg, x, y)
{
if (pReg->data && (nbox = pReg->data->numRects))
{
- for (pbox = REGION_BOXPTR(pReg); nbox--; pbox++)
+ for (pbox = RegionBoxptr(pReg); nbox--; pbox++)
{
pbox->x1 += x;
pbox->y1 += y;
@@ -2165,7 +2165,7 @@ miTranslateRegion(pReg, x, y)
{
register BoxPtr pboxout;
- for (pboxout = pbox = REGION_BOXPTR(pReg); nbox--; pbox++)
+ for (pboxout = pbox = RegionBoxptr(pReg); nbox--; pbox++)
{
pboxout->x1 = x1 = pbox->x1 + x;
pboxout->y1 = y1 = pbox->y1 + y;
@@ -2191,7 +2191,7 @@ miTranslateRegion(pReg, x, y)
{
if (pReg->data->numRects == 1)
{
- pReg->extents = *REGION_BOXPTR(pReg);
+ pReg->extents = *RegionBoxptr(pReg);
xfreeData(pReg);
pReg->data = (RegDataPtr)NULL;
}
@@ -2220,7 +2220,7 @@ miRegionDataCopy(
}
if (!dst->data || (dst->data->size < src->data->numRects))
{
- size_t newSize = REGION_SZOF(src->data->numRects);
+ size_t newSize = RegionSizeof(src->data->numRects);
xfreeData(dst);
dst->data = newSize > 0 ? xalloc(newSize) : NULL;
if (!dst->data)
@@ -2254,7 +2254,7 @@ miPointInRegion(pReg, x, y, box)
int numRects;
good(pReg);
- numRects = REGION_NUM_RECTS(pReg);
+ numRects = RegionNumRects(pReg);
if (!numRects || !INBOX(&pReg->extents, x, y))
return(FALSE);
if (numRects == 1)
@@ -2262,7 +2262,7 @@ miPointInRegion(pReg, x, y, box)
*box = pReg->extents;
return(TRUE);
}
- for (pbox = REGION_BOXPTR(pReg), pboxEnd = pbox + numRects;
+ for (pbox = RegionBoxptr(pReg), pboxEnd = pbox + numRects;
pbox != pboxEnd;
pbox++)
{
@@ -2283,14 +2283,14 @@ miRegionNotEmpty(pReg)
RegionPtr pReg;
{
good(pReg);
- return(!REGION_NIL(pReg));
+ return(!RegionNil(pReg));
}
Bool
miRegionBroken(RegionPtr pReg)
{
good(pReg);
- return (REGION_NAR(pReg));
+ return (RegionNar(pReg));
}
void
@@ -2497,7 +2497,7 @@ miClipSpans(
if ((! fSorted) && (nspans > 1))
QuickSortSpans(ppt, pwidth, nspans);
- pboxBandStart = REGION_BOXPTR(prgnDst);
+ pboxBandStart = RegionBoxptr(prgnDst);
pboxLast = pboxBandStart + numRects;
NextBand();
@@ -2558,8 +2558,8 @@ miFindMaxBand(prgn)
short yThisBand;
good(prgn);
- nbox = REGION_NUM_RECTS(prgn);
- pbox = REGION_RECTS(prgn);
+ nbox = RegionNumRects(prgn);
+ pbox = RegionRects(prgn);
while(nbox > 0)
{
diff --git a/nx-X11/programs/Xserver/mi/misprite.c b/nx-X11/programs/Xserver/mi/misprite.c
index a5e3f9ccf..c854984fc 100644
--- a/nx-X11/programs/Xserver/mi/misprite.c
+++ b/nx-X11/programs/Xserver/mi/misprite.c
@@ -136,7 +136,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure)
pScreenPriv = (miSpriteScreenPtr) pScreen->devPrivates[miSpriteScreenIndex].ptr;
if (pScreenPriv->isUp &&
- RECT_IN_REGION (pScreen, pRegion, &pScreenPriv->saved) != rgnOUT)
+ RegionContainsRect(pRegion, &pScreenPriv->saved) != rgnOUT)
{
SPRITE_DEBUG(("Damage remove\n"));
miSpriteRemoveCursor (pScreen);
@@ -389,7 +389,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
* Damage will take care of destination check
*/
if (pScreenPriv->isUp &&
- RECT_IN_REGION (pScreen, prgnSrc, &pScreenPriv->saved) != rgnOUT)
+ RegionContainsRect(prgnSrc, &pScreenPriv->saved) != rgnOUT)
{
SPRITE_DEBUG (("CopyWindow remove\n"));
miSpriteRemoveCursor (pScreen);
@@ -589,7 +589,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy)
cursorBox.x2 += dx;
cursorBox.y2 += dy;
}
- if (RECT_IN_REGION( pScreen, pObscured, &cursorBox) != rgnOUT)
+ if (RegionContainsRect(pObscured, &cursorBox) != rgnOUT)
miSpriteRemoveCursor (pScreen);
}
diff --git a/nx-X11/programs/Xserver/mi/mivaltree.c b/nx-X11/programs/Xserver/mi/mivaltree.c
index b9a42472f..73028a074 100644
--- a/nx-X11/programs/Xserver/mi/mivaltree.c
+++ b/nx-X11/programs/Xserver/mi/mivaltree.c
@@ -123,8 +123,8 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y)
Bool someIn, someOut;
register 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;
@@ -148,7 +148,7 @@ miShapedWindowIn (pScreen, universe, bounding, rect, x, y)
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)
@@ -241,7 +241,7 @@ miComputeClips (
borderSize.y2 = dy;
oldVis = pParent->visibility;
- switch (RECT_IN_REGION( pScreen, universe, &borderSize))
+ switch (RegionContainsRect(universe, &borderSize))
{
case rgnIN:
newVis = VisibilityUnobscured;
@@ -287,7 +287,7 @@ miComputeClips (
{
if (miSetRedirectBorderClipProc)
(*miSetRedirectBorderClipProc) (pParent, universe);
- REGION_COPY(pScreen, universe, &pParent->borderSize);
+ RegionCopy(universe, &pParent->borderSize);
}
#endif
@@ -315,9 +315,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)
@@ -326,16 +326,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)
{
@@ -364,20 +364,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
@@ -397,22 +397,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
@@ -420,15 +420,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)))
@@ -436,7 +436,7 @@ miComputeClips (
for (; pChild; pChild = pChild->nextSib)
{
if (pChild->viewable)
- REGION_APPEND( pScreen, &childUnion, &pChild->borderSize);
+ RegionAppend(&childUnion, &pChild->borderSize);
}
}
else
@@ -444,10 +444,10 @@ miComputeClips (
for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib)
{
if (pChild->viewable)
- REGION_APPEND( pScreen, &childUnion, &pChild->borderSize);
+ RegionAppend(&childUnion, &pChild->borderSize);
}
}
- REGION_VALIDATE( pScreen, &childUnion, &overlap);
+ RegionValidate(&childUnion, &overlap);
for (pChild = pParent->firstChild;
pChild;
@@ -464,7 +464,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,
@@ -476,14 +476,14 @@ miComputeClips (
* other sibling.
*/
if (overlap)
- 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 */
/*
@@ -496,12 +496,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);
}
@@ -513,7 +513,7 @@ miComputeClips (
*/
if (pParent->backStorage && !resized)
{
- REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe);
+ RegionSubtract(exposed, &pParent->clipList, universe);
(* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy);
}
@@ -527,7 +527,7 @@ miComputeClips (
}
#ifdef NOTDEF
- REGION_COPY( pScreen, &pParent->clipList, universe);
+ RegionCopy(&pParent->clipList, universe);
#endif
pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -622,8 +622,8 @@ miValidateTree (pParent, pChild, kind)
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
@@ -631,10 +631,10 @@ miValidateTree (pParent, pChild, kind)
* 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;
/*
@@ -642,19 +642,19 @@ miValidateTree (pParent, pChild, kind)
* 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)
- 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
{
@@ -672,7 +672,7 @@ miValidateTree (pParent, pChild, kind)
if (pWin->redirectDraw && miGetRedirectBorderClipProc)
pBorderClip = (*miGetRedirectBorderClipProc)(pWin);
#endif
- REGION_APPEND( pScreen, &totalClip, pBorderClip );
+ RegionAppend(&totalClip, pBorderClip );
if (pWin->viewable)
viewvals++;
}
@@ -691,7 +691,7 @@ miValidateTree (pParent, pChild, kind)
if (pWin->redirectDraw && miGetRedirectBorderClipProc)
pBorderClip = (*miGetRedirectBorderClipProc)(pWin);
#endif
- REGION_APPEND( pScreen, &totalClip, pBorderClip );
+ RegionAppend(&totalClip, pBorderClip );
if (pWin->viewable)
viewvals++;
}
@@ -700,7 +700,7 @@ miValidateTree (pParent, pChild, kind)
pWin = pWin->prevSib;
}
}
- REGION_VALIDATE( pScreen, &totalClip, &overlap);
+ RegionValidate(&totalClip, &overlap);
}
/*
@@ -713,7 +713,7 @@ miValidateTree (pParent, pChild, kind)
overlap = TRUE;
if (kind != VTStack)
{
- REGION_UNION( pScreen, &totalClip, &totalClip, &pParent->clipList);
+ RegionUnion(&totalClip, &totalClip, &pParent->clipList);
if (viewvals > 1)
{
/*
@@ -723,12 +723,12 @@ miValidateTree (pParent, pChild, kind)
* 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)
- REGION_APPEND( pScreen, &childUnion,
+ RegionAppend(&childUnion,
&pWin->borderSize);
}
else
@@ -737,16 +737,16 @@ miValidateTree (pParent, pChild, kind)
while (1)
{
if (pWin->valdata && pWin->viewable)
- 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);
}
}
@@ -756,13 +756,13 @@ miValidateTree (pParent, pChild, kind)
{
if (pWin->viewable) {
if (pWin->valdata) {
- REGION_INTERSECT( pScreen, &childClip,
+ RegionIntersect(&childClip,
&totalClip,
&pWin->borderSize);
miComputeClips (pWin, pScreen, &childClip, kind, &exposed);
if (overlap)
{
- REGION_SUBTRACT( pScreen, &totalClip,
+ RegionSubtract(&totalClip,
&totalClip,
&pWin->borderSize);
}
@@ -771,24 +771,24 @@ miValidateTree (pParent, pChild, kind)
}
} 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 = (ValidatePtr)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
@@ -804,22 +804,22 @@ miValidateTree (pParent, pChild, kind)
* 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:
if (pParent->backStorage) {
- REGION_SUBTRACT( pScreen, &exposed, &pParent->clipList, &totalClip);
+ RegionSubtract(&exposed, &pParent->clipList, &totalClip);
(* pScreen->SaveDoomedAreas)(pParent, &exposed, 0, 0);
}
- 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/nx-X11/programs/Xserver/mi/miwindow.c b/nx-X11/programs/Xserver/mi/miwindow.c
index 44b7ada60..198f765dd 100644
--- a/nx-X11/programs/Xserver/mi/miwindow.c
+++ b/nx-X11/programs/Xserver/mi/miwindow.c
@@ -114,7 +114,7 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
box.y2 = y2;
pScreen = pWin->drawable.pScreen;
- REGION_INIT(pScreen, &reg, &box, 1);
+ RegionInit(&reg, &box, 1);
if (pWin->backStorage)
{
/*
@@ -128,14 +128,14 @@ miClearToBackground(pWin, x, y, w, h, generateExposures)
generateExposures);
}
- REGION_INTERSECT(pScreen, &reg, &reg, &pWin->clipList);
+ RegionIntersect(&reg, &reg, &pWin->clipList);
if (generateExposures)
(*pScreen->WindowExposures)(pWin, &reg, pBSReg);
else if (pWin->backgroundState != None)
(*pScreen->PaintWindowBackground)(pWin, &reg, PW_BACKGROUND);
- REGION_UNINIT(pScreen, &reg);
+ RegionUninit(&reg);
if (pBSReg)
- REGION_DESTROY(pScreen, pBSReg);
+ RegionDestroy(pBSReg);
}
/*
@@ -181,7 +181,7 @@ miCheckSubSaveUnder(
for (; pChild != pFirst; pChild = pChild->nextSib)
if (pChild->viewable && pChild->saveUnder)
- REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
+ RegionUnion(pRegion, pRegion, &pChild->borderSize);
/*
* check region below and including first changed window
@@ -200,10 +200,10 @@ miCheckSubSaveUnder(
{
if (!subInited)
{
- REGION_NULL(pScreen, &SubRegion);
+ RegionNull(&SubRegion);
subInited = TRUE;
}
- REGION_COPY(pScreen, &SubRegion, pRegion);
+ RegionCopy(&SubRegion, pRegion);
res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
&SubRegion);
}
@@ -214,12 +214,12 @@ miCheckSubSaveUnder(
}
if (pChild->saveUnder)
- REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
+ RegionUnion(pRegion, pRegion, &pChild->borderSize);
}
}
if (subInited)
- REGION_UNINIT(pScreen, &SubRegion);
+ RegionUninit(&SubRegion);
}
/*
@@ -230,8 +230,8 @@ miCheckSubSaveUnder(
if (pParent->viewable &&
((pParent->eventMask | wOtherEventMasks(pParent)) & ExposureMask) &&
- REGION_NOTEMPTY(pScreen, &pParent->borderSize) &&
- RECT_IN_REGION(pScreen, pRegion, REGION_EXTENTS(pScreen,
+ RegionNotEmpty(&pParent->borderSize) &&
+ RegionContainsRect(pRegion, RegionExtents(
&pParent->borderSize)) != rgnOUT)
{
if (!pParent->DIXsaveUnder)
@@ -283,11 +283,11 @@ miChangeSaveUnder(pWin, first)
numSaveUndersViewable += deltaSaveUndersViewable;
deltaSaveUndersViewable = 0;
pScreen = pWin->drawable.pScreen;
- REGION_NULL(pScreen, &rgn);
+ RegionNull(&rgn);
res = miCheckSubSaveUnder (pWin->parent,
pWin->saveUnder ? first : pWin->nextSib,
&rgn);
- REGION_UNINIT(pScreen, &rgn);
+ RegionUninit(&rgn);
return res;
}
@@ -386,9 +386,9 @@ miMarkOverlappedWindows(pWin, pFirst, 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)
@@ -408,17 +408,17 @@ miMarkOverlappedWindows(pWin, pFirst, 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;
@@ -464,13 +464,13 @@ miHandleValidateExposures(pWin)
{
if ( (val = pChild->valdata) )
{
- if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed))
+ if (RegionNotEmpty(&val->after.borderExposed))
(*pChild->drawable.pScreen->PaintWindowBorder)(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);
xfree(val);
pChild->valdata = (ValidatePtr)NULL;
if (pChild->firstChild)
@@ -517,8 +517,8 @@ miMoveWindow(pWin, x, y, pNextSib, 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;
@@ -555,7 +555,7 @@ miMoveWindow(pWin, x, y, pNextSib, 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);
}
@@ -590,14 +590,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;
}
@@ -654,8 +654,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/*
* 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
@@ -668,8 +668,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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
@@ -684,8 +684,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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
@@ -700,16 +700,16 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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);
}
}
@@ -736,9 +736,9 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
if (WasViewable)
{
- pRegion = REGION_CREATE(pScreen, NullBox, 1);
+ pRegion = RegionCreate(NullBox, 1);
if (pWin->backStorage)
- REGION_COPY(pScreen, pRegion, &pWin->clipList);
+ RegionCopy(pRegion, &pWin->clipList);
if (pLayerWin == pWin)
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
@@ -766,7 +766,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
* 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);
@@ -810,16 +810,16 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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
@@ -830,9 +830,9 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/*
* 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
@@ -841,17 +841,17 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
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);
}
}
@@ -875,14 +875,14 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/* 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 */
@@ -898,7 +898,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
/* 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
@@ -908,7 +908,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
{
if (pChild->winGravity != g)
continue;
- REGION_INTERSECT(pScreen, pRegion,
+ RegionIntersect(pRegion,
&pChild->borderClip, gravitate[g]);
TraverseTree (pChild, miRecomputeExposures, (void *)pRegion);
}
@@ -919,21 +919,21 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
*/
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 (bsExposed)
{
RegionPtr valExposed = NullRegion;
@@ -942,8 +942,8 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
if (anyMarked)
(*pScreen->HandleExposures)(pLayerWin->parent);
@@ -960,7 +960,7 @@ miSlideAndSizeWindow(pWin, x, y, w, h, pSib)
else if (bsExposed)
{
(*pScreen->WindowExposures) (pWin, NullRegion, bsExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionDestroy(bsExposed);
}
if (pWin->realized)
WindowsRestructured ();
@@ -1004,8 +1004,8 @@ miSetShape(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;
}
@@ -1022,8 +1022,8 @@ miSetShape(pWin)
{
if (pWin->backStorage)
{
- pOldClip = REGION_CREATE(pScreen, NullBox, 1);
- REGION_COPY(pScreen, pOldClip, &pWin->clipList);
+ pOldClip = RegionCreate(NullBox, 1);
+ RegionCopy(pOldClip, &pWin->clipList);
}
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
@@ -1049,7 +1049,7 @@ miSetShape(pWin)
(pWin, 0, 0, pOldClip,
pWin->drawable.x, pWin->drawable.y);
if (WasViewable)
- REGION_DESTROY(pScreen, pOldClip);
+ RegionDestroy(pOldClip);
if (bsExposed)
{
RegionPtr valExposed = NullRegion;
@@ -1058,8 +1058,8 @@ miSetShape(pWin)
valExposed = &pWin->valdata->after.exposed;
(*pScreen->WindowExposures) (pWin, valExposed, bsExposed);
if (valExposed)
- REGION_EMPTY(pScreen, valExposed);
- REGION_DESTROY(pScreen, bsExposed);
+ RegionEmpty(valExposed);
+ RegionDestroy(bsExposed);
}
}
if (WasViewable)
@@ -1120,8 +1120,8 @@ miChangeBorderWidth(pWin, 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;
}
@@ -1158,10 +1158,10 @@ miMarkUnrealizedWindow(pChild, pWin, 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);
}
}
@@ -1176,7 +1176,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);
diff --git a/nx-X11/programs/Xserver/miext/cw/cw.c b/nx-X11/programs/Xserver/miext/cw/cw.c
index 8079a0009..9f39b9650 100644
--- a/nx-X11/programs/Xserver/miext/cw/cw.c
+++ b/nx-X11/programs/Xserver/miext/cw/cw.c
@@ -190,8 +190,8 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable)
XID vals[2];
RegionPtr pCompositeClip;
- pCompositeClip = REGION_CREATE (pScreen, NULL, 0);
- REGION_COPY (pScreen, pCompositeClip, pGC->pCompositeClip);
+ pCompositeClip = RegionCreate(NULL, 0);
+ RegionCopy(pCompositeClip, pGC->pCompositeClip);
/* Either the drawable has changed, or the clip list in the drawable has
* changed. Copy the new clip list over and set the new translated
@@ -397,8 +397,8 @@ cwFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, unsigned long pixel)
NULL, v);
ValidateGC(pDrawable, pGC);
- pBox = REGION_RECTS(pRegion);
- nbox = REGION_NUM_RECTS(pRegion);
+ pBox = RegionRects(pRegion);
+ nbox = RegionNumRects(pRegion);
for (i = 0; i < nbox; i++, pBox++) {
xRectangle rect;
@@ -433,8 +433,8 @@ cwFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
ValidateGC(pDrawable, pGC);
- pBox = REGION_RECTS(pRegion);
- nbox = REGION_NUM_RECTS(pRegion);
+ pBox = RegionRects(pRegion);
+ nbox = RegionNumRects(pRegion);
for (i = 0; i < nbox; i++, pBox++) {
xRectangle rect;
@@ -473,7 +473,7 @@ cwPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
if (pWin && (pWin->backgroundState == BackgroundPixel ||
pWin->backgroundState == BackgroundPixmap))
{
- REGION_TRANSLATE(pScreen, pRegion, x_screen, y_screen);
+ RegionTranslate(pRegion, x_screen, y_screen);
if (pWin->backgroundState == BackgroundPixel) {
cwFillRegionSolid(pBackingDrawable, pRegion,
@@ -483,7 +483,7 @@ cwPaintWindowBackground(WindowPtr pWin, RegionPtr pRegion, int what)
pWin->background.pixmap, x_off, y_off);
}
- REGION_TRANSLATE(pScreen, pRegion, -x_screen, -y_screen);
+ RegionTranslate(pRegion, -x_screen, -y_screen);
}
}
@@ -509,7 +509,7 @@ cwPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
x_screen = x_off - pWin->drawable.x;
y_screen = y_off - pWin->drawable.y;
- REGION_TRANSLATE(pScreen, pRegion, x_screen, y_screen);
+ RegionTranslate(pRegion, x_screen, y_screen);
if (pWin->borderIsPixel) {
cwFillRegionSolid(pBackingDrawable, pRegion, pWin->border.pixel);
@@ -518,7 +518,7 @@ cwPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what)
x_off, y_off);
}
- REGION_TRANSLATE(pScreen, pRegion, -x_screen, -y_screen);
+ RegionTranslate(pRegion, -x_screen, -y_screen);
}
SCREEN_EPILOGUE(pScreen, PaintWindowBorder, cwPaintWindowBorder);
@@ -545,7 +545,7 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dx = ptOldOrg.x - pWin->drawable.x;
dy = ptOldOrg.y - pWin->drawable.y;
- pExtents = REGION_EXTENTS(pScreen, prgnSrc);
+ pExtents = RegionExtents(prgnSrc);
pBackingPixmap = (PixmapPtr) cwGetBackingDrawable((DrawablePtr)pWin,
&x_off, &y_off);
@@ -558,15 +558,15 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
dst_y = src_y - dy;
/* Translate region (as required by API) */
- REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
pGC = GetScratchGC(pBackingPixmap->drawable.depth, pScreen);
/*
* Copy region to GC as clip, aligning as dest clip
*/
- pClip = REGION_CREATE (pScreen, NULL, 0);
- REGION_INTERSECT(pScreen, pClip, &pWin->borderClip, prgnSrc);
- REGION_TRANSLATE(pScreen, pClip,
+ pClip = RegionCreate(NULL, 0);
+ RegionIntersect(pClip, &pWin->borderClip, prgnSrc);
+ RegionTranslate(pClip,
-pBackingPixmap->screen_x,
-pBackingPixmap->screen_y);
diff --git a/nx-X11/programs/Xserver/miext/cw/cw_ops.c b/nx-X11/programs/Xserver/miext/cw/cw_ops.c
index 9e09d0532..e4c53b79f 100644
--- a/nx-X11/programs/Xserver/miext/cw/cw_ops.c
+++ b/nx-X11/programs/Xserver/miext/cw/cw_ops.c
@@ -195,7 +195,7 @@ cwCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
dstx, dsty);
if (exposed != NULL)
- REGION_TRANSLATE(pDst->pScreen, exposed, odstx - dstx, odsty - dsty);
+ RegionTranslate(exposed, odstx - dstx, odsty - dsty);
EPILOGUE(pGC);
@@ -223,7 +223,7 @@ cwCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy,
dstx, dsty, plane);
if (exposed != NULL)
- REGION_TRANSLATE(pDst->pScreen, exposed, odstx - dstx, odsty - dsty);
+ RegionTranslate(exposed, odstx - dstx, odsty - dsty);
EPILOGUE(pGC);
diff --git a/nx-X11/programs/Xserver/miext/damage/damage.c b/nx-X11/programs/Xserver/miext/damage/damage.c
index 0dd788ec3..60e2ae4b5 100755
--- a/nx-X11/programs/Xserver/miext/damage/damage.c
+++ b/nx-X11/programs/Xserver/miext/damage/damage.c
@@ -137,7 +137,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
#endif
/* short circuit for empty regions */
- if (!REGION_NOTEMPTY(pScreen, pRegion))
+ if (!RegionNotEmpty(pRegion))
return;
#ifdef COMPOSITE
@@ -152,7 +152,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y;
}
if (screen_x || screen_y)
- REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y);
+ RegionTranslate(pRegion, screen_x, screen_y);
#endif
if (pDrawable->type == DRAWABLE_WINDOW &&
@@ -160,22 +160,22 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
if (subWindowMode == ClipByChildren)
{
- REGION_INTERSECT(pScreen, pRegion, pRegion,
+ RegionIntersect(pRegion, pRegion,
&((WindowPtr)(pDrawable))->clipList);
}
else if (subWindowMode == IncludeInferiors)
{
RegionPtr pTempRegion =
NotClippedByChildren((WindowPtr)(pDrawable));
- REGION_INTERSECT(pScreen, pRegion, pRegion, pTempRegion);
- REGION_DESTROY(pScreen, pTempRegion);
+ RegionIntersect(pRegion, pRegion, pTempRegion);
+ RegionDestroy(pTempRegion);
}
/* If subWindowMode is set to an invalid value, don't perform
* any drawable-based clipping. */
}
- REGION_NULL (pScreen, &clippedRec);
+ RegionNull(&clippedRec);
for (; pDamage; pDamage = pNext)
{
pNext = pDamage->pNext;
@@ -223,7 +223,7 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
{
pDamageRegion = &clippedRec;
if (pDamage->pDrawable->type == DRAWABLE_WINDOW) {
- REGION_INTERSECT (pScreen, pDamageRegion, pRegion,
+ RegionIntersect(pDamageRegion, pRegion,
&((WindowPtr)(pDamage->pDrawable))->borderClip);
} else {
BoxRec box;
@@ -231,14 +231,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
box.y1 = draw_y;
box.x2 = draw_x + pDamage->pDrawable->width;
box.y2 = draw_y + pDamage->pDrawable->height;
- REGION_INIT(pScreen, &pixClip, &box, 1);
- REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip);
- REGION_UNINIT(pScreen, &pixClip);
+ RegionInit(&pixClip, &box, 1);
+ RegionIntersect(pDamageRegion, pRegion, &pixClip);
+ RegionUninit(&pixClip);
}
/*
* Short circuit empty results
*/
- if (!REGION_NOTEMPTY(pScreen, pDamageRegion))
+ if (!RegionNotEmpty(pDamageRegion))
continue;
}
@@ -253,39 +253,39 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* Move region to target coordinate space
*/
if (draw_x || draw_y)
- REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y);
+ RegionTranslate(pDamageRegion, -draw_x, -draw_y);
switch (pDamage->damageLevel) {
case DamageReportRawRegion:
(*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure);
break;
case DamageReportDeltaRegion:
- REGION_NULL (pScreen, &tmpRegion);
- REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, &pDamage->damage);
- if (REGION_NOTEMPTY (pScreen, &tmpRegion))
+ RegionNull(&tmpRegion);
+ RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage);
+ if (RegionNotEmpty(&tmpRegion))
{
- REGION_UNION(pScreen, &pDamage->damage,
+ RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
(*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure);
}
- REGION_UNINIT(pScreen, &tmpRegion);
+ RegionUninit(&tmpRegion);
break;
case DamageReportBoundingBox:
- tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage);
- REGION_UNION(pScreen, &pDamage->damage,
+ tmpBox = *RegionExtents(&pDamage->damage);
+ RegionUnion(&pDamage->damage,
&pDamage->damage, pDamageRegion);
- if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &pDamage->damage)))
+ if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage)))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNonEmpty:
- was_empty = !REGION_NOTEMPTY(pScreen, &pDamage->damage);
- REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
+ was_empty = !RegionNotEmpty(&pDamage->damage);
+ RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
- if (was_empty && REGION_NOTEMPTY(pScreen, &pDamage->damage))
+ if (was_empty && RegionNotEmpty(&pDamage->damage))
(*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure);
break;
case DamageReportNone:
- REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage,
+ RegionUnion(&pDamage->damage, &pDamage->damage,
pDamageRegion);
break;
}
@@ -293,14 +293,14 @@ damageDamageRegion (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
* translate original region back
*/
if (pDamageRegion == pRegion && (draw_x || draw_y))
- REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y);
+ RegionTranslate(pDamageRegion, draw_x, draw_y);
}
#ifdef COMPOSITE
if (screen_x || screen_y)
- REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y);
+ RegionTranslate(pRegion, -screen_x, -screen_y);
#endif
- REGION_UNINIT (pScreen, &clippedRec);
+ RegionUninit(&clippedRec);
}
#if DAMAGE_DEBUG_ENABLE
@@ -314,13 +314,13 @@ damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode)
{
RegionRec region;
- REGION_INIT (pDrawable->pScreen, &region, pBox, 1);
+ RegionInit(&region, pBox, 1);
#if DAMAGE_DEBUG_ENABLE
_damageDamageRegion (pDrawable, &region, TRUE, subWindowMode, where);
#else
damageDamageRegion (pDrawable, &region, TRUE, subWindowMode);
#endif
- REGION_UNINIT (pDrawable->pScreen, &region);
+ RegionUninit(&region);
}
static void damageValidateGC(GCPtr, unsigned long, DrawablePtr);
@@ -489,7 +489,7 @@ damageDestroyClip(GCPtr pGC)
#define checkGCDamage(d,g) (getDrawableDamage(d) && \
(!g->pCompositeClip ||\
- REGION_NOTEMPTY(d->pScreen, \
+ RegionNotEmpty(\
g->pCompositeClip)))
#ifdef RENDER
@@ -503,7 +503,7 @@ damageDestroyClip(GCPtr pGC)
}
#define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \
- REGION_NOTEMPTY(pScreen, p->pCompositeClip))
+ RegionNotEmpty(p->pCompositeClip))
static void
damageComposite (CARD8 op,
@@ -1615,9 +1615,9 @@ damageCopyWindow(WindowPtr pWindow,
* The region comes in source relative, but the damage occurs
* at the destination location. Translate back and forth.
*/
- REGION_TRANSLATE (pScreen, prgnSrc, dx, dy);
+ RegionTranslate(prgnSrc, dx, dy);
damageDamageRegion (&pWindow->drawable, prgnSrc, FALSE, -1);
- REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy);
+ RegionTranslate(prgnSrc, -dx, -dy);
}
unwrap (pScrPriv, pScreen, CopyWindow);
(*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
@@ -1820,7 +1820,7 @@ DamageCreate (DamageReportFunc damageReport,
return 0;
pDamage->pNext = 0;
pDamage->pNextWin = 0;
- REGION_NULL(pScreen, &pDamage->damage);
+ RegionNull(&pDamage->damage);
pDamage->damageLevel = damageLevel;
pDamage->isInternal = isInternal;
@@ -1909,7 +1909,7 @@ DamageDestroy (DamagePtr pDamage)
{
if (pDamage->damageDestroy)
(*pDamage->damageDestroy) (pDamage, pDamage->closure);
- REGION_UNINIT (pDamage->pDrawable->pScreen, &pDamage->damage);
+ RegionUninit(&pDamage->damage);
xfree (pDamage);
}
@@ -1921,7 +1921,7 @@ DamageSubtract (DamagePtr pDamage,
RegionRec pixmapClip;
DrawablePtr pDrawable = pDamage->pDrawable;
- REGION_SUBTRACT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pRegion);
+ RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion);
if (pDrawable)
{
if (pDrawable->type == DRAWABLE_WINDOW)
@@ -1934,22 +1934,22 @@ DamageSubtract (DamagePtr pDamage,
box.y1 = pDrawable->y;
box.x2 = pDrawable->x + pDrawable->width;
box.y2 = pDrawable->y + pDrawable->height;
- REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1);
+ RegionInit(&pixmapClip, &box, 1);
pClip = &pixmapClip;
}
- REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y);
- REGION_INTERSECT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pClip);
- REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y);
+ RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y);
+ RegionIntersect(&pDamage->damage, &pDamage->damage, pClip);
+ RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y);
if (pDrawable->type != DRAWABLE_WINDOW)
- REGION_UNINIT(pDrawable->pScreen, &pixmapClip);
+ RegionUninit(&pixmapClip);
}
- return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage);
+ return RegionNotEmpty(&pDamage->damage);
}
void
DamageEmpty (DamagePtr pDamage)
{
- REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage);
+ RegionEmpty(&pDamage->damage);
}
RegionPtr
diff --git a/nx-X11/programs/Xserver/render/mipict.c b/nx-X11/programs/Xserver/render/mipict.c
index cf9c27f01..ae7cf5a6d 100644
--- a/nx-X11/programs/Xserver/render/mipict.c
+++ b/nx-X11/programs/Xserver/render/mipict.c
@@ -48,7 +48,7 @@ void
miDestroyPicture (PicturePtr pPicture)
{
if (pPicture->freeCompClip)
- REGION_DESTROY(pPicture->pDrawable->pScreen, pPicture->pCompositeClip);
+ RegionDestroy(pPicture->pCompositeClip);
}
void
@@ -65,7 +65,7 @@ miDestroyPictureClip (PicturePtr pPicture)
* we know we'll never have a list of rectangles, since ChangeClip
* immediately turns them into a region
*/
- REGION_DESTROY(pPicture->pDrawable->pScreen, pPicture->clientClip);
+ RegionDestroy(pPicture->clientClip);
break;
}
pPicture->clientClip = NULL;
@@ -86,7 +86,7 @@ miChangePictureClip (PicturePtr pPicture,
switch (type) {
case CT_PIXMAP:
/* convert the pixmap to a region */
- clientClip = (void *) BITMAP_TO_REGION(pScreen, (PixmapPtr) value);
+ clientClip = (void *) BitmapToRegion(pScreen, (PixmapPtr) value);
if (!clientClip)
return BadAlloc;
clientClipType = CT_REGION;
@@ -101,7 +101,7 @@ miChangePictureClip (PicturePtr pPicture,
clientClipType = CT_NONE;
break;
default:
- clientClip = (void *) RECTS_TO_REGION(pScreen, n,
+ clientClip = (void *) RegionFromRects(n,
(xRectangle *) value,
type);
if (!clientClip)
@@ -162,7 +162,7 @@ miValidatePicture (PicturePtr pPicture,
if (pPicture->clientClipType == CT_NONE)
{
if (freeCompClip)
- REGION_DESTROY(pScreen, pPicture->pCompositeClip);
+ RegionDestroy(pPicture->pCompositeClip);
pPicture->pCompositeClip = pregWin;
pPicture->freeCompClip = freeTmpClip;
}
@@ -177,30 +177,30 @@ miValidatePicture (PicturePtr pPicture,
* clip. if neither is real, create a new region.
*/
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
pDrawable->x + pPicture->clipOrigin.x,
pDrawable->y + pPicture->clipOrigin.y);
if (freeCompClip)
{
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ RegionIntersect(pPicture->pCompositeClip,
pregWin, pPicture->clientClip);
if (freeTmpClip)
- REGION_DESTROY(pScreen, pregWin);
+ RegionDestroy(pregWin);
}
else if (freeTmpClip)
{
- REGION_INTERSECT(pScreen, pregWin, pregWin, pPicture->clientClip);
+ RegionIntersect(pregWin, pregWin, pPicture->clientClip);
pPicture->pCompositeClip = pregWin;
}
else
{
- pPicture->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0);
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ pPicture->pCompositeClip = RegionCreate(NullBox, 0);
+ RegionIntersect(pPicture->pCompositeClip,
pregWin, pPicture->clientClip);
}
pPicture->freeCompClip = TRUE;
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
-(pDrawable->x + pPicture->clipOrigin.x),
-(pDrawable->y + pPicture->clipOrigin.y));
}
@@ -218,31 +218,31 @@ miValidatePicture (PicturePtr pPicture,
if (pPicture->freeCompClip)
{
- REGION_RESET(pScreen, pPicture->pCompositeClip, &pixbounds);
+ RegionReset(pPicture->pCompositeClip, &pixbounds);
}
else
{
pPicture->freeCompClip = TRUE;
- pPicture->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1);
+ pPicture->pCompositeClip = RegionCreate(&pixbounds, 1);
}
if (pPicture->clientClipType == CT_REGION)
{
if(pDrawable->x || pDrawable->y) {
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
pDrawable->x + pPicture->clipOrigin.x,
pDrawable->y + pPicture->clipOrigin.y);
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ RegionIntersect(pPicture->pCompositeClip,
pPicture->pCompositeClip, pPicture->clientClip);
- REGION_TRANSLATE(pScreen, pPicture->clientClip,
+ RegionTranslate(pPicture->clientClip,
-(pDrawable->x + pPicture->clipOrigin.x),
-(pDrawable->y + pPicture->clipOrigin.y));
} else {
- REGION_TRANSLATE(pScreen, pPicture->pCompositeClip,
+ RegionTranslate(pPicture->pCompositeClip,
-pPicture->clipOrigin.x, -pPicture->clipOrigin.y);
- REGION_INTERSECT(pScreen, pPicture->pCompositeClip,
+ RegionIntersect(pPicture->pCompositeClip,
pPicture->pCompositeClip, pPicture->clientClip);
- REGION_TRANSLATE(pScreen, pPicture->pCompositeClip,
+ RegionTranslate(pPicture->pCompositeClip,
pPicture->clipOrigin.x, pPicture->clipOrigin.y);
}
}
@@ -274,11 +274,11 @@ miClipPictureReg (RegionPtr pRegion,
int dx,
int dy)
{
- if (REGION_NUM_RECTS(pRegion) == 1 &&
- REGION_NUM_RECTS(pClip) == 1)
+ if (RegionNumRects(pRegion) == 1 &&
+ RegionNumRects(pClip) == 1)
{
- BoxPtr pRbox = REGION_RECTS(pRegion);
- BoxPtr pCbox = REGION_RECTS(pClip);
+ BoxPtr pRbox = RegionRects(pRegion);
+ BoxPtr pCbox = RegionRects(pClip);
int v;
if (pRbox->x1 < (v = pCbox->x1 + dx))
@@ -292,21 +292,21 @@ miClipPictureReg (RegionPtr pRegion,
if (pRbox->x1 >= pRbox->x2 ||
pRbox->y1 >= pRbox->y2)
{
- REGION_EMPTY(pScreen, pRegion);
+ RegionEmpty(pRegion);
}
}
- else if (!REGION_NOTEMPTY (pScreen, pClip))
+ else if (!RegionNotEmpty(pClip))
return FALSE;
else
{
if (dx || dy)
- REGION_TRANSLATE(pScreen, pRegion, -dx, -dy);
- if (!REGION_INTERSECT (pScreen, pRegion, pRegion, pClip))
+ RegionTranslate(pRegion, -dx, -dy);
+ if (!RegionIntersect(pRegion, pRegion, pClip))
return FALSE;
if (dx || dy)
- REGION_TRANSLATE(pScreen, pRegion, dx, dy);
+ RegionTranslate(pRegion, dx, dy);
}
- return REGION_NOTEMPTY(pScreen, pRegion);
+ return RegionNotEmpty(pRegion);
}
static __inline Bool
@@ -322,13 +322,13 @@ miClipPictureSrc (RegionPtr pRegion,
{
if (pPicture->clientClipType != CT_NONE)
{
- REGION_TRANSLATE(pScreen, pRegion,
+ RegionTranslate(pRegion,
dx - pPicture->clipOrigin.x,
dy - pPicture->clipOrigin.y);
- if (!REGION_INTERSECT (pScreen, pRegion, pRegion,
+ if (!RegionIntersect(pRegion, pRegion,
(RegionPtr) pPicture->clientClip))
return FALSE;
- REGION_TRANSLATE(pScreen, pRegion,
+ RegionTranslate(pRegion,
- (dx - pPicture->clipOrigin.x),
- (dy - pPicture->clipOrigin.y));
}
@@ -432,13 +432,13 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pRegion->extents.x1 >= pRegion->extents.x2 ||
pRegion->extents.y1 >= pRegion->extents.y2)
{
- REGION_EMPTY (pDst->pDrawable->pScreen, pRegion);
+ RegionEmpty(pRegion);
return FALSE;
}
/* clip against dst */
if (!miClipPictureReg (pRegion, pDst->pCompositeClip, 0, 0))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
if (pDst->alphaMap)
@@ -447,14 +447,14 @@ miComputeCompositeRegion (RegionPtr pRegion,
-pDst->alphaOrigin.x,
-pDst->alphaOrigin.y))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
}
/* clip against src */
if (!miClipPictureSrc (pRegion, pSrc, xDst - xSrc, yDst - ySrc))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
if (pSrc->alphaMap)
@@ -463,7 +463,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
xDst - (xSrc + pSrc->alphaOrigin.x),
yDst - (ySrc + pSrc->alphaOrigin.y)))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
}
@@ -472,7 +472,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
{
if (!miClipPictureSrc (pRegion, pMask, xDst - xMask, yDst - yMask))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
if (pMask->alphaMap)
@@ -481,7 +481,7 @@ miComputeCompositeRegion (RegionPtr pRegion,
xDst - (xMask + pMask->alphaOrigin.x),
yDst - (yMask + pMask->alphaOrigin.y)))
{
- REGION_UNINIT (pScreen, pRegion);
+ RegionUninit(pRegion);
return FALSE;
}
}
diff --git a/nx-X11/programs/Xserver/render/mirect.c b/nx-X11/programs/Xserver/render/mirect.c
index c4aeb9aba..3ce7a7f4c 100644
--- a/nx-X11/programs/Xserver/render/mirect.c
+++ b/nx-X11/programs/Xserver/render/mirect.c
@@ -65,8 +65,8 @@ miColorRects (PicturePtr pDst,
tmpval[4] = pDst->clipOrigin.y - yoff;
mask |= GCClipXOrigin|GCClipYOrigin;
- pClip = REGION_CREATE (pScreen, NULL, 1);
- REGION_COPY (pScreen, pClip,
+ pClip = RegionCreate(NULL, 1);
+ RegionCopy(pClip,
(RegionPtr) pClipPict->clientClip);
(*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0);
}
diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c
index 754d468bb..5d8496610 100644
--- a/nx-X11/programs/Xserver/render/picture.c
+++ b/nx-X11/programs/Xserver/render/picture.c
@@ -1390,7 +1390,7 @@ SetPictureClipRects (PicturePtr pPicture,
RegionPtr clientClip;
int result;
- clientClip = RECTS_TO_REGION(pScreen,
+ clientClip = RegionFromRects(
nRect, rects, CT_UNSORTED);
if (!clientClip)
return BadAlloc;
@@ -1421,14 +1421,14 @@ SetPictureClipRegion (PicturePtr pPicture,
if (pRegion)
{
type = CT_REGION;
- clientClip = REGION_CREATE (pScreen,
- REGION_EXTENTS(pScreen, pRegion),
- REGION_NUM_RECTS(pRegion));
+ clientClip = RegionCreate(
+ RegionExtents(pRegion),
+ RegionNumRects(pRegion));
if (!clientClip)
return BadAlloc;
- if (!REGION_COPY (pSCreen, clientClip, pRegion))
+ if (!RegionCopy(clientClip, pRegion))
{
- REGION_DESTROY (pScreen, clientClip);
+ RegionDestroy(clientClip);
return BadAlloc;
}
}
@@ -1538,9 +1538,9 @@ CopyPicture (PicturePtr pSrc,
RegionPtr clientClip;
RegionPtr srcClientClip = (RegionPtr)pSrc->clientClip;
- clientClip = REGION_CREATE(pSrc->pDrawable->pScreen,
- REGION_EXTENTS(pSrc->pDrawable->pScreen, srcClientClip),
- REGION_NUM_RECTS(srcClientClip));
+ clientClip = RegionCreate(
+ RegionExtents(srcClientClip),
+ RegionNumRects(srcClientClip));
(*ps->ChangePictureClip)(pDst, CT_REGION, clientClip, 0);
}
break;
diff --git a/nx-X11/programs/Xserver/xfixes/region.c b/nx-X11/programs/Xserver/xfixes/region.c
index cb9e0de9a..0b1865cf0 100755
--- a/nx-X11/programs/Xserver/xfixes/region.c
+++ b/nx-X11/programs/Xserver/xfixes/region.c
@@ -43,20 +43,20 @@ RegionResFree (void * data, XID id)
{
RegionPtr pRegion = (RegionPtr) data;
- REGION_DESTROY (0, pRegion);
+ RegionDestroy(pRegion);
return Success;
}
RegionPtr
XFixesRegionCopy (RegionPtr pRegion)
{
- RegionPtr pNew = REGION_CREATE (0, REGION_EXTENTS(0, pRegion),
- REGION_NUM_RECTS(pRegion));
+ RegionPtr pNew = RegionCreate(RegionExtents(pRegion),
+ RegionNumRects(pRegion));
if (!pNew)
return 0;
- if (!REGION_COPY (0, pNew, pRegion))
+ if (!RegionCopy(pNew, pRegion))
{
- REGION_DESTROY (0, pNew);
+ RegionDestroy(pNew);
return 0;
}
return pNew;
@@ -84,7 +84,7 @@ ProcXFixesCreateRegion (ClientPtr client)
return BadLength;
things >>= 3;
- pRegion = RECTS_TO_REGION(0, things, (xRectangle *) (stuff + 1), CT_UNSORTED);
+ pRegion = RegionFromRects(things, (xRectangle *) (stuff + 1), CT_UNSORTED);
if (!pRegion)
return BadAlloc;
if (!AddResource (stuff->region, RegionResType, (void *) pRegion))
@@ -127,7 +127,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client)
if (pPixmap->drawable.depth != 1)
return BadMatch;
- pRegion = BITMAP_TO_REGION(pPixmap->drawable.pScreen, pPixmap);
+ pRegion = BitmapToRegion(pPixmap->drawable.pScreen, pPixmap);
if (!pRegion)
return BadAlloc;
@@ -229,7 +229,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client)
switch (pGC->clientClipType) {
case CT_PIXMAP:
- pRegion = BITMAP_TO_REGION(pGC->pScreen, (PixmapPtr) pGC->clientClip);
+ pRegion = BitmapToRegion(pGC->pScreen, (PixmapPtr) pGC->clientClip);
if (!pRegion)
return BadAlloc;
break;
@@ -278,7 +278,7 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client)
switch (pPicture->clientClipType) {
case CT_PIXMAP:
- pRegion = BITMAP_TO_REGION(pPicture->pDrawable->pScreen,
+ pRegion = BitmapToRegion(pPicture->pDrawable->pScreen,
(PixmapPtr) pPicture->clientClip);
if (!pRegion)
return BadAlloc;
@@ -353,15 +353,15 @@ ProcXFixesSetRegion (ClientPtr client)
return BadLength;
things >>= 3;
- pNew = RECTS_TO_REGION(0, things, (xRectangle *) (stuff + 1), CT_UNSORTED);
+ pNew = RegionFromRects(things, (xRectangle *) (stuff + 1), CT_UNSORTED);
if (!pNew)
return BadAlloc;
- if (!REGION_COPY (0, pRegion, pNew))
+ if (!RegionCopy(pRegion, pNew))
{
- REGION_DESTROY (0, pNew);
+ RegionDestroy(pNew);
return BadAlloc;
}
- REGION_DESTROY (0, pNew);
+ RegionDestroy(pNew);
return(client->noClientException);
}
@@ -387,7 +387,7 @@ ProcXFixesCopyRegion (ClientPtr client)
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
- if (!REGION_COPY(pScreen, pDestination, pSource))
+ if (!RegionCopy(pDestination, pSource))
return BadAlloc;
return(client->noClientException);
@@ -420,15 +420,15 @@ ProcXFixesCombineRegion (ClientPtr client)
switch (stuff->xfixesReqType) {
case X_XFixesUnionRegion:
- if (!REGION_UNION (0, pDestination, pSource1, pSource2))
+ if (!RegionUnion(pDestination, pSource1, pSource2))
ret = BadAlloc;
break;
case X_XFixesIntersectRegion:
- if (!REGION_INTERSECT (0, pDestination, pSource1, pSource2))
+ if (!RegionIntersect(pDestination, pSource1, pSource2))
ret = BadAlloc;
break;
case X_XFixesSubtractRegion:
- if (!REGION_SUBTRACT (0, pDestination, pSource1, pSource2))
+ if (!RegionSubtract(pDestination, pSource1, pSource2))
ret = BadAlloc;
break;
}
@@ -477,7 +477,7 @@ ProcXFixesInvertRegion (ClientPtr client)
else
bounds.y2 = stuff->y + stuff->height;
- if (!REGION_INVERSE(0, pDestination, pSource, &bounds))
+ if (!RegionInverse(pDestination, pSource, &bounds))
ret = BadAlloc;
if (ret == Success)
@@ -511,7 +511,7 @@ ProcXFixesTranslateRegion (ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, SecurityWriteAccess);
- REGION_TRANSLATE(pScreen, pRegion, stuff->dx, stuff->dy);
+ RegionTranslate(pRegion, stuff->dx, stuff->dy);
return (client->noClientException);
}
@@ -539,7 +539,7 @@ ProcXFixesRegionExtents (ClientPtr client)
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
- REGION_RESET (0, pDestination, REGION_EXTENTS (0, pSource));
+ RegionReset(pDestination, RegionExtents(pSource));
return (client->noClientException);
}
@@ -571,9 +571,9 @@ ProcXFixesFetchRegion (ClientPtr client)
REQUEST_SIZE_MATCH(xXFixesFetchRegionReq);
VERIFY_REGION(pRegion, stuff->region, client, SecurityReadAccess);
- pExtent = REGION_EXTENTS (0, pRegion);
- pBox = REGION_RECTS (pRegion);
- nBox = REGION_NUM_RECTS (pRegion);
+ pExtent = RegionExtents(pRegion);
+ pBox = RegionRects (pRegion);
+ nBox = RegionNumRects (pRegion);
reply = xalloc (sizeof (xXFixesFetchRegionReply) +
nBox * sizeof (xRectangle));
@@ -716,7 +716,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
break;
}
if (stuff->xOff || stuff->yOff)
- REGION_TRANSLATE (0, pRegion, stuff->xOff, stuff->yOff);
+ RegionTranslate(pRegion, stuff->xOff, stuff->yOff);
}
else
{
@@ -739,7 +739,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client)
pDestRegion = &pRegion; /* a NULL region pointer */
}
if (*pDestRegion)
- REGION_DESTROY(pScreen, *pDestRegion);
+ RegionDestroy(*pDestRegion);
*pDestRegion = pRegion;
(*pScreen->SetShape) (pWin);
SendShapeNotify (pWin, stuff->destKind);
@@ -818,8 +818,8 @@ ProcXFixesExpandRegion (ClientPtr client)
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
- nBoxes = REGION_NUM_RECTS(pSource);
- pSrc = REGION_RECTS(pSource);
+ nBoxes = RegionNumRects(pSource);
+ pSrc = RegionRects(pSource);
if (nBoxes)
{
pTmp = xalloc (nBoxes * sizeof (BoxRec));
@@ -832,12 +832,12 @@ ProcXFixesExpandRegion (ClientPtr client)
pTmp[i].y1 = pSrc[i].y1 - stuff->top;
pTmp[i].y2 = pSrc[i].y2 + stuff->bottom;
}
- REGION_EMPTY (pScreen, pDestination);
+ RegionEmpty(pDestination);
for (i = 0; i < nBoxes; i++)
{
RegionRec r;
- REGION_INIT (pScreen, &r, &pTmp[i], 0);
- REGION_UNION (pScreen, pDestination, pDestination, &r);
+ RegionInit(&r, &pTmp[i], 0);
+ RegionUnion(pDestination, pDestination, &r);
}
}
if (ret == Success)
diff --git a/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c b/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c
index 33fa49ae7..7f096683b 100644
--- a/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c
+++ b/nx-X11/programs/Xserver/xkb/ddxFakeMtn.c
@@ -64,12 +64,12 @@ ScreenPtr pScreen, oldScreen;
BoxRec box;
int i;
- if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
+ if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
oldX, oldY, &box)) {
FOR_NSCREENS(i) {
if(i == pScreen->myNum)
continue;
- if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i],
+ if(RegionContainsPoint(&XineramaScreenRegions[i],
oldX, oldY, &box)) {
pScreen = screenInfo.screens[i];
break;
@@ -85,12 +85,12 @@ ScreenPtr pScreen, oldScreen;
oldY= y;
else oldY+= y;
- if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum],
+ if(!RegionContainsPoint(&XineramaScreenRegions[pScreen->myNum],
oldX, oldY, &box)) {
FOR_NSCREENS(i) {
if(i == pScreen->myNum)
continue;
- if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i],
+ if(RegionContainsPoint(&XineramaScreenRegions[i],
oldX, oldY, &box)) {
pScreen = screenInfo.screens[i];
break;