1 /* 2 * This file generated automatically from composite.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 "composite.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 #include "xfixes.h" 19 20 xcb_extension_t xcb_composite_id = { "Composite", 0 }; 21 22 xcb_composite_query_version_cookie_t 23 xcb_composite_query_version (xcb_connection_t *c, 24 uint32_t client_major_version, 25 uint32_t client_minor_version) 26 { 27 static const xcb_protocol_request_t xcb_req = { 28 .count = 2, 29 .ext = &xcb_composite_id, 30 .opcode = XCB_COMPOSITE_QUERY_VERSION, 31 .isvoid = 0 32 }; 33 34 struct iovec xcb_parts[4]; 35 xcb_composite_query_version_cookie_t xcb_ret; 36 xcb_composite_query_version_request_t xcb_out; 37 38 xcb_out.client_major_version = client_major_version; 39 xcb_out.client_minor_version = client_minor_version; 40 41 xcb_parts[2].iov_base = (char *) &xcb_out; 42 xcb_parts[2].iov_len = sizeof(xcb_out); 43 xcb_parts[3].iov_base = 0; 44 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 45 46 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 47 return xcb_ret; 48 } 49 50 xcb_composite_query_version_cookie_t 51 xcb_composite_query_version_unchecked (xcb_connection_t *c, 52 uint32_t client_major_version, 53 uint32_t client_minor_version) 54 { 55 static const xcb_protocol_request_t xcb_req = { 56 .count = 2, 57 .ext = &xcb_composite_id, 58 .opcode = XCB_COMPOSITE_QUERY_VERSION, 59 .isvoid = 0 60 }; 61 62 struct iovec xcb_parts[4]; 63 xcb_composite_query_version_cookie_t xcb_ret; 64 xcb_composite_query_version_request_t xcb_out; 65 66 xcb_out.client_major_version = client_major_version; 67 xcb_out.client_minor_version = client_minor_version; 68 69 xcb_parts[2].iov_base = (char *) &xcb_out; 70 xcb_parts[2].iov_len = sizeof(xcb_out); 71 xcb_parts[3].iov_base = 0; 72 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 73 74 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 75 return xcb_ret; 76 } 77 78 xcb_composite_query_version_reply_t * 79 xcb_composite_query_version_reply (xcb_connection_t *c, 80 xcb_composite_query_version_cookie_t cookie /**< */, 81 xcb_generic_error_t **e) 82 { 83 return (xcb_composite_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 84 } 85 86 xcb_void_cookie_t 87 xcb_composite_redirect_window_checked (xcb_connection_t *c, 88 xcb_window_t window, 89 uint8_t update) 90 { 91 static const xcb_protocol_request_t xcb_req = { 92 .count = 2, 93 .ext = &xcb_composite_id, 94 .opcode = XCB_COMPOSITE_REDIRECT_WINDOW, 95 .isvoid = 1 96 }; 97 98 struct iovec xcb_parts[4]; 99 xcb_void_cookie_t xcb_ret; 100 xcb_composite_redirect_window_request_t xcb_out; 101 102 xcb_out.window = window; 103 xcb_out.update = update; 104 memset(xcb_out.pad0, 0, 3); 105 106 xcb_parts[2].iov_base = (char *) &xcb_out; 107 xcb_parts[2].iov_len = sizeof(xcb_out); 108 xcb_parts[3].iov_base = 0; 109 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 110 111 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 112 return xcb_ret; 113 } 114 115 xcb_void_cookie_t 116 xcb_composite_redirect_window (xcb_connection_t *c, 117 xcb_window_t window, 118 uint8_t update) 119 { 120 static const xcb_protocol_request_t xcb_req = { 121 .count = 2, 122 .ext = &xcb_composite_id, 123 .opcode = XCB_COMPOSITE_REDIRECT_WINDOW, 124 .isvoid = 1 125 }; 126 127 struct iovec xcb_parts[4]; 128 xcb_void_cookie_t xcb_ret; 129 xcb_composite_redirect_window_request_t xcb_out; 130 131 xcb_out.window = window; 132 xcb_out.update = update; 133 memset(xcb_out.pad0, 0, 3); 134 135 xcb_parts[2].iov_base = (char *) &xcb_out; 136 xcb_parts[2].iov_len = sizeof(xcb_out); 137 xcb_parts[3].iov_base = 0; 138 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 139 140 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 141 return xcb_ret; 142 } 143 144 xcb_void_cookie_t 145 xcb_composite_redirect_subwindows_checked (xcb_connection_t *c, 146 xcb_window_t window, 147 uint8_t update) 148 { 149 static const xcb_protocol_request_t xcb_req = { 150 .count = 2, 151 .ext = &xcb_composite_id, 152 .opcode = XCB_COMPOSITE_REDIRECT_SUBWINDOWS, 153 .isvoid = 1 154 }; 155 156 struct iovec xcb_parts[4]; 157 xcb_void_cookie_t xcb_ret; 158 xcb_composite_redirect_subwindows_request_t xcb_out; 159 160 xcb_out.window = window; 161 xcb_out.update = update; 162 memset(xcb_out.pad0, 0, 3); 163 164 xcb_parts[2].iov_base = (char *) &xcb_out; 165 xcb_parts[2].iov_len = sizeof(xcb_out); 166 xcb_parts[3].iov_base = 0; 167 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 168 169 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 170 return xcb_ret; 171 } 172 173 xcb_void_cookie_t 174 xcb_composite_redirect_subwindows (xcb_connection_t *c, 175 xcb_window_t window, 176 uint8_t update) 177 { 178 static const xcb_protocol_request_t xcb_req = { 179 .count = 2, 180 .ext = &xcb_composite_id, 181 .opcode = XCB_COMPOSITE_REDIRECT_SUBWINDOWS, 182 .isvoid = 1 183 }; 184 185 struct iovec xcb_parts[4]; 186 xcb_void_cookie_t xcb_ret; 187 xcb_composite_redirect_subwindows_request_t xcb_out; 188 189 xcb_out.window = window; 190 xcb_out.update = update; 191 memset(xcb_out.pad0, 0, 3); 192 193 xcb_parts[2].iov_base = (char *) &xcb_out; 194 xcb_parts[2].iov_len = sizeof(xcb_out); 195 xcb_parts[3].iov_base = 0; 196 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 197 198 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 199 return xcb_ret; 200 } 201 202 xcb_void_cookie_t 203 xcb_composite_unredirect_window_checked (xcb_connection_t *c, 204 xcb_window_t window, 205 uint8_t update) 206 { 207 static const xcb_protocol_request_t xcb_req = { 208 .count = 2, 209 .ext = &xcb_composite_id, 210 .opcode = XCB_COMPOSITE_UNREDIRECT_WINDOW, 211 .isvoid = 1 212 }; 213 214 struct iovec xcb_parts[4]; 215 xcb_void_cookie_t xcb_ret; 216 xcb_composite_unredirect_window_request_t xcb_out; 217 218 xcb_out.window = window; 219 xcb_out.update = update; 220 memset(xcb_out.pad0, 0, 3); 221 222 xcb_parts[2].iov_base = (char *) &xcb_out; 223 xcb_parts[2].iov_len = sizeof(xcb_out); 224 xcb_parts[3].iov_base = 0; 225 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 226 227 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 228 return xcb_ret; 229 } 230 231 xcb_void_cookie_t 232 xcb_composite_unredirect_window (xcb_connection_t *c, 233 xcb_window_t window, 234 uint8_t update) 235 { 236 static const xcb_protocol_request_t xcb_req = { 237 .count = 2, 238 .ext = &xcb_composite_id, 239 .opcode = XCB_COMPOSITE_UNREDIRECT_WINDOW, 240 .isvoid = 1 241 }; 242 243 struct iovec xcb_parts[4]; 244 xcb_void_cookie_t xcb_ret; 245 xcb_composite_unredirect_window_request_t xcb_out; 246 247 xcb_out.window = window; 248 xcb_out.update = update; 249 memset(xcb_out.pad0, 0, 3); 250 251 xcb_parts[2].iov_base = (char *) &xcb_out; 252 xcb_parts[2].iov_len = sizeof(xcb_out); 253 xcb_parts[3].iov_base = 0; 254 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 255 256 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 257 return xcb_ret; 258 } 259 260 xcb_void_cookie_t 261 xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c, 262 xcb_window_t window, 263 uint8_t update) 264 { 265 static const xcb_protocol_request_t xcb_req = { 266 .count = 2, 267 .ext = &xcb_composite_id, 268 .opcode = XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS, 269 .isvoid = 1 270 }; 271 272 struct iovec xcb_parts[4]; 273 xcb_void_cookie_t xcb_ret; 274 xcb_composite_unredirect_subwindows_request_t xcb_out; 275 276 xcb_out.window = window; 277 xcb_out.update = update; 278 memset(xcb_out.pad0, 0, 3); 279 280 xcb_parts[2].iov_base = (char *) &xcb_out; 281 xcb_parts[2].iov_len = sizeof(xcb_out); 282 xcb_parts[3].iov_base = 0; 283 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 284 285 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 286 return xcb_ret; 287 } 288 289 xcb_void_cookie_t 290 xcb_composite_unredirect_subwindows (xcb_connection_t *c, 291 xcb_window_t window, 292 uint8_t update) 293 { 294 static const xcb_protocol_request_t xcb_req = { 295 .count = 2, 296 .ext = &xcb_composite_id, 297 .opcode = XCB_COMPOSITE_UNREDIRECT_SUBWINDOWS, 298 .isvoid = 1 299 }; 300 301 struct iovec xcb_parts[4]; 302 xcb_void_cookie_t xcb_ret; 303 xcb_composite_unredirect_subwindows_request_t xcb_out; 304 305 xcb_out.window = window; 306 xcb_out.update = update; 307 memset(xcb_out.pad0, 0, 3); 308 309 xcb_parts[2].iov_base = (char *) &xcb_out; 310 xcb_parts[2].iov_len = sizeof(xcb_out); 311 xcb_parts[3].iov_base = 0; 312 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 313 314 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 315 return xcb_ret; 316 } 317 318 xcb_void_cookie_t 319 xcb_composite_create_region_from_border_clip_checked (xcb_connection_t *c, 320 xcb_xfixes_region_t region, 321 xcb_window_t window) 322 { 323 static const xcb_protocol_request_t xcb_req = { 324 .count = 2, 325 .ext = &xcb_composite_id, 326 .opcode = XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP, 327 .isvoid = 1 328 }; 329 330 struct iovec xcb_parts[4]; 331 xcb_void_cookie_t xcb_ret; 332 xcb_composite_create_region_from_border_clip_request_t xcb_out; 333 334 xcb_out.region = region; 335 xcb_out.window = window; 336 337 xcb_parts[2].iov_base = (char *) &xcb_out; 338 xcb_parts[2].iov_len = sizeof(xcb_out); 339 xcb_parts[3].iov_base = 0; 340 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 341 342 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 343 return xcb_ret; 344 } 345 346 xcb_void_cookie_t 347 xcb_composite_create_region_from_border_clip (xcb_connection_t *c, 348 xcb_xfixes_region_t region, 349 xcb_window_t window) 350 { 351 static const xcb_protocol_request_t xcb_req = { 352 .count = 2, 353 .ext = &xcb_composite_id, 354 .opcode = XCB_COMPOSITE_CREATE_REGION_FROM_BORDER_CLIP, 355 .isvoid = 1 356 }; 357 358 struct iovec xcb_parts[4]; 359 xcb_void_cookie_t xcb_ret; 360 xcb_composite_create_region_from_border_clip_request_t xcb_out; 361 362 xcb_out.region = region; 363 xcb_out.window = window; 364 365 xcb_parts[2].iov_base = (char *) &xcb_out; 366 xcb_parts[2].iov_len = sizeof(xcb_out); 367 xcb_parts[3].iov_base = 0; 368 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 369 370 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 371 return xcb_ret; 372 } 373 374 xcb_void_cookie_t 375 xcb_composite_name_window_pixmap_checked (xcb_connection_t *c, 376 xcb_window_t window, 377 xcb_pixmap_t pixmap) 378 { 379 static const xcb_protocol_request_t xcb_req = { 380 .count = 2, 381 .ext = &xcb_composite_id, 382 .opcode = XCB_COMPOSITE_NAME_WINDOW_PIXMAP, 383 .isvoid = 1 384 }; 385 386 struct iovec xcb_parts[4]; 387 xcb_void_cookie_t xcb_ret; 388 xcb_composite_name_window_pixmap_request_t xcb_out; 389 390 xcb_out.window = window; 391 xcb_out.pixmap = pixmap; 392 393 xcb_parts[2].iov_base = (char *) &xcb_out; 394 xcb_parts[2].iov_len = sizeof(xcb_out); 395 xcb_parts[3].iov_base = 0; 396 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 397 398 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 399 return xcb_ret; 400 } 401 402 xcb_void_cookie_t 403 xcb_composite_name_window_pixmap (xcb_connection_t *c, 404 xcb_window_t window, 405 xcb_pixmap_t pixmap) 406 { 407 static const xcb_protocol_request_t xcb_req = { 408 .count = 2, 409 .ext = &xcb_composite_id, 410 .opcode = XCB_COMPOSITE_NAME_WINDOW_PIXMAP, 411 .isvoid = 1 412 }; 413 414 struct iovec xcb_parts[4]; 415 xcb_void_cookie_t xcb_ret; 416 xcb_composite_name_window_pixmap_request_t xcb_out; 417 418 xcb_out.window = window; 419 xcb_out.pixmap = pixmap; 420 421 xcb_parts[2].iov_base = (char *) &xcb_out; 422 xcb_parts[2].iov_len = sizeof(xcb_out); 423 xcb_parts[3].iov_base = 0; 424 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 425 426 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 427 return xcb_ret; 428 } 429 430 xcb_composite_get_overlay_window_cookie_t 431 xcb_composite_get_overlay_window (xcb_connection_t *c, 432 xcb_window_t window) 433 { 434 static const xcb_protocol_request_t xcb_req = { 435 .count = 2, 436 .ext = &xcb_composite_id, 437 .opcode = XCB_COMPOSITE_GET_OVERLAY_WINDOW, 438 .isvoid = 0 439 }; 440 441 struct iovec xcb_parts[4]; 442 xcb_composite_get_overlay_window_cookie_t xcb_ret; 443 xcb_composite_get_overlay_window_request_t xcb_out; 444 445 xcb_out.window = window; 446 447 xcb_parts[2].iov_base = (char *) &xcb_out; 448 xcb_parts[2].iov_len = sizeof(xcb_out); 449 xcb_parts[3].iov_base = 0; 450 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 451 452 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 453 return xcb_ret; 454 } 455 456 xcb_composite_get_overlay_window_cookie_t 457 xcb_composite_get_overlay_window_unchecked (xcb_connection_t *c, 458 xcb_window_t window) 459 { 460 static const xcb_protocol_request_t xcb_req = { 461 .count = 2, 462 .ext = &xcb_composite_id, 463 .opcode = XCB_COMPOSITE_GET_OVERLAY_WINDOW, 464 .isvoid = 0 465 }; 466 467 struct iovec xcb_parts[4]; 468 xcb_composite_get_overlay_window_cookie_t xcb_ret; 469 xcb_composite_get_overlay_window_request_t xcb_out; 470 471 xcb_out.window = window; 472 473 xcb_parts[2].iov_base = (char *) &xcb_out; 474 xcb_parts[2].iov_len = sizeof(xcb_out); 475 xcb_parts[3].iov_base = 0; 476 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 477 478 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 479 return xcb_ret; 480 } 481 482 xcb_composite_get_overlay_window_reply_t * 483 xcb_composite_get_overlay_window_reply (xcb_connection_t *c, 484 xcb_composite_get_overlay_window_cookie_t cookie /**< */, 485 xcb_generic_error_t **e) 486 { 487 return (xcb_composite_get_overlay_window_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 488 } 489 490 xcb_void_cookie_t 491 xcb_composite_release_overlay_window_checked (xcb_connection_t *c, 492 xcb_window_t window) 493 { 494 static const xcb_protocol_request_t xcb_req = { 495 .count = 2, 496 .ext = &xcb_composite_id, 497 .opcode = XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW, 498 .isvoid = 1 499 }; 500 501 struct iovec xcb_parts[4]; 502 xcb_void_cookie_t xcb_ret; 503 xcb_composite_release_overlay_window_request_t xcb_out; 504 505 xcb_out.window = window; 506 507 xcb_parts[2].iov_base = (char *) &xcb_out; 508 xcb_parts[2].iov_len = sizeof(xcb_out); 509 xcb_parts[3].iov_base = 0; 510 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 511 512 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 513 return xcb_ret; 514 } 515 516 xcb_void_cookie_t 517 xcb_composite_release_overlay_window (xcb_connection_t *c, 518 xcb_window_t window) 519 { 520 static const xcb_protocol_request_t xcb_req = { 521 .count = 2, 522 .ext = &xcb_composite_id, 523 .opcode = XCB_COMPOSITE_RELEASE_OVERLAY_WINDOW, 524 .isvoid = 1 525 }; 526 527 struct iovec xcb_parts[4]; 528 xcb_void_cookie_t xcb_ret; 529 xcb_composite_release_overlay_window_request_t xcb_out; 530 531 xcb_out.window = window; 532 533 xcb_parts[2].iov_base = (char *) &xcb_out; 534 xcb_parts[2].iov_len = sizeof(xcb_out); 535 xcb_parts[3].iov_base = 0; 536 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 537 538 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 539 return xcb_ret; 540 } 541 542