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