aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xext')
-rw-r--r--nx-X11/programs/Xserver/Xext/Imakefile3
-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/sampleEVI.c4
-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/xcmisc.c4
-rw-r--r--nx-X11/programs/Xserver/Xext/xtest.c4
11 files changed, 126 insertions, 133 deletions
diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile
index eb4588e37..199e59f1d 100644
--- a/nx-X11/programs/Xserver/Xext/Imakefile
+++ b/nx-X11/programs/Xserver/Xext/Imakefile
@@ -161,7 +161,8 @@ XF86INCLUDES = -I$(XF86COMSRC)
#endif
INCLUDES = -I. -I../include -I$(XINCLUDESRC) -I$(EXTINCSRC) \
$(PNRXINCLUDES) $(XF86INCLUDES) \
- $(FONTCACHEINCLUDES) $(DMXINCLUDES)
+ $(FONTCACHEINCLUDES) $(DMXINCLUDES) \
+ `pkg-config --cflags-only-I pixman-1`
LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln
#if defined(NXAgentServer) && NXAgentServer
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/sampleEVI.c b/nx-X11/programs/Xserver/Xext/sampleEVI.c
index 598992742..961c108f9 100644
--- a/nx-X11/programs/Xserver/Xext/sampleEVI.c
+++ b/nx-X11/programs/Xserver/Xext/sampleEVI.c
@@ -37,11 +37,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "EVIstruct.h"
#include "scrnintstr.h"
-#if HAVE_STDINT_H
#include <stdint.h>
-#elif !defined(UINT32_MAX)
-#define UINT32_MAX 0xffffffffU
-#endif
static int sampleGetVisualInfo(
VisualID32 *visual,
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/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c
index 1d7ad0e09..e353d65ac 100644
--- a/nx-X11/programs/Xserver/Xext/xcmisc.c
+++ b/nx-X11/programs/Xserver/Xext/xcmisc.c
@@ -44,11 +44,7 @@ from The Open Group.
#include <nx-X11/extensions/xcmiscstr.h>
#include "modinit.h"
-#if HAVE_STDINT_H
#include <stdint.h>
-#elif !defined(UINT32_MAX)
-#define UINT32_MAX 0xffffffffU
-#endif
#if 0
static unsigned char XCMiscCode;
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];