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 19extern "C" { 20#endif 21 22#define XCB_SCREENSAVER_MAJOR_VERSION 1 23#define XCB_SCREENSAVER_MINOR_VERSION 1 24 25extern xcb_extension_t xcb_screensaver_id; 26 27typedef 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 33typedef 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 38typedef 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 **/ 48typedef 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 **/ 58typedef 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 **/ 70typedef 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 **/ 83typedef 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 **/ 93typedef 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 **/ 103typedef 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 **/ 122typedef 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 **/ 136typedef 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 **/ 158typedef 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 **/ 171typedef 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 **/ 185typedef 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 * Delivers a request to the X server 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 220xcb_screensaver_query_version_cookie_t 221xcb_screensaver_query_version (xcb_connection_t *c /**< */, 222 uint8_t client_major_version /**< */, 223 uint8_t client_minor_version /**< */); 224 225/** 226 * Delivers a request to the X server 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 248xcb_screensaver_query_version_cookie_t 249xcb_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 279xcb_screensaver_query_version_reply_t * 280xcb_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 * Delivers a request to the X server 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 303xcb_screensaver_query_info_cookie_t 304xcb_screensaver_query_info (xcb_connection_t *c /**< */, 305 xcb_drawable_t drawable /**< */); 306 307/** 308 * Delivers a request to the X server 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 329xcb_screensaver_query_info_cookie_t 330xcb_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 359xcb_screensaver_query_info_reply_t * 360xcb_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 * Delivers a request to the X server 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 387xcb_void_cookie_t 388xcb_screensaver_select_input_checked (xcb_connection_t *c /**< */, 389 xcb_drawable_t drawable /**< */, 390 uint32_t event_mask /**< */); 391 392/** 393 * Delivers a request to the X server 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 412xcb_void_cookie_t 413xcb_screensaver_select_input (xcb_connection_t *c /**< */, 414 xcb_drawable_t drawable /**< */, 415 uint32_t event_mask /**< */); 416 417/** 418 * Delivers a request to the X server 419 * @param c The connection 420 * @return A cookie 421 * 422 * Delivers a request to the X server. 423 * 424 * This form can be used only if the request will not cause 425 * a reply to be generated. Any returned error will be 426 * saved for handling by xcb_request_check(). 427 */ 428 429/***************************************************************************** 430 ** 431 ** xcb_void_cookie_t xcb_screensaver_set_attributes_checked 432 ** 433 ** @param xcb_connection_t *c 434 ** @param xcb_drawable_t drawable 435 ** @param int16_t x 436 ** @param int16_t y 437 ** @param uint16_t width 438 ** @param uint16_t height 439 ** @param uint16_t border_width 440 ** @param uint8_t _class 441 ** @param uint8_t depth 442 ** @param xcb_visualid_t visual 443 ** @param uint32_t value_mask 444 ** @param const uint32_t *value_list 445 ** @returns xcb_void_cookie_t 446 ** 447 *****************************************************************************/ 448 449xcb_void_cookie_t 450xcb_screensaver_set_attributes_checked (xcb_connection_t *c /**< */, 451 xcb_drawable_t drawable /**< */, 452 int16_t x /**< */, 453 int16_t y /**< */, 454 uint16_t width /**< */, 455 uint16_t height /**< */, 456 uint16_t border_width /**< */, 457 uint8_t _class /**< */, 458 uint8_t depth /**< */, 459 xcb_visualid_t visual /**< */, 460 uint32_t value_mask /**< */, 461 const uint32_t *value_list /**< */); 462 463/** 464 * Delivers a request to the X server 465 * @param c The connection 466 * @return A cookie 467 * 468 * Delivers a request to the X server. 469 * 470 */ 471 472/***************************************************************************** 473 ** 474 ** xcb_void_cookie_t xcb_screensaver_set_attributes 475 ** 476 ** @param xcb_connection_t *c 477 ** @param xcb_drawable_t drawable 478 ** @param int16_t x 479 ** @param int16_t y 480 ** @param uint16_t width 481 ** @param uint16_t height 482 ** @param uint16_t border_width 483 ** @param uint8_t _class 484 ** @param uint8_t depth 485 ** @param xcb_visualid_t visual 486 ** @param uint32_t value_mask 487 ** @param const uint32_t *value_list 488 ** @returns xcb_void_cookie_t 489 ** 490 *****************************************************************************/ 491 492xcb_void_cookie_t 493xcb_screensaver_set_attributes (xcb_connection_t *c /**< */, 494 xcb_drawable_t drawable /**< */, 495 int16_t x /**< */, 496 int16_t y /**< */, 497 uint16_t width /**< */, 498 uint16_t height /**< */, 499 uint16_t border_width /**< */, 500 uint8_t _class /**< */, 501 uint8_t depth /**< */, 502 xcb_visualid_t visual /**< */, 503 uint32_t value_mask /**< */, 504 const uint32_t *value_list /**< */); 505 506/** 507 * Delivers a request to the X server 508 * @param c The connection 509 * @return A cookie 510 * 511 * Delivers a request to the X server. 512 * 513 * This form can be used only if the request will not cause 514 * a reply to be generated. Any returned error will be 515 * saved for handling by xcb_request_check(). 516 */ 517 518/***************************************************************************** 519 ** 520 ** xcb_void_cookie_t xcb_screensaver_unset_attributes_checked 521 ** 522 ** @param xcb_connection_t *c 523 ** @param xcb_drawable_t drawable 524 ** @returns xcb_void_cookie_t 525 ** 526 *****************************************************************************/ 527 528xcb_void_cookie_t 529xcb_screensaver_unset_attributes_checked (xcb_connection_t *c /**< */, 530 xcb_drawable_t drawable /**< */); 531 532/** 533 * Delivers a request to the X server 534 * @param c The connection 535 * @return A cookie 536 * 537 * Delivers a request to the X server. 538 * 539 */ 540 541/***************************************************************************** 542 ** 543 ** xcb_void_cookie_t xcb_screensaver_unset_attributes 544 ** 545 ** @param xcb_connection_t *c 546 ** @param xcb_drawable_t drawable 547 ** @returns xcb_void_cookie_t 548 ** 549 *****************************************************************************/ 550 551xcb_void_cookie_t 552xcb_screensaver_unset_attributes (xcb_connection_t *c /**< */, 553 xcb_drawable_t drawable /**< */); 554 555/** 556 * Delivers a request to the X server 557 * @param c The connection 558 * @return A cookie 559 * 560 * Delivers a request to the X server. 561 * 562 * This form can be used only if the request will not cause 563 * a reply to be generated. Any returned error will be 564 * saved for handling by xcb_request_check(). 565 */ 566 567/***************************************************************************** 568 ** 569 ** xcb_void_cookie_t xcb_screensaver_suspend_checked 570 ** 571 ** @param xcb_connection_t *c 572 ** @param uint8_t suspend 573 ** @returns xcb_void_cookie_t 574 ** 575 *****************************************************************************/ 576 577xcb_void_cookie_t 578xcb_screensaver_suspend_checked (xcb_connection_t *c /**< */, 579 uint8_t suspend /**< */); 580 581/** 582 * Delivers a request to the X server 583 * @param c The connection 584 * @return A cookie 585 * 586 * Delivers a request to the X server. 587 * 588 */ 589 590/***************************************************************************** 591 ** 592 ** xcb_void_cookie_t xcb_screensaver_suspend 593 ** 594 ** @param xcb_connection_t *c 595 ** @param uint8_t suspend 596 ** @returns xcb_void_cookie_t 597 ** 598 *****************************************************************************/ 599 600xcb_void_cookie_t 601xcb_screensaver_suspend (xcb_connection_t *c /**< */, 602 uint8_t suspend /**< */); 603 604 605#ifdef __cplusplus 606} 607#endif 608 609#endif 610 611/** 612 * @} 613 */ 614