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