1 /************************************************************
3 Copyright (c) 1989 X Consortium
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the name of the X Consortium shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from the X Consortium.
26 ********************************************************/
28 /* $XConsortium: shape.h,v 1.17 94/04/17 20:11:23 rws Exp $ */
33 #include <X11/Xfuncproto.h>
35 #define X_ShapeQueryVersion 0
36 #define X_ShapeRectangles 1
38 #define X_ShapeCombine 3
39 #define X_ShapeOffset 4
40 #define X_ShapeQueryExtents 5
41 #define X_ShapeSelectInput 6
42 #define X_ShapeInputSelected 7
43 #define X_ShapeGetRectangles 8
47 #define ShapeIntersect 2
48 #define ShapeSubtract 3
51 #define ShapeBounding 0
54 #define ShapeNotifyMask (1L << 0)
57 #define ShapeNumberEvents (ShapeNotify + 1)
59 #ifndef _SHAPE_SERVER_
61 int type; /* of event */
62 unsigned long serial; /* # of last request processed by server */
63 Bool send_event; /* true if this came frome a SendEvent request */
64 Display *display; /* Display the event was read from */
65 Window window; /* window of event */
66 int kind; /* ShapeBounding or ShapeClip */
67 int x, y; /* extents of new region */
68 unsigned width, height;
69 Time time; /* server timestamp when region changed */
70 Bool shaped; /* true if the region exists */
75 extern Bool XShapeQueryExtension (
76 #if NeedFunctionPrototypes
77 Display* /* display */,
78 int* /* event_base */,
83 extern Status XShapeQueryVersion (
84 #if NeedFunctionPrototypes
85 Display* /* display */,
86 int* /* major_version */,
87 int* /* minor_version */
91 extern void XShapeCombineRegion (
92 #if NeedFunctionPrototypes
93 Display* /* display */,
103 extern void XShapeCombineRectangles (
104 #if NeedFunctionPrototypes
105 Display* /* display */,
110 XRectangle* /* rectangles */,
117 extern void XShapeCombineMask (
118 #if NeedFunctionPrototypes
119 Display* /* display */,
129 extern void XShapeCombineShape (
130 #if NeedFunctionPrototypes
131 Display* /* display */,
142 extern void XShapeOffsetShape (
143 #if NeedFunctionPrototypes
144 Display* /* display */,
152 extern Status XShapeQueryExtents (
153 #if NeedFunctionPrototypes
154 Display* /* display */,
156 Bool* /* bounding_shaped */,
157 int* /* x_bounding */,
158 int* /* y_bounding */,
159 unsigned int* /* w_bounding */,
160 unsigned int* /* h_bounding */,
161 Bool* /* clip_shaped */,
164 unsigned int* /* w_clip */,
165 unsigned int* /* h_clip */
169 extern void XShapeSelectInput (
170 #if NeedFunctionPrototypes
171 Display* /* display */,
173 unsigned long /* mask */
177 extern unsigned long XShapeInputSelected (
178 #if NeedFunctionPrototypes
179 Display* /* display */,
184 extern XRectangle *XShapeGetRectangles (
185 #if NeedFunctionPrototypes
186 Display* /* display */,
196 #endif /* _SHAPE_SERVER_ */
198 #endif /* _SHAPE_H_ */