1 /* 2 * This file generated automatically from present.xml by d_client.py. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_Present_API XCB Present API 8 * @brief Present XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 module xcb.present; 13 14 import xcb.xcb; 15 import xcb.xproto; 16 import xcb.randr; 17 import xcb.xfixes; 18 import xcb.sync; 19 20 extern (C): 21 22 enum int XCB_PRESENT_MAJOR_VERSION = 1; 23 enum int XCB_PRESENT_MINOR_VERSION = 0; 24 25 extern (C) __gshared extern xcb_extension_t xcb_present_id; 26 27 enum xcb_present_event_enum_t { 28 XCB_PRESENT_EVENT_CONFIGURE_NOTIFY = 0, 29 XCB_PRESENT_EVENT_COMPLETE_NOTIFY = 1, 30 XCB_PRESENT_EVENT_IDLE_NOTIFY = 2, 31 XCB_PRESENT_EVENT_REDIRECT_NOTIFY = 3 32 } 33 34 alias XCB_PRESENT_EVENT_CONFIGURE_NOTIFY = xcb_present_event_enum_t.XCB_PRESENT_EVENT_CONFIGURE_NOTIFY; 35 alias XCB_PRESENT_EVENT_COMPLETE_NOTIFY = xcb_present_event_enum_t.XCB_PRESENT_EVENT_COMPLETE_NOTIFY; 36 alias XCB_PRESENT_EVENT_IDLE_NOTIFY = xcb_present_event_enum_t.XCB_PRESENT_EVENT_IDLE_NOTIFY; 37 alias XCB_PRESENT_EVENT_REDIRECT_NOTIFY = xcb_present_event_enum_t.XCB_PRESENT_EVENT_REDIRECT_NOTIFY; 38 39 enum xcb_present_event_mask_t { 40 XCB_PRESENT_EVENT_MASK_NO_EVENT = 0, 41 XCB_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY = 1, 42 XCB_PRESENT_EVENT_MASK_COMPLETE_NOTIFY = 2, 43 XCB_PRESENT_EVENT_MASK_IDLE_NOTIFY = 4, 44 XCB_PRESENT_EVENT_MASK_REDIRECT_NOTIFY = 8 45 } 46 47 alias XCB_PRESENT_EVENT_MASK_NO_EVENT = xcb_present_event_mask_t.XCB_PRESENT_EVENT_MASK_NO_EVENT; 48 alias XCB_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY = xcb_present_event_mask_t.XCB_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY; 49 alias XCB_PRESENT_EVENT_MASK_COMPLETE_NOTIFY = xcb_present_event_mask_t.XCB_PRESENT_EVENT_MASK_COMPLETE_NOTIFY; 50 alias XCB_PRESENT_EVENT_MASK_IDLE_NOTIFY = xcb_present_event_mask_t.XCB_PRESENT_EVENT_MASK_IDLE_NOTIFY; 51 alias XCB_PRESENT_EVENT_MASK_REDIRECT_NOTIFY = xcb_present_event_mask_t.XCB_PRESENT_EVENT_MASK_REDIRECT_NOTIFY; 52 53 enum xcb_present_option_t { 54 XCB_PRESENT_OPTION_NONE = 0, 55 XCB_PRESENT_OPTION_ASYNC = 1, 56 XCB_PRESENT_OPTION_COPY = 2, 57 XCB_PRESENT_OPTION_UST = 4 58 } 59 60 alias XCB_PRESENT_OPTION_NONE = xcb_present_option_t.XCB_PRESENT_OPTION_NONE; 61 alias XCB_PRESENT_OPTION_ASYNC = xcb_present_option_t.XCB_PRESENT_OPTION_ASYNC; 62 alias XCB_PRESENT_OPTION_COPY = xcb_present_option_t.XCB_PRESENT_OPTION_COPY; 63 alias XCB_PRESENT_OPTION_UST = xcb_present_option_t.XCB_PRESENT_OPTION_UST; 64 65 enum xcb_present_capability_t { 66 XCB_PRESENT_CAPABILITY_NONE = 0, 67 XCB_PRESENT_CAPABILITY_ASYNC = 1, 68 XCB_PRESENT_CAPABILITY_FENCE = 2, 69 XCB_PRESENT_CAPABILITY_UST = 4 70 } 71 72 alias XCB_PRESENT_CAPABILITY_NONE = xcb_present_capability_t.XCB_PRESENT_CAPABILITY_NONE; 73 alias XCB_PRESENT_CAPABILITY_ASYNC = xcb_present_capability_t.XCB_PRESENT_CAPABILITY_ASYNC; 74 alias XCB_PRESENT_CAPABILITY_FENCE = xcb_present_capability_t.XCB_PRESENT_CAPABILITY_FENCE; 75 alias XCB_PRESENT_CAPABILITY_UST = xcb_present_capability_t.XCB_PRESENT_CAPABILITY_UST; 76 77 enum xcb_present_complete_kind_t { 78 XCB_PRESENT_COMPLETE_KIND_PIXMAP = 0, 79 XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC = 1 80 } 81 82 alias XCB_PRESENT_COMPLETE_KIND_PIXMAP = xcb_present_complete_kind_t.XCB_PRESENT_COMPLETE_KIND_PIXMAP; 83 alias XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC = xcb_present_complete_kind_t.XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC; 84 85 enum xcb_present_complete_mode_t { 86 XCB_PRESENT_COMPLETE_MODE_COPY = 0, 87 XCB_PRESENT_COMPLETE_MODE_FLIP = 1, 88 XCB_PRESENT_COMPLETE_MODE_SKIP = 2 89 } 90 91 alias XCB_PRESENT_COMPLETE_MODE_COPY = xcb_present_complete_mode_t.XCB_PRESENT_COMPLETE_MODE_COPY; 92 alias XCB_PRESENT_COMPLETE_MODE_FLIP = xcb_present_complete_mode_t.XCB_PRESENT_COMPLETE_MODE_FLIP; 93 alias XCB_PRESENT_COMPLETE_MODE_SKIP = xcb_present_complete_mode_t.XCB_PRESENT_COMPLETE_MODE_SKIP; 94 95 /** 96 * @brief xcb_present_notify_t 97 **/ 98 struct xcb_present_notify_t { 99 xcb_window_t window; /**< */ 100 uint serial; /**< */ 101 } 102 103 /** 104 * @brief xcb_present_notify_iterator_t 105 **/ 106 struct xcb_present_notify_iterator_t { 107 xcb_present_notify_t* data; /**< */ 108 int rem; /**< */ 109 int index; /**< */ 110 } 111 112 /** 113 * @brief xcb_present_query_version_cookie_t 114 **/ 115 struct xcb_present_query_version_cookie_t { 116 uint sequence; /**< */ 117 } 118 119 /** Opcode for xcb_present_query_version. */ 120 enum XCB_PRESENT_QUERY_VERSION = 0; 121 122 /** 123 * @brief xcb_present_query_version_request_t 124 **/ 125 struct xcb_present_query_version_request_t { 126 ubyte major_opcode; /**< */ 127 ubyte minor_opcode; /**< */ 128 ushort length; /**< */ 129 uint major_version; /**< */ 130 uint minor_version; /**< */ 131 } 132 133 /** 134 * @brief xcb_present_query_version_reply_t 135 **/ 136 struct xcb_present_query_version_reply_t { 137 ubyte response_type; /**< */ 138 ubyte pad0; /**< */ 139 ushort sequence; /**< */ 140 uint length; /**< */ 141 uint major_version; /**< */ 142 uint minor_version; /**< */ 143 } 144 145 /** Opcode for xcb_present_pixmap. */ 146 enum XCB_PRESENT_PIXMAP = 1; 147 148 /** 149 * @brief xcb_present_pixmap_request_t 150 **/ 151 struct xcb_present_pixmap_request_t { 152 ubyte major_opcode; /**< */ 153 ubyte minor_opcode; /**< */ 154 ushort length; /**< */ 155 xcb_window_t window; /**< */ 156 xcb_pixmap_t pixmap; /**< */ 157 uint serial; /**< */ 158 xcb_xfixes_region_t valid; /**< */ 159 xcb_xfixes_region_t update; /**< */ 160 short x_off; /**< */ 161 short y_off; /**< */ 162 xcb_randr_crtc_t target_crtc; /**< */ 163 xcb_sync_fence_t wait_fence; /**< */ 164 xcb_sync_fence_t idle_fence; /**< */ 165 uint options; /**< */ 166 ubyte[4] pad0; /**< */ 167 ulong target_msc; /**< */ 168 ulong divisor; /**< */ 169 ulong remainder; /**< */ 170 } 171 172 /** Opcode for xcb_present_notify_msc. */ 173 enum XCB_PRESENT_NOTIFY_MSC = 2; 174 175 /** 176 * @brief xcb_present_notify_msc_request_t 177 **/ 178 struct xcb_present_notify_msc_request_t { 179 ubyte major_opcode; /**< */ 180 ubyte minor_opcode; /**< */ 181 ushort length; /**< */ 182 xcb_window_t window; /**< */ 183 uint serial; /**< */ 184 ubyte[4] pad0; /**< */ 185 ulong target_msc; /**< */ 186 ulong divisor; /**< */ 187 ulong remainder; /**< */ 188 } 189 190 alias xcb_present_event_t = uint; 191 192 /** 193 * @brief xcb_present_event_iterator_t 194 **/ 195 struct xcb_present_event_iterator_t { 196 xcb_present_event_t* data; /**< */ 197 int rem; /**< */ 198 int index; /**< */ 199 } 200 201 /** Opcode for xcb_present_select_input. */ 202 enum XCB_PRESENT_SELECT_INPUT = 3; 203 204 /** 205 * @brief xcb_present_select_input_request_t 206 **/ 207 struct xcb_present_select_input_request_t { 208 ubyte major_opcode; /**< */ 209 ubyte minor_opcode; /**< */ 210 ushort length; /**< */ 211 xcb_present_event_t eid; /**< */ 212 xcb_window_t window; /**< */ 213 uint event_mask; /**< */ 214 } 215 216 /** 217 * @brief xcb_present_query_capabilities_cookie_t 218 **/ 219 struct xcb_present_query_capabilities_cookie_t { 220 uint sequence; /**< */ 221 } 222 223 /** Opcode for xcb_present_query_capabilities. */ 224 enum XCB_PRESENT_QUERY_CAPABILITIES = 4; 225 226 /** 227 * @brief xcb_present_query_capabilities_request_t 228 **/ 229 struct xcb_present_query_capabilities_request_t { 230 ubyte major_opcode; /**< */ 231 ubyte minor_opcode; /**< */ 232 ushort length; /**< */ 233 uint target; /**< */ 234 } 235 236 /** 237 * @brief xcb_present_query_capabilities_reply_t 238 **/ 239 struct xcb_present_query_capabilities_reply_t { 240 ubyte response_type; /**< */ 241 ubyte pad0; /**< */ 242 ushort sequence; /**< */ 243 uint length; /**< */ 244 uint capabilities; /**< */ 245 } 246 247 /** Opcode for xcb_present_generic. */ 248 enum XCB_PRESENT_GENERIC = 0; 249 250 /** 251 * @brief xcb_present_generic_event_t 252 **/ 253 struct xcb_present_generic_event_t { 254 ubyte response_type; /**< */ 255 ubyte extension; /**< */ 256 ushort sequence; /**< */ 257 uint length; /**< */ 258 ushort evtype; /**< */ 259 ubyte[2] pad0; /**< */ 260 xcb_present_event_t event; /**< */ 261 } 262 263 /** Opcode for xcb_present_configure_notify. */ 264 enum XCB_PRESENT_CONFIGURE_NOTIFY = 0; 265 266 /** 267 * @brief xcb_present_configure_notify_event_t 268 **/ 269 struct xcb_present_configure_notify_event_t { 270 ubyte response_type; /**< */ 271 ubyte extension; /**< */ 272 ushort sequence; /**< */ 273 uint length; /**< */ 274 ushort event_type; /**< */ 275 ubyte[2] pad0; /**< */ 276 xcb_present_event_t event; /**< */ 277 xcb_window_t window; /**< */ 278 short x; /**< */ 279 short y; /**< */ 280 ushort width; /**< */ 281 ushort height; /**< */ 282 short off_x; /**< */ 283 short off_y; /**< */ 284 uint full_sequence; /**< */ 285 ushort pixmap_width; /**< */ 286 ushort pixmap_height; /**< */ 287 uint pixmap_flags; /**< */ 288 } 289 290 /** Opcode for xcb_present_complete_notify. */ 291 enum XCB_PRESENT_COMPLETE_NOTIFY = 1; 292 293 /** 294 * @brief xcb_present_complete_notify_event_t 295 **/ 296 struct xcb_present_complete_notify_event_t { 297 align(1): 298 ubyte response_type; /**< */ 299 ubyte extension; /**< */ 300 ushort sequence; /**< */ 301 uint length; /**< */ 302 ushort event_type; /**< */ 303 ubyte kind; /**< */ 304 ubyte mode; /**< */ 305 xcb_present_event_t event; /**< */ 306 xcb_window_t window; /**< */ 307 uint serial; /**< */ 308 ulong ust; /**< */ 309 uint full_sequence; /**< */ 310 ulong msc; /**< */ 311 } 312 313 /** Opcode for xcb_present_idle_notify. */ 314 enum XCB_PRESENT_IDLE_NOTIFY = 2; 315 316 /** 317 * @brief xcb_present_idle_notify_event_t 318 **/ 319 struct xcb_present_idle_notify_event_t { 320 ubyte response_type; /**< */ 321 ubyte extension; /**< */ 322 ushort sequence; /**< */ 323 uint length; /**< */ 324 ushort event_type; /**< */ 325 ubyte[2] pad0; /**< */ 326 xcb_present_event_t event; /**< */ 327 xcb_window_t window; /**< */ 328 uint serial; /**< */ 329 xcb_pixmap_t pixmap; /**< */ 330 xcb_sync_fence_t idle_fence; /**< */ 331 uint full_sequence; /**< */ 332 } 333 334 /** Opcode for xcb_present_redirect_notify. */ 335 enum XCB_PRESENT_REDIRECT_NOTIFY = 3; 336 337 /** 338 * @brief xcb_present_redirect_notify_event_t 339 **/ 340 struct xcb_present_redirect_notify_event_t { 341 align(1): 342 ubyte response_type; /**< */ 343 ubyte extension; /**< */ 344 ushort sequence; /**< */ 345 uint length; /**< */ 346 ushort event_type; /**< */ 347 ubyte update_window; /**< */ 348 ubyte pad0; /**< */ 349 xcb_present_event_t event; /**< */ 350 xcb_window_t event_window; /**< */ 351 xcb_window_t window; /**< */ 352 xcb_pixmap_t pixmap; /**< */ 353 uint serial; /**< */ 354 uint full_sequence; /**< */ 355 xcb_xfixes_region_t valid_region; /**< */ 356 xcb_xfixes_region_t update_region; /**< */ 357 xcb_rectangle_t valid_rect; /**< */ 358 xcb_rectangle_t update_rect; /**< */ 359 short x_off; /**< */ 360 short y_off; /**< */ 361 xcb_randr_crtc_t target_crtc; /**< */ 362 xcb_sync_fence_t wait_fence; /**< */ 363 xcb_sync_fence_t idle_fence; /**< */ 364 uint options; /**< */ 365 ubyte[4] pad1; /**< */ 366 ulong target_msc; /**< */ 367 ulong divisor; /**< */ 368 ulong remainder; /**< */ 369 } 370 371 /** 372 * Get the next element of the iterator 373 * @param i Pointer to a xcb_present_notify_iterator_t 374 * 375 * Get the next element in the iterator. The member rem is 376 * decreased by one. The member data points to the next 377 * element. The member index is increased by sizeof(xcb_present_notify_t) 378 */ 379 void xcb_present_notify_next(xcb_present_notify_iterator_t* i /**< */ ); 380 381 /** 382 * Return the iterator pointing to the last element 383 * @param i An xcb_present_notify_iterator_t 384 * @return The iterator pointing to the last element 385 * 386 * Set the current element in the iterator to the last element. 387 * The member rem is set to 0. The member data points to the 388 * last element. 389 */ 390 xcb_generic_iterator_t xcb_present_notify_end(xcb_present_notify_iterator_t i /**< */ ); 391 392 /** 393 * 394 * @param c The connection 395 * @return A cookie 396 * 397 * Delivers a request to the X server. 398 * 399 */ 400 xcb_present_query_version_cookie_t xcb_present_query_version(xcb_connection_t* c /**< */ , uint major_version /**< */ , uint minor_version /**< */ ); 401 402 /** 403 * 404 * @param c The connection 405 * @return A cookie 406 * 407 * Delivers a request to the X server. 408 * 409 * This form can be used only if the request will cause 410 * a reply to be generated. Any returned error will be 411 * placed in the event queue. 412 */ 413 xcb_present_query_version_cookie_t xcb_present_query_version_unchecked(xcb_connection_t* c /**< */ , uint major_version /**< */ , 414 uint minor_version /**< */ ); 415 416 /** 417 * Return the reply 418 * @param c The connection 419 * @param cookie The cookie 420 * @param e The xcb_generic_error_t supplied 421 * 422 * Returns the reply of the request asked by 423 * 424 * The parameter @p e supplied to this function must be NULL if 425 * xcb_present_query_version_unchecked(). is used. 426 * Otherwise, it stores the error if any. 427 * 428 * The returned value must be freed by the caller using free(). 429 */ 430 xcb_present_query_version_reply_t* xcb_present_query_version_reply(xcb_connection_t* c /**< */ , 431 xcb_present_query_version_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 432 433 int xcb_present_pixmap_sizeof(const void* _buffer /**< */ , uint notifies_len /**< */ ); 434 435 /** 436 * 437 * @param c The connection 438 * @return A cookie 439 * 440 * Delivers a request to the X server. 441 * 442 * This form can be used only if the request will not cause 443 * a reply to be generated. Any returned error will be 444 * saved for handling by xcb_request_check(). 445 */ 446 xcb_void_cookie_t xcb_present_pixmap_checked(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ , xcb_pixmap_t pixmap /**< */ , uint serial /**< */ , 447 xcb_xfixes_region_t valid /**< */ , xcb_xfixes_region_t update /**< */ , short x_off /**< */ , short y_off /**< */ , xcb_randr_crtc_t target_crtc /**< */ , 448 xcb_sync_fence_t wait_fence /**< */ , xcb_sync_fence_t idle_fence /**< */ , uint options /**< */ , ulong target_msc /**< */ , ulong divisor /**< */ , 449 ulong remainder /**< */ , uint notifies_len /**< */ , const xcb_present_notify_t* notifies /**< */ ); 450 451 /** 452 * 453 * @param c The connection 454 * @return A cookie 455 * 456 * Delivers a request to the X server. 457 * 458 */ 459 xcb_void_cookie_t xcb_present_pixmap(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ , xcb_pixmap_t pixmap /**< */ , uint serial /**< */ , 460 xcb_xfixes_region_t valid /**< */ , xcb_xfixes_region_t update /**< */ , short x_off /**< */ , short y_off /**< */ , xcb_randr_crtc_t target_crtc /**< */ , 461 xcb_sync_fence_t wait_fence /**< */ , xcb_sync_fence_t idle_fence /**< */ , uint options /**< */ , ulong target_msc /**< */ , ulong divisor /**< */ , 462 ulong remainder /**< */ , uint notifies_len /**< */ , const xcb_present_notify_t* notifies /**< */ ); 463 464 /** 465 * 466 * @param c The connection 467 * @return A cookie 468 * 469 * Delivers a request to the X server. 470 * 471 * This form can be used only if the request will not cause 472 * a reply to be generated. Any returned error will be 473 * saved for handling by xcb_request_check(). 474 */ 475 xcb_void_cookie_t xcb_present_notify_msc_checked(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ , uint serial /**< */ , ulong target_msc /**< */ , 476 ulong divisor /**< */ , ulong remainder /**< */ ); 477 478 /** 479 * 480 * @param c The connection 481 * @return A cookie 482 * 483 * Delivers a request to the X server. 484 * 485 */ 486 xcb_void_cookie_t xcb_present_notify_msc(xcb_connection_t* c /**< */ , xcb_window_t window /**< */ , uint serial /**< */ , ulong target_msc /**< */ , 487 ulong divisor /**< */ , ulong remainder /**< */ ); 488 489 /** 490 * Get the next element of the iterator 491 * @param i Pointer to a xcb_present_event_iterator_t 492 * 493 * Get the next element in the iterator. The member rem is 494 * decreased by one. The member data points to the next 495 * element. The member index is increased by sizeof(xcb_present_event_t) 496 */ 497 void xcb_present_event_next(xcb_present_event_iterator_t* i /**< */ ); 498 499 /** 500 * Return the iterator pointing to the last element 501 * @param i An xcb_present_event_iterator_t 502 * @return The iterator pointing to the last element 503 * 504 * Set the current element in the iterator to the last element. 505 * The member rem is set to 0. The member data points to the 506 * last element. 507 */ 508 xcb_generic_iterator_t xcb_present_event_end(xcb_present_event_iterator_t i /**< */ ); 509 510 /** 511 * 512 * @param c The connection 513 * @return A cookie 514 * 515 * Delivers a request to the X server. 516 * 517 * This form can be used only if the request will not cause 518 * a reply to be generated. Any returned error will be 519 * saved for handling by xcb_request_check(). 520 */ 521 xcb_void_cookie_t xcb_present_select_input_checked(xcb_connection_t* c /**< */ , xcb_present_event_t eid /**< */ , 522 xcb_window_t window /**< */ , uint event_mask /**< */ ); 523 524 /** 525 * 526 * @param c The connection 527 * @return A cookie 528 * 529 * Delivers a request to the X server. 530 * 531 */ 532 xcb_void_cookie_t xcb_present_select_input(xcb_connection_t* c /**< */ , xcb_present_event_t eid /**< */ , xcb_window_t window /**< */ , 533 uint event_mask /**< */ ); 534 535 /** 536 * 537 * @param c The connection 538 * @return A cookie 539 * 540 * Delivers a request to the X server. 541 * 542 */ 543 xcb_present_query_capabilities_cookie_t xcb_present_query_capabilities(xcb_connection_t* c /**< */ , uint target /**< */ ); 544 545 /** 546 * 547 * @param c The connection 548 * @return A cookie 549 * 550 * Delivers a request to the X server. 551 * 552 * This form can be used only if the request will cause 553 * a reply to be generated. Any returned error will be 554 * placed in the event queue. 555 */ 556 xcb_present_query_capabilities_cookie_t xcb_present_query_capabilities_unchecked(xcb_connection_t* c /**< */ , uint target /**< */ ); 557 558 /** 559 * Return the reply 560 * @param c The connection 561 * @param cookie The cookie 562 * @param e The xcb_generic_error_t supplied 563 * 564 * Returns the reply of the request asked by 565 * 566 * The parameter @p e supplied to this function must be NULL if 567 * xcb_present_query_capabilities_unchecked(). is used. 568 * Otherwise, it stores the error if any. 569 * 570 * The returned value must be freed by the caller using free(). 571 */ 572 xcb_present_query_capabilities_reply_t* xcb_present_query_capabilities_reply(xcb_connection_t* c /**< */ , 573 xcb_present_query_capabilities_cookie_t cookie /**< */ , xcb_generic_error_t** e /**< */ ); 574 575 int xcb_present_redirect_notify_sizeof(const void* _buffer /**< */ , uint notifies_len /**< */ ); 576 577 /** 578 * @} 579 */