1 /* 2 * This file generated automatically from screensaver.xml by c_client.py. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_ScreenSaver_API XCB ScreenSaver API 8 * @brief ScreenSaver XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 #ifndef __SCREENSAVER_H 13 #define __SCREENSAVER_H 14 15 #include "xcb.h" 16 #include "xproto.h" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 #define XCB_SCREENSAVER_MAJOR_VERSION 1 23 #define XCB_SCREENSAVER_MINOR_VERSION 1 24 25 extern xcb_extension_t xcb_screensaver_id; 26 27 typedef enum xcb_screensaver_kind_t { 28 XCB_SCREENSAVER_KIND_BLANKED, 29 XCB_SCREENSAVER_KIND_INTERNAL, 30 XCB_SCREENSAVER_KIND_EXTERNAL 31 } xcb_screensaver_kind_t; 32 33 typedef enum xcb_screensaver_event_t { 34 XCB_SCREENSAVER_EVENT_NOTIFY_MASK = 1, 35 XCB_SCREENSAVER_EVENT_CYCLE_MASK = 2 36 } xcb_screensaver_event_t; 37 38 typedef enum xcb_screensaver_state_t { 39 XCB_SCREENSAVER_STATE_OFF, 40 XCB_SCREENSAVER_STATE_ON, 41 XCB_SCREENSAVER_STATE_CYCLE, 42 XCB_SCREENSAVER_STATE_DISABLED 43 } xcb_screensaver_state_t; 44 45 /** 46 * @brief xcb_screensaver_query_version_cookie_t 47 **/ 48 typedef struct xcb_screensaver_query_version_cookie_t { 49 unsigned int sequence; /**< */ 50 } xcb_screensaver_query_version_cookie_t; 51 52 /** Opcode for xcb_screensaver_query_version. */ 53 #define XCB_SCREENSAVER_QUERY_VERSION 0 54 55 /** 56 * @brief xcb_screensaver_query_version_request_t 57 **/ 58 typedef struct xcb_screensaver_query_version_request_t { 59 uint8_t major_opcode; /**< */ 60 uint8_t minor_opcode; /**< */ 61 uint16_t length; /**< */ 62 uint8_t client_major_version; /**< */ 63 uint8_t client_minor_version; /**< */ 64 uint8_t pad0[2]; /**< */ 65 } xcb_screensaver_query_version_request_t; 66 67 /** 68 * @brief xcb_screensaver_query_version_reply_t 69 **/ 70 typedef struct xcb_screensaver_query_version_reply_t { 71 uint8_t response_type; /**< */ 72 uint8_t pad0; /**< */ 73 uint16_t sequence; /**< */ 74 uint32_t length; /**< */ 75 uint16_t server_major_version; /**< */ 76 uint16_t server_minor_version; /**< */ 77 uint8_t pad1[20]; /**< */ 78 } xcb_screensaver_query_version_reply_t; 79 80 /** 81 * @brief xcb_screensaver_query_info_cookie_t 82 **/ 83 typedef struct xcb_screensaver_query_info_cookie_t { 84 unsigned int sequence; /**< */ 85 } xcb_screensaver_query_info_cookie_t; 86 87 /** Opcode for xcb_screensaver_query_info. */ 88 #define XCB_SCREENSAVER_QUERY_INFO 1 89 90 /** 91 * @brief xcb_screensaver_query_info_request_t 92 **/ 93 typedef struct xcb_screensaver_query_info_request_t { 94 uint8_t major_opcode; /**< */ 95 uint8_t minor_opcode; /**< */ 96 uint16_t length; /**< */ 97 xcb_drawable_t drawable; /**< */ 98 } xcb_screensaver_query_info_request_t; 99 100 /** 101 * @brief xcb_screensaver_query_info_reply_t 102 **/ 103 typedef struct xcb_screensaver_query_info_reply_t { 104 uint8_t response_type; /**< */ 105 uint8_t state; /**< */ 106 uint16_t sequence; /**< */ 107 uint32_t length; /**< */ 108 xcb_window_t saver_window; /**< */ 109 uint32_t ms_until_server; /**< */ 110 uint32_t ms_since_user_input; /**< */ 111 uint32_t event_mask; /**< */ 112 uint8_t kind; /**< */ 113 uint8_t pad0[7]; /**< */ 114 } xcb_screensaver_query_info_reply_t; 115 116 /** Opcode for xcb_screensaver_select_input. */ 117 #define XCB_SCREENSAVER_SELECT_INPUT 2 118 119 /** 120 * @brief xcb_screensaver_select_input_request_t 121 **/ 122 typedef struct xcb_screensaver_select_input_request_t { 123 uint8_t major_opcode; /**< */ 124 uint8_t minor_opcode; /**< */ 125 uint16_t length; /**< */ 126 xcb_drawable_t drawable; /**< */ 127 uint32_t event_mask; /**< */ 128 } xcb_screensaver_select_input_request_t; 129 130 /** Opcode for xcb_screensaver_set_attributes. */ 131 #define XCB_SCREENSAVER_SET_ATTRIBUTES 3 132 133 /** 134 * @brief xcb_screensaver_set_attributes_request_t 135 **/ 136 typedef struct xcb_screensaver_set_attributes_request_t { 137 uint8_t major_opcode; /**< */ 138 uint8_t minor_opcode; /**< */ 139 uint16_t length; /**< */ 140 xcb_drawable_t drawable; /**< */ 141 int16_t x; /**< */ 142 int16_t y; /**< */ 143 uint16_t width; /**< */ 144 uint16_t height; /**< */ 145 uint16_t border_width; /**< */ 146 uint8_t _class; /**< */ 147 uint8_t depth; /**< */ 148 xcb_visualid_t visual; /**< */ 149 uint32_t value_mask; /**< */ 150 } xcb_screensaver_set_attributes_request_t; 151 152 /** Opcode for xcb_screensaver_unset_attributes. */ 153 #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4 154 155 /** 156 * @brief xcb_screensaver_unset_attributes_request_t 157 **/ 158 typedef struct xcb_screensaver_unset_attributes_request_t { 159 uint8_t major_opcode; /**< */ 160 uint8_t minor_opcode; /**< */ 161 uint16_t length; /**< */ 162 xcb_drawable_t drawable; /**< */ 163 } xcb_screensaver_unset_attributes_request_t; 164 165 /** Opcode for xcb_screensaver_suspend. */ 166 #define XCB_SCREENSAVER_SUSPEND 5 167 168 /** 169 * @brief xcb_screensaver_suspend_request_t 170 **/ 171 typedef struct xcb_screensaver_suspend_request_t { 172 uint8_t major_opcode; /**< */ 173 uint8_t minor_opcode; /**< */ 174 uint16_t length; /**< */ 175 uint8_t suspend; /**< */ 176 uint8_t pad0[3]; /**< */ 177 } xcb_screensaver_suspend_request_t; 178 179 /** Opcode for xcb_screensaver_notify. */ 180 #define XCB_SCREENSAVER_NOTIFY 0 181 182 /** 183 * @brief xcb_screensaver_notify_event_t 184 **/ 185 typedef struct xcb_screensaver_notify_event_t { 186 uint8_t response_type; /**< */ 187 uint8_t code; /**< */ 188 uint16_t sequence; /**< */ 189 uint8_t state; /**< */ 190 uint8_t pad0; /**< */ 191 uint16_t sequence_number; /**< */ 192 xcb_timestamp_t time; /**< */ 193 xcb_window_t root; /**< */ 194 xcb_window_t window; /**< */ 195 uint8_t kind; /**< */ 196 uint8_t forced; /**< */ 197 uint8_t pad1[14]; /**< */ 198 } xcb_screensaver_notify_event_t; 199 200 /** 201 * 202 * @param c The connection 203 * @return A cookie 204 * 205 * Delivers a request to the X server. 206 * 207 */ 208 209 /***************************************************************************** 210 ** 211 ** xcb_screensaver_query_version_cookie_t xcb_screensaver_query_version 212 ** 213 ** @param xcb_connection_t *c 214 ** @param uint8_t client_major_version 215 ** @param uint8_t client_minor_version 216 ** @returns xcb_screensaver_query_version_cookie_t 217 ** 218 *****************************************************************************/ 219 220 xcb_screensaver_query_version_cookie_t 221 xcb_screensaver_query_version (xcb_connection_t *c /**< */, 222 uint8_t client_major_version /**< */, 223 uint8_t client_minor_version /**< */); 224 225 /** 226 * 227 * @param c The connection 228 * @return A cookie 229 * 230 * Delivers a request to the X server. 231 * 232 * This form can be used only if the request will cause 233 * a reply to be generated. Any returned error will be 234 * placed in the event queue. 235 */ 236 237 /***************************************************************************** 238 ** 239 ** xcb_screensaver_query_version_cookie_t xcb_screensaver_query_version_unchecked 240 ** 241 ** @param xcb_connection_t *c 242 ** @param uint8_t client_major_version 243 ** @param uint8_t client_minor_version 244 ** @returns xcb_screensaver_query_version_cookie_t 245 ** 246 *****************************************************************************/ 247 248 xcb_screensaver_query_version_cookie_t 249 xcb_screensaver_query_version_unchecked (xcb_connection_t *c /**< */, 250 uint8_t client_major_version /**< */, 251 uint8_t client_minor_version /**< */); 252 253 /** 254 * Return the reply 255 * @param c The connection 256 * @param cookie The cookie 257 * @param e The xcb_generic_error_t supplied 258 * 259 * Returns the reply of the request asked by 260 * 261 * The parameter @p e supplied to this function must be NULL if 262 * xcb_screensaver_query_version_unchecked(). is used. 263 * Otherwise, it stores the error if any. 264 * 265 * The returned value must be freed by the caller using free(). 266 */ 267 268 /***************************************************************************** 269 ** 270 ** xcb_screensaver_query_version_reply_t * xcb_screensaver_query_version_reply 271 ** 272 ** @param xcb_connection_t *c 273 ** @param xcb_screensaver_query_version_cookie_t cookie 274 ** @param xcb_generic_error_t **e 275 ** @returns xcb_screensaver_query_version_reply_t * 276 ** 277 *****************************************************************************/ 278 279 xcb_screensaver_query_version_reply_t * 280 xcb_screensaver_query_version_reply (xcb_connection_t *c /**< */, 281 xcb_screensaver_query_version_cookie_t cookie /**< */, 282 xcb_generic_error_t **e /**< */); 283 284 /** 285 * 286 * @param c The connection 287 * @return A cookie 288 * 289 * Delivers a request to the X server. 290 * 291 */ 292 293 /***************************************************************************** 294 ** 295 ** xcb_screensaver_query_info_cookie_t xcb_screensaver_query_info 296 ** 297 ** @param xcb_connection_t *c 298 ** @param xcb_drawable_t drawable 299 ** @returns xcb_screensaver_query_info_cookie_t 300 ** 301 *****************************************************************************/ 302 303 xcb_screensaver_query_info_cookie_t 304 xcb_screensaver_query_info (xcb_connection_t *c /**< */, 305 xcb_drawable_t drawable /**< */); 306 307 /** 308 * 309 * @param c The connection 310 * @return A cookie 311 * 312 * Delivers a request to the X server. 313 * 314 * This form can be used only if the request will cause 315 * a reply to be generated. Any returned error will be 316 * placed in the event queue. 317 */ 318 319 /***************************************************************************** 320 ** 321 ** xcb_screensaver_query_info_cookie_t xcb_screensaver_query_info_unchecked 322 ** 323 ** @param xcb_connection_t *c 324 ** @param xcb_drawable_t drawable 325 ** @returns xcb_screensaver_query_info_cookie_t 326 ** 327 *****************************************************************************/ 328 329 xcb_screensaver_query_info_cookie_t 330 xcb_screensaver_query_info_unchecked (xcb_connection_t *c /**< */, 331 xcb_drawable_t drawable /**< */); 332 333 /** 334 * Return the reply 335 * @param c The connection 336 * @param cookie The cookie 337 * @param e The xcb_generic_error_t supplied 338 * 339 * Returns the reply of the request asked by 340 * 341 * The parameter @p e supplied to this function must be NULL if 342 * xcb_screensaver_query_info_unchecked(). is used. 343 * Otherwise, it stores the error if any. 344 * 345 * The returned value must be freed by the caller using free(). 346 */ 347 348 /***************************************************************************** 349 ** 350 ** xcb_screensaver_query_info_reply_t * xcb_screensaver_query_info_reply 351 ** 352 ** @param xcb_connection_t *c 353 ** @param xcb_screensaver_query_info_cookie_t cookie 354 ** @param xcb_generic_error_t **e 355 ** @returns xcb_screensaver_query_info_reply_t * 356 ** 357 *****************************************************************************/ 358 359 xcb_screensaver_query_info_reply_t * 360 xcb_screensaver_query_info_reply (xcb_connection_t *c /**< */, 361 xcb_screensaver_query_info_cookie_t cookie /**< */, 362 xcb_generic_error_t **e /**< */); 363 364 /** 365 * 366 * @param c The connection 367 * @return A cookie 368 * 369 * Delivers a request to the X server. 370 * 371 * This form can be used only if the request will not cause 372 * a reply to be generated. Any returned error will be 373 * saved for handling by xcb_request_check(). 374 */ 375 376 /***************************************************************************** 377 ** 378 ** xcb_void_cookie_t xcb_screensaver_select_input_checked 379 ** 380 ** @param xcb_connection_t *c 381 ** @param xcb_drawable_t drawable 382 ** @param uint32_t event_mask 383 ** @returns xcb_void_cookie_t 384 ** 385 *****************************************************************************/ 386 387 xcb_void_cookie_t 388 xcb_screensaver_select_input_checked (xcb_connection_t *c /**< */, 389 xcb_drawable_t drawable /**< */, 390 uint32_t event_mask /**< */); 391 392 /** 393 * 394 * @param c The connection 395 * @return A cookie 396 * 397 * Delivers a request to the X server. 398 * 399 */ 400 401 /***************************************************************************** 402 ** 403 ** xcb_void_cookie_t xcb_screensaver_select_input 404 ** 405 ** @param xcb_connection_t *c 406 ** @param xcb_drawable_t drawable 407 ** @param uint32_t event_mask 408 ** @returns xcb_void_cookie_t 409 ** 410 *****************************************************************************/ 411 412 xcb_void_cookie_t 413 xcb_screensaver_select_input (xcb_connection_t *c /**< */, 414 xcb_drawable_t drawable /**< */, 415 uint32_t event_mask /**< */); 416 417 int 418 xcb_screensaver_set_attributes_sizeof (const void *_buffer /**< */); 419 420 /** 421 * 422 * @param c The connection 423 * @return A cookie 424 * 425 * Delivers a request to the X server. 426 * 427 * This form can be used only if the request will not cause 428 * a reply to be generated. Any returned error will be 429 * saved for handling by xcb_request_check(). 430 */ 431 432 /***************************************************************************** 433 ** 434 ** xcb_void_cookie_t xcb_screensaver_set_attributes_checked 435 ** 436 ** @param xcb_connection_t *c 437 ** @param xcb_drawable_t drawable 438 ** @param int16_t x 439 ** @param int16_t y 440 ** @param uint16_t width 441 ** @param uint16_t height 442 ** @param uint16_t border_width 443 ** @param uint8_t _class 444 ** @param uint8_t depth 445 ** @param xcb_visualid_t visual 446 ** @param uint32_t value_mask 447 ** @param const uint32_t *value_list 448 ** @returns xcb_void_cookie_t 449 ** 450 *****************************************************************************/ 451 452 xcb_void_cookie_t 453 xcb_screensaver_set_attributes_checked (xcb_connection_t *c /**< */, 454 xcb_drawable_t drawable /**< */, 455 int16_t x /**< */, 456 int16_t y /**< */, 457 uint16_t width /**< */, 458 uint16_t height /**< */, 459 uint16_t border_width /**< */, 460 uint8_t _class /**< */, 461 uint8_t depth /**< */, 462 xcb_visualid_t visual /**< */, 463 uint32_t value_mask /**< */, 464 const uint32_t *value_list /**< */); 465 466 /** 467 * 468 * @param c The connection 469 * @return A cookie 470 * 471 * Delivers a request to the X server. 472 * 473 */ 474 475 /***************************************************************************** 476 ** 477 ** xcb_void_cookie_t xcb_screensaver_set_attributes 478 ** 479 ** @param xcb_connection_t *c 480 ** @param xcb_drawable_t drawable 481 ** @param int16_t x 482 ** @param int16_t y 483 ** @param uint16_t width 484 ** @param uint16_t height 485 ** @param uint16_t border_width 486 ** @param uint8_t _class 487 ** @param uint8_t depth 488 ** @param xcb_visualid_t visual 489 ** @param uint32_t value_mask 490 ** @param const uint32_t *value_list 491 ** @returns xcb_void_cookie_t 492 ** 493 *****************************************************************************/ 494 495 xcb_void_cookie_t 496 xcb_screensaver_set_attributes (xcb_connection_t *c /**< */, 497 xcb_drawable_t drawable /**< */, 498 int16_t x /**< */, 499 int16_t y /**< */, 500 uint16_t width /**< */, 501 uint16_t height /**< */, 502 uint16_t border_width /**< */, 503 uint8_t _class /**< */, 504 uint8_t depth /**< */, 505 xcb_visualid_t visual /**< */, 506 uint32_t value_mask /**< */, 507 const uint32_t *value_list /**< */); 508 509 /** 510 * 511 * @param c The connection 512 * @return A cookie 513 * 514 * Delivers a request to the X server. 515 * 516 * This form can be used only if the request will not cause 517 * a reply to be generated. Any returned error will be 518 * saved for handling by xcb_request_check(). 519 */ 520 521 /***************************************************************************** 522 ** 523 ** xcb_void_cookie_t xcb_screensaver_unset_attributes_checked 524 ** 525 ** @param xcb_connection_t *c 526 ** @param xcb_drawable_t drawable 527 ** @returns xcb_void_cookie_t 528 ** 529 *****************************************************************************/ 530 531 xcb_void_cookie_t 532 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c /**< */, 533 xcb_drawable_t drawable /**< */); 534 535 /** 536 * 537 * @param c The connection 538 * @return A cookie 539 * 540 * Delivers a request to the X server. 541 * 542 */ 543 544 /***************************************************************************** 545 ** 546 ** xcb_void_cookie_t xcb_screensaver_unset_attributes 547 ** 548 ** @param xcb_connection_t *c 549 ** @param xcb_drawable_t drawable 550 ** @returns xcb_void_cookie_t 551 ** 552 *****************************************************************************/ 553 554 xcb_void_cookie_t 555 xcb_screensaver_unset_attributes (xcb_connection_t *c /**< */, 556 xcb_drawable_t drawable /**< */); 557 558 /** 559 * 560 * @param c The connection 561 * @return A cookie 562 * 563 * Delivers a request to the X server. 564 * 565 * This form can be used only if the request will not cause 566 * a reply to be generated. Any returned error will be 567 * saved for handling by xcb_request_check(). 568 */ 569 570 /***************************************************************************** 571 ** 572 ** xcb_void_cookie_t xcb_screensaver_suspend_checked 573 ** 574 ** @param xcb_connection_t *c 575 ** @param uint8_t suspend 576 ** @returns xcb_void_cookie_t 577 ** 578 *****************************************************************************/ 579 580 xcb_void_cookie_t 581 xcb_screensaver_suspend_checked (xcb_connection_t *c /**< */, 582 uint8_t suspend /**< */); 583 584 /** 585 * 586 * @param c The connection 587 * @return A cookie 588 * 589 * Delivers a request to the X server. 590 * 591 */ 592 593 /***************************************************************************** 594 ** 595 ** xcb_void_cookie_t xcb_screensaver_suspend 596 ** 597 ** @param xcb_connection_t *c 598 ** @param uint8_t suspend 599 ** @returns xcb_void_cookie_t 600 ** 601 *****************************************************************************/ 602 603 xcb_void_cookie_t 604 xcb_screensaver_suspend (xcb_connection_t *c /**< */, 605 uint8_t suspend /**< */); 606 607 608 #ifdef __cplusplus 609 } 610 #endif 611 612 #endif 613 614 /** 615 * @} 616 */ 617