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 = 0, 29 XCB_SCREENSAVER_KIND_INTERNAL = 1, 30 XCB_SCREENSAVER_KIND_EXTERNAL = 2 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 = 0, 40 XCB_SCREENSAVER_STATE_ON = 1, 41 XCB_SCREENSAVER_STATE_CYCLE = 2, 42 XCB_SCREENSAVER_STATE_DISABLED = 3 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 /** 131 * @brief xcb_screensaver_set_attributes_value_list_t 132 **/ 133 typedef struct xcb_screensaver_set_attributes_value_list_t { 134 xcb_pixmap_t background_pixmap; 135 uint32_t background_pixel; 136 xcb_pixmap_t border_pixmap; 137 uint32_t border_pixel; 138 uint32_t bit_gravity; 139 uint32_t win_gravity; 140 uint32_t backing_store; 141 uint32_t backing_planes; 142 uint32_t backing_pixel; 143 xcb_bool32_t override_redirect; 144 xcb_bool32_t save_under; 145 uint32_t event_mask; 146 uint32_t do_not_propogate_mask; 147 xcb_colormap_t colormap; 148 xcb_cursor_t cursor; 149 } xcb_screensaver_set_attributes_value_list_t; 150 151 /** Opcode for xcb_screensaver_set_attributes. */ 152 #define XCB_SCREENSAVER_SET_ATTRIBUTES 3 153 154 /** 155 * @brief xcb_screensaver_set_attributes_request_t 156 **/ 157 typedef struct xcb_screensaver_set_attributes_request_t { 158 uint8_t major_opcode; 159 uint8_t minor_opcode; 160 uint16_t length; 161 xcb_drawable_t drawable; 162 int16_t x; 163 int16_t y; 164 uint16_t width; 165 uint16_t height; 166 uint16_t border_width; 167 uint8_t _class; 168 uint8_t depth; 169 xcb_visualid_t visual; 170 uint32_t value_mask; 171 } xcb_screensaver_set_attributes_request_t; 172 173 /** Opcode for xcb_screensaver_unset_attributes. */ 174 #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4 175 176 /** 177 * @brief xcb_screensaver_unset_attributes_request_t 178 **/ 179 typedef struct xcb_screensaver_unset_attributes_request_t { 180 uint8_t major_opcode; 181 uint8_t minor_opcode; 182 uint16_t length; 183 xcb_drawable_t drawable; 184 } xcb_screensaver_unset_attributes_request_t; 185 186 /** Opcode for xcb_screensaver_suspend. */ 187 #define XCB_SCREENSAVER_SUSPEND 5 188 189 /** 190 * @brief xcb_screensaver_suspend_request_t 191 **/ 192 typedef struct xcb_screensaver_suspend_request_t { 193 uint8_t major_opcode; 194 uint8_t minor_opcode; 195 uint16_t length; 196 uint8_t suspend; 197 uint8_t pad0[3]; 198 } xcb_screensaver_suspend_request_t; 199 200 /** Opcode for xcb_screensaver_notify. */ 201 #define XCB_SCREENSAVER_NOTIFY 0 202 203 /** 204 * @brief xcb_screensaver_notify_event_t 205 **/ 206 typedef struct xcb_screensaver_notify_event_t { 207 uint8_t response_type; 208 uint8_t state; 209 uint16_t sequence; 210 xcb_timestamp_t time; 211 xcb_window_t root; 212 xcb_window_t window; 213 uint8_t kind; 214 uint8_t forced; 215 uint8_t pad0[14]; 216 } xcb_screensaver_notify_event_t; 217 218 /** 219 * 220 * @param c The connection 221 * @return A cookie 222 * 223 * Delivers a request to the X server. 224 * 225 */ 226 xcb_screensaver_query_version_cookie_t 227 xcb_screensaver_query_version (xcb_connection_t *c, 228 uint8_t client_major_version, 229 uint8_t client_minor_version); 230 231 /** 232 * 233 * @param c The connection 234 * @return A cookie 235 * 236 * Delivers a request to the X server. 237 * 238 * This form can be used only if the request will cause 239 * a reply to be generated. Any returned error will be 240 * placed in the event queue. 241 */ 242 xcb_screensaver_query_version_cookie_t 243 xcb_screensaver_query_version_unchecked (xcb_connection_t *c, 244 uint8_t client_major_version, 245 uint8_t client_minor_version); 246 247 /** 248 * Return the reply 249 * @param c The connection 250 * @param cookie The cookie 251 * @param e The xcb_generic_error_t supplied 252 * 253 * Returns the reply of the request asked by 254 * 255 * The parameter @p e supplied to this function must be NULL if 256 * xcb_screensaver_query_version_unchecked(). is used. 257 * Otherwise, it stores the error if any. 258 * 259 * The returned value must be freed by the caller using free(). 260 */ 261 xcb_screensaver_query_version_reply_t * 262 xcb_screensaver_query_version_reply (xcb_connection_t *c, 263 xcb_screensaver_query_version_cookie_t cookie /**< */, 264 xcb_generic_error_t **e); 265 266 /** 267 * 268 * @param c The connection 269 * @return A cookie 270 * 271 * Delivers a request to the X server. 272 * 273 */ 274 xcb_screensaver_query_info_cookie_t 275 xcb_screensaver_query_info (xcb_connection_t *c, 276 xcb_drawable_t drawable); 277 278 /** 279 * 280 * @param c The connection 281 * @return A cookie 282 * 283 * Delivers a request to the X server. 284 * 285 * This form can be used only if the request will cause 286 * a reply to be generated. Any returned error will be 287 * placed in the event queue. 288 */ 289 xcb_screensaver_query_info_cookie_t 290 xcb_screensaver_query_info_unchecked (xcb_connection_t *c, 291 xcb_drawable_t drawable); 292 293 /** 294 * Return the reply 295 * @param c The connection 296 * @param cookie The cookie 297 * @param e The xcb_generic_error_t supplied 298 * 299 * Returns the reply of the request asked by 300 * 301 * The parameter @p e supplied to this function must be NULL if 302 * xcb_screensaver_query_info_unchecked(). is used. 303 * Otherwise, it stores the error if any. 304 * 305 * The returned value must be freed by the caller using free(). 306 */ 307 xcb_screensaver_query_info_reply_t * 308 xcb_screensaver_query_info_reply (xcb_connection_t *c, 309 xcb_screensaver_query_info_cookie_t cookie /**< */, 310 xcb_generic_error_t **e); 311 312 /** 313 * 314 * @param c The connection 315 * @return A cookie 316 * 317 * Delivers a request to the X server. 318 * 319 * This form can be used only if the request will not cause 320 * a reply to be generated. Any returned error will be 321 * saved for handling by xcb_request_check(). 322 */ 323 xcb_void_cookie_t 324 xcb_screensaver_select_input_checked (xcb_connection_t *c, 325 xcb_drawable_t drawable, 326 uint32_t event_mask); 327 328 /** 329 * 330 * @param c The connection 331 * @return A cookie 332 * 333 * Delivers a request to the X server. 334 * 335 */ 336 xcb_void_cookie_t 337 xcb_screensaver_select_input (xcb_connection_t *c, 338 xcb_drawable_t drawable, 339 uint32_t event_mask); 340 341 int 342 xcb_screensaver_set_attributes_value_list_serialize (void **_buffer, 343 uint32_t value_mask, 344 const xcb_screensaver_set_attributes_value_list_t *_aux); 345 346 int 347 xcb_screensaver_set_attributes_value_list_unpack (const void *_buffer, 348 uint32_t value_mask, 349 xcb_screensaver_set_attributes_value_list_t *_aux); 350 351 int 352 xcb_screensaver_set_attributes_value_list_sizeof (const void *_buffer, 353 uint32_t value_mask); 354 355 int 356 xcb_screensaver_set_attributes_sizeof (const void *_buffer); 357 358 /** 359 * 360 * @param c The connection 361 * @return A cookie 362 * 363 * Delivers a request to the X server. 364 * 365 * This form can be used only if the request will not cause 366 * a reply to be generated. Any returned error will be 367 * saved for handling by xcb_request_check(). 368 */ 369 xcb_void_cookie_t 370 xcb_screensaver_set_attributes_checked (xcb_connection_t *c, 371 xcb_drawable_t drawable, 372 int16_t x, 373 int16_t y, 374 uint16_t width, 375 uint16_t height, 376 uint16_t border_width, 377 uint8_t _class, 378 uint8_t depth, 379 xcb_visualid_t visual, 380 uint32_t value_mask, 381 const void *value_list); 382 383 /** 384 * 385 * @param c The connection 386 * @return A cookie 387 * 388 * Delivers a request to the X server. 389 * 390 */ 391 xcb_void_cookie_t 392 xcb_screensaver_set_attributes (xcb_connection_t *c, 393 xcb_drawable_t drawable, 394 int16_t x, 395 int16_t y, 396 uint16_t width, 397 uint16_t height, 398 uint16_t border_width, 399 uint8_t _class, 400 uint8_t depth, 401 xcb_visualid_t visual, 402 uint32_t value_mask, 403 const void *value_list); 404 405 /** 406 * 407 * @param c The connection 408 * @return A cookie 409 * 410 * Delivers a request to the X server. 411 * 412 * This form can be used only if the request will not cause 413 * a reply to be generated. Any returned error will be 414 * saved for handling by xcb_request_check(). 415 */ 416 xcb_void_cookie_t 417 xcb_screensaver_set_attributes_aux_checked (xcb_connection_t *c, 418 xcb_drawable_t drawable, 419 int16_t x, 420 int16_t y, 421 uint16_t width, 422 uint16_t height, 423 uint16_t border_width, 424 uint8_t _class, 425 uint8_t depth, 426 xcb_visualid_t visual, 427 uint32_t value_mask, 428 const xcb_screensaver_set_attributes_value_list_t *value_list); 429 430 /** 431 * 432 * @param c The connection 433 * @return A cookie 434 * 435 * Delivers a request to the X server. 436 * 437 */ 438 xcb_void_cookie_t 439 xcb_screensaver_set_attributes_aux (xcb_connection_t *c, 440 xcb_drawable_t drawable, 441 int16_t x, 442 int16_t y, 443 uint16_t width, 444 uint16_t height, 445 uint16_t border_width, 446 uint8_t _class, 447 uint8_t depth, 448 xcb_visualid_t visual, 449 uint32_t value_mask, 450 const xcb_screensaver_set_attributes_value_list_t *value_list); 451 452 void * 453 xcb_screensaver_set_attributes_value_list (const xcb_screensaver_set_attributes_request_t *R); 454 455 /** 456 * 457 * @param c The connection 458 * @return A cookie 459 * 460 * Delivers a request to the X server. 461 * 462 * This form can be used only if the request will not cause 463 * a reply to be generated. Any returned error will be 464 * saved for handling by xcb_request_check(). 465 */ 466 xcb_void_cookie_t 467 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c, 468 xcb_drawable_t drawable); 469 470 /** 471 * 472 * @param c The connection 473 * @return A cookie 474 * 475 * Delivers a request to the X server. 476 * 477 */ 478 xcb_void_cookie_t 479 xcb_screensaver_unset_attributes (xcb_connection_t *c, 480 xcb_drawable_t drawable); 481 482 /** 483 * 484 * @param c The connection 485 * @return A cookie 486 * 487 * Delivers a request to the X server. 488 * 489 * This form can be used only if the request will not cause 490 * a reply to be generated. Any returned error will be 491 * saved for handling by xcb_request_check(). 492 */ 493 xcb_void_cookie_t 494 xcb_screensaver_suspend_checked (xcb_connection_t *c, 495 uint8_t suspend); 496 497 /** 498 * 499 * @param c The connection 500 * @return A cookie 501 * 502 * Delivers a request to the X server. 503 * 504 */ 505 xcb_void_cookie_t 506 xcb_screensaver_suspend (xcb_connection_t *c, 507 uint8_t suspend); 508 509 510 #ifdef __cplusplus 511 } 512 #endif 513 514 #endif 515 516 /** 517 * @} 518 */ 519