1 /*
2  * This file generated automatically from xinerama.xml by d_client.py.
3  * Edit at your peril.
4  */
5 
6 /**
7  * @defgroup XCB_Xinerama_API XCB Xinerama API
8  * @brief Xinerama XCB Protocol Implementation.
9  * @{
10  **/
11 
12 module xcb.xinerama;
13 
14 import xcb.xcb;
15 import xcb.xproto;
16 
17 extern (C):
18 
19 enum int XCB_XINERAMA_MAJOR_VERSION = 1;
20 enum int XCB_XINERAMA_MINOR_VERSION = 1;
21 
22 extern (C) __gshared extern xcb_extension_t xcb_xinerama_id;
23 
24 /**
25  * @brief xcb_xinerama_screen_info_t
26  **/
27 struct xcb_xinerama_screen_info_t {
28 	short x_org; /**<  */
29 	short y_org; /**<  */
30 	ushort width; /**<  */
31 	ushort height; /**<  */
32 }
33 
34 /**
35  * @brief xcb_xinerama_screen_info_iterator_t
36  **/
37 struct xcb_xinerama_screen_info_iterator_t {
38 	xcb_xinerama_screen_info_t* data; /**<  */
39 	int rem; /**<  */
40 	int index; /**<  */
41 }
42 
43 /**
44  * @brief xcb_xinerama_query_version_cookie_t
45  **/
46 struct xcb_xinerama_query_version_cookie_t {
47 	uint sequence; /**<  */
48 }
49 
50 /** Opcode for xcb_xinerama_query_version. */
51 enum XCB_XINERAMA_QUERY_VERSION = 0;
52 
53 /**
54  * @brief xcb_xinerama_query_version_request_t
55  **/
56 struct xcb_xinerama_query_version_request_t {
57 	ubyte major_opcode; /**<  */
58 	ubyte minor_opcode; /**<  */
59 	ushort length; /**<  */
60 	ubyte major; /**<  */
61 	ubyte minor; /**<  */
62 }
63 
64 /**
65  * @brief xcb_xinerama_query_version_reply_t
66  **/
67 struct xcb_xinerama_query_version_reply_t {
68 	ubyte response_type; /**<  */
69 	ubyte pad0; /**<  */
70 	ushort sequence; /**<  */
71 	uint length; /**<  */
72 	ushort major; /**<  */
73 	ushort minor; /**<  */
74 }
75 
76 /**
77  * @brief xcb_xinerama_get_state_cookie_t
78  **/
79 struct xcb_xinerama_get_state_cookie_t {
80 	uint sequence; /**<  */
81 }
82 
83 /** Opcode for xcb_xinerama_get_state. */
84 enum XCB_XINERAMA_GET_STATE = 1;
85 
86 /**
87  * @brief xcb_xinerama_get_state_request_t
88  **/
89 struct xcb_xinerama_get_state_request_t {
90 	ubyte major_opcode; /**<  */
91 	ubyte minor_opcode; /**<  */
92 	ushort length; /**<  */
93 	xcb_window_t window; /**<  */
94 }
95 
96 /**
97  * @brief xcb_xinerama_get_state_reply_t
98  **/
99 struct xcb_xinerama_get_state_reply_t {
100 	ubyte response_type; /**<  */
101 	ubyte state; /**<  */
102 	ushort sequence; /**<  */
103 	uint length; /**<  */
104 	xcb_window_t window; /**<  */
105 }
106 
107 /**
108  * @brief xcb_xinerama_get_screen_count_cookie_t
109  **/
110 struct xcb_xinerama_get_screen_count_cookie_t {
111 	uint sequence; /**<  */
112 }
113 
114 /** Opcode for xcb_xinerama_get_screen_count. */
115 enum XCB_XINERAMA_GET_SCREEN_COUNT = 2;
116 
117 /**
118  * @brief xcb_xinerama_get_screen_count_request_t
119  **/
120 struct xcb_xinerama_get_screen_count_request_t {
121 	ubyte major_opcode; /**<  */
122 	ubyte minor_opcode; /**<  */
123 	ushort length; /**<  */
124 	xcb_window_t window; /**<  */
125 }
126 
127 /**
128  * @brief xcb_xinerama_get_screen_count_reply_t
129  **/
130 struct xcb_xinerama_get_screen_count_reply_t {
131 	ubyte response_type; /**<  */
132 	ubyte screen_count; /**<  */
133 	ushort sequence; /**<  */
134 	uint length; /**<  */
135 	xcb_window_t window; /**<  */
136 }
137 
138 /**
139  * @brief xcb_xinerama_get_screen_size_cookie_t
140  **/
141 struct xcb_xinerama_get_screen_size_cookie_t {
142 	uint sequence; /**<  */
143 }
144 
145 /** Opcode for xcb_xinerama_get_screen_size. */
146 enum XCB_XINERAMA_GET_SCREEN_SIZE = 3;
147 
148 /**
149  * @brief xcb_xinerama_get_screen_size_request_t
150  **/
151 struct xcb_xinerama_get_screen_size_request_t {
152 	ubyte major_opcode; /**<  */
153 	ubyte minor_opcode; /**<  */
154 	ushort length; /**<  */
155 	xcb_window_t window; /**<  */
156 	uint screen; /**<  */
157 }
158 
159 /**
160  * @brief xcb_xinerama_get_screen_size_reply_t
161  **/
162 struct xcb_xinerama_get_screen_size_reply_t {
163 	ubyte response_type; /**<  */
164 	ubyte pad0; /**<  */
165 	ushort sequence; /**<  */
166 	uint length; /**<  */
167 	uint width; /**<  */
168 	uint height; /**<  */
169 	xcb_window_t window; /**<  */
170 	uint screen; /**<  */
171 }
172 
173 /**
174  * @brief xcb_xinerama_is_active_cookie_t
175  **/
176 struct xcb_xinerama_is_active_cookie_t {
177 	uint sequence; /**<  */
178 }
179 
180 /** Opcode for xcb_xinerama_is_active. */
181 enum XCB_XINERAMA_IS_ACTIVE = 4;
182 
183 /**
184  * @brief xcb_xinerama_is_active_request_t
185  **/
186 struct xcb_xinerama_is_active_request_t {
187 	ubyte major_opcode; /**<  */
188 	ubyte minor_opcode; /**<  */
189 	ushort length; /**<  */
190 }
191 
192 /**
193  * @brief xcb_xinerama_is_active_reply_t
194  **/
195 struct xcb_xinerama_is_active_reply_t {
196 	ubyte response_type; /**<  */
197 	ubyte pad0; /**<  */
198 	ushort sequence; /**<  */
199 	uint length; /**<  */
200 	uint state; /**<  */
201 }
202 
203 /**
204  * @brief xcb_xinerama_query_screens_cookie_t
205  **/
206 struct xcb_xinerama_query_screens_cookie_t {
207 	uint sequence; /**<  */
208 }
209 
210 /** Opcode for xcb_xinerama_query_screens. */
211 enum XCB_XINERAMA_QUERY_SCREENS = 5;
212 
213 /**
214  * @brief xcb_xinerama_query_screens_request_t
215  **/
216 struct xcb_xinerama_query_screens_request_t {
217 	ubyte major_opcode; /**<  */
218 	ubyte minor_opcode; /**<  */
219 	ushort length; /**<  */
220 }
221 
222 /**
223  * @brief xcb_xinerama_query_screens_reply_t
224  **/
225 struct xcb_xinerama_query_screens_reply_t {
226 	ubyte response_type; /**<  */
227 	ubyte pad0; /**<  */
228 	ushort sequence; /**<  */
229 	uint length; /**<  */
230 	uint number; /**<  */
231 	ubyte[20] pad1; /**<  */
232 }
233 
234 /**
235  * Get the next element of the iterator
236  * @param i Pointer to a xcb_xinerama_screen_info_iterator_t
237  *
238  * Get the next element in the iterator. The member rem is
239  * decreased by one. The member data points to the next
240  * element. The member index is increased by sizeof(xcb_xinerama_screen_info_t)
241  */
242 void xcb_xinerama_screen_info_next(xcb_xinerama_screen_info_iterator_t* i /**< */ );
243 
244 /**
245  * Return the iterator pointing to the last element
246  * @param i An xcb_xinerama_screen_info_iterator_t
247  * @return  The iterator pointing to the last element
248  *
249  * Set the current element in the iterator to the last element.
250  * The member rem is set to 0. The member data points to the
251  * last element.
252  */
253 xcb_generic_iterator_t xcb_xinerama_screen_info_end(xcb_xinerama_screen_info_iterator_t i /**< */ );
254 
255 /**
256  *
257  * @param c The connection
258  * @return A cookie
259  *
260  * Delivers a request to the X server.
261  *
262  */
263 xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version(xcb_connection_t* c /**< */ , ubyte major /**< */ , ubyte minor /**< */ );
264 
265 /**
266  *
267  * @param c The connection
268  * @return A cookie
269  *
270  * Delivers a request to the X server.
271  *
272  * This form can be used only if the request will cause
273  * a reply to be generated. Any returned error will be
274  * placed in the event queue.
275  */
276 xcb_xinerama_query_version_cookie_t xcb_xinerama_query_version_unchecked(xcb_connection_t* c /**< */ , ubyte major /**< */ ,
277 	ubyte minor /**< */ );
278 
279 /**
280  * Return the reply
281  * @param c      The connection
282  * @param cookie The cookie
283  * @param e      The xcb_generic_error_t supplied
284  *
285  * Returns the reply of the request asked by
286  *
287  * The parameter @p e supplied to this function must be NULL if
288  * xcb_xinerama_query_version_unchecked(). is used.
289  * Otherwise, it stores the error if any.
290  *
291  * The returned value must be freed by the caller using free().
292  */
293 xcb_xinerama_query_version_reply_t* xcb_xinerama_query_version_reply(xcb_connection_t* c /**< */ ,
294 	xcb_xinerama_query_version_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
295 
296 /**
297  *
298  * @param c The connection
299  * @return A cookie
300  *
301  * Delivers a request to the X server.
302  *
303  */
304 xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ );
305 
306 /**
307  *
308  * @param c The connection
309  * @return A cookie
310  *
311  * Delivers a request to the X server.
312  *
313  * This form can be used only if the request will cause
314  * a reply to be generated. Any returned error will be
315  * placed in the event queue.
316  */
317 xcb_xinerama_get_state_cookie_t xcb_xinerama_get_state_unchecked(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ );
318 
319 /**
320  * Return the reply
321  * @param c      The connection
322  * @param cookie The cookie
323  * @param e      The xcb_generic_error_t supplied
324  *
325  * Returns the reply of the request asked by
326  *
327  * The parameter @p e supplied to this function must be NULL if
328  * xcb_xinerama_get_state_unchecked(). is used.
329  * Otherwise, it stores the error if any.
330  *
331  * The returned value must be freed by the caller using free().
332  */
333 xcb_xinerama_get_state_reply_t* xcb_xinerama_get_state_reply(xcb_connection_t* c /**< */ , xcb_xinerama_get_state_cookie_t cookie /**< */ ,
334 	xcb_generic_error_t** e /**< */ );
335 
336 /**
337  *
338  * @param c The connection
339  * @return A cookie
340  *
341  * Delivers a request to the X server.
342  *
343  */
344 xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ );
345 
346 /**
347  *
348  * @param c The connection
349  * @return A cookie
350  *
351  * Delivers a request to the X server.
352  *
353  * This form can be used only if the request will cause
354  * a reply to be generated. Any returned error will be
355  * placed in the event queue.
356  */
357 xcb_xinerama_get_screen_count_cookie_t xcb_xinerama_get_screen_count_unchecked(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ );
358 
359 /**
360  * Return the reply
361  * @param c      The connection
362  * @param cookie The cookie
363  * @param e      The xcb_generic_error_t supplied
364  *
365  * Returns the reply of the request asked by
366  *
367  * The parameter @p e supplied to this function must be NULL if
368  * xcb_xinerama_get_screen_count_unchecked(). is used.
369  * Otherwise, it stores the error if any.
370  *
371  * The returned value must be freed by the caller using free().
372  */
373 xcb_xinerama_get_screen_count_reply_t* xcb_xinerama_get_screen_count_reply(xcb_connection_t* c /**< */ ,
374 	xcb_xinerama_get_screen_count_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
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_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ ,
385 	uint screen /**< */ );
386 
387 /**
388  *
389  * @param c The connection
390  * @return A cookie
391  *
392  * Delivers a request to the X server.
393  *
394  * This form can be used only if the request will cause
395  * a reply to be generated. Any returned error will be
396  * placed in the event queue.
397  */
398 xcb_xinerama_get_screen_size_cookie_t xcb_xinerama_get_screen_size_unchecked(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ ,
399 	uint screen /**< */ );
400 
401 /**
402  * Return the reply
403  * @param c      The connection
404  * @param cookie The cookie
405  * @param e      The xcb_generic_error_t supplied
406  *
407  * Returns the reply of the request asked by
408  *
409  * The parameter @p e supplied to this function must be NULL if
410  * xcb_xinerama_get_screen_size_unchecked(). is used.
411  * Otherwise, it stores the error if any.
412  *
413  * The returned value must be freed by the caller using free().
414  */
415 xcb_xinerama_get_screen_size_reply_t* xcb_xinerama_get_screen_size_reply(xcb_connection_t* c /**< */ ,
416 	xcb_xinerama_get_screen_size_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
417 
418 /**
419  *
420  * @param c The connection
421  * @return A cookie
422  *
423  * Delivers a request to the X server.
424  *
425  */
426 xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active(xcb_connection_t* c /**< */ );
427 
428 /**
429  *
430  * @param c The connection
431  * @return A cookie
432  *
433  * Delivers a request to the X server.
434  *
435  * This form can be used only if the request will cause
436  * a reply to be generated. Any returned error will be
437  * placed in the event queue.
438  */
439 xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active_unchecked(xcb_connection_t* c /**< */ );
440 
441 /**
442  * Return the reply
443  * @param c      The connection
444  * @param cookie The cookie
445  * @param e      The xcb_generic_error_t supplied
446  *
447  * Returns the reply of the request asked by
448  *
449  * The parameter @p e supplied to this function must be NULL if
450  * xcb_xinerama_is_active_unchecked(). is used.
451  * Otherwise, it stores the error if any.
452  *
453  * The returned value must be freed by the caller using free().
454  */
455 xcb_xinerama_is_active_reply_t* xcb_xinerama_is_active_reply(xcb_connection_t* c /**< */ , xcb_xinerama_is_active_cookie_t cookie /**< */ ,
456 	xcb_generic_error_t** e /**< */ );
457 
458 int xcb_xinerama_query_screens_sizeof(const void* _buffer /**< */ );
459 
460 /**
461  *
462  * @param c The connection
463  * @return A cookie
464  *
465  * Delivers a request to the X server.
466  *
467  */
468 xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens(xcb_connection_t* c /**< */ );
469 
470 /**
471  *
472  * @param c The connection
473  * @return A cookie
474  *
475  * Delivers a request to the X server.
476  *
477  * This form can be used only if the request will cause
478  * a reply to be generated. Any returned error will be
479  * placed in the event queue.
480  */
481 xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens_unchecked(xcb_connection_t* c /**< */ );
482 
483 xcb_xinerama_screen_info_t* xcb_xinerama_query_screens_screen_info(const xcb_xinerama_query_screens_reply_t* R /**< */ );
484 
485 int xcb_xinerama_query_screens_screen_info_length(const xcb_xinerama_query_screens_reply_t* R /**< */ );
486 
487 xcb_xinerama_screen_info_iterator_t xcb_xinerama_query_screens_screen_info_iterator(const xcb_xinerama_query_screens_reply_t* R /**< */ );
488 
489 /**
490  * Return the reply
491  * @param c      The connection
492  * @param cookie The cookie
493  * @param e      The xcb_generic_error_t supplied
494  *
495  * Returns the reply of the request asked by
496  *
497  * The parameter @p e supplied to this function must be NULL if
498  * xcb_xinerama_query_screens_unchecked(). is used.
499  * Otherwise, it stores the error if any.
500  *
501  * The returned value must be freed by the caller using free().
502  */
503 xcb_xinerama_query_screens_reply_t* xcb_xinerama_query_screens_reply(xcb_connection_t* c /**< */ ,
504 	xcb_xinerama_query_screens_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
505 
506 /**
507  * @}
508  */