1 /* 2 * This file generated automatically from shm.xml by c-client.xsl using XSLT. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_Shm_API XCB Shm API 8 * @brief Shm XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 13 module std.c.linux.X11.xcb.shm; 14 15 import std.c.linux.X11.xcb.xcb; 16 import std.c.linux.X11.xcb.xproto; 17 18 const int XCB_SHM_MAJOR_VERSION =1; 19 const int XCB_SHM_MINOR_VERSION =1; 20 21 extern(C) extern xcb_extension_t xcb_shm_id; 22 23 alias uint xcb_shm_seg_t; 24 25 /** 26 * @brief xcb_shm_seg_iterator_t 27 **/ 28 struct xcb_shm_seg_iterator_t { 29 xcb_shm_seg_t *data; /**< */ 30 int rem; /**< */ 31 int index; /**< */ 32 } ; 33 34 /** Opcode for xcb_shm_completion. */ 35 const uint XCB_SHM_COMPLETION = 0; 36 37 /** 38 * @brief xcb_shm_completion_event_t 39 **/ 40 struct xcb_shm_completion_event_t { 41 ubyte response_type; /**< */ 42 ubyte pad0; /**< */ 43 ushort sequence; /**< */ 44 xcb_drawable_t drawable; /**< */ 45 xcb_shm_seg_t shmseg; /**< */ 46 ushort minor_event; /**< */ 47 ubyte major_event; /**< */ 48 ubyte pad1; /**< */ 49 uint offset; /**< */ 50 } ; 51 52 /** Opcode for xcb_shm_bad_seg. */ 53 const uint XCB_SHM_BAD_SEG = 0; 54 55 alias xcb_value_error_t xcb_shm_bad_seg_error_t; 56 57 /** 58 * @brief xcb_shm_query_version_cookie_t 59 **/ 60 struct xcb_shm_query_version_cookie_t { 61 uint sequence; /**< */ 62 } ; 63 64 /** Opcode for xcb_shm_query_version. */ 65 const uint XCB_SHM_QUERY_VERSION = 0; 66 67 /** 68 * @brief xcb_shm_query_version_request_t 69 **/ 70 struct xcb_shm_query_version_request_t { 71 ubyte major_opcode; /**< */ 72 ubyte minor_opcode; /**< */ 73 ushort length; /**< */ 74 } ; 75 76 /** 77 * @brief xcb_shm_query_version_reply_t 78 **/ 79 struct xcb_shm_query_version_reply_t { 80 ubyte response_type; /**< */ 81 bool shared_pixmaps; /**< */ 82 ushort sequence; /**< */ 83 uint length; /**< */ 84 ushort major_version; /**< */ 85 ushort minor_version; /**< */ 86 ushort uid; /**< */ 87 ushort gid; /**< */ 88 ubyte pixmap_format; /**< */ 89 } ; 90 91 /** Opcode for xcb_shm_attach. */ 92 const uint XCB_SHM_ATTACH = 1; 93 94 /** 95 * @brief xcb_shm_attach_request_t 96 **/ 97 struct xcb_shm_attach_request_t { 98 ubyte major_opcode; /**< */ 99 ubyte minor_opcode; /**< */ 100 ushort length; /**< */ 101 xcb_shm_seg_t shmseg; /**< */ 102 uint shmid; /**< */ 103 bool read_only; /**< */ 104 } ; 105 106 /** Opcode for xcb_shm_detach. */ 107 const uint XCB_SHM_DETACH = 2; 108 109 /** 110 * @brief xcb_shm_detach_request_t 111 **/ 112 struct xcb_shm_detach_request_t { 113 ubyte major_opcode; /**< */ 114 ubyte minor_opcode; /**< */ 115 ushort length; /**< */ 116 xcb_shm_seg_t shmseg; /**< */ 117 } ; 118 119 /** Opcode for xcb_shm_put_image. */ 120 const uint XCB_SHM_PUT_IMAGE = 3; 121 122 /** 123 * @brief xcb_shm_put_image_request_t 124 **/ 125 struct xcb_shm_put_image_request_t { 126 ubyte major_opcode; /**< */ 127 ubyte minor_opcode; /**< */ 128 ushort length; /**< */ 129 xcb_drawable_t drawable; /**< */ 130 xcb_gcontext_t gc; /**< */ 131 ushort total_width; /**< */ 132 ushort total_height; /**< */ 133 ushort src_x; /**< */ 134 ushort src_y; /**< */ 135 ushort src_width; /**< */ 136 ushort src_height; /**< */ 137 short dst_x; /**< */ 138 short dst_y; /**< */ 139 ubyte depth; /**< */ 140 ubyte format; /**< */ 141 ubyte send_event; /**< */ 142 ubyte pad0; /**< */ 143 xcb_shm_seg_t shmseg; /**< */ 144 uint offset; /**< */ 145 } ; 146 147 /** 148 * @brief xcb_shm_get_image_cookie_t 149 **/ 150 struct xcb_shm_get_image_cookie_t { 151 uint sequence; /**< */ 152 } ; 153 154 /** Opcode for xcb_shm_get_image. */ 155 const uint XCB_SHM_GET_IMAGE = 4; 156 157 /** 158 * @brief xcb_shm_get_image_request_t 159 **/ 160 struct xcb_shm_get_image_request_t { 161 ubyte major_opcode; /**< */ 162 ubyte minor_opcode; /**< */ 163 ushort length; /**< */ 164 xcb_drawable_t drawable; /**< */ 165 short x; /**< */ 166 short y; /**< */ 167 ushort width; /**< */ 168 ushort height; /**< */ 169 uint plane_mask; /**< */ 170 ubyte format; /**< */ 171 ubyte pad0[3]; /**< */ 172 xcb_shm_seg_t shmseg; /**< */ 173 uint offset; /**< */ 174 } ; 175 176 /** 177 * @brief xcb_shm_get_image_reply_t 178 **/ 179 struct xcb_shm_get_image_reply_t { 180 ubyte response_type; /**< */ 181 ubyte depth; /**< */ 182 ushort sequence; /**< */ 183 uint length; /**< */ 184 xcb_visualid_t visual; /**< */ 185 uint size; /**< */ 186 } ; 187 188 /** Opcode for xcb_shm_create_pixmap. */ 189 const uint XCB_SHM_CREATE_PIXMAP = 5; 190 191 /** 192 * @brief xcb_shm_create_pixmap_request_t 193 **/ 194 struct xcb_shm_create_pixmap_request_t { 195 ubyte major_opcode; /**< */ 196 ubyte minor_opcode; /**< */ 197 ushort length; /**< */ 198 xcb_pixmap_t pid; /**< */ 199 xcb_drawable_t drawable; /**< */ 200 ushort width; /**< */ 201 ushort height; /**< */ 202 ubyte depth; /**< */ 203 ubyte pad0[3]; /**< */ 204 xcb_shm_seg_t shmseg; /**< */ 205 uint offset; /**< */ 206 } ; 207 208 209 /***************************************************************************** 210 ** 211 ** void xcb_shm_seg_next 212 ** 213 ** @param xcb_shm_seg_iterator_t *i 214 ** @returns void 215 ** 216 *****************************************************************************/ 217 218 extern(C) void 219 xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */); 220 221 222 /***************************************************************************** 223 ** 224 ** xcb_generic_iterator_t xcb_shm_seg_end 225 ** 226 ** @param xcb_shm_seg_iterator_t i 227 ** @returns xcb_generic_iterator_t 228 ** 229 *****************************************************************************/ 230 231 extern(C) xcb_generic_iterator_t 232 xcb_shm_seg_end (xcb_shm_seg_iterator_t i /**< */); 233 234 235 /***************************************************************************** 236 ** 237 ** xcb_shm_query_version_cookie_t xcb_shm_query_version 238 ** 239 ** @param xcb_connection_t *c 240 ** @returns xcb_shm_query_version_cookie_t 241 ** 242 *****************************************************************************/ 243 244 extern(C) xcb_shm_query_version_cookie_t 245 xcb_shm_query_version (xcb_connection_t *c /**< */); 246 247 248 /***************************************************************************** 249 ** 250 ** xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked 251 ** 252 ** @param xcb_connection_t *c 253 ** @returns xcb_shm_query_version_cookie_t 254 ** 255 *****************************************************************************/ 256 257 extern(C) xcb_shm_query_version_cookie_t 258 xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */); 259 260 261 /***************************************************************************** 262 ** 263 ** xcb_shm_query_version_reply_t * xcb_shm_query_version_reply 264 ** 265 ** @param xcb_connection_t *c 266 ** @param xcb_shm_query_version_cookie_t cookie 267 ** @param xcb_generic_error_t **e 268 ** @returns xcb_shm_query_version_reply_t * 269 ** 270 *****************************************************************************/ 271 272 extern(C) xcb_shm_query_version_reply_t * 273 xcb_shm_query_version_reply (xcb_connection_t *c /**< */, 274 xcb_shm_query_version_cookie_t cookie /**< */, 275 xcb_generic_error_t **e /**< */); 276 277 278 /***************************************************************************** 279 ** 280 ** xcb_void_cookie_t xcb_shm_attach_checked 281 ** 282 ** @param xcb_connection_t *c 283 ** @param xcb_shm_seg_t shmseg 284 ** @param uint shmid 285 ** @param bool read_only 286 ** @returns xcb_void_cookie_t 287 ** 288 *****************************************************************************/ 289 290 extern(C) xcb_void_cookie_t 291 xcb_shm_attach_checked (xcb_connection_t *c /**< */, 292 xcb_shm_seg_t shmseg /**< */, 293 uint shmid /**< */, 294 bool read_only /**< */); 295 296 297 /***************************************************************************** 298 ** 299 ** xcb_void_cookie_t xcb_shm_attach 300 ** 301 ** @param xcb_connection_t *c 302 ** @param xcb_shm_seg_t shmseg 303 ** @param uint shmid 304 ** @param bool read_only 305 ** @returns xcb_void_cookie_t 306 ** 307 *****************************************************************************/ 308 309 extern(C) xcb_void_cookie_t 310 xcb_shm_attach (xcb_connection_t *c /**< */, 311 xcb_shm_seg_t shmseg /**< */, 312 uint shmid /**< */, 313 bool read_only /**< */); 314 315 316 /***************************************************************************** 317 ** 318 ** xcb_void_cookie_t xcb_shm_detach_checked 319 ** 320 ** @param xcb_connection_t *c 321 ** @param xcb_shm_seg_t shmseg 322 ** @returns xcb_void_cookie_t 323 ** 324 *****************************************************************************/ 325 326 extern(C) xcb_void_cookie_t 327 xcb_shm_detach_checked (xcb_connection_t *c /**< */, 328 xcb_shm_seg_t shmseg /**< */); 329 330 331 /***************************************************************************** 332 ** 333 ** xcb_void_cookie_t xcb_shm_detach 334 ** 335 ** @param xcb_connection_t *c 336 ** @param xcb_shm_seg_t shmseg 337 ** @returns xcb_void_cookie_t 338 ** 339 *****************************************************************************/ 340 341 extern(C) xcb_void_cookie_t 342 xcb_shm_detach (xcb_connection_t *c /**< */, 343 xcb_shm_seg_t shmseg /**< */); 344 345 346 /***************************************************************************** 347 ** 348 ** xcb_void_cookie_t xcb_shm_put_image_checked 349 ** 350 ** @param xcb_connection_t *c 351 ** @param xcb_drawable_t drawable 352 ** @param xcb_gcontext_t gc 353 ** @param ushort total_width 354 ** @param ushort total_height 355 ** @param ushort src_x 356 ** @param ushort src_y 357 ** @param ushort src_width 358 ** @param ushort src_height 359 ** @param short dst_x 360 ** @param short dst_y 361 ** @param ubyte depth 362 ** @param ubyte format 363 ** @param ubyte send_event 364 ** @param xcb_shm_seg_t shmseg 365 ** @param uint offset 366 ** @returns xcb_void_cookie_t 367 ** 368 *****************************************************************************/ 369 370 extern(C) xcb_void_cookie_t 371 xcb_shm_put_image_checked (xcb_connection_t *c /**< */, 372 xcb_drawable_t drawable /**< */, 373 xcb_gcontext_t gc /**< */, 374 ushort total_width /**< */, 375 ushort total_height /**< */, 376 ushort src_x /**< */, 377 ushort src_y /**< */, 378 ushort src_width /**< */, 379 ushort src_height /**< */, 380 short dst_x /**< */, 381 short dst_y /**< */, 382 ubyte depth /**< */, 383 ubyte format /**< */, 384 ubyte send_event /**< */, 385 xcb_shm_seg_t shmseg /**< */, 386 uint offset /**< */); 387 388 389 /***************************************************************************** 390 ** 391 ** xcb_void_cookie_t xcb_shm_put_image 392 ** 393 ** @param xcb_connection_t *c 394 ** @param xcb_drawable_t drawable 395 ** @param xcb_gcontext_t gc 396 ** @param ushort total_width 397 ** @param ushort total_height 398 ** @param ushort src_x 399 ** @param ushort src_y 400 ** @param ushort src_width 401 ** @param ushort src_height 402 ** @param short dst_x 403 ** @param short dst_y 404 ** @param ubyte depth 405 ** @param ubyte format 406 ** @param ubyte send_event 407 ** @param xcb_shm_seg_t shmseg 408 ** @param uint offset 409 ** @returns xcb_void_cookie_t 410 ** 411 *****************************************************************************/ 412 413 extern(C) xcb_void_cookie_t 414 xcb_shm_put_image (xcb_connection_t *c /**< */, 415 xcb_drawable_t drawable /**< */, 416 xcb_gcontext_t gc /**< */, 417 ushort total_width /**< */, 418 ushort total_height /**< */, 419 ushort src_x /**< */, 420 ushort src_y /**< */, 421 ushort src_width /**< */, 422 ushort src_height /**< */, 423 short dst_x /**< */, 424 short dst_y /**< */, 425 ubyte depth /**< */, 426 ubyte format /**< */, 427 ubyte send_event /**< */, 428 xcb_shm_seg_t shmseg /**< */, 429 uint offset /**< */); 430 431 432 /***************************************************************************** 433 ** 434 ** xcb_shm_get_image_cookie_t xcb_shm_get_image 435 ** 436 ** @param xcb_connection_t *c 437 ** @param xcb_drawable_t drawable 438 ** @param short x 439 ** @param short y 440 ** @param ushort width 441 ** @param ushort height 442 ** @param uint plane_mask 443 ** @param ubyte format 444 ** @param xcb_shm_seg_t shmseg 445 ** @param uint offset 446 ** @returns xcb_shm_get_image_cookie_t 447 ** 448 *****************************************************************************/ 449 450 extern(C) xcb_shm_get_image_cookie_t 451 xcb_shm_get_image (xcb_connection_t *c /**< */, 452 xcb_drawable_t drawable /**< */, 453 short x /**< */, 454 short y /**< */, 455 ushort width /**< */, 456 ushort height /**< */, 457 uint plane_mask /**< */, 458 ubyte format /**< */, 459 xcb_shm_seg_t shmseg /**< */, 460 uint offset /**< */); 461 462 463 /***************************************************************************** 464 ** 465 ** xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked 466 ** 467 ** @param xcb_connection_t *c 468 ** @param xcb_drawable_t drawable 469 ** @param short x 470 ** @param short y 471 ** @param ushort width 472 ** @param ushort height 473 ** @param uint plane_mask 474 ** @param ubyte format 475 ** @param xcb_shm_seg_t shmseg 476 ** @param uint offset 477 ** @returns xcb_shm_get_image_cookie_t 478 ** 479 *****************************************************************************/ 480 481 extern(C) xcb_shm_get_image_cookie_t 482 xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */, 483 xcb_drawable_t drawable /**< */, 484 short x /**< */, 485 short y /**< */, 486 ushort width /**< */, 487 ushort height /**< */, 488 uint plane_mask /**< */, 489 ubyte format /**< */, 490 xcb_shm_seg_t shmseg /**< */, 491 uint offset /**< */); 492 493 494 /***************************************************************************** 495 ** 496 ** xcb_shm_get_image_reply_t * xcb_shm_get_image_reply 497 ** 498 ** @param xcb_connection_t *c 499 ** @param xcb_shm_get_image_cookie_t cookie 500 ** @param xcb_generic_error_t **e 501 ** @returns xcb_shm_get_image_reply_t * 502 ** 503 *****************************************************************************/ 504 505 extern(C) xcb_shm_get_image_reply_t * 506 xcb_shm_get_image_reply (xcb_connection_t *c /**< */, 507 xcb_shm_get_image_cookie_t cookie /**< */, 508 xcb_generic_error_t **e /**< */); 509 510 511 /***************************************************************************** 512 ** 513 ** xcb_void_cookie_t xcb_shm_create_pixmap_checked 514 ** 515 ** @param xcb_connection_t *c 516 ** @param xcb_pixmap_t pid 517 ** @param xcb_drawable_t drawable 518 ** @param ushort width 519 ** @param ushort height 520 ** @param ubyte depth 521 ** @param xcb_shm_seg_t shmseg 522 ** @param uint offset 523 ** @returns xcb_void_cookie_t 524 ** 525 *****************************************************************************/ 526 527 extern(C) xcb_void_cookie_t 528 xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */, 529 xcb_pixmap_t pid /**< */, 530 xcb_drawable_t drawable /**< */, 531 ushort width /**< */, 532 ushort height /**< */, 533 ubyte depth /**< */, 534 xcb_shm_seg_t shmseg /**< */, 535 uint offset /**< */); 536 537 538 /***************************************************************************** 539 ** 540 ** xcb_void_cookie_t xcb_shm_create_pixmap 541 ** 542 ** @param xcb_connection_t *c 543 ** @param xcb_pixmap_t pid 544 ** @param xcb_drawable_t drawable 545 ** @param ushort width 546 ** @param ushort height 547 ** @param ubyte depth 548 ** @param xcb_shm_seg_t shmseg 549 ** @param uint offset 550 ** @returns xcb_void_cookie_t 551 ** 552 *****************************************************************************/ 553 554 extern(C) xcb_void_cookie_t 555 xcb_shm_create_pixmap (xcb_connection_t *c /**< */, 556 xcb_pixmap_t pid /**< */, 557 xcb_drawable_t drawable /**< */, 558 ushort width /**< */, 559 ushort height /**< */, 560 ubyte depth /**< */, 561 xcb_shm_seg_t shmseg /**< */, 562 uint offset /**< */); 563 564 565 566 /** 567 * @} 568 */