aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiwindow.c156
1 files changed, 78 insertions, 78 deletions
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);