diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-03-16 11:11:43 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-05-02 14:53:06 +0200 |
commit | 63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4 (patch) | |
tree | 3d67994a85c5d8c3a929ab315fbcb617baa6423d /nx-X11/programs/Xserver/include | |
parent | 28ba877803d8383eac282b873b8e0bb50c8db46b (diff) | |
download | nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.gz nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.tar.bz2 nx-libs-63f1fff8fe1e7f94ebc0a72df773c6f77531f7a4.zip |
Rename region macros to eliminate screen argument
This is a huge mechanical patch and a few small fixups required to finish
the job. They were reviewed separately, but because the server does not
build without both pieces, I've merged them together at this time.
The mechanical changes were performed by running the included
'fix-region' script over the whole nx-X11/programs/Xserver tree:
$ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; )
And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.
$ sh ./fix-patch-whitespace
Thanks to Jamey Sharp for the mighty fine sed-generating sed script.
v1: Keith Packard <keithp@keithp.com> (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0)
v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (apply fix-region script to nx-libs)
Diffstat (limited to 'nx-X11/programs/Xserver/include')
-rw-r--r-- | nx-X11/programs/Xserver/include/regionstr.h | 114 |
1 files changed, 57 insertions, 57 deletions
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 */ |