blob: 4da56a52f1f2554af5bedee7232c1de1ed72132a [file] [log] [blame]
Pierre Ossman88903f22016-05-13 15:53:25 +02001
2/***********************************************************
3
4Copyright 1987, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26
27Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
28
29 All Rights Reserved
30
Pierre Ossman3157ed92016-05-13 16:00:10 +020031Permission to use, copy, modify, and distribute this software and its
32documentation for any purpose and without fee is hereby granted,
Pierre Ossman88903f22016-05-13 15:53:25 +020033provided that the above copyright notice appear in all copies and that
Pierre Ossman3157ed92016-05-13 16:00:10 +020034both that copyright notice and this permission notice appear in
Pierre Ossman88903f22016-05-13 15:53:25 +020035supporting documentation, and that the name of Digital not be
36used in advertising or publicity pertaining to distribution of the
Pierre Ossman3157ed92016-05-13 16:00:10 +020037software without specific, written prior permission.
Pierre Ossman88903f22016-05-13 15:53:25 +020038
39DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
40ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
41DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
42ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
43WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
44ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45SOFTWARE.
46
47******************************************************************/
Pierre Ossman88903f22016-05-13 15:53:25 +020048
49#ifndef _X11_XUTIL_H_
50#define _X11_XUTIL_H_
51
52/* You must include <X11/Xlib.h> before including this file */
53#include "Xlib.h"
54
Pierre Ossmanb7afc382016-05-13 16:11:34 +020055/****** Avoid symbol clash with "real" libX11 ******/
56#define XClipBox vncXClipBox
57#define XCreateRegion vncXCreateRegion
58#define XDestroyRegion vncXDestroyRegion
59#define XEmptyRegion vncXEmptyRegion
60#define XEqualRegion vncXEqualRegion
61#define XIntersectRegion vncXIntersectRegion
62#define XOffsetRegion vncXOffsetRegion
63#define XPointInRegion vncXPointInRegion
64#define XPolygonRegion vncXPolygonRegion
65#define XRectInRegion vncXRectInRegion
66#define XShrinkRegion vncXShrinkRegion
67#define XSubtractRegion vncXSubtractRegion
68#define XUnionRectWithRegion vncXUnionRectWithRegion
69#define XUnionRegion vncXUnionRegion
70#define XXorRegion vncXXorRegion
Pierre Ossman3157ed92016-05-13 16:00:10 +020071
Pierre Ossman88903f22016-05-13 15:53:25 +020072/*
Pierre Ossman3157ed92016-05-13 16:00:10 +020073 * opaque reference to Region data type
Pierre Ossman88903f22016-05-13 15:53:25 +020074 */
Pierre Ossman3157ed92016-05-13 16:00:10 +020075typedef struct _XRegion *Region;
Pierre Ossman88903f22016-05-13 15:53:25 +020076
77/* Return values from XRectInRegion() */
Pierre Ossman3157ed92016-05-13 16:00:10 +020078
Pierre Ossman88903f22016-05-13 15:53:25 +020079#define RectangleOut 0
80#define RectangleIn 1
81#define RectanglePart 2
82
83extern int XClipBox(
Pierre Ossman88903f22016-05-13 15:53:25 +020084 Region /* r */,
85 XRectangle* /* rect_return */
Pierre Ossman88903f22016-05-13 15:53:25 +020086);
87
88extern Region XCreateRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020089 void
Pierre Ossman88903f22016-05-13 15:53:25 +020090);
91
Pierre Ossman88903f22016-05-13 15:53:25 +020092extern int XDestroyRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020093 Region /* r */
Pierre Ossman88903f22016-05-13 15:53:25 +020094);
95
96extern int XEmptyRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020097 Region /* r */
Pierre Ossman88903f22016-05-13 15:53:25 +020098);
99
100extern int XEqualRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200101 Region /* r1 */,
102 Region /* r2 */
Pierre Ossman88903f22016-05-13 15:53:25 +0200103);
104
105extern int XIntersectRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200106 Region /* sra */,
107 Region /* srb */,
108 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200109);
110
111extern int XOffsetRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200112 Region /* r */,
113 int /* dx */,
114 int /* dy */
Pierre Ossman88903f22016-05-13 15:53:25 +0200115);
116
117extern Bool XPointInRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200118 Region /* r */,
119 int /* x */,
120 int /* y */
Pierre Ossman88903f22016-05-13 15:53:25 +0200121);
122
123extern Region XPolygonRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200124 XPoint* /* points */,
125 int /* n */,
126 int /* fill_rule */
Pierre Ossman88903f22016-05-13 15:53:25 +0200127);
128
129extern int XRectInRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200130 Region /* r */,
131 int /* x */,
132 int /* y */,
133 unsigned int /* width */,
134 unsigned int /* height */
Pierre Ossman88903f22016-05-13 15:53:25 +0200135);
136
137extern int XShrinkRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200138 Region /* r */,
139 int /* dx */,
140 int /* dy */
Pierre Ossman88903f22016-05-13 15:53:25 +0200141);
142
143extern int XSubtractRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200144 Region /* sra */,
145 Region /* srb */,
146 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200147);
148
149extern int XUnionRectWithRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200150 XRectangle* /* rectangle */,
151 Region /* src_region */,
152 Region /* dest_region_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200153);
154
155extern int XUnionRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200156 Region /* sra */,
157 Region /* srb */,
158 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200159);
160
161extern int XXorRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200162 Region /* sra */,
163 Region /* srb */,
164 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200165);
166
Pierre Ossman3157ed92016-05-13 16:00:10 +0200167#endif /* _X11_XUTIL_H_ */