diff options
author | Mihai Moldovan <ionic@ionic.de> | 2016-05-13 06:19:21 +0200 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2016-05-13 06:19:21 +0200 |
commit | aba2a534f630f5b65a53e0ea7cdba17b77263f87 (patch) | |
tree | 8c4e2be57984a1d9e6143944d080e19f6c3049ec /nx-X11/programs/Xserver/xfixes/region.c | |
parent | 6c6b6b962654ac3c15d27aafbe583ee74e4f2266 (diff) | |
parent | 52dc49607e244c0e39b5d7cbdb8b41755f078aac (diff) | |
download | nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.tar.gz nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.tar.bz2 nx-libs-aba2a534f630f5b65a53e0ea7cdba17b77263f87.zip |
Merge branch 'sunweaver-pr/nxagent-no-compiler-warnings' into arctica-3.6.x
Attributes GH PR #102: https://github.com/ArcticaProject/nx-libs/pull/102
Diffstat (limited to 'nx-X11/programs/Xserver/xfixes/region.c')
-rwxr-xr-x | nx-X11/programs/Xserver/xfixes/region.c | 60 |
1 files changed, 30 insertions, 30 deletions
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) |