diff options
Diffstat (limited to 'mi/miexpose.c')
-rw-r--r-- | mi/miexpose.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/mi/miexpose.c b/mi/miexpose.c index 088149be7..2fd070d9e 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -175,21 +175,21 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (pGC->subWindowMode == IncludeInferiors) { prgnSrcClip = NotClippedByChildren (pSrcWin); - if ((RECT_IN_REGION(pscr, prgnSrcClip, &TsrcBox)) == rgnIN) + if ((RegionContainsRect(prgnSrcClip, &TsrcBox)) == rgnIN) { - REGION_DESTROY(pscr, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } } else { - if ((RECT_IN_REGION(pscr, &pSrcWin->clipList, &TsrcBox)) == rgnIN) + if ((RegionContainsRect(&pSrcWin->clipList, &TsrcBox)) == rgnIN) return NULL; prgnSrcClip = &rgnSrcRec; - REGION_NULL(pscr, prgnSrcClip); - REGION_COPY(pscr, prgnSrcClip, &pSrcWin->clipList); + RegionNull(prgnSrcClip); + RegionCopy(prgnSrcClip, &pSrcWin->clipList); } - REGION_TRANSLATE(pscr, prgnSrcClip, + RegionTranslate(prgnSrcClip, -pSrcDrawable->x, -pSrcDrawable->y); } else @@ -206,7 +206,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, box.x2 = pSrcDrawable->width; box.y2 = pSrcDrawable->height; prgnSrcClip = &rgnSrcRec; - REGION_INIT(pscr, prgnSrcClip, &box, 1); + RegionInit(prgnSrcClip, &box, 1); pSrcWin = NULL; } @@ -223,11 +223,11 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, else { prgnDstClip = &rgnDstRec; - REGION_NULL(pscr, prgnDstClip); - REGION_COPY(pscr, prgnDstClip, + RegionNull(prgnDstClip); + RegionCopy(prgnDstClip, &((WindowPtr)pDstDrawable)->clipList); } - REGION_TRANSLATE(pscr, prgnDstClip, + RegionTranslate(prgnDstClip, -pDstDrawable->x, -pDstDrawable->y); } else @@ -239,24 +239,24 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, box.x2 = pDstDrawable->width; box.y2 = pDstDrawable->height; prgnDstClip = &rgnDstRec; - REGION_INIT(pscr, prgnDstClip, &box, 1); + RegionInit(prgnDstClip, &box, 1); } /* drawable-relative source region */ - REGION_INIT(pscr, &rgnExposed, &srcBox, 1); + RegionInit(&rgnExposed, &srcBox, 1); /* now get the hidden parts of the source box*/ - REGION_SUBTRACT(pscr, &rgnExposed, &rgnExposed, prgnSrcClip); + RegionSubtract(&rgnExposed, &rgnExposed, prgnSrcClip); /* move them over the destination */ - REGION_TRANSLATE(pscr, &rgnExposed, dstx-srcx, dsty-srcy); + RegionTranslate(&rgnExposed, dstx-srcx, dsty-srcy); /* intersect with visible areas of dest */ - REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, prgnDstClip); + RegionIntersect(&rgnExposed, &rgnExposed, prgnDstClip); /* intersect with client clip region. */ if (pGC->clientClipType == CT_REGION) - REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, pGC->clientClip); + RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip); /* * If we have LOTS of rectangles, we decide to take the extents @@ -266,7 +266,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, * for windows. */ extents = pGC->graphicsExposures && - (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) && + (RegionNumRects(&rgnExposed) > RECTLIMIT) && (pDstDrawable->type != DRAWABLE_PIXMAP); if (pSrcWin) { @@ -278,13 +278,13 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, * exposed region will undo all our work! */ if (extents && pSrcWin && region && - (RECT_IN_REGION(pscr, region, &srcBox) != rgnIN)) + (RegionContainsRect(region, &srcBox) != rgnIN)) extents = FALSE; } if (extents) { - expBox = *REGION_EXTENTS(pscr, &rgnExposed); - REGION_RESET(pscr, &rgnExposed, &expBox); + expBox = *RegionExtents(&rgnExposed); + RegionReset(&rgnExposed, &expBox); } if ((pDstDrawable->type != DRAWABLE_PIXMAP) && (((WindowPtr)pDstDrawable)->backgroundState != None)) @@ -292,52 +292,52 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, WindowPtr pWin = (WindowPtr)pDstDrawable; /* make the exposed area screen-relative */ - REGION_TRANSLATE(pscr, &rgnExposed, + RegionTranslate(&rgnExposed, pDstDrawable->x, pDstDrawable->y); if (extents) { /* miPaintWindow doesn't clip, so we have to */ - REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList); + RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList); } miPaintWindow((WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND); if (extents) { - REGION_RESET(pscr, &rgnExposed, &expBox); + RegionReset(&rgnExposed, &expBox); } else - REGION_TRANSLATE(pscr, &rgnExposed, + RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y); } if (prgnDstClip == &rgnDstRec) { - REGION_UNINIT(pscr, prgnDstClip); + RegionUninit(prgnDstClip); } else if (prgnDstClip != prgnSrcClip) { - REGION_DESTROY(pscr, prgnDstClip); + RegionDestroy(prgnDstClip); } if (prgnSrcClip == &rgnSrcRec) { - REGION_UNINIT(pscr, prgnSrcClip); + RegionUninit(prgnSrcClip); } else { - REGION_DESTROY(pscr, prgnSrcClip); + RegionDestroy(prgnSrcClip); } if (pGC->graphicsExposures) { /* don't look */ - RegionPtr exposed = REGION_CREATE(pscr, NullBox, 0); + RegionPtr exposed = RegionCreate(NullBox, 0); *exposed = rgnExposed; return exposed; } else { - REGION_UNINIT(pscr, &rgnExposed); + RegionUninit(&rgnExposed); return NULL; } } @@ -348,7 +348,7 @@ void miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, int major, int minor) { - if (pRgn && !REGION_NIL(pRgn)) + if (pRgn && !RegionNil(pRgn)) { xEvent *pEvent; xEvent *pe; @@ -356,8 +356,8 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, int i; int numRects; - numRects = REGION_NUM_RECTS(pRgn); - pBox = REGION_RECTS(pRgn); + numRects = RegionNumRects(pRgn); + pBox = RegionRects(pRgn); if(!(pEvent = malloc(numRects * sizeof(xEvent)))) return; pe = pEvent; @@ -401,8 +401,8 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) xEvent *pEvent, *pe; int i; - pBox = REGION_RECTS(pRgn); - numRects = REGION_NUM_RECTS(pRgn); + pBox = RegionRects(pRgn); + numRects = RegionNumRects(pRgn); if(!(pEvent = calloc(1, numRects * sizeof(xEvent)))) return; @@ -457,8 +457,8 @@ void miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { RegionPtr exposures = prgn; - if ((prgn && !REGION_NIL(prgn)) || - (exposures && !REGION_NIL(exposures)) || other_exposed) + if ((prgn && !RegionNil(prgn)) || + (exposures && !RegionNil(exposures)) || other_exposed) { RegionRec expRec; int clientInterested; @@ -471,15 +471,15 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { if (exposures) { - REGION_UNION(pWin->drawable.pScreen, other_exposed, + RegionUnion(other_exposed, exposures, other_exposed); if (exposures != prgn) - REGION_DESTROY(pWin->drawable.pScreen, exposures); + RegionDestroy(exposures); } exposures = other_exposed; } - if (clientInterested && exposures && (REGION_NUM_RECTS(exposures) > RECTLIMIT)) + if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { /* * If we have LOTS of rectangles, we decide to take the extents @@ -489,34 +489,34 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) */ BoxRec box; - box = *REGION_EXTENTS( pWin->drawable.pScreen, exposures); + box = *RegionExtents(exposures); if (exposures == prgn) { exposures = &expRec; - REGION_INIT( pWin->drawable.pScreen, exposures, &box, 1); - REGION_RESET( pWin->drawable.pScreen, prgn, &box); + RegionInit(exposures, &box, 1); + RegionReset(prgn, &box); } else { - REGION_RESET( pWin->drawable.pScreen, exposures, &box); - REGION_UNION( pWin->drawable.pScreen, prgn, prgn, exposures); + RegionReset(exposures, &box); + RegionUnion(prgn, prgn, exposures); } /* miPaintWindow doesn't clip, so we have to */ - REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList); + RegionIntersect(prgn, prgn, &pWin->clipList); } - if (prgn && !REGION_NIL(prgn)) + if (prgn && !RegionNil(prgn)) miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !REGION_NIL(exposures)) + if (clientInterested && exposures && !RegionNil(exposures)) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); if (exposures == &expRec) { - REGION_UNINIT( pWin->drawable.pScreen, exposures); + RegionUninit(exposures); } else if (exposures && exposures != prgn && exposures != other_exposed) - REGION_DESTROY( pWin->drawable.pScreen, exposures); + RegionDestroy(exposures); if (prgn) - REGION_EMPTY( pWin->drawable.pScreen, prgn); + RegionEmpty(prgn); } else if (exposures && exposures != prgn) - REGION_DESTROY( pWin->drawable.pScreen, exposures); + RegionDestroy(exposures); } #ifdef ROOTLESS @@ -647,7 +647,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; } - prect = malloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); + prect = malloc(RegionNumRects(prgn) * sizeof(xRectangle)); if (!prect) return; @@ -661,8 +661,8 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) ChangeGC (NullClient, pGC, gcmask, gcval); ValidateGC (drawable, pGC); - numRects = REGION_NUM_RECTS(prgn); - pbox = REGION_RECTS(prgn); + numRects = RegionNumRects(prgn); + pbox = RegionRects(prgn); for (i= numRects; --i >= 0; pbox++, prect++) { prect->x = pbox->x1 - draw_x_off; |