2 * Copyright © 2008 Red Hat, Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Soft-
6 * ware"), to deal in the Software without restriction, including without
7 * limitation the rights to use, copy, modify, merge, publish, distribute,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, provided that the above copyright
10 * notice(s) and this permission notice appear in all copies of the Soft-
11 * ware and that both the above copyright notice(s) and this permission
12 * notice appear in supporting documentation.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
16 * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
17 * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
18 * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
19 * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
22 * MANCE OF THIS SOFTWARE.
24 * Except as contained in this notice, the name of a copyright holder shall
25 * not be used in advertising or otherwise to promote the sale, use or
26 * other dealings in this Software without prior written authorization of
27 * the copyright holder.
30 * Kristian Høgsberg (krh@redhat.com)
33 #ifndef _DRI2_PROTO_H_
34 #define _DRI2_PROTO_H_
36 #define DRI2_NAME "DRI2"
40 #define DRI2NumberErrors 0
41 #define DRI2NumberEvents 2
42 #define DRI2NumberRequests 14
44 #define X_DRI2QueryVersion 0
45 #define X_DRI2Connect 1
46 #define X_DRI2Authenticate 2
47 #define X_DRI2CreateDrawable 3
48 #define X_DRI2DestroyDrawable 4
49 #define X_DRI2GetBuffers 5
50 #define X_DRI2CopyRegion 6
51 #define X_DRI2GetBuffersWithFormat 7
52 #define X_DRI2SwapBuffers 8
53 #define X_DRI2GetMSC 9
54 #define X_DRI2WaitMSC 10
55 #define X_DRI2WaitSBC 11
56 #define X_DRI2SwapInterval 12
57 #define X_DRI2GetParam 13
62 #define DRI2_BufferSwapComplete 0
63 #define DRI2_InvalidateBuffers 1
66 CARD32 attachment B32;
77 CARD32 majorVersion B32;
78 CARD32 minorVersion B32;
79 } xDRI2QueryVersionReq;
80 #define sz_xDRI2QueryVersionReq 12
83 BYTE type; /* X_Reply */
85 CARD16 sequenceNumber B16;
87 CARD32 majorVersion B32;
88 CARD32 minorVersion B32;
93 } xDRI2QueryVersionReply;
94 #define sz_xDRI2QueryVersionReply 32
101 CARD32 driverType B32;
103 #define sz_xDRI2ConnectReq 12
106 BYTE type; /* X_Reply */
108 CARD16 sequenceNumber B16;
110 CARD32 driverNameLength B32;
111 CARD32 deviceNameLength B32;
117 #define sz_xDRI2ConnectReply 32
125 } xDRI2AuthenticateReq;
126 #define sz_xDRI2AuthenticateReq 12
129 BYTE type; /* X_Reply */
131 CARD16 sequenceNumber B16;
133 CARD32 authenticated B32;
139 } xDRI2AuthenticateReply;
140 #define sz_xDRI2AuthenticateReply 32
147 } xDRI2CreateDrawableReq;
148 #define sz_xDRI2CreateDrawableReq 8
155 } xDRI2DestroyDrawableReq;
156 #define sz_xDRI2DestroyDrawableReq 8
164 } xDRI2GetBuffersReq;
165 #define sz_xDRI2GetBuffersReq 12
168 BYTE type; /* X_Reply */
170 CARD16 sequenceNumber B16;
178 } xDRI2GetBuffersReply;
179 #define sz_xDRI2GetBuffersReply 32
189 } xDRI2CopyRegionReq;
190 #define sz_xDRI2CopyRegionReq 20
193 BYTE type; /* X_Reply */
195 CARD16 sequenceNumber B16;
203 } xDRI2CopyRegionReply;
204 #define sz_xDRI2CopyRegionReply 32
211 CARD32 target_msc_hi B32;
212 CARD32 target_msc_lo B32;
213 CARD32 divisor_hi B32;
214 CARD32 divisor_lo B32;
215 CARD32 remainder_hi B32;
216 CARD32 remainder_lo B32;
217 } xDRI2SwapBuffersReq;
218 #define sz_xDRI2SwapBuffersReq 32
221 BYTE type; /* X_Reply */
223 CARD16 sequenceNumber B16;
231 } xDRI2SwapBuffersReply;
232 #define sz_xDRI2SwapBuffersReply 32
240 #define sz_xDRI2GetMSCReq 8
247 CARD32 target_msc_hi B32;
248 CARD32 target_msc_lo B32;
249 CARD32 divisor_hi B32;
250 CARD32 divisor_lo B32;
251 CARD32 remainder_hi B32;
252 CARD32 remainder_lo B32;
254 #define sz_xDRI2WaitMSCReq 32
261 CARD32 target_sbc_hi B32;
262 CARD32 target_sbc_lo B32;
264 #define sz_xDRI2WaitSBCReq 16
269 CARD16 sequenceNumber B16;
278 #define sz_xDRI2MSCReply 32
286 } xDRI2SwapIntervalReq;
287 #define sz_xDRI2SwapIntervalReq 12
292 CARD16 sequenceNumber B16;
293 CARD16 event_type B16;
302 } xDRI2BufferSwapComplete;
303 #define sz_xDRI2BufferSwapComplete 32
308 CARD16 sequenceNumber B16;
309 CARD16 event_type B16;
317 } xDRI2BufferSwapComplete2;
318 #define sz_xDRI2BufferSwapComplete2 32
323 CARD16 sequenceNumber B16;
331 } xDRI2InvalidateBuffers;
332 #define sz_xDRI2InvalidateBuffers 32
341 #define sz_xDRI2GetParamReq 12
344 BYTE type; /*X_Reply*/
345 BOOL is_param_recognized;
346 CARD16 sequenceNumber B16;
354 } xDRI2GetParamReply;
355 #define sz_xDRI2GetParamReply 32