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: shapestr.h,v 1.13 94/04/17 20:11:24 rws Exp $ */
34 * Protocol requests constants and alignment values
35 * These would really be in SHAPE's X.h and Xproto.h equivalents
43 #define SHAPENAME "SHAPE"
45 #define SHAPE_MAJOR_VERSION 1 /* current version numbers */
46 #define SHAPE_MINOR_VERSION 0
48 typedef struct _ShapeQueryVersion {
49 CARD8 reqType; /* always ShapeReqCode */
50 CARD8 shapeReqType; /* always X_ShapeQueryVersion */
52 } xShapeQueryVersionReq;
53 #define sz_xShapeQueryVersionReq 4
56 BYTE type; /* X_Reply */
57 CARD8 unused; /* not used */
58 CARD16 sequenceNumber B16;
60 CARD16 majorVersion B16; /* major version of SHAPE protocol */
61 CARD16 minorVersion B16; /* minor version of SHAPE protocol */
67 } xShapeQueryVersionReply;
68 #define sz_xShapeQueryVersionReply 32
70 typedef struct _ShapeRectangles {
71 CARD8 reqType; /* always ShapeReqCode */
72 CARD8 shapeReqType; /* always X_ShapeRectangles */
74 CARD8 op; /* Set, ... */
75 CARD8 destKind; /* ShapeBounding or ShapeClip */
76 CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
77 CARD8 pad0; /* not used */
81 } xShapeRectanglesReq; /* followed by xRects */
82 #define sz_xShapeRectanglesReq 16
84 typedef struct _ShapeMask {
85 CARD8 reqType; /* always ShapeReqCode */
86 CARD8 shapeReqType; /* always X_ShapeMask */
89 CARD8 op; /* Set, ... */
90 CARD8 destKind; /* ShapeBounding or ShapeClip */
91 CARD16 junk B16; /* not used */
96 CARD32 src B32; /* 1 bit pixmap */
98 #define sz_xShapeMaskReq 20
100 typedef struct _ShapeCombine {
101 CARD8 reqType; /* always ShapeReqCode */
102 CARD8 shapeReqType; /* always X_ShapeCombine */
104 CARD8 op; /* Set, ... */
105 CARD8 destKind; /* ShapeBounding or ShapeClip */
106 CARD8 srcKind; /* ShapeBounding or ShapeClip */
107 CARD8 junk; /* not used */
113 #define sz_xShapeCombineReq 20
115 typedef struct _ShapeOffset {
116 CARD8 reqType; /* always ShapeReqCode */
117 CARD8 shapeReqType; /* always X_ShapeOffset */
119 CARD8 destKind; /* ShapeBounding or ShapeClip */
120 CARD8 junk1; /* not used */
121 CARD16 junk2 B16; /* not used */
126 #define sz_xShapeOffsetReq 16
128 typedef struct _ShapeQueryExtents {
129 CARD8 reqType; /* always ShapeReqCode */
130 CARD8 shapeReqType; /* always X_ShapeQueryExtents */
133 } xShapeQueryExtentsReq;
134 #define sz_xShapeQueryExtentsReq 8
137 BYTE type; /* X_Reply */
138 CARD8 unused; /* not used */
139 CARD16 sequenceNumber B16;
140 CARD32 length B32; /* 0 */
141 CARD8 boundingShaped; /* window has bounding shape */
142 CARD8 clipShaped; /* window has clip shape */
144 INT16 xBoundingShape B16; /* extents of bounding shape */
145 INT16 yBoundingShape B16;
146 CARD16 widthBoundingShape B16;
147 CARD16 heightBoundingShape B16;
148 INT16 xClipShape B16; /* extents of clip shape */
149 INT16 yClipShape B16;
150 CARD16 widthClipShape B16;
151 CARD16 heightClipShape B16;
153 } xShapeQueryExtentsReply;
154 #define sz_xShapeQueryExtentsReply 32
156 typedef struct _ShapeSelectInput {
157 CARD8 reqType; /* always ShapeReqCode */
158 CARD8 shapeReqType; /* always X_ShapeSelectInput */
161 BYTE enable; /* xTrue -> send events */
164 } xShapeSelectInputReq;
165 #define sz_xShapeSelectInputReq 12
167 typedef struct _ShapeNotify {
168 BYTE type; /* always eventBase + ShapeNotify */
169 BYTE kind; /* either ShapeBounding or ShapeClip */
170 CARD16 sequenceNumber B16;
173 INT16 y B16; /* extents of new shape */
176 Time time B32; /* time of change */
177 BYTE shaped; /* set when a shape actual exists */
183 #define sz_xShapeNotifyEvent 32
185 typedef struct _ShapeInputSelected {
186 CARD8 reqType; /* always ShapeReqCode */
187 CARD8 shapeReqType; /* always X_ShapeInputSelected */
190 } xShapeInputSelectedReq;
191 #define sz_xShapeInputSelectedReq 8
194 BYTE type; /* X_Reply */
195 CARD8 enabled; /* current status */
196 CARD16 sequenceNumber B16;
197 CARD32 length B32; /* 0 */
198 CARD32 pad1 B32; /* unused */
204 } xShapeInputSelectedReply;
205 #define sz_xShapeInputSelectedReply 32
207 typedef struct _ShapeGetRectangles {
208 CARD8 reqType; /* always ShapeReqCode */
209 CARD8 shapeReqType; /* always X_ShapeGetRectangles */
212 CARD8 kind; /* ShapeBounding or ShapeClip */
215 } xShapeGetRectanglesReq;
216 #define sz_xShapeGetRectanglesReq 12
219 BYTE type; /* X_Reply */
220 CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
221 CARD16 sequenceNumber B16;
222 CARD32 length B32; /* not zero */
223 CARD32 nrects B32; /* number of rectangles */
229 } xShapeGetRectanglesReply; /* followed by xRectangles */
230 #define sz_xShapeGetRectanglesReply 32
235 #endif /* _SHAPESTR_H_ */