| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 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 | |
| 47 | |
| 48 | typedef struct xcb_screensaver_query_version_cookie_t { |
| 49 | unsigned int sequence; |
| 50 | } xcb_screensaver_query_version_cookie_t; |
| 51 | |
| 52 | |
| 53 | #define XCB_SCREENSAVER_QUERY_VERSION 0 |
| 54 | |
| 55 | |
| 56 | |
| 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 | |
| 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 | |
| 82 | |
| 83 | typedef struct xcb_screensaver_query_info_cookie_t { |
| 84 | unsigned int sequence; |
| 85 | } xcb_screensaver_query_info_cookie_t; |
| 86 | |
| 87 | |
| 88 | #define XCB_SCREENSAVER_QUERY_INFO 1 |
| 89 | |
| 90 | |
| 91 | |
| 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 | |
| 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 | |
| 117 | #define XCB_SCREENSAVER_SELECT_INPUT 2 |
| 118 | |
| 119 | |
| 120 | |
| 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 | |
| 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 | |
| 152 | #define XCB_SCREENSAVER_SET_ATTRIBUTES 3 |
| 153 | |
| 154 | |
| 155 | |
| 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 | |
| 174 | #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4 |
| 175 | |
| 176 | |
| 177 | |
| 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 | |
| 187 | #define XCB_SCREENSAVER_SUSPEND 5 |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | typedef struct xcb_screensaver_suspend_request_t { |
| 193 | uint8_t major_opcode; |
| 194 | uint8_t minor_opcode; |
| 195 | uint16_t length; |
| 196 | uint32_t suspend; |
| 197 | } xcb_screensaver_suspend_request_t; |
| 198 | |
| 199 | |
| 200 | #define XCB_SCREENSAVER_NOTIFY 0 |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | typedef struct xcb_screensaver_notify_event_t { |
| 206 | uint8_t response_type; |
| 207 | uint8_t state; |
| 208 | uint16_t sequence; |
| 209 | xcb_timestamp_t time; |
| 210 | xcb_window_t root; |
| 211 | xcb_window_t window; |
| 212 | uint8_t kind; |
| 213 | uint8_t forced; |
| 214 | uint8_t pad0[14]; |
| 215 | } xcb_screensaver_notify_event_t; |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | xcb_screensaver_query_version_cookie_t |
| 226 | xcb_screensaver_query_version (xcb_connection_t *c, |
| 227 | uint8_t client_major_version, |
| 228 | uint8_t client_minor_version); |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | xcb_screensaver_query_version_cookie_t |
| 242 | xcb_screensaver_query_version_unchecked (xcb_connection_t *c, |
| 243 | uint8_t client_major_version, |
| 244 | uint8_t client_minor_version); |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | |
| 260 | xcb_screensaver_query_version_reply_t * |
| 261 | xcb_screensaver_query_version_reply (xcb_connection_t *c, |
| 262 | xcb_screensaver_query_version_cookie_t cookie , |
| 263 | xcb_generic_error_t **e); |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | xcb_screensaver_query_info_cookie_t |
| 274 | xcb_screensaver_query_info (xcb_connection_t *c, |
| 275 | xcb_drawable_t drawable); |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | xcb_screensaver_query_info_cookie_t |
| 289 | xcb_screensaver_query_info_unchecked (xcb_connection_t *c, |
| 290 | xcb_drawable_t drawable); |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | xcb_screensaver_query_info_reply_t * |
| 307 | xcb_screensaver_query_info_reply (xcb_connection_t *c, |
| 308 | xcb_screensaver_query_info_cookie_t cookie , |
| 309 | xcb_generic_error_t **e); |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | |
| 322 | xcb_void_cookie_t |
| 323 | xcb_screensaver_select_input_checked (xcb_connection_t *c, |
| 324 | xcb_drawable_t drawable, |
| 325 | uint32_t event_mask); |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | xcb_void_cookie_t |
| 336 | xcb_screensaver_select_input (xcb_connection_t *c, |
| 337 | xcb_drawable_t drawable, |
| 338 | uint32_t event_mask); |
| 339 | |
| 340 | int |
| 341 | xcb_screensaver_set_attributes_value_list_serialize (void **_buffer, |
| 342 | uint32_t value_mask, |
| 343 | const xcb_screensaver_set_attributes_value_list_t *_aux); |
| 344 | |
| 345 | int |
| 346 | xcb_screensaver_set_attributes_value_list_unpack (const void *_buffer, |
| 347 | uint32_t value_mask, |
| 348 | xcb_screensaver_set_attributes_value_list_t *_aux); |
| 349 | |
| 350 | int |
| 351 | xcb_screensaver_set_attributes_value_list_sizeof (const void *_buffer, |
| 352 | uint32_t value_mask); |
| 353 | |
| 354 | int |
| 355 | xcb_screensaver_set_attributes_sizeof (const void *_buffer); |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | |
| 366 | |
| 367 | |
| 368 | xcb_void_cookie_t |
| 369 | xcb_screensaver_set_attributes_checked (xcb_connection_t *c, |
| 370 | xcb_drawable_t drawable, |
| 371 | int16_t x, |
| 372 | int16_t y, |
| 373 | uint16_t width, |
| 374 | uint16_t height, |
| 375 | uint16_t border_width, |
| 376 | uint8_t _class, |
| 377 | uint8_t depth, |
| 378 | xcb_visualid_t visual, |
| 379 | uint32_t value_mask, |
| 380 | const void *value_list); |
| 381 | |
| 382 | |
| 383 | |
| 384 | |
| 385 | |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | xcb_void_cookie_t |
| 391 | xcb_screensaver_set_attributes (xcb_connection_t *c, |
| 392 | xcb_drawable_t drawable, |
| 393 | int16_t x, |
| 394 | int16_t y, |
| 395 | uint16_t width, |
| 396 | uint16_t height, |
| 397 | uint16_t border_width, |
| 398 | uint8_t _class, |
| 399 | uint8_t depth, |
| 400 | xcb_visualid_t visual, |
| 401 | uint32_t value_mask, |
| 402 | const void *value_list); |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | |
| 414 | |
| 415 | xcb_void_cookie_t |
| 416 | xcb_screensaver_set_attributes_aux_checked (xcb_connection_t *c, |
| 417 | xcb_drawable_t drawable, |
| 418 | int16_t x, |
| 419 | int16_t y, |
| 420 | uint16_t width, |
| 421 | uint16_t height, |
| 422 | uint16_t border_width, |
| 423 | uint8_t _class, |
| 424 | uint8_t depth, |
| 425 | xcb_visualid_t visual, |
| 426 | uint32_t value_mask, |
| 427 | const xcb_screensaver_set_attributes_value_list_t *value_list); |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | xcb_void_cookie_t |
| 438 | xcb_screensaver_set_attributes_aux (xcb_connection_t *c, |
| 439 | xcb_drawable_t drawable, |
| 440 | int16_t x, |
| 441 | int16_t y, |
| 442 | uint16_t width, |
| 443 | uint16_t height, |
| 444 | uint16_t border_width, |
| 445 | uint8_t _class, |
| 446 | uint8_t depth, |
| 447 | xcb_visualid_t visual, |
| 448 | uint32_t value_mask, |
| 449 | const xcb_screensaver_set_attributes_value_list_t *value_list); |
| 450 | |
| 451 | void * |
| 452 | xcb_screensaver_set_attributes_value_list (const xcb_screensaver_set_attributes_request_t *R); |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | xcb_void_cookie_t |
| 466 | xcb_screensaver_unset_attributes_checked (xcb_connection_t *c, |
| 467 | xcb_drawable_t drawable); |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | xcb_void_cookie_t |
| 478 | xcb_screensaver_unset_attributes (xcb_connection_t *c, |
| 479 | xcb_drawable_t drawable); |
| 480 | |
| 481 | |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | xcb_void_cookie_t |
| 493 | xcb_screensaver_suspend_checked (xcb_connection_t *c, |
| 494 | uint32_t suspend); |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | |
| 504 | xcb_void_cookie_t |
| 505 | xcb_screensaver_suspend (xcb_connection_t *c, |
| 506 | uint32_t suspend); |
| 507 | |
| 508 | |
| 509 | #ifdef __cplusplus |
| 510 | } |
| 511 | #endif |
| 512 | |
| 513 | #endif |
| 514 | |
| 515 | |
| 516 | |
| 517 | |