2 Copyright 1989, 1998 The Open Group
4 Permission to use, copy, modify, distribute, and sell this software and its
5 documentation for any purpose is hereby granted without fee, provided that
6 the above copyright notice appear in all copies and that both that
7 copyright notice and this permission notice appear in supporting
10 The above copyright notice and this permission notice shall be included in
11 all copies or substantial portions of the Software.
13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 Except as contained in this notice, the name of The Open Group shall not be
21 used in advertising or otherwise to promote the sale, use or other dealings
22 in this Software without prior written authorization from The Open Group.
25 #ifndef _MULTIBUFPROTO_H_
26 #define _MULTIBUFPROTO_H_
28 #include <X11/extensions/multibufconst.h>
31 * Protocol requests constants and alignment values
35 #define Drawable CARD32
36 #define VisualID CARD32
37 #define Multibuffer CARD32
39 #define X_MbufGetBufferVersion 0
40 #define X_MbufCreateImageBuffers 1
41 #define X_MbufDestroyImageBuffers 2
42 #define X_MbufDisplayImageBuffers 3
43 #define X_MbufSetMBufferAttributes 4
44 #define X_MbufGetMBufferAttributes 5
45 #define X_MbufSetBufferAttributes 6
46 #define X_MbufGetBufferAttributes 7
47 #define X_MbufGetBufferInfo 8
48 #define X_MbufCreateStereoWindow 9
49 #define X_MbufClearImageBufferArea 10
52 typedef struct xMbufBufferInfo {
53 CARD32 visualID B32; /* associated visual */
54 CARD16 maxBuffers B16; /* maximum supported buffers */
55 CARD8 depth; /* depth of visual (redundant) */
58 #define sz_xMbufBufferInfo 8
63 CARD16 sequenceNumber B16;
64 CARD32 buffer B32; /* affected buffer */
65 BYTE state; /* current status */
73 } xMbufClobberNotifyEvent;
78 CARD16 sequenceNumber B16;
79 CARD32 buffer B32; /* affected buffer */
80 CARD32 timeStamp B32; /* update time */
87 } xMbufUpdateNotifyEvent;
90 CARD8 reqType; /* always codes->major_opcode */
91 CARD8 mbufReqType; /* always X_MbufGetBufferVersion */
93 } xMbufGetBufferVersionReq;
94 #define sz_xMbufGetBufferVersionReq 4
97 BYTE type; /* X_Reply */
98 CARD8 unused; /* not used */
99 CARD16 sequenceNumber B16;
101 CARD8 majorVersion; /* major version of Multi-Buffering protocol */
102 CARD8 minorVersion; /* minor version of Multi-Buffering protocol */
109 } xMbufGetBufferVersionReply;
110 #define sz_xMbufGetBufferVersionReply 32
113 CARD8 reqType; /* always codes->major_opcode */
114 CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */
116 CARD32 window B32; /* associated window */
117 CARD8 updateAction; /* action at update */
118 CARD8 updateHint; /* hint as to frequency of updates */
120 } xMbufCreateImageBuffersReq; /* followed by buffer ids */
121 #define sz_xMbufCreateImageBuffersReq 12
124 BYTE type; /* X_Reply */
125 CARD8 unused; /* not used */
126 CARD16 sequenceNumber B16;
128 CARD16 numberBuffer B16; /* number successfully allocated */
135 } xMbufCreateImageBuffersReply;
136 #define sz_xMbufCreateImageBuffersReply 32
139 CARD8 reqType; /* always codes->major_opcode */
140 CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */
142 CARD32 window B32; /* associated window */
143 } xMbufDestroyImageBuffersReq;
144 #define sz_xMbufDestroyImageBuffersReq 8
147 CARD8 reqType; /* always codes->major_opcode */
148 CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */
150 CARD16 minDelay B16; /* minimum time between last update and now */
151 CARD16 maxDelay B16; /* maximum time between last update and now */
152 } xMbufDisplayImageBuffersReq; /* followed by list of buffers */
153 #define sz_xMbufDisplayImageBuffersReq 8
156 CARD8 reqType; /* always codes->major_opcode */
157 CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */
159 CARD32 window B32; /* associated window */
160 CARD32 valueMask B32; /* modified entries */
161 } xMbufSetMBufferAttributesReq; /* followed by values */
162 #define sz_xMbufSetMBufferAttributesReq 12
165 CARD8 reqType; /* always codes->major_opcode */
166 CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */
168 CARD32 window B32; /* associated window */
169 } xMbufGetMBufferAttributesReq;
170 #define sz_xMbufGetMBufferAttributesReq 8
173 BYTE type; /* X_Reply */
174 CARD8 unused; /* not used */
175 CARD16 sequenceNumber B16;
177 CARD16 displayedBuffer B16; /* currently visible buffer */
187 } xMbufGetMBufferAttributesReply;
188 #define sz_xMbufGetMBufferAttributesReply 32
191 CARD8 reqType; /* always codes->major_opcode */
192 CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */
195 CARD32 valueMask B32;
196 } xMbufSetBufferAttributesReq; /* followed by values */
197 #define sz_xMbufSetBufferAttributesReq 12
200 CARD8 reqType; /* always codes->major_opcode */
201 CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */
204 } xMbufGetBufferAttributesReq;
205 #define sz_xMbufGetBufferAttributesReq 8
208 BYTE type; /* X_Reply */
209 CARD8 unused; /* not used */
210 CARD16 sequenceNumber B16;
213 CARD32 eventMask B32;
214 CARD16 bufferIndex B16;
220 } xMbufGetBufferAttributesReply;
221 #define sz_xMbufGetBufferAttributesReply 32
224 CARD8 reqType; /* always codes->major_opcode */
225 CARD8 mbufReqType; /* always X_MbufGetBufferInfo */
227 Drawable drawable B32;
228 } xMbufGetBufferInfoReq;
229 #define sz_xMbufGetBufferInfoReq 8
232 BYTE type; /* X_Reply */
233 CARD8 unused; /* not used */
234 CARD16 sequenceNumber B16;
236 CARD16 normalInfo B16;
237 CARD16 stereoInfo B16;
243 } xMbufGetBufferInfoReply; /* followed by buffer infos */
244 #define sz_xMbufGetBufferInfoReply 32
248 CARD8 reqType; /* always codes->major_opcode */
249 CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */
257 Multibuffer left B32; /* associated buffers */
258 Multibuffer right B32;
263 CARD16 borderWidth B16;
264 #if defined(__cplusplus) || defined(c_plusplus)
271 } xMbufCreateStereoWindowReq; /* followed by value list */
272 #define sz_xMbufCreateStereoWindowReq 44
275 CARD8 reqType; /* always codes->major_opcode */
276 CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */
278 Multibuffer buffer B32;
287 } xMbufClearImageBufferAreaReq;
288 #define sz_xMbufClearImageBufferAreaReq 20
295 #endif /* _MULTIBUFPROTO_H_ */