1 | /************************************************************
|
---|
2 |
|
---|
3 | Copyright 1989, 1998 The Open Group
|
---|
4 |
|
---|
5 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | the above copyright notice appear in all copies and that both that
|
---|
8 | copyright notice and this permission notice appear in supporting
|
---|
9 | documentation.
|
---|
10 |
|
---|
11 | The above copyright notice and this permission notice shall be included in
|
---|
12 | all copies or substantial portions of the Software.
|
---|
13 |
|
---|
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
20 |
|
---|
21 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
22 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
23 | in this Software without prior written authorization from The Open Group.
|
---|
24 |
|
---|
25 | ********************************************************/
|
---|
26 |
|
---|
27 | #ifndef _SHAPEPROTO_H_
|
---|
28 | #define _SHAPEPROTO_H_
|
---|
29 |
|
---|
30 | #include <X11/extensions/shapeconst.h>
|
---|
31 |
|
---|
32 | /*
|
---|
33 | * Protocol requests constants and alignment values
|
---|
34 | * These would really be in SHAPE's X.h and Xproto.h equivalents
|
---|
35 | */
|
---|
36 |
|
---|
37 | #define Window CARD32
|
---|
38 | #define Time CARD32
|
---|
39 |
|
---|
40 | #define X_ShapeQueryVersion 0
|
---|
41 | #define X_ShapeRectangles 1
|
---|
42 | #define X_ShapeMask 2
|
---|
43 | #define X_ShapeCombine 3
|
---|
44 | #define X_ShapeOffset 4
|
---|
45 | #define X_ShapeQueryExtents 5
|
---|
46 | #define X_ShapeSelectInput 6
|
---|
47 | #define X_ShapeInputSelected 7
|
---|
48 | #define X_ShapeGetRectangles 8
|
---|
49 |
|
---|
50 | typedef struct _ShapeQueryVersion {
|
---|
51 | CARD8 reqType; /* always ShapeReqCode */
|
---|
52 | CARD8 shapeReqType; /* always X_ShapeQueryVersion */
|
---|
53 | CARD16 length B16;
|
---|
54 | } xShapeQueryVersionReq;
|
---|
55 | #define sz_xShapeQueryVersionReq 4
|
---|
56 |
|
---|
57 | typedef struct {
|
---|
58 | BYTE type; /* X_Reply */
|
---|
59 | CARD8 unused; /* not used */
|
---|
60 | CARD16 sequenceNumber B16;
|
---|
61 | CARD32 length B32;
|
---|
62 | CARD16 majorVersion B16; /* major version of SHAPE protocol */
|
---|
63 | CARD16 minorVersion B16; /* minor version of SHAPE protocol */
|
---|
64 | CARD32 pad0 B32;
|
---|
65 | CARD32 pad1 B32;
|
---|
66 | CARD32 pad2 B32;
|
---|
67 | CARD32 pad3 B32;
|
---|
68 | CARD32 pad4 B32;
|
---|
69 | } xShapeQueryVersionReply;
|
---|
70 | #define sz_xShapeQueryVersionReply 32
|
---|
71 |
|
---|
72 | typedef struct _ShapeRectangles {
|
---|
73 | CARD8 reqType; /* always ShapeReqCode */
|
---|
74 | CARD8 shapeReqType; /* always X_ShapeRectangles */
|
---|
75 | CARD16 length B16;
|
---|
76 | CARD8 op; /* Set, ... */
|
---|
77 | CARD8 destKind; /* ShapeBounding or ShapeClip */
|
---|
78 | CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
|
---|
79 | CARD8 pad0; /* not used */
|
---|
80 | Window dest B32;
|
---|
81 | INT16 xOff B16;
|
---|
82 | INT16 yOff B16;
|
---|
83 | } xShapeRectanglesReq; /* followed by xRects */
|
---|
84 | #define sz_xShapeRectanglesReq 16
|
---|
85 |
|
---|
86 | typedef struct _ShapeMask {
|
---|
87 | CARD8 reqType; /* always ShapeReqCode */
|
---|
88 | CARD8 shapeReqType; /* always X_ShapeMask */
|
---|
89 | CARD16 length B16;
|
---|
90 |
|
---|
91 | CARD8 op; /* Set, ... */
|
---|
92 | CARD8 destKind; /* ShapeBounding or ShapeClip */
|
---|
93 | CARD16 junk B16; /* not used */
|
---|
94 |
|
---|
95 | Window dest B32;
|
---|
96 | INT16 xOff B16;
|
---|
97 | INT16 yOff B16;
|
---|
98 | CARD32 src B32; /* 1 bit pixmap */
|
---|
99 | } xShapeMaskReq;
|
---|
100 | #define sz_xShapeMaskReq 20
|
---|
101 |
|
---|
102 | typedef struct _ShapeCombine {
|
---|
103 | CARD8 reqType; /* always ShapeReqCode */
|
---|
104 | CARD8 shapeReqType; /* always X_ShapeCombine */
|
---|
105 | CARD16 length B16;
|
---|
106 | CARD8 op; /* Set, ... */
|
---|
107 | CARD8 destKind; /* ShapeBounding or ShapeClip */
|
---|
108 | CARD8 srcKind; /* ShapeBounding or ShapeClip */
|
---|
109 | CARD8 junk; /* not used */
|
---|
110 | Window dest B32;
|
---|
111 | INT16 xOff B16;
|
---|
112 | INT16 yOff B16;
|
---|
113 | Window src B32;
|
---|
114 | } xShapeCombineReq;
|
---|
115 | #define sz_xShapeCombineReq 20
|
---|
116 |
|
---|
117 | typedef struct _ShapeOffset {
|
---|
118 | CARD8 reqType; /* always ShapeReqCode */
|
---|
119 | CARD8 shapeReqType; /* always X_ShapeOffset */
|
---|
120 | CARD16 length B16;
|
---|
121 | CARD8 destKind; /* ShapeBounding or ShapeClip */
|
---|
122 | CARD8 junk1; /* not used */
|
---|
123 | CARD16 junk2 B16; /* not used */
|
---|
124 | Window dest B32;
|
---|
125 | INT16 xOff B16;
|
---|
126 | INT16 yOff B16;
|
---|
127 | } xShapeOffsetReq;
|
---|
128 | #define sz_xShapeOffsetReq 16
|
---|
129 |
|
---|
130 | typedef struct _ShapeQueryExtents {
|
---|
131 | CARD8 reqType; /* always ShapeReqCode */
|
---|
132 | CARD8 shapeReqType; /* always X_ShapeQueryExtents */
|
---|
133 | CARD16 length B16;
|
---|
134 | Window window B32;
|
---|
135 | } xShapeQueryExtentsReq;
|
---|
136 | #define sz_xShapeQueryExtentsReq 8
|
---|
137 |
|
---|
138 | typedef struct {
|
---|
139 | BYTE type; /* X_Reply */
|
---|
140 | CARD8 unused; /* not used */
|
---|
141 | CARD16 sequenceNumber B16;
|
---|
142 | CARD32 length B32; /* 0 */
|
---|
143 | CARD8 boundingShaped; /* window has bounding shape */
|
---|
144 | CARD8 clipShaped; /* window has clip shape */
|
---|
145 | CARD16 unused1 B16;
|
---|
146 | INT16 xBoundingShape B16; /* extents of bounding shape */
|
---|
147 | INT16 yBoundingShape B16;
|
---|
148 | CARD16 widthBoundingShape B16;
|
---|
149 | CARD16 heightBoundingShape B16;
|
---|
150 | INT16 xClipShape B16; /* extents of clip shape */
|
---|
151 | INT16 yClipShape B16;
|
---|
152 | CARD16 widthClipShape B16;
|
---|
153 | CARD16 heightClipShape B16;
|
---|
154 | CARD32 pad1 B32;
|
---|
155 | } xShapeQueryExtentsReply;
|
---|
156 | #define sz_xShapeQueryExtentsReply 32
|
---|
157 |
|
---|
158 | typedef struct _ShapeSelectInput {
|
---|
159 | CARD8 reqType; /* always ShapeReqCode */
|
---|
160 | CARD8 shapeReqType; /* always X_ShapeSelectInput */
|
---|
161 | CARD16 length B16;
|
---|
162 | Window window B32;
|
---|
163 | BYTE enable; /* xTrue -> send events */
|
---|
164 | BYTE pad1;
|
---|
165 | CARD16 pad2 B16;
|
---|
166 | } xShapeSelectInputReq;
|
---|
167 | #define sz_xShapeSelectInputReq 12
|
---|
168 |
|
---|
169 | typedef struct _ShapeNotify {
|
---|
170 | BYTE type; /* always eventBase + ShapeNotify */
|
---|
171 | BYTE kind; /* either ShapeBounding or ShapeClip */
|
---|
172 | CARD16 sequenceNumber B16;
|
---|
173 | Window window B32;
|
---|
174 | INT16 x B16;
|
---|
175 | INT16 y B16; /* extents of new shape */
|
---|
176 | CARD16 width B16;
|
---|
177 | CARD16 height B16;
|
---|
178 | Time time B32; /* time of change */
|
---|
179 | BYTE shaped; /* set when a shape actual exists */
|
---|
180 | BYTE pad0;
|
---|
181 | CARD16 pad1 B16;
|
---|
182 | CARD32 pad2 B32;
|
---|
183 | CARD32 pad3 B32;
|
---|
184 | } xShapeNotifyEvent;
|
---|
185 | #define sz_xShapeNotifyEvent 32
|
---|
186 |
|
---|
187 | typedef struct _ShapeInputSelected {
|
---|
188 | CARD8 reqType; /* always ShapeReqCode */
|
---|
189 | CARD8 shapeReqType; /* always X_ShapeInputSelected */
|
---|
190 | CARD16 length B16;
|
---|
191 | Window window B32;
|
---|
192 | } xShapeInputSelectedReq;
|
---|
193 | #define sz_xShapeInputSelectedReq 8
|
---|
194 |
|
---|
195 | typedef struct {
|
---|
196 | BYTE type; /* X_Reply */
|
---|
197 | CARD8 enabled; /* current status */
|
---|
198 | CARD16 sequenceNumber B16;
|
---|
199 | CARD32 length B32; /* 0 */
|
---|
200 | CARD32 pad1 B32; /* unused */
|
---|
201 | CARD32 pad2 B32;
|
---|
202 | CARD32 pad3 B32;
|
---|
203 | CARD32 pad4 B32;
|
---|
204 | CARD32 pad5 B32;
|
---|
205 | CARD32 pad6 B32;
|
---|
206 | } xShapeInputSelectedReply;
|
---|
207 | #define sz_xShapeInputSelectedReply 32
|
---|
208 |
|
---|
209 | typedef struct _ShapeGetRectangles {
|
---|
210 | CARD8 reqType; /* always ShapeReqCode */
|
---|
211 | CARD8 shapeReqType; /* always X_ShapeGetRectangles */
|
---|
212 | CARD16 length B16;
|
---|
213 | Window window B32;
|
---|
214 | CARD8 kind; /* ShapeBounding or ShapeClip */
|
---|
215 | CARD8 junk1;
|
---|
216 | CARD16 junk2 B16;
|
---|
217 | } xShapeGetRectanglesReq;
|
---|
218 | #define sz_xShapeGetRectanglesReq 12
|
---|
219 |
|
---|
220 | typedef struct {
|
---|
221 | BYTE type; /* X_Reply */
|
---|
222 | CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */
|
---|
223 | CARD16 sequenceNumber B16;
|
---|
224 | CARD32 length B32; /* not zero */
|
---|
225 | CARD32 nrects B32; /* number of rectangles */
|
---|
226 | CARD32 pad1 B32;
|
---|
227 | CARD32 pad2 B32;
|
---|
228 | CARD32 pad3 B32;
|
---|
229 | CARD32 pad4 B32;
|
---|
230 | CARD32 pad5 B32;
|
---|
231 | } xShapeGetRectanglesReply; /* followed by xRectangles */
|
---|
232 | #define sz_xShapeGetRectanglesReply 32
|
---|
233 |
|
---|
234 | #undef Window
|
---|
235 | #undef Time
|
---|
236 |
|
---|
237 | #endif /* _SHAPEPROTO_H_ */
|
---|