1 /*
2  * This file generated automatically from dri3.xml by d_client.py.
3  * Edit at your peril.
4  */
5 
6 /**
7  * @defgroup XCB_DRI3_API XCB DRI3 API
8  * @brief DRI3 XCB Protocol Implementation.
9  * @{
10  **/
11 
12 module xcb.dri3;
13 
14 import xcb.xcb;
15 import xcb.xproto;
16 
17 extern (C):
18 
19 enum int XCB_DRI3_MAJOR_VERSION = 1;
20 enum int XCB_DRI3_MINOR_VERSION = 0;
21 
22 extern (C) __gshared extern xcb_extension_t xcb_dri3_id;
23 
24 /**
25  * @brief xcb_dri3_query_version_cookie_t
26  **/
27 struct xcb_dri3_query_version_cookie_t {
28 	uint sequence; /**<  */
29 }
30 
31 /** Opcode for xcb_dri3_query_version. */
32 enum XCB_DRI3_QUERY_VERSION = 0;
33 
34 /**
35  * @brief xcb_dri3_query_version_request_t
36  **/
37 struct xcb_dri3_query_version_request_t {
38 	ubyte major_opcode; /**<  */
39 	ubyte minor_opcode; /**<  */
40 	ushort length; /**<  */
41 	uint major_version; /**<  */
42 	uint minor_version; /**<  */
43 }
44 
45 /**
46  * @brief xcb_dri3_query_version_reply_t
47  **/
48 struct xcb_dri3_query_version_reply_t {
49 	ubyte response_type; /**<  */
50 	ubyte pad0; /**<  */
51 	ushort sequence; /**<  */
52 	uint length; /**<  */
53 	uint major_version; /**<  */
54 	uint minor_version; /**<  */
55 }
56 
57 /**
58  * @brief xcb_dri3_open_cookie_t
59  **/
60 struct xcb_dri3_open_cookie_t {
61 	uint sequence; /**<  */
62 }
63 
64 /** Opcode for xcb_dri3_open. */
65 enum XCB_DRI3_OPEN = 1;
66 
67 /**
68  * @brief xcb_dri3_open_request_t
69  **/
70 struct xcb_dri3_open_request_t {
71 	ubyte major_opcode; /**<  */
72 	ubyte minor_opcode; /**<  */
73 	ushort length; /**<  */
74 	xcb_drawable_t drawable; /**<  */
75 	uint provider; /**<  */
76 }
77 
78 /**
79  * @brief xcb_dri3_open_reply_t
80  **/
81 struct xcb_dri3_open_reply_t {
82 	ubyte response_type; /**<  */
83 	ubyte nfd; /**<  */
84 	ushort sequence; /**<  */
85 	uint length; /**<  */
86 	ubyte[24] pad0; /**<  */
87 }
88 
89 /** Opcode for xcb_dri3_pixmap_from_buffer. */
90 enum XCB_DRI3_PIXMAP_FROM_BUFFER = 2;
91 
92 /**
93  * @brief xcb_dri3_pixmap_from_buffer_request_t
94  **/
95 struct xcb_dri3_pixmap_from_buffer_request_t {
96 	ubyte major_opcode; /**<  */
97 	ubyte minor_opcode; /**<  */
98 	ushort length; /**<  */
99 	xcb_pixmap_t pixmap; /**<  */
100 	xcb_drawable_t drawable; /**<  */
101 	uint size; /**<  */
102 	ushort width; /**<  */
103 	ushort height; /**<  */
104 	ushort stride; /**<  */
105 	ubyte depth; /**<  */
106 	ubyte bpp; /**<  */
107 }
108 
109 /**
110  * @brief xcb_dri3_buffer_from_pixmap_cookie_t
111  **/
112 struct xcb_dri3_buffer_from_pixmap_cookie_t {
113 	uint sequence; /**<  */
114 }
115 
116 /** Opcode for xcb_dri3_buffer_from_pixmap. */
117 enum XCB_DRI3_BUFFER_FROM_PIXMAP = 3;
118 
119 /**
120  * @brief xcb_dri3_buffer_from_pixmap_request_t
121  **/
122 struct xcb_dri3_buffer_from_pixmap_request_t {
123 	ubyte major_opcode; /**<  */
124 	ubyte minor_opcode; /**<  */
125 	ushort length; /**<  */
126 	xcb_pixmap_t pixmap; /**<  */
127 }
128 
129 /**
130  * @brief xcb_dri3_buffer_from_pixmap_reply_t
131  **/
132 struct xcb_dri3_buffer_from_pixmap_reply_t {
133 	ubyte response_type; /**<  */
134 	ubyte nfd; /**<  */
135 	ushort sequence; /**<  */
136 	uint length; /**<  */
137 	uint size; /**<  */
138 	ushort width; /**<  */
139 	ushort height; /**<  */
140 	ushort stride; /**<  */
141 	ubyte depth; /**<  */
142 	ubyte bpp; /**<  */
143 	ubyte[12] pad0; /**<  */
144 }
145 
146 /** Opcode for xcb_dri3_fence_from_fd. */
147 enum XCB_DRI3_FENCE_FROM_FD = 4;
148 
149 /**
150  * @brief xcb_dri3_fence_from_fd_request_t
151  **/
152 struct xcb_dri3_fence_from_fd_request_t {
153 	ubyte major_opcode; /**<  */
154 	ubyte minor_opcode; /**<  */
155 	ushort length; /**<  */
156 	xcb_drawable_t drawable; /**<  */
157 	uint fence; /**<  */
158 	ubyte initially_triggered; /**<  */
159 	ubyte[3] pad0; /**<  */
160 }
161 
162 /**
163  * @brief xcb_dri3_fd_from_fence_cookie_t
164  **/
165 struct xcb_dri3_fd_from_fence_cookie_t {
166 	uint sequence; /**<  */
167 }
168 
169 /** Opcode for xcb_dri3_fd_from_fence. */
170 enum XCB_DRI3_FD_FROM_FENCE = 5;
171 
172 /**
173  * @brief xcb_dri3_fd_from_fence_request_t
174  **/
175 struct xcb_dri3_fd_from_fence_request_t {
176 	ubyte major_opcode; /**<  */
177 	ubyte minor_opcode; /**<  */
178 	ushort length; /**<  */
179 	xcb_drawable_t drawable; /**<  */
180 	uint fence; /**<  */
181 }
182 
183 /**
184  * @brief xcb_dri3_fd_from_fence_reply_t
185  **/
186 struct xcb_dri3_fd_from_fence_reply_t {
187 	ubyte response_type; /**<  */
188 	ubyte nfd; /**<  */
189 	ushort sequence; /**<  */
190 	uint length; /**<  */
191 	ubyte[24] pad0; /**<  */
192 }
193 
194 /**
195  *
196  * @param c The connection
197  * @return A cookie
198  *
199  * Delivers a request to the X server.
200  *
201  */
202 xcb_dri3_query_version_cookie_t xcb_dri3_query_version(xcb_connection_t* c /**< */ , uint major_version /**< */ , uint minor_version /**< */ );
203 
204 /**
205  *
206  * @param c The connection
207  * @return A cookie
208  *
209  * Delivers a request to the X server.
210  *
211  * This form can be used only if the request will cause
212  * a reply to be generated. Any returned error will be
213  * placed in the event queue.
214  */
215 xcb_dri3_query_version_cookie_t xcb_dri3_query_version_unchecked(xcb_connection_t* c /**< */ , uint major_version /**< */ ,
216 	uint minor_version /**< */ );
217 
218 /**
219  * Return the reply
220  * @param c      The connection
221  * @param cookie The cookie
222  * @param e      The xcb_generic_error_t supplied
223  *
224  * Returns the reply of the request asked by
225  *
226  * The parameter @p e supplied to this function must be NULL if
227  * xcb_dri3_query_version_unchecked(). is used.
228  * Otherwise, it stores the error if any.
229  *
230  * The returned value must be freed by the caller using free().
231  */
232 xcb_dri3_query_version_reply_t* xcb_dri3_query_version_reply(xcb_connection_t* c /**< */ , xcb_dri3_query_version_cookie_t cookie /**< */ ,
233 	xcb_generic_error_t** e /**< */ );
234 
235 /**
236  *
237  * @param c The connection
238  * @return A cookie
239  *
240  * Delivers a request to the X server.
241  *
242  */
243 xcb_dri3_open_cookie_t xcb_dri3_open(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint provider /**< */ );
244 
245 /**
246  *
247  * @param c The connection
248  * @return A cookie
249  *
250  * Delivers a request to the X server.
251  *
252  * This form can be used only if the request will cause
253  * a reply to be generated. Any returned error will be
254  * placed in the event queue.
255  */
256 xcb_dri3_open_cookie_t xcb_dri3_open_unchecked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint provider /**< */ );
257 
258 /**
259  * Return the reply
260  * @param c      The connection
261  * @param cookie The cookie
262  * @param e      The xcb_generic_error_t supplied
263  *
264  * Returns the reply of the request asked by
265  *
266  * The parameter @p e supplied to this function must be NULL if
267  * xcb_dri3_open_unchecked(). is used.
268  * Otherwise, it stores the error if any.
269  *
270  * The returned value must be freed by the caller using free().
271  */
272 xcb_dri3_open_reply_t* xcb_dri3_open_reply(xcb_connection_t* c /**< */ , xcb_dri3_open_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
273 
274 /**
275  * Return the reply fds
276  * @param c      The connection
277  * @param reply  The reply
278  *
279  * Returns the array of reply fds of the request asked by
280  *
281  * The returned value must be freed by the caller using free().
282  */
283 int* xcb_dri3_open_reply_fds(xcb_connection_t* c /**< */ , xcb_dri3_open_reply_t* reply /**< */ );
284 
285 /**
286  *
287  * @param c The connection
288  * @return A cookie
289  *
290  * Delivers a request to the X server.
291  *
292  * This form can be used only if the request will not cause
293  * a reply to be generated. Any returned error will be
294  * saved for handling by xcb_request_check().
295  */
296 xcb_void_cookie_t xcb_dri3_pixmap_from_buffer_checked(xcb_connection_t* c /**< */ , xcb_pixmap_t pixmap /**< */ , xcb_drawable_t drawable /**< */ ,
297 	uint size /**< */ , ushort width /**< */ , ushort height /**< */ , ushort stride /**< */ , ubyte depth /**< */ , ubyte bpp /**< */ ,
298 	int pixmap_fd /**< */ );
299 
300 /**
301  *
302  * @param c The connection
303  * @return A cookie
304  *
305  * Delivers a request to the X server.
306  *
307  */
308 xcb_void_cookie_t xcb_dri3_pixmap_from_buffer(xcb_connection_t* c /**< */ , xcb_pixmap_t pixmap /**< */ , xcb_drawable_t drawable /**< */ , uint size /**< */ ,
309 	ushort width /**< */ , ushort height /**< */ , ushort stride /**< */ , ubyte depth /**< */ , ubyte bpp /**< */ , int pixmap_fd /**< */ );
310 
311 /**
312  *
313  * @param c The connection
314  * @return A cookie
315  *
316  * Delivers a request to the X server.
317  *
318  */
319 xcb_dri3_buffer_from_pixmap_cookie_t xcb_dri3_buffer_from_pixmap(xcb_connection_t* c /**< */ , xcb_pixmap_t pixmap /**< */ );
320 
321 /**
322  *
323  * @param c The connection
324  * @return A cookie
325  *
326  * Delivers a request to the X server.
327  *
328  * This form can be used only if the request will cause
329  * a reply to be generated. Any returned error will be
330  * placed in the event queue.
331  */
332 xcb_dri3_buffer_from_pixmap_cookie_t xcb_dri3_buffer_from_pixmap_unchecked(xcb_connection_t* c /**< */ , xcb_pixmap_t pixmap /**< */ );
333 
334 /**
335  * Return the reply
336  * @param c      The connection
337  * @param cookie The cookie
338  * @param e      The xcb_generic_error_t supplied
339  *
340  * Returns the reply of the request asked by
341  *
342  * The parameter @p e supplied to this function must be NULL if
343  * xcb_dri3_buffer_from_pixmap_unchecked(). is used.
344  * Otherwise, it stores the error if any.
345  *
346  * The returned value must be freed by the caller using free().
347  */
348 xcb_dri3_buffer_from_pixmap_reply_t* xcb_dri3_buffer_from_pixmap_reply(xcb_connection_t* c /**< */ ,
349 	xcb_dri3_buffer_from_pixmap_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
350 
351 /**
352  * Return the reply fds
353  * @param c      The connection
354  * @param reply  The reply
355  *
356  * Returns the array of reply fds of the request asked by
357  *
358  * The returned value must be freed by the caller using free().
359  */
360 int* xcb_dri3_buffer_from_pixmap_reply_fds(xcb_connection_t* c /**< */ , xcb_dri3_buffer_from_pixmap_reply_t* reply /**< */ );
361 
362 /**
363  *
364  * @param c The connection
365  * @return A cookie
366  *
367  * Delivers a request to the X server.
368  *
369  * This form can be used only if the request will not cause
370  * a reply to be generated. Any returned error will be
371  * saved for handling by xcb_request_check().
372  */
373 xcb_void_cookie_t xcb_dri3_fence_from_fd_checked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint fence /**< */ ,
374 	ubyte initially_triggered /**< */ , int fence_fd /**< */ );
375 
376 /**
377  *
378  * @param c The connection
379  * @return A cookie
380  *
381  * Delivers a request to the X server.
382  *
383  */
384 xcb_void_cookie_t xcb_dri3_fence_from_fd(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint fence /**< */ ,
385 	ubyte initially_triggered /**< */ , int fence_fd /**< */ );
386 
387 /**
388  *
389  * @param c The connection
390  * @return A cookie
391  *
392  * Delivers a request to the X server.
393  *
394  */
395 xcb_dri3_fd_from_fence_cookie_t xcb_dri3_fd_from_fence(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ , uint fence /**< */ );
396 
397 /**
398  *
399  * @param c The connection
400  * @return A cookie
401  *
402  * Delivers a request to the X server.
403  *
404  * This form can be used only if the request will cause
405  * a reply to be generated. Any returned error will be
406  * placed in the event queue.
407  */
408 xcb_dri3_fd_from_fence_cookie_t xcb_dri3_fd_from_fence_unchecked(xcb_connection_t* c /**< */ , xcb_drawable_t drawable /**< */ ,
409 	uint fence /**< */ );
410 
411 /**
412  * Return the reply
413  * @param c      The connection
414  * @param cookie The cookie
415  * @param e      The xcb_generic_error_t supplied
416  *
417  * Returns the reply of the request asked by
418  *
419  * The parameter @p e supplied to this function must be NULL if
420  * xcb_dri3_fd_from_fence_unchecked(). is used.
421  * Otherwise, it stores the error if any.
422  *
423  * The returned value must be freed by the caller using free().
424  */
425 xcb_dri3_fd_from_fence_reply_t* xcb_dri3_fd_from_fence_reply(xcb_connection_t* c /**< */ , xcb_dri3_fd_from_fence_cookie_t cookie /**< */ ,
426 	xcb_generic_error_t** e /**< */ );
427 
428 /**
429  * Return the reply fds
430  * @param c      The connection
431  * @param reply  The reply
432  *
433  * Returns the array of reply fds of the request asked by
434  *
435  * The returned value must be freed by the caller using free().
436  */
437 int* xcb_dri3_fd_from_fence_reply_fds(xcb_connection_t* c /**< */ , xcb_dri3_fd_from_fence_reply_t* reply /**< */ );
438 
439 /**
440  * @}
441  */