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
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272 xcb_screensaver_query_version_reply_t *
00273 xcb_screensaver_query_version_reply (xcb_connection_t *c ,
00274 xcb_screensaver_query_version_cookie_t cookie ,
00275 xcb_generic_error_t **e );
00276
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296 xcb_screensaver_query_info_cookie_t
00297 xcb_screensaver_query_info (xcb_connection_t *c ,
00298 xcb_drawable_t drawable );
00299
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322 xcb_screensaver_query_info_cookie_t
00323 xcb_screensaver_query_info_unchecked (xcb_connection_t *c ,
00324 xcb_drawable_t drawable );
00325
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 xcb_screensaver_query_info_reply_t *
00351 xcb_screensaver_query_info_reply (xcb_connection_t *c ,
00352 xcb_screensaver_query_info_cookie_t cookie ,
00353 xcb_generic_error_t **e );
00354
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378 xcb_void_cookie_t
00379 xcb_screensaver_select_input_checked (xcb_connection_t *c ,
00380 xcb_drawable_t drawable ,
00381 uint32_t event_mask );
00382
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403 xcb_void_cookie_t
00404 xcb_screensaver_select_input (xcb_connection_t *c ,
00405 xcb_drawable_t drawable ,
00406 uint32_t event_mask );
00407
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440 xcb_void_cookie_t
00441 xcb_screensaver_set_attributes_checked (xcb_connection_t *c ,
00442 xcb_drawable_t drawable ,
00443 int16_t x ,
00444 int16_t y ,
00445 uint16_t width ,
00446 uint16_t height ,
00447 uint16_t border_width ,
00448 uint8_t _class ,
00449 uint8_t depth ,
00450 xcb_visualid_t visual ,
00451 uint32_t value_mask ,
00452 const uint32_t *value_list );
00453
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483 xcb_void_cookie_t
00484 xcb_screensaver_set_attributes (xcb_connection_t *c ,
00485 xcb_drawable_t drawable ,
00486 int16_t x ,
00487 int16_t y ,
00488 uint16_t width ,
00489 uint16_t height ,
00490 uint16_t border_width ,
00491 uint8_t _class ,
00492 uint8_t depth ,
00493 xcb_visualid_t visual ,
00494 uint32_t value_mask ,
00495 const uint32_t *value_list );
00496
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519 xcb_void_cookie_t
00520 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c ,
00521 xcb_drawable_t drawable );
00522
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 xcb_void_cookie_t
00543 xcb_screensaver_unset_attributes (xcb_connection_t *c ,
00544 xcb_drawable_t drawable );
00545
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568 xcb_void_cookie_t
00569 xcb_screensaver_suspend_checked (xcb_connection_t *c ,
00570 uint8_t suspend );
00571
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591 xcb_void_cookie_t
00592 xcb_screensaver_suspend (xcb_connection_t *c ,
00593 uint8_t suspend );
00594
00595
00596 #endif
00597