Pierre Ossman | 88903f2 | 2016-05-13 15:53:25 +0200 | [diff] [blame^] | 1 | /* $Xorg: Xutil.h,v 1.8 2001/02/09 02:03:39 xorgcvs Exp $ */ |
| 2 | |
| 3 | /*********************************************************** |
| 4 | |
| 5 | Copyright 1987, 1998 The Open Group |
| 6 | |
| 7 | Permission to use, copy, modify, distribute, and sell this software and its |
| 8 | documentation for any purpose is hereby granted without fee, provided that |
| 9 | the above copyright notice appear in all copies and that both that |
| 10 | copyright notice and this permission notice appear in supporting |
| 11 | documentation. |
| 12 | |
| 13 | The above copyright notice and this permission notice shall be included in |
| 14 | all copies or substantial portions of the Software. |
| 15 | |
| 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN |
| 20 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | |
| 23 | Except as contained in this notice, the name of The Open Group shall not be |
| 24 | used in advertising or otherwise to promote the sale, use or other dealings |
| 25 | in this Software without prior written authorization from The Open Group. |
| 26 | |
| 27 | |
| 28 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. |
| 29 | |
| 30 | All Rights Reserved |
| 31 | |
| 32 | Permission to use, copy, modify, and distribute this software and its |
| 33 | documentation for any purpose and without fee is hereby granted, |
| 34 | provided that the above copyright notice appear in all copies and that |
| 35 | both that copyright notice and this permission notice appear in |
| 36 | supporting documentation, and that the name of Digital not be |
| 37 | used in advertising or publicity pertaining to distribution of the |
| 38 | software without specific, written prior permission. |
| 39 | |
| 40 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING |
| 41 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL |
| 42 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR |
| 43 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, |
| 44 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, |
| 45 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
| 46 | SOFTWARE. |
| 47 | |
| 48 | ******************************************************************/ |
| 49 | /* $XFree86: xc/lib/X11/Xutil.h,v 3.4 2001/12/14 19:54:10 dawes Exp $ */ |
| 50 | |
| 51 | #ifndef _X11_XUTIL_H_ |
| 52 | #define _X11_XUTIL_H_ |
| 53 | |
| 54 | /* You must include <X11/Xlib.h> before including this file */ |
| 55 | #include "Xlib.h" |
| 56 | |
| 57 | /* |
| 58 | * opaque reference to Region data type |
| 59 | */ |
| 60 | typedef struct _XRegion *Region; |
| 61 | |
| 62 | /* Return values from XRectInRegion() */ |
| 63 | |
| 64 | #define RectangleOut 0 |
| 65 | #define RectangleIn 1 |
| 66 | #define RectanglePart 2 |
| 67 | |
| 68 | extern int XClipBox( |
| 69 | #if NeedFunctionPrototypes |
| 70 | Region /* r */, |
| 71 | XRectangle* /* rect_return */ |
| 72 | #endif |
| 73 | ); |
| 74 | |
| 75 | extern Region XCreateRegion( |
| 76 | #if NeedFunctionPrototypes |
| 77 | void |
| 78 | #endif |
| 79 | ); |
| 80 | |
| 81 | extern const char *XDefaultString (void); |
| 82 | |
| 83 | extern int XDestroyRegion( |
| 84 | #if NeedFunctionPrototypes |
| 85 | Region /* r */ |
| 86 | #endif |
| 87 | ); |
| 88 | |
| 89 | extern int XEmptyRegion( |
| 90 | #if NeedFunctionPrototypes |
| 91 | Region /* r */ |
| 92 | #endif |
| 93 | ); |
| 94 | |
| 95 | extern int XEqualRegion( |
| 96 | #if NeedFunctionPrototypes |
| 97 | Region /* r1 */, |
| 98 | Region /* r2 */ |
| 99 | #endif |
| 100 | ); |
| 101 | |
| 102 | extern int XIntersectRegion( |
| 103 | #if NeedFunctionPrototypes |
| 104 | Region /* sra */, |
| 105 | Region /* srb */, |
| 106 | Region /* dr_return */ |
| 107 | #endif |
| 108 | ); |
| 109 | |
| 110 | extern int XOffsetRegion( |
| 111 | #if NeedFunctionPrototypes |
| 112 | Region /* r */, |
| 113 | int /* dx */, |
| 114 | int /* dy */ |
| 115 | #endif |
| 116 | ); |
| 117 | |
| 118 | extern Bool XPointInRegion( |
| 119 | #if NeedFunctionPrototypes |
| 120 | Region /* r */, |
| 121 | int /* x */, |
| 122 | int /* y */ |
| 123 | #endif |
| 124 | ); |
| 125 | |
| 126 | extern Region XPolygonRegion( |
| 127 | #if NeedFunctionPrototypes |
| 128 | XPoint* /* points */, |
| 129 | int /* n */, |
| 130 | int /* fill_rule */ |
| 131 | #endif |
| 132 | ); |
| 133 | |
| 134 | extern int XRectInRegion( |
| 135 | #if NeedFunctionPrototypes |
| 136 | Region /* r */, |
| 137 | int /* x */, |
| 138 | int /* y */, |
| 139 | unsigned int /* width */, |
| 140 | unsigned int /* height */ |
| 141 | #endif |
| 142 | ); |
| 143 | |
| 144 | extern int XShrinkRegion( |
| 145 | #if NeedFunctionPrototypes |
| 146 | Region /* r */, |
| 147 | int /* dx */, |
| 148 | int /* dy */ |
| 149 | #endif |
| 150 | ); |
| 151 | |
| 152 | extern int XSubtractRegion( |
| 153 | #if NeedFunctionPrototypes |
| 154 | Region /* sra */, |
| 155 | Region /* srb */, |
| 156 | Region /* dr_return */ |
| 157 | #endif |
| 158 | ); |
| 159 | |
| 160 | extern int XUnionRectWithRegion( |
| 161 | #if NeedFunctionPrototypes |
| 162 | XRectangle* /* rectangle */, |
| 163 | Region /* src_region */, |
| 164 | Region /* dest_region_return */ |
| 165 | #endif |
| 166 | ); |
| 167 | |
| 168 | extern int XUnionRegion( |
| 169 | #if NeedFunctionPrototypes |
| 170 | Region /* sra */, |
| 171 | Region /* srb */, |
| 172 | Region /* dr_return */ |
| 173 | #endif |
| 174 | ); |
| 175 | |
| 176 | extern int XXorRegion( |
| 177 | #if NeedFunctionPrototypes |
| 178 | Region /* sra */, |
| 179 | Region /* srb */, |
| 180 | Region /* dr_return */ |
| 181 | #endif |
| 182 | ); |
| 183 | |
| 184 | #endif /* _XUTIL_H_ */ |