1 /*
2  * This file generated automatically from xevie.xml by d_client.py.
3  * Edit at your peril.
4  */
5 
6 /**
7  * @defgroup XCB_Xevie_API XCB Xevie API
8  * @brief Xevie XCB Protocol Implementation.
9  * @{
10  **/
11 
12 module xcb.xevie;
13 
14 import xcb.xcb;
15 
16 extern (C):
17 
18 enum int XCB_XEVIE_MAJOR_VERSION = 1;
19 enum int XCB_XEVIE_MINOR_VERSION = 0;
20 
21 extern (C) __gshared extern xcb_extension_t xcb_xevie_id;
22 
23 /**
24  * @brief xcb_xevie_query_version_cookie_t
25  **/
26 struct xcb_xevie_query_version_cookie_t {
27 	uint sequence; /**<  */
28 }
29 
30 /** Opcode for xcb_xevie_query_version. */
31 enum XCB_XEVIE_QUERY_VERSION = 0;
32 
33 /**
34  * @brief xcb_xevie_query_version_request_t
35  **/
36 struct xcb_xevie_query_version_request_t {
37 	ubyte major_opcode; /**<  */
38 	ubyte minor_opcode; /**<  */
39 	ushort length; /**<  */
40 	ushort client_major_version; /**<  */
41 	ushort client_minor_version; /**<  */
42 }
43 
44 /**
45  * @brief xcb_xevie_query_version_reply_t
46  **/
47 struct xcb_xevie_query_version_reply_t {
48 	ubyte response_type; /**<  */
49 	ubyte pad0; /**<  */
50 	ushort sequence; /**<  */
51 	uint length; /**<  */
52 	ushort server_major_version; /**<  */
53 	ushort server_minor_version; /**<  */
54 	ubyte[20] pad1; /**<  */
55 }
56 
57 /**
58  * @brief xcb_xevie_start_cookie_t
59  **/
60 struct xcb_xevie_start_cookie_t {
61 	uint sequence; /**<  */
62 }
63 
64 /** Opcode for xcb_xevie_start. */
65 enum XCB_XEVIE_START = 1;
66 
67 /**
68  * @brief xcb_xevie_start_request_t
69  **/
70 struct xcb_xevie_start_request_t {
71 	ubyte major_opcode; /**<  */
72 	ubyte minor_opcode; /**<  */
73 	ushort length; /**<  */
74 	uint screen; /**<  */
75 }
76 
77 /**
78  * @brief xcb_xevie_start_reply_t
79  **/
80 struct xcb_xevie_start_reply_t {
81 	ubyte response_type; /**<  */
82 	ubyte pad0; /**<  */
83 	ushort sequence; /**<  */
84 	uint length; /**<  */
85 	ubyte[24] pad1; /**<  */
86 }
87 
88 /**
89  * @brief xcb_xevie_end_cookie_t
90  **/
91 struct xcb_xevie_end_cookie_t {
92 	uint sequence; /**<  */
93 }
94 
95 /** Opcode for xcb_xevie_end. */
96 enum XCB_XEVIE_END = 2;
97 
98 /**
99  * @brief xcb_xevie_end_request_t
100  **/
101 struct xcb_xevie_end_request_t {
102 	ubyte major_opcode; /**<  */
103 	ubyte minor_opcode; /**<  */
104 	ushort length; /**<  */
105 	uint cmap; /**<  */
106 }
107 
108 /**
109  * @brief xcb_xevie_end_reply_t
110  **/
111 struct xcb_xevie_end_reply_t {
112 	ubyte response_type; /**<  */
113 	ubyte pad0; /**<  */
114 	ushort sequence; /**<  */
115 	uint length; /**<  */
116 	ubyte[24] pad1; /**<  */
117 }
118 
119 enum xcb_xevie_datatype_t {
120 	XCB_XEVIE_DATATYPE_UNMODIFIED = 0,
121 	XCB_XEVIE_DATATYPE_MODIFIED = 1
122 }
123 
124 alias XCB_XEVIE_DATATYPE_UNMODIFIED = xcb_xevie_datatype_t.XCB_XEVIE_DATATYPE_UNMODIFIED;
125 alias XCB_XEVIE_DATATYPE_MODIFIED = xcb_xevie_datatype_t.XCB_XEVIE_DATATYPE_MODIFIED;
126 
127 /**
128  * @brief xcb_xevie_event_t
129  **/
130 struct xcb_xevie_event_t {
131 	ubyte[32] pad0; /**<  */
132 }
133 
134 /**
135  * @brief xcb_xevie_event_iterator_t
136  **/
137 struct xcb_xevie_event_iterator_t {
138 	xcb_xevie_event_t* data; /**<  */
139 	int rem; /**<  */
140 	int index; /**<  */
141 }
142 
143 /**
144  * @brief xcb_xevie_send_cookie_t
145  **/
146 struct xcb_xevie_send_cookie_t {
147 	uint sequence; /**<  */
148 }
149 
150 /** Opcode for xcb_xevie_send. */
151 enum XCB_XEVIE_SEND = 3;
152 
153 /**
154  * @brief xcb_xevie_send_request_t
155  **/
156 struct xcb_xevie_send_request_t {
157 	ubyte major_opcode; /**<  */
158 	ubyte minor_opcode; /**<  */
159 	ushort length; /**<  */
160 	xcb_xevie_event_t event; /**<  */
161 	uint data_type; /**<  */
162 	ubyte[64] pad0; /**<  */
163 }
164 
165 /**
166  * @brief xcb_xevie_send_reply_t
167  **/
168 struct xcb_xevie_send_reply_t {
169 	ubyte response_type; /**<  */
170 	ubyte pad0; /**<  */
171 	ushort sequence; /**<  */
172 	uint length; /**<  */
173 	ubyte[24] pad1; /**<  */
174 }
175 
176 /**
177  * @brief xcb_xevie_select_input_cookie_t
178  **/
179 struct xcb_xevie_select_input_cookie_t {
180 	uint sequence; /**<  */
181 }
182 
183 /** Opcode for xcb_xevie_select_input. */
184 enum XCB_XEVIE_SELECT_INPUT = 4;
185 
186 /**
187  * @brief xcb_xevie_select_input_request_t
188  **/
189 struct xcb_xevie_select_input_request_t {
190 	ubyte major_opcode; /**<  */
191 	ubyte minor_opcode; /**<  */
192 	ushort length; /**<  */
193 	uint event_mask; /**<  */
194 }
195 
196 /**
197  * @brief xcb_xevie_select_input_reply_t
198  **/
199 struct xcb_xevie_select_input_reply_t {
200 	ubyte response_type; /**<  */
201 	ubyte pad0; /**<  */
202 	ushort sequence; /**<  */
203 	uint length; /**<  */
204 	ubyte[24] pad1; /**<  */
205 }
206 
207 /**
208  *
209  * @param c The connection
210  * @return A cookie
211  *
212  * Delivers a request to the X server.
213  *
214  */
215 xcb_xevie_query_version_cookie_t xcb_xevie_query_version(xcb_connection_t* c /**< */ , ushort client_major_version /**< */ ,
216 	ushort client_minor_version /**< */ );
217 
218 /**
219  *
220  * @param c The connection
221  * @return A cookie
222  *
223  * Delivers a request to the X server.
224  *
225  * This form can be used only if the request will cause
226  * a reply to be generated. Any returned error will be
227  * placed in the event queue.
228  */
229 xcb_xevie_query_version_cookie_t xcb_xevie_query_version_unchecked(xcb_connection_t* c /**< */ ,
230 	ushort client_major_version /**< */ , ushort client_minor_version /**< */ );
231 
232 /**
233  * Return the reply
234  * @param c      The connection
235  * @param cookie The cookie
236  * @param e      The xcb_generic_error_t supplied
237  *
238  * Returns the reply of the request asked by
239  *
240  * The parameter @p e supplied to this function must be NULL if
241  * xcb_xevie_query_version_unchecked(). is used.
242  * Otherwise, it stores the error if any.
243  *
244  * The returned value must be freed by the caller using free().
245  */
246 xcb_xevie_query_version_reply_t* xcb_xevie_query_version_reply(xcb_connection_t* c /**< */ ,
247 	xcb_xevie_query_version_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
248 
249 /**
250  *
251  * @param c The connection
252  * @return A cookie
253  *
254  * Delivers a request to the X server.
255  *
256  */
257 xcb_xevie_start_cookie_t xcb_xevie_start(xcb_connection_t* c /**< */ , uint screen /**< */ );
258 
259 /**
260  *
261  * @param c The connection
262  * @return A cookie
263  *
264  * Delivers a request to the X server.
265  *
266  * This form can be used only if the request will cause
267  * a reply to be generated. Any returned error will be
268  * placed in the event queue.
269  */
270 xcb_xevie_start_cookie_t xcb_xevie_start_unchecked(xcb_connection_t* c /**< */ , uint screen /**< */ );
271 
272 /**
273  * Return the reply
274  * @param c      The connection
275  * @param cookie The cookie
276  * @param e      The xcb_generic_error_t supplied
277  *
278  * Returns the reply of the request asked by
279  *
280  * The parameter @p e supplied to this function must be NULL if
281  * xcb_xevie_start_unchecked(). is used.
282  * Otherwise, it stores the error if any.
283  *
284  * The returned value must be freed by the caller using free().
285  */
286 xcb_xevie_start_reply_t* xcb_xevie_start_reply(xcb_connection_t* c /**< */ , xcb_xevie_start_cookie_t cookie /**< */ ,
287 	xcb_generic_error_t** e /**< */ );
288 
289 /**
290  *
291  * @param c The connection
292  * @return A cookie
293  *
294  * Delivers a request to the X server.
295  *
296  */
297 xcb_xevie_end_cookie_t xcb_xevie_end(xcb_connection_t* c /**< */ , uint cmap /**< */ );
298 
299 /**
300  *
301  * @param c The connection
302  * @return A cookie
303  *
304  * Delivers a request to the X server.
305  *
306  * This form can be used only if the request will cause
307  * a reply to be generated. Any returned error will be
308  * placed in the event queue.
309  */
310 xcb_xevie_end_cookie_t xcb_xevie_end_unchecked(xcb_connection_t* c /**< */ , uint cmap /**< */ );
311 
312 /**
313  * Return the reply
314  * @param c      The connection
315  * @param cookie The cookie
316  * @param e      The xcb_generic_error_t supplied
317  *
318  * Returns the reply of the request asked by
319  *
320  * The parameter @p e supplied to this function must be NULL if
321  * xcb_xevie_end_unchecked(). is used.
322  * Otherwise, it stores the error if any.
323  *
324  * The returned value must be freed by the caller using free().
325  */
326 xcb_xevie_end_reply_t* xcb_xevie_end_reply(xcb_connection_t* c /**< */ , xcb_xevie_end_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
327 
328 /**
329  * Get the next element of the iterator
330  * @param i Pointer to a xcb_xevie_event_iterator_t
331  *
332  * Get the next element in the iterator. The member rem is
333  * decreased by one. The member data points to the next
334  * element. The member index is increased by sizeof(xcb_xevie_event_t)
335  */
336 void xcb_xevie_event_next(xcb_xevie_event_iterator_t* i /**< */ );
337 
338 /**
339  * Return the iterator pointing to the last element
340  * @param i An xcb_xevie_event_iterator_t
341  * @return  The iterator pointing to the last element
342  *
343  * Set the current element in the iterator to the last element.
344  * The member rem is set to 0. The member data points to the
345  * last element.
346  */
347 xcb_generic_iterator_t xcb_xevie_event_end(xcb_xevie_event_iterator_t i /**< */ );
348 
349 /**
350  *
351  * @param c The connection
352  * @return A cookie
353  *
354  * Delivers a request to the X server.
355  *
356  */
357 xcb_xevie_send_cookie_t xcb_xevie_send(xcb_connection_t* c /**< */ , xcb_xevie_event_t event /**< */ , uint data_type /**< */ );
358 
359 /**
360  *
361  * @param c The connection
362  * @return A cookie
363  *
364  * Delivers a request to the X server.
365  *
366  * This form can be used only if the request will cause
367  * a reply to be generated. Any returned error will be
368  * placed in the event queue.
369  */
370 xcb_xevie_send_cookie_t xcb_xevie_send_unchecked(xcb_connection_t* c /**< */ , xcb_xevie_event_t event /**< */ , uint data_type /**< */ );
371 
372 /**
373  * Return the reply
374  * @param c      The connection
375  * @param cookie The cookie
376  * @param e      The xcb_generic_error_t supplied
377  *
378  * Returns the reply of the request asked by
379  *
380  * The parameter @p e supplied to this function must be NULL if
381  * xcb_xevie_send_unchecked(). is used.
382  * Otherwise, it stores the error if any.
383  *
384  * The returned value must be freed by the caller using free().
385  */
386 xcb_xevie_send_reply_t* xcb_xevie_send_reply(xcb_connection_t* c /**< */ , xcb_xevie_send_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ );
387 
388 /**
389  *
390  * @param c The connection
391  * @return A cookie
392  *
393  * Delivers a request to the X server.
394  *
395  */
396 xcb_xevie_select_input_cookie_t xcb_xevie_select_input(xcb_connection_t* c /**< */ , uint event_mask /**< */ );
397 
398 /**
399  *
400  * @param c The connection
401  * @return A cookie
402  *
403  * Delivers a request to the X server.
404  *
405  * This form can be used only if the request will cause
406  * a reply to be generated. Any returned error will be
407  * placed in the event queue.
408  */
409 xcb_xevie_select_input_cookie_t xcb_xevie_select_input_unchecked(xcb_connection_t* c /**< */ , uint event_mask /**< */ );
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_xevie_select_input_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_xevie_select_input_reply_t* xcb_xevie_select_input_reply(xcb_connection_t* c /**< */ , xcb_xevie_select_input_cookie_t cookie /**< */ ,
426 	xcb_generic_error_t** e /**< */ );
427 
428 /**
429  * @}
430  */