Home | History | Annotate | Line # | Download | only in files
shape.c revision 1.1.12.1
      1       1.1  mrg /*
      2       1.1  mrg  * This file generated automatically from shape.xml by c_client.py.
      3       1.1  mrg  * Edit at your peril.
      4       1.1  mrg  */
      5       1.1  mrg 
      6  1.1.12.1  tls #ifdef HAVE_CONFIG_H
      7  1.1.12.1  tls #include "config.h"
      8  1.1.12.1  tls #endif
      9  1.1.12.1  tls #include <stdlib.h>
     10       1.1  mrg #include <string.h>
     11       1.1  mrg #include <assert.h>
     12  1.1.12.1  tls #include <stddef.h>  /* for offsetof() */
     13       1.1  mrg #include "xcbext.h"
     14       1.1  mrg #include "shape.h"
     15  1.1.12.1  tls 
     16  1.1.12.1  tls #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
     17       1.1  mrg #include "xproto.h"
     18       1.1  mrg 
     19       1.1  mrg xcb_extension_t xcb_shape_id = { "SHAPE", 0 };
     20       1.1  mrg 
     21       1.1  mrg 
     22       1.1  mrg /*****************************************************************************
     23       1.1  mrg  **
     24       1.1  mrg  ** void xcb_shape_op_next
     25       1.1  mrg  **
     26       1.1  mrg  ** @param xcb_shape_op_iterator_t *i
     27       1.1  mrg  ** @returns void
     28       1.1  mrg  **
     29       1.1  mrg  *****************************************************************************/
     30       1.1  mrg 
     31       1.1  mrg void
     32       1.1  mrg xcb_shape_op_next (xcb_shape_op_iterator_t *i  /**< */)
     33       1.1  mrg {
     34       1.1  mrg     --i->rem;
     35       1.1  mrg     ++i->data;
     36       1.1  mrg     i->index += sizeof(xcb_shape_op_t);
     37       1.1  mrg }
     38       1.1  mrg 
     39       1.1  mrg 
     40       1.1  mrg /*****************************************************************************
     41       1.1  mrg  **
     42       1.1  mrg  ** xcb_generic_iterator_t xcb_shape_op_end
     43       1.1  mrg  **
     44       1.1  mrg  ** @param xcb_shape_op_iterator_t i
     45       1.1  mrg  ** @returns xcb_generic_iterator_t
     46       1.1  mrg  **
     47       1.1  mrg  *****************************************************************************/
     48       1.1  mrg 
     49       1.1  mrg xcb_generic_iterator_t
     50       1.1  mrg xcb_shape_op_end (xcb_shape_op_iterator_t i  /**< */)
     51       1.1  mrg {
     52       1.1  mrg     xcb_generic_iterator_t ret;
     53       1.1  mrg     ret.data = i.data + i.rem;
     54       1.1  mrg     ret.index = i.index + ((char *) ret.data - (char *) i.data);
     55       1.1  mrg     ret.rem = 0;
     56       1.1  mrg     return ret;
     57       1.1  mrg }
     58       1.1  mrg 
     59       1.1  mrg 
     60       1.1  mrg /*****************************************************************************
     61       1.1  mrg  **
     62       1.1  mrg  ** void xcb_shape_kind_next
     63       1.1  mrg  **
     64       1.1  mrg  ** @param xcb_shape_kind_iterator_t *i
     65       1.1  mrg  ** @returns void
     66       1.1  mrg  **
     67       1.1  mrg  *****************************************************************************/
     68       1.1  mrg 
     69       1.1  mrg void
     70       1.1  mrg xcb_shape_kind_next (xcb_shape_kind_iterator_t *i  /**< */)
     71       1.1  mrg {
     72       1.1  mrg     --i->rem;
     73       1.1  mrg     ++i->data;
     74       1.1  mrg     i->index += sizeof(xcb_shape_kind_t);
     75       1.1  mrg }
     76       1.1  mrg 
     77       1.1  mrg 
     78       1.1  mrg /*****************************************************************************
     79       1.1  mrg  **
     80       1.1  mrg  ** xcb_generic_iterator_t xcb_shape_kind_end
     81       1.1  mrg  **
     82       1.1  mrg  ** @param xcb_shape_kind_iterator_t i
     83       1.1  mrg  ** @returns xcb_generic_iterator_t
     84       1.1  mrg  **
     85       1.1  mrg  *****************************************************************************/
     86       1.1  mrg 
     87       1.1  mrg xcb_generic_iterator_t
     88       1.1  mrg xcb_shape_kind_end (xcb_shape_kind_iterator_t i  /**< */)
     89       1.1  mrg {
     90       1.1  mrg     xcb_generic_iterator_t ret;
     91       1.1  mrg     ret.data = i.data + i.rem;
     92       1.1  mrg     ret.index = i.index + ((char *) ret.data - (char *) i.data);
     93       1.1  mrg     ret.rem = 0;
     94       1.1  mrg     return ret;
     95       1.1  mrg }
     96       1.1  mrg 
     97       1.1  mrg 
     98       1.1  mrg /*****************************************************************************
     99       1.1  mrg  **
    100       1.1  mrg  ** xcb_shape_query_version_cookie_t xcb_shape_query_version
    101       1.1  mrg  **
    102       1.1  mrg  ** @param xcb_connection_t *c
    103       1.1  mrg  ** @returns xcb_shape_query_version_cookie_t
    104       1.1  mrg  **
    105       1.1  mrg  *****************************************************************************/
    106       1.1  mrg 
    107       1.1  mrg xcb_shape_query_version_cookie_t
    108       1.1  mrg xcb_shape_query_version (xcb_connection_t *c  /**< */)
    109       1.1  mrg {
    110       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    111       1.1  mrg         /* count */ 2,
    112       1.1  mrg         /* ext */ &xcb_shape_id,
    113       1.1  mrg         /* opcode */ XCB_SHAPE_QUERY_VERSION,
    114       1.1  mrg         /* isvoid */ 0
    115       1.1  mrg     };
    116       1.1  mrg 
    117       1.1  mrg     struct iovec xcb_parts[4];
    118       1.1  mrg     xcb_shape_query_version_cookie_t xcb_ret;
    119       1.1  mrg     xcb_shape_query_version_request_t xcb_out;
    120       1.1  mrg 
    121       1.1  mrg 
    122       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    123       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    124       1.1  mrg     xcb_parts[3].iov_base = 0;
    125       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    126  1.1.12.1  tls 
    127       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    128       1.1  mrg     return xcb_ret;
    129       1.1  mrg }
    130       1.1  mrg 
    131       1.1  mrg 
    132       1.1  mrg /*****************************************************************************
    133       1.1  mrg  **
    134       1.1  mrg  ** xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked
    135       1.1  mrg  **
    136       1.1  mrg  ** @param xcb_connection_t *c
    137       1.1  mrg  ** @returns xcb_shape_query_version_cookie_t
    138       1.1  mrg  **
    139       1.1  mrg  *****************************************************************************/
    140       1.1  mrg 
    141       1.1  mrg xcb_shape_query_version_cookie_t
    142       1.1  mrg xcb_shape_query_version_unchecked (xcb_connection_t *c  /**< */)
    143       1.1  mrg {
    144       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    145       1.1  mrg         /* count */ 2,
    146       1.1  mrg         /* ext */ &xcb_shape_id,
    147       1.1  mrg         /* opcode */ XCB_SHAPE_QUERY_VERSION,
    148       1.1  mrg         /* isvoid */ 0
    149       1.1  mrg     };
    150       1.1  mrg 
    151       1.1  mrg     struct iovec xcb_parts[4];
    152       1.1  mrg     xcb_shape_query_version_cookie_t xcb_ret;
    153       1.1  mrg     xcb_shape_query_version_request_t xcb_out;
    154       1.1  mrg 
    155       1.1  mrg 
    156       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    157       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    158       1.1  mrg     xcb_parts[3].iov_base = 0;
    159       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    160  1.1.12.1  tls 
    161       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    162       1.1  mrg     return xcb_ret;
    163       1.1  mrg }
    164       1.1  mrg 
    165       1.1  mrg 
    166       1.1  mrg /*****************************************************************************
    167       1.1  mrg  **
    168       1.1  mrg  ** xcb_shape_query_version_reply_t * xcb_shape_query_version_reply
    169       1.1  mrg  **
    170       1.1  mrg  ** @param xcb_connection_t                  *c
    171       1.1  mrg  ** @param xcb_shape_query_version_cookie_t   cookie
    172       1.1  mrg  ** @param xcb_generic_error_t              **e
    173       1.1  mrg  ** @returns xcb_shape_query_version_reply_t *
    174       1.1  mrg  **
    175       1.1  mrg  *****************************************************************************/
    176       1.1  mrg 
    177       1.1  mrg xcb_shape_query_version_reply_t *
    178       1.1  mrg xcb_shape_query_version_reply (xcb_connection_t                  *c  /**< */,
    179       1.1  mrg                                xcb_shape_query_version_cookie_t   cookie  /**< */,
    180       1.1  mrg                                xcb_generic_error_t              **e  /**< */)
    181       1.1  mrg {
    182       1.1  mrg     return (xcb_shape_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    183       1.1  mrg }
    184       1.1  mrg 
    185  1.1.12.1  tls int
    186  1.1.12.1  tls xcb_shape_rectangles_sizeof (const void  *_buffer  /**< */,
    187  1.1.12.1  tls                              uint32_t     rectangles_len  /**< */)
    188  1.1.12.1  tls {
    189  1.1.12.1  tls     char *xcb_tmp = (char *)_buffer;
    190  1.1.12.1  tls     unsigned int xcb_buffer_len = 0;
    191  1.1.12.1  tls     unsigned int xcb_block_len = 0;
    192  1.1.12.1  tls     unsigned int xcb_pad = 0;
    193  1.1.12.1  tls     unsigned int xcb_align_to;
    194  1.1.12.1  tls 
    195  1.1.12.1  tls 
    196  1.1.12.1  tls     xcb_block_len += sizeof(xcb_shape_rectangles_request_t);
    197  1.1.12.1  tls     xcb_tmp += xcb_block_len;
    198  1.1.12.1  tls     /* rectangles */
    199  1.1.12.1  tls     xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t);
    200  1.1.12.1  tls     xcb_tmp += xcb_block_len;
    201  1.1.12.1  tls     xcb_align_to = ALIGNOF(xcb_rectangle_t);
    202  1.1.12.1  tls     /* insert padding */
    203  1.1.12.1  tls     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    204  1.1.12.1  tls     xcb_buffer_len += xcb_block_len + xcb_pad;
    205  1.1.12.1  tls     if (0 != xcb_pad) {
    206  1.1.12.1  tls         xcb_tmp += xcb_pad;
    207  1.1.12.1  tls         xcb_pad = 0;
    208  1.1.12.1  tls     }
    209  1.1.12.1  tls     xcb_block_len = 0;
    210  1.1.12.1  tls 
    211  1.1.12.1  tls     return xcb_buffer_len;
    212  1.1.12.1  tls }
    213  1.1.12.1  tls 
    214       1.1  mrg 
    215       1.1  mrg /*****************************************************************************
    216       1.1  mrg  **
    217       1.1  mrg  ** xcb_void_cookie_t xcb_shape_rectangles_checked
    218       1.1  mrg  **
    219       1.1  mrg  ** @param xcb_connection_t      *c
    220       1.1  mrg  ** @param xcb_shape_op_t         operation
    221       1.1  mrg  ** @param xcb_shape_kind_t       destination_kind
    222       1.1  mrg  ** @param uint8_t                ordering
    223       1.1  mrg  ** @param xcb_window_t           destination_window
    224       1.1  mrg  ** @param int16_t                x_offset
    225       1.1  mrg  ** @param int16_t                y_offset
    226       1.1  mrg  ** @param uint32_t               rectangles_len
    227       1.1  mrg  ** @param const xcb_rectangle_t *rectangles
    228       1.1  mrg  ** @returns xcb_void_cookie_t
    229       1.1  mrg  **
    230       1.1  mrg  *****************************************************************************/
    231       1.1  mrg 
    232       1.1  mrg xcb_void_cookie_t
    233       1.1  mrg xcb_shape_rectangles_checked (xcb_connection_t      *c  /**< */,
    234       1.1  mrg                               xcb_shape_op_t         operation  /**< */,
    235       1.1  mrg                               xcb_shape_kind_t       destination_kind  /**< */,
    236       1.1  mrg                               uint8_t                ordering  /**< */,
    237       1.1  mrg                               xcb_window_t           destination_window  /**< */,
    238       1.1  mrg                               int16_t                x_offset  /**< */,
    239       1.1  mrg                               int16_t                y_offset  /**< */,
    240       1.1  mrg                               uint32_t               rectangles_len  /**< */,
    241       1.1  mrg                               const xcb_rectangle_t *rectangles  /**< */)
    242       1.1  mrg {
    243       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    244       1.1  mrg         /* count */ 4,
    245       1.1  mrg         /* ext */ &xcb_shape_id,
    246       1.1  mrg         /* opcode */ XCB_SHAPE_RECTANGLES,
    247       1.1  mrg         /* isvoid */ 1
    248       1.1  mrg     };
    249       1.1  mrg 
    250       1.1  mrg     struct iovec xcb_parts[6];
    251       1.1  mrg     xcb_void_cookie_t xcb_ret;
    252       1.1  mrg     xcb_shape_rectangles_request_t xcb_out;
    253       1.1  mrg 
    254       1.1  mrg     xcb_out.operation = operation;
    255       1.1  mrg     xcb_out.destination_kind = destination_kind;
    256       1.1  mrg     xcb_out.ordering = ordering;
    257       1.1  mrg     xcb_out.pad0 = 0;
    258       1.1  mrg     xcb_out.destination_window = destination_window;
    259       1.1  mrg     xcb_out.x_offset = x_offset;
    260       1.1  mrg     xcb_out.y_offset = y_offset;
    261       1.1  mrg 
    262       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    263       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    264       1.1  mrg     xcb_parts[3].iov_base = 0;
    265       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    266  1.1.12.1  tls     /* xcb_rectangle_t rectangles */
    267       1.1  mrg     xcb_parts[4].iov_base = (char *) rectangles;
    268       1.1  mrg     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
    269       1.1  mrg     xcb_parts[5].iov_base = 0;
    270       1.1  mrg     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
    271  1.1.12.1  tls 
    272       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    273       1.1  mrg     return xcb_ret;
    274       1.1  mrg }
    275       1.1  mrg 
    276       1.1  mrg 
    277       1.1  mrg /*****************************************************************************
    278       1.1  mrg  **
    279       1.1  mrg  ** xcb_void_cookie_t xcb_shape_rectangles
    280       1.1  mrg  **
    281       1.1  mrg  ** @param xcb_connection_t      *c
    282       1.1  mrg  ** @param xcb_shape_op_t         operation
    283       1.1  mrg  ** @param xcb_shape_kind_t       destination_kind
    284       1.1  mrg  ** @param uint8_t                ordering
    285       1.1  mrg  ** @param xcb_window_t           destination_window
    286       1.1  mrg  ** @param int16_t                x_offset
    287       1.1  mrg  ** @param int16_t                y_offset
    288       1.1  mrg  ** @param uint32_t               rectangles_len
    289       1.1  mrg  ** @param const xcb_rectangle_t *rectangles
    290       1.1  mrg  ** @returns xcb_void_cookie_t
    291       1.1  mrg  **
    292       1.1  mrg  *****************************************************************************/
    293       1.1  mrg 
    294       1.1  mrg xcb_void_cookie_t
    295       1.1  mrg xcb_shape_rectangles (xcb_connection_t      *c  /**< */,
    296       1.1  mrg                       xcb_shape_op_t         operation  /**< */,
    297       1.1  mrg                       xcb_shape_kind_t       destination_kind  /**< */,
    298       1.1  mrg                       uint8_t                ordering  /**< */,
    299       1.1  mrg                       xcb_window_t           destination_window  /**< */,
    300       1.1  mrg                       int16_t                x_offset  /**< */,
    301       1.1  mrg                       int16_t                y_offset  /**< */,
    302       1.1  mrg                       uint32_t               rectangles_len  /**< */,
    303       1.1  mrg                       const xcb_rectangle_t *rectangles  /**< */)
    304       1.1  mrg {
    305       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    306       1.1  mrg         /* count */ 4,
    307       1.1  mrg         /* ext */ &xcb_shape_id,
    308       1.1  mrg         /* opcode */ XCB_SHAPE_RECTANGLES,
    309       1.1  mrg         /* isvoid */ 1
    310       1.1  mrg     };
    311       1.1  mrg 
    312       1.1  mrg     struct iovec xcb_parts[6];
    313       1.1  mrg     xcb_void_cookie_t xcb_ret;
    314       1.1  mrg     xcb_shape_rectangles_request_t xcb_out;
    315       1.1  mrg 
    316       1.1  mrg     xcb_out.operation = operation;
    317       1.1  mrg     xcb_out.destination_kind = destination_kind;
    318       1.1  mrg     xcb_out.ordering = ordering;
    319       1.1  mrg     xcb_out.pad0 = 0;
    320       1.1  mrg     xcb_out.destination_window = destination_window;
    321       1.1  mrg     xcb_out.x_offset = x_offset;
    322       1.1  mrg     xcb_out.y_offset = y_offset;
    323       1.1  mrg 
    324       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    325       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    326       1.1  mrg     xcb_parts[3].iov_base = 0;
    327       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    328  1.1.12.1  tls     /* xcb_rectangle_t rectangles */
    329       1.1  mrg     xcb_parts[4].iov_base = (char *) rectangles;
    330       1.1  mrg     xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
    331       1.1  mrg     xcb_parts[5].iov_base = 0;
    332       1.1  mrg     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
    333  1.1.12.1  tls 
    334       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    335       1.1  mrg     return xcb_ret;
    336       1.1  mrg }
    337       1.1  mrg 
    338       1.1  mrg 
    339       1.1  mrg /*****************************************************************************
    340       1.1  mrg  **
    341       1.1  mrg  ** xcb_void_cookie_t xcb_shape_mask_checked
    342       1.1  mrg  **
    343       1.1  mrg  ** @param xcb_connection_t *c
    344       1.1  mrg  ** @param xcb_shape_op_t    operation
    345       1.1  mrg  ** @param xcb_shape_kind_t  destination_kind
    346       1.1  mrg  ** @param xcb_window_t      destination_window
    347       1.1  mrg  ** @param int16_t           x_offset
    348       1.1  mrg  ** @param int16_t           y_offset
    349       1.1  mrg  ** @param xcb_pixmap_t      source_bitmap
    350       1.1  mrg  ** @returns xcb_void_cookie_t
    351       1.1  mrg  **
    352       1.1  mrg  *****************************************************************************/
    353       1.1  mrg 
    354       1.1  mrg xcb_void_cookie_t
    355       1.1  mrg xcb_shape_mask_checked (xcb_connection_t *c  /**< */,
    356       1.1  mrg                         xcb_shape_op_t    operation  /**< */,
    357       1.1  mrg                         xcb_shape_kind_t  destination_kind  /**< */,
    358       1.1  mrg                         xcb_window_t      destination_window  /**< */,
    359       1.1  mrg                         int16_t           x_offset  /**< */,
    360       1.1  mrg                         int16_t           y_offset  /**< */,
    361       1.1  mrg                         xcb_pixmap_t      source_bitmap  /**< */)
    362       1.1  mrg {
    363       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    364       1.1  mrg         /* count */ 2,
    365       1.1  mrg         /* ext */ &xcb_shape_id,
    366       1.1  mrg         /* opcode */ XCB_SHAPE_MASK,
    367       1.1  mrg         /* isvoid */ 1
    368       1.1  mrg     };
    369       1.1  mrg 
    370       1.1  mrg     struct iovec xcb_parts[4];
    371       1.1  mrg     xcb_void_cookie_t xcb_ret;
    372       1.1  mrg     xcb_shape_mask_request_t xcb_out;
    373       1.1  mrg 
    374       1.1  mrg     xcb_out.operation = operation;
    375       1.1  mrg     xcb_out.destination_kind = destination_kind;
    376       1.1  mrg     memset(xcb_out.pad0, 0, 2);
    377       1.1  mrg     xcb_out.destination_window = destination_window;
    378       1.1  mrg     xcb_out.x_offset = x_offset;
    379       1.1  mrg     xcb_out.y_offset = y_offset;
    380       1.1  mrg     xcb_out.source_bitmap = source_bitmap;
    381       1.1  mrg 
    382       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    383       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    384       1.1  mrg     xcb_parts[3].iov_base = 0;
    385       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    386  1.1.12.1  tls 
    387       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    388       1.1  mrg     return xcb_ret;
    389       1.1  mrg }
    390       1.1  mrg 
    391       1.1  mrg 
    392       1.1  mrg /*****************************************************************************
    393       1.1  mrg  **
    394       1.1  mrg  ** xcb_void_cookie_t xcb_shape_mask
    395       1.1  mrg  **
    396       1.1  mrg  ** @param xcb_connection_t *c
    397       1.1  mrg  ** @param xcb_shape_op_t    operation
    398       1.1  mrg  ** @param xcb_shape_kind_t  destination_kind
    399       1.1  mrg  ** @param xcb_window_t      destination_window
    400       1.1  mrg  ** @param int16_t           x_offset
    401       1.1  mrg  ** @param int16_t           y_offset
    402       1.1  mrg  ** @param xcb_pixmap_t      source_bitmap
    403       1.1  mrg  ** @returns xcb_void_cookie_t
    404       1.1  mrg  **
    405       1.1  mrg  *****************************************************************************/
    406       1.1  mrg 
    407       1.1  mrg xcb_void_cookie_t
    408       1.1  mrg xcb_shape_mask (xcb_connection_t *c  /**< */,
    409       1.1  mrg                 xcb_shape_op_t    operation  /**< */,
    410       1.1  mrg                 xcb_shape_kind_t  destination_kind  /**< */,
    411       1.1  mrg                 xcb_window_t      destination_window  /**< */,
    412       1.1  mrg                 int16_t           x_offset  /**< */,
    413       1.1  mrg                 int16_t           y_offset  /**< */,
    414       1.1  mrg                 xcb_pixmap_t      source_bitmap  /**< */)
    415       1.1  mrg {
    416       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    417       1.1  mrg         /* count */ 2,
    418       1.1  mrg         /* ext */ &xcb_shape_id,
    419       1.1  mrg         /* opcode */ XCB_SHAPE_MASK,
    420       1.1  mrg         /* isvoid */ 1
    421       1.1  mrg     };
    422       1.1  mrg 
    423       1.1  mrg     struct iovec xcb_parts[4];
    424       1.1  mrg     xcb_void_cookie_t xcb_ret;
    425       1.1  mrg     xcb_shape_mask_request_t xcb_out;
    426       1.1  mrg 
    427       1.1  mrg     xcb_out.operation = operation;
    428       1.1  mrg     xcb_out.destination_kind = destination_kind;
    429       1.1  mrg     memset(xcb_out.pad0, 0, 2);
    430       1.1  mrg     xcb_out.destination_window = destination_window;
    431       1.1  mrg     xcb_out.x_offset = x_offset;
    432       1.1  mrg     xcb_out.y_offset = y_offset;
    433       1.1  mrg     xcb_out.source_bitmap = source_bitmap;
    434       1.1  mrg 
    435       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    436       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    437       1.1  mrg     xcb_parts[3].iov_base = 0;
    438       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    439  1.1.12.1  tls 
    440       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    441       1.1  mrg     return xcb_ret;
    442       1.1  mrg }
    443       1.1  mrg 
    444       1.1  mrg 
    445       1.1  mrg /*****************************************************************************
    446       1.1  mrg  **
    447       1.1  mrg  ** xcb_void_cookie_t xcb_shape_combine_checked
    448       1.1  mrg  **
    449       1.1  mrg  ** @param xcb_connection_t *c
    450       1.1  mrg  ** @param xcb_shape_op_t    operation
    451       1.1  mrg  ** @param xcb_shape_kind_t  destination_kind
    452       1.1  mrg  ** @param xcb_shape_kind_t  source_kind
    453       1.1  mrg  ** @param xcb_window_t      destination_window
    454       1.1  mrg  ** @param int16_t           x_offset
    455       1.1  mrg  ** @param int16_t           y_offset
    456       1.1  mrg  ** @param xcb_window_t      source_window
    457       1.1  mrg  ** @returns xcb_void_cookie_t
    458       1.1  mrg  **
    459       1.1  mrg  *****************************************************************************/
    460       1.1  mrg 
    461       1.1  mrg xcb_void_cookie_t
    462       1.1  mrg xcb_shape_combine_checked (xcb_connection_t *c  /**< */,
    463       1.1  mrg                            xcb_shape_op_t    operation  /**< */,
    464       1.1  mrg                            xcb_shape_kind_t  destination_kind  /**< */,
    465       1.1  mrg                            xcb_shape_kind_t  source_kind  /**< */,
    466       1.1  mrg                            xcb_window_t      destination_window  /**< */,
    467       1.1  mrg                            int16_t           x_offset  /**< */,
    468       1.1  mrg                            int16_t           y_offset  /**< */,
    469       1.1  mrg                            xcb_window_t      source_window  /**< */)
    470       1.1  mrg {
    471       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    472       1.1  mrg         /* count */ 2,
    473       1.1  mrg         /* ext */ &xcb_shape_id,
    474       1.1  mrg         /* opcode */ XCB_SHAPE_COMBINE,
    475       1.1  mrg         /* isvoid */ 1
    476       1.1  mrg     };
    477       1.1  mrg 
    478       1.1  mrg     struct iovec xcb_parts[4];
    479       1.1  mrg     xcb_void_cookie_t xcb_ret;
    480       1.1  mrg     xcb_shape_combine_request_t xcb_out;
    481       1.1  mrg 
    482       1.1  mrg     xcb_out.operation = operation;
    483       1.1  mrg     xcb_out.destination_kind = destination_kind;
    484       1.1  mrg     xcb_out.source_kind = source_kind;
    485       1.1  mrg     xcb_out.pad0 = 0;
    486       1.1  mrg     xcb_out.destination_window = destination_window;
    487       1.1  mrg     xcb_out.x_offset = x_offset;
    488       1.1  mrg     xcb_out.y_offset = y_offset;
    489       1.1  mrg     xcb_out.source_window = source_window;
    490       1.1  mrg 
    491       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    492       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    493       1.1  mrg     xcb_parts[3].iov_base = 0;
    494       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    495  1.1.12.1  tls 
    496       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    497       1.1  mrg     return xcb_ret;
    498       1.1  mrg }
    499       1.1  mrg 
    500       1.1  mrg 
    501       1.1  mrg /*****************************************************************************
    502       1.1  mrg  **
    503       1.1  mrg  ** xcb_void_cookie_t xcb_shape_combine
    504       1.1  mrg  **
    505       1.1  mrg  ** @param xcb_connection_t *c
    506       1.1  mrg  ** @param xcb_shape_op_t    operation
    507       1.1  mrg  ** @param xcb_shape_kind_t  destination_kind
    508       1.1  mrg  ** @param xcb_shape_kind_t  source_kind
    509       1.1  mrg  ** @param xcb_window_t      destination_window
    510       1.1  mrg  ** @param int16_t           x_offset
    511       1.1  mrg  ** @param int16_t           y_offset
    512       1.1  mrg  ** @param xcb_window_t      source_window
    513       1.1  mrg  ** @returns xcb_void_cookie_t
    514       1.1  mrg  **
    515       1.1  mrg  *****************************************************************************/
    516       1.1  mrg 
    517       1.1  mrg xcb_void_cookie_t
    518       1.1  mrg xcb_shape_combine (xcb_connection_t *c  /**< */,
    519       1.1  mrg                    xcb_shape_op_t    operation  /**< */,
    520       1.1  mrg                    xcb_shape_kind_t  destination_kind  /**< */,
    521       1.1  mrg                    xcb_shape_kind_t  source_kind  /**< */,
    522       1.1  mrg                    xcb_window_t      destination_window  /**< */,
    523       1.1  mrg                    int16_t           x_offset  /**< */,
    524       1.1  mrg                    int16_t           y_offset  /**< */,
    525       1.1  mrg                    xcb_window_t      source_window  /**< */)
    526       1.1  mrg {
    527       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    528       1.1  mrg         /* count */ 2,
    529       1.1  mrg         /* ext */ &xcb_shape_id,
    530       1.1  mrg         /* opcode */ XCB_SHAPE_COMBINE,
    531       1.1  mrg         /* isvoid */ 1
    532       1.1  mrg     };
    533       1.1  mrg 
    534       1.1  mrg     struct iovec xcb_parts[4];
    535       1.1  mrg     xcb_void_cookie_t xcb_ret;
    536       1.1  mrg     xcb_shape_combine_request_t xcb_out;
    537       1.1  mrg 
    538       1.1  mrg     xcb_out.operation = operation;
    539       1.1  mrg     xcb_out.destination_kind = destination_kind;
    540       1.1  mrg     xcb_out.source_kind = source_kind;
    541       1.1  mrg     xcb_out.pad0 = 0;
    542       1.1  mrg     xcb_out.destination_window = destination_window;
    543       1.1  mrg     xcb_out.x_offset = x_offset;
    544       1.1  mrg     xcb_out.y_offset = y_offset;
    545       1.1  mrg     xcb_out.source_window = source_window;
    546       1.1  mrg 
    547       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    548       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    549       1.1  mrg     xcb_parts[3].iov_base = 0;
    550       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    551  1.1.12.1  tls 
    552       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    553       1.1  mrg     return xcb_ret;
    554       1.1  mrg }
    555       1.1  mrg 
    556       1.1  mrg 
    557       1.1  mrg /*****************************************************************************
    558       1.1  mrg  **
    559       1.1  mrg  ** xcb_void_cookie_t xcb_shape_offset_checked
    560       1.1  mrg  **
    561       1.1  mrg  ** @param xcb_connection_t *c
    562       1.1  mrg  ** @param xcb_shape_kind_t  destination_kind
    563       1.1  mrg  ** @param xcb_window_t      destination_window
    564       1.1  mrg  ** @param int16_t           x_offset
    565       1.1  mrg  ** @param int16_t           y_offset
    566       1.1  mrg  ** @returns xcb_void_cookie_t
    567       1.1  mrg  **
    568       1.1  mrg  *****************************************************************************/
    569       1.1  mrg 
    570       1.1  mrg xcb_void_cookie_t
    571       1.1  mrg xcb_shape_offset_checked (xcb_connection_t *c  /**< */,
    572       1.1  mrg                           xcb_shape_kind_t  destination_kind  /**< */,
    573       1.1  mrg                           xcb_window_t      destination_window  /**< */,
    574       1.1  mrg                           int16_t           x_offset  /**< */,
    575       1.1  mrg                           int16_t           y_offset  /**< */)
    576       1.1  mrg {
    577       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    578       1.1  mrg         /* count */ 2,
    579       1.1  mrg         /* ext */ &xcb_shape_id,
    580       1.1  mrg         /* opcode */ XCB_SHAPE_OFFSET,
    581       1.1  mrg         /* isvoid */ 1
    582       1.1  mrg     };
    583       1.1  mrg 
    584       1.1  mrg     struct iovec xcb_parts[4];
    585       1.1  mrg     xcb_void_cookie_t xcb_ret;
    586       1.1  mrg     xcb_shape_offset_request_t xcb_out;
    587       1.1  mrg 
    588       1.1  mrg     xcb_out.destination_kind = destination_kind;
    589       1.1  mrg     memset(xcb_out.pad0, 0, 3);
    590       1.1  mrg     xcb_out.destination_window = destination_window;
    591       1.1  mrg     xcb_out.x_offset = x_offset;
    592       1.1  mrg     xcb_out.y_offset = y_offset;
    593       1.1  mrg 
    594       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    595       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    596       1.1  mrg     xcb_parts[3].iov_base = 0;
    597       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    598  1.1.12.1  tls 
    599       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    600       1.1  mrg     return xcb_ret;
    601       1.1  mrg }
    602       1.1  mrg 
    603       1.1  mrg 
    604       1.1  mrg /*****************************************************************************
    605       1.1  mrg  **
    606       1.1  mrg  ** xcb_void_cookie_t xcb_shape_offset
    607       1.1  mrg  **
    608       1.1  mrg  ** @param xcb_connection_t *c
    609       1.1  mrg  ** @param xcb_shape_kind_t  destination_kind
    610       1.1  mrg  ** @param xcb_window_t      destination_window
    611       1.1  mrg  ** @param int16_t           x_offset
    612       1.1  mrg  ** @param int16_t           y_offset
    613       1.1  mrg  ** @returns xcb_void_cookie_t
    614       1.1  mrg  **
    615       1.1  mrg  *****************************************************************************/
    616       1.1  mrg 
    617       1.1  mrg xcb_void_cookie_t
    618       1.1  mrg xcb_shape_offset (xcb_connection_t *c  /**< */,
    619       1.1  mrg                   xcb_shape_kind_t  destination_kind  /**< */,
    620       1.1  mrg                   xcb_window_t      destination_window  /**< */,
    621       1.1  mrg                   int16_t           x_offset  /**< */,
    622       1.1  mrg                   int16_t           y_offset  /**< */)
    623       1.1  mrg {
    624       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    625       1.1  mrg         /* count */ 2,
    626       1.1  mrg         /* ext */ &xcb_shape_id,
    627       1.1  mrg         /* opcode */ XCB_SHAPE_OFFSET,
    628       1.1  mrg         /* isvoid */ 1
    629       1.1  mrg     };
    630       1.1  mrg 
    631       1.1  mrg     struct iovec xcb_parts[4];
    632       1.1  mrg     xcb_void_cookie_t xcb_ret;
    633       1.1  mrg     xcb_shape_offset_request_t xcb_out;
    634       1.1  mrg 
    635       1.1  mrg     xcb_out.destination_kind = destination_kind;
    636       1.1  mrg     memset(xcb_out.pad0, 0, 3);
    637       1.1  mrg     xcb_out.destination_window = destination_window;
    638       1.1  mrg     xcb_out.x_offset = x_offset;
    639       1.1  mrg     xcb_out.y_offset = y_offset;
    640       1.1  mrg 
    641       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    642       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    643       1.1  mrg     xcb_parts[3].iov_base = 0;
    644       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    645  1.1.12.1  tls 
    646       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    647       1.1  mrg     return xcb_ret;
    648       1.1  mrg }
    649       1.1  mrg 
    650       1.1  mrg 
    651       1.1  mrg /*****************************************************************************
    652       1.1  mrg  **
    653       1.1  mrg  ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents
    654       1.1  mrg  **
    655       1.1  mrg  ** @param xcb_connection_t *c
    656       1.1  mrg  ** @param xcb_window_t      destination_window
    657       1.1  mrg  ** @returns xcb_shape_query_extents_cookie_t
    658       1.1  mrg  **
    659       1.1  mrg  *****************************************************************************/
    660       1.1  mrg 
    661       1.1  mrg xcb_shape_query_extents_cookie_t
    662       1.1  mrg xcb_shape_query_extents (xcb_connection_t *c  /**< */,
    663       1.1  mrg                          xcb_window_t      destination_window  /**< */)
    664       1.1  mrg {
    665       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    666       1.1  mrg         /* count */ 2,
    667       1.1  mrg         /* ext */ &xcb_shape_id,
    668       1.1  mrg         /* opcode */ XCB_SHAPE_QUERY_EXTENTS,
    669       1.1  mrg         /* isvoid */ 0
    670       1.1  mrg     };
    671       1.1  mrg 
    672       1.1  mrg     struct iovec xcb_parts[4];
    673       1.1  mrg     xcb_shape_query_extents_cookie_t xcb_ret;
    674       1.1  mrg     xcb_shape_query_extents_request_t xcb_out;
    675       1.1  mrg 
    676       1.1  mrg     xcb_out.destination_window = destination_window;
    677       1.1  mrg 
    678       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    679       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    680       1.1  mrg     xcb_parts[3].iov_base = 0;
    681       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    682  1.1.12.1  tls 
    683       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    684       1.1  mrg     return xcb_ret;
    685       1.1  mrg }
    686       1.1  mrg 
    687       1.1  mrg 
    688       1.1  mrg /*****************************************************************************
    689       1.1  mrg  **
    690       1.1  mrg  ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked
    691       1.1  mrg  **
    692       1.1  mrg  ** @param xcb_connection_t *c
    693       1.1  mrg  ** @param xcb_window_t      destination_window
    694       1.1  mrg  ** @returns xcb_shape_query_extents_cookie_t
    695       1.1  mrg  **
    696       1.1  mrg  *****************************************************************************/
    697       1.1  mrg 
    698       1.1  mrg xcb_shape_query_extents_cookie_t
    699       1.1  mrg xcb_shape_query_extents_unchecked (xcb_connection_t *c  /**< */,
    700       1.1  mrg                                    xcb_window_t      destination_window  /**< */)
    701       1.1  mrg {
    702       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    703       1.1  mrg         /* count */ 2,
    704       1.1  mrg         /* ext */ &xcb_shape_id,
    705       1.1  mrg         /* opcode */ XCB_SHAPE_QUERY_EXTENTS,
    706       1.1  mrg         /* isvoid */ 0
    707       1.1  mrg     };
    708       1.1  mrg 
    709       1.1  mrg     struct iovec xcb_parts[4];
    710       1.1  mrg     xcb_shape_query_extents_cookie_t xcb_ret;
    711       1.1  mrg     xcb_shape_query_extents_request_t xcb_out;
    712       1.1  mrg 
    713       1.1  mrg     xcb_out.destination_window = destination_window;
    714       1.1  mrg 
    715       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    716       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    717       1.1  mrg     xcb_parts[3].iov_base = 0;
    718       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    719  1.1.12.1  tls 
    720       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    721       1.1  mrg     return xcb_ret;
    722       1.1  mrg }
    723       1.1  mrg 
    724       1.1  mrg 
    725       1.1  mrg /*****************************************************************************
    726       1.1  mrg  **
    727       1.1  mrg  ** xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply
    728       1.1  mrg  **
    729       1.1  mrg  ** @param xcb_connection_t                  *c
    730       1.1  mrg  ** @param xcb_shape_query_extents_cookie_t   cookie
    731       1.1  mrg  ** @param xcb_generic_error_t              **e
    732       1.1  mrg  ** @returns xcb_shape_query_extents_reply_t *
    733       1.1  mrg  **
    734       1.1  mrg  *****************************************************************************/
    735       1.1  mrg 
    736       1.1  mrg xcb_shape_query_extents_reply_t *
    737       1.1  mrg xcb_shape_query_extents_reply (xcb_connection_t                  *c  /**< */,
    738       1.1  mrg                                xcb_shape_query_extents_cookie_t   cookie  /**< */,
    739       1.1  mrg                                xcb_generic_error_t              **e  /**< */)
    740       1.1  mrg {
    741       1.1  mrg     return (xcb_shape_query_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    742       1.1  mrg }
    743       1.1  mrg 
    744       1.1  mrg 
    745       1.1  mrg /*****************************************************************************
    746       1.1  mrg  **
    747       1.1  mrg  ** xcb_void_cookie_t xcb_shape_select_input_checked
    748       1.1  mrg  **
    749       1.1  mrg  ** @param xcb_connection_t *c
    750       1.1  mrg  ** @param xcb_window_t      destination_window
    751       1.1  mrg  ** @param uint8_t           enable
    752       1.1  mrg  ** @returns xcb_void_cookie_t
    753       1.1  mrg  **
    754       1.1  mrg  *****************************************************************************/
    755       1.1  mrg 
    756       1.1  mrg xcb_void_cookie_t
    757       1.1  mrg xcb_shape_select_input_checked (xcb_connection_t *c  /**< */,
    758       1.1  mrg                                 xcb_window_t      destination_window  /**< */,
    759       1.1  mrg                                 uint8_t           enable  /**< */)
    760       1.1  mrg {
    761       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    762       1.1  mrg         /* count */ 2,
    763       1.1  mrg         /* ext */ &xcb_shape_id,
    764       1.1  mrg         /* opcode */ XCB_SHAPE_SELECT_INPUT,
    765       1.1  mrg         /* isvoid */ 1
    766       1.1  mrg     };
    767       1.1  mrg 
    768       1.1  mrg     struct iovec xcb_parts[4];
    769       1.1  mrg     xcb_void_cookie_t xcb_ret;
    770       1.1  mrg     xcb_shape_select_input_request_t xcb_out;
    771       1.1  mrg 
    772       1.1  mrg     xcb_out.destination_window = destination_window;
    773       1.1  mrg     xcb_out.enable = enable;
    774       1.1  mrg     memset(xcb_out.pad0, 0, 3);
    775       1.1  mrg 
    776       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    777       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    778       1.1  mrg     xcb_parts[3].iov_base = 0;
    779       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    780  1.1.12.1  tls 
    781       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    782       1.1  mrg     return xcb_ret;
    783       1.1  mrg }
    784       1.1  mrg 
    785       1.1  mrg 
    786       1.1  mrg /*****************************************************************************
    787       1.1  mrg  **
    788       1.1  mrg  ** xcb_void_cookie_t xcb_shape_select_input
    789       1.1  mrg  **
    790       1.1  mrg  ** @param xcb_connection_t *c
    791       1.1  mrg  ** @param xcb_window_t      destination_window
    792       1.1  mrg  ** @param uint8_t           enable
    793       1.1  mrg  ** @returns xcb_void_cookie_t
    794       1.1  mrg  **
    795       1.1  mrg  *****************************************************************************/
    796       1.1  mrg 
    797       1.1  mrg xcb_void_cookie_t
    798       1.1  mrg xcb_shape_select_input (xcb_connection_t *c  /**< */,
    799       1.1  mrg                         xcb_window_t      destination_window  /**< */,
    800       1.1  mrg                         uint8_t           enable  /**< */)
    801       1.1  mrg {
    802       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    803       1.1  mrg         /* count */ 2,
    804       1.1  mrg         /* ext */ &xcb_shape_id,
    805       1.1  mrg         /* opcode */ XCB_SHAPE_SELECT_INPUT,
    806       1.1  mrg         /* isvoid */ 1
    807       1.1  mrg     };
    808       1.1  mrg 
    809       1.1  mrg     struct iovec xcb_parts[4];
    810       1.1  mrg     xcb_void_cookie_t xcb_ret;
    811       1.1  mrg     xcb_shape_select_input_request_t xcb_out;
    812       1.1  mrg 
    813       1.1  mrg     xcb_out.destination_window = destination_window;
    814       1.1  mrg     xcb_out.enable = enable;
    815       1.1  mrg     memset(xcb_out.pad0, 0, 3);
    816       1.1  mrg 
    817       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    818       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    819       1.1  mrg     xcb_parts[3].iov_base = 0;
    820       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    821  1.1.12.1  tls 
    822       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    823       1.1  mrg     return xcb_ret;
    824       1.1  mrg }
    825       1.1  mrg 
    826       1.1  mrg 
    827       1.1  mrg /*****************************************************************************
    828       1.1  mrg  **
    829       1.1  mrg  ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected
    830       1.1  mrg  **
    831       1.1  mrg  ** @param xcb_connection_t *c
    832       1.1  mrg  ** @param xcb_window_t      destination_window
    833       1.1  mrg  ** @returns xcb_shape_input_selected_cookie_t
    834       1.1  mrg  **
    835       1.1  mrg  *****************************************************************************/
    836       1.1  mrg 
    837       1.1  mrg xcb_shape_input_selected_cookie_t
    838       1.1  mrg xcb_shape_input_selected (xcb_connection_t *c  /**< */,
    839       1.1  mrg                           xcb_window_t      destination_window  /**< */)
    840       1.1  mrg {
    841       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    842       1.1  mrg         /* count */ 2,
    843       1.1  mrg         /* ext */ &xcb_shape_id,
    844       1.1  mrg         /* opcode */ XCB_SHAPE_INPUT_SELECTED,
    845       1.1  mrg         /* isvoid */ 0
    846       1.1  mrg     };
    847       1.1  mrg 
    848       1.1  mrg     struct iovec xcb_parts[4];
    849       1.1  mrg     xcb_shape_input_selected_cookie_t xcb_ret;
    850       1.1  mrg     xcb_shape_input_selected_request_t xcb_out;
    851       1.1  mrg 
    852       1.1  mrg     xcb_out.destination_window = destination_window;
    853       1.1  mrg 
    854       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    855       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    856       1.1  mrg     xcb_parts[3].iov_base = 0;
    857       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    858  1.1.12.1  tls 
    859       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    860       1.1  mrg     return xcb_ret;
    861       1.1  mrg }
    862       1.1  mrg 
    863       1.1  mrg 
    864       1.1  mrg /*****************************************************************************
    865       1.1  mrg  **
    866       1.1  mrg  ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked
    867       1.1  mrg  **
    868       1.1  mrg  ** @param xcb_connection_t *c
    869       1.1  mrg  ** @param xcb_window_t      destination_window
    870       1.1  mrg  ** @returns xcb_shape_input_selected_cookie_t
    871       1.1  mrg  **
    872       1.1  mrg  *****************************************************************************/
    873       1.1  mrg 
    874       1.1  mrg xcb_shape_input_selected_cookie_t
    875       1.1  mrg xcb_shape_input_selected_unchecked (xcb_connection_t *c  /**< */,
    876       1.1  mrg                                     xcb_window_t      destination_window  /**< */)
    877       1.1  mrg {
    878       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    879       1.1  mrg         /* count */ 2,
    880       1.1  mrg         /* ext */ &xcb_shape_id,
    881       1.1  mrg         /* opcode */ XCB_SHAPE_INPUT_SELECTED,
    882       1.1  mrg         /* isvoid */ 0
    883       1.1  mrg     };
    884       1.1  mrg 
    885       1.1  mrg     struct iovec xcb_parts[4];
    886       1.1  mrg     xcb_shape_input_selected_cookie_t xcb_ret;
    887       1.1  mrg     xcb_shape_input_selected_request_t xcb_out;
    888       1.1  mrg 
    889       1.1  mrg     xcb_out.destination_window = destination_window;
    890       1.1  mrg 
    891       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    892       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    893       1.1  mrg     xcb_parts[3].iov_base = 0;
    894       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    895  1.1.12.1  tls 
    896       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    897       1.1  mrg     return xcb_ret;
    898       1.1  mrg }
    899       1.1  mrg 
    900       1.1  mrg 
    901       1.1  mrg /*****************************************************************************
    902       1.1  mrg  **
    903       1.1  mrg  ** xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply
    904       1.1  mrg  **
    905       1.1  mrg  ** @param xcb_connection_t                   *c
    906       1.1  mrg  ** @param xcb_shape_input_selected_cookie_t   cookie
    907       1.1  mrg  ** @param xcb_generic_error_t               **e
    908       1.1  mrg  ** @returns xcb_shape_input_selected_reply_t *
    909       1.1  mrg  **
    910       1.1  mrg  *****************************************************************************/
    911       1.1  mrg 
    912       1.1  mrg xcb_shape_input_selected_reply_t *
    913       1.1  mrg xcb_shape_input_selected_reply (xcb_connection_t                   *c  /**< */,
    914       1.1  mrg                                 xcb_shape_input_selected_cookie_t   cookie  /**< */,
    915       1.1  mrg                                 xcb_generic_error_t               **e  /**< */)
    916       1.1  mrg {
    917       1.1  mrg     return (xcb_shape_input_selected_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    918       1.1  mrg }
    919       1.1  mrg 
    920  1.1.12.1  tls int
    921  1.1.12.1  tls xcb_shape_get_rectangles_sizeof (const void  *_buffer  /**< */)
    922  1.1.12.1  tls {
    923  1.1.12.1  tls     char *xcb_tmp = (char *)_buffer;
    924  1.1.12.1  tls     const xcb_shape_get_rectangles_reply_t *_aux = (xcb_shape_get_rectangles_reply_t *)_buffer;
    925  1.1.12.1  tls     unsigned int xcb_buffer_len = 0;
    926  1.1.12.1  tls     unsigned int xcb_block_len = 0;
    927  1.1.12.1  tls     unsigned int xcb_pad = 0;
    928  1.1.12.1  tls     unsigned int xcb_align_to;
    929  1.1.12.1  tls 
    930  1.1.12.1  tls 
    931  1.1.12.1  tls     xcb_block_len += sizeof(xcb_shape_get_rectangles_reply_t);
    932  1.1.12.1  tls     xcb_tmp += xcb_block_len;
    933  1.1.12.1  tls     /* rectangles */
    934  1.1.12.1  tls     xcb_block_len += _aux->rectangles_len * sizeof(xcb_rectangle_t);
    935  1.1.12.1  tls     xcb_tmp += xcb_block_len;
    936  1.1.12.1  tls     xcb_align_to = ALIGNOF(xcb_rectangle_t);
    937  1.1.12.1  tls     /* insert padding */
    938  1.1.12.1  tls     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    939  1.1.12.1  tls     xcb_buffer_len += xcb_block_len + xcb_pad;
    940  1.1.12.1  tls     if (0 != xcb_pad) {
    941  1.1.12.1  tls         xcb_tmp += xcb_pad;
    942  1.1.12.1  tls         xcb_pad = 0;
    943  1.1.12.1  tls     }
    944  1.1.12.1  tls     xcb_block_len = 0;
    945  1.1.12.1  tls 
    946  1.1.12.1  tls     return xcb_buffer_len;
    947  1.1.12.1  tls }
    948  1.1.12.1  tls 
    949       1.1  mrg 
    950       1.1  mrg /*****************************************************************************
    951       1.1  mrg  **
    952       1.1  mrg  ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles
    953       1.1  mrg  **
    954       1.1  mrg  ** @param xcb_connection_t *c
    955       1.1  mrg  ** @param xcb_window_t      window
    956       1.1  mrg  ** @param xcb_shape_kind_t  source_kind
    957       1.1  mrg  ** @returns xcb_shape_get_rectangles_cookie_t
    958       1.1  mrg  **
    959       1.1  mrg  *****************************************************************************/
    960       1.1  mrg 
    961       1.1  mrg xcb_shape_get_rectangles_cookie_t
    962       1.1  mrg xcb_shape_get_rectangles (xcb_connection_t *c  /**< */,
    963       1.1  mrg                           xcb_window_t      window  /**< */,
    964       1.1  mrg                           xcb_shape_kind_t  source_kind  /**< */)
    965       1.1  mrg {
    966       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
    967       1.1  mrg         /* count */ 2,
    968       1.1  mrg         /* ext */ &xcb_shape_id,
    969       1.1  mrg         /* opcode */ XCB_SHAPE_GET_RECTANGLES,
    970       1.1  mrg         /* isvoid */ 0
    971       1.1  mrg     };
    972       1.1  mrg 
    973       1.1  mrg     struct iovec xcb_parts[4];
    974       1.1  mrg     xcb_shape_get_rectangles_cookie_t xcb_ret;
    975       1.1  mrg     xcb_shape_get_rectangles_request_t xcb_out;
    976       1.1  mrg 
    977       1.1  mrg     xcb_out.window = window;
    978       1.1  mrg     xcb_out.source_kind = source_kind;
    979       1.1  mrg     memset(xcb_out.pad0, 0, 3);
    980       1.1  mrg 
    981       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
    982       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
    983       1.1  mrg     xcb_parts[3].iov_base = 0;
    984       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    985  1.1.12.1  tls 
    986       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    987       1.1  mrg     return xcb_ret;
    988       1.1  mrg }
    989       1.1  mrg 
    990       1.1  mrg 
    991       1.1  mrg /*****************************************************************************
    992       1.1  mrg  **
    993       1.1  mrg  ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked
    994       1.1  mrg  **
    995       1.1  mrg  ** @param xcb_connection_t *c
    996       1.1  mrg  ** @param xcb_window_t      window
    997       1.1  mrg  ** @param xcb_shape_kind_t  source_kind
    998       1.1  mrg  ** @returns xcb_shape_get_rectangles_cookie_t
    999       1.1  mrg  **
   1000       1.1  mrg  *****************************************************************************/
   1001       1.1  mrg 
   1002       1.1  mrg xcb_shape_get_rectangles_cookie_t
   1003       1.1  mrg xcb_shape_get_rectangles_unchecked (xcb_connection_t *c  /**< */,
   1004       1.1  mrg                                     xcb_window_t      window  /**< */,
   1005       1.1  mrg                                     xcb_shape_kind_t  source_kind  /**< */)
   1006       1.1  mrg {
   1007       1.1  mrg     static const xcb_protocol_request_t xcb_req = {
   1008       1.1  mrg         /* count */ 2,
   1009       1.1  mrg         /* ext */ &xcb_shape_id,
   1010       1.1  mrg         /* opcode */ XCB_SHAPE_GET_RECTANGLES,
   1011       1.1  mrg         /* isvoid */ 0
   1012       1.1  mrg     };
   1013       1.1  mrg 
   1014       1.1  mrg     struct iovec xcb_parts[4];
   1015       1.1  mrg     xcb_shape_get_rectangles_cookie_t xcb_ret;
   1016       1.1  mrg     xcb_shape_get_rectangles_request_t xcb_out;
   1017       1.1  mrg 
   1018       1.1  mrg     xcb_out.window = window;
   1019       1.1  mrg     xcb_out.source_kind = source_kind;
   1020       1.1  mrg     memset(xcb_out.pad0, 0, 3);
   1021       1.1  mrg 
   1022       1.1  mrg     xcb_parts[2].iov_base = (char *) &xcb_out;
   1023       1.1  mrg     xcb_parts[2].iov_len = sizeof(xcb_out);
   1024       1.1  mrg     xcb_parts[3].iov_base = 0;
   1025       1.1  mrg     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1026  1.1.12.1  tls 
   1027       1.1  mrg     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1028       1.1  mrg     return xcb_ret;
   1029       1.1  mrg }
   1030       1.1  mrg 
   1031       1.1  mrg 
   1032       1.1  mrg /*****************************************************************************
   1033       1.1  mrg  **
   1034       1.1  mrg  ** xcb_rectangle_t * xcb_shape_get_rectangles_rectangles
   1035       1.1  mrg  **
   1036       1.1  mrg  ** @param const xcb_shape_get_rectangles_reply_t *R
   1037       1.1  mrg  ** @returns xcb_rectangle_t *
   1038       1.1  mrg  **
   1039       1.1  mrg  *****************************************************************************/
   1040       1.1  mrg 
   1041       1.1  mrg xcb_rectangle_t *
   1042       1.1  mrg xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R  /**< */)
   1043       1.1  mrg {
   1044       1.1  mrg     return (xcb_rectangle_t *) (R + 1);
   1045       1.1  mrg }
   1046       1.1  mrg 
   1047       1.1  mrg 
   1048       1.1  mrg /*****************************************************************************
   1049       1.1  mrg  **
   1050       1.1  mrg  ** int xcb_shape_get_rectangles_rectangles_length
   1051       1.1  mrg  **
   1052       1.1  mrg  ** @param const xcb_shape_get_rectangles_reply_t *R
   1053       1.1  mrg  ** @returns int
   1054       1.1  mrg  **
   1055       1.1  mrg  *****************************************************************************/
   1056       1.1  mrg 
   1057       1.1  mrg int
   1058       1.1  mrg xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R  /**< */)
   1059       1.1  mrg {
   1060       1.1  mrg     return R->rectangles_len;
   1061       1.1  mrg }
   1062       1.1  mrg 
   1063       1.1  mrg 
   1064       1.1  mrg /*****************************************************************************
   1065       1.1  mrg  **
   1066       1.1  mrg  ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator
   1067       1.1  mrg  **
   1068       1.1  mrg  ** @param const xcb_shape_get_rectangles_reply_t *R
   1069       1.1  mrg  ** @returns xcb_rectangle_iterator_t
   1070       1.1  mrg  **
   1071       1.1  mrg  *****************************************************************************/
   1072       1.1  mrg 
   1073       1.1  mrg xcb_rectangle_iterator_t
   1074       1.1  mrg xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R  /**< */)
   1075       1.1  mrg {
   1076       1.1  mrg     xcb_rectangle_iterator_t i;
   1077       1.1  mrg     i.data = (xcb_rectangle_t *) (R + 1);
   1078       1.1  mrg     i.rem = R->rectangles_len;
   1079       1.1  mrg     i.index = (char *) i.data - (char *) R;
   1080       1.1  mrg     return i;
   1081       1.1  mrg }
   1082       1.1  mrg 
   1083       1.1  mrg 
   1084       1.1  mrg /*****************************************************************************
   1085       1.1  mrg  **
   1086       1.1  mrg  ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply
   1087       1.1  mrg  **
   1088       1.1  mrg  ** @param xcb_connection_t                   *c
   1089       1.1  mrg  ** @param xcb_shape_get_rectangles_cookie_t   cookie
   1090       1.1  mrg  ** @param xcb_generic_error_t               **e
   1091       1.1  mrg  ** @returns xcb_shape_get_rectangles_reply_t *
   1092       1.1  mrg  **
   1093       1.1  mrg  *****************************************************************************/
   1094       1.1  mrg 
   1095       1.1  mrg xcb_shape_get_rectangles_reply_t *
   1096       1.1  mrg xcb_shape_get_rectangles_reply (xcb_connection_t                   *c  /**< */,
   1097       1.1  mrg                                 xcb_shape_get_rectangles_cookie_t   cookie  /**< */,
   1098       1.1  mrg                                 xcb_generic_error_t               **e  /**< */)
   1099       1.1  mrg {
   1100       1.1  mrg     return (xcb_shape_get_rectangles_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1101       1.1  mrg }
   1102       1.1  mrg 
   1103