1 /* 2 Copyright 2013-2017 Jay Sorg 3 4 Permission to use, copy, modify, distribute, and sell this software and its 5 documentation for any purpose is hereby granted without fee, provided that 6 the above copyright notice appear in all copies and that both that 7 copyright notice and this permission notice appear in supporting 8 documentation. 9 10 The above copyright notice and this permission notice shall be included in 11 all copies or substantial portions of the Software. 12 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 17 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 20 to deal with regions changing in xorg versions 21 22 */ 23 24 #ifndef __RDPREG_H 25 #define __RDPREG_H 26 27 #include <xorg-server.h> 28 #include <xorgVersion.h> 29 #include <xf86.h> 30 31 extern _X_EXPORT Bool 32 rdpRegionCopy(RegionPtr dst, RegionPtr src); 33 extern _X_EXPORT void 34 rdpRegionTranslate(RegionPtr pReg, int x, int y); 35 extern _X_EXPORT Bool 36 rdpRegionNotEmpty(RegionPtr pReg); 37 extern _X_EXPORT Bool 38 rdpRegionIntersect(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2); 39 extern _X_EXPORT int 40 rdpRegionContainsRect(RegionPtr region, BoxPtr prect); 41 extern _X_EXPORT void 42 rdpRegionInit(RegionPtr pReg, BoxPtr rect, int size); 43 extern _X_EXPORT void 44 rdpRegionUninit(RegionPtr pReg); 45 extern _X_EXPORT RegionPtr 46 rdpRegionFromRects(int nrects, xRectanglePtr prect, int ctype); 47 extern _X_EXPORT void 48 rdpRegionDestroy(RegionPtr pReg); 49 extern _X_EXPORT RegionPtr 50 rdpRegionCreate(BoxPtr rect, int size); 51 extern _X_EXPORT Bool 52 rdpRegionUnion(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2); 53 extern _X_EXPORT Bool 54 rdpRegionSubtract(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2); 55 extern _X_EXPORT Bool 56 rdpRegionInverse(RegionPtr newReg, RegionPtr reg1, BoxPtr invRect); 57 extern _X_EXPORT BoxPtr 58 rdpRegionExtents(RegionPtr pReg); 59 extern _X_EXPORT void 60 rdpRegionReset(RegionPtr pReg, BoxPtr pBox); 61 extern _X_EXPORT Bool 62 rdpRegionBreak(RegionPtr pReg); 63 extern _X_EXPORT void 64 rdpRegionUnionRect(RegionPtr pReg, BoxPtr prect); 65 extern _X_EXPORT int 66 rdpRegionPixelCount(RegionPtr pReg); 67 68 #endif 69