]> git.sesse.net Git - rdpsrv/blob - Xserver/include/extensions/shapestr.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / include / extensions / shapestr.h
1 /************************************************************
2
3 Copyright (c) 1989  X Consortium
4
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:
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
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.
21
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.
25
26 ********************************************************/
27
28 /* $XConsortium: shapestr.h,v 1.13 94/04/17 20:11:24 rws Exp $ */
29
30 #ifndef _SHAPESTR_H_
31 #define _SHAPESTR_H_
32
33 /*
34  * Protocol requests constants and alignment values
35  * These would really be in SHAPE's X.h and Xproto.h equivalents
36  */
37
38 #include "shape.h"
39
40 #define Window CARD32
41 #define Time CARD32
42
43 #define SHAPENAME "SHAPE"
44
45 #define SHAPE_MAJOR_VERSION     1       /* current version numbers */
46 #define SHAPE_MINOR_VERSION     0
47
48 typedef struct _ShapeQueryVersion {
49         CARD8   reqType;                /* always ShapeReqCode */
50         CARD8   shapeReqType;           /* always X_ShapeQueryVersion */
51         CARD16  length B16;
52 } xShapeQueryVersionReq;
53 #define sz_xShapeQueryVersionReq        4
54
55 typedef struct {
56         BYTE    type;                   /* X_Reply */
57         CARD8   unused;                 /* not used */
58         CARD16  sequenceNumber B16;
59         CARD32  length B32;
60         CARD16  majorVersion B16;       /* major version of SHAPE protocol */
61         CARD16  minorVersion B16;       /* minor version of SHAPE protocol */
62         CARD32  pad0 B32;
63         CARD32  pad1 B32;
64         CARD32  pad2 B32;
65         CARD32  pad3 B32;
66         CARD32  pad4 B32;
67 } xShapeQueryVersionReply;
68 #define sz_xShapeQueryVersionReply      32
69
70 typedef struct _ShapeRectangles {
71         CARD8   reqType;        /* always ShapeReqCode */
72         CARD8   shapeReqType;   /* always X_ShapeRectangles */
73         CARD16  length B16;
74         CARD8   op;             /* Set, ... */
75         CARD8   destKind;       /* ShapeBounding or ShapeClip */
76         CARD8   ordering;       /* UnSorted, YSorted, YXSorted, YXBanded */
77         CARD8   pad0;           /* not used */
78         Window  dest B32;
79         INT16   xOff B16;
80         INT16   yOff B16;
81 } xShapeRectanglesReq;          /* followed by xRects */
82 #define sz_xShapeRectanglesReq  16
83
84 typedef struct _ShapeMask {
85         CARD8   reqType;        /* always ShapeReqCode */
86         CARD8   shapeReqType;   /* always X_ShapeMask */
87         CARD16  length B16;
88
89         CARD8   op;             /* Set, ... */
90         CARD8   destKind;       /* ShapeBounding or ShapeClip */
91         CARD16  junk B16;       /* not used */
92
93         Window  dest B32;
94         INT16   xOff B16;
95         INT16   yOff B16;
96         CARD32  src B32;        /* 1 bit pixmap */
97 } xShapeMaskReq;
98 #define sz_xShapeMaskReq        20
99         
100 typedef struct _ShapeCombine {
101         CARD8   reqType;        /* always ShapeReqCode */
102         CARD8   shapeReqType;   /* always X_ShapeCombine */
103         CARD16  length B16;
104         CARD8   op;             /* Set, ... */
105         CARD8   destKind;       /* ShapeBounding or ShapeClip */
106         CARD8   srcKind;        /* ShapeBounding or ShapeClip */
107         CARD8   junk;           /* not used */
108         Window  dest B32;
109         INT16   xOff B16;
110         INT16   yOff B16;
111         Window  src B32;
112 } xShapeCombineReq;
113 #define sz_xShapeCombineReq     20
114         
115 typedef struct _ShapeOffset {
116         CARD8   reqType;        /* always ShapeReqCode */
117         CARD8   shapeReqType;   /* always X_ShapeOffset */
118         CARD16  length B16;
119         CARD8   destKind;       /* ShapeBounding or ShapeClip */
120         CARD8   junk1;          /* not used */
121         CARD16  junk2 B16;      /* not used */
122         Window  dest B32;
123         INT16   xOff B16;
124         INT16   yOff B16;
125 } xShapeOffsetReq;
126 #define sz_xShapeOffsetReq      16
127
128 typedef struct _ShapeQueryExtents {
129         CARD8   reqType;        /* always ShapeReqCode */
130         CARD8   shapeReqType;   /* always X_ShapeQueryExtents */
131         CARD16  length B16;
132         Window  window B32;
133 } xShapeQueryExtentsReq;
134 #define sz_xShapeQueryExtentsReq        8
135
136 typedef struct {
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 */
143         CARD16  unused1 B16;
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;
152         CARD32  pad1 B32;
153 } xShapeQueryExtentsReply;
154 #define sz_xShapeQueryExtentsReply      32
155
156 typedef struct _ShapeSelectInput {
157         CARD8   reqType;        /* always ShapeReqCode */
158         CARD8   shapeReqType;   /* always X_ShapeSelectInput */
159         CARD16  length B16;
160         Window  window B32;
161         BYTE    enable;         /* xTrue -> send events */
162         BYTE    pad1;
163         CARD16  pad2 B16;
164 } xShapeSelectInputReq;
165 #define sz_xShapeSelectInputReq 12
166
167 typedef struct _ShapeNotify {
168         BYTE    type;           /* always eventBase + ShapeNotify */
169         BYTE    kind;           /* either ShapeBounding or ShapeClip */
170         CARD16  sequenceNumber B16;
171         Window  window B32;
172         INT16   x B16;
173         INT16   y B16;          /* extents of new shape */
174         CARD16  width B16;
175         CARD16  height B16;
176         Time    time B32;       /* time of change */
177         BYTE    shaped;         /* set when a shape actual exists */
178         BYTE    pad0;
179         CARD16  pad1 B16;
180         CARD32  pad2 B32;
181         CARD32  pad3 B32;
182 } xShapeNotifyEvent;
183 #define sz_xShapeNotifyEvent    32
184
185 typedef struct _ShapeInputSelected {
186         CARD8   reqType;        /* always ShapeReqCode */
187         CARD8   shapeReqType;   /* always X_ShapeInputSelected */
188         CARD16  length B16;
189         Window  window B32;
190 } xShapeInputSelectedReq;
191 #define sz_xShapeInputSelectedReq 8
192
193 typedef struct {
194         BYTE    type;                   /* X_Reply */
195         CARD8   enabled;                /* current status */
196         CARD16  sequenceNumber B16;
197         CARD32  length B32;             /* 0 */
198         CARD32  pad1 B32;               /* unused */
199         CARD32  pad2 B32;
200         CARD32  pad3 B32;
201         CARD32  pad4 B32;
202         CARD32  pad5 B32;
203         CARD32  pad6 B32;
204 } xShapeInputSelectedReply;
205 #define sz_xShapeInputSelectedReply     32
206
207 typedef struct _ShapeGetRectangles {
208     CARD8   reqType;            /* always ShapeReqCode */
209     CARD8   shapeReqType;       /* always X_ShapeGetRectangles */
210     CARD16  length B16;
211     Window  window B32;
212     CARD8   kind;               /* ShapeBounding or ShapeClip */
213     CARD8   junk1;
214     CARD16  junk2 B16;
215 } xShapeGetRectanglesReq;
216 #define sz_xShapeGetRectanglesReq       12
217
218 typedef struct {
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 */
224         CARD32 pad1 B32;
225         CARD32 pad2 B32;
226         CARD32 pad3 B32;
227         CARD32 pad4 B32;
228         CARD32 pad5 B32;
229 } xShapeGetRectanglesReply;             /* followed by xRectangles */
230 #define sz_xShapeGetRectanglesReply 32
231
232 #undef Window
233 #undef Time
234
235 #endif /* _SHAPESTR_H_ */