1/*
2 * This file generated automatically from res.xml by c_client.py.
3 * Edit at your peril.
4 */
5
6/**
7 * @defgroup XCB_Res_API XCB Res API
8 * @brief Res XCB Protocol Implementation.
9 * @{
10 **/
11
12#ifndef __RES_H
13#define __RES_H
14
15#include "xcb.h"
16#include "xproto.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#define XCB_RES_MAJOR_VERSION 1
23#define XCB_RES_MINOR_VERSION 0
24
25extern xcb_extension_t xcb_res_id;
26
27/**
28 * @brief xcb_res_client_t
29 **/
30typedef struct xcb_res_client_t {
31    uint32_t resource_base; /**<  */
32    uint32_t resource_mask; /**<  */
33} xcb_res_client_t;
34
35/**
36 * @brief xcb_res_client_iterator_t
37 **/
38typedef struct xcb_res_client_iterator_t {
39    xcb_res_client_t *data; /**<  */
40    int               rem; /**<  */
41    int               index; /**<  */
42} xcb_res_client_iterator_t;
43
44/**
45 * @brief xcb_res_type_t
46 **/
47typedef struct xcb_res_type_t {
48    xcb_atom_t resource_type; /**<  */
49    uint32_t   count; /**<  */
50} xcb_res_type_t;
51
52/**
53 * @brief xcb_res_type_iterator_t
54 **/
55typedef struct xcb_res_type_iterator_t {
56    xcb_res_type_t *data; /**<  */
57    int             rem; /**<  */
58    int             index; /**<  */
59} xcb_res_type_iterator_t;
60
61/**
62 * @brief xcb_res_query_version_cookie_t
63 **/
64typedef struct xcb_res_query_version_cookie_t {
65    unsigned int sequence; /**<  */
66} xcb_res_query_version_cookie_t;
67
68/** Opcode for xcb_res_query_version. */
69#define XCB_RES_QUERY_VERSION 0
70
71/**
72 * @brief xcb_res_query_version_request_t
73 **/
74typedef struct xcb_res_query_version_request_t {
75    uint8_t  major_opcode; /**<  */
76    uint8_t  minor_opcode; /**<  */
77    uint16_t length; /**<  */
78    uint8_t  client_major; /**<  */
79    uint8_t  client_minor; /**<  */
80} xcb_res_query_version_request_t;
81
82/**
83 * @brief xcb_res_query_version_reply_t
84 **/
85typedef struct xcb_res_query_version_reply_t {
86    uint8_t  response_type; /**<  */
87    uint8_t  pad0; /**<  */
88    uint16_t sequence; /**<  */
89    uint32_t length; /**<  */
90    uint16_t server_major; /**<  */
91    uint16_t server_minor; /**<  */
92} xcb_res_query_version_reply_t;
93
94/**
95 * @brief xcb_res_query_clients_cookie_t
96 **/
97typedef struct xcb_res_query_clients_cookie_t {
98    unsigned int sequence; /**<  */
99} xcb_res_query_clients_cookie_t;
100
101/** Opcode for xcb_res_query_clients. */
102#define XCB_RES_QUERY_CLIENTS 1
103
104/**
105 * @brief xcb_res_query_clients_request_t
106 **/
107typedef struct xcb_res_query_clients_request_t {
108    uint8_t  major_opcode; /**<  */
109    uint8_t  minor_opcode; /**<  */
110    uint16_t length; /**<  */
111} xcb_res_query_clients_request_t;
112
113/**
114 * @brief xcb_res_query_clients_reply_t
115 **/
116typedef struct xcb_res_query_clients_reply_t {
117    uint8_t  response_type; /**<  */
118    uint8_t  pad0; /**<  */
119    uint16_t sequence; /**<  */
120    uint32_t length; /**<  */
121    uint32_t num_clients; /**<  */
122    uint8_t  pad1[20]; /**<  */
123} xcb_res_query_clients_reply_t;
124
125/**
126 * @brief xcb_res_query_client_resources_cookie_t
127 **/
128typedef struct xcb_res_query_client_resources_cookie_t {
129    unsigned int sequence; /**<  */
130} xcb_res_query_client_resources_cookie_t;
131
132/** Opcode for xcb_res_query_client_resources. */
133#define XCB_RES_QUERY_CLIENT_RESOURCES 2
134
135/**
136 * @brief xcb_res_query_client_resources_request_t
137 **/
138typedef struct xcb_res_query_client_resources_request_t {
139    uint8_t  major_opcode; /**<  */
140    uint8_t  minor_opcode; /**<  */
141    uint16_t length; /**<  */
142    uint32_t xid; /**<  */
143} xcb_res_query_client_resources_request_t;
144
145/**
146 * @brief xcb_res_query_client_resources_reply_t
147 **/
148typedef struct xcb_res_query_client_resources_reply_t {
149    uint8_t  response_type; /**<  */
150    uint8_t  pad0; /**<  */
151    uint16_t sequence; /**<  */
152    uint32_t length; /**<  */
153    uint32_t num_types; /**<  */
154    uint8_t  pad1[20]; /**<  */
155} xcb_res_query_client_resources_reply_t;
156
157/**
158 * @brief xcb_res_query_client_pixmap_bytes_cookie_t
159 **/
160typedef struct xcb_res_query_client_pixmap_bytes_cookie_t {
161    unsigned int sequence; /**<  */
162} xcb_res_query_client_pixmap_bytes_cookie_t;
163
164/** Opcode for xcb_res_query_client_pixmap_bytes. */
165#define XCB_RES_QUERY_CLIENT_PIXMAP_BYTES 3
166
167/**
168 * @brief xcb_res_query_client_pixmap_bytes_request_t
169 **/
170typedef struct xcb_res_query_client_pixmap_bytes_request_t {
171    uint8_t  major_opcode; /**<  */
172    uint8_t  minor_opcode; /**<  */
173    uint16_t length; /**<  */
174    uint32_t xid; /**<  */
175} xcb_res_query_client_pixmap_bytes_request_t;
176
177/**
178 * @brief xcb_res_query_client_pixmap_bytes_reply_t
179 **/
180typedef struct xcb_res_query_client_pixmap_bytes_reply_t {
181    uint8_t  response_type; /**<  */
182    uint8_t  pad0; /**<  */
183    uint16_t sequence; /**<  */
184    uint32_t length; /**<  */
185    uint32_t bytes; /**<  */
186    uint32_t bytes_overflow; /**<  */
187} xcb_res_query_client_pixmap_bytes_reply_t;
188
189/**
190 * Get the next element of the iterator
191 * @param i Pointer to a xcb_res_client_iterator_t
192 *
193 * Get the next element in the iterator. The member rem is
194 * decreased by one. The member data points to the next
195 * element. The member index is increased by sizeof(xcb_res_client_t)
196 */
197
198/*****************************************************************************
199 **
200 ** void xcb_res_client_next
201 **
202 ** @param xcb_res_client_iterator_t *i
203 ** @returns void
204 **
205 *****************************************************************************/
206
207void
208xcb_res_client_next (xcb_res_client_iterator_t *i  /**< */);
209
210/**
211 * Return the iterator pointing to the last element
212 * @param i An xcb_res_client_iterator_t
213 * @return  The iterator pointing to the last element
214 *
215 * Set the current element in the iterator to the last element.
216 * The member rem is set to 0. The member data points to the
217 * last element.
218 */
219
220/*****************************************************************************
221 **
222 ** xcb_generic_iterator_t xcb_res_client_end
223 **
224 ** @param xcb_res_client_iterator_t i
225 ** @returns xcb_generic_iterator_t
226 **
227 *****************************************************************************/
228
229xcb_generic_iterator_t
230xcb_res_client_end (xcb_res_client_iterator_t i  /**< */);
231
232/**
233 * Get the next element of the iterator
234 * @param i Pointer to a xcb_res_type_iterator_t
235 *
236 * Get the next element in the iterator. The member rem is
237 * decreased by one. The member data points to the next
238 * element. The member index is increased by sizeof(xcb_res_type_t)
239 */
240
241/*****************************************************************************
242 **
243 ** void xcb_res_type_next
244 **
245 ** @param xcb_res_type_iterator_t *i
246 ** @returns void
247 **
248 *****************************************************************************/
249
250void
251xcb_res_type_next (xcb_res_type_iterator_t *i  /**< */);
252
253/**
254 * Return the iterator pointing to the last element
255 * @param i An xcb_res_type_iterator_t
256 * @return  The iterator pointing to the last element
257 *
258 * Set the current element in the iterator to the last element.
259 * The member rem is set to 0. The member data points to the
260 * last element.
261 */
262
263/*****************************************************************************
264 **
265 ** xcb_generic_iterator_t xcb_res_type_end
266 **
267 ** @param xcb_res_type_iterator_t i
268 ** @returns xcb_generic_iterator_t
269 **
270 *****************************************************************************/
271
272xcb_generic_iterator_t
273xcb_res_type_end (xcb_res_type_iterator_t i  /**< */);
274
275/**
276 * Delivers a request to the X server
277 * @param c The connection
278 * @return A cookie
279 *
280 * Delivers a request to the X server.
281 *
282 */
283
284/*****************************************************************************
285 **
286 ** xcb_res_query_version_cookie_t xcb_res_query_version
287 **
288 ** @param xcb_connection_t *c
289 ** @param uint8_t           client_major
290 ** @param uint8_t           client_minor
291 ** @returns xcb_res_query_version_cookie_t
292 **
293 *****************************************************************************/
294
295xcb_res_query_version_cookie_t
296xcb_res_query_version (xcb_connection_t *c  /**< */,
297                       uint8_t           client_major  /**< */,
298                       uint8_t           client_minor  /**< */);
299
300/**
301 * Delivers a request to the X server
302 * @param c The connection
303 * @return A cookie
304 *
305 * Delivers a request to the X server.
306 *
307 * This form can be used only if the request will cause
308 * a reply to be generated. Any returned error will be
309 * placed in the event queue.
310 */
311
312/*****************************************************************************
313 **
314 ** xcb_res_query_version_cookie_t xcb_res_query_version_unchecked
315 **
316 ** @param xcb_connection_t *c
317 ** @param uint8_t           client_major
318 ** @param uint8_t           client_minor
319 ** @returns xcb_res_query_version_cookie_t
320 **
321 *****************************************************************************/
322
323xcb_res_query_version_cookie_t
324xcb_res_query_version_unchecked (xcb_connection_t *c  /**< */,
325                                 uint8_t           client_major  /**< */,
326                                 uint8_t           client_minor  /**< */);
327
328/**
329 * Return the reply
330 * @param c      The connection
331 * @param cookie The cookie
332 * @param e      The xcb_generic_error_t supplied
333 *
334 * Returns the reply of the request asked by
335 *
336 * The parameter @p e supplied to this function must be NULL if
337 * xcb_res_query_version_unchecked(). is used.
338 * Otherwise, it stores the error if any.
339 *
340 * The returned value must be freed by the caller using free().
341 */
342
343/*****************************************************************************
344 **
345 ** xcb_res_query_version_reply_t * xcb_res_query_version_reply
346 **
347 ** @param xcb_connection_t                *c
348 ** @param xcb_res_query_version_cookie_t   cookie
349 ** @param xcb_generic_error_t            **e
350 ** @returns xcb_res_query_version_reply_t *
351 **
352 *****************************************************************************/
353
354xcb_res_query_version_reply_t *
355xcb_res_query_version_reply (xcb_connection_t                *c  /**< */,
356                             xcb_res_query_version_cookie_t   cookie  /**< */,
357                             xcb_generic_error_t            **e  /**< */);
358
359/**
360 * Delivers a request to the X server
361 * @param c The connection
362 * @return A cookie
363 *
364 * Delivers a request to the X server.
365 *
366 */
367
368/*****************************************************************************
369 **
370 ** xcb_res_query_clients_cookie_t xcb_res_query_clients
371 **
372 ** @param xcb_connection_t *c
373 ** @returns xcb_res_query_clients_cookie_t
374 **
375 *****************************************************************************/
376
377xcb_res_query_clients_cookie_t
378xcb_res_query_clients (xcb_connection_t *c  /**< */);
379
380/**
381 * Delivers a request to the X server
382 * @param c The connection
383 * @return A cookie
384 *
385 * Delivers a request to the X server.
386 *
387 * This form can be used only if the request will cause
388 * a reply to be generated. Any returned error will be
389 * placed in the event queue.
390 */
391
392/*****************************************************************************
393 **
394 ** xcb_res_query_clients_cookie_t xcb_res_query_clients_unchecked
395 **
396 ** @param xcb_connection_t *c
397 ** @returns xcb_res_query_clients_cookie_t
398 **
399 *****************************************************************************/
400
401xcb_res_query_clients_cookie_t
402xcb_res_query_clients_unchecked (xcb_connection_t *c  /**< */);
403
404
405/*****************************************************************************
406 **
407 ** xcb_res_client_t * xcb_res_query_clients_clients
408 **
409 ** @param const xcb_res_query_clients_reply_t *R
410 ** @returns xcb_res_client_t *
411 **
412 *****************************************************************************/
413
414xcb_res_client_t *
415xcb_res_query_clients_clients (const xcb_res_query_clients_reply_t *R  /**< */);
416
417
418/*****************************************************************************
419 **
420 ** int xcb_res_query_clients_clients_length
421 **
422 ** @param const xcb_res_query_clients_reply_t *R
423 ** @returns int
424 **
425 *****************************************************************************/
426
427int
428xcb_res_query_clients_clients_length (const xcb_res_query_clients_reply_t *R  /**< */);
429
430
431/*****************************************************************************
432 **
433 ** xcb_res_client_iterator_t xcb_res_query_clients_clients_iterator
434 **
435 ** @param const xcb_res_query_clients_reply_t *R
436 ** @returns xcb_res_client_iterator_t
437 **
438 *****************************************************************************/
439
440xcb_res_client_iterator_t
441xcb_res_query_clients_clients_iterator (const xcb_res_query_clients_reply_t *R  /**< */);
442
443/**
444 * Return the reply
445 * @param c      The connection
446 * @param cookie The cookie
447 * @param e      The xcb_generic_error_t supplied
448 *
449 * Returns the reply of the request asked by
450 *
451 * The parameter @p e supplied to this function must be NULL if
452 * xcb_res_query_clients_unchecked(). is used.
453 * Otherwise, it stores the error if any.
454 *
455 * The returned value must be freed by the caller using free().
456 */
457
458/*****************************************************************************
459 **
460 ** xcb_res_query_clients_reply_t * xcb_res_query_clients_reply
461 **
462 ** @param xcb_connection_t                *c
463 ** @param xcb_res_query_clients_cookie_t   cookie
464 ** @param xcb_generic_error_t            **e
465 ** @returns xcb_res_query_clients_reply_t *
466 **
467 *****************************************************************************/
468
469xcb_res_query_clients_reply_t *
470xcb_res_query_clients_reply (xcb_connection_t                *c  /**< */,
471                             xcb_res_query_clients_cookie_t   cookie  /**< */,
472                             xcb_generic_error_t            **e  /**< */);
473
474/**
475 * Delivers a request to the X server
476 * @param c The connection
477 * @return A cookie
478 *
479 * Delivers a request to the X server.
480 *
481 */
482
483/*****************************************************************************
484 **
485 ** xcb_res_query_client_resources_cookie_t xcb_res_query_client_resources
486 **
487 ** @param xcb_connection_t *c
488 ** @param uint32_t          xid
489 ** @returns xcb_res_query_client_resources_cookie_t
490 **
491 *****************************************************************************/
492
493xcb_res_query_client_resources_cookie_t
494xcb_res_query_client_resources (xcb_connection_t *c  /**< */,
495                                uint32_t          xid  /**< */);
496
497/**
498 * Delivers a request to the X server
499 * @param c The connection
500 * @return A cookie
501 *
502 * Delivers a request to the X server.
503 *
504 * This form can be used only if the request will cause
505 * a reply to be generated. Any returned error will be
506 * placed in the event queue.
507 */
508
509/*****************************************************************************
510 **
511 ** xcb_res_query_client_resources_cookie_t xcb_res_query_client_resources_unchecked
512 **
513 ** @param xcb_connection_t *c
514 ** @param uint32_t          xid
515 ** @returns xcb_res_query_client_resources_cookie_t
516 **
517 *****************************************************************************/
518
519xcb_res_query_client_resources_cookie_t
520xcb_res_query_client_resources_unchecked (xcb_connection_t *c  /**< */,
521                                          uint32_t          xid  /**< */);
522
523
524/*****************************************************************************
525 **
526 ** xcb_res_type_t * xcb_res_query_client_resources_types
527 **
528 ** @param const xcb_res_query_client_resources_reply_t *R
529 ** @returns xcb_res_type_t *
530 **
531 *****************************************************************************/
532
533xcb_res_type_t *
534xcb_res_query_client_resources_types (const xcb_res_query_client_resources_reply_t *R  /**< */);
535
536
537/*****************************************************************************
538 **
539 ** int xcb_res_query_client_resources_types_length
540 **
541 ** @param const xcb_res_query_client_resources_reply_t *R
542 ** @returns int
543 **
544 *****************************************************************************/
545
546int
547xcb_res_query_client_resources_types_length (const xcb_res_query_client_resources_reply_t *R  /**< */);
548
549
550/*****************************************************************************
551 **
552 ** xcb_res_type_iterator_t xcb_res_query_client_resources_types_iterator
553 **
554 ** @param const xcb_res_query_client_resources_reply_t *R
555 ** @returns xcb_res_type_iterator_t
556 **
557 *****************************************************************************/
558
559xcb_res_type_iterator_t
560xcb_res_query_client_resources_types_iterator (const xcb_res_query_client_resources_reply_t *R  /**< */);
561
562/**
563 * Return the reply
564 * @param c      The connection
565 * @param cookie The cookie
566 * @param e      The xcb_generic_error_t supplied
567 *
568 * Returns the reply of the request asked by
569 *
570 * The parameter @p e supplied to this function must be NULL if
571 * xcb_res_query_client_resources_unchecked(). is used.
572 * Otherwise, it stores the error if any.
573 *
574 * The returned value must be freed by the caller using free().
575 */
576
577/*****************************************************************************
578 **
579 ** xcb_res_query_client_resources_reply_t * xcb_res_query_client_resources_reply
580 **
581 ** @param xcb_connection_t                         *c
582 ** @param xcb_res_query_client_resources_cookie_t   cookie
583 ** @param xcb_generic_error_t                     **e
584 ** @returns xcb_res_query_client_resources_reply_t *
585 **
586 *****************************************************************************/
587
588xcb_res_query_client_resources_reply_t *
589xcb_res_query_client_resources_reply (xcb_connection_t                         *c  /**< */,
590                                      xcb_res_query_client_resources_cookie_t   cookie  /**< */,
591                                      xcb_generic_error_t                     **e  /**< */);
592
593/**
594 * Delivers a request to the X server
595 * @param c The connection
596 * @return A cookie
597 *
598 * Delivers a request to the X server.
599 *
600 */
601
602/*****************************************************************************
603 **
604 ** xcb_res_query_client_pixmap_bytes_cookie_t xcb_res_query_client_pixmap_bytes
605 **
606 ** @param xcb_connection_t *c
607 ** @param uint32_t          xid
608 ** @returns xcb_res_query_client_pixmap_bytes_cookie_t
609 **
610 *****************************************************************************/
611
612xcb_res_query_client_pixmap_bytes_cookie_t
613xcb_res_query_client_pixmap_bytes (xcb_connection_t *c  /**< */,
614                                   uint32_t          xid  /**< */);
615
616/**
617 * Delivers a request to the X server
618 * @param c The connection
619 * @return A cookie
620 *
621 * Delivers a request to the X server.
622 *
623 * This form can be used only if the request will cause
624 * a reply to be generated. Any returned error will be
625 * placed in the event queue.
626 */
627
628/*****************************************************************************
629 **
630 ** xcb_res_query_client_pixmap_bytes_cookie_t xcb_res_query_client_pixmap_bytes_unchecked
631 **
632 ** @param xcb_connection_t *c
633 ** @param uint32_t          xid
634 ** @returns xcb_res_query_client_pixmap_bytes_cookie_t
635 **
636 *****************************************************************************/
637
638xcb_res_query_client_pixmap_bytes_cookie_t
639xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c  /**< */,
640                                             uint32_t          xid  /**< */);
641
642/**
643 * Return the reply
644 * @param c      The connection
645 * @param cookie The cookie
646 * @param e      The xcb_generic_error_t supplied
647 *
648 * Returns the reply of the request asked by
649 *
650 * The parameter @p e supplied to this function must be NULL if
651 * xcb_res_query_client_pixmap_bytes_unchecked(). is used.
652 * Otherwise, it stores the error if any.
653 *
654 * The returned value must be freed by the caller using free().
655 */
656
657/*****************************************************************************
658 **
659 ** xcb_res_query_client_pixmap_bytes_reply_t * xcb_res_query_client_pixmap_bytes_reply
660 **
661 ** @param xcb_connection_t                            *c
662 ** @param xcb_res_query_client_pixmap_bytes_cookie_t   cookie
663 ** @param xcb_generic_error_t                        **e
664 ** @returns xcb_res_query_client_pixmap_bytes_reply_t *
665 **
666 *****************************************************************************/
667
668xcb_res_query_client_pixmap_bytes_reply_t *
669xcb_res_query_client_pixmap_bytes_reply (xcb_connection_t                            *c  /**< */,
670                                         xcb_res_query_client_pixmap_bytes_cookie_t   cookie  /**< */,
671                                         xcb_generic_error_t                        **e  /**< */);
672
673
674#ifdef __cplusplus
675}
676#endif
677
678#endif
679
680/**
681 * @}
682 */
683