blob: f1d333efd0499af5fd628c9bc0dadea13507b956 [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 Ossman3157ed92016-05-13 16:00:10 +020055
Pierre Ossman88903f22016-05-13 15:53:25 +020056/*
Pierre Ossman3157ed92016-05-13 16:00:10 +020057 * opaque reference to Region data type
Pierre Ossman88903f22016-05-13 15:53:25 +020058 */
Pierre Ossman3157ed92016-05-13 16:00:10 +020059typedef struct _XRegion *Region;
Pierre Ossman88903f22016-05-13 15:53:25 +020060
61/* Return values from XRectInRegion() */
Pierre Ossman3157ed92016-05-13 16:00:10 +020062
Pierre Ossman88903f22016-05-13 15:53:25 +020063#define RectangleOut 0
64#define RectangleIn 1
65#define RectanglePart 2
66
67extern int XClipBox(
Pierre Ossman88903f22016-05-13 15:53:25 +020068 Region /* r */,
69 XRectangle* /* rect_return */
Pierre Ossman88903f22016-05-13 15:53:25 +020070);
71
72extern Region XCreateRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020073 void
Pierre Ossman88903f22016-05-13 15:53:25 +020074);
75
Pierre Ossman88903f22016-05-13 15:53:25 +020076extern int XDestroyRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020077 Region /* r */
Pierre Ossman88903f22016-05-13 15:53:25 +020078);
79
80extern int XEmptyRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020081 Region /* r */
Pierre Ossman88903f22016-05-13 15:53:25 +020082);
83
84extern int XEqualRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020085 Region /* r1 */,
86 Region /* r2 */
Pierre Ossman88903f22016-05-13 15:53:25 +020087);
88
89extern int XIntersectRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020090 Region /* sra */,
91 Region /* srb */,
92 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +020093);
94
95extern int XOffsetRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +020096 Region /* r */,
97 int /* dx */,
98 int /* dy */
Pierre Ossman88903f22016-05-13 15:53:25 +020099);
100
101extern Bool XPointInRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200102 Region /* r */,
103 int /* x */,
104 int /* y */
Pierre Ossman88903f22016-05-13 15:53:25 +0200105);
106
107extern Region XPolygonRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200108 XPoint* /* points */,
109 int /* n */,
110 int /* fill_rule */
Pierre Ossman88903f22016-05-13 15:53:25 +0200111);
112
113extern int XRectInRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200114 Region /* r */,
115 int /* x */,
116 int /* y */,
117 unsigned int /* width */,
118 unsigned int /* height */
Pierre Ossman88903f22016-05-13 15:53:25 +0200119);
120
121extern int XShrinkRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200122 Region /* r */,
123 int /* dx */,
124 int /* dy */
Pierre Ossman88903f22016-05-13 15:53:25 +0200125);
126
127extern int XSubtractRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200128 Region /* sra */,
129 Region /* srb */,
130 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200131);
132
133extern int XUnionRectWithRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200134 XRectangle* /* rectangle */,
135 Region /* src_region */,
136 Region /* dest_region_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200137);
138
139extern int XUnionRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200140 Region /* sra */,
141 Region /* srb */,
142 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200143);
144
145extern int XXorRegion(
Pierre Ossman88903f22016-05-13 15:53:25 +0200146 Region /* sra */,
147 Region /* srb */,
148 Region /* dr_return */
Pierre Ossman88903f22016-05-13 15:53:25 +0200149);
150
Pierre Ossman3157ed92016-05-13 16:00:10 +0200151#endif /* _X11_XUTIL_H_ */