1 /* 2 * This file generated automatically from xfixes.xml by c_client.py. 3 * Edit at your peril. 4 */ 5 6 #ifdef HAVE_CONFIG_H 7 #include "config.h" 8 #endif 9 #include <stdlib.h> 10 #include <string.h> 11 #include <assert.h> 12 #include <stddef.h> /* for offsetof() */ 13 #include "xcbext.h" 14 #include "xfixes.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 #include "render.h" 19 #include "shape.h" 20 21 xcb_extension_t xcb_xfixes_id = { "XFIXES", 0 }; 22 23 xcb_xfixes_query_version_cookie_t 24 xcb_xfixes_query_version (xcb_connection_t *c /**< */, 25 uint32_t client_major_version /**< */, 26 uint32_t client_minor_version /**< */) 27 { 28 static const xcb_protocol_request_t xcb_req = { 29 /* count */ 2, 30 /* ext */ &xcb_xfixes_id, 31 /* opcode */ XCB_XFIXES_QUERY_VERSION, 32 /* isvoid */ 0 33 }; 34 35 struct iovec xcb_parts[4]; 36 xcb_xfixes_query_version_cookie_t xcb_ret; 37 xcb_xfixes_query_version_request_t xcb_out; 38 39 xcb_out.client_major_version = client_major_version; 40 xcb_out.client_minor_version = client_minor_version; 41 42 xcb_parts[2].iov_base = (char *) &xcb_out; 43 xcb_parts[2].iov_len = sizeof(xcb_out); 44 xcb_parts[3].iov_base = 0; 45 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 46 47 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 48 return xcb_ret; 49 } 50 51 xcb_xfixes_query_version_cookie_t 52 xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */, 53 uint32_t client_major_version /**< */, 54 uint32_t client_minor_version /**< */) 55 { 56 static const xcb_protocol_request_t xcb_req = { 57 /* count */ 2, 58 /* ext */ &xcb_xfixes_id, 59 /* opcode */ XCB_XFIXES_QUERY_VERSION, 60 /* isvoid */ 0 61 }; 62 63 struct iovec xcb_parts[4]; 64 xcb_xfixes_query_version_cookie_t xcb_ret; 65 xcb_xfixes_query_version_request_t xcb_out; 66 67 xcb_out.client_major_version = client_major_version; 68 xcb_out.client_minor_version = client_minor_version; 69 70 xcb_parts[2].iov_base = (char *) &xcb_out; 71 xcb_parts[2].iov_len = sizeof(xcb_out); 72 xcb_parts[3].iov_base = 0; 73 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 74 75 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 76 return xcb_ret; 77 } 78 79 xcb_xfixes_query_version_reply_t * 80 xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */, 81 xcb_xfixes_query_version_cookie_t cookie /**< */, 82 xcb_generic_error_t **e /**< */) 83 { 84 return (xcb_xfixes_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 85 } 86 87 xcb_void_cookie_t 88 xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */, 89 uint8_t mode /**< */, 90 uint8_t target /**< */, 91 uint8_t map /**< */, 92 xcb_window_t window /**< */) 93 { 94 static const xcb_protocol_request_t xcb_req = { 95 /* count */ 2, 96 /* ext */ &xcb_xfixes_id, 97 /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET, 98 /* isvoid */ 1 99 }; 100 101 struct iovec xcb_parts[4]; 102 xcb_void_cookie_t xcb_ret; 103 xcb_xfixes_change_save_set_request_t xcb_out; 104 105 xcb_out.mode = mode; 106 xcb_out.target = target; 107 xcb_out.map = map; 108 xcb_out.pad0 = 0; 109 xcb_out.window = window; 110 111 xcb_parts[2].iov_base = (char *) &xcb_out; 112 xcb_parts[2].iov_len = sizeof(xcb_out); 113 xcb_parts[3].iov_base = 0; 114 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 115 116 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 117 return xcb_ret; 118 } 119 120 xcb_void_cookie_t 121 xcb_xfixes_change_save_set (xcb_connection_t *c /**< */, 122 uint8_t mode /**< */, 123 uint8_t target /**< */, 124 uint8_t map /**< */, 125 xcb_window_t window /**< */) 126 { 127 static const xcb_protocol_request_t xcb_req = { 128 /* count */ 2, 129 /* ext */ &xcb_xfixes_id, 130 /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET, 131 /* isvoid */ 1 132 }; 133 134 struct iovec xcb_parts[4]; 135 xcb_void_cookie_t xcb_ret; 136 xcb_xfixes_change_save_set_request_t xcb_out; 137 138 xcb_out.mode = mode; 139 xcb_out.target = target; 140 xcb_out.map = map; 141 xcb_out.pad0 = 0; 142 xcb_out.window = window; 143 144 xcb_parts[2].iov_base = (char *) &xcb_out; 145 xcb_parts[2].iov_len = sizeof(xcb_out); 146 xcb_parts[3].iov_base = 0; 147 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 148 149 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 150 return xcb_ret; 151 } 152 153 xcb_void_cookie_t 154 xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */, 155 xcb_window_t window /**< */, 156 xcb_atom_t selection /**< */, 157 uint32_t event_mask /**< */) 158 { 159 static const xcb_protocol_request_t xcb_req = { 160 /* count */ 2, 161 /* ext */ &xcb_xfixes_id, 162 /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT, 163 /* isvoid */ 1 164 }; 165 166 struct iovec xcb_parts[4]; 167 xcb_void_cookie_t xcb_ret; 168 xcb_xfixes_select_selection_input_request_t xcb_out; 169 170 xcb_out.window = window; 171 xcb_out.selection = selection; 172 xcb_out.event_mask = event_mask; 173 174 xcb_parts[2].iov_base = (char *) &xcb_out; 175 xcb_parts[2].iov_len = sizeof(xcb_out); 176 xcb_parts[3].iov_base = 0; 177 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 178 179 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 180 return xcb_ret; 181 } 182 183 xcb_void_cookie_t 184 xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */, 185 xcb_window_t window /**< */, 186 xcb_atom_t selection /**< */, 187 uint32_t event_mask /**< */) 188 { 189 static const xcb_protocol_request_t xcb_req = { 190 /* count */ 2, 191 /* ext */ &xcb_xfixes_id, 192 /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT, 193 /* isvoid */ 1 194 }; 195 196 struct iovec xcb_parts[4]; 197 xcb_void_cookie_t xcb_ret; 198 xcb_xfixes_select_selection_input_request_t xcb_out; 199 200 xcb_out.window = window; 201 xcb_out.selection = selection; 202 xcb_out.event_mask = event_mask; 203 204 xcb_parts[2].iov_base = (char *) &xcb_out; 205 xcb_parts[2].iov_len = sizeof(xcb_out); 206 xcb_parts[3].iov_base = 0; 207 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 208 209 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 210 return xcb_ret; 211 } 212 213 xcb_void_cookie_t 214 xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */, 215 xcb_window_t window /**< */, 216 uint32_t event_mask /**< */) 217 { 218 static const xcb_protocol_request_t xcb_req = { 219 /* count */ 2, 220 /* ext */ &xcb_xfixes_id, 221 /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT, 222 /* isvoid */ 1 223 }; 224 225 struct iovec xcb_parts[4]; 226 xcb_void_cookie_t xcb_ret; 227 xcb_xfixes_select_cursor_input_request_t xcb_out; 228 229 xcb_out.window = window; 230 xcb_out.event_mask = event_mask; 231 232 xcb_parts[2].iov_base = (char *) &xcb_out; 233 xcb_parts[2].iov_len = sizeof(xcb_out); 234 xcb_parts[3].iov_base = 0; 235 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 236 237 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 238 return xcb_ret; 239 } 240 241 xcb_void_cookie_t 242 xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */, 243 xcb_window_t window /**< */, 244 uint32_t event_mask /**< */) 245 { 246 static const xcb_protocol_request_t xcb_req = { 247 /* count */ 2, 248 /* ext */ &xcb_xfixes_id, 249 /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT, 250 /* isvoid */ 1 251 }; 252 253 struct iovec xcb_parts[4]; 254 xcb_void_cookie_t xcb_ret; 255 xcb_xfixes_select_cursor_input_request_t xcb_out; 256 257 xcb_out.window = window; 258 xcb_out.event_mask = event_mask; 259 260 xcb_parts[2].iov_base = (char *) &xcb_out; 261 xcb_parts[2].iov_len = sizeof(xcb_out); 262 xcb_parts[3].iov_base = 0; 263 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 264 265 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 266 return xcb_ret; 267 } 268 269 int 270 xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */) 271 { 272 char *xcb_tmp = (char *)_buffer; 273 const xcb_xfixes_get_cursor_image_reply_t *_aux = (xcb_xfixes_get_cursor_image_reply_t *)_buffer; 274 unsigned int xcb_buffer_len = 0; 275 unsigned int xcb_block_len = 0; 276 unsigned int xcb_pad = 0; 277 unsigned int xcb_align_to = 0; 278 279 280 xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_reply_t); 281 xcb_tmp += xcb_block_len; 282 xcb_buffer_len += xcb_block_len; 283 xcb_block_len = 0; 284 /* cursor_image */ 285 xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t); 286 xcb_tmp += xcb_block_len; 287 xcb_align_to = ALIGNOF(uint32_t); 288 /* insert padding */ 289 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 290 xcb_buffer_len += xcb_block_len + xcb_pad; 291 if (0 != xcb_pad) { 292 xcb_tmp += xcb_pad; 293 xcb_pad = 0; 294 } 295 xcb_block_len = 0; 296 297 return xcb_buffer_len; 298 } 299 300 xcb_xfixes_get_cursor_image_cookie_t 301 xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */) 302 { 303 static const xcb_protocol_request_t xcb_req = { 304 /* count */ 2, 305 /* ext */ &xcb_xfixes_id, 306 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE, 307 /* isvoid */ 0 308 }; 309 310 struct iovec xcb_parts[4]; 311 xcb_xfixes_get_cursor_image_cookie_t xcb_ret; 312 xcb_xfixes_get_cursor_image_request_t xcb_out; 313 314 315 xcb_parts[2].iov_base = (char *) &xcb_out; 316 xcb_parts[2].iov_len = sizeof(xcb_out); 317 xcb_parts[3].iov_base = 0; 318 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 319 320 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 321 return xcb_ret; 322 } 323 324 xcb_xfixes_get_cursor_image_cookie_t 325 xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */) 326 { 327 static const xcb_protocol_request_t xcb_req = { 328 /* count */ 2, 329 /* ext */ &xcb_xfixes_id, 330 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE, 331 /* isvoid */ 0 332 }; 333 334 struct iovec xcb_parts[4]; 335 xcb_xfixes_get_cursor_image_cookie_t xcb_ret; 336 xcb_xfixes_get_cursor_image_request_t xcb_out; 337 338 339 xcb_parts[2].iov_base = (char *) &xcb_out; 340 xcb_parts[2].iov_len = sizeof(xcb_out); 341 xcb_parts[3].iov_base = 0; 342 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 343 344 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 345 return xcb_ret; 346 } 347 348 uint32_t * 349 xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) 350 { 351 return (uint32_t *) (R + 1); 352 } 353 354 int 355 xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) 356 { 357 return (R->width * R->height); 358 } 359 360 xcb_generic_iterator_t 361 xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) 362 { 363 xcb_generic_iterator_t i; 364 i.data = ((uint32_t *) (R + 1)) + ((R->width * R->height)); 365 i.rem = 0; 366 i.index = (char *) i.data - (char *) R; 367 return i; 368 } 369 370 xcb_xfixes_get_cursor_image_reply_t * 371 xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */, 372 xcb_xfixes_get_cursor_image_cookie_t cookie /**< */, 373 xcb_generic_error_t **e /**< */) 374 { 375 return (xcb_xfixes_get_cursor_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 376 } 377 378 void 379 xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */) 380 { 381 --i->rem; 382 ++i->data; 383 i->index += sizeof(xcb_xfixes_region_t); 384 } 385 386 xcb_generic_iterator_t 387 xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */) 388 { 389 xcb_generic_iterator_t ret; 390 ret.data = i.data + i.rem; 391 ret.index = i.index + ((char *) ret.data - (char *) i.data); 392 ret.rem = 0; 393 return ret; 394 } 395 396 int 397 xcb_xfixes_create_region_sizeof (const void *_buffer /**< */, 398 uint32_t rectangles_len /**< */) 399 { 400 char *xcb_tmp = (char *)_buffer; 401 unsigned int xcb_buffer_len = 0; 402 unsigned int xcb_block_len = 0; 403 unsigned int xcb_pad = 0; 404 unsigned int xcb_align_to = 0; 405 406 407 xcb_block_len += sizeof(xcb_xfixes_create_region_request_t); 408 xcb_tmp += xcb_block_len; 409 xcb_buffer_len += xcb_block_len; 410 xcb_block_len = 0; 411 /* rectangles */ 412 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); 413 xcb_tmp += xcb_block_len; 414 xcb_align_to = ALIGNOF(xcb_rectangle_t); 415 /* insert padding */ 416 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 417 xcb_buffer_len += xcb_block_len + xcb_pad; 418 if (0 != xcb_pad) { 419 xcb_tmp += xcb_pad; 420 xcb_pad = 0; 421 } 422 xcb_block_len = 0; 423 424 return xcb_buffer_len; 425 } 426 427 xcb_void_cookie_t 428 xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */, 429 xcb_xfixes_region_t region /**< */, 430 uint32_t rectangles_len /**< */, 431 const xcb_rectangle_t *rectangles /**< */) 432 { 433 static const xcb_protocol_request_t xcb_req = { 434 /* count */ 4, 435 /* ext */ &xcb_xfixes_id, 436 /* opcode */ XCB_XFIXES_CREATE_REGION, 437 /* isvoid */ 1 438 }; 439 440 struct iovec xcb_parts[6]; 441 xcb_void_cookie_t xcb_ret; 442 xcb_xfixes_create_region_request_t xcb_out; 443 444 xcb_out.region = region; 445 446 xcb_parts[2].iov_base = (char *) &xcb_out; 447 xcb_parts[2].iov_len = sizeof(xcb_out); 448 xcb_parts[3].iov_base = 0; 449 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 450 /* xcb_rectangle_t rectangles */ 451 xcb_parts[4].iov_base = (char *) rectangles; 452 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 453 xcb_parts[5].iov_base = 0; 454 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 455 456 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 457 return xcb_ret; 458 } 459 460 xcb_void_cookie_t 461 xcb_xfixes_create_region (xcb_connection_t *c /**< */, 462 xcb_xfixes_region_t region /**< */, 463 uint32_t rectangles_len /**< */, 464 const xcb_rectangle_t *rectangles /**< */) 465 { 466 static const xcb_protocol_request_t xcb_req = { 467 /* count */ 4, 468 /* ext */ &xcb_xfixes_id, 469 /* opcode */ XCB_XFIXES_CREATE_REGION, 470 /* isvoid */ 1 471 }; 472 473 struct iovec xcb_parts[6]; 474 xcb_void_cookie_t xcb_ret; 475 xcb_xfixes_create_region_request_t xcb_out; 476 477 xcb_out.region = region; 478 479 xcb_parts[2].iov_base = (char *) &xcb_out; 480 xcb_parts[2].iov_len = sizeof(xcb_out); 481 xcb_parts[3].iov_base = 0; 482 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 483 /* xcb_rectangle_t rectangles */ 484 xcb_parts[4].iov_base = (char *) rectangles; 485 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 486 xcb_parts[5].iov_base = 0; 487 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 488 489 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 490 return xcb_ret; 491 } 492 493 xcb_void_cookie_t 494 xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */, 495 xcb_xfixes_region_t region /**< */, 496 xcb_pixmap_t bitmap /**< */) 497 { 498 static const xcb_protocol_request_t xcb_req = { 499 /* count */ 2, 500 /* ext */ &xcb_xfixes_id, 501 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP, 502 /* isvoid */ 1 503 }; 504 505 struct iovec xcb_parts[4]; 506 xcb_void_cookie_t xcb_ret; 507 xcb_xfixes_create_region_from_bitmap_request_t xcb_out; 508 509 xcb_out.region = region; 510 xcb_out.bitmap = bitmap; 511 512 xcb_parts[2].iov_base = (char *) &xcb_out; 513 xcb_parts[2].iov_len = sizeof(xcb_out); 514 xcb_parts[3].iov_base = 0; 515 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 516 517 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 518 return xcb_ret; 519 } 520 521 xcb_void_cookie_t 522 xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */, 523 xcb_xfixes_region_t region /**< */, 524 xcb_pixmap_t bitmap /**< */) 525 { 526 static const xcb_protocol_request_t xcb_req = { 527 /* count */ 2, 528 /* ext */ &xcb_xfixes_id, 529 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP, 530 /* isvoid */ 1 531 }; 532 533 struct iovec xcb_parts[4]; 534 xcb_void_cookie_t xcb_ret; 535 xcb_xfixes_create_region_from_bitmap_request_t xcb_out; 536 537 xcb_out.region = region; 538 xcb_out.bitmap = bitmap; 539 540 xcb_parts[2].iov_base = (char *) &xcb_out; 541 xcb_parts[2].iov_len = sizeof(xcb_out); 542 xcb_parts[3].iov_base = 0; 543 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 544 545 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 546 return xcb_ret; 547 } 548 549 xcb_void_cookie_t 550 xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */, 551 xcb_xfixes_region_t region /**< */, 552 xcb_window_t window /**< */, 553 xcb_shape_kind_t kind /**< */) 554 { 555 static const xcb_protocol_request_t xcb_req = { 556 /* count */ 2, 557 /* ext */ &xcb_xfixes_id, 558 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW, 559 /* isvoid */ 1 560 }; 561 562 struct iovec xcb_parts[4]; 563 xcb_void_cookie_t xcb_ret; 564 xcb_xfixes_create_region_from_window_request_t xcb_out; 565 566 xcb_out.region = region; 567 xcb_out.window = window; 568 xcb_out.kind = kind; 569 memset(xcb_out.pad0, 0, 3); 570 571 xcb_parts[2].iov_base = (char *) &xcb_out; 572 xcb_parts[2].iov_len = sizeof(xcb_out); 573 xcb_parts[3].iov_base = 0; 574 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 575 576 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 577 return xcb_ret; 578 } 579 580 xcb_void_cookie_t 581 xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */, 582 xcb_xfixes_region_t region /**< */, 583 xcb_window_t window /**< */, 584 xcb_shape_kind_t kind /**< */) 585 { 586 static const xcb_protocol_request_t xcb_req = { 587 /* count */ 2, 588 /* ext */ &xcb_xfixes_id, 589 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW, 590 /* isvoid */ 1 591 }; 592 593 struct iovec xcb_parts[4]; 594 xcb_void_cookie_t xcb_ret; 595 xcb_xfixes_create_region_from_window_request_t xcb_out; 596 597 xcb_out.region = region; 598 xcb_out.window = window; 599 xcb_out.kind = kind; 600 memset(xcb_out.pad0, 0, 3); 601 602 xcb_parts[2].iov_base = (char *) &xcb_out; 603 xcb_parts[2].iov_len = sizeof(xcb_out); 604 xcb_parts[3].iov_base = 0; 605 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 606 607 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 608 return xcb_ret; 609 } 610 611 xcb_void_cookie_t 612 xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */, 613 xcb_xfixes_region_t region /**< */, 614 xcb_gcontext_t gc /**< */) 615 { 616 static const xcb_protocol_request_t xcb_req = { 617 /* count */ 2, 618 /* ext */ &xcb_xfixes_id, 619 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC, 620 /* isvoid */ 1 621 }; 622 623 struct iovec xcb_parts[4]; 624 xcb_void_cookie_t xcb_ret; 625 xcb_xfixes_create_region_from_gc_request_t xcb_out; 626 627 xcb_out.region = region; 628 xcb_out.gc = gc; 629 630 xcb_parts[2].iov_base = (char *) &xcb_out; 631 xcb_parts[2].iov_len = sizeof(xcb_out); 632 xcb_parts[3].iov_base = 0; 633 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 634 635 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 636 return xcb_ret; 637 } 638 639 xcb_void_cookie_t 640 xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */, 641 xcb_xfixes_region_t region /**< */, 642 xcb_gcontext_t gc /**< */) 643 { 644 static const xcb_protocol_request_t xcb_req = { 645 /* count */ 2, 646 /* ext */ &xcb_xfixes_id, 647 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC, 648 /* isvoid */ 1 649 }; 650 651 struct iovec xcb_parts[4]; 652 xcb_void_cookie_t xcb_ret; 653 xcb_xfixes_create_region_from_gc_request_t xcb_out; 654 655 xcb_out.region = region; 656 xcb_out.gc = gc; 657 658 xcb_parts[2].iov_base = (char *) &xcb_out; 659 xcb_parts[2].iov_len = sizeof(xcb_out); 660 xcb_parts[3].iov_base = 0; 661 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 662 663 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 664 return xcb_ret; 665 } 666 667 xcb_void_cookie_t 668 xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */, 669 xcb_xfixes_region_t region /**< */, 670 xcb_render_picture_t picture /**< */) 671 { 672 static const xcb_protocol_request_t xcb_req = { 673 /* count */ 2, 674 /* ext */ &xcb_xfixes_id, 675 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE, 676 /* isvoid */ 1 677 }; 678 679 struct iovec xcb_parts[4]; 680 xcb_void_cookie_t xcb_ret; 681 xcb_xfixes_create_region_from_picture_request_t xcb_out; 682 683 xcb_out.region = region; 684 xcb_out.picture = picture; 685 686 xcb_parts[2].iov_base = (char *) &xcb_out; 687 xcb_parts[2].iov_len = sizeof(xcb_out); 688 xcb_parts[3].iov_base = 0; 689 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 690 691 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 692 return xcb_ret; 693 } 694 695 xcb_void_cookie_t 696 xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */, 697 xcb_xfixes_region_t region /**< */, 698 xcb_render_picture_t picture /**< */) 699 { 700 static const xcb_protocol_request_t xcb_req = { 701 /* count */ 2, 702 /* ext */ &xcb_xfixes_id, 703 /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE, 704 /* isvoid */ 1 705 }; 706 707 struct iovec xcb_parts[4]; 708 xcb_void_cookie_t xcb_ret; 709 xcb_xfixes_create_region_from_picture_request_t xcb_out; 710 711 xcb_out.region = region; 712 xcb_out.picture = picture; 713 714 xcb_parts[2].iov_base = (char *) &xcb_out; 715 xcb_parts[2].iov_len = sizeof(xcb_out); 716 xcb_parts[3].iov_base = 0; 717 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 718 719 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 720 return xcb_ret; 721 } 722 723 xcb_void_cookie_t 724 xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */, 725 xcb_xfixes_region_t region /**< */) 726 { 727 static const xcb_protocol_request_t xcb_req = { 728 /* count */ 2, 729 /* ext */ &xcb_xfixes_id, 730 /* opcode */ XCB_XFIXES_DESTROY_REGION, 731 /* isvoid */ 1 732 }; 733 734 struct iovec xcb_parts[4]; 735 xcb_void_cookie_t xcb_ret; 736 xcb_xfixes_destroy_region_request_t xcb_out; 737 738 xcb_out.region = region; 739 740 xcb_parts[2].iov_base = (char *) &xcb_out; 741 xcb_parts[2].iov_len = sizeof(xcb_out); 742 xcb_parts[3].iov_base = 0; 743 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 744 745 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 746 return xcb_ret; 747 } 748 749 xcb_void_cookie_t 750 xcb_xfixes_destroy_region (xcb_connection_t *c /**< */, 751 xcb_xfixes_region_t region /**< */) 752 { 753 static const xcb_protocol_request_t xcb_req = { 754 /* count */ 2, 755 /* ext */ &xcb_xfixes_id, 756 /* opcode */ XCB_XFIXES_DESTROY_REGION, 757 /* isvoid */ 1 758 }; 759 760 struct iovec xcb_parts[4]; 761 xcb_void_cookie_t xcb_ret; 762 xcb_xfixes_destroy_region_request_t xcb_out; 763 764 xcb_out.region = region; 765 766 xcb_parts[2].iov_base = (char *) &xcb_out; 767 xcb_parts[2].iov_len = sizeof(xcb_out); 768 xcb_parts[3].iov_base = 0; 769 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 770 771 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 772 return xcb_ret; 773 } 774 775 int 776 xcb_xfixes_set_region_sizeof (const void *_buffer /**< */, 777 uint32_t rectangles_len /**< */) 778 { 779 char *xcb_tmp = (char *)_buffer; 780 unsigned int xcb_buffer_len = 0; 781 unsigned int xcb_block_len = 0; 782 unsigned int xcb_pad = 0; 783 unsigned int xcb_align_to = 0; 784 785 786 xcb_block_len += sizeof(xcb_xfixes_set_region_request_t); 787 xcb_tmp += xcb_block_len; 788 xcb_buffer_len += xcb_block_len; 789 xcb_block_len = 0; 790 /* rectangles */ 791 xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); 792 xcb_tmp += xcb_block_len; 793 xcb_align_to = ALIGNOF(xcb_rectangle_t); 794 /* insert padding */ 795 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 796 xcb_buffer_len += xcb_block_len + xcb_pad; 797 if (0 != xcb_pad) { 798 xcb_tmp += xcb_pad; 799 xcb_pad = 0; 800 } 801 xcb_block_len = 0; 802 803 return xcb_buffer_len; 804 } 805 806 xcb_void_cookie_t 807 xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */, 808 xcb_xfixes_region_t region /**< */, 809 uint32_t rectangles_len /**< */, 810 const xcb_rectangle_t *rectangles /**< */) 811 { 812 static const xcb_protocol_request_t xcb_req = { 813 /* count */ 4, 814 /* ext */ &xcb_xfixes_id, 815 /* opcode */ XCB_XFIXES_SET_REGION, 816 /* isvoid */ 1 817 }; 818 819 struct iovec xcb_parts[6]; 820 xcb_void_cookie_t xcb_ret; 821 xcb_xfixes_set_region_request_t xcb_out; 822 823 xcb_out.region = region; 824 825 xcb_parts[2].iov_base = (char *) &xcb_out; 826 xcb_parts[2].iov_len = sizeof(xcb_out); 827 xcb_parts[3].iov_base = 0; 828 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 829 /* xcb_rectangle_t rectangles */ 830 xcb_parts[4].iov_base = (char *) rectangles; 831 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 832 xcb_parts[5].iov_base = 0; 833 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 834 835 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 836 return xcb_ret; 837 } 838 839 xcb_void_cookie_t 840 xcb_xfixes_set_region (xcb_connection_t *c /**< */, 841 xcb_xfixes_region_t region /**< */, 842 uint32_t rectangles_len /**< */, 843 const xcb_rectangle_t *rectangles /**< */) 844 { 845 static const xcb_protocol_request_t xcb_req = { 846 /* count */ 4, 847 /* ext */ &xcb_xfixes_id, 848 /* opcode */ XCB_XFIXES_SET_REGION, 849 /* isvoid */ 1 850 }; 851 852 struct iovec xcb_parts[6]; 853 xcb_void_cookie_t xcb_ret; 854 xcb_xfixes_set_region_request_t xcb_out; 855 856 xcb_out.region = region; 857 858 xcb_parts[2].iov_base = (char *) &xcb_out; 859 xcb_parts[2].iov_len = sizeof(xcb_out); 860 xcb_parts[3].iov_base = 0; 861 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 862 /* xcb_rectangle_t rectangles */ 863 xcb_parts[4].iov_base = (char *) rectangles; 864 xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); 865 xcb_parts[5].iov_base = 0; 866 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 867 868 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 869 return xcb_ret; 870 } 871 872 xcb_void_cookie_t 873 xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */, 874 xcb_xfixes_region_t source /**< */, 875 xcb_xfixes_region_t destination /**< */) 876 { 877 static const xcb_protocol_request_t xcb_req = { 878 /* count */ 2, 879 /* ext */ &xcb_xfixes_id, 880 /* opcode */ XCB_XFIXES_COPY_REGION, 881 /* isvoid */ 1 882 }; 883 884 struct iovec xcb_parts[4]; 885 xcb_void_cookie_t xcb_ret; 886 xcb_xfixes_copy_region_request_t xcb_out; 887 888 xcb_out.source = source; 889 xcb_out.destination = destination; 890 891 xcb_parts[2].iov_base = (char *) &xcb_out; 892 xcb_parts[2].iov_len = sizeof(xcb_out); 893 xcb_parts[3].iov_base = 0; 894 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 895 896 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 897 return xcb_ret; 898 } 899 900 xcb_void_cookie_t 901 xcb_xfixes_copy_region (xcb_connection_t *c /**< */, 902 xcb_xfixes_region_t source /**< */, 903 xcb_xfixes_region_t destination /**< */) 904 { 905 static const xcb_protocol_request_t xcb_req = { 906 /* count */ 2, 907 /* ext */ &xcb_xfixes_id, 908 /* opcode */ XCB_XFIXES_COPY_REGION, 909 /* isvoid */ 1 910 }; 911 912 struct iovec xcb_parts[4]; 913 xcb_void_cookie_t xcb_ret; 914 xcb_xfixes_copy_region_request_t xcb_out; 915 916 xcb_out.source = source; 917 xcb_out.destination = destination; 918 919 xcb_parts[2].iov_base = (char *) &xcb_out; 920 xcb_parts[2].iov_len = sizeof(xcb_out); 921 xcb_parts[3].iov_base = 0; 922 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 923 924 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 925 return xcb_ret; 926 } 927 928 xcb_void_cookie_t 929 xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */, 930 xcb_xfixes_region_t source1 /**< */, 931 xcb_xfixes_region_t source2 /**< */, 932 xcb_xfixes_region_t destination /**< */) 933 { 934 static const xcb_protocol_request_t xcb_req = { 935 /* count */ 2, 936 /* ext */ &xcb_xfixes_id, 937 /* opcode */ XCB_XFIXES_UNION_REGION, 938 /* isvoid */ 1 939 }; 940 941 struct iovec xcb_parts[4]; 942 xcb_void_cookie_t xcb_ret; 943 xcb_xfixes_union_region_request_t xcb_out; 944 945 xcb_out.source1 = source1; 946 xcb_out.source2 = source2; 947 xcb_out.destination = destination; 948 949 xcb_parts[2].iov_base = (char *) &xcb_out; 950 xcb_parts[2].iov_len = sizeof(xcb_out); 951 xcb_parts[3].iov_base = 0; 952 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 953 954 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 955 return xcb_ret; 956 } 957 958 xcb_void_cookie_t 959 xcb_xfixes_union_region (xcb_connection_t *c /**< */, 960 xcb_xfixes_region_t source1 /**< */, 961 xcb_xfixes_region_t source2 /**< */, 962 xcb_xfixes_region_t destination /**< */) 963 { 964 static const xcb_protocol_request_t xcb_req = { 965 /* count */ 2, 966 /* ext */ &xcb_xfixes_id, 967 /* opcode */ XCB_XFIXES_UNION_REGION, 968 /* isvoid */ 1 969 }; 970 971 struct iovec xcb_parts[4]; 972 xcb_void_cookie_t xcb_ret; 973 xcb_xfixes_union_region_request_t xcb_out; 974 975 xcb_out.source1 = source1; 976 xcb_out.source2 = source2; 977 xcb_out.destination = destination; 978 979 xcb_parts[2].iov_base = (char *) &xcb_out; 980 xcb_parts[2].iov_len = sizeof(xcb_out); 981 xcb_parts[3].iov_base = 0; 982 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 983 984 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 985 return xcb_ret; 986 } 987 988 xcb_void_cookie_t 989 xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */, 990 xcb_xfixes_region_t source1 /**< */, 991 xcb_xfixes_region_t source2 /**< */, 992 xcb_xfixes_region_t destination /**< */) 993 { 994 static const xcb_protocol_request_t xcb_req = { 995 /* count */ 2, 996 /* ext */ &xcb_xfixes_id, 997 /* opcode */ XCB_XFIXES_INTERSECT_REGION, 998 /* isvoid */ 1 999 }; 1000 1001 struct iovec xcb_parts[4]; 1002 xcb_void_cookie_t xcb_ret; 1003 xcb_xfixes_intersect_region_request_t xcb_out; 1004 1005 xcb_out.source1 = source1; 1006 xcb_out.source2 = source2; 1007 xcb_out.destination = destination; 1008 1009 xcb_parts[2].iov_base = (char *) &xcb_out; 1010 xcb_parts[2].iov_len = sizeof(xcb_out); 1011 xcb_parts[3].iov_base = 0; 1012 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1013 1014 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1015 return xcb_ret; 1016 } 1017 1018 xcb_void_cookie_t 1019 xcb_xfixes_intersect_region (xcb_connection_t *c /**< */, 1020 xcb_xfixes_region_t source1 /**< */, 1021 xcb_xfixes_region_t source2 /**< */, 1022 xcb_xfixes_region_t destination /**< */) 1023 { 1024 static const xcb_protocol_request_t xcb_req = { 1025 /* count */ 2, 1026 /* ext */ &xcb_xfixes_id, 1027 /* opcode */ XCB_XFIXES_INTERSECT_REGION, 1028 /* isvoid */ 1 1029 }; 1030 1031 struct iovec xcb_parts[4]; 1032 xcb_void_cookie_t xcb_ret; 1033 xcb_xfixes_intersect_region_request_t xcb_out; 1034 1035 xcb_out.source1 = source1; 1036 xcb_out.source2 = source2; 1037 xcb_out.destination = destination; 1038 1039 xcb_parts[2].iov_base = (char *) &xcb_out; 1040 xcb_parts[2].iov_len = sizeof(xcb_out); 1041 xcb_parts[3].iov_base = 0; 1042 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1043 1044 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1045 return xcb_ret; 1046 } 1047 1048 xcb_void_cookie_t 1049 xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */, 1050 xcb_xfixes_region_t source1 /**< */, 1051 xcb_xfixes_region_t source2 /**< */, 1052 xcb_xfixes_region_t destination /**< */) 1053 { 1054 static const xcb_protocol_request_t xcb_req = { 1055 /* count */ 2, 1056 /* ext */ &xcb_xfixes_id, 1057 /* opcode */ XCB_XFIXES_SUBTRACT_REGION, 1058 /* isvoid */ 1 1059 }; 1060 1061 struct iovec xcb_parts[4]; 1062 xcb_void_cookie_t xcb_ret; 1063 xcb_xfixes_subtract_region_request_t xcb_out; 1064 1065 xcb_out.source1 = source1; 1066 xcb_out.source2 = source2; 1067 xcb_out.destination = destination; 1068 1069 xcb_parts[2].iov_base = (char *) &xcb_out; 1070 xcb_parts[2].iov_len = sizeof(xcb_out); 1071 xcb_parts[3].iov_base = 0; 1072 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1073 1074 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1075 return xcb_ret; 1076 } 1077 1078 xcb_void_cookie_t 1079 xcb_xfixes_subtract_region (xcb_connection_t *c /**< */, 1080 xcb_xfixes_region_t source1 /**< */, 1081 xcb_xfixes_region_t source2 /**< */, 1082 xcb_xfixes_region_t destination /**< */) 1083 { 1084 static const xcb_protocol_request_t xcb_req = { 1085 /* count */ 2, 1086 /* ext */ &xcb_xfixes_id, 1087 /* opcode */ XCB_XFIXES_SUBTRACT_REGION, 1088 /* isvoid */ 1 1089 }; 1090 1091 struct iovec xcb_parts[4]; 1092 xcb_void_cookie_t xcb_ret; 1093 xcb_xfixes_subtract_region_request_t xcb_out; 1094 1095 xcb_out.source1 = source1; 1096 xcb_out.source2 = source2; 1097 xcb_out.destination = destination; 1098 1099 xcb_parts[2].iov_base = (char *) &xcb_out; 1100 xcb_parts[2].iov_len = sizeof(xcb_out); 1101 xcb_parts[3].iov_base = 0; 1102 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1103 1104 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1105 return xcb_ret; 1106 } 1107 1108 xcb_void_cookie_t 1109 xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */, 1110 xcb_xfixes_region_t source /**< */, 1111 xcb_rectangle_t bounds /**< */, 1112 xcb_xfixes_region_t destination /**< */) 1113 { 1114 static const xcb_protocol_request_t xcb_req = { 1115 /* count */ 2, 1116 /* ext */ &xcb_xfixes_id, 1117 /* opcode */ XCB_XFIXES_INVERT_REGION, 1118 /* isvoid */ 1 1119 }; 1120 1121 struct iovec xcb_parts[4]; 1122 xcb_void_cookie_t xcb_ret; 1123 xcb_xfixes_invert_region_request_t xcb_out; 1124 1125 xcb_out.source = source; 1126 xcb_out.bounds = bounds; 1127 xcb_out.destination = destination; 1128 1129 xcb_parts[2].iov_base = (char *) &xcb_out; 1130 xcb_parts[2].iov_len = sizeof(xcb_out); 1131 xcb_parts[3].iov_base = 0; 1132 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1133 1134 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1135 return xcb_ret; 1136 } 1137 1138 xcb_void_cookie_t 1139 xcb_xfixes_invert_region (xcb_connection_t *c /**< */, 1140 xcb_xfixes_region_t source /**< */, 1141 xcb_rectangle_t bounds /**< */, 1142 xcb_xfixes_region_t destination /**< */) 1143 { 1144 static const xcb_protocol_request_t xcb_req = { 1145 /* count */ 2, 1146 /* ext */ &xcb_xfixes_id, 1147 /* opcode */ XCB_XFIXES_INVERT_REGION, 1148 /* isvoid */ 1 1149 }; 1150 1151 struct iovec xcb_parts[4]; 1152 xcb_void_cookie_t xcb_ret; 1153 xcb_xfixes_invert_region_request_t xcb_out; 1154 1155 xcb_out.source = source; 1156 xcb_out.bounds = bounds; 1157 xcb_out.destination = destination; 1158 1159 xcb_parts[2].iov_base = (char *) &xcb_out; 1160 xcb_parts[2].iov_len = sizeof(xcb_out); 1161 xcb_parts[3].iov_base = 0; 1162 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1163 1164 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1165 return xcb_ret; 1166 } 1167 1168 xcb_void_cookie_t 1169 xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */, 1170 xcb_xfixes_region_t region /**< */, 1171 int16_t dx /**< */, 1172 int16_t dy /**< */) 1173 { 1174 static const xcb_protocol_request_t xcb_req = { 1175 /* count */ 2, 1176 /* ext */ &xcb_xfixes_id, 1177 /* opcode */ XCB_XFIXES_TRANSLATE_REGION, 1178 /* isvoid */ 1 1179 }; 1180 1181 struct iovec xcb_parts[4]; 1182 xcb_void_cookie_t xcb_ret; 1183 xcb_xfixes_translate_region_request_t xcb_out; 1184 1185 xcb_out.region = region; 1186 xcb_out.dx = dx; 1187 xcb_out.dy = dy; 1188 1189 xcb_parts[2].iov_base = (char *) &xcb_out; 1190 xcb_parts[2].iov_len = sizeof(xcb_out); 1191 xcb_parts[3].iov_base = 0; 1192 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1193 1194 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1195 return xcb_ret; 1196 } 1197 1198 xcb_void_cookie_t 1199 xcb_xfixes_translate_region (xcb_connection_t *c /**< */, 1200 xcb_xfixes_region_t region /**< */, 1201 int16_t dx /**< */, 1202 int16_t dy /**< */) 1203 { 1204 static const xcb_protocol_request_t xcb_req = { 1205 /* count */ 2, 1206 /* ext */ &xcb_xfixes_id, 1207 /* opcode */ XCB_XFIXES_TRANSLATE_REGION, 1208 /* isvoid */ 1 1209 }; 1210 1211 struct iovec xcb_parts[4]; 1212 xcb_void_cookie_t xcb_ret; 1213 xcb_xfixes_translate_region_request_t xcb_out; 1214 1215 xcb_out.region = region; 1216 xcb_out.dx = dx; 1217 xcb_out.dy = dy; 1218 1219 xcb_parts[2].iov_base = (char *) &xcb_out; 1220 xcb_parts[2].iov_len = sizeof(xcb_out); 1221 xcb_parts[3].iov_base = 0; 1222 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1223 1224 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1225 return xcb_ret; 1226 } 1227 1228 xcb_void_cookie_t 1229 xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */, 1230 xcb_xfixes_region_t source /**< */, 1231 xcb_xfixes_region_t destination /**< */) 1232 { 1233 static const xcb_protocol_request_t xcb_req = { 1234 /* count */ 2, 1235 /* ext */ &xcb_xfixes_id, 1236 /* opcode */ XCB_XFIXES_REGION_EXTENTS, 1237 /* isvoid */ 1 1238 }; 1239 1240 struct iovec xcb_parts[4]; 1241 xcb_void_cookie_t xcb_ret; 1242 xcb_xfixes_region_extents_request_t xcb_out; 1243 1244 xcb_out.source = source; 1245 xcb_out.destination = destination; 1246 1247 xcb_parts[2].iov_base = (char *) &xcb_out; 1248 xcb_parts[2].iov_len = sizeof(xcb_out); 1249 xcb_parts[3].iov_base = 0; 1250 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1251 1252 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1253 return xcb_ret; 1254 } 1255 1256 xcb_void_cookie_t 1257 xcb_xfixes_region_extents (xcb_connection_t *c /**< */, 1258 xcb_xfixes_region_t source /**< */, 1259 xcb_xfixes_region_t destination /**< */) 1260 { 1261 static const xcb_protocol_request_t xcb_req = { 1262 /* count */ 2, 1263 /* ext */ &xcb_xfixes_id, 1264 /* opcode */ XCB_XFIXES_REGION_EXTENTS, 1265 /* isvoid */ 1 1266 }; 1267 1268 struct iovec xcb_parts[4]; 1269 xcb_void_cookie_t xcb_ret; 1270 xcb_xfixes_region_extents_request_t xcb_out; 1271 1272 xcb_out.source = source; 1273 xcb_out.destination = destination; 1274 1275 xcb_parts[2].iov_base = (char *) &xcb_out; 1276 xcb_parts[2].iov_len = sizeof(xcb_out); 1277 xcb_parts[3].iov_base = 0; 1278 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1279 1280 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1281 return xcb_ret; 1282 } 1283 1284 int 1285 xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */) 1286 { 1287 char *xcb_tmp = (char *)_buffer; 1288 const xcb_xfixes_fetch_region_reply_t *_aux = (xcb_xfixes_fetch_region_reply_t *)_buffer; 1289 unsigned int xcb_buffer_len = 0; 1290 unsigned int xcb_block_len = 0; 1291 unsigned int xcb_pad = 0; 1292 unsigned int xcb_align_to = 0; 1293 1294 1295 xcb_block_len += sizeof(xcb_xfixes_fetch_region_reply_t); 1296 xcb_tmp += xcb_block_len; 1297 xcb_buffer_len += xcb_block_len; 1298 xcb_block_len = 0; 1299 /* rectangles */ 1300 xcb_block_len += (_aux->length / 2) * sizeof(xcb_rectangle_t); 1301 xcb_tmp += xcb_block_len; 1302 xcb_align_to = ALIGNOF(xcb_rectangle_t); 1303 /* insert padding */ 1304 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1305 xcb_buffer_len += xcb_block_len + xcb_pad; 1306 if (0 != xcb_pad) { 1307 xcb_tmp += xcb_pad; 1308 xcb_pad = 0; 1309 } 1310 xcb_block_len = 0; 1311 1312 return xcb_buffer_len; 1313 } 1314 1315 xcb_xfixes_fetch_region_cookie_t 1316 xcb_xfixes_fetch_region (xcb_connection_t *c /**< */, 1317 xcb_xfixes_region_t region /**< */) 1318 { 1319 static const xcb_protocol_request_t xcb_req = { 1320 /* count */ 2, 1321 /* ext */ &xcb_xfixes_id, 1322 /* opcode */ XCB_XFIXES_FETCH_REGION, 1323 /* isvoid */ 0 1324 }; 1325 1326 struct iovec xcb_parts[4]; 1327 xcb_xfixes_fetch_region_cookie_t xcb_ret; 1328 xcb_xfixes_fetch_region_request_t xcb_out; 1329 1330 xcb_out.region = region; 1331 1332 xcb_parts[2].iov_base = (char *) &xcb_out; 1333 xcb_parts[2].iov_len = sizeof(xcb_out); 1334 xcb_parts[3].iov_base = 0; 1335 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1336 1337 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1338 return xcb_ret; 1339 } 1340 1341 xcb_xfixes_fetch_region_cookie_t 1342 xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */, 1343 xcb_xfixes_region_t region /**< */) 1344 { 1345 static const xcb_protocol_request_t xcb_req = { 1346 /* count */ 2, 1347 /* ext */ &xcb_xfixes_id, 1348 /* opcode */ XCB_XFIXES_FETCH_REGION, 1349 /* isvoid */ 0 1350 }; 1351 1352 struct iovec xcb_parts[4]; 1353 xcb_xfixes_fetch_region_cookie_t xcb_ret; 1354 xcb_xfixes_fetch_region_request_t xcb_out; 1355 1356 xcb_out.region = region; 1357 1358 xcb_parts[2].iov_base = (char *) &xcb_out; 1359 xcb_parts[2].iov_len = sizeof(xcb_out); 1360 xcb_parts[3].iov_base = 0; 1361 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1362 1363 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1364 return xcb_ret; 1365 } 1366 1367 xcb_rectangle_t * 1368 xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */) 1369 { 1370 return (xcb_rectangle_t *) (R + 1); 1371 } 1372 1373 int 1374 xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */) 1375 { 1376 return (R->length / 2); 1377 } 1378 1379 xcb_rectangle_iterator_t 1380 xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */) 1381 { 1382 xcb_rectangle_iterator_t i; 1383 i.data = (xcb_rectangle_t *) (R + 1); 1384 i.rem = (R->length / 2); 1385 i.index = (char *) i.data - (char *) R; 1386 return i; 1387 } 1388 1389 xcb_xfixes_fetch_region_reply_t * 1390 xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */, 1391 xcb_xfixes_fetch_region_cookie_t cookie /**< */, 1392 xcb_generic_error_t **e /**< */) 1393 { 1394 return (xcb_xfixes_fetch_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1395 } 1396 1397 xcb_void_cookie_t 1398 xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */, 1399 xcb_gcontext_t gc /**< */, 1400 xcb_xfixes_region_t region /**< */, 1401 int16_t x_origin /**< */, 1402 int16_t y_origin /**< */) 1403 { 1404 static const xcb_protocol_request_t xcb_req = { 1405 /* count */ 2, 1406 /* ext */ &xcb_xfixes_id, 1407 /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION, 1408 /* isvoid */ 1 1409 }; 1410 1411 struct iovec xcb_parts[4]; 1412 xcb_void_cookie_t xcb_ret; 1413 xcb_xfixes_set_gc_clip_region_request_t xcb_out; 1414 1415 xcb_out.gc = gc; 1416 xcb_out.region = region; 1417 xcb_out.x_origin = x_origin; 1418 xcb_out.y_origin = y_origin; 1419 1420 xcb_parts[2].iov_base = (char *) &xcb_out; 1421 xcb_parts[2].iov_len = sizeof(xcb_out); 1422 xcb_parts[3].iov_base = 0; 1423 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1424 1425 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1426 return xcb_ret; 1427 } 1428 1429 xcb_void_cookie_t 1430 xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */, 1431 xcb_gcontext_t gc /**< */, 1432 xcb_xfixes_region_t region /**< */, 1433 int16_t x_origin /**< */, 1434 int16_t y_origin /**< */) 1435 { 1436 static const xcb_protocol_request_t xcb_req = { 1437 /* count */ 2, 1438 /* ext */ &xcb_xfixes_id, 1439 /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION, 1440 /* isvoid */ 1 1441 }; 1442 1443 struct iovec xcb_parts[4]; 1444 xcb_void_cookie_t xcb_ret; 1445 xcb_xfixes_set_gc_clip_region_request_t xcb_out; 1446 1447 xcb_out.gc = gc; 1448 xcb_out.region = region; 1449 xcb_out.x_origin = x_origin; 1450 xcb_out.y_origin = y_origin; 1451 1452 xcb_parts[2].iov_base = (char *) &xcb_out; 1453 xcb_parts[2].iov_len = sizeof(xcb_out); 1454 xcb_parts[3].iov_base = 0; 1455 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1456 1457 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1458 return xcb_ret; 1459 } 1460 1461 xcb_void_cookie_t 1462 xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */, 1463 xcb_window_t dest /**< */, 1464 xcb_shape_kind_t dest_kind /**< */, 1465 int16_t x_offset /**< */, 1466 int16_t y_offset /**< */, 1467 xcb_xfixes_region_t region /**< */) 1468 { 1469 static const xcb_protocol_request_t xcb_req = { 1470 /* count */ 2, 1471 /* ext */ &xcb_xfixes_id, 1472 /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION, 1473 /* isvoid */ 1 1474 }; 1475 1476 struct iovec xcb_parts[4]; 1477 xcb_void_cookie_t xcb_ret; 1478 xcb_xfixes_set_window_shape_region_request_t xcb_out; 1479 1480 xcb_out.dest = dest; 1481 xcb_out.dest_kind = dest_kind; 1482 memset(xcb_out.pad0, 0, 3); 1483 xcb_out.x_offset = x_offset; 1484 xcb_out.y_offset = y_offset; 1485 xcb_out.region = region; 1486 1487 xcb_parts[2].iov_base = (char *) &xcb_out; 1488 xcb_parts[2].iov_len = sizeof(xcb_out); 1489 xcb_parts[3].iov_base = 0; 1490 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1491 1492 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1493 return xcb_ret; 1494 } 1495 1496 xcb_void_cookie_t 1497 xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */, 1498 xcb_window_t dest /**< */, 1499 xcb_shape_kind_t dest_kind /**< */, 1500 int16_t x_offset /**< */, 1501 int16_t y_offset /**< */, 1502 xcb_xfixes_region_t region /**< */) 1503 { 1504 static const xcb_protocol_request_t xcb_req = { 1505 /* count */ 2, 1506 /* ext */ &xcb_xfixes_id, 1507 /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION, 1508 /* isvoid */ 1 1509 }; 1510 1511 struct iovec xcb_parts[4]; 1512 xcb_void_cookie_t xcb_ret; 1513 xcb_xfixes_set_window_shape_region_request_t xcb_out; 1514 1515 xcb_out.dest = dest; 1516 xcb_out.dest_kind = dest_kind; 1517 memset(xcb_out.pad0, 0, 3); 1518 xcb_out.x_offset = x_offset; 1519 xcb_out.y_offset = y_offset; 1520 xcb_out.region = region; 1521 1522 xcb_parts[2].iov_base = (char *) &xcb_out; 1523 xcb_parts[2].iov_len = sizeof(xcb_out); 1524 xcb_parts[3].iov_base = 0; 1525 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1526 1527 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1528 return xcb_ret; 1529 } 1530 1531 xcb_void_cookie_t 1532 xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */, 1533 xcb_render_picture_t picture /**< */, 1534 xcb_xfixes_region_t region /**< */, 1535 int16_t x_origin /**< */, 1536 int16_t y_origin /**< */) 1537 { 1538 static const xcb_protocol_request_t xcb_req = { 1539 /* count */ 2, 1540 /* ext */ &xcb_xfixes_id, 1541 /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION, 1542 /* isvoid */ 1 1543 }; 1544 1545 struct iovec xcb_parts[4]; 1546 xcb_void_cookie_t xcb_ret; 1547 xcb_xfixes_set_picture_clip_region_request_t xcb_out; 1548 1549 xcb_out.picture = picture; 1550 xcb_out.region = region; 1551 xcb_out.x_origin = x_origin; 1552 xcb_out.y_origin = y_origin; 1553 1554 xcb_parts[2].iov_base = (char *) &xcb_out; 1555 xcb_parts[2].iov_len = sizeof(xcb_out); 1556 xcb_parts[3].iov_base = 0; 1557 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1558 1559 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1560 return xcb_ret; 1561 } 1562 1563 xcb_void_cookie_t 1564 xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */, 1565 xcb_render_picture_t picture /**< */, 1566 xcb_xfixes_region_t region /**< */, 1567 int16_t x_origin /**< */, 1568 int16_t y_origin /**< */) 1569 { 1570 static const xcb_protocol_request_t xcb_req = { 1571 /* count */ 2, 1572 /* ext */ &xcb_xfixes_id, 1573 /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION, 1574 /* isvoid */ 1 1575 }; 1576 1577 struct iovec xcb_parts[4]; 1578 xcb_void_cookie_t xcb_ret; 1579 xcb_xfixes_set_picture_clip_region_request_t xcb_out; 1580 1581 xcb_out.picture = picture; 1582 xcb_out.region = region; 1583 xcb_out.x_origin = x_origin; 1584 xcb_out.y_origin = y_origin; 1585 1586 xcb_parts[2].iov_base = (char *) &xcb_out; 1587 xcb_parts[2].iov_len = sizeof(xcb_out); 1588 xcb_parts[3].iov_base = 0; 1589 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1590 1591 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1592 return xcb_ret; 1593 } 1594 1595 int 1596 xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */) 1597 { 1598 char *xcb_tmp = (char *)_buffer; 1599 const xcb_xfixes_set_cursor_name_request_t *_aux = (xcb_xfixes_set_cursor_name_request_t *)_buffer; 1600 unsigned int xcb_buffer_len = 0; 1601 unsigned int xcb_block_len = 0; 1602 unsigned int xcb_pad = 0; 1603 unsigned int xcb_align_to = 0; 1604 1605 1606 xcb_block_len += sizeof(xcb_xfixes_set_cursor_name_request_t); 1607 xcb_tmp += xcb_block_len; 1608 xcb_buffer_len += xcb_block_len; 1609 xcb_block_len = 0; 1610 /* name */ 1611 xcb_block_len += _aux->nbytes * sizeof(char); 1612 xcb_tmp += xcb_block_len; 1613 xcb_align_to = ALIGNOF(char); 1614 /* insert padding */ 1615 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1616 xcb_buffer_len += xcb_block_len + xcb_pad; 1617 if (0 != xcb_pad) { 1618 xcb_tmp += xcb_pad; 1619 xcb_pad = 0; 1620 } 1621 xcb_block_len = 0; 1622 1623 return xcb_buffer_len; 1624 } 1625 1626 xcb_void_cookie_t 1627 xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */, 1628 xcb_cursor_t cursor /**< */, 1629 uint16_t nbytes /**< */, 1630 const char *name /**< */) 1631 { 1632 static const xcb_protocol_request_t xcb_req = { 1633 /* count */ 4, 1634 /* ext */ &xcb_xfixes_id, 1635 /* opcode */ XCB_XFIXES_SET_CURSOR_NAME, 1636 /* isvoid */ 1 1637 }; 1638 1639 struct iovec xcb_parts[6]; 1640 xcb_void_cookie_t xcb_ret; 1641 xcb_xfixes_set_cursor_name_request_t xcb_out; 1642 1643 xcb_out.cursor = cursor; 1644 xcb_out.nbytes = nbytes; 1645 memset(xcb_out.pad0, 0, 2); 1646 1647 xcb_parts[2].iov_base = (char *) &xcb_out; 1648 xcb_parts[2].iov_len = sizeof(xcb_out); 1649 xcb_parts[3].iov_base = 0; 1650 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1651 /* char name */ 1652 xcb_parts[4].iov_base = (char *) name; 1653 xcb_parts[4].iov_len = nbytes * sizeof(char); 1654 xcb_parts[5].iov_base = 0; 1655 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1656 1657 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1658 return xcb_ret; 1659 } 1660 1661 xcb_void_cookie_t 1662 xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */, 1663 xcb_cursor_t cursor /**< */, 1664 uint16_t nbytes /**< */, 1665 const char *name /**< */) 1666 { 1667 static const xcb_protocol_request_t xcb_req = { 1668 /* count */ 4, 1669 /* ext */ &xcb_xfixes_id, 1670 /* opcode */ XCB_XFIXES_SET_CURSOR_NAME, 1671 /* isvoid */ 1 1672 }; 1673 1674 struct iovec xcb_parts[6]; 1675 xcb_void_cookie_t xcb_ret; 1676 xcb_xfixes_set_cursor_name_request_t xcb_out; 1677 1678 xcb_out.cursor = cursor; 1679 xcb_out.nbytes = nbytes; 1680 memset(xcb_out.pad0, 0, 2); 1681 1682 xcb_parts[2].iov_base = (char *) &xcb_out; 1683 xcb_parts[2].iov_len = sizeof(xcb_out); 1684 xcb_parts[3].iov_base = 0; 1685 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1686 /* char name */ 1687 xcb_parts[4].iov_base = (char *) name; 1688 xcb_parts[4].iov_len = nbytes * sizeof(char); 1689 xcb_parts[5].iov_base = 0; 1690 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 1691 1692 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1693 return xcb_ret; 1694 } 1695 1696 int 1697 xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */) 1698 { 1699 char *xcb_tmp = (char *)_buffer; 1700 const xcb_xfixes_get_cursor_name_reply_t *_aux = (xcb_xfixes_get_cursor_name_reply_t *)_buffer; 1701 unsigned int xcb_buffer_len = 0; 1702 unsigned int xcb_block_len = 0; 1703 unsigned int xcb_pad = 0; 1704 unsigned int xcb_align_to = 0; 1705 1706 1707 xcb_block_len += sizeof(xcb_xfixes_get_cursor_name_reply_t); 1708 xcb_tmp += xcb_block_len; 1709 xcb_buffer_len += xcb_block_len; 1710 xcb_block_len = 0; 1711 /* name */ 1712 xcb_block_len += _aux->nbytes * sizeof(char); 1713 xcb_tmp += xcb_block_len; 1714 xcb_align_to = ALIGNOF(char); 1715 /* insert padding */ 1716 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1717 xcb_buffer_len += xcb_block_len + xcb_pad; 1718 if (0 != xcb_pad) { 1719 xcb_tmp += xcb_pad; 1720 xcb_pad = 0; 1721 } 1722 xcb_block_len = 0; 1723 1724 return xcb_buffer_len; 1725 } 1726 1727 xcb_xfixes_get_cursor_name_cookie_t 1728 xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */, 1729 xcb_cursor_t cursor /**< */) 1730 { 1731 static const xcb_protocol_request_t xcb_req = { 1732 /* count */ 2, 1733 /* ext */ &xcb_xfixes_id, 1734 /* opcode */ XCB_XFIXES_GET_CURSOR_NAME, 1735 /* isvoid */ 0 1736 }; 1737 1738 struct iovec xcb_parts[4]; 1739 xcb_xfixes_get_cursor_name_cookie_t xcb_ret; 1740 xcb_xfixes_get_cursor_name_request_t xcb_out; 1741 1742 xcb_out.cursor = cursor; 1743 1744 xcb_parts[2].iov_base = (char *) &xcb_out; 1745 xcb_parts[2].iov_len = sizeof(xcb_out); 1746 xcb_parts[3].iov_base = 0; 1747 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1748 1749 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1750 return xcb_ret; 1751 } 1752 1753 xcb_xfixes_get_cursor_name_cookie_t 1754 xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */, 1755 xcb_cursor_t cursor /**< */) 1756 { 1757 static const xcb_protocol_request_t xcb_req = { 1758 /* count */ 2, 1759 /* ext */ &xcb_xfixes_id, 1760 /* opcode */ XCB_XFIXES_GET_CURSOR_NAME, 1761 /* isvoid */ 0 1762 }; 1763 1764 struct iovec xcb_parts[4]; 1765 xcb_xfixes_get_cursor_name_cookie_t xcb_ret; 1766 xcb_xfixes_get_cursor_name_request_t xcb_out; 1767 1768 xcb_out.cursor = cursor; 1769 1770 xcb_parts[2].iov_base = (char *) &xcb_out; 1771 xcb_parts[2].iov_len = sizeof(xcb_out); 1772 xcb_parts[3].iov_base = 0; 1773 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1774 1775 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1776 return xcb_ret; 1777 } 1778 1779 char * 1780 xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) 1781 { 1782 return (char *) (R + 1); 1783 } 1784 1785 int 1786 xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) 1787 { 1788 return R->nbytes; 1789 } 1790 1791 xcb_generic_iterator_t 1792 xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) 1793 { 1794 xcb_generic_iterator_t i; 1795 i.data = ((char *) (R + 1)) + (R->nbytes); 1796 i.rem = 0; 1797 i.index = (char *) i.data - (char *) R; 1798 return i; 1799 } 1800 1801 xcb_xfixes_get_cursor_name_reply_t * 1802 xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */, 1803 xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, 1804 xcb_generic_error_t **e /**< */) 1805 { 1806 return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1807 } 1808 1809 int 1810 xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */) 1811 { 1812 char *xcb_tmp = (char *)_buffer; 1813 const xcb_xfixes_get_cursor_image_and_name_reply_t *_aux = (xcb_xfixes_get_cursor_image_and_name_reply_t *)_buffer; 1814 unsigned int xcb_buffer_len = 0; 1815 unsigned int xcb_block_len = 0; 1816 unsigned int xcb_pad = 0; 1817 unsigned int xcb_align_to = 0; 1818 1819 1820 xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_and_name_reply_t); 1821 xcb_tmp += xcb_block_len; 1822 xcb_buffer_len += xcb_block_len; 1823 xcb_block_len = 0; 1824 /* name */ 1825 xcb_block_len += _aux->nbytes * sizeof(char); 1826 xcb_tmp += xcb_block_len; 1827 xcb_align_to = ALIGNOF(char); 1828 /* insert padding */ 1829 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1830 xcb_buffer_len += xcb_block_len + xcb_pad; 1831 if (0 != xcb_pad) { 1832 xcb_tmp += xcb_pad; 1833 xcb_pad = 0; 1834 } 1835 xcb_block_len = 0; 1836 /* cursor_image */ 1837 xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t); 1838 xcb_tmp += xcb_block_len; 1839 xcb_align_to = ALIGNOF(uint32_t); 1840 /* insert padding */ 1841 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 1842 xcb_buffer_len += xcb_block_len + xcb_pad; 1843 if (0 != xcb_pad) { 1844 xcb_tmp += xcb_pad; 1845 xcb_pad = 0; 1846 } 1847 xcb_block_len = 0; 1848 1849 return xcb_buffer_len; 1850 } 1851 1852 xcb_xfixes_get_cursor_image_and_name_cookie_t 1853 xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */) 1854 { 1855 static const xcb_protocol_request_t xcb_req = { 1856 /* count */ 2, 1857 /* ext */ &xcb_xfixes_id, 1858 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME, 1859 /* isvoid */ 0 1860 }; 1861 1862 struct iovec xcb_parts[4]; 1863 xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret; 1864 xcb_xfixes_get_cursor_image_and_name_request_t xcb_out; 1865 1866 1867 xcb_parts[2].iov_base = (char *) &xcb_out; 1868 xcb_parts[2].iov_len = sizeof(xcb_out); 1869 xcb_parts[3].iov_base = 0; 1870 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1871 1872 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1873 return xcb_ret; 1874 } 1875 1876 xcb_xfixes_get_cursor_image_and_name_cookie_t 1877 xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */) 1878 { 1879 static const xcb_protocol_request_t xcb_req = { 1880 /* count */ 2, 1881 /* ext */ &xcb_xfixes_id, 1882 /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME, 1883 /* isvoid */ 0 1884 }; 1885 1886 struct iovec xcb_parts[4]; 1887 xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret; 1888 xcb_xfixes_get_cursor_image_and_name_request_t xcb_out; 1889 1890 1891 xcb_parts[2].iov_base = (char *) &xcb_out; 1892 xcb_parts[2].iov_len = sizeof(xcb_out); 1893 xcb_parts[3].iov_base = 0; 1894 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1895 1896 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 1897 return xcb_ret; 1898 } 1899 1900 char * 1901 xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 1902 { 1903 return (char *) (R + 1); 1904 } 1905 1906 int 1907 xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 1908 { 1909 return R->nbytes; 1910 } 1911 1912 xcb_generic_iterator_t 1913 xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 1914 { 1915 xcb_generic_iterator_t i; 1916 i.data = ((char *) (R + 1)) + (R->nbytes); 1917 i.rem = 0; 1918 i.index = (char *) i.data - (char *) R; 1919 return i; 1920 } 1921 1922 uint32_t * 1923 xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 1924 { 1925 xcb_generic_iterator_t prev = xcb_xfixes_get_cursor_image_and_name_name_end(R); 1926 return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); 1927 } 1928 1929 int 1930 xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 1931 { 1932 return (R->width * R->height); 1933 } 1934 1935 xcb_generic_iterator_t 1936 xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) 1937 { 1938 xcb_generic_iterator_t i; 1939 xcb_generic_iterator_t child = xcb_xfixes_get_cursor_image_and_name_name_end(R); 1940 i.data = ((uint32_t *) child.data) + ((R->width * R->height)); 1941 i.rem = 0; 1942 i.index = (char *) i.data - (char *) R; 1943 return i; 1944 } 1945 1946 xcb_xfixes_get_cursor_image_and_name_reply_t * 1947 xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */, 1948 xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */, 1949 xcb_generic_error_t **e /**< */) 1950 { 1951 return (xcb_xfixes_get_cursor_image_and_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 1952 } 1953 1954 xcb_void_cookie_t 1955 xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */, 1956 xcb_cursor_t source /**< */, 1957 xcb_cursor_t destination /**< */) 1958 { 1959 static const xcb_protocol_request_t xcb_req = { 1960 /* count */ 2, 1961 /* ext */ &xcb_xfixes_id, 1962 /* opcode */ XCB_XFIXES_CHANGE_CURSOR, 1963 /* isvoid */ 1 1964 }; 1965 1966 struct iovec xcb_parts[4]; 1967 xcb_void_cookie_t xcb_ret; 1968 xcb_xfixes_change_cursor_request_t xcb_out; 1969 1970 xcb_out.source = source; 1971 xcb_out.destination = destination; 1972 1973 xcb_parts[2].iov_base = (char *) &xcb_out; 1974 xcb_parts[2].iov_len = sizeof(xcb_out); 1975 xcb_parts[3].iov_base = 0; 1976 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 1977 1978 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 1979 return xcb_ret; 1980 } 1981 1982 xcb_void_cookie_t 1983 xcb_xfixes_change_cursor (xcb_connection_t *c /**< */, 1984 xcb_cursor_t source /**< */, 1985 xcb_cursor_t destination /**< */) 1986 { 1987 static const xcb_protocol_request_t xcb_req = { 1988 /* count */ 2, 1989 /* ext */ &xcb_xfixes_id, 1990 /* opcode */ XCB_XFIXES_CHANGE_CURSOR, 1991 /* isvoid */ 1 1992 }; 1993 1994 struct iovec xcb_parts[4]; 1995 xcb_void_cookie_t xcb_ret; 1996 xcb_xfixes_change_cursor_request_t xcb_out; 1997 1998 xcb_out.source = source; 1999 xcb_out.destination = destination; 2000 2001 xcb_parts[2].iov_base = (char *) &xcb_out; 2002 xcb_parts[2].iov_len = sizeof(xcb_out); 2003 xcb_parts[3].iov_base = 0; 2004 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2005 2006 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2007 return xcb_ret; 2008 } 2009 2010 int 2011 xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */) 2012 { 2013 char *xcb_tmp = (char *)_buffer; 2014 const xcb_xfixes_change_cursor_by_name_request_t *_aux = (xcb_xfixes_change_cursor_by_name_request_t *)_buffer; 2015 unsigned int xcb_buffer_len = 0; 2016 unsigned int xcb_block_len = 0; 2017 unsigned int xcb_pad = 0; 2018 unsigned int xcb_align_to = 0; 2019 2020 2021 xcb_block_len += sizeof(xcb_xfixes_change_cursor_by_name_request_t); 2022 xcb_tmp += xcb_block_len; 2023 xcb_buffer_len += xcb_block_len; 2024 xcb_block_len = 0; 2025 /* name */ 2026 xcb_block_len += _aux->nbytes * sizeof(char); 2027 xcb_tmp += xcb_block_len; 2028 xcb_align_to = ALIGNOF(char); 2029 /* insert padding */ 2030 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2031 xcb_buffer_len += xcb_block_len + xcb_pad; 2032 if (0 != xcb_pad) { 2033 xcb_tmp += xcb_pad; 2034 xcb_pad = 0; 2035 } 2036 xcb_block_len = 0; 2037 2038 return xcb_buffer_len; 2039 } 2040 2041 xcb_void_cookie_t 2042 xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */, 2043 xcb_cursor_t src /**< */, 2044 uint16_t nbytes /**< */, 2045 const char *name /**< */) 2046 { 2047 static const xcb_protocol_request_t xcb_req = { 2048 /* count */ 4, 2049 /* ext */ &xcb_xfixes_id, 2050 /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME, 2051 /* isvoid */ 1 2052 }; 2053 2054 struct iovec xcb_parts[6]; 2055 xcb_void_cookie_t xcb_ret; 2056 xcb_xfixes_change_cursor_by_name_request_t xcb_out; 2057 2058 xcb_out.src = src; 2059 xcb_out.nbytes = nbytes; 2060 memset(xcb_out.pad0, 0, 2); 2061 2062 xcb_parts[2].iov_base = (char *) &xcb_out; 2063 xcb_parts[2].iov_len = sizeof(xcb_out); 2064 xcb_parts[3].iov_base = 0; 2065 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2066 /* char name */ 2067 xcb_parts[4].iov_base = (char *) name; 2068 xcb_parts[4].iov_len = nbytes * sizeof(char); 2069 xcb_parts[5].iov_base = 0; 2070 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2071 2072 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2073 return xcb_ret; 2074 } 2075 2076 xcb_void_cookie_t 2077 xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */, 2078 xcb_cursor_t src /**< */, 2079 uint16_t nbytes /**< */, 2080 const char *name /**< */) 2081 { 2082 static const xcb_protocol_request_t xcb_req = { 2083 /* count */ 4, 2084 /* ext */ &xcb_xfixes_id, 2085 /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME, 2086 /* isvoid */ 1 2087 }; 2088 2089 struct iovec xcb_parts[6]; 2090 xcb_void_cookie_t xcb_ret; 2091 xcb_xfixes_change_cursor_by_name_request_t xcb_out; 2092 2093 xcb_out.src = src; 2094 xcb_out.nbytes = nbytes; 2095 memset(xcb_out.pad0, 0, 2); 2096 2097 xcb_parts[2].iov_base = (char *) &xcb_out; 2098 xcb_parts[2].iov_len = sizeof(xcb_out); 2099 xcb_parts[3].iov_base = 0; 2100 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2101 /* char name */ 2102 xcb_parts[4].iov_base = (char *) name; 2103 xcb_parts[4].iov_len = nbytes * sizeof(char); 2104 xcb_parts[5].iov_base = 0; 2105 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2106 2107 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2108 return xcb_ret; 2109 } 2110 2111 xcb_void_cookie_t 2112 xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */, 2113 xcb_xfixes_region_t source /**< */, 2114 xcb_xfixes_region_t destination /**< */, 2115 uint16_t left /**< */, 2116 uint16_t right /**< */, 2117 uint16_t top /**< */, 2118 uint16_t bottom /**< */) 2119 { 2120 static const xcb_protocol_request_t xcb_req = { 2121 /* count */ 2, 2122 /* ext */ &xcb_xfixes_id, 2123 /* opcode */ XCB_XFIXES_EXPAND_REGION, 2124 /* isvoid */ 1 2125 }; 2126 2127 struct iovec xcb_parts[4]; 2128 xcb_void_cookie_t xcb_ret; 2129 xcb_xfixes_expand_region_request_t xcb_out; 2130 2131 xcb_out.source = source; 2132 xcb_out.destination = destination; 2133 xcb_out.left = left; 2134 xcb_out.right = right; 2135 xcb_out.top = top; 2136 xcb_out.bottom = bottom; 2137 2138 xcb_parts[2].iov_base = (char *) &xcb_out; 2139 xcb_parts[2].iov_len = sizeof(xcb_out); 2140 xcb_parts[3].iov_base = 0; 2141 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2142 2143 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2144 return xcb_ret; 2145 } 2146 2147 xcb_void_cookie_t 2148 xcb_xfixes_expand_region (xcb_connection_t *c /**< */, 2149 xcb_xfixes_region_t source /**< */, 2150 xcb_xfixes_region_t destination /**< */, 2151 uint16_t left /**< */, 2152 uint16_t right /**< */, 2153 uint16_t top /**< */, 2154 uint16_t bottom /**< */) 2155 { 2156 static const xcb_protocol_request_t xcb_req = { 2157 /* count */ 2, 2158 /* ext */ &xcb_xfixes_id, 2159 /* opcode */ XCB_XFIXES_EXPAND_REGION, 2160 /* isvoid */ 1 2161 }; 2162 2163 struct iovec xcb_parts[4]; 2164 xcb_void_cookie_t xcb_ret; 2165 xcb_xfixes_expand_region_request_t xcb_out; 2166 2167 xcb_out.source = source; 2168 xcb_out.destination = destination; 2169 xcb_out.left = left; 2170 xcb_out.right = right; 2171 xcb_out.top = top; 2172 xcb_out.bottom = bottom; 2173 2174 xcb_parts[2].iov_base = (char *) &xcb_out; 2175 xcb_parts[2].iov_len = sizeof(xcb_out); 2176 xcb_parts[3].iov_base = 0; 2177 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2178 2179 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2180 return xcb_ret; 2181 } 2182 2183 xcb_void_cookie_t 2184 xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */, 2185 xcb_window_t window /**< */) 2186 { 2187 static const xcb_protocol_request_t xcb_req = { 2188 /* count */ 2, 2189 /* ext */ &xcb_xfixes_id, 2190 /* opcode */ XCB_XFIXES_HIDE_CURSOR, 2191 /* isvoid */ 1 2192 }; 2193 2194 struct iovec xcb_parts[4]; 2195 xcb_void_cookie_t xcb_ret; 2196 xcb_xfixes_hide_cursor_request_t xcb_out; 2197 2198 xcb_out.window = window; 2199 2200 xcb_parts[2].iov_base = (char *) &xcb_out; 2201 xcb_parts[2].iov_len = sizeof(xcb_out); 2202 xcb_parts[3].iov_base = 0; 2203 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2204 2205 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2206 return xcb_ret; 2207 } 2208 2209 xcb_void_cookie_t 2210 xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */, 2211 xcb_window_t window /**< */) 2212 { 2213 static const xcb_protocol_request_t xcb_req = { 2214 /* count */ 2, 2215 /* ext */ &xcb_xfixes_id, 2216 /* opcode */ XCB_XFIXES_HIDE_CURSOR, 2217 /* isvoid */ 1 2218 }; 2219 2220 struct iovec xcb_parts[4]; 2221 xcb_void_cookie_t xcb_ret; 2222 xcb_xfixes_hide_cursor_request_t xcb_out; 2223 2224 xcb_out.window = window; 2225 2226 xcb_parts[2].iov_base = (char *) &xcb_out; 2227 xcb_parts[2].iov_len = sizeof(xcb_out); 2228 xcb_parts[3].iov_base = 0; 2229 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2230 2231 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2232 return xcb_ret; 2233 } 2234 2235 xcb_void_cookie_t 2236 xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */, 2237 xcb_window_t window /**< */) 2238 { 2239 static const xcb_protocol_request_t xcb_req = { 2240 /* count */ 2, 2241 /* ext */ &xcb_xfixes_id, 2242 /* opcode */ XCB_XFIXES_SHOW_CURSOR, 2243 /* isvoid */ 1 2244 }; 2245 2246 struct iovec xcb_parts[4]; 2247 xcb_void_cookie_t xcb_ret; 2248 xcb_xfixes_show_cursor_request_t xcb_out; 2249 2250 xcb_out.window = window; 2251 2252 xcb_parts[2].iov_base = (char *) &xcb_out; 2253 xcb_parts[2].iov_len = sizeof(xcb_out); 2254 xcb_parts[3].iov_base = 0; 2255 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2256 2257 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2258 return xcb_ret; 2259 } 2260 2261 xcb_void_cookie_t 2262 xcb_xfixes_show_cursor (xcb_connection_t *c /**< */, 2263 xcb_window_t window /**< */) 2264 { 2265 static const xcb_protocol_request_t xcb_req = { 2266 /* count */ 2, 2267 /* ext */ &xcb_xfixes_id, 2268 /* opcode */ XCB_XFIXES_SHOW_CURSOR, 2269 /* isvoid */ 1 2270 }; 2271 2272 struct iovec xcb_parts[4]; 2273 xcb_void_cookie_t xcb_ret; 2274 xcb_xfixes_show_cursor_request_t xcb_out; 2275 2276 xcb_out.window = window; 2277 2278 xcb_parts[2].iov_base = (char *) &xcb_out; 2279 xcb_parts[2].iov_len = sizeof(xcb_out); 2280 xcb_parts[3].iov_base = 0; 2281 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2282 2283 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2284 return xcb_ret; 2285 } 2286 2287 void 2288 xcb_xfixes_barrier_next (xcb_xfixes_barrier_iterator_t *i /**< */) 2289 { 2290 --i->rem; 2291 ++i->data; 2292 i->index += sizeof(xcb_xfixes_barrier_t); 2293 } 2294 2295 xcb_generic_iterator_t 2296 xcb_xfixes_barrier_end (xcb_xfixes_barrier_iterator_t i /**< */) 2297 { 2298 xcb_generic_iterator_t ret; 2299 ret.data = i.data + i.rem; 2300 ret.index = i.index + ((char *) ret.data - (char *) i.data); 2301 ret.rem = 0; 2302 return ret; 2303 } 2304 2305 int 2306 xcb_xfixes_create_pointer_barrier_sizeof (const void *_buffer /**< */) 2307 { 2308 char *xcb_tmp = (char *)_buffer; 2309 const xcb_xfixes_create_pointer_barrier_request_t *_aux = (xcb_xfixes_create_pointer_barrier_request_t *)_buffer; 2310 unsigned int xcb_buffer_len = 0; 2311 unsigned int xcb_block_len = 0; 2312 unsigned int xcb_pad = 0; 2313 unsigned int xcb_align_to = 0; 2314 2315 2316 xcb_block_len += sizeof(xcb_xfixes_create_pointer_barrier_request_t); 2317 xcb_tmp += xcb_block_len; 2318 xcb_buffer_len += xcb_block_len; 2319 xcb_block_len = 0; 2320 /* devices */ 2321 xcb_block_len += _aux->num_devices * sizeof(uint16_t); 2322 xcb_tmp += xcb_block_len; 2323 xcb_align_to = ALIGNOF(uint16_t); 2324 /* insert padding */ 2325 xcb_pad = -xcb_block_len & (xcb_align_to - 1); 2326 xcb_buffer_len += xcb_block_len + xcb_pad; 2327 if (0 != xcb_pad) { 2328 xcb_tmp += xcb_pad; 2329 xcb_pad = 0; 2330 } 2331 xcb_block_len = 0; 2332 2333 return xcb_buffer_len; 2334 } 2335 2336 xcb_void_cookie_t 2337 xcb_xfixes_create_pointer_barrier_checked (xcb_connection_t *c /**< */, 2338 xcb_xfixes_barrier_t barrier /**< */, 2339 xcb_window_t window /**< */, 2340 uint16_t x1 /**< */, 2341 uint16_t y1 /**< */, 2342 uint16_t x2 /**< */, 2343 uint16_t y2 /**< */, 2344 uint32_t directions /**< */, 2345 uint16_t num_devices /**< */, 2346 const uint16_t *devices /**< */) 2347 { 2348 static const xcb_protocol_request_t xcb_req = { 2349 /* count */ 4, 2350 /* ext */ &xcb_xfixes_id, 2351 /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER, 2352 /* isvoid */ 1 2353 }; 2354 2355 struct iovec xcb_parts[6]; 2356 xcb_void_cookie_t xcb_ret; 2357 xcb_xfixes_create_pointer_barrier_request_t xcb_out; 2358 2359 xcb_out.barrier = barrier; 2360 xcb_out.window = window; 2361 xcb_out.x1 = x1; 2362 xcb_out.y1 = y1; 2363 xcb_out.x2 = x2; 2364 xcb_out.y2 = y2; 2365 xcb_out.directions = directions; 2366 memset(xcb_out.pad0, 0, 2); 2367 xcb_out.num_devices = num_devices; 2368 2369 xcb_parts[2].iov_base = (char *) &xcb_out; 2370 xcb_parts[2].iov_len = sizeof(xcb_out); 2371 xcb_parts[3].iov_base = 0; 2372 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2373 /* uint16_t devices */ 2374 xcb_parts[4].iov_base = (char *) devices; 2375 xcb_parts[4].iov_len = num_devices * sizeof(uint16_t); 2376 xcb_parts[5].iov_base = 0; 2377 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2378 2379 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2380 return xcb_ret; 2381 } 2382 2383 xcb_void_cookie_t 2384 xcb_xfixes_create_pointer_barrier (xcb_connection_t *c /**< */, 2385 xcb_xfixes_barrier_t barrier /**< */, 2386 xcb_window_t window /**< */, 2387 uint16_t x1 /**< */, 2388 uint16_t y1 /**< */, 2389 uint16_t x2 /**< */, 2390 uint16_t y2 /**< */, 2391 uint32_t directions /**< */, 2392 uint16_t num_devices /**< */, 2393 const uint16_t *devices /**< */) 2394 { 2395 static const xcb_protocol_request_t xcb_req = { 2396 /* count */ 4, 2397 /* ext */ &xcb_xfixes_id, 2398 /* opcode */ XCB_XFIXES_CREATE_POINTER_BARRIER, 2399 /* isvoid */ 1 2400 }; 2401 2402 struct iovec xcb_parts[6]; 2403 xcb_void_cookie_t xcb_ret; 2404 xcb_xfixes_create_pointer_barrier_request_t xcb_out; 2405 2406 xcb_out.barrier = barrier; 2407 xcb_out.window = window; 2408 xcb_out.x1 = x1; 2409 xcb_out.y1 = y1; 2410 xcb_out.x2 = x2; 2411 xcb_out.y2 = y2; 2412 xcb_out.directions = directions; 2413 memset(xcb_out.pad0, 0, 2); 2414 xcb_out.num_devices = num_devices; 2415 2416 xcb_parts[2].iov_base = (char *) &xcb_out; 2417 xcb_parts[2].iov_len = sizeof(xcb_out); 2418 xcb_parts[3].iov_base = 0; 2419 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2420 /* uint16_t devices */ 2421 xcb_parts[4].iov_base = (char *) devices; 2422 xcb_parts[4].iov_len = num_devices * sizeof(uint16_t); 2423 xcb_parts[5].iov_base = 0; 2424 xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; 2425 2426 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2427 return xcb_ret; 2428 } 2429 2430 xcb_void_cookie_t 2431 xcb_xfixes_delete_pointer_barrier_checked (xcb_connection_t *c /**< */, 2432 xcb_xfixes_barrier_t barrier /**< */) 2433 { 2434 static const xcb_protocol_request_t xcb_req = { 2435 /* count */ 2, 2436 /* ext */ &xcb_xfixes_id, 2437 /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER, 2438 /* isvoid */ 1 2439 }; 2440 2441 struct iovec xcb_parts[4]; 2442 xcb_void_cookie_t xcb_ret; 2443 xcb_xfixes_delete_pointer_barrier_request_t xcb_out; 2444 2445 xcb_out.barrier = barrier; 2446 2447 xcb_parts[2].iov_base = (char *) &xcb_out; 2448 xcb_parts[2].iov_len = sizeof(xcb_out); 2449 xcb_parts[3].iov_base = 0; 2450 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2451 2452 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 2453 return xcb_ret; 2454 } 2455 2456 xcb_void_cookie_t 2457 xcb_xfixes_delete_pointer_barrier (xcb_connection_t *c /**< */, 2458 xcb_xfixes_barrier_t barrier /**< */) 2459 { 2460 static const xcb_protocol_request_t xcb_req = { 2461 /* count */ 2, 2462 /* ext */ &xcb_xfixes_id, 2463 /* opcode */ XCB_XFIXES_DELETE_POINTER_BARRIER, 2464 /* isvoid */ 1 2465 }; 2466 2467 struct iovec xcb_parts[4]; 2468 xcb_void_cookie_t xcb_ret; 2469 xcb_xfixes_delete_pointer_barrier_request_t xcb_out; 2470 2471 xcb_out.barrier = barrier; 2472 2473 xcb_parts[2].iov_base = (char *) &xcb_out; 2474 xcb_parts[2].iov_len = sizeof(xcb_out); 2475 xcb_parts[3].iov_base = 0; 2476 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 2477 2478 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 2479 return xcb_ret; 2480 } 2481 2482