Home | History | Annotate | Line # | Download | only in files
xinput.c revision 1.1.12.1
      1 /*
      2  * This file generated automatically from xinput.xml by c_client.py.
      3  * Edit at your peril.
      4  */
      5 
      6 #ifdef HAVE_CONFIG_H
      7 #include "config.h"
      8 #endif
      9 #include <stdlib.h>
     10 #include <string.h>
     11 #include <assert.h>
     12 #include <stddef.h>  /* for offsetof() */
     13 #include "xcbext.h"
     14 #include "xinput.h"
     15 
     16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
     17 #include "xproto.h"
     18 
     19 xcb_extension_t xcb_input_id = { "XInputExtension", 0 };
     20 
     21 
     22 /*****************************************************************************
     23  **
     24  ** void xcb_input_key_code_next
     25  **
     26  ** @param xcb_input_key_code_iterator_t *i
     27  ** @returns void
     28  **
     29  *****************************************************************************/
     30 
     31 void
     32 xcb_input_key_code_next (xcb_input_key_code_iterator_t *i  /**< */)
     33 {
     34     --i->rem;
     35     ++i->data;
     36     i->index += sizeof(xcb_input_key_code_t);
     37 }
     38 
     39 
     40 /*****************************************************************************
     41  **
     42  ** xcb_generic_iterator_t xcb_input_key_code_end
     43  **
     44  ** @param xcb_input_key_code_iterator_t i
     45  ** @returns xcb_generic_iterator_t
     46  **
     47  *****************************************************************************/
     48 
     49 xcb_generic_iterator_t
     50 xcb_input_key_code_end (xcb_input_key_code_iterator_t i  /**< */)
     51 {
     52     xcb_generic_iterator_t ret;
     53     ret.data = i.data + i.rem;
     54     ret.index = i.index + ((char *) ret.data - (char *) i.data);
     55     ret.rem = 0;
     56     return ret;
     57 }
     58 
     59 
     60 /*****************************************************************************
     61  **
     62  ** void xcb_input_event_class_next
     63  **
     64  ** @param xcb_input_event_class_iterator_t *i
     65  ** @returns void
     66  **
     67  *****************************************************************************/
     68 
     69 void
     70 xcb_input_event_class_next (xcb_input_event_class_iterator_t *i  /**< */)
     71 {
     72     --i->rem;
     73     ++i->data;
     74     i->index += sizeof(xcb_input_event_class_t);
     75 }
     76 
     77 
     78 /*****************************************************************************
     79  **
     80  ** xcb_generic_iterator_t xcb_input_event_class_end
     81  **
     82  ** @param xcb_input_event_class_iterator_t i
     83  ** @returns xcb_generic_iterator_t
     84  **
     85  *****************************************************************************/
     86 
     87 xcb_generic_iterator_t
     88 xcb_input_event_class_end (xcb_input_event_class_iterator_t i  /**< */)
     89 {
     90     xcb_generic_iterator_t ret;
     91     ret.data = i.data + i.rem;
     92     ret.index = i.index + ((char *) ret.data - (char *) i.data);
     93     ret.rem = 0;
     94     return ret;
     95 }
     96 
     97 int
     98 xcb_input_get_extension_version_sizeof (const void  *_buffer  /**< */)
     99 {
    100     char *xcb_tmp = (char *)_buffer;
    101     const xcb_input_get_extension_version_request_t *_aux = (xcb_input_get_extension_version_request_t *)_buffer;
    102     unsigned int xcb_buffer_len = 0;
    103     unsigned int xcb_block_len = 0;
    104     unsigned int xcb_pad = 0;
    105     unsigned int xcb_align_to;
    106 
    107 
    108     xcb_block_len += sizeof(xcb_input_get_extension_version_request_t);
    109     xcb_tmp += xcb_block_len;
    110     /* name */
    111     xcb_block_len += _aux->name_len * sizeof(char);
    112     xcb_tmp += xcb_block_len;
    113     xcb_align_to = ALIGNOF(char);
    114     /* insert padding */
    115     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    116     xcb_buffer_len += xcb_block_len + xcb_pad;
    117     if (0 != xcb_pad) {
    118         xcb_tmp += xcb_pad;
    119         xcb_pad = 0;
    120     }
    121     xcb_block_len = 0;
    122 
    123     return xcb_buffer_len;
    124 }
    125 
    126 
    127 /*****************************************************************************
    128  **
    129  ** xcb_input_get_extension_version_cookie_t xcb_input_get_extension_version
    130  **
    131  ** @param xcb_connection_t *c
    132  ** @param uint16_t          name_len
    133  ** @param const char       *name
    134  ** @returns xcb_input_get_extension_version_cookie_t
    135  **
    136  *****************************************************************************/
    137 
    138 xcb_input_get_extension_version_cookie_t
    139 xcb_input_get_extension_version (xcb_connection_t *c  /**< */,
    140                                  uint16_t          name_len  /**< */,
    141                                  const char       *name  /**< */)
    142 {
    143     static const xcb_protocol_request_t xcb_req = {
    144         /* count */ 4,
    145         /* ext */ &xcb_input_id,
    146         /* opcode */ XCB_INPUT_GET_EXTENSION_VERSION,
    147         /* isvoid */ 0
    148     };
    149 
    150     struct iovec xcb_parts[6];
    151     xcb_input_get_extension_version_cookie_t xcb_ret;
    152     xcb_input_get_extension_version_request_t xcb_out;
    153 
    154     xcb_out.name_len = name_len;
    155     memset(xcb_out.pad0, 0, 2);
    156 
    157     xcb_parts[2].iov_base = (char *) &xcb_out;
    158     xcb_parts[2].iov_len = sizeof(xcb_out);
    159     xcb_parts[3].iov_base = 0;
    160     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    161     /* char name */
    162     xcb_parts[4].iov_base = (char *) name;
    163     xcb_parts[4].iov_len = name_len * sizeof(char);
    164     xcb_parts[5].iov_base = 0;
    165     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
    166 
    167     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    168     return xcb_ret;
    169 }
    170 
    171 
    172 /*****************************************************************************
    173  **
    174  ** xcb_input_get_extension_version_cookie_t xcb_input_get_extension_version_unchecked
    175  **
    176  ** @param xcb_connection_t *c
    177  ** @param uint16_t          name_len
    178  ** @param const char       *name
    179  ** @returns xcb_input_get_extension_version_cookie_t
    180  **
    181  *****************************************************************************/
    182 
    183 xcb_input_get_extension_version_cookie_t
    184 xcb_input_get_extension_version_unchecked (xcb_connection_t *c  /**< */,
    185                                            uint16_t          name_len  /**< */,
    186                                            const char       *name  /**< */)
    187 {
    188     static const xcb_protocol_request_t xcb_req = {
    189         /* count */ 4,
    190         /* ext */ &xcb_input_id,
    191         /* opcode */ XCB_INPUT_GET_EXTENSION_VERSION,
    192         /* isvoid */ 0
    193     };
    194 
    195     struct iovec xcb_parts[6];
    196     xcb_input_get_extension_version_cookie_t xcb_ret;
    197     xcb_input_get_extension_version_request_t xcb_out;
    198 
    199     xcb_out.name_len = name_len;
    200     memset(xcb_out.pad0, 0, 2);
    201 
    202     xcb_parts[2].iov_base = (char *) &xcb_out;
    203     xcb_parts[2].iov_len = sizeof(xcb_out);
    204     xcb_parts[3].iov_base = 0;
    205     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    206     /* char name */
    207     xcb_parts[4].iov_base = (char *) name;
    208     xcb_parts[4].iov_len = name_len * sizeof(char);
    209     xcb_parts[5].iov_base = 0;
    210     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
    211 
    212     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    213     return xcb_ret;
    214 }
    215 
    216 
    217 /*****************************************************************************
    218  **
    219  ** xcb_input_get_extension_version_reply_t * xcb_input_get_extension_version_reply
    220  **
    221  ** @param xcb_connection_t                          *c
    222  ** @param xcb_input_get_extension_version_cookie_t   cookie
    223  ** @param xcb_generic_error_t                      **e
    224  ** @returns xcb_input_get_extension_version_reply_t *
    225  **
    226  *****************************************************************************/
    227 
    228 xcb_input_get_extension_version_reply_t *
    229 xcb_input_get_extension_version_reply (xcb_connection_t                          *c  /**< */,
    230                                        xcb_input_get_extension_version_cookie_t   cookie  /**< */,
    231                                        xcb_generic_error_t                      **e  /**< */)
    232 {
    233     return (xcb_input_get_extension_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    234 }
    235 
    236 
    237 /*****************************************************************************
    238  **
    239  ** void xcb_input_device_info_next
    240  **
    241  ** @param xcb_input_device_info_iterator_t *i
    242  ** @returns void
    243  **
    244  *****************************************************************************/
    245 
    246 void
    247 xcb_input_device_info_next (xcb_input_device_info_iterator_t *i  /**< */)
    248 {
    249     --i->rem;
    250     ++i->data;
    251     i->index += sizeof(xcb_input_device_info_t);
    252 }
    253 
    254 
    255 /*****************************************************************************
    256  **
    257  ** xcb_generic_iterator_t xcb_input_device_info_end
    258  **
    259  ** @param xcb_input_device_info_iterator_t i
    260  ** @returns xcb_generic_iterator_t
    261  **
    262  *****************************************************************************/
    263 
    264 xcb_generic_iterator_t
    265 xcb_input_device_info_end (xcb_input_device_info_iterator_t i  /**< */)
    266 {
    267     xcb_generic_iterator_t ret;
    268     ret.data = i.data + i.rem;
    269     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    270     ret.rem = 0;
    271     return ret;
    272 }
    273 
    274 int
    275 xcb_input_list_input_devices_sizeof (const void  *_buffer  /**< */)
    276 {
    277     char *xcb_tmp = (char *)_buffer;
    278     const xcb_input_list_input_devices_reply_t *_aux = (xcb_input_list_input_devices_reply_t *)_buffer;
    279     unsigned int xcb_buffer_len = 0;
    280     unsigned int xcb_block_len = 0;
    281     unsigned int xcb_pad = 0;
    282     unsigned int xcb_align_to;
    283 
    284 
    285     xcb_block_len += sizeof(xcb_input_list_input_devices_reply_t);
    286     xcb_tmp += xcb_block_len;
    287     /* devices */
    288     xcb_block_len += _aux->devices_len * sizeof(xcb_input_device_info_t);
    289     xcb_tmp += xcb_block_len;
    290     xcb_align_to = ALIGNOF(xcb_input_device_info_t);
    291     /* insert padding */
    292     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    293     xcb_buffer_len += xcb_block_len + xcb_pad;
    294     if (0 != xcb_pad) {
    295         xcb_tmp += xcb_pad;
    296         xcb_pad = 0;
    297     }
    298     xcb_block_len = 0;
    299 
    300     return xcb_buffer_len;
    301 }
    302 
    303 
    304 /*****************************************************************************
    305  **
    306  ** xcb_input_list_input_devices_cookie_t xcb_input_list_input_devices
    307  **
    308  ** @param xcb_connection_t *c
    309  ** @returns xcb_input_list_input_devices_cookie_t
    310  **
    311  *****************************************************************************/
    312 
    313 xcb_input_list_input_devices_cookie_t
    314 xcb_input_list_input_devices (xcb_connection_t *c  /**< */)
    315 {
    316     static const xcb_protocol_request_t xcb_req = {
    317         /* count */ 2,
    318         /* ext */ &xcb_input_id,
    319         /* opcode */ XCB_INPUT_LIST_INPUT_DEVICES,
    320         /* isvoid */ 0
    321     };
    322 
    323     struct iovec xcb_parts[4];
    324     xcb_input_list_input_devices_cookie_t xcb_ret;
    325     xcb_input_list_input_devices_request_t xcb_out;
    326 
    327 
    328     xcb_parts[2].iov_base = (char *) &xcb_out;
    329     xcb_parts[2].iov_len = sizeof(xcb_out);
    330     xcb_parts[3].iov_base = 0;
    331     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    332 
    333     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    334     return xcb_ret;
    335 }
    336 
    337 
    338 /*****************************************************************************
    339  **
    340  ** xcb_input_list_input_devices_cookie_t xcb_input_list_input_devices_unchecked
    341  **
    342  ** @param xcb_connection_t *c
    343  ** @returns xcb_input_list_input_devices_cookie_t
    344  **
    345  *****************************************************************************/
    346 
    347 xcb_input_list_input_devices_cookie_t
    348 xcb_input_list_input_devices_unchecked (xcb_connection_t *c  /**< */)
    349 {
    350     static const xcb_protocol_request_t xcb_req = {
    351         /* count */ 2,
    352         /* ext */ &xcb_input_id,
    353         /* opcode */ XCB_INPUT_LIST_INPUT_DEVICES,
    354         /* isvoid */ 0
    355     };
    356 
    357     struct iovec xcb_parts[4];
    358     xcb_input_list_input_devices_cookie_t xcb_ret;
    359     xcb_input_list_input_devices_request_t xcb_out;
    360 
    361 
    362     xcb_parts[2].iov_base = (char *) &xcb_out;
    363     xcb_parts[2].iov_len = sizeof(xcb_out);
    364     xcb_parts[3].iov_base = 0;
    365     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    366 
    367     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    368     return xcb_ret;
    369 }
    370 
    371 
    372 /*****************************************************************************
    373  **
    374  ** xcb_input_device_info_t * xcb_input_list_input_devices_devices
    375  **
    376  ** @param const xcb_input_list_input_devices_reply_t *R
    377  ** @returns xcb_input_device_info_t *
    378  **
    379  *****************************************************************************/
    380 
    381 xcb_input_device_info_t *
    382 xcb_input_list_input_devices_devices (const xcb_input_list_input_devices_reply_t *R  /**< */)
    383 {
    384     return (xcb_input_device_info_t *) (R + 1);
    385 }
    386 
    387 
    388 /*****************************************************************************
    389  **
    390  ** int xcb_input_list_input_devices_devices_length
    391  **
    392  ** @param const xcb_input_list_input_devices_reply_t *R
    393  ** @returns int
    394  **
    395  *****************************************************************************/
    396 
    397 int
    398 xcb_input_list_input_devices_devices_length (const xcb_input_list_input_devices_reply_t *R  /**< */)
    399 {
    400     return R->devices_len;
    401 }
    402 
    403 
    404 /*****************************************************************************
    405  **
    406  ** xcb_input_device_info_iterator_t xcb_input_list_input_devices_devices_iterator
    407  **
    408  ** @param const xcb_input_list_input_devices_reply_t *R
    409  ** @returns xcb_input_device_info_iterator_t
    410  **
    411  *****************************************************************************/
    412 
    413 xcb_input_device_info_iterator_t
    414 xcb_input_list_input_devices_devices_iterator (const xcb_input_list_input_devices_reply_t *R  /**< */)
    415 {
    416     xcb_input_device_info_iterator_t i;
    417     i.data = (xcb_input_device_info_t *) (R + 1);
    418     i.rem = R->devices_len;
    419     i.index = (char *) i.data - (char *) R;
    420     return i;
    421 }
    422 
    423 
    424 /*****************************************************************************
    425  **
    426  ** xcb_input_list_input_devices_reply_t * xcb_input_list_input_devices_reply
    427  **
    428  ** @param xcb_connection_t                       *c
    429  ** @param xcb_input_list_input_devices_cookie_t   cookie
    430  ** @param xcb_generic_error_t                   **e
    431  ** @returns xcb_input_list_input_devices_reply_t *
    432  **
    433  *****************************************************************************/
    434 
    435 xcb_input_list_input_devices_reply_t *
    436 xcb_input_list_input_devices_reply (xcb_connection_t                       *c  /**< */,
    437                                     xcb_input_list_input_devices_cookie_t   cookie  /**< */,
    438                                     xcb_generic_error_t                   **e  /**< */)
    439 {
    440     return (xcb_input_list_input_devices_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    441 }
    442 
    443 
    444 /*****************************************************************************
    445  **
    446  ** void xcb_input_input_info_next
    447  **
    448  ** @param xcb_input_input_info_iterator_t *i
    449  ** @returns void
    450  **
    451  *****************************************************************************/
    452 
    453 void
    454 xcb_input_input_info_next (xcb_input_input_info_iterator_t *i  /**< */)
    455 {
    456     --i->rem;
    457     ++i->data;
    458     i->index += sizeof(xcb_input_input_info_t);
    459 }
    460 
    461 
    462 /*****************************************************************************
    463  **
    464  ** xcb_generic_iterator_t xcb_input_input_info_end
    465  **
    466  ** @param xcb_input_input_info_iterator_t i
    467  ** @returns xcb_generic_iterator_t
    468  **
    469  *****************************************************************************/
    470 
    471 xcb_generic_iterator_t
    472 xcb_input_input_info_end (xcb_input_input_info_iterator_t i  /**< */)
    473 {
    474     xcb_generic_iterator_t ret;
    475     ret.data = i.data + i.rem;
    476     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    477     ret.rem = 0;
    478     return ret;
    479 }
    480 
    481 
    482 /*****************************************************************************
    483  **
    484  ** void xcb_input_key_info_next
    485  **
    486  ** @param xcb_input_key_info_iterator_t *i
    487  ** @returns void
    488  **
    489  *****************************************************************************/
    490 
    491 void
    492 xcb_input_key_info_next (xcb_input_key_info_iterator_t *i  /**< */)
    493 {
    494     --i->rem;
    495     ++i->data;
    496     i->index += sizeof(xcb_input_key_info_t);
    497 }
    498 
    499 
    500 /*****************************************************************************
    501  **
    502  ** xcb_generic_iterator_t xcb_input_key_info_end
    503  **
    504  ** @param xcb_input_key_info_iterator_t i
    505  ** @returns xcb_generic_iterator_t
    506  **
    507  *****************************************************************************/
    508 
    509 xcb_generic_iterator_t
    510 xcb_input_key_info_end (xcb_input_key_info_iterator_t i  /**< */)
    511 {
    512     xcb_generic_iterator_t ret;
    513     ret.data = i.data + i.rem;
    514     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    515     ret.rem = 0;
    516     return ret;
    517 }
    518 
    519 
    520 /*****************************************************************************
    521  **
    522  ** void xcb_input_button_info_next
    523  **
    524  ** @param xcb_input_button_info_iterator_t *i
    525  ** @returns void
    526  **
    527  *****************************************************************************/
    528 
    529 void
    530 xcb_input_button_info_next (xcb_input_button_info_iterator_t *i  /**< */)
    531 {
    532     --i->rem;
    533     ++i->data;
    534     i->index += sizeof(xcb_input_button_info_t);
    535 }
    536 
    537 
    538 /*****************************************************************************
    539  **
    540  ** xcb_generic_iterator_t xcb_input_button_info_end
    541  **
    542  ** @param xcb_input_button_info_iterator_t i
    543  ** @returns xcb_generic_iterator_t
    544  **
    545  *****************************************************************************/
    546 
    547 xcb_generic_iterator_t
    548 xcb_input_button_info_end (xcb_input_button_info_iterator_t i  /**< */)
    549 {
    550     xcb_generic_iterator_t ret;
    551     ret.data = i.data + i.rem;
    552     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    553     ret.rem = 0;
    554     return ret;
    555 }
    556 
    557 
    558 /*****************************************************************************
    559  **
    560  ** void xcb_input_axis_info_next
    561  **
    562  ** @param xcb_input_axis_info_iterator_t *i
    563  ** @returns void
    564  **
    565  *****************************************************************************/
    566 
    567 void
    568 xcb_input_axis_info_next (xcb_input_axis_info_iterator_t *i  /**< */)
    569 {
    570     --i->rem;
    571     ++i->data;
    572     i->index += sizeof(xcb_input_axis_info_t);
    573 }
    574 
    575 
    576 /*****************************************************************************
    577  **
    578  ** xcb_generic_iterator_t xcb_input_axis_info_end
    579  **
    580  ** @param xcb_input_axis_info_iterator_t i
    581  ** @returns xcb_generic_iterator_t
    582  **
    583  *****************************************************************************/
    584 
    585 xcb_generic_iterator_t
    586 xcb_input_axis_info_end (xcb_input_axis_info_iterator_t i  /**< */)
    587 {
    588     xcb_generic_iterator_t ret;
    589     ret.data = i.data + i.rem;
    590     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    591     ret.rem = 0;
    592     return ret;
    593 }
    594 
    595 int
    596 xcb_input_valuator_info_sizeof (const void  *_buffer  /**< */)
    597 {
    598     char *xcb_tmp = (char *)_buffer;
    599     const xcb_input_valuator_info_t *_aux = (xcb_input_valuator_info_t *)_buffer;
    600     unsigned int xcb_buffer_len = 0;
    601     unsigned int xcb_block_len = 0;
    602     unsigned int xcb_pad = 0;
    603     unsigned int xcb_align_to;
    604 
    605 
    606     xcb_block_len += sizeof(xcb_input_valuator_info_t);
    607     xcb_tmp += xcb_block_len;
    608     /* axes */
    609     xcb_block_len += _aux->axes_len * sizeof(xcb_input_axis_info_t);
    610     xcb_tmp += xcb_block_len;
    611     xcb_align_to = ALIGNOF(xcb_input_axis_info_t);
    612     /* insert padding */
    613     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    614     xcb_buffer_len += xcb_block_len + xcb_pad;
    615     if (0 != xcb_pad) {
    616         xcb_tmp += xcb_pad;
    617         xcb_pad = 0;
    618     }
    619     xcb_block_len = 0;
    620 
    621     return xcb_buffer_len;
    622 }
    623 
    624 
    625 /*****************************************************************************
    626  **
    627  ** xcb_input_axis_info_t * xcb_input_valuator_info_axes
    628  **
    629  ** @param const xcb_input_valuator_info_t *R
    630  ** @returns xcb_input_axis_info_t *
    631  **
    632  *****************************************************************************/
    633 
    634 xcb_input_axis_info_t *
    635 xcb_input_valuator_info_axes (const xcb_input_valuator_info_t *R  /**< */)
    636 {
    637     return (xcb_input_axis_info_t *) (R + 1);
    638 }
    639 
    640 
    641 /*****************************************************************************
    642  **
    643  ** int xcb_input_valuator_info_axes_length
    644  **
    645  ** @param const xcb_input_valuator_info_t *R
    646  ** @returns int
    647  **
    648  *****************************************************************************/
    649 
    650 int
    651 xcb_input_valuator_info_axes_length (const xcb_input_valuator_info_t *R  /**< */)
    652 {
    653     return R->axes_len;
    654 }
    655 
    656 
    657 /*****************************************************************************
    658  **
    659  ** xcb_input_axis_info_iterator_t xcb_input_valuator_info_axes_iterator
    660  **
    661  ** @param const xcb_input_valuator_info_t *R
    662  ** @returns xcb_input_axis_info_iterator_t
    663  **
    664  *****************************************************************************/
    665 
    666 xcb_input_axis_info_iterator_t
    667 xcb_input_valuator_info_axes_iterator (const xcb_input_valuator_info_t *R  /**< */)
    668 {
    669     xcb_input_axis_info_iterator_t i;
    670     i.data = (xcb_input_axis_info_t *) (R + 1);
    671     i.rem = R->axes_len;
    672     i.index = (char *) i.data - (char *) R;
    673     return i;
    674 }
    675 
    676 
    677 /*****************************************************************************
    678  **
    679  ** void xcb_input_valuator_info_next
    680  **
    681  ** @param xcb_input_valuator_info_iterator_t *i
    682  ** @returns void
    683  **
    684  *****************************************************************************/
    685 
    686 void
    687 xcb_input_valuator_info_next (xcb_input_valuator_info_iterator_t *i  /**< */)
    688 {
    689     xcb_input_valuator_info_t *R = i->data;
    690     xcb_generic_iterator_t child;
    691     child.data = (xcb_input_valuator_info_t *)(((char *)R) + xcb_input_valuator_info_sizeof(R));
    692     i->index = (char *) child.data - (char *) i->data;
    693     --i->rem;
    694     i->data = (xcb_input_valuator_info_t *) child.data;
    695 }
    696 
    697 
    698 /*****************************************************************************
    699  **
    700  ** xcb_generic_iterator_t xcb_input_valuator_info_end
    701  **
    702  ** @param xcb_input_valuator_info_iterator_t i
    703  ** @returns xcb_generic_iterator_t
    704  **
    705  *****************************************************************************/
    706 
    707 xcb_generic_iterator_t
    708 xcb_input_valuator_info_end (xcb_input_valuator_info_iterator_t i  /**< */)
    709 {
    710     xcb_generic_iterator_t ret;
    711     while(i.rem > 0)
    712         xcb_input_valuator_info_next(&i);
    713     ret.data = i.data;
    714     ret.rem = i.rem;
    715     ret.index = i.index;
    716     return ret;
    717 }
    718 
    719 
    720 /*****************************************************************************
    721  **
    722  ** void xcb_input_input_class_info_next
    723  **
    724  ** @param xcb_input_input_class_info_iterator_t *i
    725  ** @returns void
    726  **
    727  *****************************************************************************/
    728 
    729 void
    730 xcb_input_input_class_info_next (xcb_input_input_class_info_iterator_t *i  /**< */)
    731 {
    732     --i->rem;
    733     ++i->data;
    734     i->index += sizeof(xcb_input_input_class_info_t);
    735 }
    736 
    737 
    738 /*****************************************************************************
    739  **
    740  ** xcb_generic_iterator_t xcb_input_input_class_info_end
    741  **
    742  ** @param xcb_input_input_class_info_iterator_t i
    743  ** @returns xcb_generic_iterator_t
    744  **
    745  *****************************************************************************/
    746 
    747 xcb_generic_iterator_t
    748 xcb_input_input_class_info_end (xcb_input_input_class_info_iterator_t i  /**< */)
    749 {
    750     xcb_generic_iterator_t ret;
    751     ret.data = i.data + i.rem;
    752     ret.index = i.index + ((char *) ret.data - (char *) i.data);
    753     ret.rem = 0;
    754     return ret;
    755 }
    756 
    757 int
    758 xcb_input_open_device_sizeof (const void  *_buffer  /**< */)
    759 {
    760     char *xcb_tmp = (char *)_buffer;
    761     const xcb_input_open_device_reply_t *_aux = (xcb_input_open_device_reply_t *)_buffer;
    762     unsigned int xcb_buffer_len = 0;
    763     unsigned int xcb_block_len = 0;
    764     unsigned int xcb_pad = 0;
    765     unsigned int xcb_align_to;
    766 
    767 
    768     xcb_block_len += sizeof(xcb_input_open_device_reply_t);
    769     xcb_tmp += xcb_block_len;
    770     /* class_info */
    771     xcb_block_len += _aux->num_classes * sizeof(xcb_input_input_class_info_t);
    772     xcb_tmp += xcb_block_len;
    773     xcb_align_to = ALIGNOF(xcb_input_input_class_info_t);
    774     /* insert padding */
    775     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
    776     xcb_buffer_len += xcb_block_len + xcb_pad;
    777     if (0 != xcb_pad) {
    778         xcb_tmp += xcb_pad;
    779         xcb_pad = 0;
    780     }
    781     xcb_block_len = 0;
    782 
    783     return xcb_buffer_len;
    784 }
    785 
    786 
    787 /*****************************************************************************
    788  **
    789  ** xcb_input_open_device_cookie_t xcb_input_open_device
    790  **
    791  ** @param xcb_connection_t *c
    792  ** @param uint8_t           device_id
    793  ** @returns xcb_input_open_device_cookie_t
    794  **
    795  *****************************************************************************/
    796 
    797 xcb_input_open_device_cookie_t
    798 xcb_input_open_device (xcb_connection_t *c  /**< */,
    799                        uint8_t           device_id  /**< */)
    800 {
    801     static const xcb_protocol_request_t xcb_req = {
    802         /* count */ 2,
    803         /* ext */ &xcb_input_id,
    804         /* opcode */ XCB_INPUT_OPEN_DEVICE,
    805         /* isvoid */ 0
    806     };
    807 
    808     struct iovec xcb_parts[4];
    809     xcb_input_open_device_cookie_t xcb_ret;
    810     xcb_input_open_device_request_t xcb_out;
    811 
    812     xcb_out.device_id = device_id;
    813     memset(xcb_out.pad0, 0, 3);
    814 
    815     xcb_parts[2].iov_base = (char *) &xcb_out;
    816     xcb_parts[2].iov_len = sizeof(xcb_out);
    817     xcb_parts[3].iov_base = 0;
    818     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    819 
    820     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    821     return xcb_ret;
    822 }
    823 
    824 
    825 /*****************************************************************************
    826  **
    827  ** xcb_input_open_device_cookie_t xcb_input_open_device_unchecked
    828  **
    829  ** @param xcb_connection_t *c
    830  ** @param uint8_t           device_id
    831  ** @returns xcb_input_open_device_cookie_t
    832  **
    833  *****************************************************************************/
    834 
    835 xcb_input_open_device_cookie_t
    836 xcb_input_open_device_unchecked (xcb_connection_t *c  /**< */,
    837                                  uint8_t           device_id  /**< */)
    838 {
    839     static const xcb_protocol_request_t xcb_req = {
    840         /* count */ 2,
    841         /* ext */ &xcb_input_id,
    842         /* opcode */ XCB_INPUT_OPEN_DEVICE,
    843         /* isvoid */ 0
    844     };
    845 
    846     struct iovec xcb_parts[4];
    847     xcb_input_open_device_cookie_t xcb_ret;
    848     xcb_input_open_device_request_t xcb_out;
    849 
    850     xcb_out.device_id = device_id;
    851     memset(xcb_out.pad0, 0, 3);
    852 
    853     xcb_parts[2].iov_base = (char *) &xcb_out;
    854     xcb_parts[2].iov_len = sizeof(xcb_out);
    855     xcb_parts[3].iov_base = 0;
    856     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    857 
    858     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
    859     return xcb_ret;
    860 }
    861 
    862 
    863 /*****************************************************************************
    864  **
    865  ** xcb_input_input_class_info_t * xcb_input_open_device_class_info
    866  **
    867  ** @param const xcb_input_open_device_reply_t *R
    868  ** @returns xcb_input_input_class_info_t *
    869  **
    870  *****************************************************************************/
    871 
    872 xcb_input_input_class_info_t *
    873 xcb_input_open_device_class_info (const xcb_input_open_device_reply_t *R  /**< */)
    874 {
    875     return (xcb_input_input_class_info_t *) (R + 1);
    876 }
    877 
    878 
    879 /*****************************************************************************
    880  **
    881  ** int xcb_input_open_device_class_info_length
    882  **
    883  ** @param const xcb_input_open_device_reply_t *R
    884  ** @returns int
    885  **
    886  *****************************************************************************/
    887 
    888 int
    889 xcb_input_open_device_class_info_length (const xcb_input_open_device_reply_t *R  /**< */)
    890 {
    891     return R->num_classes;
    892 }
    893 
    894 
    895 /*****************************************************************************
    896  **
    897  ** xcb_input_input_class_info_iterator_t xcb_input_open_device_class_info_iterator
    898  **
    899  ** @param const xcb_input_open_device_reply_t *R
    900  ** @returns xcb_input_input_class_info_iterator_t
    901  **
    902  *****************************************************************************/
    903 
    904 xcb_input_input_class_info_iterator_t
    905 xcb_input_open_device_class_info_iterator (const xcb_input_open_device_reply_t *R  /**< */)
    906 {
    907     xcb_input_input_class_info_iterator_t i;
    908     i.data = (xcb_input_input_class_info_t *) (R + 1);
    909     i.rem = R->num_classes;
    910     i.index = (char *) i.data - (char *) R;
    911     return i;
    912 }
    913 
    914 
    915 /*****************************************************************************
    916  **
    917  ** xcb_input_open_device_reply_t * xcb_input_open_device_reply
    918  **
    919  ** @param xcb_connection_t                *c
    920  ** @param xcb_input_open_device_cookie_t   cookie
    921  ** @param xcb_generic_error_t            **e
    922  ** @returns xcb_input_open_device_reply_t *
    923  **
    924  *****************************************************************************/
    925 
    926 xcb_input_open_device_reply_t *
    927 xcb_input_open_device_reply (xcb_connection_t                *c  /**< */,
    928                              xcb_input_open_device_cookie_t   cookie  /**< */,
    929                              xcb_generic_error_t            **e  /**< */)
    930 {
    931     return (xcb_input_open_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
    932 }
    933 
    934 
    935 /*****************************************************************************
    936  **
    937  ** xcb_void_cookie_t xcb_input_close_device_checked
    938  **
    939  ** @param xcb_connection_t *c
    940  ** @param uint8_t           device_id
    941  ** @returns xcb_void_cookie_t
    942  **
    943  *****************************************************************************/
    944 
    945 xcb_void_cookie_t
    946 xcb_input_close_device_checked (xcb_connection_t *c  /**< */,
    947                                 uint8_t           device_id  /**< */)
    948 {
    949     static const xcb_protocol_request_t xcb_req = {
    950         /* count */ 2,
    951         /* ext */ &xcb_input_id,
    952         /* opcode */ XCB_INPUT_CLOSE_DEVICE,
    953         /* isvoid */ 1
    954     };
    955 
    956     struct iovec xcb_parts[4];
    957     xcb_void_cookie_t xcb_ret;
    958     xcb_input_close_device_request_t xcb_out;
    959 
    960     xcb_out.device_id = device_id;
    961     memset(xcb_out.pad0, 0, 3);
    962 
    963     xcb_parts[2].iov_base = (char *) &xcb_out;
    964     xcb_parts[2].iov_len = sizeof(xcb_out);
    965     xcb_parts[3].iov_base = 0;
    966     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
    967 
    968     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
    969     return xcb_ret;
    970 }
    971 
    972 
    973 /*****************************************************************************
    974  **
    975  ** xcb_void_cookie_t xcb_input_close_device
    976  **
    977  ** @param xcb_connection_t *c
    978  ** @param uint8_t           device_id
    979  ** @returns xcb_void_cookie_t
    980  **
    981  *****************************************************************************/
    982 
    983 xcb_void_cookie_t
    984 xcb_input_close_device (xcb_connection_t *c  /**< */,
    985                         uint8_t           device_id  /**< */)
    986 {
    987     static const xcb_protocol_request_t xcb_req = {
    988         /* count */ 2,
    989         /* ext */ &xcb_input_id,
    990         /* opcode */ XCB_INPUT_CLOSE_DEVICE,
    991         /* isvoid */ 1
    992     };
    993 
    994     struct iovec xcb_parts[4];
    995     xcb_void_cookie_t xcb_ret;
    996     xcb_input_close_device_request_t xcb_out;
    997 
    998     xcb_out.device_id = device_id;
    999     memset(xcb_out.pad0, 0, 3);
   1000 
   1001     xcb_parts[2].iov_base = (char *) &xcb_out;
   1002     xcb_parts[2].iov_len = sizeof(xcb_out);
   1003     xcb_parts[3].iov_base = 0;
   1004     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1005 
   1006     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1007     return xcb_ret;
   1008 }
   1009 
   1010 
   1011 /*****************************************************************************
   1012  **
   1013  ** xcb_input_set_device_mode_cookie_t xcb_input_set_device_mode
   1014  **
   1015  ** @param xcb_connection_t *c
   1016  ** @param uint8_t           device_id
   1017  ** @param uint8_t           mode
   1018  ** @returns xcb_input_set_device_mode_cookie_t
   1019  **
   1020  *****************************************************************************/
   1021 
   1022 xcb_input_set_device_mode_cookie_t
   1023 xcb_input_set_device_mode (xcb_connection_t *c  /**< */,
   1024                            uint8_t           device_id  /**< */,
   1025                            uint8_t           mode  /**< */)
   1026 {
   1027     static const xcb_protocol_request_t xcb_req = {
   1028         /* count */ 2,
   1029         /* ext */ &xcb_input_id,
   1030         /* opcode */ XCB_INPUT_SET_DEVICE_MODE,
   1031         /* isvoid */ 0
   1032     };
   1033 
   1034     struct iovec xcb_parts[4];
   1035     xcb_input_set_device_mode_cookie_t xcb_ret;
   1036     xcb_input_set_device_mode_request_t xcb_out;
   1037 
   1038     xcb_out.device_id = device_id;
   1039     xcb_out.mode = mode;
   1040     memset(xcb_out.pad0, 0, 2);
   1041 
   1042     xcb_parts[2].iov_base = (char *) &xcb_out;
   1043     xcb_parts[2].iov_len = sizeof(xcb_out);
   1044     xcb_parts[3].iov_base = 0;
   1045     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1046 
   1047     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1048     return xcb_ret;
   1049 }
   1050 
   1051 
   1052 /*****************************************************************************
   1053  **
   1054  ** xcb_input_set_device_mode_cookie_t xcb_input_set_device_mode_unchecked
   1055  **
   1056  ** @param xcb_connection_t *c
   1057  ** @param uint8_t           device_id
   1058  ** @param uint8_t           mode
   1059  ** @returns xcb_input_set_device_mode_cookie_t
   1060  **
   1061  *****************************************************************************/
   1062 
   1063 xcb_input_set_device_mode_cookie_t
   1064 xcb_input_set_device_mode_unchecked (xcb_connection_t *c  /**< */,
   1065                                      uint8_t           device_id  /**< */,
   1066                                      uint8_t           mode  /**< */)
   1067 {
   1068     static const xcb_protocol_request_t xcb_req = {
   1069         /* count */ 2,
   1070         /* ext */ &xcb_input_id,
   1071         /* opcode */ XCB_INPUT_SET_DEVICE_MODE,
   1072         /* isvoid */ 0
   1073     };
   1074 
   1075     struct iovec xcb_parts[4];
   1076     xcb_input_set_device_mode_cookie_t xcb_ret;
   1077     xcb_input_set_device_mode_request_t xcb_out;
   1078 
   1079     xcb_out.device_id = device_id;
   1080     xcb_out.mode = mode;
   1081     memset(xcb_out.pad0, 0, 2);
   1082 
   1083     xcb_parts[2].iov_base = (char *) &xcb_out;
   1084     xcb_parts[2].iov_len = sizeof(xcb_out);
   1085     xcb_parts[3].iov_base = 0;
   1086     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1087 
   1088     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1089     return xcb_ret;
   1090 }
   1091 
   1092 
   1093 /*****************************************************************************
   1094  **
   1095  ** xcb_input_set_device_mode_reply_t * xcb_input_set_device_mode_reply
   1096  **
   1097  ** @param xcb_connection_t                    *c
   1098  ** @param xcb_input_set_device_mode_cookie_t   cookie
   1099  ** @param xcb_generic_error_t                **e
   1100  ** @returns xcb_input_set_device_mode_reply_t *
   1101  **
   1102  *****************************************************************************/
   1103 
   1104 xcb_input_set_device_mode_reply_t *
   1105 xcb_input_set_device_mode_reply (xcb_connection_t                    *c  /**< */,
   1106                                  xcb_input_set_device_mode_cookie_t   cookie  /**< */,
   1107                                  xcb_generic_error_t                **e  /**< */)
   1108 {
   1109     return (xcb_input_set_device_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1110 }
   1111 
   1112 int
   1113 xcb_input_select_extension_event_sizeof (const void  *_buffer  /**< */)
   1114 {
   1115     char *xcb_tmp = (char *)_buffer;
   1116     const xcb_input_select_extension_event_request_t *_aux = (xcb_input_select_extension_event_request_t *)_buffer;
   1117     unsigned int xcb_buffer_len = 0;
   1118     unsigned int xcb_block_len = 0;
   1119     unsigned int xcb_pad = 0;
   1120     unsigned int xcb_align_to;
   1121 
   1122 
   1123     xcb_block_len += sizeof(xcb_input_select_extension_event_request_t);
   1124     xcb_tmp += xcb_block_len;
   1125     /* classes */
   1126     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   1127     xcb_tmp += xcb_block_len;
   1128     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   1129     /* insert padding */
   1130     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   1131     xcb_buffer_len += xcb_block_len + xcb_pad;
   1132     if (0 != xcb_pad) {
   1133         xcb_tmp += xcb_pad;
   1134         xcb_pad = 0;
   1135     }
   1136     xcb_block_len = 0;
   1137 
   1138     return xcb_buffer_len;
   1139 }
   1140 
   1141 
   1142 /*****************************************************************************
   1143  **
   1144  ** xcb_void_cookie_t xcb_input_select_extension_event_checked
   1145  **
   1146  ** @param xcb_connection_t              *c
   1147  ** @param xcb_window_t                   window
   1148  ** @param uint16_t                       num_classes
   1149  ** @param const xcb_input_event_class_t *classes
   1150  ** @returns xcb_void_cookie_t
   1151  **
   1152  *****************************************************************************/
   1153 
   1154 xcb_void_cookie_t
   1155 xcb_input_select_extension_event_checked (xcb_connection_t              *c  /**< */,
   1156                                           xcb_window_t                   window  /**< */,
   1157                                           uint16_t                       num_classes  /**< */,
   1158                                           const xcb_input_event_class_t *classes  /**< */)
   1159 {
   1160     static const xcb_protocol_request_t xcb_req = {
   1161         /* count */ 4,
   1162         /* ext */ &xcb_input_id,
   1163         /* opcode */ XCB_INPUT_SELECT_EXTENSION_EVENT,
   1164         /* isvoid */ 1
   1165     };
   1166 
   1167     struct iovec xcb_parts[6];
   1168     xcb_void_cookie_t xcb_ret;
   1169     xcb_input_select_extension_event_request_t xcb_out;
   1170 
   1171     xcb_out.window = window;
   1172     xcb_out.num_classes = num_classes;
   1173     memset(xcb_out.pad0, 0, 2);
   1174 
   1175     xcb_parts[2].iov_base = (char *) &xcb_out;
   1176     xcb_parts[2].iov_len = sizeof(xcb_out);
   1177     xcb_parts[3].iov_base = 0;
   1178     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1179     /* xcb_input_event_class_t classes */
   1180     xcb_parts[4].iov_base = (char *) classes;
   1181     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   1182     xcb_parts[5].iov_base = 0;
   1183     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   1184 
   1185     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1186     return xcb_ret;
   1187 }
   1188 
   1189 
   1190 /*****************************************************************************
   1191  **
   1192  ** xcb_void_cookie_t xcb_input_select_extension_event
   1193  **
   1194  ** @param xcb_connection_t              *c
   1195  ** @param xcb_window_t                   window
   1196  ** @param uint16_t                       num_classes
   1197  ** @param const xcb_input_event_class_t *classes
   1198  ** @returns xcb_void_cookie_t
   1199  **
   1200  *****************************************************************************/
   1201 
   1202 xcb_void_cookie_t
   1203 xcb_input_select_extension_event (xcb_connection_t              *c  /**< */,
   1204                                   xcb_window_t                   window  /**< */,
   1205                                   uint16_t                       num_classes  /**< */,
   1206                                   const xcb_input_event_class_t *classes  /**< */)
   1207 {
   1208     static const xcb_protocol_request_t xcb_req = {
   1209         /* count */ 4,
   1210         /* ext */ &xcb_input_id,
   1211         /* opcode */ XCB_INPUT_SELECT_EXTENSION_EVENT,
   1212         /* isvoid */ 1
   1213     };
   1214 
   1215     struct iovec xcb_parts[6];
   1216     xcb_void_cookie_t xcb_ret;
   1217     xcb_input_select_extension_event_request_t xcb_out;
   1218 
   1219     xcb_out.window = window;
   1220     xcb_out.num_classes = num_classes;
   1221     memset(xcb_out.pad0, 0, 2);
   1222 
   1223     xcb_parts[2].iov_base = (char *) &xcb_out;
   1224     xcb_parts[2].iov_len = sizeof(xcb_out);
   1225     xcb_parts[3].iov_base = 0;
   1226     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1227     /* xcb_input_event_class_t classes */
   1228     xcb_parts[4].iov_base = (char *) classes;
   1229     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   1230     xcb_parts[5].iov_base = 0;
   1231     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   1232 
   1233     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1234     return xcb_ret;
   1235 }
   1236 
   1237 int
   1238 xcb_input_get_selected_extension_events_sizeof (const void  *_buffer  /**< */)
   1239 {
   1240     char *xcb_tmp = (char *)_buffer;
   1241     const xcb_input_get_selected_extension_events_reply_t *_aux = (xcb_input_get_selected_extension_events_reply_t *)_buffer;
   1242     unsigned int xcb_buffer_len = 0;
   1243     unsigned int xcb_block_len = 0;
   1244     unsigned int xcb_pad = 0;
   1245     unsigned int xcb_align_to;
   1246 
   1247 
   1248     xcb_block_len += sizeof(xcb_input_get_selected_extension_events_reply_t);
   1249     xcb_tmp += xcb_block_len;
   1250     /* this_classes */
   1251     xcb_block_len += _aux->num_this_classes * sizeof(xcb_input_event_class_t);
   1252     xcb_tmp += xcb_block_len;
   1253     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   1254     /* insert padding */
   1255     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   1256     xcb_buffer_len += xcb_block_len + xcb_pad;
   1257     if (0 != xcb_pad) {
   1258         xcb_tmp += xcb_pad;
   1259         xcb_pad = 0;
   1260     }
   1261     xcb_block_len = 0;
   1262     /* all_classes */
   1263     xcb_block_len += _aux->num_all_classes * sizeof(xcb_input_event_class_t);
   1264     xcb_tmp += xcb_block_len;
   1265     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   1266     /* insert padding */
   1267     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   1268     xcb_buffer_len += xcb_block_len + xcb_pad;
   1269     if (0 != xcb_pad) {
   1270         xcb_tmp += xcb_pad;
   1271         xcb_pad = 0;
   1272     }
   1273     xcb_block_len = 0;
   1274 
   1275     return xcb_buffer_len;
   1276 }
   1277 
   1278 
   1279 /*****************************************************************************
   1280  **
   1281  ** xcb_input_get_selected_extension_events_cookie_t xcb_input_get_selected_extension_events
   1282  **
   1283  ** @param xcb_connection_t *c
   1284  ** @param xcb_window_t      window
   1285  ** @returns xcb_input_get_selected_extension_events_cookie_t
   1286  **
   1287  *****************************************************************************/
   1288 
   1289 xcb_input_get_selected_extension_events_cookie_t
   1290 xcb_input_get_selected_extension_events (xcb_connection_t *c  /**< */,
   1291                                          xcb_window_t      window  /**< */)
   1292 {
   1293     static const xcb_protocol_request_t xcb_req = {
   1294         /* count */ 2,
   1295         /* ext */ &xcb_input_id,
   1296         /* opcode */ XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS,
   1297         /* isvoid */ 0
   1298     };
   1299 
   1300     struct iovec xcb_parts[4];
   1301     xcb_input_get_selected_extension_events_cookie_t xcb_ret;
   1302     xcb_input_get_selected_extension_events_request_t xcb_out;
   1303 
   1304     xcb_out.window = window;
   1305 
   1306     xcb_parts[2].iov_base = (char *) &xcb_out;
   1307     xcb_parts[2].iov_len = sizeof(xcb_out);
   1308     xcb_parts[3].iov_base = 0;
   1309     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1310 
   1311     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1312     return xcb_ret;
   1313 }
   1314 
   1315 
   1316 /*****************************************************************************
   1317  **
   1318  ** xcb_input_get_selected_extension_events_cookie_t xcb_input_get_selected_extension_events_unchecked
   1319  **
   1320  ** @param xcb_connection_t *c
   1321  ** @param xcb_window_t      window
   1322  ** @returns xcb_input_get_selected_extension_events_cookie_t
   1323  **
   1324  *****************************************************************************/
   1325 
   1326 xcb_input_get_selected_extension_events_cookie_t
   1327 xcb_input_get_selected_extension_events_unchecked (xcb_connection_t *c  /**< */,
   1328                                                    xcb_window_t      window  /**< */)
   1329 {
   1330     static const xcb_protocol_request_t xcb_req = {
   1331         /* count */ 2,
   1332         /* ext */ &xcb_input_id,
   1333         /* opcode */ XCB_INPUT_GET_SELECTED_EXTENSION_EVENTS,
   1334         /* isvoid */ 0
   1335     };
   1336 
   1337     struct iovec xcb_parts[4];
   1338     xcb_input_get_selected_extension_events_cookie_t xcb_ret;
   1339     xcb_input_get_selected_extension_events_request_t xcb_out;
   1340 
   1341     xcb_out.window = window;
   1342 
   1343     xcb_parts[2].iov_base = (char *) &xcb_out;
   1344     xcb_parts[2].iov_len = sizeof(xcb_out);
   1345     xcb_parts[3].iov_base = 0;
   1346     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1347 
   1348     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1349     return xcb_ret;
   1350 }
   1351 
   1352 
   1353 /*****************************************************************************
   1354  **
   1355  ** xcb_input_event_class_t * xcb_input_get_selected_extension_events_this_classes
   1356  **
   1357  ** @param const xcb_input_get_selected_extension_events_reply_t *R
   1358  ** @returns xcb_input_event_class_t *
   1359  **
   1360  *****************************************************************************/
   1361 
   1362 xcb_input_event_class_t *
   1363 xcb_input_get_selected_extension_events_this_classes (const xcb_input_get_selected_extension_events_reply_t *R  /**< */)
   1364 {
   1365     return (xcb_input_event_class_t *) (R + 1);
   1366 }
   1367 
   1368 
   1369 /*****************************************************************************
   1370  **
   1371  ** int xcb_input_get_selected_extension_events_this_classes_length
   1372  **
   1373  ** @param const xcb_input_get_selected_extension_events_reply_t *R
   1374  ** @returns int
   1375  **
   1376  *****************************************************************************/
   1377 
   1378 int
   1379 xcb_input_get_selected_extension_events_this_classes_length (const xcb_input_get_selected_extension_events_reply_t *R  /**< */)
   1380 {
   1381     return R->num_this_classes;
   1382 }
   1383 
   1384 
   1385 /*****************************************************************************
   1386  **
   1387  ** xcb_generic_iterator_t xcb_input_get_selected_extension_events_this_classes_end
   1388  **
   1389  ** @param const xcb_input_get_selected_extension_events_reply_t *R
   1390  ** @returns xcb_generic_iterator_t
   1391  **
   1392  *****************************************************************************/
   1393 
   1394 xcb_generic_iterator_t
   1395 xcb_input_get_selected_extension_events_this_classes_end (const xcb_input_get_selected_extension_events_reply_t *R  /**< */)
   1396 {
   1397     xcb_generic_iterator_t i;
   1398     i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_this_classes);
   1399     i.rem = 0;
   1400     i.index = (char *) i.data - (char *) R;
   1401     return i;
   1402 }
   1403 
   1404 
   1405 /*****************************************************************************
   1406  **
   1407  ** xcb_input_event_class_t * xcb_input_get_selected_extension_events_all_classes
   1408  **
   1409  ** @param const xcb_input_get_selected_extension_events_reply_t *R
   1410  ** @returns xcb_input_event_class_t *
   1411  **
   1412  *****************************************************************************/
   1413 
   1414 xcb_input_event_class_t *
   1415 xcb_input_get_selected_extension_events_all_classes (const xcb_input_get_selected_extension_events_reply_t *R  /**< */)
   1416 {
   1417     xcb_generic_iterator_t prev = xcb_input_get_selected_extension_events_this_classes_end(R);
   1418     return (xcb_input_event_class_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_input_event_class_t, prev.index) + 0);
   1419 }
   1420 
   1421 
   1422 /*****************************************************************************
   1423  **
   1424  ** int xcb_input_get_selected_extension_events_all_classes_length
   1425  **
   1426  ** @param const xcb_input_get_selected_extension_events_reply_t *R
   1427  ** @returns int
   1428  **
   1429  *****************************************************************************/
   1430 
   1431 int
   1432 xcb_input_get_selected_extension_events_all_classes_length (const xcb_input_get_selected_extension_events_reply_t *R  /**< */)
   1433 {
   1434     return R->num_all_classes;
   1435 }
   1436 
   1437 
   1438 /*****************************************************************************
   1439  **
   1440  ** xcb_generic_iterator_t xcb_input_get_selected_extension_events_all_classes_end
   1441  **
   1442  ** @param const xcb_input_get_selected_extension_events_reply_t *R
   1443  ** @returns xcb_generic_iterator_t
   1444  **
   1445  *****************************************************************************/
   1446 
   1447 xcb_generic_iterator_t
   1448 xcb_input_get_selected_extension_events_all_classes_end (const xcb_input_get_selected_extension_events_reply_t *R  /**< */)
   1449 {
   1450     xcb_generic_iterator_t i;
   1451     xcb_generic_iterator_t child = xcb_input_get_selected_extension_events_this_classes_end(R);
   1452     i.data = ((xcb_input_event_class_t *) child.data) + (R->num_all_classes);
   1453     i.rem = 0;
   1454     i.index = (char *) i.data - (char *) R;
   1455     return i;
   1456 }
   1457 
   1458 
   1459 /*****************************************************************************
   1460  **
   1461  ** xcb_input_get_selected_extension_events_reply_t * xcb_input_get_selected_extension_events_reply
   1462  **
   1463  ** @param xcb_connection_t                                  *c
   1464  ** @param xcb_input_get_selected_extension_events_cookie_t   cookie
   1465  ** @param xcb_generic_error_t                              **e
   1466  ** @returns xcb_input_get_selected_extension_events_reply_t *
   1467  **
   1468  *****************************************************************************/
   1469 
   1470 xcb_input_get_selected_extension_events_reply_t *
   1471 xcb_input_get_selected_extension_events_reply (xcb_connection_t                                  *c  /**< */,
   1472                                                xcb_input_get_selected_extension_events_cookie_t   cookie  /**< */,
   1473                                                xcb_generic_error_t                              **e  /**< */)
   1474 {
   1475     return (xcb_input_get_selected_extension_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1476 }
   1477 
   1478 int
   1479 xcb_input_change_device_dont_propagate_list_sizeof (const void  *_buffer  /**< */)
   1480 {
   1481     char *xcb_tmp = (char *)_buffer;
   1482     const xcb_input_change_device_dont_propagate_list_request_t *_aux = (xcb_input_change_device_dont_propagate_list_request_t *)_buffer;
   1483     unsigned int xcb_buffer_len = 0;
   1484     unsigned int xcb_block_len = 0;
   1485     unsigned int xcb_pad = 0;
   1486     unsigned int xcb_align_to;
   1487 
   1488 
   1489     xcb_block_len += sizeof(xcb_input_change_device_dont_propagate_list_request_t);
   1490     xcb_tmp += xcb_block_len;
   1491     /* classes */
   1492     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   1493     xcb_tmp += xcb_block_len;
   1494     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   1495     /* insert padding */
   1496     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   1497     xcb_buffer_len += xcb_block_len + xcb_pad;
   1498     if (0 != xcb_pad) {
   1499         xcb_tmp += xcb_pad;
   1500         xcb_pad = 0;
   1501     }
   1502     xcb_block_len = 0;
   1503 
   1504     return xcb_buffer_len;
   1505 }
   1506 
   1507 
   1508 /*****************************************************************************
   1509  **
   1510  ** xcb_void_cookie_t xcb_input_change_device_dont_propagate_list_checked
   1511  **
   1512  ** @param xcb_connection_t              *c
   1513  ** @param xcb_window_t                   window
   1514  ** @param uint16_t                       num_classes
   1515  ** @param uint8_t                        mode
   1516  ** @param const xcb_input_event_class_t *classes
   1517  ** @returns xcb_void_cookie_t
   1518  **
   1519  *****************************************************************************/
   1520 
   1521 xcb_void_cookie_t
   1522 xcb_input_change_device_dont_propagate_list_checked (xcb_connection_t              *c  /**< */,
   1523                                                      xcb_window_t                   window  /**< */,
   1524                                                      uint16_t                       num_classes  /**< */,
   1525                                                      uint8_t                        mode  /**< */,
   1526                                                      const xcb_input_event_class_t *classes  /**< */)
   1527 {
   1528     static const xcb_protocol_request_t xcb_req = {
   1529         /* count */ 4,
   1530         /* ext */ &xcb_input_id,
   1531         /* opcode */ XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST,
   1532         /* isvoid */ 1
   1533     };
   1534 
   1535     struct iovec xcb_parts[6];
   1536     xcb_void_cookie_t xcb_ret;
   1537     xcb_input_change_device_dont_propagate_list_request_t xcb_out;
   1538 
   1539     xcb_out.window = window;
   1540     xcb_out.num_classes = num_classes;
   1541     xcb_out.mode = mode;
   1542     xcb_out.pad0 = 0;
   1543 
   1544     xcb_parts[2].iov_base = (char *) &xcb_out;
   1545     xcb_parts[2].iov_len = sizeof(xcb_out);
   1546     xcb_parts[3].iov_base = 0;
   1547     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1548     /* xcb_input_event_class_t classes */
   1549     xcb_parts[4].iov_base = (char *) classes;
   1550     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   1551     xcb_parts[5].iov_base = 0;
   1552     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   1553 
   1554     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1555     return xcb_ret;
   1556 }
   1557 
   1558 
   1559 /*****************************************************************************
   1560  **
   1561  ** xcb_void_cookie_t xcb_input_change_device_dont_propagate_list
   1562  **
   1563  ** @param xcb_connection_t              *c
   1564  ** @param xcb_window_t                   window
   1565  ** @param uint16_t                       num_classes
   1566  ** @param uint8_t                        mode
   1567  ** @param const xcb_input_event_class_t *classes
   1568  ** @returns xcb_void_cookie_t
   1569  **
   1570  *****************************************************************************/
   1571 
   1572 xcb_void_cookie_t
   1573 xcb_input_change_device_dont_propagate_list (xcb_connection_t              *c  /**< */,
   1574                                              xcb_window_t                   window  /**< */,
   1575                                              uint16_t                       num_classes  /**< */,
   1576                                              uint8_t                        mode  /**< */,
   1577                                              const xcb_input_event_class_t *classes  /**< */)
   1578 {
   1579     static const xcb_protocol_request_t xcb_req = {
   1580         /* count */ 4,
   1581         /* ext */ &xcb_input_id,
   1582         /* opcode */ XCB_INPUT_CHANGE_DEVICE_DONT_PROPAGATE_LIST,
   1583         /* isvoid */ 1
   1584     };
   1585 
   1586     struct iovec xcb_parts[6];
   1587     xcb_void_cookie_t xcb_ret;
   1588     xcb_input_change_device_dont_propagate_list_request_t xcb_out;
   1589 
   1590     xcb_out.window = window;
   1591     xcb_out.num_classes = num_classes;
   1592     xcb_out.mode = mode;
   1593     xcb_out.pad0 = 0;
   1594 
   1595     xcb_parts[2].iov_base = (char *) &xcb_out;
   1596     xcb_parts[2].iov_len = sizeof(xcb_out);
   1597     xcb_parts[3].iov_base = 0;
   1598     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1599     /* xcb_input_event_class_t classes */
   1600     xcb_parts[4].iov_base = (char *) classes;
   1601     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   1602     xcb_parts[5].iov_base = 0;
   1603     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   1604 
   1605     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1606     return xcb_ret;
   1607 }
   1608 
   1609 int
   1610 xcb_input_get_device_dont_propagate_list_sizeof (const void  *_buffer  /**< */)
   1611 {
   1612     char *xcb_tmp = (char *)_buffer;
   1613     const xcb_input_get_device_dont_propagate_list_reply_t *_aux = (xcb_input_get_device_dont_propagate_list_reply_t *)_buffer;
   1614     unsigned int xcb_buffer_len = 0;
   1615     unsigned int xcb_block_len = 0;
   1616     unsigned int xcb_pad = 0;
   1617     unsigned int xcb_align_to;
   1618 
   1619 
   1620     xcb_block_len += sizeof(xcb_input_get_device_dont_propagate_list_reply_t);
   1621     xcb_tmp += xcb_block_len;
   1622     /* classes */
   1623     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   1624     xcb_tmp += xcb_block_len;
   1625     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   1626     /* insert padding */
   1627     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   1628     xcb_buffer_len += xcb_block_len + xcb_pad;
   1629     if (0 != xcb_pad) {
   1630         xcb_tmp += xcb_pad;
   1631         xcb_pad = 0;
   1632     }
   1633     xcb_block_len = 0;
   1634 
   1635     return xcb_buffer_len;
   1636 }
   1637 
   1638 
   1639 /*****************************************************************************
   1640  **
   1641  ** xcb_input_get_device_dont_propagate_list_cookie_t xcb_input_get_device_dont_propagate_list
   1642  **
   1643  ** @param xcb_connection_t *c
   1644  ** @param xcb_window_t      window
   1645  ** @returns xcb_input_get_device_dont_propagate_list_cookie_t
   1646  **
   1647  *****************************************************************************/
   1648 
   1649 xcb_input_get_device_dont_propagate_list_cookie_t
   1650 xcb_input_get_device_dont_propagate_list (xcb_connection_t *c  /**< */,
   1651                                           xcb_window_t      window  /**< */)
   1652 {
   1653     static const xcb_protocol_request_t xcb_req = {
   1654         /* count */ 2,
   1655         /* ext */ &xcb_input_id,
   1656         /* opcode */ XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST,
   1657         /* isvoid */ 0
   1658     };
   1659 
   1660     struct iovec xcb_parts[4];
   1661     xcb_input_get_device_dont_propagate_list_cookie_t xcb_ret;
   1662     xcb_input_get_device_dont_propagate_list_request_t xcb_out;
   1663 
   1664     xcb_out.window = window;
   1665 
   1666     xcb_parts[2].iov_base = (char *) &xcb_out;
   1667     xcb_parts[2].iov_len = sizeof(xcb_out);
   1668     xcb_parts[3].iov_base = 0;
   1669     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1670 
   1671     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1672     return xcb_ret;
   1673 }
   1674 
   1675 
   1676 /*****************************************************************************
   1677  **
   1678  ** xcb_input_get_device_dont_propagate_list_cookie_t xcb_input_get_device_dont_propagate_list_unchecked
   1679  **
   1680  ** @param xcb_connection_t *c
   1681  ** @param xcb_window_t      window
   1682  ** @returns xcb_input_get_device_dont_propagate_list_cookie_t
   1683  **
   1684  *****************************************************************************/
   1685 
   1686 xcb_input_get_device_dont_propagate_list_cookie_t
   1687 xcb_input_get_device_dont_propagate_list_unchecked (xcb_connection_t *c  /**< */,
   1688                                                     xcb_window_t      window  /**< */)
   1689 {
   1690     static const xcb_protocol_request_t xcb_req = {
   1691         /* count */ 2,
   1692         /* ext */ &xcb_input_id,
   1693         /* opcode */ XCB_INPUT_GET_DEVICE_DONT_PROPAGATE_LIST,
   1694         /* isvoid */ 0
   1695     };
   1696 
   1697     struct iovec xcb_parts[4];
   1698     xcb_input_get_device_dont_propagate_list_cookie_t xcb_ret;
   1699     xcb_input_get_device_dont_propagate_list_request_t xcb_out;
   1700 
   1701     xcb_out.window = window;
   1702 
   1703     xcb_parts[2].iov_base = (char *) &xcb_out;
   1704     xcb_parts[2].iov_len = sizeof(xcb_out);
   1705     xcb_parts[3].iov_base = 0;
   1706     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1707 
   1708     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1709     return xcb_ret;
   1710 }
   1711 
   1712 
   1713 /*****************************************************************************
   1714  **
   1715  ** xcb_input_event_class_t * xcb_input_get_device_dont_propagate_list_classes
   1716  **
   1717  ** @param const xcb_input_get_device_dont_propagate_list_reply_t *R
   1718  ** @returns xcb_input_event_class_t *
   1719  **
   1720  *****************************************************************************/
   1721 
   1722 xcb_input_event_class_t *
   1723 xcb_input_get_device_dont_propagate_list_classes (const xcb_input_get_device_dont_propagate_list_reply_t *R  /**< */)
   1724 {
   1725     return (xcb_input_event_class_t *) (R + 1);
   1726 }
   1727 
   1728 
   1729 /*****************************************************************************
   1730  **
   1731  ** int xcb_input_get_device_dont_propagate_list_classes_length
   1732  **
   1733  ** @param const xcb_input_get_device_dont_propagate_list_reply_t *R
   1734  ** @returns int
   1735  **
   1736  *****************************************************************************/
   1737 
   1738 int
   1739 xcb_input_get_device_dont_propagate_list_classes_length (const xcb_input_get_device_dont_propagate_list_reply_t *R  /**< */)
   1740 {
   1741     return R->num_classes;
   1742 }
   1743 
   1744 
   1745 /*****************************************************************************
   1746  **
   1747  ** xcb_generic_iterator_t xcb_input_get_device_dont_propagate_list_classes_end
   1748  **
   1749  ** @param const xcb_input_get_device_dont_propagate_list_reply_t *R
   1750  ** @returns xcb_generic_iterator_t
   1751  **
   1752  *****************************************************************************/
   1753 
   1754 xcb_generic_iterator_t
   1755 xcb_input_get_device_dont_propagate_list_classes_end (const xcb_input_get_device_dont_propagate_list_reply_t *R  /**< */)
   1756 {
   1757     xcb_generic_iterator_t i;
   1758     i.data = ((xcb_input_event_class_t *) (R + 1)) + (R->num_classes);
   1759     i.rem = 0;
   1760     i.index = (char *) i.data - (char *) R;
   1761     return i;
   1762 }
   1763 
   1764 
   1765 /*****************************************************************************
   1766  **
   1767  ** xcb_input_get_device_dont_propagate_list_reply_t * xcb_input_get_device_dont_propagate_list_reply
   1768  **
   1769  ** @param xcb_connection_t                                   *c
   1770  ** @param xcb_input_get_device_dont_propagate_list_cookie_t   cookie
   1771  ** @param xcb_generic_error_t                               **e
   1772  ** @returns xcb_input_get_device_dont_propagate_list_reply_t *
   1773  **
   1774  *****************************************************************************/
   1775 
   1776 xcb_input_get_device_dont_propagate_list_reply_t *
   1777 xcb_input_get_device_dont_propagate_list_reply (xcb_connection_t                                   *c  /**< */,
   1778                                                 xcb_input_get_device_dont_propagate_list_cookie_t   cookie  /**< */,
   1779                                                 xcb_generic_error_t                               **e  /**< */)
   1780 {
   1781     return (xcb_input_get_device_dont_propagate_list_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1782 }
   1783 
   1784 
   1785 /*****************************************************************************
   1786  **
   1787  ** xcb_input_get_device_motion_events_cookie_t xcb_input_get_device_motion_events
   1788  **
   1789  ** @param xcb_connection_t *c
   1790  ** @param xcb_timestamp_t   start
   1791  ** @param xcb_timestamp_t   stop
   1792  ** @param uint8_t           device_id
   1793  ** @returns xcb_input_get_device_motion_events_cookie_t
   1794  **
   1795  *****************************************************************************/
   1796 
   1797 xcb_input_get_device_motion_events_cookie_t
   1798 xcb_input_get_device_motion_events (xcb_connection_t *c  /**< */,
   1799                                     xcb_timestamp_t   start  /**< */,
   1800                                     xcb_timestamp_t   stop  /**< */,
   1801                                     uint8_t           device_id  /**< */)
   1802 {
   1803     static const xcb_protocol_request_t xcb_req = {
   1804         /* count */ 2,
   1805         /* ext */ &xcb_input_id,
   1806         /* opcode */ XCB_INPUT_GET_DEVICE_MOTION_EVENTS,
   1807         /* isvoid */ 0
   1808     };
   1809 
   1810     struct iovec xcb_parts[4];
   1811     xcb_input_get_device_motion_events_cookie_t xcb_ret;
   1812     xcb_input_get_device_motion_events_request_t xcb_out;
   1813 
   1814     xcb_out.start = start;
   1815     xcb_out.stop = stop;
   1816     xcb_out.device_id = device_id;
   1817 
   1818     xcb_parts[2].iov_base = (char *) &xcb_out;
   1819     xcb_parts[2].iov_len = sizeof(xcb_out);
   1820     xcb_parts[3].iov_base = 0;
   1821     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1822 
   1823     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1824     return xcb_ret;
   1825 }
   1826 
   1827 
   1828 /*****************************************************************************
   1829  **
   1830  ** xcb_input_get_device_motion_events_cookie_t xcb_input_get_device_motion_events_unchecked
   1831  **
   1832  ** @param xcb_connection_t *c
   1833  ** @param xcb_timestamp_t   start
   1834  ** @param xcb_timestamp_t   stop
   1835  ** @param uint8_t           device_id
   1836  ** @returns xcb_input_get_device_motion_events_cookie_t
   1837  **
   1838  *****************************************************************************/
   1839 
   1840 xcb_input_get_device_motion_events_cookie_t
   1841 xcb_input_get_device_motion_events_unchecked (xcb_connection_t *c  /**< */,
   1842                                               xcb_timestamp_t   start  /**< */,
   1843                                               xcb_timestamp_t   stop  /**< */,
   1844                                               uint8_t           device_id  /**< */)
   1845 {
   1846     static const xcb_protocol_request_t xcb_req = {
   1847         /* count */ 2,
   1848         /* ext */ &xcb_input_id,
   1849         /* opcode */ XCB_INPUT_GET_DEVICE_MOTION_EVENTS,
   1850         /* isvoid */ 0
   1851     };
   1852 
   1853     struct iovec xcb_parts[4];
   1854     xcb_input_get_device_motion_events_cookie_t xcb_ret;
   1855     xcb_input_get_device_motion_events_request_t xcb_out;
   1856 
   1857     xcb_out.start = start;
   1858     xcb_out.stop = stop;
   1859     xcb_out.device_id = device_id;
   1860 
   1861     xcb_parts[2].iov_base = (char *) &xcb_out;
   1862     xcb_parts[2].iov_len = sizeof(xcb_out);
   1863     xcb_parts[3].iov_base = 0;
   1864     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1865 
   1866     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   1867     return xcb_ret;
   1868 }
   1869 
   1870 
   1871 /*****************************************************************************
   1872  **
   1873  ** xcb_input_get_device_motion_events_reply_t * xcb_input_get_device_motion_events_reply
   1874  **
   1875  ** @param xcb_connection_t                             *c
   1876  ** @param xcb_input_get_device_motion_events_cookie_t   cookie
   1877  ** @param xcb_generic_error_t                         **e
   1878  ** @returns xcb_input_get_device_motion_events_reply_t *
   1879  **
   1880  *****************************************************************************/
   1881 
   1882 xcb_input_get_device_motion_events_reply_t *
   1883 xcb_input_get_device_motion_events_reply (xcb_connection_t                             *c  /**< */,
   1884                                           xcb_input_get_device_motion_events_cookie_t   cookie  /**< */,
   1885                                           xcb_generic_error_t                         **e  /**< */)
   1886 {
   1887     return (xcb_input_get_device_motion_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   1888 }
   1889 
   1890 
   1891 /*****************************************************************************
   1892  **
   1893  ** void xcb_input_device_time_coord_next
   1894  **
   1895  ** @param xcb_input_device_time_coord_iterator_t *i
   1896  ** @returns void
   1897  **
   1898  *****************************************************************************/
   1899 
   1900 void
   1901 xcb_input_device_time_coord_next (xcb_input_device_time_coord_iterator_t *i  /**< */)
   1902 {
   1903     --i->rem;
   1904     ++i->data;
   1905     i->index += sizeof(xcb_input_device_time_coord_t);
   1906 }
   1907 
   1908 
   1909 /*****************************************************************************
   1910  **
   1911  ** xcb_generic_iterator_t xcb_input_device_time_coord_end
   1912  **
   1913  ** @param xcb_input_device_time_coord_iterator_t i
   1914  ** @returns xcb_generic_iterator_t
   1915  **
   1916  *****************************************************************************/
   1917 
   1918 xcb_generic_iterator_t
   1919 xcb_input_device_time_coord_end (xcb_input_device_time_coord_iterator_t i  /**< */)
   1920 {
   1921     xcb_generic_iterator_t ret;
   1922     ret.data = i.data + i.rem;
   1923     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   1924     ret.rem = 0;
   1925     return ret;
   1926 }
   1927 
   1928 
   1929 /*****************************************************************************
   1930  **
   1931  ** xcb_input_change_keyboard_device_cookie_t xcb_input_change_keyboard_device
   1932  **
   1933  ** @param xcb_connection_t *c
   1934  ** @param uint8_t           device_id
   1935  ** @returns xcb_input_change_keyboard_device_cookie_t
   1936  **
   1937  *****************************************************************************/
   1938 
   1939 xcb_input_change_keyboard_device_cookie_t
   1940 xcb_input_change_keyboard_device (xcb_connection_t *c  /**< */,
   1941                                   uint8_t           device_id  /**< */)
   1942 {
   1943     static const xcb_protocol_request_t xcb_req = {
   1944         /* count */ 2,
   1945         /* ext */ &xcb_input_id,
   1946         /* opcode */ XCB_INPUT_CHANGE_KEYBOARD_DEVICE,
   1947         /* isvoid */ 0
   1948     };
   1949 
   1950     struct iovec xcb_parts[4];
   1951     xcb_input_change_keyboard_device_cookie_t xcb_ret;
   1952     xcb_input_change_keyboard_device_request_t xcb_out;
   1953 
   1954     xcb_out.device_id = device_id;
   1955     memset(xcb_out.pad0, 0, 3);
   1956 
   1957     xcb_parts[2].iov_base = (char *) &xcb_out;
   1958     xcb_parts[2].iov_len = sizeof(xcb_out);
   1959     xcb_parts[3].iov_base = 0;
   1960     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1961 
   1962     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   1963     return xcb_ret;
   1964 }
   1965 
   1966 
   1967 /*****************************************************************************
   1968  **
   1969  ** xcb_input_change_keyboard_device_cookie_t xcb_input_change_keyboard_device_unchecked
   1970  **
   1971  ** @param xcb_connection_t *c
   1972  ** @param uint8_t           device_id
   1973  ** @returns xcb_input_change_keyboard_device_cookie_t
   1974  **
   1975  *****************************************************************************/
   1976 
   1977 xcb_input_change_keyboard_device_cookie_t
   1978 xcb_input_change_keyboard_device_unchecked (xcb_connection_t *c  /**< */,
   1979                                             uint8_t           device_id  /**< */)
   1980 {
   1981     static const xcb_protocol_request_t xcb_req = {
   1982         /* count */ 2,
   1983         /* ext */ &xcb_input_id,
   1984         /* opcode */ XCB_INPUT_CHANGE_KEYBOARD_DEVICE,
   1985         /* isvoid */ 0
   1986     };
   1987 
   1988     struct iovec xcb_parts[4];
   1989     xcb_input_change_keyboard_device_cookie_t xcb_ret;
   1990     xcb_input_change_keyboard_device_request_t xcb_out;
   1991 
   1992     xcb_out.device_id = device_id;
   1993     memset(xcb_out.pad0, 0, 3);
   1994 
   1995     xcb_parts[2].iov_base = (char *) &xcb_out;
   1996     xcb_parts[2].iov_len = sizeof(xcb_out);
   1997     xcb_parts[3].iov_base = 0;
   1998     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   1999 
   2000     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2001     return xcb_ret;
   2002 }
   2003 
   2004 
   2005 /*****************************************************************************
   2006  **
   2007  ** xcb_input_change_keyboard_device_reply_t * xcb_input_change_keyboard_device_reply
   2008  **
   2009  ** @param xcb_connection_t                           *c
   2010  ** @param xcb_input_change_keyboard_device_cookie_t   cookie
   2011  ** @param xcb_generic_error_t                       **e
   2012  ** @returns xcb_input_change_keyboard_device_reply_t *
   2013  **
   2014  *****************************************************************************/
   2015 
   2016 xcb_input_change_keyboard_device_reply_t *
   2017 xcb_input_change_keyboard_device_reply (xcb_connection_t                           *c  /**< */,
   2018                                         xcb_input_change_keyboard_device_cookie_t   cookie  /**< */,
   2019                                         xcb_generic_error_t                       **e  /**< */)
   2020 {
   2021     return (xcb_input_change_keyboard_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   2022 }
   2023 
   2024 
   2025 /*****************************************************************************
   2026  **
   2027  ** xcb_input_change_pointer_device_cookie_t xcb_input_change_pointer_device
   2028  **
   2029  ** @param xcb_connection_t *c
   2030  ** @param uint8_t           x_axis
   2031  ** @param uint8_t           y_axis
   2032  ** @param uint8_t           device_id
   2033  ** @returns xcb_input_change_pointer_device_cookie_t
   2034  **
   2035  *****************************************************************************/
   2036 
   2037 xcb_input_change_pointer_device_cookie_t
   2038 xcb_input_change_pointer_device (xcb_connection_t *c  /**< */,
   2039                                  uint8_t           x_axis  /**< */,
   2040                                  uint8_t           y_axis  /**< */,
   2041                                  uint8_t           device_id  /**< */)
   2042 {
   2043     static const xcb_protocol_request_t xcb_req = {
   2044         /* count */ 2,
   2045         /* ext */ &xcb_input_id,
   2046         /* opcode */ XCB_INPUT_CHANGE_POINTER_DEVICE,
   2047         /* isvoid */ 0
   2048     };
   2049 
   2050     struct iovec xcb_parts[4];
   2051     xcb_input_change_pointer_device_cookie_t xcb_ret;
   2052     xcb_input_change_pointer_device_request_t xcb_out;
   2053 
   2054     xcb_out.x_axis = x_axis;
   2055     xcb_out.y_axis = y_axis;
   2056     xcb_out.device_id = device_id;
   2057     xcb_out.pad0 = 0;
   2058 
   2059     xcb_parts[2].iov_base = (char *) &xcb_out;
   2060     xcb_parts[2].iov_len = sizeof(xcb_out);
   2061     xcb_parts[3].iov_base = 0;
   2062     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2063 
   2064     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2065     return xcb_ret;
   2066 }
   2067 
   2068 
   2069 /*****************************************************************************
   2070  **
   2071  ** xcb_input_change_pointer_device_cookie_t xcb_input_change_pointer_device_unchecked
   2072  **
   2073  ** @param xcb_connection_t *c
   2074  ** @param uint8_t           x_axis
   2075  ** @param uint8_t           y_axis
   2076  ** @param uint8_t           device_id
   2077  ** @returns xcb_input_change_pointer_device_cookie_t
   2078  **
   2079  *****************************************************************************/
   2080 
   2081 xcb_input_change_pointer_device_cookie_t
   2082 xcb_input_change_pointer_device_unchecked (xcb_connection_t *c  /**< */,
   2083                                            uint8_t           x_axis  /**< */,
   2084                                            uint8_t           y_axis  /**< */,
   2085                                            uint8_t           device_id  /**< */)
   2086 {
   2087     static const xcb_protocol_request_t xcb_req = {
   2088         /* count */ 2,
   2089         /* ext */ &xcb_input_id,
   2090         /* opcode */ XCB_INPUT_CHANGE_POINTER_DEVICE,
   2091         /* isvoid */ 0
   2092     };
   2093 
   2094     struct iovec xcb_parts[4];
   2095     xcb_input_change_pointer_device_cookie_t xcb_ret;
   2096     xcb_input_change_pointer_device_request_t xcb_out;
   2097 
   2098     xcb_out.x_axis = x_axis;
   2099     xcb_out.y_axis = y_axis;
   2100     xcb_out.device_id = device_id;
   2101     xcb_out.pad0 = 0;
   2102 
   2103     xcb_parts[2].iov_base = (char *) &xcb_out;
   2104     xcb_parts[2].iov_len = sizeof(xcb_out);
   2105     xcb_parts[3].iov_base = 0;
   2106     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2107 
   2108     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2109     return xcb_ret;
   2110 }
   2111 
   2112 
   2113 /*****************************************************************************
   2114  **
   2115  ** xcb_input_change_pointer_device_reply_t * xcb_input_change_pointer_device_reply
   2116  **
   2117  ** @param xcb_connection_t                          *c
   2118  ** @param xcb_input_change_pointer_device_cookie_t   cookie
   2119  ** @param xcb_generic_error_t                      **e
   2120  ** @returns xcb_input_change_pointer_device_reply_t *
   2121  **
   2122  *****************************************************************************/
   2123 
   2124 xcb_input_change_pointer_device_reply_t *
   2125 xcb_input_change_pointer_device_reply (xcb_connection_t                          *c  /**< */,
   2126                                        xcb_input_change_pointer_device_cookie_t   cookie  /**< */,
   2127                                        xcb_generic_error_t                      **e  /**< */)
   2128 {
   2129     return (xcb_input_change_pointer_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   2130 }
   2131 
   2132 int
   2133 xcb_input_grab_device_sizeof (const void  *_buffer  /**< */)
   2134 {
   2135     char *xcb_tmp = (char *)_buffer;
   2136     const xcb_input_grab_device_request_t *_aux = (xcb_input_grab_device_request_t *)_buffer;
   2137     unsigned int xcb_buffer_len = 0;
   2138     unsigned int xcb_block_len = 0;
   2139     unsigned int xcb_pad = 0;
   2140     unsigned int xcb_align_to;
   2141 
   2142 
   2143     xcb_block_len += sizeof(xcb_input_grab_device_request_t);
   2144     xcb_tmp += xcb_block_len;
   2145     /* classes */
   2146     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   2147     xcb_tmp += xcb_block_len;
   2148     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   2149     /* insert padding */
   2150     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   2151     xcb_buffer_len += xcb_block_len + xcb_pad;
   2152     if (0 != xcb_pad) {
   2153         xcb_tmp += xcb_pad;
   2154         xcb_pad = 0;
   2155     }
   2156     xcb_block_len = 0;
   2157 
   2158     return xcb_buffer_len;
   2159 }
   2160 
   2161 
   2162 /*****************************************************************************
   2163  **
   2164  ** xcb_input_grab_device_cookie_t xcb_input_grab_device
   2165  **
   2166  ** @param xcb_connection_t              *c
   2167  ** @param xcb_window_t                   grab_window
   2168  ** @param xcb_timestamp_t                time
   2169  ** @param uint16_t                       num_classes
   2170  ** @param uint8_t                        this_device_mode
   2171  ** @param uint8_t                        other_device_mode
   2172  ** @param uint8_t                        owner_events
   2173  ** @param uint8_t                        device_id
   2174  ** @param const xcb_input_event_class_t *classes
   2175  ** @returns xcb_input_grab_device_cookie_t
   2176  **
   2177  *****************************************************************************/
   2178 
   2179 xcb_input_grab_device_cookie_t
   2180 xcb_input_grab_device (xcb_connection_t              *c  /**< */,
   2181                        xcb_window_t                   grab_window  /**< */,
   2182                        xcb_timestamp_t                time  /**< */,
   2183                        uint16_t                       num_classes  /**< */,
   2184                        uint8_t                        this_device_mode  /**< */,
   2185                        uint8_t                        other_device_mode  /**< */,
   2186                        uint8_t                        owner_events  /**< */,
   2187                        uint8_t                        device_id  /**< */,
   2188                        const xcb_input_event_class_t *classes  /**< */)
   2189 {
   2190     static const xcb_protocol_request_t xcb_req = {
   2191         /* count */ 4,
   2192         /* ext */ &xcb_input_id,
   2193         /* opcode */ XCB_INPUT_GRAB_DEVICE,
   2194         /* isvoid */ 0
   2195     };
   2196 
   2197     struct iovec xcb_parts[6];
   2198     xcb_input_grab_device_cookie_t xcb_ret;
   2199     xcb_input_grab_device_request_t xcb_out;
   2200 
   2201     xcb_out.grab_window = grab_window;
   2202     xcb_out.time = time;
   2203     xcb_out.num_classes = num_classes;
   2204     xcb_out.this_device_mode = this_device_mode;
   2205     xcb_out.other_device_mode = other_device_mode;
   2206     xcb_out.owner_events = owner_events;
   2207     xcb_out.device_id = device_id;
   2208     memset(xcb_out.pad0, 0, 2);
   2209 
   2210     xcb_parts[2].iov_base = (char *) &xcb_out;
   2211     xcb_parts[2].iov_len = sizeof(xcb_out);
   2212     xcb_parts[3].iov_base = 0;
   2213     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2214     /* xcb_input_event_class_t classes */
   2215     xcb_parts[4].iov_base = (char *) classes;
   2216     xcb_parts[4].iov_len = num_classes * sizeof(uint32_t);
   2217     xcb_parts[5].iov_base = 0;
   2218     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   2219 
   2220     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2221     return xcb_ret;
   2222 }
   2223 
   2224 
   2225 /*****************************************************************************
   2226  **
   2227  ** xcb_input_grab_device_cookie_t xcb_input_grab_device_unchecked
   2228  **
   2229  ** @param xcb_connection_t              *c
   2230  ** @param xcb_window_t                   grab_window
   2231  ** @param xcb_timestamp_t                time
   2232  ** @param uint16_t                       num_classes
   2233  ** @param uint8_t                        this_device_mode
   2234  ** @param uint8_t                        other_device_mode
   2235  ** @param uint8_t                        owner_events
   2236  ** @param uint8_t                        device_id
   2237  ** @param const xcb_input_event_class_t *classes
   2238  ** @returns xcb_input_grab_device_cookie_t
   2239  **
   2240  *****************************************************************************/
   2241 
   2242 xcb_input_grab_device_cookie_t
   2243 xcb_input_grab_device_unchecked (xcb_connection_t              *c  /**< */,
   2244                                  xcb_window_t                   grab_window  /**< */,
   2245                                  xcb_timestamp_t                time  /**< */,
   2246                                  uint16_t                       num_classes  /**< */,
   2247                                  uint8_t                        this_device_mode  /**< */,
   2248                                  uint8_t                        other_device_mode  /**< */,
   2249                                  uint8_t                        owner_events  /**< */,
   2250                                  uint8_t                        device_id  /**< */,
   2251                                  const xcb_input_event_class_t *classes  /**< */)
   2252 {
   2253     static const xcb_protocol_request_t xcb_req = {
   2254         /* count */ 4,
   2255         /* ext */ &xcb_input_id,
   2256         /* opcode */ XCB_INPUT_GRAB_DEVICE,
   2257         /* isvoid */ 0
   2258     };
   2259 
   2260     struct iovec xcb_parts[6];
   2261     xcb_input_grab_device_cookie_t xcb_ret;
   2262     xcb_input_grab_device_request_t xcb_out;
   2263 
   2264     xcb_out.grab_window = grab_window;
   2265     xcb_out.time = time;
   2266     xcb_out.num_classes = num_classes;
   2267     xcb_out.this_device_mode = this_device_mode;
   2268     xcb_out.other_device_mode = other_device_mode;
   2269     xcb_out.owner_events = owner_events;
   2270     xcb_out.device_id = device_id;
   2271     memset(xcb_out.pad0, 0, 2);
   2272 
   2273     xcb_parts[2].iov_base = (char *) &xcb_out;
   2274     xcb_parts[2].iov_len = sizeof(xcb_out);
   2275     xcb_parts[3].iov_base = 0;
   2276     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2277     /* xcb_input_event_class_t classes */
   2278     xcb_parts[4].iov_base = (char *) classes;
   2279     xcb_parts[4].iov_len = num_classes * sizeof(uint32_t);
   2280     xcb_parts[5].iov_base = 0;
   2281     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   2282 
   2283     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2284     return xcb_ret;
   2285 }
   2286 
   2287 
   2288 /*****************************************************************************
   2289  **
   2290  ** xcb_input_grab_device_reply_t * xcb_input_grab_device_reply
   2291  **
   2292  ** @param xcb_connection_t                *c
   2293  ** @param xcb_input_grab_device_cookie_t   cookie
   2294  ** @param xcb_generic_error_t            **e
   2295  ** @returns xcb_input_grab_device_reply_t *
   2296  **
   2297  *****************************************************************************/
   2298 
   2299 xcb_input_grab_device_reply_t *
   2300 xcb_input_grab_device_reply (xcb_connection_t                *c  /**< */,
   2301                              xcb_input_grab_device_cookie_t   cookie  /**< */,
   2302                              xcb_generic_error_t            **e  /**< */)
   2303 {
   2304     return (xcb_input_grab_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   2305 }
   2306 
   2307 
   2308 /*****************************************************************************
   2309  **
   2310  ** xcb_void_cookie_t xcb_input_ungrab_device_checked
   2311  **
   2312  ** @param xcb_connection_t *c
   2313  ** @param xcb_timestamp_t   time
   2314  ** @param uint8_t           device_id
   2315  ** @returns xcb_void_cookie_t
   2316  **
   2317  *****************************************************************************/
   2318 
   2319 xcb_void_cookie_t
   2320 xcb_input_ungrab_device_checked (xcb_connection_t *c  /**< */,
   2321                                  xcb_timestamp_t   time  /**< */,
   2322                                  uint8_t           device_id  /**< */)
   2323 {
   2324     static const xcb_protocol_request_t xcb_req = {
   2325         /* count */ 2,
   2326         /* ext */ &xcb_input_id,
   2327         /* opcode */ XCB_INPUT_UNGRAB_DEVICE,
   2328         /* isvoid */ 1
   2329     };
   2330 
   2331     struct iovec xcb_parts[4];
   2332     xcb_void_cookie_t xcb_ret;
   2333     xcb_input_ungrab_device_request_t xcb_out;
   2334 
   2335     xcb_out.time = time;
   2336     xcb_out.device_id = device_id;
   2337 
   2338     xcb_parts[2].iov_base = (char *) &xcb_out;
   2339     xcb_parts[2].iov_len = sizeof(xcb_out);
   2340     xcb_parts[3].iov_base = 0;
   2341     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2342 
   2343     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2344     return xcb_ret;
   2345 }
   2346 
   2347 
   2348 /*****************************************************************************
   2349  **
   2350  ** xcb_void_cookie_t xcb_input_ungrab_device
   2351  **
   2352  ** @param xcb_connection_t *c
   2353  ** @param xcb_timestamp_t   time
   2354  ** @param uint8_t           device_id
   2355  ** @returns xcb_void_cookie_t
   2356  **
   2357  *****************************************************************************/
   2358 
   2359 xcb_void_cookie_t
   2360 xcb_input_ungrab_device (xcb_connection_t *c  /**< */,
   2361                          xcb_timestamp_t   time  /**< */,
   2362                          uint8_t           device_id  /**< */)
   2363 {
   2364     static const xcb_protocol_request_t xcb_req = {
   2365         /* count */ 2,
   2366         /* ext */ &xcb_input_id,
   2367         /* opcode */ XCB_INPUT_UNGRAB_DEVICE,
   2368         /* isvoid */ 1
   2369     };
   2370 
   2371     struct iovec xcb_parts[4];
   2372     xcb_void_cookie_t xcb_ret;
   2373     xcb_input_ungrab_device_request_t xcb_out;
   2374 
   2375     xcb_out.time = time;
   2376     xcb_out.device_id = device_id;
   2377 
   2378     xcb_parts[2].iov_base = (char *) &xcb_out;
   2379     xcb_parts[2].iov_len = sizeof(xcb_out);
   2380     xcb_parts[3].iov_base = 0;
   2381     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2382 
   2383     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2384     return xcb_ret;
   2385 }
   2386 
   2387 int
   2388 xcb_input_grab_device_key_sizeof (const void  *_buffer  /**< */)
   2389 {
   2390     char *xcb_tmp = (char *)_buffer;
   2391     const xcb_input_grab_device_key_request_t *_aux = (xcb_input_grab_device_key_request_t *)_buffer;
   2392     unsigned int xcb_buffer_len = 0;
   2393     unsigned int xcb_block_len = 0;
   2394     unsigned int xcb_pad = 0;
   2395     unsigned int xcb_align_to;
   2396 
   2397 
   2398     xcb_block_len += sizeof(xcb_input_grab_device_key_request_t);
   2399     xcb_tmp += xcb_block_len;
   2400     /* classes */
   2401     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   2402     xcb_tmp += xcb_block_len;
   2403     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   2404     /* insert padding */
   2405     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   2406     xcb_buffer_len += xcb_block_len + xcb_pad;
   2407     if (0 != xcb_pad) {
   2408         xcb_tmp += xcb_pad;
   2409         xcb_pad = 0;
   2410     }
   2411     xcb_block_len = 0;
   2412 
   2413     return xcb_buffer_len;
   2414 }
   2415 
   2416 
   2417 /*****************************************************************************
   2418  **
   2419  ** xcb_void_cookie_t xcb_input_grab_device_key_checked
   2420  **
   2421  ** @param xcb_connection_t              *c
   2422  ** @param xcb_window_t                   grab_window
   2423  ** @param uint16_t                       num_classes
   2424  ** @param uint16_t                       modifiers
   2425  ** @param uint8_t                        modifier_device
   2426  ** @param uint8_t                        grabbed_device
   2427  ** @param uint8_t                        key
   2428  ** @param uint8_t                        this_device_mode
   2429  ** @param uint8_t                        other_device_mode
   2430  ** @param uint8_t                        owner_events
   2431  ** @param const xcb_input_event_class_t *classes
   2432  ** @returns xcb_void_cookie_t
   2433  **
   2434  *****************************************************************************/
   2435 
   2436 xcb_void_cookie_t
   2437 xcb_input_grab_device_key_checked (xcb_connection_t              *c  /**< */,
   2438                                    xcb_window_t                   grab_window  /**< */,
   2439                                    uint16_t                       num_classes  /**< */,
   2440                                    uint16_t                       modifiers  /**< */,
   2441                                    uint8_t                        modifier_device  /**< */,
   2442                                    uint8_t                        grabbed_device  /**< */,
   2443                                    uint8_t                        key  /**< */,
   2444                                    uint8_t                        this_device_mode  /**< */,
   2445                                    uint8_t                        other_device_mode  /**< */,
   2446                                    uint8_t                        owner_events  /**< */,
   2447                                    const xcb_input_event_class_t *classes  /**< */)
   2448 {
   2449     static const xcb_protocol_request_t xcb_req = {
   2450         /* count */ 4,
   2451         /* ext */ &xcb_input_id,
   2452         /* opcode */ XCB_INPUT_GRAB_DEVICE_KEY,
   2453         /* isvoid */ 1
   2454     };
   2455 
   2456     struct iovec xcb_parts[6];
   2457     xcb_void_cookie_t xcb_ret;
   2458     xcb_input_grab_device_key_request_t xcb_out;
   2459 
   2460     xcb_out.grab_window = grab_window;
   2461     xcb_out.num_classes = num_classes;
   2462     xcb_out.modifiers = modifiers;
   2463     xcb_out.modifier_device = modifier_device;
   2464     xcb_out.grabbed_device = grabbed_device;
   2465     xcb_out.key = key;
   2466     xcb_out.this_device_mode = this_device_mode;
   2467     xcb_out.other_device_mode = other_device_mode;
   2468     xcb_out.owner_events = owner_events;
   2469     memset(xcb_out.pad0, 0, 2);
   2470 
   2471     xcb_parts[2].iov_base = (char *) &xcb_out;
   2472     xcb_parts[2].iov_len = sizeof(xcb_out);
   2473     xcb_parts[3].iov_base = 0;
   2474     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2475     /* xcb_input_event_class_t classes */
   2476     xcb_parts[4].iov_base = (char *) classes;
   2477     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   2478     xcb_parts[5].iov_base = 0;
   2479     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   2480 
   2481     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2482     return xcb_ret;
   2483 }
   2484 
   2485 
   2486 /*****************************************************************************
   2487  **
   2488  ** xcb_void_cookie_t xcb_input_grab_device_key
   2489  **
   2490  ** @param xcb_connection_t              *c
   2491  ** @param xcb_window_t                   grab_window
   2492  ** @param uint16_t                       num_classes
   2493  ** @param uint16_t                       modifiers
   2494  ** @param uint8_t                        modifier_device
   2495  ** @param uint8_t                        grabbed_device
   2496  ** @param uint8_t                        key
   2497  ** @param uint8_t                        this_device_mode
   2498  ** @param uint8_t                        other_device_mode
   2499  ** @param uint8_t                        owner_events
   2500  ** @param const xcb_input_event_class_t *classes
   2501  ** @returns xcb_void_cookie_t
   2502  **
   2503  *****************************************************************************/
   2504 
   2505 xcb_void_cookie_t
   2506 xcb_input_grab_device_key (xcb_connection_t              *c  /**< */,
   2507                            xcb_window_t                   grab_window  /**< */,
   2508                            uint16_t                       num_classes  /**< */,
   2509                            uint16_t                       modifiers  /**< */,
   2510                            uint8_t                        modifier_device  /**< */,
   2511                            uint8_t                        grabbed_device  /**< */,
   2512                            uint8_t                        key  /**< */,
   2513                            uint8_t                        this_device_mode  /**< */,
   2514                            uint8_t                        other_device_mode  /**< */,
   2515                            uint8_t                        owner_events  /**< */,
   2516                            const xcb_input_event_class_t *classes  /**< */)
   2517 {
   2518     static const xcb_protocol_request_t xcb_req = {
   2519         /* count */ 4,
   2520         /* ext */ &xcb_input_id,
   2521         /* opcode */ XCB_INPUT_GRAB_DEVICE_KEY,
   2522         /* isvoid */ 1
   2523     };
   2524 
   2525     struct iovec xcb_parts[6];
   2526     xcb_void_cookie_t xcb_ret;
   2527     xcb_input_grab_device_key_request_t xcb_out;
   2528 
   2529     xcb_out.grab_window = grab_window;
   2530     xcb_out.num_classes = num_classes;
   2531     xcb_out.modifiers = modifiers;
   2532     xcb_out.modifier_device = modifier_device;
   2533     xcb_out.grabbed_device = grabbed_device;
   2534     xcb_out.key = key;
   2535     xcb_out.this_device_mode = this_device_mode;
   2536     xcb_out.other_device_mode = other_device_mode;
   2537     xcb_out.owner_events = owner_events;
   2538     memset(xcb_out.pad0, 0, 2);
   2539 
   2540     xcb_parts[2].iov_base = (char *) &xcb_out;
   2541     xcb_parts[2].iov_len = sizeof(xcb_out);
   2542     xcb_parts[3].iov_base = 0;
   2543     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2544     /* xcb_input_event_class_t classes */
   2545     xcb_parts[4].iov_base = (char *) classes;
   2546     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   2547     xcb_parts[5].iov_base = 0;
   2548     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   2549 
   2550     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2551     return xcb_ret;
   2552 }
   2553 
   2554 
   2555 /*****************************************************************************
   2556  **
   2557  ** xcb_void_cookie_t xcb_input_ungrab_device_key_checked
   2558  **
   2559  ** @param xcb_connection_t *c
   2560  ** @param xcb_window_t      grabWindow
   2561  ** @param uint16_t          modifiers
   2562  ** @param uint8_t           modifier_device
   2563  ** @param uint8_t           key
   2564  ** @param uint8_t           grabbed_device
   2565  ** @returns xcb_void_cookie_t
   2566  **
   2567  *****************************************************************************/
   2568 
   2569 xcb_void_cookie_t
   2570 xcb_input_ungrab_device_key_checked (xcb_connection_t *c  /**< */,
   2571                                      xcb_window_t      grabWindow  /**< */,
   2572                                      uint16_t          modifiers  /**< */,
   2573                                      uint8_t           modifier_device  /**< */,
   2574                                      uint8_t           key  /**< */,
   2575                                      uint8_t           grabbed_device  /**< */)
   2576 {
   2577     static const xcb_protocol_request_t xcb_req = {
   2578         /* count */ 2,
   2579         /* ext */ &xcb_input_id,
   2580         /* opcode */ XCB_INPUT_UNGRAB_DEVICE_KEY,
   2581         /* isvoid */ 1
   2582     };
   2583 
   2584     struct iovec xcb_parts[4];
   2585     xcb_void_cookie_t xcb_ret;
   2586     xcb_input_ungrab_device_key_request_t xcb_out;
   2587 
   2588     xcb_out.grabWindow = grabWindow;
   2589     xcb_out.modifiers = modifiers;
   2590     xcb_out.modifier_device = modifier_device;
   2591     xcb_out.key = key;
   2592     xcb_out.grabbed_device = grabbed_device;
   2593 
   2594     xcb_parts[2].iov_base = (char *) &xcb_out;
   2595     xcb_parts[2].iov_len = sizeof(xcb_out);
   2596     xcb_parts[3].iov_base = 0;
   2597     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2598 
   2599     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2600     return xcb_ret;
   2601 }
   2602 
   2603 
   2604 /*****************************************************************************
   2605  **
   2606  ** xcb_void_cookie_t xcb_input_ungrab_device_key
   2607  **
   2608  ** @param xcb_connection_t *c
   2609  ** @param xcb_window_t      grabWindow
   2610  ** @param uint16_t          modifiers
   2611  ** @param uint8_t           modifier_device
   2612  ** @param uint8_t           key
   2613  ** @param uint8_t           grabbed_device
   2614  ** @returns xcb_void_cookie_t
   2615  **
   2616  *****************************************************************************/
   2617 
   2618 xcb_void_cookie_t
   2619 xcb_input_ungrab_device_key (xcb_connection_t *c  /**< */,
   2620                              xcb_window_t      grabWindow  /**< */,
   2621                              uint16_t          modifiers  /**< */,
   2622                              uint8_t           modifier_device  /**< */,
   2623                              uint8_t           key  /**< */,
   2624                              uint8_t           grabbed_device  /**< */)
   2625 {
   2626     static const xcb_protocol_request_t xcb_req = {
   2627         /* count */ 2,
   2628         /* ext */ &xcb_input_id,
   2629         /* opcode */ XCB_INPUT_UNGRAB_DEVICE_KEY,
   2630         /* isvoid */ 1
   2631     };
   2632 
   2633     struct iovec xcb_parts[4];
   2634     xcb_void_cookie_t xcb_ret;
   2635     xcb_input_ungrab_device_key_request_t xcb_out;
   2636 
   2637     xcb_out.grabWindow = grabWindow;
   2638     xcb_out.modifiers = modifiers;
   2639     xcb_out.modifier_device = modifier_device;
   2640     xcb_out.key = key;
   2641     xcb_out.grabbed_device = grabbed_device;
   2642 
   2643     xcb_parts[2].iov_base = (char *) &xcb_out;
   2644     xcb_parts[2].iov_len = sizeof(xcb_out);
   2645     xcb_parts[3].iov_base = 0;
   2646     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2647 
   2648     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2649     return xcb_ret;
   2650 }
   2651 
   2652 int
   2653 xcb_input_grab_device_button_sizeof (const void  *_buffer  /**< */)
   2654 {
   2655     char *xcb_tmp = (char *)_buffer;
   2656     const xcb_input_grab_device_button_request_t *_aux = (xcb_input_grab_device_button_request_t *)_buffer;
   2657     unsigned int xcb_buffer_len = 0;
   2658     unsigned int xcb_block_len = 0;
   2659     unsigned int xcb_pad = 0;
   2660     unsigned int xcb_align_to;
   2661 
   2662 
   2663     xcb_block_len += sizeof(xcb_input_grab_device_button_request_t);
   2664     xcb_tmp += xcb_block_len;
   2665     /* classes */
   2666     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   2667     xcb_tmp += xcb_block_len;
   2668     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   2669     /* insert padding */
   2670     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   2671     xcb_buffer_len += xcb_block_len + xcb_pad;
   2672     if (0 != xcb_pad) {
   2673         xcb_tmp += xcb_pad;
   2674         xcb_pad = 0;
   2675     }
   2676     xcb_block_len = 0;
   2677 
   2678     return xcb_buffer_len;
   2679 }
   2680 
   2681 
   2682 /*****************************************************************************
   2683  **
   2684  ** xcb_void_cookie_t xcb_input_grab_device_button_checked
   2685  **
   2686  ** @param xcb_connection_t              *c
   2687  ** @param xcb_window_t                   grab_window
   2688  ** @param uint8_t                        grabbed_device
   2689  ** @param uint8_t                        modifier_device
   2690  ** @param uint16_t                       num_classes
   2691  ** @param uint16_t                       modifiers
   2692  ** @param uint8_t                        this_device_mode
   2693  ** @param uint8_t                        other_device_mode
   2694  ** @param uint8_t                        button
   2695  ** @param uint8_t                        owner_events
   2696  ** @param const xcb_input_event_class_t *classes
   2697  ** @returns xcb_void_cookie_t
   2698  **
   2699  *****************************************************************************/
   2700 
   2701 xcb_void_cookie_t
   2702 xcb_input_grab_device_button_checked (xcb_connection_t              *c  /**< */,
   2703                                       xcb_window_t                   grab_window  /**< */,
   2704                                       uint8_t                        grabbed_device  /**< */,
   2705                                       uint8_t                        modifier_device  /**< */,
   2706                                       uint16_t                       num_classes  /**< */,
   2707                                       uint16_t                       modifiers  /**< */,
   2708                                       uint8_t                        this_device_mode  /**< */,
   2709                                       uint8_t                        other_device_mode  /**< */,
   2710                                       uint8_t                        button  /**< */,
   2711                                       uint8_t                        owner_events  /**< */,
   2712                                       const xcb_input_event_class_t *classes  /**< */)
   2713 {
   2714     static const xcb_protocol_request_t xcb_req = {
   2715         /* count */ 4,
   2716         /* ext */ &xcb_input_id,
   2717         /* opcode */ XCB_INPUT_GRAB_DEVICE_BUTTON,
   2718         /* isvoid */ 1
   2719     };
   2720 
   2721     struct iovec xcb_parts[6];
   2722     xcb_void_cookie_t xcb_ret;
   2723     xcb_input_grab_device_button_request_t xcb_out;
   2724 
   2725     xcb_out.grab_window = grab_window;
   2726     xcb_out.grabbed_device = grabbed_device;
   2727     xcb_out.modifier_device = modifier_device;
   2728     xcb_out.num_classes = num_classes;
   2729     xcb_out.modifiers = modifiers;
   2730     xcb_out.this_device_mode = this_device_mode;
   2731     xcb_out.other_device_mode = other_device_mode;
   2732     xcb_out.button = button;
   2733     xcb_out.owner_events = owner_events;
   2734     memset(xcb_out.pad0, 0, 2);
   2735 
   2736     xcb_parts[2].iov_base = (char *) &xcb_out;
   2737     xcb_parts[2].iov_len = sizeof(xcb_out);
   2738     xcb_parts[3].iov_base = 0;
   2739     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2740     /* xcb_input_event_class_t classes */
   2741     xcb_parts[4].iov_base = (char *) classes;
   2742     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   2743     xcb_parts[5].iov_base = 0;
   2744     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   2745 
   2746     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2747     return xcb_ret;
   2748 }
   2749 
   2750 
   2751 /*****************************************************************************
   2752  **
   2753  ** xcb_void_cookie_t xcb_input_grab_device_button
   2754  **
   2755  ** @param xcb_connection_t              *c
   2756  ** @param xcb_window_t                   grab_window
   2757  ** @param uint8_t                        grabbed_device
   2758  ** @param uint8_t                        modifier_device
   2759  ** @param uint16_t                       num_classes
   2760  ** @param uint16_t                       modifiers
   2761  ** @param uint8_t                        this_device_mode
   2762  ** @param uint8_t                        other_device_mode
   2763  ** @param uint8_t                        button
   2764  ** @param uint8_t                        owner_events
   2765  ** @param const xcb_input_event_class_t *classes
   2766  ** @returns xcb_void_cookie_t
   2767  **
   2768  *****************************************************************************/
   2769 
   2770 xcb_void_cookie_t
   2771 xcb_input_grab_device_button (xcb_connection_t              *c  /**< */,
   2772                               xcb_window_t                   grab_window  /**< */,
   2773                               uint8_t                        grabbed_device  /**< */,
   2774                               uint8_t                        modifier_device  /**< */,
   2775                               uint16_t                       num_classes  /**< */,
   2776                               uint16_t                       modifiers  /**< */,
   2777                               uint8_t                        this_device_mode  /**< */,
   2778                               uint8_t                        other_device_mode  /**< */,
   2779                               uint8_t                        button  /**< */,
   2780                               uint8_t                        owner_events  /**< */,
   2781                               const xcb_input_event_class_t *classes  /**< */)
   2782 {
   2783     static const xcb_protocol_request_t xcb_req = {
   2784         /* count */ 4,
   2785         /* ext */ &xcb_input_id,
   2786         /* opcode */ XCB_INPUT_GRAB_DEVICE_BUTTON,
   2787         /* isvoid */ 1
   2788     };
   2789 
   2790     struct iovec xcb_parts[6];
   2791     xcb_void_cookie_t xcb_ret;
   2792     xcb_input_grab_device_button_request_t xcb_out;
   2793 
   2794     xcb_out.grab_window = grab_window;
   2795     xcb_out.grabbed_device = grabbed_device;
   2796     xcb_out.modifier_device = modifier_device;
   2797     xcb_out.num_classes = num_classes;
   2798     xcb_out.modifiers = modifiers;
   2799     xcb_out.this_device_mode = this_device_mode;
   2800     xcb_out.other_device_mode = other_device_mode;
   2801     xcb_out.button = button;
   2802     xcb_out.owner_events = owner_events;
   2803     memset(xcb_out.pad0, 0, 2);
   2804 
   2805     xcb_parts[2].iov_base = (char *) &xcb_out;
   2806     xcb_parts[2].iov_len = sizeof(xcb_out);
   2807     xcb_parts[3].iov_base = 0;
   2808     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2809     /* xcb_input_event_class_t classes */
   2810     xcb_parts[4].iov_base = (char *) classes;
   2811     xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   2812     xcb_parts[5].iov_base = 0;
   2813     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   2814 
   2815     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2816     return xcb_ret;
   2817 }
   2818 
   2819 
   2820 /*****************************************************************************
   2821  **
   2822  ** xcb_void_cookie_t xcb_input_ungrab_device_button_checked
   2823  **
   2824  ** @param xcb_connection_t *c
   2825  ** @param xcb_window_t      grab_window
   2826  ** @param uint16_t          modifiers
   2827  ** @param uint8_t           modifier_device
   2828  ** @param uint8_t           button
   2829  ** @param uint8_t           grabbed_device
   2830  ** @returns xcb_void_cookie_t
   2831  **
   2832  *****************************************************************************/
   2833 
   2834 xcb_void_cookie_t
   2835 xcb_input_ungrab_device_button_checked (xcb_connection_t *c  /**< */,
   2836                                         xcb_window_t      grab_window  /**< */,
   2837                                         uint16_t          modifiers  /**< */,
   2838                                         uint8_t           modifier_device  /**< */,
   2839                                         uint8_t           button  /**< */,
   2840                                         uint8_t           grabbed_device  /**< */)
   2841 {
   2842     static const xcb_protocol_request_t xcb_req = {
   2843         /* count */ 2,
   2844         /* ext */ &xcb_input_id,
   2845         /* opcode */ XCB_INPUT_UNGRAB_DEVICE_BUTTON,
   2846         /* isvoid */ 1
   2847     };
   2848 
   2849     struct iovec xcb_parts[4];
   2850     xcb_void_cookie_t xcb_ret;
   2851     xcb_input_ungrab_device_button_request_t xcb_out;
   2852 
   2853     xcb_out.grab_window = grab_window;
   2854     xcb_out.modifiers = modifiers;
   2855     xcb_out.modifier_device = modifier_device;
   2856     xcb_out.button = button;
   2857     xcb_out.grabbed_device = grabbed_device;
   2858 
   2859     xcb_parts[2].iov_base = (char *) &xcb_out;
   2860     xcb_parts[2].iov_len = sizeof(xcb_out);
   2861     xcb_parts[3].iov_base = 0;
   2862     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2863 
   2864     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2865     return xcb_ret;
   2866 }
   2867 
   2868 
   2869 /*****************************************************************************
   2870  **
   2871  ** xcb_void_cookie_t xcb_input_ungrab_device_button
   2872  **
   2873  ** @param xcb_connection_t *c
   2874  ** @param xcb_window_t      grab_window
   2875  ** @param uint16_t          modifiers
   2876  ** @param uint8_t           modifier_device
   2877  ** @param uint8_t           button
   2878  ** @param uint8_t           grabbed_device
   2879  ** @returns xcb_void_cookie_t
   2880  **
   2881  *****************************************************************************/
   2882 
   2883 xcb_void_cookie_t
   2884 xcb_input_ungrab_device_button (xcb_connection_t *c  /**< */,
   2885                                 xcb_window_t      grab_window  /**< */,
   2886                                 uint16_t          modifiers  /**< */,
   2887                                 uint8_t           modifier_device  /**< */,
   2888                                 uint8_t           button  /**< */,
   2889                                 uint8_t           grabbed_device  /**< */)
   2890 {
   2891     static const xcb_protocol_request_t xcb_req = {
   2892         /* count */ 2,
   2893         /* ext */ &xcb_input_id,
   2894         /* opcode */ XCB_INPUT_UNGRAB_DEVICE_BUTTON,
   2895         /* isvoid */ 1
   2896     };
   2897 
   2898     struct iovec xcb_parts[4];
   2899     xcb_void_cookie_t xcb_ret;
   2900     xcb_input_ungrab_device_button_request_t xcb_out;
   2901 
   2902     xcb_out.grab_window = grab_window;
   2903     xcb_out.modifiers = modifiers;
   2904     xcb_out.modifier_device = modifier_device;
   2905     xcb_out.button = button;
   2906     xcb_out.grabbed_device = grabbed_device;
   2907 
   2908     xcb_parts[2].iov_base = (char *) &xcb_out;
   2909     xcb_parts[2].iov_len = sizeof(xcb_out);
   2910     xcb_parts[3].iov_base = 0;
   2911     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2912 
   2913     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   2914     return xcb_ret;
   2915 }
   2916 
   2917 
   2918 /*****************************************************************************
   2919  **
   2920  ** xcb_void_cookie_t xcb_input_allow_device_events_checked
   2921  **
   2922  ** @param xcb_connection_t *c
   2923  ** @param xcb_timestamp_t   time
   2924  ** @param uint8_t           mode
   2925  ** @param uint8_t           device_id
   2926  ** @returns xcb_void_cookie_t
   2927  **
   2928  *****************************************************************************/
   2929 
   2930 xcb_void_cookie_t
   2931 xcb_input_allow_device_events_checked (xcb_connection_t *c  /**< */,
   2932                                        xcb_timestamp_t   time  /**< */,
   2933                                        uint8_t           mode  /**< */,
   2934                                        uint8_t           device_id  /**< */)
   2935 {
   2936     static const xcb_protocol_request_t xcb_req = {
   2937         /* count */ 2,
   2938         /* ext */ &xcb_input_id,
   2939         /* opcode */ XCB_INPUT_ALLOW_DEVICE_EVENTS,
   2940         /* isvoid */ 1
   2941     };
   2942 
   2943     struct iovec xcb_parts[4];
   2944     xcb_void_cookie_t xcb_ret;
   2945     xcb_input_allow_device_events_request_t xcb_out;
   2946 
   2947     xcb_out.time = time;
   2948     xcb_out.mode = mode;
   2949     xcb_out.device_id = device_id;
   2950 
   2951     xcb_parts[2].iov_base = (char *) &xcb_out;
   2952     xcb_parts[2].iov_len = sizeof(xcb_out);
   2953     xcb_parts[3].iov_base = 0;
   2954     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2955 
   2956     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   2957     return xcb_ret;
   2958 }
   2959 
   2960 
   2961 /*****************************************************************************
   2962  **
   2963  ** xcb_void_cookie_t xcb_input_allow_device_events
   2964  **
   2965  ** @param xcb_connection_t *c
   2966  ** @param xcb_timestamp_t   time
   2967  ** @param uint8_t           mode
   2968  ** @param uint8_t           device_id
   2969  ** @returns xcb_void_cookie_t
   2970  **
   2971  *****************************************************************************/
   2972 
   2973 xcb_void_cookie_t
   2974 xcb_input_allow_device_events (xcb_connection_t *c  /**< */,
   2975                                xcb_timestamp_t   time  /**< */,
   2976                                uint8_t           mode  /**< */,
   2977                                uint8_t           device_id  /**< */)
   2978 {
   2979     static const xcb_protocol_request_t xcb_req = {
   2980         /* count */ 2,
   2981         /* ext */ &xcb_input_id,
   2982         /* opcode */ XCB_INPUT_ALLOW_DEVICE_EVENTS,
   2983         /* isvoid */ 1
   2984     };
   2985 
   2986     struct iovec xcb_parts[4];
   2987     xcb_void_cookie_t xcb_ret;
   2988     xcb_input_allow_device_events_request_t xcb_out;
   2989 
   2990     xcb_out.time = time;
   2991     xcb_out.mode = mode;
   2992     xcb_out.device_id = device_id;
   2993 
   2994     xcb_parts[2].iov_base = (char *) &xcb_out;
   2995     xcb_parts[2].iov_len = sizeof(xcb_out);
   2996     xcb_parts[3].iov_base = 0;
   2997     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   2998 
   2999     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   3000     return xcb_ret;
   3001 }
   3002 
   3003 
   3004 /*****************************************************************************
   3005  **
   3006  ** xcb_input_get_device_focus_cookie_t xcb_input_get_device_focus
   3007  **
   3008  ** @param xcb_connection_t *c
   3009  ** @param uint8_t           device_id
   3010  ** @returns xcb_input_get_device_focus_cookie_t
   3011  **
   3012  *****************************************************************************/
   3013 
   3014 xcb_input_get_device_focus_cookie_t
   3015 xcb_input_get_device_focus (xcb_connection_t *c  /**< */,
   3016                             uint8_t           device_id  /**< */)
   3017 {
   3018     static const xcb_protocol_request_t xcb_req = {
   3019         /* count */ 2,
   3020         /* ext */ &xcb_input_id,
   3021         /* opcode */ XCB_INPUT_GET_DEVICE_FOCUS,
   3022         /* isvoid */ 0
   3023     };
   3024 
   3025     struct iovec xcb_parts[4];
   3026     xcb_input_get_device_focus_cookie_t xcb_ret;
   3027     xcb_input_get_device_focus_request_t xcb_out;
   3028 
   3029     xcb_out.device_id = device_id;
   3030     memset(xcb_out.pad0, 0, 3);
   3031 
   3032     xcb_parts[2].iov_base = (char *) &xcb_out;
   3033     xcb_parts[2].iov_len = sizeof(xcb_out);
   3034     xcb_parts[3].iov_base = 0;
   3035     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   3036 
   3037     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   3038     return xcb_ret;
   3039 }
   3040 
   3041 
   3042 /*****************************************************************************
   3043  **
   3044  ** xcb_input_get_device_focus_cookie_t xcb_input_get_device_focus_unchecked
   3045  **
   3046  ** @param xcb_connection_t *c
   3047  ** @param uint8_t           device_id
   3048  ** @returns xcb_input_get_device_focus_cookie_t
   3049  **
   3050  *****************************************************************************/
   3051 
   3052 xcb_input_get_device_focus_cookie_t
   3053 xcb_input_get_device_focus_unchecked (xcb_connection_t *c  /**< */,
   3054                                       uint8_t           device_id  /**< */)
   3055 {
   3056     static const xcb_protocol_request_t xcb_req = {
   3057         /* count */ 2,
   3058         /* ext */ &xcb_input_id,
   3059         /* opcode */ XCB_INPUT_GET_DEVICE_FOCUS,
   3060         /* isvoid */ 0
   3061     };
   3062 
   3063     struct iovec xcb_parts[4];
   3064     xcb_input_get_device_focus_cookie_t xcb_ret;
   3065     xcb_input_get_device_focus_request_t xcb_out;
   3066 
   3067     xcb_out.device_id = device_id;
   3068     memset(xcb_out.pad0, 0, 3);
   3069 
   3070     xcb_parts[2].iov_base = (char *) &xcb_out;
   3071     xcb_parts[2].iov_len = sizeof(xcb_out);
   3072     xcb_parts[3].iov_base = 0;
   3073     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   3074 
   3075     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   3076     return xcb_ret;
   3077 }
   3078 
   3079 
   3080 /*****************************************************************************
   3081  **
   3082  ** xcb_input_get_device_focus_reply_t * xcb_input_get_device_focus_reply
   3083  **
   3084  ** @param xcb_connection_t                     *c
   3085  ** @param xcb_input_get_device_focus_cookie_t   cookie
   3086  ** @param xcb_generic_error_t                 **e
   3087  ** @returns xcb_input_get_device_focus_reply_t *
   3088  **
   3089  *****************************************************************************/
   3090 
   3091 xcb_input_get_device_focus_reply_t *
   3092 xcb_input_get_device_focus_reply (xcb_connection_t                     *c  /**< */,
   3093                                   xcb_input_get_device_focus_cookie_t   cookie  /**< */,
   3094                                   xcb_generic_error_t                 **e  /**< */)
   3095 {
   3096     return (xcb_input_get_device_focus_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   3097 }
   3098 
   3099 
   3100 /*****************************************************************************
   3101  **
   3102  ** xcb_void_cookie_t xcb_input_set_device_focus_checked
   3103  **
   3104  ** @param xcb_connection_t *c
   3105  ** @param xcb_window_t      focus
   3106  ** @param xcb_timestamp_t   time
   3107  ** @param uint8_t           revert_to
   3108  ** @param uint8_t           device_id
   3109  ** @returns xcb_void_cookie_t
   3110  **
   3111  *****************************************************************************/
   3112 
   3113 xcb_void_cookie_t
   3114 xcb_input_set_device_focus_checked (xcb_connection_t *c  /**< */,
   3115                                     xcb_window_t      focus  /**< */,
   3116                                     xcb_timestamp_t   time  /**< */,
   3117                                     uint8_t           revert_to  /**< */,
   3118                                     uint8_t           device_id  /**< */)
   3119 {
   3120     static const xcb_protocol_request_t xcb_req = {
   3121         /* count */ 2,
   3122         /* ext */ &xcb_input_id,
   3123         /* opcode */ XCB_INPUT_SET_DEVICE_FOCUS,
   3124         /* isvoid */ 1
   3125     };
   3126 
   3127     struct iovec xcb_parts[4];
   3128     xcb_void_cookie_t xcb_ret;
   3129     xcb_input_set_device_focus_request_t xcb_out;
   3130 
   3131     xcb_out.focus = focus;
   3132     xcb_out.time = time;
   3133     xcb_out.revert_to = revert_to;
   3134     xcb_out.device_id = device_id;
   3135 
   3136     xcb_parts[2].iov_base = (char *) &xcb_out;
   3137     xcb_parts[2].iov_len = sizeof(xcb_out);
   3138     xcb_parts[3].iov_base = 0;
   3139     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   3140 
   3141     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   3142     return xcb_ret;
   3143 }
   3144 
   3145 
   3146 /*****************************************************************************
   3147  **
   3148  ** xcb_void_cookie_t xcb_input_set_device_focus
   3149  **
   3150  ** @param xcb_connection_t *c
   3151  ** @param xcb_window_t      focus
   3152  ** @param xcb_timestamp_t   time
   3153  ** @param uint8_t           revert_to
   3154  ** @param uint8_t           device_id
   3155  ** @returns xcb_void_cookie_t
   3156  **
   3157  *****************************************************************************/
   3158 
   3159 xcb_void_cookie_t
   3160 xcb_input_set_device_focus (xcb_connection_t *c  /**< */,
   3161                             xcb_window_t      focus  /**< */,
   3162                             xcb_timestamp_t   time  /**< */,
   3163                             uint8_t           revert_to  /**< */,
   3164                             uint8_t           device_id  /**< */)
   3165 {
   3166     static const xcb_protocol_request_t xcb_req = {
   3167         /* count */ 2,
   3168         /* ext */ &xcb_input_id,
   3169         /* opcode */ XCB_INPUT_SET_DEVICE_FOCUS,
   3170         /* isvoid */ 1
   3171     };
   3172 
   3173     struct iovec xcb_parts[4];
   3174     xcb_void_cookie_t xcb_ret;
   3175     xcb_input_set_device_focus_request_t xcb_out;
   3176 
   3177     xcb_out.focus = focus;
   3178     xcb_out.time = time;
   3179     xcb_out.revert_to = revert_to;
   3180     xcb_out.device_id = device_id;
   3181 
   3182     xcb_parts[2].iov_base = (char *) &xcb_out;
   3183     xcb_parts[2].iov_len = sizeof(xcb_out);
   3184     xcb_parts[3].iov_base = 0;
   3185     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   3186 
   3187     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   3188     return xcb_ret;
   3189 }
   3190 
   3191 
   3192 /*****************************************************************************
   3193  **
   3194  ** xcb_input_get_feedback_control_cookie_t xcb_input_get_feedback_control
   3195  **
   3196  ** @param xcb_connection_t *c
   3197  ** @param uint8_t           device_id
   3198  ** @returns xcb_input_get_feedback_control_cookie_t
   3199  **
   3200  *****************************************************************************/
   3201 
   3202 xcb_input_get_feedback_control_cookie_t
   3203 xcb_input_get_feedback_control (xcb_connection_t *c  /**< */,
   3204                                 uint8_t           device_id  /**< */)
   3205 {
   3206     static const xcb_protocol_request_t xcb_req = {
   3207         /* count */ 2,
   3208         /* ext */ &xcb_input_id,
   3209         /* opcode */ XCB_INPUT_GET_FEEDBACK_CONTROL,
   3210         /* isvoid */ 0
   3211     };
   3212 
   3213     struct iovec xcb_parts[4];
   3214     xcb_input_get_feedback_control_cookie_t xcb_ret;
   3215     xcb_input_get_feedback_control_request_t xcb_out;
   3216 
   3217     xcb_out.device_id = device_id;
   3218     memset(xcb_out.pad0, 0, 3);
   3219 
   3220     xcb_parts[2].iov_base = (char *) &xcb_out;
   3221     xcb_parts[2].iov_len = sizeof(xcb_out);
   3222     xcb_parts[3].iov_base = 0;
   3223     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   3224 
   3225     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   3226     return xcb_ret;
   3227 }
   3228 
   3229 
   3230 /*****************************************************************************
   3231  **
   3232  ** xcb_input_get_feedback_control_cookie_t xcb_input_get_feedback_control_unchecked
   3233  **
   3234  ** @param xcb_connection_t *c
   3235  ** @param uint8_t           device_id
   3236  ** @returns xcb_input_get_feedback_control_cookie_t
   3237  **
   3238  *****************************************************************************/
   3239 
   3240 xcb_input_get_feedback_control_cookie_t
   3241 xcb_input_get_feedback_control_unchecked (xcb_connection_t *c  /**< */,
   3242                                           uint8_t           device_id  /**< */)
   3243 {
   3244     static const xcb_protocol_request_t xcb_req = {
   3245         /* count */ 2,
   3246         /* ext */ &xcb_input_id,
   3247         /* opcode */ XCB_INPUT_GET_FEEDBACK_CONTROL,
   3248         /* isvoid */ 0
   3249     };
   3250 
   3251     struct iovec xcb_parts[4];
   3252     xcb_input_get_feedback_control_cookie_t xcb_ret;
   3253     xcb_input_get_feedback_control_request_t xcb_out;
   3254 
   3255     xcb_out.device_id = device_id;
   3256     memset(xcb_out.pad0, 0, 3);
   3257 
   3258     xcb_parts[2].iov_base = (char *) &xcb_out;
   3259     xcb_parts[2].iov_len = sizeof(xcb_out);
   3260     xcb_parts[3].iov_base = 0;
   3261     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   3262 
   3263     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   3264     return xcb_ret;
   3265 }
   3266 
   3267 
   3268 /*****************************************************************************
   3269  **
   3270  ** xcb_input_get_feedback_control_reply_t * xcb_input_get_feedback_control_reply
   3271  **
   3272  ** @param xcb_connection_t                         *c
   3273  ** @param xcb_input_get_feedback_control_cookie_t   cookie
   3274  ** @param xcb_generic_error_t                     **e
   3275  ** @returns xcb_input_get_feedback_control_reply_t *
   3276  **
   3277  *****************************************************************************/
   3278 
   3279 xcb_input_get_feedback_control_reply_t *
   3280 xcb_input_get_feedback_control_reply (xcb_connection_t                         *c  /**< */,
   3281                                       xcb_input_get_feedback_control_cookie_t   cookie  /**< */,
   3282                                       xcb_generic_error_t                     **e  /**< */)
   3283 {
   3284     return (xcb_input_get_feedback_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   3285 }
   3286 
   3287 
   3288 /*****************************************************************************
   3289  **
   3290  ** void xcb_input_feedback_state_next
   3291  **
   3292  ** @param xcb_input_feedback_state_iterator_t *i
   3293  ** @returns void
   3294  **
   3295  *****************************************************************************/
   3296 
   3297 void
   3298 xcb_input_feedback_state_next (xcb_input_feedback_state_iterator_t *i  /**< */)
   3299 {
   3300     --i->rem;
   3301     ++i->data;
   3302     i->index += sizeof(xcb_input_feedback_state_t);
   3303 }
   3304 
   3305 
   3306 /*****************************************************************************
   3307  **
   3308  ** xcb_generic_iterator_t xcb_input_feedback_state_end
   3309  **
   3310  ** @param xcb_input_feedback_state_iterator_t i
   3311  ** @returns xcb_generic_iterator_t
   3312  **
   3313  *****************************************************************************/
   3314 
   3315 xcb_generic_iterator_t
   3316 xcb_input_feedback_state_end (xcb_input_feedback_state_iterator_t i  /**< */)
   3317 {
   3318     xcb_generic_iterator_t ret;
   3319     ret.data = i.data + i.rem;
   3320     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3321     ret.rem = 0;
   3322     return ret;
   3323 }
   3324 
   3325 
   3326 /*****************************************************************************
   3327  **
   3328  ** void xcb_input_kbd_feedback_state_next
   3329  **
   3330  ** @param xcb_input_kbd_feedback_state_iterator_t *i
   3331  ** @returns void
   3332  **
   3333  *****************************************************************************/
   3334 
   3335 void
   3336 xcb_input_kbd_feedback_state_next (xcb_input_kbd_feedback_state_iterator_t *i  /**< */)
   3337 {
   3338     --i->rem;
   3339     ++i->data;
   3340     i->index += sizeof(xcb_input_kbd_feedback_state_t);
   3341 }
   3342 
   3343 
   3344 /*****************************************************************************
   3345  **
   3346  ** xcb_generic_iterator_t xcb_input_kbd_feedback_state_end
   3347  **
   3348  ** @param xcb_input_kbd_feedback_state_iterator_t i
   3349  ** @returns xcb_generic_iterator_t
   3350  **
   3351  *****************************************************************************/
   3352 
   3353 xcb_generic_iterator_t
   3354 xcb_input_kbd_feedback_state_end (xcb_input_kbd_feedback_state_iterator_t i  /**< */)
   3355 {
   3356     xcb_generic_iterator_t ret;
   3357     ret.data = i.data + i.rem;
   3358     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3359     ret.rem = 0;
   3360     return ret;
   3361 }
   3362 
   3363 
   3364 /*****************************************************************************
   3365  **
   3366  ** void xcb_input_ptr_feedback_state_next
   3367  **
   3368  ** @param xcb_input_ptr_feedback_state_iterator_t *i
   3369  ** @returns void
   3370  **
   3371  *****************************************************************************/
   3372 
   3373 void
   3374 xcb_input_ptr_feedback_state_next (xcb_input_ptr_feedback_state_iterator_t *i  /**< */)
   3375 {
   3376     --i->rem;
   3377     ++i->data;
   3378     i->index += sizeof(xcb_input_ptr_feedback_state_t);
   3379 }
   3380 
   3381 
   3382 /*****************************************************************************
   3383  **
   3384  ** xcb_generic_iterator_t xcb_input_ptr_feedback_state_end
   3385  **
   3386  ** @param xcb_input_ptr_feedback_state_iterator_t i
   3387  ** @returns xcb_generic_iterator_t
   3388  **
   3389  *****************************************************************************/
   3390 
   3391 xcb_generic_iterator_t
   3392 xcb_input_ptr_feedback_state_end (xcb_input_ptr_feedback_state_iterator_t i  /**< */)
   3393 {
   3394     xcb_generic_iterator_t ret;
   3395     ret.data = i.data + i.rem;
   3396     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3397     ret.rem = 0;
   3398     return ret;
   3399 }
   3400 
   3401 
   3402 /*****************************************************************************
   3403  **
   3404  ** void xcb_input_integer_feedback_state_next
   3405  **
   3406  ** @param xcb_input_integer_feedback_state_iterator_t *i
   3407  ** @returns void
   3408  **
   3409  *****************************************************************************/
   3410 
   3411 void
   3412 xcb_input_integer_feedback_state_next (xcb_input_integer_feedback_state_iterator_t *i  /**< */)
   3413 {
   3414     --i->rem;
   3415     ++i->data;
   3416     i->index += sizeof(xcb_input_integer_feedback_state_t);
   3417 }
   3418 
   3419 
   3420 /*****************************************************************************
   3421  **
   3422  ** xcb_generic_iterator_t xcb_input_integer_feedback_state_end
   3423  **
   3424  ** @param xcb_input_integer_feedback_state_iterator_t i
   3425  ** @returns xcb_generic_iterator_t
   3426  **
   3427  *****************************************************************************/
   3428 
   3429 xcb_generic_iterator_t
   3430 xcb_input_integer_feedback_state_end (xcb_input_integer_feedback_state_iterator_t i  /**< */)
   3431 {
   3432     xcb_generic_iterator_t ret;
   3433     ret.data = i.data + i.rem;
   3434     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3435     ret.rem = 0;
   3436     return ret;
   3437 }
   3438 
   3439 int
   3440 xcb_input_string_feedback_state_sizeof (const void  *_buffer  /**< */)
   3441 {
   3442     char *xcb_tmp = (char *)_buffer;
   3443     const xcb_input_string_feedback_state_t *_aux = (xcb_input_string_feedback_state_t *)_buffer;
   3444     unsigned int xcb_buffer_len = 0;
   3445     unsigned int xcb_block_len = 0;
   3446     unsigned int xcb_pad = 0;
   3447     unsigned int xcb_align_to;
   3448 
   3449 
   3450     xcb_block_len += sizeof(xcb_input_string_feedback_state_t);
   3451     xcb_tmp += xcb_block_len;
   3452     /* keysyms */
   3453     xcb_block_len += _aux->num_keysyms * sizeof(xcb_keysym_t);
   3454     xcb_tmp += xcb_block_len;
   3455     xcb_align_to = ALIGNOF(xcb_keysym_t);
   3456     /* insert padding */
   3457     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   3458     xcb_buffer_len += xcb_block_len + xcb_pad;
   3459     if (0 != xcb_pad) {
   3460         xcb_tmp += xcb_pad;
   3461         xcb_pad = 0;
   3462     }
   3463     xcb_block_len = 0;
   3464 
   3465     return xcb_buffer_len;
   3466 }
   3467 
   3468 
   3469 /*****************************************************************************
   3470  **
   3471  ** xcb_keysym_t * xcb_input_string_feedback_state_keysyms
   3472  **
   3473  ** @param const xcb_input_string_feedback_state_t *R
   3474  ** @returns xcb_keysym_t *
   3475  **
   3476  *****************************************************************************/
   3477 
   3478 xcb_keysym_t *
   3479 xcb_input_string_feedback_state_keysyms (const xcb_input_string_feedback_state_t *R  /**< */)
   3480 {
   3481     return (xcb_keysym_t *) (R + 1);
   3482 }
   3483 
   3484 
   3485 /*****************************************************************************
   3486  **
   3487  ** int xcb_input_string_feedback_state_keysyms_length
   3488  **
   3489  ** @param const xcb_input_string_feedback_state_t *R
   3490  ** @returns int
   3491  **
   3492  *****************************************************************************/
   3493 
   3494 int
   3495 xcb_input_string_feedback_state_keysyms_length (const xcb_input_string_feedback_state_t *R  /**< */)
   3496 {
   3497     return R->num_keysyms;
   3498 }
   3499 
   3500 
   3501 /*****************************************************************************
   3502  **
   3503  ** xcb_generic_iterator_t xcb_input_string_feedback_state_keysyms_end
   3504  **
   3505  ** @param const xcb_input_string_feedback_state_t *R
   3506  ** @returns xcb_generic_iterator_t
   3507  **
   3508  *****************************************************************************/
   3509 
   3510 xcb_generic_iterator_t
   3511 xcb_input_string_feedback_state_keysyms_end (const xcb_input_string_feedback_state_t *R  /**< */)
   3512 {
   3513     xcb_generic_iterator_t i;
   3514     i.data = ((xcb_keysym_t *) (R + 1)) + (R->num_keysyms);
   3515     i.rem = 0;
   3516     i.index = (char *) i.data - (char *) R;
   3517     return i;
   3518 }
   3519 
   3520 
   3521 /*****************************************************************************
   3522  **
   3523  ** void xcb_input_string_feedback_state_next
   3524  **
   3525  ** @param xcb_input_string_feedback_state_iterator_t *i
   3526  ** @returns void
   3527  **
   3528  *****************************************************************************/
   3529 
   3530 void
   3531 xcb_input_string_feedback_state_next (xcb_input_string_feedback_state_iterator_t *i  /**< */)
   3532 {
   3533     xcb_input_string_feedback_state_t *R = i->data;
   3534     xcb_generic_iterator_t child;
   3535     child.data = (xcb_input_string_feedback_state_t *)(((char *)R) + xcb_input_string_feedback_state_sizeof(R));
   3536     i->index = (char *) child.data - (char *) i->data;
   3537     --i->rem;
   3538     i->data = (xcb_input_string_feedback_state_t *) child.data;
   3539 }
   3540 
   3541 
   3542 /*****************************************************************************
   3543  **
   3544  ** xcb_generic_iterator_t xcb_input_string_feedback_state_end
   3545  **
   3546  ** @param xcb_input_string_feedback_state_iterator_t i
   3547  ** @returns xcb_generic_iterator_t
   3548  **
   3549  *****************************************************************************/
   3550 
   3551 xcb_generic_iterator_t
   3552 xcb_input_string_feedback_state_end (xcb_input_string_feedback_state_iterator_t i  /**< */)
   3553 {
   3554     xcb_generic_iterator_t ret;
   3555     while(i.rem > 0)
   3556         xcb_input_string_feedback_state_next(&i);
   3557     ret.data = i.data;
   3558     ret.rem = i.rem;
   3559     ret.index = i.index;
   3560     return ret;
   3561 }
   3562 
   3563 
   3564 /*****************************************************************************
   3565  **
   3566  ** void xcb_input_bell_feedback_state_next
   3567  **
   3568  ** @param xcb_input_bell_feedback_state_iterator_t *i
   3569  ** @returns void
   3570  **
   3571  *****************************************************************************/
   3572 
   3573 void
   3574 xcb_input_bell_feedback_state_next (xcb_input_bell_feedback_state_iterator_t *i  /**< */)
   3575 {
   3576     --i->rem;
   3577     ++i->data;
   3578     i->index += sizeof(xcb_input_bell_feedback_state_t);
   3579 }
   3580 
   3581 
   3582 /*****************************************************************************
   3583  **
   3584  ** xcb_generic_iterator_t xcb_input_bell_feedback_state_end
   3585  **
   3586  ** @param xcb_input_bell_feedback_state_iterator_t i
   3587  ** @returns xcb_generic_iterator_t
   3588  **
   3589  *****************************************************************************/
   3590 
   3591 xcb_generic_iterator_t
   3592 xcb_input_bell_feedback_state_end (xcb_input_bell_feedback_state_iterator_t i  /**< */)
   3593 {
   3594     xcb_generic_iterator_t ret;
   3595     ret.data = i.data + i.rem;
   3596     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3597     ret.rem = 0;
   3598     return ret;
   3599 }
   3600 
   3601 
   3602 /*****************************************************************************
   3603  **
   3604  ** void xcb_input_led_feedback_state_next
   3605  **
   3606  ** @param xcb_input_led_feedback_state_iterator_t *i
   3607  ** @returns void
   3608  **
   3609  *****************************************************************************/
   3610 
   3611 void
   3612 xcb_input_led_feedback_state_next (xcb_input_led_feedback_state_iterator_t *i  /**< */)
   3613 {
   3614     --i->rem;
   3615     ++i->data;
   3616     i->index += sizeof(xcb_input_led_feedback_state_t);
   3617 }
   3618 
   3619 
   3620 /*****************************************************************************
   3621  **
   3622  ** xcb_generic_iterator_t xcb_input_led_feedback_state_end
   3623  **
   3624  ** @param xcb_input_led_feedback_state_iterator_t i
   3625  ** @returns xcb_generic_iterator_t
   3626  **
   3627  *****************************************************************************/
   3628 
   3629 xcb_generic_iterator_t
   3630 xcb_input_led_feedback_state_end (xcb_input_led_feedback_state_iterator_t i  /**< */)
   3631 {
   3632     xcb_generic_iterator_t ret;
   3633     ret.data = i.data + i.rem;
   3634     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3635     ret.rem = 0;
   3636     return ret;
   3637 }
   3638 
   3639 
   3640 /*****************************************************************************
   3641  **
   3642  ** void xcb_input_feedback_ctl_next
   3643  **
   3644  ** @param xcb_input_feedback_ctl_iterator_t *i
   3645  ** @returns void
   3646  **
   3647  *****************************************************************************/
   3648 
   3649 void
   3650 xcb_input_feedback_ctl_next (xcb_input_feedback_ctl_iterator_t *i  /**< */)
   3651 {
   3652     --i->rem;
   3653     ++i->data;
   3654     i->index += sizeof(xcb_input_feedback_ctl_t);
   3655 }
   3656 
   3657 
   3658 /*****************************************************************************
   3659  **
   3660  ** xcb_generic_iterator_t xcb_input_feedback_ctl_end
   3661  **
   3662  ** @param xcb_input_feedback_ctl_iterator_t i
   3663  ** @returns xcb_generic_iterator_t
   3664  **
   3665  *****************************************************************************/
   3666 
   3667 xcb_generic_iterator_t
   3668 xcb_input_feedback_ctl_end (xcb_input_feedback_ctl_iterator_t i  /**< */)
   3669 {
   3670     xcb_generic_iterator_t ret;
   3671     ret.data = i.data + i.rem;
   3672     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3673     ret.rem = 0;
   3674     return ret;
   3675 }
   3676 
   3677 
   3678 /*****************************************************************************
   3679  **
   3680  ** void xcb_input_kbd_feedback_ctl_next
   3681  **
   3682  ** @param xcb_input_kbd_feedback_ctl_iterator_t *i
   3683  ** @returns void
   3684  **
   3685  *****************************************************************************/
   3686 
   3687 void
   3688 xcb_input_kbd_feedback_ctl_next (xcb_input_kbd_feedback_ctl_iterator_t *i  /**< */)
   3689 {
   3690     --i->rem;
   3691     ++i->data;
   3692     i->index += sizeof(xcb_input_kbd_feedback_ctl_t);
   3693 }
   3694 
   3695 
   3696 /*****************************************************************************
   3697  **
   3698  ** xcb_generic_iterator_t xcb_input_kbd_feedback_ctl_end
   3699  **
   3700  ** @param xcb_input_kbd_feedback_ctl_iterator_t i
   3701  ** @returns xcb_generic_iterator_t
   3702  **
   3703  *****************************************************************************/
   3704 
   3705 xcb_generic_iterator_t
   3706 xcb_input_kbd_feedback_ctl_end (xcb_input_kbd_feedback_ctl_iterator_t i  /**< */)
   3707 {
   3708     xcb_generic_iterator_t ret;
   3709     ret.data = i.data + i.rem;
   3710     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3711     ret.rem = 0;
   3712     return ret;
   3713 }
   3714 
   3715 
   3716 /*****************************************************************************
   3717  **
   3718  ** void xcb_input_ptr_feedback_ctl_next
   3719  **
   3720  ** @param xcb_input_ptr_feedback_ctl_iterator_t *i
   3721  ** @returns void
   3722  **
   3723  *****************************************************************************/
   3724 
   3725 void
   3726 xcb_input_ptr_feedback_ctl_next (xcb_input_ptr_feedback_ctl_iterator_t *i  /**< */)
   3727 {
   3728     --i->rem;
   3729     ++i->data;
   3730     i->index += sizeof(xcb_input_ptr_feedback_ctl_t);
   3731 }
   3732 
   3733 
   3734 /*****************************************************************************
   3735  **
   3736  ** xcb_generic_iterator_t xcb_input_ptr_feedback_ctl_end
   3737  **
   3738  ** @param xcb_input_ptr_feedback_ctl_iterator_t i
   3739  ** @returns xcb_generic_iterator_t
   3740  **
   3741  *****************************************************************************/
   3742 
   3743 xcb_generic_iterator_t
   3744 xcb_input_ptr_feedback_ctl_end (xcb_input_ptr_feedback_ctl_iterator_t i  /**< */)
   3745 {
   3746     xcb_generic_iterator_t ret;
   3747     ret.data = i.data + i.rem;
   3748     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3749     ret.rem = 0;
   3750     return ret;
   3751 }
   3752 
   3753 
   3754 /*****************************************************************************
   3755  **
   3756  ** void xcb_input_integer_feedback_ctl_next
   3757  **
   3758  ** @param xcb_input_integer_feedback_ctl_iterator_t *i
   3759  ** @returns void
   3760  **
   3761  *****************************************************************************/
   3762 
   3763 void
   3764 xcb_input_integer_feedback_ctl_next (xcb_input_integer_feedback_ctl_iterator_t *i  /**< */)
   3765 {
   3766     --i->rem;
   3767     ++i->data;
   3768     i->index += sizeof(xcb_input_integer_feedback_ctl_t);
   3769 }
   3770 
   3771 
   3772 /*****************************************************************************
   3773  **
   3774  ** xcb_generic_iterator_t xcb_input_integer_feedback_ctl_end
   3775  **
   3776  ** @param xcb_input_integer_feedback_ctl_iterator_t i
   3777  ** @returns xcb_generic_iterator_t
   3778  **
   3779  *****************************************************************************/
   3780 
   3781 xcb_generic_iterator_t
   3782 xcb_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_iterator_t i  /**< */)
   3783 {
   3784     xcb_generic_iterator_t ret;
   3785     ret.data = i.data + i.rem;
   3786     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3787     ret.rem = 0;
   3788     return ret;
   3789 }
   3790 
   3791 int
   3792 xcb_input_string_feedback_ctl_sizeof (const void  *_buffer  /**< */)
   3793 {
   3794     char *xcb_tmp = (char *)_buffer;
   3795     const xcb_input_string_feedback_ctl_t *_aux = (xcb_input_string_feedback_ctl_t *)_buffer;
   3796     unsigned int xcb_buffer_len = 0;
   3797     unsigned int xcb_block_len = 0;
   3798     unsigned int xcb_pad = 0;
   3799     unsigned int xcb_align_to;
   3800 
   3801 
   3802     xcb_block_len += sizeof(xcb_input_string_feedback_ctl_t);
   3803     xcb_tmp += xcb_block_len;
   3804     /* keysyms */
   3805     xcb_block_len += _aux->num_keysyms * sizeof(xcb_keysym_t);
   3806     xcb_tmp += xcb_block_len;
   3807     xcb_align_to = ALIGNOF(xcb_keysym_t);
   3808     /* insert padding */
   3809     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   3810     xcb_buffer_len += xcb_block_len + xcb_pad;
   3811     if (0 != xcb_pad) {
   3812         xcb_tmp += xcb_pad;
   3813         xcb_pad = 0;
   3814     }
   3815     xcb_block_len = 0;
   3816 
   3817     return xcb_buffer_len;
   3818 }
   3819 
   3820 
   3821 /*****************************************************************************
   3822  **
   3823  ** xcb_keysym_t * xcb_input_string_feedback_ctl_keysyms
   3824  **
   3825  ** @param const xcb_input_string_feedback_ctl_t *R
   3826  ** @returns xcb_keysym_t *
   3827  **
   3828  *****************************************************************************/
   3829 
   3830 xcb_keysym_t *
   3831 xcb_input_string_feedback_ctl_keysyms (const xcb_input_string_feedback_ctl_t *R  /**< */)
   3832 {
   3833     return (xcb_keysym_t *) (R + 1);
   3834 }
   3835 
   3836 
   3837 /*****************************************************************************
   3838  **
   3839  ** int xcb_input_string_feedback_ctl_keysyms_length
   3840  **
   3841  ** @param const xcb_input_string_feedback_ctl_t *R
   3842  ** @returns int
   3843  **
   3844  *****************************************************************************/
   3845 
   3846 int
   3847 xcb_input_string_feedback_ctl_keysyms_length (const xcb_input_string_feedback_ctl_t *R  /**< */)
   3848 {
   3849     return R->num_keysyms;
   3850 }
   3851 
   3852 
   3853 /*****************************************************************************
   3854  **
   3855  ** xcb_generic_iterator_t xcb_input_string_feedback_ctl_keysyms_end
   3856  **
   3857  ** @param const xcb_input_string_feedback_ctl_t *R
   3858  ** @returns xcb_generic_iterator_t
   3859  **
   3860  *****************************************************************************/
   3861 
   3862 xcb_generic_iterator_t
   3863 xcb_input_string_feedback_ctl_keysyms_end (const xcb_input_string_feedback_ctl_t *R  /**< */)
   3864 {
   3865     xcb_generic_iterator_t i;
   3866     i.data = ((xcb_keysym_t *) (R + 1)) + (R->num_keysyms);
   3867     i.rem = 0;
   3868     i.index = (char *) i.data - (char *) R;
   3869     return i;
   3870 }
   3871 
   3872 
   3873 /*****************************************************************************
   3874  **
   3875  ** void xcb_input_string_feedback_ctl_next
   3876  **
   3877  ** @param xcb_input_string_feedback_ctl_iterator_t *i
   3878  ** @returns void
   3879  **
   3880  *****************************************************************************/
   3881 
   3882 void
   3883 xcb_input_string_feedback_ctl_next (xcb_input_string_feedback_ctl_iterator_t *i  /**< */)
   3884 {
   3885     xcb_input_string_feedback_ctl_t *R = i->data;
   3886     xcb_generic_iterator_t child;
   3887     child.data = (xcb_input_string_feedback_ctl_t *)(((char *)R) + xcb_input_string_feedback_ctl_sizeof(R));
   3888     i->index = (char *) child.data - (char *) i->data;
   3889     --i->rem;
   3890     i->data = (xcb_input_string_feedback_ctl_t *) child.data;
   3891 }
   3892 
   3893 
   3894 /*****************************************************************************
   3895  **
   3896  ** xcb_generic_iterator_t xcb_input_string_feedback_ctl_end
   3897  **
   3898  ** @param xcb_input_string_feedback_ctl_iterator_t i
   3899  ** @returns xcb_generic_iterator_t
   3900  **
   3901  *****************************************************************************/
   3902 
   3903 xcb_generic_iterator_t
   3904 xcb_input_string_feedback_ctl_end (xcb_input_string_feedback_ctl_iterator_t i  /**< */)
   3905 {
   3906     xcb_generic_iterator_t ret;
   3907     while(i.rem > 0)
   3908         xcb_input_string_feedback_ctl_next(&i);
   3909     ret.data = i.data;
   3910     ret.rem = i.rem;
   3911     ret.index = i.index;
   3912     return ret;
   3913 }
   3914 
   3915 
   3916 /*****************************************************************************
   3917  **
   3918  ** void xcb_input_bell_feedback_ctl_next
   3919  **
   3920  ** @param xcb_input_bell_feedback_ctl_iterator_t *i
   3921  ** @returns void
   3922  **
   3923  *****************************************************************************/
   3924 
   3925 void
   3926 xcb_input_bell_feedback_ctl_next (xcb_input_bell_feedback_ctl_iterator_t *i  /**< */)
   3927 {
   3928     --i->rem;
   3929     ++i->data;
   3930     i->index += sizeof(xcb_input_bell_feedback_ctl_t);
   3931 }
   3932 
   3933 
   3934 /*****************************************************************************
   3935  **
   3936  ** xcb_generic_iterator_t xcb_input_bell_feedback_ctl_end
   3937  **
   3938  ** @param xcb_input_bell_feedback_ctl_iterator_t i
   3939  ** @returns xcb_generic_iterator_t
   3940  **
   3941  *****************************************************************************/
   3942 
   3943 xcb_generic_iterator_t
   3944 xcb_input_bell_feedback_ctl_end (xcb_input_bell_feedback_ctl_iterator_t i  /**< */)
   3945 {
   3946     xcb_generic_iterator_t ret;
   3947     ret.data = i.data + i.rem;
   3948     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3949     ret.rem = 0;
   3950     return ret;
   3951 }
   3952 
   3953 
   3954 /*****************************************************************************
   3955  **
   3956  ** void xcb_input_led_feedback_ctl_next
   3957  **
   3958  ** @param xcb_input_led_feedback_ctl_iterator_t *i
   3959  ** @returns void
   3960  **
   3961  *****************************************************************************/
   3962 
   3963 void
   3964 xcb_input_led_feedback_ctl_next (xcb_input_led_feedback_ctl_iterator_t *i  /**< */)
   3965 {
   3966     --i->rem;
   3967     ++i->data;
   3968     i->index += sizeof(xcb_input_led_feedback_ctl_t);
   3969 }
   3970 
   3971 
   3972 /*****************************************************************************
   3973  **
   3974  ** xcb_generic_iterator_t xcb_input_led_feedback_ctl_end
   3975  **
   3976  ** @param xcb_input_led_feedback_ctl_iterator_t i
   3977  ** @returns xcb_generic_iterator_t
   3978  **
   3979  *****************************************************************************/
   3980 
   3981 xcb_generic_iterator_t
   3982 xcb_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i  /**< */)
   3983 {
   3984     xcb_generic_iterator_t ret;
   3985     ret.data = i.data + i.rem;
   3986     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   3987     ret.rem = 0;
   3988     return ret;
   3989 }
   3990 
   3991 int
   3992 xcb_input_get_device_key_mapping_sizeof (const void  *_buffer  /**< */)
   3993 {
   3994     char *xcb_tmp = (char *)_buffer;
   3995     const xcb_input_get_device_key_mapping_reply_t *_aux = (xcb_input_get_device_key_mapping_reply_t *)_buffer;
   3996     unsigned int xcb_buffer_len = 0;
   3997     unsigned int xcb_block_len = 0;
   3998     unsigned int xcb_pad = 0;
   3999     unsigned int xcb_align_to;
   4000 
   4001 
   4002     xcb_block_len += sizeof(xcb_input_get_device_key_mapping_reply_t);
   4003     xcb_tmp += xcb_block_len;
   4004     /* keysyms */
   4005     xcb_block_len += _aux->length * sizeof(xcb_keysym_t);
   4006     xcb_tmp += xcb_block_len;
   4007     xcb_align_to = ALIGNOF(xcb_keysym_t);
   4008     /* insert padding */
   4009     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   4010     xcb_buffer_len += xcb_block_len + xcb_pad;
   4011     if (0 != xcb_pad) {
   4012         xcb_tmp += xcb_pad;
   4013         xcb_pad = 0;
   4014     }
   4015     xcb_block_len = 0;
   4016 
   4017     return xcb_buffer_len;
   4018 }
   4019 
   4020 
   4021 /*****************************************************************************
   4022  **
   4023  ** xcb_input_get_device_key_mapping_cookie_t xcb_input_get_device_key_mapping
   4024  **
   4025  ** @param xcb_connection_t     *c
   4026  ** @param uint8_t               device_id
   4027  ** @param xcb_input_key_code_t  first_keycode
   4028  ** @param uint8_t               count
   4029  ** @returns xcb_input_get_device_key_mapping_cookie_t
   4030  **
   4031  *****************************************************************************/
   4032 
   4033 xcb_input_get_device_key_mapping_cookie_t
   4034 xcb_input_get_device_key_mapping (xcb_connection_t     *c  /**< */,
   4035                                   uint8_t               device_id  /**< */,
   4036                                   xcb_input_key_code_t  first_keycode  /**< */,
   4037                                   uint8_t               count  /**< */)
   4038 {
   4039     static const xcb_protocol_request_t xcb_req = {
   4040         /* count */ 2,
   4041         /* ext */ &xcb_input_id,
   4042         /* opcode */ XCB_INPUT_GET_DEVICE_KEY_MAPPING,
   4043         /* isvoid */ 0
   4044     };
   4045 
   4046     struct iovec xcb_parts[4];
   4047     xcb_input_get_device_key_mapping_cookie_t xcb_ret;
   4048     xcb_input_get_device_key_mapping_request_t xcb_out;
   4049 
   4050     xcb_out.device_id = device_id;
   4051     xcb_out.first_keycode = first_keycode;
   4052     xcb_out.count = count;
   4053 
   4054     xcb_parts[2].iov_base = (char *) &xcb_out;
   4055     xcb_parts[2].iov_len = sizeof(xcb_out);
   4056     xcb_parts[3].iov_base = 0;
   4057     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4058 
   4059     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4060     return xcb_ret;
   4061 }
   4062 
   4063 
   4064 /*****************************************************************************
   4065  **
   4066  ** xcb_input_get_device_key_mapping_cookie_t xcb_input_get_device_key_mapping_unchecked
   4067  **
   4068  ** @param xcb_connection_t     *c
   4069  ** @param uint8_t               device_id
   4070  ** @param xcb_input_key_code_t  first_keycode
   4071  ** @param uint8_t               count
   4072  ** @returns xcb_input_get_device_key_mapping_cookie_t
   4073  **
   4074  *****************************************************************************/
   4075 
   4076 xcb_input_get_device_key_mapping_cookie_t
   4077 xcb_input_get_device_key_mapping_unchecked (xcb_connection_t     *c  /**< */,
   4078                                             uint8_t               device_id  /**< */,
   4079                                             xcb_input_key_code_t  first_keycode  /**< */,
   4080                                             uint8_t               count  /**< */)
   4081 {
   4082     static const xcb_protocol_request_t xcb_req = {
   4083         /* count */ 2,
   4084         /* ext */ &xcb_input_id,
   4085         /* opcode */ XCB_INPUT_GET_DEVICE_KEY_MAPPING,
   4086         /* isvoid */ 0
   4087     };
   4088 
   4089     struct iovec xcb_parts[4];
   4090     xcb_input_get_device_key_mapping_cookie_t xcb_ret;
   4091     xcb_input_get_device_key_mapping_request_t xcb_out;
   4092 
   4093     xcb_out.device_id = device_id;
   4094     xcb_out.first_keycode = first_keycode;
   4095     xcb_out.count = count;
   4096 
   4097     xcb_parts[2].iov_base = (char *) &xcb_out;
   4098     xcb_parts[2].iov_len = sizeof(xcb_out);
   4099     xcb_parts[3].iov_base = 0;
   4100     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4101 
   4102     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   4103     return xcb_ret;
   4104 }
   4105 
   4106 
   4107 /*****************************************************************************
   4108  **
   4109  ** xcb_keysym_t * xcb_input_get_device_key_mapping_keysyms
   4110  **
   4111  ** @param const xcb_input_get_device_key_mapping_reply_t *R
   4112  ** @returns xcb_keysym_t *
   4113  **
   4114  *****************************************************************************/
   4115 
   4116 xcb_keysym_t *
   4117 xcb_input_get_device_key_mapping_keysyms (const xcb_input_get_device_key_mapping_reply_t *R  /**< */)
   4118 {
   4119     return (xcb_keysym_t *) (R + 1);
   4120 }
   4121 
   4122 
   4123 /*****************************************************************************
   4124  **
   4125  ** int xcb_input_get_device_key_mapping_keysyms_length
   4126  **
   4127  ** @param const xcb_input_get_device_key_mapping_reply_t *R
   4128  ** @returns int
   4129  **
   4130  *****************************************************************************/
   4131 
   4132 int
   4133 xcb_input_get_device_key_mapping_keysyms_length (const xcb_input_get_device_key_mapping_reply_t *R  /**< */)
   4134 {
   4135     return R->length;
   4136 }
   4137 
   4138 
   4139 /*****************************************************************************
   4140  **
   4141  ** xcb_generic_iterator_t xcb_input_get_device_key_mapping_keysyms_end
   4142  **
   4143  ** @param const xcb_input_get_device_key_mapping_reply_t *R
   4144  ** @returns xcb_generic_iterator_t
   4145  **
   4146  *****************************************************************************/
   4147 
   4148 xcb_generic_iterator_t
   4149 xcb_input_get_device_key_mapping_keysyms_end (const xcb_input_get_device_key_mapping_reply_t *R  /**< */)
   4150 {
   4151     xcb_generic_iterator_t i;
   4152     i.data = ((xcb_keysym_t *) (R + 1)) + (R->length);
   4153     i.rem = 0;
   4154     i.index = (char *) i.data - (char *) R;
   4155     return i;
   4156 }
   4157 
   4158 
   4159 /*****************************************************************************
   4160  **
   4161  ** xcb_input_get_device_key_mapping_reply_t * xcb_input_get_device_key_mapping_reply
   4162  **
   4163  ** @param xcb_connection_t                           *c
   4164  ** @param xcb_input_get_device_key_mapping_cookie_t   cookie
   4165  ** @param xcb_generic_error_t                       **e
   4166  ** @returns xcb_input_get_device_key_mapping_reply_t *
   4167  **
   4168  *****************************************************************************/
   4169 
   4170 xcb_input_get_device_key_mapping_reply_t *
   4171 xcb_input_get_device_key_mapping_reply (xcb_connection_t                           *c  /**< */,
   4172                                         xcb_input_get_device_key_mapping_cookie_t   cookie  /**< */,
   4173                                         xcb_generic_error_t                       **e  /**< */)
   4174 {
   4175     return (xcb_input_get_device_key_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   4176 }
   4177 
   4178 int
   4179 xcb_input_change_device_key_mapping_sizeof (const void  *_buffer  /**< */)
   4180 {
   4181     char *xcb_tmp = (char *)_buffer;
   4182     const xcb_input_change_device_key_mapping_request_t *_aux = (xcb_input_change_device_key_mapping_request_t *)_buffer;
   4183     unsigned int xcb_buffer_len = 0;
   4184     unsigned int xcb_block_len = 0;
   4185     unsigned int xcb_pad = 0;
   4186     unsigned int xcb_align_to;
   4187 
   4188 
   4189     xcb_block_len += sizeof(xcb_input_change_device_key_mapping_request_t);
   4190     xcb_tmp += xcb_block_len;
   4191     /* keysyms */
   4192     xcb_block_len += (_aux->keycode_count * _aux->keysyms_per_keycode) * sizeof(xcb_keysym_t);
   4193     xcb_tmp += xcb_block_len;
   4194     xcb_align_to = ALIGNOF(xcb_keysym_t);
   4195     /* insert padding */
   4196     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   4197     xcb_buffer_len += xcb_block_len + xcb_pad;
   4198     if (0 != xcb_pad) {
   4199         xcb_tmp += xcb_pad;
   4200         xcb_pad = 0;
   4201     }
   4202     xcb_block_len = 0;
   4203 
   4204     return xcb_buffer_len;
   4205 }
   4206 
   4207 
   4208 /*****************************************************************************
   4209  **
   4210  ** xcb_void_cookie_t xcb_input_change_device_key_mapping_checked
   4211  **
   4212  ** @param xcb_connection_t     *c
   4213  ** @param uint8_t               device_id
   4214  ** @param xcb_input_key_code_t  first_keycode
   4215  ** @param uint8_t               keysyms_per_keycode
   4216  ** @param uint8_t               keycode_count
   4217  ** @param const xcb_keysym_t   *keysyms
   4218  ** @returns xcb_void_cookie_t
   4219  **
   4220  *****************************************************************************/
   4221 
   4222 xcb_void_cookie_t
   4223 xcb_input_change_device_key_mapping_checked (xcb_connection_t     *c  /**< */,
   4224                                              uint8_t               device_id  /**< */,
   4225                                              xcb_input_key_code_t  first_keycode  /**< */,
   4226                                              uint8_t               keysyms_per_keycode  /**< */,
   4227                                              uint8_t               keycode_count  /**< */,
   4228                                              const xcb_keysym_t   *keysyms  /**< */)
   4229 {
   4230     static const xcb_protocol_request_t xcb_req = {
   4231         /* count */ 4,
   4232         /* ext */ &xcb_input_id,
   4233         /* opcode */ XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING,
   4234         /* isvoid */ 1
   4235     };
   4236 
   4237     struct iovec xcb_parts[6];
   4238     xcb_void_cookie_t xcb_ret;
   4239     xcb_input_change_device_key_mapping_request_t xcb_out;
   4240 
   4241     xcb_out.device_id = device_id;
   4242     xcb_out.first_keycode = first_keycode;
   4243     xcb_out.keysyms_per_keycode = keysyms_per_keycode;
   4244     xcb_out.keycode_count = keycode_count;
   4245 
   4246     xcb_parts[2].iov_base = (char *) &xcb_out;
   4247     xcb_parts[2].iov_len = sizeof(xcb_out);
   4248     xcb_parts[3].iov_base = 0;
   4249     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4250     /* xcb_keysym_t keysyms */
   4251     xcb_parts[4].iov_base = (char *) keysyms;
   4252     xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t);
   4253     xcb_parts[5].iov_base = 0;
   4254     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   4255 
   4256     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4257     return xcb_ret;
   4258 }
   4259 
   4260 
   4261 /*****************************************************************************
   4262  **
   4263  ** xcb_void_cookie_t xcb_input_change_device_key_mapping
   4264  **
   4265  ** @param xcb_connection_t     *c
   4266  ** @param uint8_t               device_id
   4267  ** @param xcb_input_key_code_t  first_keycode
   4268  ** @param uint8_t               keysyms_per_keycode
   4269  ** @param uint8_t               keycode_count
   4270  ** @param const xcb_keysym_t   *keysyms
   4271  ** @returns xcb_void_cookie_t
   4272  **
   4273  *****************************************************************************/
   4274 
   4275 xcb_void_cookie_t
   4276 xcb_input_change_device_key_mapping (xcb_connection_t     *c  /**< */,
   4277                                      uint8_t               device_id  /**< */,
   4278                                      xcb_input_key_code_t  first_keycode  /**< */,
   4279                                      uint8_t               keysyms_per_keycode  /**< */,
   4280                                      uint8_t               keycode_count  /**< */,
   4281                                      const xcb_keysym_t   *keysyms  /**< */)
   4282 {
   4283     static const xcb_protocol_request_t xcb_req = {
   4284         /* count */ 4,
   4285         /* ext */ &xcb_input_id,
   4286         /* opcode */ XCB_INPUT_CHANGE_DEVICE_KEY_MAPPING,
   4287         /* isvoid */ 1
   4288     };
   4289 
   4290     struct iovec xcb_parts[6];
   4291     xcb_void_cookie_t xcb_ret;
   4292     xcb_input_change_device_key_mapping_request_t xcb_out;
   4293 
   4294     xcb_out.device_id = device_id;
   4295     xcb_out.first_keycode = first_keycode;
   4296     xcb_out.keysyms_per_keycode = keysyms_per_keycode;
   4297     xcb_out.keycode_count = keycode_count;
   4298 
   4299     xcb_parts[2].iov_base = (char *) &xcb_out;
   4300     xcb_parts[2].iov_len = sizeof(xcb_out);
   4301     xcb_parts[3].iov_base = 0;
   4302     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4303     /* xcb_keysym_t keysyms */
   4304     xcb_parts[4].iov_base = (char *) keysyms;
   4305     xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t);
   4306     xcb_parts[5].iov_base = 0;
   4307     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   4308 
   4309     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   4310     return xcb_ret;
   4311 }
   4312 
   4313 int
   4314 xcb_input_get_device_modifier_mapping_sizeof (const void  *_buffer  /**< */)
   4315 {
   4316     char *xcb_tmp = (char *)_buffer;
   4317     const xcb_input_get_device_modifier_mapping_reply_t *_aux = (xcb_input_get_device_modifier_mapping_reply_t *)_buffer;
   4318     unsigned int xcb_buffer_len = 0;
   4319     unsigned int xcb_block_len = 0;
   4320     unsigned int xcb_pad = 0;
   4321     unsigned int xcb_align_to;
   4322 
   4323 
   4324     xcb_block_len += sizeof(xcb_input_get_device_modifier_mapping_reply_t);
   4325     xcb_tmp += xcb_block_len;
   4326     /* keymaps */
   4327     xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(uint8_t);
   4328     xcb_tmp += xcb_block_len;
   4329     xcb_align_to = ALIGNOF(uint8_t);
   4330     /* insert padding */
   4331     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   4332     xcb_buffer_len += xcb_block_len + xcb_pad;
   4333     if (0 != xcb_pad) {
   4334         xcb_tmp += xcb_pad;
   4335         xcb_pad = 0;
   4336     }
   4337     xcb_block_len = 0;
   4338 
   4339     return xcb_buffer_len;
   4340 }
   4341 
   4342 
   4343 /*****************************************************************************
   4344  **
   4345  ** xcb_input_get_device_modifier_mapping_cookie_t xcb_input_get_device_modifier_mapping
   4346  **
   4347  ** @param xcb_connection_t *c
   4348  ** @param uint8_t           device_id
   4349  ** @returns xcb_input_get_device_modifier_mapping_cookie_t
   4350  **
   4351  *****************************************************************************/
   4352 
   4353 xcb_input_get_device_modifier_mapping_cookie_t
   4354 xcb_input_get_device_modifier_mapping (xcb_connection_t *c  /**< */,
   4355                                        uint8_t           device_id  /**< */)
   4356 {
   4357     static const xcb_protocol_request_t xcb_req = {
   4358         /* count */ 2,
   4359         /* ext */ &xcb_input_id,
   4360         /* opcode */ XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING,
   4361         /* isvoid */ 0
   4362     };
   4363 
   4364     struct iovec xcb_parts[4];
   4365     xcb_input_get_device_modifier_mapping_cookie_t xcb_ret;
   4366     xcb_input_get_device_modifier_mapping_request_t xcb_out;
   4367 
   4368     xcb_out.device_id = device_id;
   4369     memset(xcb_out.pad0, 0, 3);
   4370 
   4371     xcb_parts[2].iov_base = (char *) &xcb_out;
   4372     xcb_parts[2].iov_len = sizeof(xcb_out);
   4373     xcb_parts[3].iov_base = 0;
   4374     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4375 
   4376     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4377     return xcb_ret;
   4378 }
   4379 
   4380 
   4381 /*****************************************************************************
   4382  **
   4383  ** xcb_input_get_device_modifier_mapping_cookie_t xcb_input_get_device_modifier_mapping_unchecked
   4384  **
   4385  ** @param xcb_connection_t *c
   4386  ** @param uint8_t           device_id
   4387  ** @returns xcb_input_get_device_modifier_mapping_cookie_t
   4388  **
   4389  *****************************************************************************/
   4390 
   4391 xcb_input_get_device_modifier_mapping_cookie_t
   4392 xcb_input_get_device_modifier_mapping_unchecked (xcb_connection_t *c  /**< */,
   4393                                                  uint8_t           device_id  /**< */)
   4394 {
   4395     static const xcb_protocol_request_t xcb_req = {
   4396         /* count */ 2,
   4397         /* ext */ &xcb_input_id,
   4398         /* opcode */ XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING,
   4399         /* isvoid */ 0
   4400     };
   4401 
   4402     struct iovec xcb_parts[4];
   4403     xcb_input_get_device_modifier_mapping_cookie_t xcb_ret;
   4404     xcb_input_get_device_modifier_mapping_request_t xcb_out;
   4405 
   4406     xcb_out.device_id = device_id;
   4407     memset(xcb_out.pad0, 0, 3);
   4408 
   4409     xcb_parts[2].iov_base = (char *) &xcb_out;
   4410     xcb_parts[2].iov_len = sizeof(xcb_out);
   4411     xcb_parts[3].iov_base = 0;
   4412     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4413 
   4414     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   4415     return xcb_ret;
   4416 }
   4417 
   4418 
   4419 /*****************************************************************************
   4420  **
   4421  ** uint8_t * xcb_input_get_device_modifier_mapping_keymaps
   4422  **
   4423  ** @param const xcb_input_get_device_modifier_mapping_reply_t *R
   4424  ** @returns uint8_t *
   4425  **
   4426  *****************************************************************************/
   4427 
   4428 uint8_t *
   4429 xcb_input_get_device_modifier_mapping_keymaps (const xcb_input_get_device_modifier_mapping_reply_t *R  /**< */)
   4430 {
   4431     return (uint8_t *) (R + 1);
   4432 }
   4433 
   4434 
   4435 /*****************************************************************************
   4436  **
   4437  ** int xcb_input_get_device_modifier_mapping_keymaps_length
   4438  **
   4439  ** @param const xcb_input_get_device_modifier_mapping_reply_t *R
   4440  ** @returns int
   4441  **
   4442  *****************************************************************************/
   4443 
   4444 int
   4445 xcb_input_get_device_modifier_mapping_keymaps_length (const xcb_input_get_device_modifier_mapping_reply_t *R  /**< */)
   4446 {
   4447     return (R->keycodes_per_modifier * 8);
   4448 }
   4449 
   4450 
   4451 /*****************************************************************************
   4452  **
   4453  ** xcb_generic_iterator_t xcb_input_get_device_modifier_mapping_keymaps_end
   4454  **
   4455  ** @param const xcb_input_get_device_modifier_mapping_reply_t *R
   4456  ** @returns xcb_generic_iterator_t
   4457  **
   4458  *****************************************************************************/
   4459 
   4460 xcb_generic_iterator_t
   4461 xcb_input_get_device_modifier_mapping_keymaps_end (const xcb_input_get_device_modifier_mapping_reply_t *R  /**< */)
   4462 {
   4463     xcb_generic_iterator_t i;
   4464     i.data = ((uint8_t *) (R + 1)) + ((R->keycodes_per_modifier * 8));
   4465     i.rem = 0;
   4466     i.index = (char *) i.data - (char *) R;
   4467     return i;
   4468 }
   4469 
   4470 
   4471 /*****************************************************************************
   4472  **
   4473  ** xcb_input_get_device_modifier_mapping_reply_t * xcb_input_get_device_modifier_mapping_reply
   4474  **
   4475  ** @param xcb_connection_t                                *c
   4476  ** @param xcb_input_get_device_modifier_mapping_cookie_t   cookie
   4477  ** @param xcb_generic_error_t                            **e
   4478  ** @returns xcb_input_get_device_modifier_mapping_reply_t *
   4479  **
   4480  *****************************************************************************/
   4481 
   4482 xcb_input_get_device_modifier_mapping_reply_t *
   4483 xcb_input_get_device_modifier_mapping_reply (xcb_connection_t                                *c  /**< */,
   4484                                              xcb_input_get_device_modifier_mapping_cookie_t   cookie  /**< */,
   4485                                              xcb_generic_error_t                            **e  /**< */)
   4486 {
   4487     return (xcb_input_get_device_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   4488 }
   4489 
   4490 int
   4491 xcb_input_set_device_modifier_mapping_sizeof (const void  *_buffer  /**< */)
   4492 {
   4493     char *xcb_tmp = (char *)_buffer;
   4494     const xcb_input_set_device_modifier_mapping_request_t *_aux = (xcb_input_set_device_modifier_mapping_request_t *)_buffer;
   4495     unsigned int xcb_buffer_len = 0;
   4496     unsigned int xcb_block_len = 0;
   4497     unsigned int xcb_pad = 0;
   4498     unsigned int xcb_align_to;
   4499 
   4500 
   4501     xcb_block_len += sizeof(xcb_input_set_device_modifier_mapping_request_t);
   4502     xcb_tmp += xcb_block_len;
   4503     /* keymaps */
   4504     xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(uint8_t);
   4505     xcb_tmp += xcb_block_len;
   4506     xcb_align_to = ALIGNOF(uint8_t);
   4507     /* insert padding */
   4508     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   4509     xcb_buffer_len += xcb_block_len + xcb_pad;
   4510     if (0 != xcb_pad) {
   4511         xcb_tmp += xcb_pad;
   4512         xcb_pad = 0;
   4513     }
   4514     xcb_block_len = 0;
   4515 
   4516     return xcb_buffer_len;
   4517 }
   4518 
   4519 
   4520 /*****************************************************************************
   4521  **
   4522  ** xcb_input_set_device_modifier_mapping_cookie_t xcb_input_set_device_modifier_mapping
   4523  **
   4524  ** @param xcb_connection_t *c
   4525  ** @param uint8_t           device_id
   4526  ** @param uint8_t           keycodes_per_modifier
   4527  ** @param const uint8_t    *keymaps
   4528  ** @returns xcb_input_set_device_modifier_mapping_cookie_t
   4529  **
   4530  *****************************************************************************/
   4531 
   4532 xcb_input_set_device_modifier_mapping_cookie_t
   4533 xcb_input_set_device_modifier_mapping (xcb_connection_t *c  /**< */,
   4534                                        uint8_t           device_id  /**< */,
   4535                                        uint8_t           keycodes_per_modifier  /**< */,
   4536                                        const uint8_t    *keymaps  /**< */)
   4537 {
   4538     static const xcb_protocol_request_t xcb_req = {
   4539         /* count */ 4,
   4540         /* ext */ &xcb_input_id,
   4541         /* opcode */ XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING,
   4542         /* isvoid */ 0
   4543     };
   4544 
   4545     struct iovec xcb_parts[6];
   4546     xcb_input_set_device_modifier_mapping_cookie_t xcb_ret;
   4547     xcb_input_set_device_modifier_mapping_request_t xcb_out;
   4548 
   4549     xcb_out.device_id = device_id;
   4550     xcb_out.keycodes_per_modifier = keycodes_per_modifier;
   4551     xcb_out.pad0 = 0;
   4552 
   4553     xcb_parts[2].iov_base = (char *) &xcb_out;
   4554     xcb_parts[2].iov_len = sizeof(xcb_out);
   4555     xcb_parts[3].iov_base = 0;
   4556     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4557     /* uint8_t keymaps */
   4558     xcb_parts[4].iov_base = (char *) keymaps;
   4559     xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t);
   4560     xcb_parts[5].iov_base = 0;
   4561     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   4562 
   4563     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4564     return xcb_ret;
   4565 }
   4566 
   4567 
   4568 /*****************************************************************************
   4569  **
   4570  ** xcb_input_set_device_modifier_mapping_cookie_t xcb_input_set_device_modifier_mapping_unchecked
   4571  **
   4572  ** @param xcb_connection_t *c
   4573  ** @param uint8_t           device_id
   4574  ** @param uint8_t           keycodes_per_modifier
   4575  ** @param const uint8_t    *keymaps
   4576  ** @returns xcb_input_set_device_modifier_mapping_cookie_t
   4577  **
   4578  *****************************************************************************/
   4579 
   4580 xcb_input_set_device_modifier_mapping_cookie_t
   4581 xcb_input_set_device_modifier_mapping_unchecked (xcb_connection_t *c  /**< */,
   4582                                                  uint8_t           device_id  /**< */,
   4583                                                  uint8_t           keycodes_per_modifier  /**< */,
   4584                                                  const uint8_t    *keymaps  /**< */)
   4585 {
   4586     static const xcb_protocol_request_t xcb_req = {
   4587         /* count */ 4,
   4588         /* ext */ &xcb_input_id,
   4589         /* opcode */ XCB_INPUT_SET_DEVICE_MODIFIER_MAPPING,
   4590         /* isvoid */ 0
   4591     };
   4592 
   4593     struct iovec xcb_parts[6];
   4594     xcb_input_set_device_modifier_mapping_cookie_t xcb_ret;
   4595     xcb_input_set_device_modifier_mapping_request_t xcb_out;
   4596 
   4597     xcb_out.device_id = device_id;
   4598     xcb_out.keycodes_per_modifier = keycodes_per_modifier;
   4599     xcb_out.pad0 = 0;
   4600 
   4601     xcb_parts[2].iov_base = (char *) &xcb_out;
   4602     xcb_parts[2].iov_len = sizeof(xcb_out);
   4603     xcb_parts[3].iov_base = 0;
   4604     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4605     /* uint8_t keymaps */
   4606     xcb_parts[4].iov_base = (char *) keymaps;
   4607     xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t);
   4608     xcb_parts[5].iov_base = 0;
   4609     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   4610 
   4611     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   4612     return xcb_ret;
   4613 }
   4614 
   4615 
   4616 /*****************************************************************************
   4617  **
   4618  ** xcb_input_set_device_modifier_mapping_reply_t * xcb_input_set_device_modifier_mapping_reply
   4619  **
   4620  ** @param xcb_connection_t                                *c
   4621  ** @param xcb_input_set_device_modifier_mapping_cookie_t   cookie
   4622  ** @param xcb_generic_error_t                            **e
   4623  ** @returns xcb_input_set_device_modifier_mapping_reply_t *
   4624  **
   4625  *****************************************************************************/
   4626 
   4627 xcb_input_set_device_modifier_mapping_reply_t *
   4628 xcb_input_set_device_modifier_mapping_reply (xcb_connection_t                                *c  /**< */,
   4629                                              xcb_input_set_device_modifier_mapping_cookie_t   cookie  /**< */,
   4630                                              xcb_generic_error_t                            **e  /**< */)
   4631 {
   4632     return (xcb_input_set_device_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   4633 }
   4634 
   4635 int
   4636 xcb_input_get_device_button_mapping_sizeof (const void  *_buffer  /**< */)
   4637 {
   4638     char *xcb_tmp = (char *)_buffer;
   4639     const xcb_input_get_device_button_mapping_reply_t *_aux = (xcb_input_get_device_button_mapping_reply_t *)_buffer;
   4640     unsigned int xcb_buffer_len = 0;
   4641     unsigned int xcb_block_len = 0;
   4642     unsigned int xcb_pad = 0;
   4643     unsigned int xcb_align_to;
   4644 
   4645 
   4646     xcb_block_len += sizeof(xcb_input_get_device_button_mapping_reply_t);
   4647     xcb_tmp += xcb_block_len;
   4648     /* map */
   4649     xcb_block_len += _aux->map_size * sizeof(uint8_t);
   4650     xcb_tmp += xcb_block_len;
   4651     xcb_align_to = ALIGNOF(uint8_t);
   4652     /* insert padding */
   4653     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   4654     xcb_buffer_len += xcb_block_len + xcb_pad;
   4655     if (0 != xcb_pad) {
   4656         xcb_tmp += xcb_pad;
   4657         xcb_pad = 0;
   4658     }
   4659     xcb_block_len = 0;
   4660 
   4661     return xcb_buffer_len;
   4662 }
   4663 
   4664 
   4665 /*****************************************************************************
   4666  **
   4667  ** xcb_input_get_device_button_mapping_cookie_t xcb_input_get_device_button_mapping
   4668  **
   4669  ** @param xcb_connection_t *c
   4670  ** @param uint8_t           device_id
   4671  ** @returns xcb_input_get_device_button_mapping_cookie_t
   4672  **
   4673  *****************************************************************************/
   4674 
   4675 xcb_input_get_device_button_mapping_cookie_t
   4676 xcb_input_get_device_button_mapping (xcb_connection_t *c  /**< */,
   4677                                      uint8_t           device_id  /**< */)
   4678 {
   4679     static const xcb_protocol_request_t xcb_req = {
   4680         /* count */ 2,
   4681         /* ext */ &xcb_input_id,
   4682         /* opcode */ XCB_INPUT_GET_DEVICE_BUTTON_MAPPING,
   4683         /* isvoid */ 0
   4684     };
   4685 
   4686     struct iovec xcb_parts[4];
   4687     xcb_input_get_device_button_mapping_cookie_t xcb_ret;
   4688     xcb_input_get_device_button_mapping_request_t xcb_out;
   4689 
   4690     xcb_out.device_id = device_id;
   4691     memset(xcb_out.pad0, 0, 3);
   4692 
   4693     xcb_parts[2].iov_base = (char *) &xcb_out;
   4694     xcb_parts[2].iov_len = sizeof(xcb_out);
   4695     xcb_parts[3].iov_base = 0;
   4696     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4697 
   4698     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4699     return xcb_ret;
   4700 }
   4701 
   4702 
   4703 /*****************************************************************************
   4704  **
   4705  ** xcb_input_get_device_button_mapping_cookie_t xcb_input_get_device_button_mapping_unchecked
   4706  **
   4707  ** @param xcb_connection_t *c
   4708  ** @param uint8_t           device_id
   4709  ** @returns xcb_input_get_device_button_mapping_cookie_t
   4710  **
   4711  *****************************************************************************/
   4712 
   4713 xcb_input_get_device_button_mapping_cookie_t
   4714 xcb_input_get_device_button_mapping_unchecked (xcb_connection_t *c  /**< */,
   4715                                                uint8_t           device_id  /**< */)
   4716 {
   4717     static const xcb_protocol_request_t xcb_req = {
   4718         /* count */ 2,
   4719         /* ext */ &xcb_input_id,
   4720         /* opcode */ XCB_INPUT_GET_DEVICE_BUTTON_MAPPING,
   4721         /* isvoid */ 0
   4722     };
   4723 
   4724     struct iovec xcb_parts[4];
   4725     xcb_input_get_device_button_mapping_cookie_t xcb_ret;
   4726     xcb_input_get_device_button_mapping_request_t xcb_out;
   4727 
   4728     xcb_out.device_id = device_id;
   4729     memset(xcb_out.pad0, 0, 3);
   4730 
   4731     xcb_parts[2].iov_base = (char *) &xcb_out;
   4732     xcb_parts[2].iov_len = sizeof(xcb_out);
   4733     xcb_parts[3].iov_base = 0;
   4734     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4735 
   4736     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   4737     return xcb_ret;
   4738 }
   4739 
   4740 
   4741 /*****************************************************************************
   4742  **
   4743  ** uint8_t * xcb_input_get_device_button_mapping_map
   4744  **
   4745  ** @param const xcb_input_get_device_button_mapping_reply_t *R
   4746  ** @returns uint8_t *
   4747  **
   4748  *****************************************************************************/
   4749 
   4750 uint8_t *
   4751 xcb_input_get_device_button_mapping_map (const xcb_input_get_device_button_mapping_reply_t *R  /**< */)
   4752 {
   4753     return (uint8_t *) (R + 1);
   4754 }
   4755 
   4756 
   4757 /*****************************************************************************
   4758  **
   4759  ** int xcb_input_get_device_button_mapping_map_length
   4760  **
   4761  ** @param const xcb_input_get_device_button_mapping_reply_t *R
   4762  ** @returns int
   4763  **
   4764  *****************************************************************************/
   4765 
   4766 int
   4767 xcb_input_get_device_button_mapping_map_length (const xcb_input_get_device_button_mapping_reply_t *R  /**< */)
   4768 {
   4769     return R->map_size;
   4770 }
   4771 
   4772 
   4773 /*****************************************************************************
   4774  **
   4775  ** xcb_generic_iterator_t xcb_input_get_device_button_mapping_map_end
   4776  **
   4777  ** @param const xcb_input_get_device_button_mapping_reply_t *R
   4778  ** @returns xcb_generic_iterator_t
   4779  **
   4780  *****************************************************************************/
   4781 
   4782 xcb_generic_iterator_t
   4783 xcb_input_get_device_button_mapping_map_end (const xcb_input_get_device_button_mapping_reply_t *R  /**< */)
   4784 {
   4785     xcb_generic_iterator_t i;
   4786     i.data = ((uint8_t *) (R + 1)) + (R->map_size);
   4787     i.rem = 0;
   4788     i.index = (char *) i.data - (char *) R;
   4789     return i;
   4790 }
   4791 
   4792 
   4793 /*****************************************************************************
   4794  **
   4795  ** xcb_input_get_device_button_mapping_reply_t * xcb_input_get_device_button_mapping_reply
   4796  **
   4797  ** @param xcb_connection_t                              *c
   4798  ** @param xcb_input_get_device_button_mapping_cookie_t   cookie
   4799  ** @param xcb_generic_error_t                          **e
   4800  ** @returns xcb_input_get_device_button_mapping_reply_t *
   4801  **
   4802  *****************************************************************************/
   4803 
   4804 xcb_input_get_device_button_mapping_reply_t *
   4805 xcb_input_get_device_button_mapping_reply (xcb_connection_t                              *c  /**< */,
   4806                                            xcb_input_get_device_button_mapping_cookie_t   cookie  /**< */,
   4807                                            xcb_generic_error_t                          **e  /**< */)
   4808 {
   4809     return (xcb_input_get_device_button_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   4810 }
   4811 
   4812 int
   4813 xcb_input_set_device_button_mapping_sizeof (const void  *_buffer  /**< */)
   4814 {
   4815     char *xcb_tmp = (char *)_buffer;
   4816     const xcb_input_set_device_button_mapping_request_t *_aux = (xcb_input_set_device_button_mapping_request_t *)_buffer;
   4817     unsigned int xcb_buffer_len = 0;
   4818     unsigned int xcb_block_len = 0;
   4819     unsigned int xcb_pad = 0;
   4820     unsigned int xcb_align_to;
   4821 
   4822 
   4823     xcb_block_len += sizeof(xcb_input_set_device_button_mapping_request_t);
   4824     xcb_tmp += xcb_block_len;
   4825     /* map */
   4826     xcb_block_len += _aux->map_size * sizeof(uint8_t);
   4827     xcb_tmp += xcb_block_len;
   4828     xcb_align_to = ALIGNOF(uint8_t);
   4829     /* insert padding */
   4830     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   4831     xcb_buffer_len += xcb_block_len + xcb_pad;
   4832     if (0 != xcb_pad) {
   4833         xcb_tmp += xcb_pad;
   4834         xcb_pad = 0;
   4835     }
   4836     xcb_block_len = 0;
   4837 
   4838     return xcb_buffer_len;
   4839 }
   4840 
   4841 
   4842 /*****************************************************************************
   4843  **
   4844  ** xcb_input_set_device_button_mapping_cookie_t xcb_input_set_device_button_mapping
   4845  **
   4846  ** @param xcb_connection_t *c
   4847  ** @param uint8_t           device_id
   4848  ** @param uint8_t           map_size
   4849  ** @param const uint8_t    *map
   4850  ** @returns xcb_input_set_device_button_mapping_cookie_t
   4851  **
   4852  *****************************************************************************/
   4853 
   4854 xcb_input_set_device_button_mapping_cookie_t
   4855 xcb_input_set_device_button_mapping (xcb_connection_t *c  /**< */,
   4856                                      uint8_t           device_id  /**< */,
   4857                                      uint8_t           map_size  /**< */,
   4858                                      const uint8_t    *map  /**< */)
   4859 {
   4860     static const xcb_protocol_request_t xcb_req = {
   4861         /* count */ 4,
   4862         /* ext */ &xcb_input_id,
   4863         /* opcode */ XCB_INPUT_SET_DEVICE_BUTTON_MAPPING,
   4864         /* isvoid */ 0
   4865     };
   4866 
   4867     struct iovec xcb_parts[6];
   4868     xcb_input_set_device_button_mapping_cookie_t xcb_ret;
   4869     xcb_input_set_device_button_mapping_request_t xcb_out;
   4870 
   4871     xcb_out.device_id = device_id;
   4872     xcb_out.map_size = map_size;
   4873     memset(xcb_out.pad0, 0, 2);
   4874 
   4875     xcb_parts[2].iov_base = (char *) &xcb_out;
   4876     xcb_parts[2].iov_len = sizeof(xcb_out);
   4877     xcb_parts[3].iov_base = 0;
   4878     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4879     /* uint8_t map */
   4880     xcb_parts[4].iov_base = (char *) map;
   4881     xcb_parts[4].iov_len = map_size * sizeof(uint8_t);
   4882     xcb_parts[5].iov_base = 0;
   4883     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   4884 
   4885     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4886     return xcb_ret;
   4887 }
   4888 
   4889 
   4890 /*****************************************************************************
   4891  **
   4892  ** xcb_input_set_device_button_mapping_cookie_t xcb_input_set_device_button_mapping_unchecked
   4893  **
   4894  ** @param xcb_connection_t *c
   4895  ** @param uint8_t           device_id
   4896  ** @param uint8_t           map_size
   4897  ** @param const uint8_t    *map
   4898  ** @returns xcb_input_set_device_button_mapping_cookie_t
   4899  **
   4900  *****************************************************************************/
   4901 
   4902 xcb_input_set_device_button_mapping_cookie_t
   4903 xcb_input_set_device_button_mapping_unchecked (xcb_connection_t *c  /**< */,
   4904                                                uint8_t           device_id  /**< */,
   4905                                                uint8_t           map_size  /**< */,
   4906                                                const uint8_t    *map  /**< */)
   4907 {
   4908     static const xcb_protocol_request_t xcb_req = {
   4909         /* count */ 4,
   4910         /* ext */ &xcb_input_id,
   4911         /* opcode */ XCB_INPUT_SET_DEVICE_BUTTON_MAPPING,
   4912         /* isvoid */ 0
   4913     };
   4914 
   4915     struct iovec xcb_parts[6];
   4916     xcb_input_set_device_button_mapping_cookie_t xcb_ret;
   4917     xcb_input_set_device_button_mapping_request_t xcb_out;
   4918 
   4919     xcb_out.device_id = device_id;
   4920     xcb_out.map_size = map_size;
   4921     memset(xcb_out.pad0, 0, 2);
   4922 
   4923     xcb_parts[2].iov_base = (char *) &xcb_out;
   4924     xcb_parts[2].iov_len = sizeof(xcb_out);
   4925     xcb_parts[3].iov_base = 0;
   4926     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4927     /* uint8_t map */
   4928     xcb_parts[4].iov_base = (char *) map;
   4929     xcb_parts[4].iov_len = map_size * sizeof(uint8_t);
   4930     xcb_parts[5].iov_base = 0;
   4931     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   4932 
   4933     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   4934     return xcb_ret;
   4935 }
   4936 
   4937 
   4938 /*****************************************************************************
   4939  **
   4940  ** xcb_input_set_device_button_mapping_reply_t * xcb_input_set_device_button_mapping_reply
   4941  **
   4942  ** @param xcb_connection_t                              *c
   4943  ** @param xcb_input_set_device_button_mapping_cookie_t   cookie
   4944  ** @param xcb_generic_error_t                          **e
   4945  ** @returns xcb_input_set_device_button_mapping_reply_t *
   4946  **
   4947  *****************************************************************************/
   4948 
   4949 xcb_input_set_device_button_mapping_reply_t *
   4950 xcb_input_set_device_button_mapping_reply (xcb_connection_t                              *c  /**< */,
   4951                                            xcb_input_set_device_button_mapping_cookie_t   cookie  /**< */,
   4952                                            xcb_generic_error_t                          **e  /**< */)
   4953 {
   4954     return (xcb_input_set_device_button_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   4955 }
   4956 
   4957 
   4958 /*****************************************************************************
   4959  **
   4960  ** xcb_input_query_device_state_cookie_t xcb_input_query_device_state
   4961  **
   4962  ** @param xcb_connection_t *c
   4963  ** @param uint8_t           device_id
   4964  ** @returns xcb_input_query_device_state_cookie_t
   4965  **
   4966  *****************************************************************************/
   4967 
   4968 xcb_input_query_device_state_cookie_t
   4969 xcb_input_query_device_state (xcb_connection_t *c  /**< */,
   4970                               uint8_t           device_id  /**< */)
   4971 {
   4972     static const xcb_protocol_request_t xcb_req = {
   4973         /* count */ 2,
   4974         /* ext */ &xcb_input_id,
   4975         /* opcode */ XCB_INPUT_QUERY_DEVICE_STATE,
   4976         /* isvoid */ 0
   4977     };
   4978 
   4979     struct iovec xcb_parts[4];
   4980     xcb_input_query_device_state_cookie_t xcb_ret;
   4981     xcb_input_query_device_state_request_t xcb_out;
   4982 
   4983     xcb_out.device_id = device_id;
   4984     memset(xcb_out.pad0, 0, 3);
   4985 
   4986     xcb_parts[2].iov_base = (char *) &xcb_out;
   4987     xcb_parts[2].iov_len = sizeof(xcb_out);
   4988     xcb_parts[3].iov_base = 0;
   4989     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   4990 
   4991     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   4992     return xcb_ret;
   4993 }
   4994 
   4995 
   4996 /*****************************************************************************
   4997  **
   4998  ** xcb_input_query_device_state_cookie_t xcb_input_query_device_state_unchecked
   4999  **
   5000  ** @param xcb_connection_t *c
   5001  ** @param uint8_t           device_id
   5002  ** @returns xcb_input_query_device_state_cookie_t
   5003  **
   5004  *****************************************************************************/
   5005 
   5006 xcb_input_query_device_state_cookie_t
   5007 xcb_input_query_device_state_unchecked (xcb_connection_t *c  /**< */,
   5008                                         uint8_t           device_id  /**< */)
   5009 {
   5010     static const xcb_protocol_request_t xcb_req = {
   5011         /* count */ 2,
   5012         /* ext */ &xcb_input_id,
   5013         /* opcode */ XCB_INPUT_QUERY_DEVICE_STATE,
   5014         /* isvoid */ 0
   5015     };
   5016 
   5017     struct iovec xcb_parts[4];
   5018     xcb_input_query_device_state_cookie_t xcb_ret;
   5019     xcb_input_query_device_state_request_t xcb_out;
   5020 
   5021     xcb_out.device_id = device_id;
   5022     memset(xcb_out.pad0, 0, 3);
   5023 
   5024     xcb_parts[2].iov_base = (char *) &xcb_out;
   5025     xcb_parts[2].iov_len = sizeof(xcb_out);
   5026     xcb_parts[3].iov_base = 0;
   5027     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5028 
   5029     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   5030     return xcb_ret;
   5031 }
   5032 
   5033 
   5034 /*****************************************************************************
   5035  **
   5036  ** xcb_input_query_device_state_reply_t * xcb_input_query_device_state_reply
   5037  **
   5038  ** @param xcb_connection_t                       *c
   5039  ** @param xcb_input_query_device_state_cookie_t   cookie
   5040  ** @param xcb_generic_error_t                   **e
   5041  ** @returns xcb_input_query_device_state_reply_t *
   5042  **
   5043  *****************************************************************************/
   5044 
   5045 xcb_input_query_device_state_reply_t *
   5046 xcb_input_query_device_state_reply (xcb_connection_t                       *c  /**< */,
   5047                                     xcb_input_query_device_state_cookie_t   cookie  /**< */,
   5048                                     xcb_generic_error_t                   **e  /**< */)
   5049 {
   5050     return (xcb_input_query_device_state_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   5051 }
   5052 
   5053 
   5054 /*****************************************************************************
   5055  **
   5056  ** void xcb_input_input_state_next
   5057  **
   5058  ** @param xcb_input_input_state_iterator_t *i
   5059  ** @returns void
   5060  **
   5061  *****************************************************************************/
   5062 
   5063 void
   5064 xcb_input_input_state_next (xcb_input_input_state_iterator_t *i  /**< */)
   5065 {
   5066     --i->rem;
   5067     ++i->data;
   5068     i->index += sizeof(xcb_input_input_state_t);
   5069 }
   5070 
   5071 
   5072 /*****************************************************************************
   5073  **
   5074  ** xcb_generic_iterator_t xcb_input_input_state_end
   5075  **
   5076  ** @param xcb_input_input_state_iterator_t i
   5077  ** @returns xcb_generic_iterator_t
   5078  **
   5079  *****************************************************************************/
   5080 
   5081 xcb_generic_iterator_t
   5082 xcb_input_input_state_end (xcb_input_input_state_iterator_t i  /**< */)
   5083 {
   5084     xcb_generic_iterator_t ret;
   5085     ret.data = i.data + i.rem;
   5086     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   5087     ret.rem = 0;
   5088     return ret;
   5089 }
   5090 
   5091 
   5092 /*****************************************************************************
   5093  **
   5094  ** void xcb_input_key_state_next
   5095  **
   5096  ** @param xcb_input_key_state_iterator_t *i
   5097  ** @returns void
   5098  **
   5099  *****************************************************************************/
   5100 
   5101 void
   5102 xcb_input_key_state_next (xcb_input_key_state_iterator_t *i  /**< */)
   5103 {
   5104     --i->rem;
   5105     ++i->data;
   5106     i->index += sizeof(xcb_input_key_state_t);
   5107 }
   5108 
   5109 
   5110 /*****************************************************************************
   5111  **
   5112  ** xcb_generic_iterator_t xcb_input_key_state_end
   5113  **
   5114  ** @param xcb_input_key_state_iterator_t i
   5115  ** @returns xcb_generic_iterator_t
   5116  **
   5117  *****************************************************************************/
   5118 
   5119 xcb_generic_iterator_t
   5120 xcb_input_key_state_end (xcb_input_key_state_iterator_t i  /**< */)
   5121 {
   5122     xcb_generic_iterator_t ret;
   5123     ret.data = i.data + i.rem;
   5124     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   5125     ret.rem = 0;
   5126     return ret;
   5127 }
   5128 
   5129 
   5130 /*****************************************************************************
   5131  **
   5132  ** void xcb_input_button_state_next
   5133  **
   5134  ** @param xcb_input_button_state_iterator_t *i
   5135  ** @returns void
   5136  **
   5137  *****************************************************************************/
   5138 
   5139 void
   5140 xcb_input_button_state_next (xcb_input_button_state_iterator_t *i  /**< */)
   5141 {
   5142     --i->rem;
   5143     ++i->data;
   5144     i->index += sizeof(xcb_input_button_state_t);
   5145 }
   5146 
   5147 
   5148 /*****************************************************************************
   5149  **
   5150  ** xcb_generic_iterator_t xcb_input_button_state_end
   5151  **
   5152  ** @param xcb_input_button_state_iterator_t i
   5153  ** @returns xcb_generic_iterator_t
   5154  **
   5155  *****************************************************************************/
   5156 
   5157 xcb_generic_iterator_t
   5158 xcb_input_button_state_end (xcb_input_button_state_iterator_t i  /**< */)
   5159 {
   5160     xcb_generic_iterator_t ret;
   5161     ret.data = i.data + i.rem;
   5162     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   5163     ret.rem = 0;
   5164     return ret;
   5165 }
   5166 
   5167 int
   5168 xcb_input_valuator_state_sizeof (const void  *_buffer  /**< */)
   5169 {
   5170     char *xcb_tmp = (char *)_buffer;
   5171     const xcb_input_valuator_state_t *_aux = (xcb_input_valuator_state_t *)_buffer;
   5172     unsigned int xcb_buffer_len = 0;
   5173     unsigned int xcb_block_len = 0;
   5174     unsigned int xcb_pad = 0;
   5175     unsigned int xcb_align_to;
   5176 
   5177 
   5178     xcb_block_len += sizeof(xcb_input_valuator_state_t);
   5179     xcb_tmp += xcb_block_len;
   5180     /* valuators */
   5181     xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
   5182     xcb_tmp += xcb_block_len;
   5183     xcb_align_to = ALIGNOF(uint32_t);
   5184     /* insert padding */
   5185     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5186     xcb_buffer_len += xcb_block_len + xcb_pad;
   5187     if (0 != xcb_pad) {
   5188         xcb_tmp += xcb_pad;
   5189         xcb_pad = 0;
   5190     }
   5191     xcb_block_len = 0;
   5192 
   5193     return xcb_buffer_len;
   5194 }
   5195 
   5196 
   5197 /*****************************************************************************
   5198  **
   5199  ** uint32_t * xcb_input_valuator_state_valuators
   5200  **
   5201  ** @param const xcb_input_valuator_state_t *R
   5202  ** @returns uint32_t *
   5203  **
   5204  *****************************************************************************/
   5205 
   5206 uint32_t *
   5207 xcb_input_valuator_state_valuators (const xcb_input_valuator_state_t *R  /**< */)
   5208 {
   5209     return (uint32_t *) (R + 1);
   5210 }
   5211 
   5212 
   5213 /*****************************************************************************
   5214  **
   5215  ** int xcb_input_valuator_state_valuators_length
   5216  **
   5217  ** @param const xcb_input_valuator_state_t *R
   5218  ** @returns int
   5219  **
   5220  *****************************************************************************/
   5221 
   5222 int
   5223 xcb_input_valuator_state_valuators_length (const xcb_input_valuator_state_t *R  /**< */)
   5224 {
   5225     return R->num_valuators;
   5226 }
   5227 
   5228 
   5229 /*****************************************************************************
   5230  **
   5231  ** xcb_generic_iterator_t xcb_input_valuator_state_valuators_end
   5232  **
   5233  ** @param const xcb_input_valuator_state_t *R
   5234  ** @returns xcb_generic_iterator_t
   5235  **
   5236  *****************************************************************************/
   5237 
   5238 xcb_generic_iterator_t
   5239 xcb_input_valuator_state_valuators_end (const xcb_input_valuator_state_t *R  /**< */)
   5240 {
   5241     xcb_generic_iterator_t i;
   5242     i.data = ((uint32_t *) (R + 1)) + (R->num_valuators);
   5243     i.rem = 0;
   5244     i.index = (char *) i.data - (char *) R;
   5245     return i;
   5246 }
   5247 
   5248 
   5249 /*****************************************************************************
   5250  **
   5251  ** void xcb_input_valuator_state_next
   5252  **
   5253  ** @param xcb_input_valuator_state_iterator_t *i
   5254  ** @returns void
   5255  **
   5256  *****************************************************************************/
   5257 
   5258 void
   5259 xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i  /**< */)
   5260 {
   5261     xcb_input_valuator_state_t *R = i->data;
   5262     xcb_generic_iterator_t child;
   5263     child.data = (xcb_input_valuator_state_t *)(((char *)R) + xcb_input_valuator_state_sizeof(R));
   5264     i->index = (char *) child.data - (char *) i->data;
   5265     --i->rem;
   5266     i->data = (xcb_input_valuator_state_t *) child.data;
   5267 }
   5268 
   5269 
   5270 /*****************************************************************************
   5271  **
   5272  ** xcb_generic_iterator_t xcb_input_valuator_state_end
   5273  **
   5274  ** @param xcb_input_valuator_state_iterator_t i
   5275  ** @returns xcb_generic_iterator_t
   5276  **
   5277  *****************************************************************************/
   5278 
   5279 xcb_generic_iterator_t
   5280 xcb_input_valuator_state_end (xcb_input_valuator_state_iterator_t i  /**< */)
   5281 {
   5282     xcb_generic_iterator_t ret;
   5283     while(i.rem > 0)
   5284         xcb_input_valuator_state_next(&i);
   5285     ret.data = i.data;
   5286     ret.rem = i.rem;
   5287     ret.index = i.index;
   5288     return ret;
   5289 }
   5290 
   5291 int
   5292 xcb_input_send_extension_event_sizeof (const void  *_buffer  /**< */)
   5293 {
   5294     char *xcb_tmp = (char *)_buffer;
   5295     const xcb_input_send_extension_event_request_t *_aux = (xcb_input_send_extension_event_request_t *)_buffer;
   5296     unsigned int xcb_buffer_len = 0;
   5297     unsigned int xcb_block_len = 0;
   5298     unsigned int xcb_pad = 0;
   5299     unsigned int xcb_align_to;
   5300 
   5301 
   5302     xcb_block_len += sizeof(xcb_input_send_extension_event_request_t);
   5303     xcb_tmp += xcb_block_len;
   5304     /* events */
   5305     xcb_block_len += (_aux->num_events * 32) * sizeof(char);
   5306     xcb_tmp += xcb_block_len;
   5307     xcb_align_to = ALIGNOF(char);
   5308     /* insert padding */
   5309     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5310     xcb_buffer_len += xcb_block_len + xcb_pad;
   5311     if (0 != xcb_pad) {
   5312         xcb_tmp += xcb_pad;
   5313         xcb_pad = 0;
   5314     }
   5315     xcb_block_len = 0;
   5316     /* classes */
   5317     xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t);
   5318     xcb_tmp += xcb_block_len;
   5319     xcb_align_to = ALIGNOF(xcb_input_event_class_t);
   5320     /* insert padding */
   5321     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5322     xcb_buffer_len += xcb_block_len + xcb_pad;
   5323     if (0 != xcb_pad) {
   5324         xcb_tmp += xcb_pad;
   5325         xcb_pad = 0;
   5326     }
   5327     xcb_block_len = 0;
   5328 
   5329     return xcb_buffer_len;
   5330 }
   5331 
   5332 
   5333 /*****************************************************************************
   5334  **
   5335  ** xcb_void_cookie_t xcb_input_send_extension_event_checked
   5336  **
   5337  ** @param xcb_connection_t              *c
   5338  ** @param xcb_window_t                   destination
   5339  ** @param uint8_t                        device_id
   5340  ** @param uint8_t                        propagate
   5341  ** @param uint16_t                       num_classes
   5342  ** @param uint8_t                        num_events
   5343  ** @param const char                    *events
   5344  ** @param const xcb_input_event_class_t *classes
   5345  ** @returns xcb_void_cookie_t
   5346  **
   5347  *****************************************************************************/
   5348 
   5349 xcb_void_cookie_t
   5350 xcb_input_send_extension_event_checked (xcb_connection_t              *c  /**< */,
   5351                                         xcb_window_t                   destination  /**< */,
   5352                                         uint8_t                        device_id  /**< */,
   5353                                         uint8_t                        propagate  /**< */,
   5354                                         uint16_t                       num_classes  /**< */,
   5355                                         uint8_t                        num_events  /**< */,
   5356                                         const char                    *events  /**< */,
   5357                                         const xcb_input_event_class_t *classes  /**< */)
   5358 {
   5359     static const xcb_protocol_request_t xcb_req = {
   5360         /* count */ 6,
   5361         /* ext */ &xcb_input_id,
   5362         /* opcode */ XCB_INPUT_SEND_EXTENSION_EVENT,
   5363         /* isvoid */ 1
   5364     };
   5365 
   5366     struct iovec xcb_parts[8];
   5367     xcb_void_cookie_t xcb_ret;
   5368     xcb_input_send_extension_event_request_t xcb_out;
   5369 
   5370     xcb_out.destination = destination;
   5371     xcb_out.device_id = device_id;
   5372     xcb_out.propagate = propagate;
   5373     xcb_out.num_classes = num_classes;
   5374     xcb_out.num_events = num_events;
   5375     memset(xcb_out.pad0, 0, 3);
   5376 
   5377     xcb_parts[2].iov_base = (char *) &xcb_out;
   5378     xcb_parts[2].iov_len = sizeof(xcb_out);
   5379     xcb_parts[3].iov_base = 0;
   5380     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5381     /* char events */
   5382     xcb_parts[4].iov_base = (char *) events;
   5383     xcb_parts[4].iov_len = (num_events * 32) * sizeof(char);
   5384     xcb_parts[5].iov_base = 0;
   5385     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   5386     /* xcb_input_event_class_t classes */
   5387     xcb_parts[6].iov_base = (char *) classes;
   5388     xcb_parts[6].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   5389     xcb_parts[7].iov_base = 0;
   5390     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
   5391 
   5392     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   5393     return xcb_ret;
   5394 }
   5395 
   5396 
   5397 /*****************************************************************************
   5398  **
   5399  ** xcb_void_cookie_t xcb_input_send_extension_event
   5400  **
   5401  ** @param xcb_connection_t              *c
   5402  ** @param xcb_window_t                   destination
   5403  ** @param uint8_t                        device_id
   5404  ** @param uint8_t                        propagate
   5405  ** @param uint16_t                       num_classes
   5406  ** @param uint8_t                        num_events
   5407  ** @param const char                    *events
   5408  ** @param const xcb_input_event_class_t *classes
   5409  ** @returns xcb_void_cookie_t
   5410  **
   5411  *****************************************************************************/
   5412 
   5413 xcb_void_cookie_t
   5414 xcb_input_send_extension_event (xcb_connection_t              *c  /**< */,
   5415                                 xcb_window_t                   destination  /**< */,
   5416                                 uint8_t                        device_id  /**< */,
   5417                                 uint8_t                        propagate  /**< */,
   5418                                 uint16_t                       num_classes  /**< */,
   5419                                 uint8_t                        num_events  /**< */,
   5420                                 const char                    *events  /**< */,
   5421                                 const xcb_input_event_class_t *classes  /**< */)
   5422 {
   5423     static const xcb_protocol_request_t xcb_req = {
   5424         /* count */ 6,
   5425         /* ext */ &xcb_input_id,
   5426         /* opcode */ XCB_INPUT_SEND_EXTENSION_EVENT,
   5427         /* isvoid */ 1
   5428     };
   5429 
   5430     struct iovec xcb_parts[8];
   5431     xcb_void_cookie_t xcb_ret;
   5432     xcb_input_send_extension_event_request_t xcb_out;
   5433 
   5434     xcb_out.destination = destination;
   5435     xcb_out.device_id = device_id;
   5436     xcb_out.propagate = propagate;
   5437     xcb_out.num_classes = num_classes;
   5438     xcb_out.num_events = num_events;
   5439     memset(xcb_out.pad0, 0, 3);
   5440 
   5441     xcb_parts[2].iov_base = (char *) &xcb_out;
   5442     xcb_parts[2].iov_len = sizeof(xcb_out);
   5443     xcb_parts[3].iov_base = 0;
   5444     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5445     /* char events */
   5446     xcb_parts[4].iov_base = (char *) events;
   5447     xcb_parts[4].iov_len = (num_events * 32) * sizeof(char);
   5448     xcb_parts[5].iov_base = 0;
   5449     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   5450     /* xcb_input_event_class_t classes */
   5451     xcb_parts[6].iov_base = (char *) classes;
   5452     xcb_parts[6].iov_len = num_classes * sizeof(xcb_input_event_class_t);
   5453     xcb_parts[7].iov_base = 0;
   5454     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
   5455 
   5456     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   5457     return xcb_ret;
   5458 }
   5459 
   5460 
   5461 /*****************************************************************************
   5462  **
   5463  ** xcb_void_cookie_t xcb_input_device_bell_checked
   5464  **
   5465  ** @param xcb_connection_t *c
   5466  ** @param uint8_t           device_id
   5467  ** @param uint8_t           feedback_id
   5468  ** @param uint8_t           feedback_class
   5469  ** @param int8_t            percent
   5470  ** @returns xcb_void_cookie_t
   5471  **
   5472  *****************************************************************************/
   5473 
   5474 xcb_void_cookie_t
   5475 xcb_input_device_bell_checked (xcb_connection_t *c  /**< */,
   5476                                uint8_t           device_id  /**< */,
   5477                                uint8_t           feedback_id  /**< */,
   5478                                uint8_t           feedback_class  /**< */,
   5479                                int8_t            percent  /**< */)
   5480 {
   5481     static const xcb_protocol_request_t xcb_req = {
   5482         /* count */ 2,
   5483         /* ext */ &xcb_input_id,
   5484         /* opcode */ XCB_INPUT_DEVICE_BELL,
   5485         /* isvoid */ 1
   5486     };
   5487 
   5488     struct iovec xcb_parts[4];
   5489     xcb_void_cookie_t xcb_ret;
   5490     xcb_input_device_bell_request_t xcb_out;
   5491 
   5492     xcb_out.device_id = device_id;
   5493     xcb_out.feedback_id = feedback_id;
   5494     xcb_out.feedback_class = feedback_class;
   5495     xcb_out.percent = percent;
   5496 
   5497     xcb_parts[2].iov_base = (char *) &xcb_out;
   5498     xcb_parts[2].iov_len = sizeof(xcb_out);
   5499     xcb_parts[3].iov_base = 0;
   5500     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5501 
   5502     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   5503     return xcb_ret;
   5504 }
   5505 
   5506 
   5507 /*****************************************************************************
   5508  **
   5509  ** xcb_void_cookie_t xcb_input_device_bell
   5510  **
   5511  ** @param xcb_connection_t *c
   5512  ** @param uint8_t           device_id
   5513  ** @param uint8_t           feedback_id
   5514  ** @param uint8_t           feedback_class
   5515  ** @param int8_t            percent
   5516  ** @returns xcb_void_cookie_t
   5517  **
   5518  *****************************************************************************/
   5519 
   5520 xcb_void_cookie_t
   5521 xcb_input_device_bell (xcb_connection_t *c  /**< */,
   5522                        uint8_t           device_id  /**< */,
   5523                        uint8_t           feedback_id  /**< */,
   5524                        uint8_t           feedback_class  /**< */,
   5525                        int8_t            percent  /**< */)
   5526 {
   5527     static const xcb_protocol_request_t xcb_req = {
   5528         /* count */ 2,
   5529         /* ext */ &xcb_input_id,
   5530         /* opcode */ XCB_INPUT_DEVICE_BELL,
   5531         /* isvoid */ 1
   5532     };
   5533 
   5534     struct iovec xcb_parts[4];
   5535     xcb_void_cookie_t xcb_ret;
   5536     xcb_input_device_bell_request_t xcb_out;
   5537 
   5538     xcb_out.device_id = device_id;
   5539     xcb_out.feedback_id = feedback_id;
   5540     xcb_out.feedback_class = feedback_class;
   5541     xcb_out.percent = percent;
   5542 
   5543     xcb_parts[2].iov_base = (char *) &xcb_out;
   5544     xcb_parts[2].iov_len = sizeof(xcb_out);
   5545     xcb_parts[3].iov_base = 0;
   5546     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5547 
   5548     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   5549     return xcb_ret;
   5550 }
   5551 
   5552 int
   5553 xcb_input_set_device_valuators_sizeof (const void  *_buffer  /**< */)
   5554 {
   5555     char *xcb_tmp = (char *)_buffer;
   5556     const xcb_input_set_device_valuators_request_t *_aux = (xcb_input_set_device_valuators_request_t *)_buffer;
   5557     unsigned int xcb_buffer_len = 0;
   5558     unsigned int xcb_block_len = 0;
   5559     unsigned int xcb_pad = 0;
   5560     unsigned int xcb_align_to;
   5561 
   5562 
   5563     xcb_block_len += sizeof(xcb_input_set_device_valuators_request_t);
   5564     xcb_tmp += xcb_block_len;
   5565     /* valuators */
   5566     xcb_block_len += _aux->num_valuators * sizeof(int32_t);
   5567     xcb_tmp += xcb_block_len;
   5568     xcb_align_to = ALIGNOF(int32_t);
   5569     /* insert padding */
   5570     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5571     xcb_buffer_len += xcb_block_len + xcb_pad;
   5572     if (0 != xcb_pad) {
   5573         xcb_tmp += xcb_pad;
   5574         xcb_pad = 0;
   5575     }
   5576     xcb_block_len = 0;
   5577 
   5578     return xcb_buffer_len;
   5579 }
   5580 
   5581 
   5582 /*****************************************************************************
   5583  **
   5584  ** xcb_input_set_device_valuators_cookie_t xcb_input_set_device_valuators
   5585  **
   5586  ** @param xcb_connection_t *c
   5587  ** @param uint8_t           device_id
   5588  ** @param uint8_t           first_valuator
   5589  ** @param uint8_t           num_valuators
   5590  ** @param const int32_t    *valuators
   5591  ** @returns xcb_input_set_device_valuators_cookie_t
   5592  **
   5593  *****************************************************************************/
   5594 
   5595 xcb_input_set_device_valuators_cookie_t
   5596 xcb_input_set_device_valuators (xcb_connection_t *c  /**< */,
   5597                                 uint8_t           device_id  /**< */,
   5598                                 uint8_t           first_valuator  /**< */,
   5599                                 uint8_t           num_valuators  /**< */,
   5600                                 const int32_t    *valuators  /**< */)
   5601 {
   5602     static const xcb_protocol_request_t xcb_req = {
   5603         /* count */ 4,
   5604         /* ext */ &xcb_input_id,
   5605         /* opcode */ XCB_INPUT_SET_DEVICE_VALUATORS,
   5606         /* isvoid */ 0
   5607     };
   5608 
   5609     struct iovec xcb_parts[6];
   5610     xcb_input_set_device_valuators_cookie_t xcb_ret;
   5611     xcb_input_set_device_valuators_request_t xcb_out;
   5612 
   5613     xcb_out.device_id = device_id;
   5614     xcb_out.first_valuator = first_valuator;
   5615     xcb_out.num_valuators = num_valuators;
   5616     xcb_out.pad0 = 0;
   5617 
   5618     xcb_parts[2].iov_base = (char *) &xcb_out;
   5619     xcb_parts[2].iov_len = sizeof(xcb_out);
   5620     xcb_parts[3].iov_base = 0;
   5621     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5622     /* int32_t valuators */
   5623     xcb_parts[4].iov_base = (char *) valuators;
   5624     xcb_parts[4].iov_len = num_valuators * sizeof(int32_t);
   5625     xcb_parts[5].iov_base = 0;
   5626     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   5627 
   5628     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   5629     return xcb_ret;
   5630 }
   5631 
   5632 
   5633 /*****************************************************************************
   5634  **
   5635  ** xcb_input_set_device_valuators_cookie_t xcb_input_set_device_valuators_unchecked
   5636  **
   5637  ** @param xcb_connection_t *c
   5638  ** @param uint8_t           device_id
   5639  ** @param uint8_t           first_valuator
   5640  ** @param uint8_t           num_valuators
   5641  ** @param const int32_t    *valuators
   5642  ** @returns xcb_input_set_device_valuators_cookie_t
   5643  **
   5644  *****************************************************************************/
   5645 
   5646 xcb_input_set_device_valuators_cookie_t
   5647 xcb_input_set_device_valuators_unchecked (xcb_connection_t *c  /**< */,
   5648                                           uint8_t           device_id  /**< */,
   5649                                           uint8_t           first_valuator  /**< */,
   5650                                           uint8_t           num_valuators  /**< */,
   5651                                           const int32_t    *valuators  /**< */)
   5652 {
   5653     static const xcb_protocol_request_t xcb_req = {
   5654         /* count */ 4,
   5655         /* ext */ &xcb_input_id,
   5656         /* opcode */ XCB_INPUT_SET_DEVICE_VALUATORS,
   5657         /* isvoid */ 0
   5658     };
   5659 
   5660     struct iovec xcb_parts[6];
   5661     xcb_input_set_device_valuators_cookie_t xcb_ret;
   5662     xcb_input_set_device_valuators_request_t xcb_out;
   5663 
   5664     xcb_out.device_id = device_id;
   5665     xcb_out.first_valuator = first_valuator;
   5666     xcb_out.num_valuators = num_valuators;
   5667     xcb_out.pad0 = 0;
   5668 
   5669     xcb_parts[2].iov_base = (char *) &xcb_out;
   5670     xcb_parts[2].iov_len = sizeof(xcb_out);
   5671     xcb_parts[3].iov_base = 0;
   5672     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5673     /* int32_t valuators */
   5674     xcb_parts[4].iov_base = (char *) valuators;
   5675     xcb_parts[4].iov_len = num_valuators * sizeof(int32_t);
   5676     xcb_parts[5].iov_base = 0;
   5677     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
   5678 
   5679     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   5680     return xcb_ret;
   5681 }
   5682 
   5683 
   5684 /*****************************************************************************
   5685  **
   5686  ** xcb_input_set_device_valuators_reply_t * xcb_input_set_device_valuators_reply
   5687  **
   5688  ** @param xcb_connection_t                         *c
   5689  ** @param xcb_input_set_device_valuators_cookie_t   cookie
   5690  ** @param xcb_generic_error_t                     **e
   5691  ** @returns xcb_input_set_device_valuators_reply_t *
   5692  **
   5693  *****************************************************************************/
   5694 
   5695 xcb_input_set_device_valuators_reply_t *
   5696 xcb_input_set_device_valuators_reply (xcb_connection_t                         *c  /**< */,
   5697                                       xcb_input_set_device_valuators_cookie_t   cookie  /**< */,
   5698                                       xcb_generic_error_t                     **e  /**< */)
   5699 {
   5700     return (xcb_input_set_device_valuators_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   5701 }
   5702 
   5703 
   5704 /*****************************************************************************
   5705  **
   5706  ** xcb_input_get_device_control_cookie_t xcb_input_get_device_control
   5707  **
   5708  ** @param xcb_connection_t *c
   5709  ** @param uint16_t          control_id
   5710  ** @param uint8_t           device_id
   5711  ** @returns xcb_input_get_device_control_cookie_t
   5712  **
   5713  *****************************************************************************/
   5714 
   5715 xcb_input_get_device_control_cookie_t
   5716 xcb_input_get_device_control (xcb_connection_t *c  /**< */,
   5717                               uint16_t          control_id  /**< */,
   5718                               uint8_t           device_id  /**< */)
   5719 {
   5720     static const xcb_protocol_request_t xcb_req = {
   5721         /* count */ 2,
   5722         /* ext */ &xcb_input_id,
   5723         /* opcode */ XCB_INPUT_GET_DEVICE_CONTROL,
   5724         /* isvoid */ 0
   5725     };
   5726 
   5727     struct iovec xcb_parts[4];
   5728     xcb_input_get_device_control_cookie_t xcb_ret;
   5729     xcb_input_get_device_control_request_t xcb_out;
   5730 
   5731     xcb_out.control_id = control_id;
   5732     xcb_out.device_id = device_id;
   5733     xcb_out.pad0 = 0;
   5734 
   5735     xcb_parts[2].iov_base = (char *) &xcb_out;
   5736     xcb_parts[2].iov_len = sizeof(xcb_out);
   5737     xcb_parts[3].iov_base = 0;
   5738     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5739 
   5740     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
   5741     return xcb_ret;
   5742 }
   5743 
   5744 
   5745 /*****************************************************************************
   5746  **
   5747  ** xcb_input_get_device_control_cookie_t xcb_input_get_device_control_unchecked
   5748  **
   5749  ** @param xcb_connection_t *c
   5750  ** @param uint16_t          control_id
   5751  ** @param uint8_t           device_id
   5752  ** @returns xcb_input_get_device_control_cookie_t
   5753  **
   5754  *****************************************************************************/
   5755 
   5756 xcb_input_get_device_control_cookie_t
   5757 xcb_input_get_device_control_unchecked (xcb_connection_t *c  /**< */,
   5758                                         uint16_t          control_id  /**< */,
   5759                                         uint8_t           device_id  /**< */)
   5760 {
   5761     static const xcb_protocol_request_t xcb_req = {
   5762         /* count */ 2,
   5763         /* ext */ &xcb_input_id,
   5764         /* opcode */ XCB_INPUT_GET_DEVICE_CONTROL,
   5765         /* isvoid */ 0
   5766     };
   5767 
   5768     struct iovec xcb_parts[4];
   5769     xcb_input_get_device_control_cookie_t xcb_ret;
   5770     xcb_input_get_device_control_request_t xcb_out;
   5771 
   5772     xcb_out.control_id = control_id;
   5773     xcb_out.device_id = device_id;
   5774     xcb_out.pad0 = 0;
   5775 
   5776     xcb_parts[2].iov_base = (char *) &xcb_out;
   5777     xcb_parts[2].iov_len = sizeof(xcb_out);
   5778     xcb_parts[3].iov_base = 0;
   5779     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
   5780 
   5781     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
   5782     return xcb_ret;
   5783 }
   5784 
   5785 
   5786 /*****************************************************************************
   5787  **
   5788  ** xcb_input_get_device_control_reply_t * xcb_input_get_device_control_reply
   5789  **
   5790  ** @param xcb_connection_t                       *c
   5791  ** @param xcb_input_get_device_control_cookie_t   cookie
   5792  ** @param xcb_generic_error_t                   **e
   5793  ** @returns xcb_input_get_device_control_reply_t *
   5794  **
   5795  *****************************************************************************/
   5796 
   5797 xcb_input_get_device_control_reply_t *
   5798 xcb_input_get_device_control_reply (xcb_connection_t                       *c  /**< */,
   5799                                     xcb_input_get_device_control_cookie_t   cookie  /**< */,
   5800                                     xcb_generic_error_t                   **e  /**< */)
   5801 {
   5802     return (xcb_input_get_device_control_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
   5803 }
   5804 
   5805 
   5806 /*****************************************************************************
   5807  **
   5808  ** void xcb_input_device_state_next
   5809  **
   5810  ** @param xcb_input_device_state_iterator_t *i
   5811  ** @returns void
   5812  **
   5813  *****************************************************************************/
   5814 
   5815 void
   5816 xcb_input_device_state_next (xcb_input_device_state_iterator_t *i  /**< */)
   5817 {
   5818     --i->rem;
   5819     ++i->data;
   5820     i->index += sizeof(xcb_input_device_state_t);
   5821 }
   5822 
   5823 
   5824 /*****************************************************************************
   5825  **
   5826  ** xcb_generic_iterator_t xcb_input_device_state_end
   5827  **
   5828  ** @param xcb_input_device_state_iterator_t i
   5829  ** @returns xcb_generic_iterator_t
   5830  **
   5831  *****************************************************************************/
   5832 
   5833 xcb_generic_iterator_t
   5834 xcb_input_device_state_end (xcb_input_device_state_iterator_t i  /**< */)
   5835 {
   5836     xcb_generic_iterator_t ret;
   5837     ret.data = i.data + i.rem;
   5838     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   5839     ret.rem = 0;
   5840     return ret;
   5841 }
   5842 
   5843 int
   5844 xcb_input_device_resolution_state_sizeof (const void  *_buffer  /**< */)
   5845 {
   5846     char *xcb_tmp = (char *)_buffer;
   5847     const xcb_input_device_resolution_state_t *_aux = (xcb_input_device_resolution_state_t *)_buffer;
   5848     unsigned int xcb_buffer_len = 0;
   5849     unsigned int xcb_block_len = 0;
   5850     unsigned int xcb_pad = 0;
   5851     unsigned int xcb_align_to;
   5852 
   5853 
   5854     xcb_block_len += sizeof(xcb_input_device_resolution_state_t);
   5855     xcb_tmp += xcb_block_len;
   5856     /* resolution_values */
   5857     xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
   5858     xcb_tmp += xcb_block_len;
   5859     xcb_align_to = ALIGNOF(uint32_t);
   5860     /* insert padding */
   5861     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5862     xcb_buffer_len += xcb_block_len + xcb_pad;
   5863     if (0 != xcb_pad) {
   5864         xcb_tmp += xcb_pad;
   5865         xcb_pad = 0;
   5866     }
   5867     xcb_block_len = 0;
   5868     /* resolution_min */
   5869     xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
   5870     xcb_tmp += xcb_block_len;
   5871     xcb_align_to = ALIGNOF(uint32_t);
   5872     /* insert padding */
   5873     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5874     xcb_buffer_len += xcb_block_len + xcb_pad;
   5875     if (0 != xcb_pad) {
   5876         xcb_tmp += xcb_pad;
   5877         xcb_pad = 0;
   5878     }
   5879     xcb_block_len = 0;
   5880     /* resolution_max */
   5881     xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
   5882     xcb_tmp += xcb_block_len;
   5883     xcb_align_to = ALIGNOF(uint32_t);
   5884     /* insert padding */
   5885     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   5886     xcb_buffer_len += xcb_block_len + xcb_pad;
   5887     if (0 != xcb_pad) {
   5888         xcb_tmp += xcb_pad;
   5889         xcb_pad = 0;
   5890     }
   5891     xcb_block_len = 0;
   5892 
   5893     return xcb_buffer_len;
   5894 }
   5895 
   5896 
   5897 /*****************************************************************************
   5898  **
   5899  ** uint32_t * xcb_input_device_resolution_state_resolution_values
   5900  **
   5901  ** @param const xcb_input_device_resolution_state_t *R
   5902  ** @returns uint32_t *
   5903  **
   5904  *****************************************************************************/
   5905 
   5906 uint32_t *
   5907 xcb_input_device_resolution_state_resolution_values (const xcb_input_device_resolution_state_t *R  /**< */)
   5908 {
   5909     return (uint32_t *) (R + 1);
   5910 }
   5911 
   5912 
   5913 /*****************************************************************************
   5914  **
   5915  ** int xcb_input_device_resolution_state_resolution_values_length
   5916  **
   5917  ** @param const xcb_input_device_resolution_state_t *R
   5918  ** @returns int
   5919  **
   5920  *****************************************************************************/
   5921 
   5922 int
   5923 xcb_input_device_resolution_state_resolution_values_length (const xcb_input_device_resolution_state_t *R  /**< */)
   5924 {
   5925     return R->num_valuators;
   5926 }
   5927 
   5928 
   5929 /*****************************************************************************
   5930  **
   5931  ** xcb_generic_iterator_t xcb_input_device_resolution_state_resolution_values_end
   5932  **
   5933  ** @param const xcb_input_device_resolution_state_t *R
   5934  ** @returns xcb_generic_iterator_t
   5935  **
   5936  *****************************************************************************/
   5937 
   5938 xcb_generic_iterator_t
   5939 xcb_input_device_resolution_state_resolution_values_end (const xcb_input_device_resolution_state_t *R  /**< */)
   5940 {
   5941     xcb_generic_iterator_t i;
   5942     i.data = ((uint32_t *) (R + 1)) + (R->num_valuators);
   5943     i.rem = 0;
   5944     i.index = (char *) i.data - (char *) R;
   5945     return i;
   5946 }
   5947 
   5948 
   5949 /*****************************************************************************
   5950  **
   5951  ** uint32_t * xcb_input_device_resolution_state_resolution_min
   5952  **
   5953  ** @param const xcb_input_device_resolution_state_t *R
   5954  ** @returns uint32_t *
   5955  **
   5956  *****************************************************************************/
   5957 
   5958 uint32_t *
   5959 xcb_input_device_resolution_state_resolution_min (const xcb_input_device_resolution_state_t *R  /**< */)
   5960 {
   5961     xcb_generic_iterator_t prev = xcb_input_device_resolution_state_resolution_values_end(R);
   5962     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
   5963 }
   5964 
   5965 
   5966 /*****************************************************************************
   5967  **
   5968  ** int xcb_input_device_resolution_state_resolution_min_length
   5969  **
   5970  ** @param const xcb_input_device_resolution_state_t *R
   5971  ** @returns int
   5972  **
   5973  *****************************************************************************/
   5974 
   5975 int
   5976 xcb_input_device_resolution_state_resolution_min_length (const xcb_input_device_resolution_state_t *R  /**< */)
   5977 {
   5978     return R->num_valuators;
   5979 }
   5980 
   5981 
   5982 /*****************************************************************************
   5983  **
   5984  ** xcb_generic_iterator_t xcb_input_device_resolution_state_resolution_min_end
   5985  **
   5986  ** @param const xcb_input_device_resolution_state_t *R
   5987  ** @returns xcb_generic_iterator_t
   5988  **
   5989  *****************************************************************************/
   5990 
   5991 xcb_generic_iterator_t
   5992 xcb_input_device_resolution_state_resolution_min_end (const xcb_input_device_resolution_state_t *R  /**< */)
   5993 {
   5994     xcb_generic_iterator_t i;
   5995     xcb_generic_iterator_t child = xcb_input_device_resolution_state_resolution_values_end(R);
   5996     i.data = ((uint32_t *) child.data) + (R->num_valuators);
   5997     i.rem = 0;
   5998     i.index = (char *) i.data - (char *) R;
   5999     return i;
   6000 }
   6001 
   6002 
   6003 /*****************************************************************************
   6004  **
   6005  ** uint32_t * xcb_input_device_resolution_state_resolution_max
   6006  **
   6007  ** @param const xcb_input_device_resolution_state_t *R
   6008  ** @returns uint32_t *
   6009  **
   6010  *****************************************************************************/
   6011 
   6012 uint32_t *
   6013 xcb_input_device_resolution_state_resolution_max (const xcb_input_device_resolution_state_t *R  /**< */)
   6014 {
   6015     xcb_generic_iterator_t prev = xcb_input_device_resolution_state_resolution_min_end(R);
   6016     return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0);
   6017 }
   6018 
   6019 
   6020 /*****************************************************************************
   6021  **
   6022  ** int xcb_input_device_resolution_state_resolution_max_length
   6023  **
   6024  ** @param const xcb_input_device_resolution_state_t *R
   6025  ** @returns int
   6026  **
   6027  *****************************************************************************/
   6028 
   6029 int
   6030 xcb_input_device_resolution_state_resolution_max_length (const xcb_input_device_resolution_state_t *R  /**< */)
   6031 {
   6032     return R->num_valuators;
   6033 }
   6034 
   6035 
   6036 /*****************************************************************************
   6037  **
   6038  ** xcb_generic_iterator_t xcb_input_device_resolution_state_resolution_max_end
   6039  **
   6040  ** @param const xcb_input_device_resolution_state_t *R
   6041  ** @returns xcb_generic_iterator_t
   6042  **
   6043  *****************************************************************************/
   6044 
   6045 xcb_generic_iterator_t
   6046 xcb_input_device_resolution_state_resolution_max_end (const xcb_input_device_resolution_state_t *R  /**< */)
   6047 {
   6048     xcb_generic_iterator_t i;
   6049     xcb_generic_iterator_t child = xcb_input_device_resolution_state_resolution_min_end(R);
   6050     i.data = ((uint32_t *) child.data) + (R->num_valuators);
   6051     i.rem = 0;
   6052     i.index = (char *) i.data - (char *) R;
   6053     return i;
   6054 }
   6055 
   6056 
   6057 /*****************************************************************************
   6058  **
   6059  ** void xcb_input_device_resolution_state_next
   6060  **
   6061  ** @param xcb_input_device_resolution_state_iterator_t *i
   6062  ** @returns void
   6063  **
   6064  *****************************************************************************/
   6065 
   6066 void
   6067 xcb_input_device_resolution_state_next (xcb_input_device_resolution_state_iterator_t *i  /**< */)
   6068 {
   6069     xcb_input_device_resolution_state_t *R = i->data;
   6070     xcb_generic_iterator_t child;
   6071     child.data = (xcb_input_device_resolution_state_t *)(((char *)R) + xcb_input_device_resolution_state_sizeof(R));
   6072     i->index = (char *) child.data - (char *) i->data;
   6073     --i->rem;
   6074     i->data = (xcb_input_device_resolution_state_t *) child.data;
   6075 }
   6076 
   6077 
   6078 /*****************************************************************************
   6079  **
   6080  ** xcb_generic_iterator_t xcb_input_device_resolution_state_end
   6081  **
   6082  ** @param xcb_input_device_resolution_state_iterator_t i
   6083  ** @returns xcb_generic_iterator_t
   6084  **
   6085  *****************************************************************************/
   6086 
   6087 xcb_generic_iterator_t
   6088 xcb_input_device_resolution_state_end (xcb_input_device_resolution_state_iterator_t i  /**< */)
   6089 {
   6090     xcb_generic_iterator_t ret;
   6091     while(i.rem > 0)
   6092         xcb_input_device_resolution_state_next(&i);
   6093     ret.data = i.data;
   6094     ret.rem = i.rem;
   6095     ret.index = i.index;
   6096     return ret;
   6097 }
   6098 
   6099 
   6100 /*****************************************************************************
   6101  **
   6102  ** void xcb_input_device_abs_calib_state_next
   6103  **
   6104  ** @param xcb_input_device_abs_calib_state_iterator_t *i
   6105  ** @returns void
   6106  **
   6107  *****************************************************************************/
   6108 
   6109 void
   6110 xcb_input_device_abs_calib_state_next (xcb_input_device_abs_calib_state_iterator_t *i  /**< */)
   6111 {
   6112     --i->rem;
   6113     ++i->data;
   6114     i->index += sizeof(xcb_input_device_abs_calib_state_t);
   6115 }
   6116 
   6117 
   6118 /*****************************************************************************
   6119  **
   6120  ** xcb_generic_iterator_t xcb_input_device_abs_calib_state_end
   6121  **
   6122  ** @param xcb_input_device_abs_calib_state_iterator_t i
   6123  ** @returns xcb_generic_iterator_t
   6124  **
   6125  *****************************************************************************/
   6126 
   6127 xcb_generic_iterator_t
   6128 xcb_input_device_abs_calib_state_end (xcb_input_device_abs_calib_state_iterator_t i  /**< */)
   6129 {
   6130     xcb_generic_iterator_t ret;
   6131     ret.data = i.data + i.rem;
   6132     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6133     ret.rem = 0;
   6134     return ret;
   6135 }
   6136 
   6137 
   6138 /*****************************************************************************
   6139  **
   6140  ** void xcb_input_device_abs_area_state_next
   6141  **
   6142  ** @param xcb_input_device_abs_area_state_iterator_t *i
   6143  ** @returns void
   6144  **
   6145  *****************************************************************************/
   6146 
   6147 void
   6148 xcb_input_device_abs_area_state_next (xcb_input_device_abs_area_state_iterator_t *i  /**< */)
   6149 {
   6150     --i->rem;
   6151     ++i->data;
   6152     i->index += sizeof(xcb_input_device_abs_area_state_t);
   6153 }
   6154 
   6155 
   6156 /*****************************************************************************
   6157  **
   6158  ** xcb_generic_iterator_t xcb_input_device_abs_area_state_end
   6159  **
   6160  ** @param xcb_input_device_abs_area_state_iterator_t i
   6161  ** @returns xcb_generic_iterator_t
   6162  **
   6163  *****************************************************************************/
   6164 
   6165 xcb_generic_iterator_t
   6166 xcb_input_device_abs_area_state_end (xcb_input_device_abs_area_state_iterator_t i  /**< */)
   6167 {
   6168     xcb_generic_iterator_t ret;
   6169     ret.data = i.data + i.rem;
   6170     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6171     ret.rem = 0;
   6172     return ret;
   6173 }
   6174 
   6175 
   6176 /*****************************************************************************
   6177  **
   6178  ** void xcb_input_device_core_state_next
   6179  **
   6180  ** @param xcb_input_device_core_state_iterator_t *i
   6181  ** @returns void
   6182  **
   6183  *****************************************************************************/
   6184 
   6185 void
   6186 xcb_input_device_core_state_next (xcb_input_device_core_state_iterator_t *i  /**< */)
   6187 {
   6188     --i->rem;
   6189     ++i->data;
   6190     i->index += sizeof(xcb_input_device_core_state_t);
   6191 }
   6192 
   6193 
   6194 /*****************************************************************************
   6195  **
   6196  ** xcb_generic_iterator_t xcb_input_device_core_state_end
   6197  **
   6198  ** @param xcb_input_device_core_state_iterator_t i
   6199  ** @returns xcb_generic_iterator_t
   6200  **
   6201  *****************************************************************************/
   6202 
   6203 xcb_generic_iterator_t
   6204 xcb_input_device_core_state_end (xcb_input_device_core_state_iterator_t i  /**< */)
   6205 {
   6206     xcb_generic_iterator_t ret;
   6207     ret.data = i.data + i.rem;
   6208     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6209     ret.rem = 0;
   6210     return ret;
   6211 }
   6212 
   6213 
   6214 /*****************************************************************************
   6215  **
   6216  ** void xcb_input_device_enable_state_next
   6217  **
   6218  ** @param xcb_input_device_enable_state_iterator_t *i
   6219  ** @returns void
   6220  **
   6221  *****************************************************************************/
   6222 
   6223 void
   6224 xcb_input_device_enable_state_next (xcb_input_device_enable_state_iterator_t *i  /**< */)
   6225 {
   6226     --i->rem;
   6227     ++i->data;
   6228     i->index += sizeof(xcb_input_device_enable_state_t);
   6229 }
   6230 
   6231 
   6232 /*****************************************************************************
   6233  **
   6234  ** xcb_generic_iterator_t xcb_input_device_enable_state_end
   6235  **
   6236  ** @param xcb_input_device_enable_state_iterator_t i
   6237  ** @returns xcb_generic_iterator_t
   6238  **
   6239  *****************************************************************************/
   6240 
   6241 xcb_generic_iterator_t
   6242 xcb_input_device_enable_state_end (xcb_input_device_enable_state_iterator_t i  /**< */)
   6243 {
   6244     xcb_generic_iterator_t ret;
   6245     ret.data = i.data + i.rem;
   6246     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6247     ret.rem = 0;
   6248     return ret;
   6249 }
   6250 
   6251 
   6252 /*****************************************************************************
   6253  **
   6254  ** void xcb_input_device_ctl_next
   6255  **
   6256  ** @param xcb_input_device_ctl_iterator_t *i
   6257  ** @returns void
   6258  **
   6259  *****************************************************************************/
   6260 
   6261 void
   6262 xcb_input_device_ctl_next (xcb_input_device_ctl_iterator_t *i  /**< */)
   6263 {
   6264     --i->rem;
   6265     ++i->data;
   6266     i->index += sizeof(xcb_input_device_ctl_t);
   6267 }
   6268 
   6269 
   6270 /*****************************************************************************
   6271  **
   6272  ** xcb_generic_iterator_t xcb_input_device_ctl_end
   6273  **
   6274  ** @param xcb_input_device_ctl_iterator_t i
   6275  ** @returns xcb_generic_iterator_t
   6276  **
   6277  *****************************************************************************/
   6278 
   6279 xcb_generic_iterator_t
   6280 xcb_input_device_ctl_end (xcb_input_device_ctl_iterator_t i  /**< */)
   6281 {
   6282     xcb_generic_iterator_t ret;
   6283     ret.data = i.data + i.rem;
   6284     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6285     ret.rem = 0;
   6286     return ret;
   6287 }
   6288 
   6289 int
   6290 xcb_input_device_resolution_ctl_sizeof (const void  *_buffer  /**< */)
   6291 {
   6292     char *xcb_tmp = (char *)_buffer;
   6293     const xcb_input_device_resolution_ctl_t *_aux = (xcb_input_device_resolution_ctl_t *)_buffer;
   6294     unsigned int xcb_buffer_len = 0;
   6295     unsigned int xcb_block_len = 0;
   6296     unsigned int xcb_pad = 0;
   6297     unsigned int xcb_align_to;
   6298 
   6299 
   6300     xcb_block_len += sizeof(xcb_input_device_resolution_ctl_t);
   6301     xcb_tmp += xcb_block_len;
   6302     /* resolution_values */
   6303     xcb_block_len += _aux->num_valuators * sizeof(uint32_t);
   6304     xcb_tmp += xcb_block_len;
   6305     xcb_align_to = ALIGNOF(uint32_t);
   6306     /* insert padding */
   6307     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
   6308     xcb_buffer_len += xcb_block_len + xcb_pad;
   6309     if (0 != xcb_pad) {
   6310         xcb_tmp += xcb_pad;
   6311         xcb_pad = 0;
   6312     }
   6313     xcb_block_len = 0;
   6314 
   6315     return xcb_buffer_len;
   6316 }
   6317 
   6318 
   6319 /*****************************************************************************
   6320  **
   6321  ** uint32_t * xcb_input_device_resolution_ctl_resolution_values
   6322  **
   6323  ** @param const xcb_input_device_resolution_ctl_t *R
   6324  ** @returns uint32_t *
   6325  **
   6326  *****************************************************************************/
   6327 
   6328 uint32_t *
   6329 xcb_input_device_resolution_ctl_resolution_values (const xcb_input_device_resolution_ctl_t *R  /**< */)
   6330 {
   6331     return (uint32_t *) (R + 1);
   6332 }
   6333 
   6334 
   6335 /*****************************************************************************
   6336  **
   6337  ** int xcb_input_device_resolution_ctl_resolution_values_length
   6338  **
   6339  ** @param const xcb_input_device_resolution_ctl_t *R
   6340  ** @returns int
   6341  **
   6342  *****************************************************************************/
   6343 
   6344 int
   6345 xcb_input_device_resolution_ctl_resolution_values_length (const xcb_input_device_resolution_ctl_t *R  /**< */)
   6346 {
   6347     return R->num_valuators;
   6348 }
   6349 
   6350 
   6351 /*****************************************************************************
   6352  **
   6353  ** xcb_generic_iterator_t xcb_input_device_resolution_ctl_resolution_values_end
   6354  **
   6355  ** @param const xcb_input_device_resolution_ctl_t *R
   6356  ** @returns xcb_generic_iterator_t
   6357  **
   6358  *****************************************************************************/
   6359 
   6360 xcb_generic_iterator_t
   6361 xcb_input_device_resolution_ctl_resolution_values_end (const xcb_input_device_resolution_ctl_t *R  /**< */)
   6362 {
   6363     xcb_generic_iterator_t i;
   6364     i.data = ((uint32_t *) (R + 1)) + (R->num_valuators);
   6365     i.rem = 0;
   6366     i.index = (char *) i.data - (char *) R;
   6367     return i;
   6368 }
   6369 
   6370 
   6371 /*****************************************************************************
   6372  **
   6373  ** void xcb_input_device_resolution_ctl_next
   6374  **
   6375  ** @param xcb_input_device_resolution_ctl_iterator_t *i
   6376  ** @returns void
   6377  **
   6378  *****************************************************************************/
   6379 
   6380 void
   6381 xcb_input_device_resolution_ctl_next (xcb_input_device_resolution_ctl_iterator_t *i  /**< */)
   6382 {
   6383     xcb_input_device_resolution_ctl_t *R = i->data;
   6384     xcb_generic_iterator_t child;
   6385     child.data = (xcb_input_device_resolution_ctl_t *)(((char *)R) + xcb_input_device_resolution_ctl_sizeof(R));
   6386     i->index = (char *) child.data - (char *) i->data;
   6387     --i->rem;
   6388     i->data = (xcb_input_device_resolution_ctl_t *) child.data;
   6389 }
   6390 
   6391 
   6392 /*****************************************************************************
   6393  **
   6394  ** xcb_generic_iterator_t xcb_input_device_resolution_ctl_end
   6395  **
   6396  ** @param xcb_input_device_resolution_ctl_iterator_t i
   6397  ** @returns xcb_generic_iterator_t
   6398  **
   6399  *****************************************************************************/
   6400 
   6401 xcb_generic_iterator_t
   6402 xcb_input_device_resolution_ctl_end (xcb_input_device_resolution_ctl_iterator_t i  /**< */)
   6403 {
   6404     xcb_generic_iterator_t ret;
   6405     while(i.rem > 0)
   6406         xcb_input_device_resolution_ctl_next(&i);
   6407     ret.data = i.data;
   6408     ret.rem = i.rem;
   6409     ret.index = i.index;
   6410     return ret;
   6411 }
   6412 
   6413 
   6414 /*****************************************************************************
   6415  **
   6416  ** void xcb_input_device_abs_calib_ctl_next
   6417  **
   6418  ** @param xcb_input_device_abs_calib_ctl_iterator_t *i
   6419  ** @returns void
   6420  **
   6421  *****************************************************************************/
   6422 
   6423 void
   6424 xcb_input_device_abs_calib_ctl_next (xcb_input_device_abs_calib_ctl_iterator_t *i  /**< */)
   6425 {
   6426     --i->rem;
   6427     ++i->data;
   6428     i->index += sizeof(xcb_input_device_abs_calib_ctl_t);
   6429 }
   6430 
   6431 
   6432 /*****************************************************************************
   6433  **
   6434  ** xcb_generic_iterator_t xcb_input_device_abs_calib_ctl_end
   6435  **
   6436  ** @param xcb_input_device_abs_calib_ctl_iterator_t i
   6437  ** @returns xcb_generic_iterator_t
   6438  **
   6439  *****************************************************************************/
   6440 
   6441 xcb_generic_iterator_t
   6442 xcb_input_device_abs_calib_ctl_end (xcb_input_device_abs_calib_ctl_iterator_t i  /**< */)
   6443 {
   6444     xcb_generic_iterator_t ret;
   6445     ret.data = i.data + i.rem;
   6446     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6447     ret.rem = 0;
   6448     return ret;
   6449 }
   6450 
   6451 
   6452 /*****************************************************************************
   6453  **
   6454  ** void xcb_input_device_abs_area_ctrl_next
   6455  **
   6456  ** @param xcb_input_device_abs_area_ctrl_iterator_t *i
   6457  ** @returns void
   6458  **
   6459  *****************************************************************************/
   6460 
   6461 void
   6462 xcb_input_device_abs_area_ctrl_next (xcb_input_device_abs_area_ctrl_iterator_t *i  /**< */)
   6463 {
   6464     --i->rem;
   6465     ++i->data;
   6466     i->index += sizeof(xcb_input_device_abs_area_ctrl_t);
   6467 }
   6468 
   6469 
   6470 /*****************************************************************************
   6471  **
   6472  ** xcb_generic_iterator_t xcb_input_device_abs_area_ctrl_end
   6473  **
   6474  ** @param xcb_input_device_abs_area_ctrl_iterator_t i
   6475  ** @returns xcb_generic_iterator_t
   6476  **
   6477  *****************************************************************************/
   6478 
   6479 xcb_generic_iterator_t
   6480 xcb_input_device_abs_area_ctrl_end (xcb_input_device_abs_area_ctrl_iterator_t i  /**< */)
   6481 {
   6482     xcb_generic_iterator_t ret;
   6483     ret.data = i.data + i.rem;
   6484     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6485     ret.rem = 0;
   6486     return ret;
   6487 }
   6488 
   6489 
   6490 /*****************************************************************************
   6491  **
   6492  ** void xcb_input_device_core_ctrl_next
   6493  **
   6494  ** @param xcb_input_device_core_ctrl_iterator_t *i
   6495  ** @returns void
   6496  **
   6497  *****************************************************************************/
   6498 
   6499 void
   6500 xcb_input_device_core_ctrl_next (xcb_input_device_core_ctrl_iterator_t *i  /**< */)
   6501 {
   6502     --i->rem;
   6503     ++i->data;
   6504     i->index += sizeof(xcb_input_device_core_ctrl_t);
   6505 }
   6506 
   6507 
   6508 /*****************************************************************************
   6509  **
   6510  ** xcb_generic_iterator_t xcb_input_device_core_ctrl_end
   6511  **
   6512  ** @param xcb_input_device_core_ctrl_iterator_t i
   6513  ** @returns xcb_generic_iterator_t
   6514  **
   6515  *****************************************************************************/
   6516 
   6517 xcb_generic_iterator_t
   6518 xcb_input_device_core_ctrl_end (xcb_input_device_core_ctrl_iterator_t i  /**< */)
   6519 {
   6520     xcb_generic_iterator_t ret;
   6521     ret.data = i.data + i.rem;
   6522     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6523     ret.rem = 0;
   6524     return ret;
   6525 }
   6526 
   6527 
   6528 /*****************************************************************************
   6529  **
   6530  ** void xcb_input_device_enable_ctrl_next
   6531  **
   6532  ** @param xcb_input_device_enable_ctrl_iterator_t *i
   6533  ** @returns void
   6534  **
   6535  *****************************************************************************/
   6536 
   6537 void
   6538 xcb_input_device_enable_ctrl_next (xcb_input_device_enable_ctrl_iterator_t *i  /**< */)
   6539 {
   6540     --i->rem;
   6541     ++i->data;
   6542     i->index += sizeof(xcb_input_device_enable_ctrl_t);
   6543 }
   6544 
   6545 
   6546 /*****************************************************************************
   6547  **
   6548  ** xcb_generic_iterator_t xcb_input_device_enable_ctrl_end
   6549  **
   6550  ** @param xcb_input_device_enable_ctrl_iterator_t i
   6551  ** @returns xcb_generic_iterator_t
   6552  **
   6553  *****************************************************************************/
   6554 
   6555 xcb_generic_iterator_t
   6556 xcb_input_device_enable_ctrl_end (xcb_input_device_enable_ctrl_iterator_t i  /**< */)
   6557 {
   6558     xcb_generic_iterator_t ret;
   6559     ret.data = i.data + i.rem;
   6560     ret.index = i.index + ((char *) ret.data - (char *) i.data);
   6561     ret.rem = 0;
   6562     return ret;
   6563 }
   6564 
   6565