1 /******************************************************************************
3 * Copyright (c) 1994, 1995 Hewlett-Packard Company
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM,
20 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 * Except as contained in this notice, the name of the Hewlett-Packard
25 * Company shall not be used in advertising or otherwise to promote the
26 * sale, use or other dealings in this Software without prior written
27 * authorization from the Hewlett-Packard Company.
29 * Header file for Xlib-related DBE
31 *****************************************************************************/
36 #include <X11/extensions/dbe.h>
38 /* Request values used in (S)ProcDbeDispatch() */
39 #define X_DbeGetVersion 0
40 #define X_DbeAllocateBackBufferName 1
41 #define X_DbeDeallocateBackBufferName 2
42 #define X_DbeSwapBuffers 3
43 #define X_DbeBeginIdiom 4
44 #define X_DbeEndIdiom 5
45 #define X_DbeGetVisualInfo 6
46 #define X_DbeGetBackBufferAttributes 7
48 typedef CARD8 xDbeSwapAction;
49 typedef CARD32 xDbeBackBuffer;
53 /* Protocol data types */
57 CARD32 window B32; /* window */
58 xDbeSwapAction swapAction; /* swap action */
59 CARD8 pad1; /* unused */
66 CARD32 visualID B32; /* associated visual */
67 CARD8 depth; /* depth of visual */
68 CARD8 perfLevel; /* performance level hint */
72 #define sz_xDbeVisInfo 8
76 CARD32 n B32; /* number of visual info items in list */
78 } xDbeScreenVisInfo; /* followed by n xDbeVisInfo items */
82 CARD32 window B32; /* window */
84 } xDbeBufferAttributes;
87 /* Requests and replies */
91 CARD8 reqType; /* major-opcode: always codes->major_opcode */
92 CARD8 dbeReqType; /* minor-opcode: always X_DbeGetVersion (0) */
93 CARD16 length B16; /* request length: (2) */
94 CARD8 majorVersion; /* client-major-version */
95 CARD8 minorVersion; /* client-minor-version */
96 CARD16 unused B16; /* unused */
99 #define sz_xDbeGetVersionReq 8
103 BYTE type; /* Reply: X_Reply (1) */
104 CARD8 unused; /* unused */
105 CARD16 sequenceNumber B16; /* sequence number */
106 CARD32 length B32; /* reply length: (0) */
107 CARD8 majorVersion; /* server-major-version */
108 CARD8 minorVersion; /* server-minor-version */
109 CARD16 pad1 B16; /* unused */
116 } xDbeGetVersionReply;
117 #define sz_xDbeGetVersionReply 32
121 CARD8 reqType; /* major-opcode: codes->major_opcode */
122 CARD8 dbeReqType; /* X_DbeAllocateBackBufferName (1) */
123 CARD16 length B16; /* request length: (4) */
124 CARD32 window B32; /* window */
125 xDbeBackBuffer buffer B32; /* back buffer name */
126 xDbeSwapAction swapAction; /* swap action hint */
127 CARD8 pad1; /* unused */
130 } xDbeAllocateBackBufferNameReq;
131 #define sz_xDbeAllocateBackBufferNameReq 16
135 CARD8 reqType; /* major-opcode: codes->major_opcode */
136 CARD8 dbeReqType; /* X_DbeDeallocateBackBufferName (2) */
137 CARD16 length B16; /* request length: (2) */
138 xDbeBackBuffer buffer B32; /* back buffer name */
140 } xDbeDeallocateBackBufferNameReq;
141 #define sz_xDbeDeallocateBackBufferNameReq 8
145 CARD8 reqType; /* major-opcode: always codes->major_opcode */
146 CARD8 dbeReqType; /* minor-opcode: always X_DbeSwapBuffers (3) */
147 CARD16 length B16; /* request length: (2+2n) */
148 CARD32 n B32; /* n, number of window/swap action pairs */
150 } xDbeSwapBuffersReq; /* followed by n window/swap action pairs */
151 #define sz_xDbeSwapBuffersReq 8
155 CARD8 reqType; /* major-opcode: always codes->major_opcode */
156 CARD8 dbeReqType; /* minor-opcode: always X_DbeBeginIdom (4) */
157 CARD16 length B16; /* request length: (1) */
160 #define sz_xDbeBeginIdiomReq 4
164 CARD8 reqType; /* major-opcode: always codes->major_opcode */
165 CARD8 dbeReqType; /* minor-opcode: always X_DbeEndIdom (5) */
166 CARD16 length B16; /* request length: (1) */
169 #define sz_xDbeEndIdiomReq 4
173 CARD8 reqType; /* always codes->major_opcode */
174 CARD8 dbeReqType; /* always X_DbeGetVisualInfo (6) */
175 CARD16 length B16; /* request length: (2+n) */
176 CARD32 n B32; /* n, number of drawables in list */
178 } xDbeGetVisualInfoReq; /* followed by n drawables */
179 #define sz_xDbeGetVisualInfoReq 8
183 BYTE type; /* Reply: X_Reply (1) */
184 CARD8 unused; /* unused */
185 CARD16 sequenceNumber B16; /* sequence number */
186 CARD32 length B32; /* reply length */
187 CARD32 m; /* m, number of visual infos in list */
188 CARD32 pad1 B32; /* unused */
194 } xDbeGetVisualInfoReply; /* followed by m visual infos */
195 #define sz_xDbeGetVisualInfoReply 32
199 CARD8 reqType; /* always codes->major_opcode */
200 CARD8 dbeReqType; /* X_DbeGetBackBufferAttributes (7) */
201 CARD16 length B16; /* request length: (2) */
202 xDbeBackBuffer buffer B32; /* back buffer name */
204 } xDbeGetBackBufferAttributesReq;
205 #define sz_xDbeGetBackBufferAttributesReq 8
209 BYTE type; /* Reply: X_Reply (1) */
210 CARD8 unused; /* unused */
211 CARD16 sequenceNumber B16; /* sequence number */
212 CARD32 length B32; /* reply length: (0) */
213 CARD32 attributes; /* attributes */
214 CARD32 pad1 B32; /* unused */
220 } xDbeGetBackBufferAttributesReply;
221 #define sz_xDbeGetBackBufferAttributesReply 32
223 #endif /* DBE_PROTO_H */