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