00001
00002
00003
00004
00005
00012 #ifndef __SCREENSAVER_H
00013 #define __SCREENSAVER_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #define XCB_SCREENSAVER_MAJOR_VERSION 1
00019 #define XCB_SCREENSAVER_MINOR_VERSION 1
00020
00021 extern xcb_extension_t xcb_screensaver_id;
00022
00023 typedef enum xcb_screensaver_kind_t {
00024 XCB_SCREENSAVER_KIND_BLANKED,
00025 XCB_SCREENSAVER_KIND_INTERNAL,
00026 XCB_SCREENSAVER_KIND_EXTERNAL
00027 } xcb_screensaver_kind_t;
00028
00029 typedef enum xcb_screensaver_event_t {
00030 XCB_SCREENSAVER_EVENT_NOTIFY_MASK = (1 << 0),
00031 XCB_SCREENSAVER_EVENT_CYCLE_MASK = (1 << 1)
00032 } xcb_screensaver_event_t;
00033
00034 typedef enum xcb_screensaver_state_t {
00035 XCB_SCREENSAVER_STATE_OFF,
00036 XCB_SCREENSAVER_STATE_ON,
00037 XCB_SCREENSAVER_STATE_CYCLE,
00038 XCB_SCREENSAVER_STATE_DISABLED
00039 } xcb_screensaver_state_t;
00040
00044 typedef struct xcb_screensaver_query_version_cookie_t {
00045 unsigned int sequence;
00046 } xcb_screensaver_query_version_cookie_t;
00047
00049 #define XCB_SCREENSAVER_QUERY_VERSION 0
00050
00054 typedef struct xcb_screensaver_query_version_request_t {
00055 uint8_t major_opcode;
00056 uint8_t minor_opcode;
00057 uint16_t length;
00058 uint8_t client_major_version;
00059 uint8_t client_minor_version;
00060 uint8_t pad0[2];
00061 } xcb_screensaver_query_version_request_t;
00062
00066 typedef struct xcb_screensaver_query_version_reply_t {
00067 uint8_t response_type;
00068 uint8_t pad0;
00069 uint16_t sequence;
00070 uint32_t length;
00071 uint16_t server_major_version;
00072 uint16_t server_minor_version;
00073 uint8_t pad1[20];
00074 } xcb_screensaver_query_version_reply_t;
00075
00079 typedef struct xcb_screensaver_query_info_cookie_t {
00080 unsigned int sequence;
00081 } xcb_screensaver_query_info_cookie_t;
00082
00084 #define XCB_SCREENSAVER_QUERY_INFO 1
00085
00089 typedef struct xcb_screensaver_query_info_request_t {
00090 uint8_t major_opcode;
00091 uint8_t minor_opcode;
00092 uint16_t length;
00093 xcb_drawable_t drawable;
00094 } xcb_screensaver_query_info_request_t;
00095
00099 typedef struct xcb_screensaver_query_info_reply_t {
00100 uint8_t response_type;
00101 uint8_t state;
00102 uint16_t sequence;
00103 uint32_t length;
00104 xcb_window_t saver_window;
00105 uint32_t ms_until_server;
00106 uint32_t ms_since_user_input;
00107 uint32_t event_mask;
00108 uint8_t kind;
00109 uint8_t pad0[7];
00110 } xcb_screensaver_query_info_reply_t;
00111
00113 #define XCB_SCREENSAVER_SELECT_INPUT 2
00114
00118 typedef struct xcb_screensaver_select_input_request_t {
00119 uint8_t major_opcode;
00120 uint8_t minor_opcode;
00121 uint16_t length;
00122 xcb_drawable_t drawable;
00123 uint32_t event_mask;
00124 } xcb_screensaver_select_input_request_t;
00125
00127 #define XCB_SCREENSAVER_SET_ATTRIBUTES 3
00128
00132 typedef struct xcb_screensaver_set_attributes_request_t {
00133 uint8_t major_opcode;
00134 uint8_t minor_opcode;
00135 uint16_t length;
00136 xcb_drawable_t drawable;
00137 int16_t x;
00138 int16_t y;
00139 uint16_t width;
00140 uint16_t height;
00141 uint16_t border_width;
00142 uint8_t _class;
00143 uint8_t depth;
00144 xcb_visualid_t visual;
00145 uint32_t value_mask;
00146 } xcb_screensaver_set_attributes_request_t;
00147
00149 #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4
00150
00154 typedef struct xcb_screensaver_unset_attributes_request_t {
00155 uint8_t major_opcode;
00156 uint8_t minor_opcode;
00157 uint16_t length;
00158 xcb_drawable_t drawable;
00159 } xcb_screensaver_unset_attributes_request_t;
00160
00162 #define XCB_SCREENSAVER_SUSPEND 5
00163
00167 typedef struct xcb_screensaver_suspend_request_t {
00168 uint8_t major_opcode;
00169 uint8_t minor_opcode;
00170 uint16_t length;
00171 uint8_t suspend;
00172 uint8_t pad0[3];
00173 } xcb_screensaver_suspend_request_t;
00174
00176 #define XCB_SCREENSAVER_NOTIFY 0
00177
00181 typedef struct xcb_screensaver_notify_event_t {
00182 uint8_t response_type;
00183 uint8_t code;
00184 uint16_t sequence;
00185 uint8_t state;
00186 uint16_t sequence_number;
00187 xcb_timestamp_t time;
00188 xcb_window_t root;
00189 xcb_window_t window;
00190 uint8_t kind;
00191 uint8_t forced;
00192 uint8_t pad0[14];
00193 } xcb_screensaver_notify_event_t;
00194
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215 xcb_screensaver_query_version_cookie_t
00216 xcb_screensaver_query_version (xcb_connection_t *c ,
00217 uint8_t client_major_version ,
00218 uint8_t client_minor_version );
00219
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 xcb_screensaver_query_version_cookie_t
00244 xcb_screensaver_query_version_unchecked (xcb_connection_t *c ,
00245 uint8_t client_major_version ,
00246 uint8_t client_minor_version );
00247
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274 xcb_screensaver_query_version_reply_t *
00275 xcb_screensaver_query_version_reply (xcb_connection_t *c ,
00276 xcb_screensaver_query_version_cookie_t cookie ,
00277 xcb_generic_error_t **e );
00278
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298 xcb_screensaver_query_info_cookie_t
00299 xcb_screensaver_query_info (xcb_connection_t *c ,
00300 xcb_drawable_t drawable );
00301
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324 xcb_screensaver_query_info_cookie_t
00325 xcb_screensaver_query_info_unchecked (xcb_connection_t *c ,
00326 xcb_drawable_t drawable );
00327
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354 xcb_screensaver_query_info_reply_t *
00355 xcb_screensaver_query_info_reply (xcb_connection_t *c ,
00356 xcb_screensaver_query_info_cookie_t cookie ,
00357 xcb_generic_error_t **e );
00358
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382 xcb_void_cookie_t
00383 xcb_screensaver_select_input_checked (xcb_connection_t *c ,
00384 xcb_drawable_t drawable ,
00385 uint32_t event_mask );
00386
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407 xcb_void_cookie_t
00408 xcb_screensaver_select_input (xcb_connection_t *c ,
00409 xcb_drawable_t drawable ,
00410 uint32_t event_mask );
00411
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444 xcb_void_cookie_t
00445 xcb_screensaver_set_attributes_checked (xcb_connection_t *c ,
00446 xcb_drawable_t drawable ,
00447 int16_t x ,
00448 int16_t y ,
00449 uint16_t width ,
00450 uint16_t height ,
00451 uint16_t border_width ,
00452 uint8_t _class ,
00453 uint8_t depth ,
00454 xcb_visualid_t visual ,
00455 uint32_t value_mask ,
00456 const uint32_t *value_list );
00457
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487 xcb_void_cookie_t
00488 xcb_screensaver_set_attributes (xcb_connection_t *c ,
00489 xcb_drawable_t drawable ,
00490 int16_t x ,
00491 int16_t y ,
00492 uint16_t width ,
00493 uint16_t height ,
00494 uint16_t border_width ,
00495 uint8_t _class ,
00496 uint8_t depth ,
00497 xcb_visualid_t visual ,
00498 uint32_t value_mask ,
00499 const uint32_t *value_list );
00500
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523 xcb_void_cookie_t
00524 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c ,
00525 xcb_drawable_t drawable );
00526
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546 xcb_void_cookie_t
00547 xcb_screensaver_unset_attributes (xcb_connection_t *c ,
00548 xcb_drawable_t drawable );
00549
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572 xcb_void_cookie_t
00573 xcb_screensaver_suspend_checked (xcb_connection_t *c ,
00574 uint8_t suspend );
00575
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595 xcb_void_cookie_t
00596 xcb_screensaver_suspend (xcb_connection_t *c ,
00597 uint8_t suspend );
00598
00599
00600 #endif
00601