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