00001
00002
00003
00004
00005
00012 #ifndef __SCREENSAVER_H
00013 #define __SCREENSAVER_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 #define XCB_SCREENSAVER_MAJOR_VERSION 1
00023 #define XCB_SCREENSAVER_MINOR_VERSION 1
00024
00025 extern xcb_extension_t xcb_screensaver_id;
00026
00027 typedef enum xcb_screensaver_kind_t {
00028 XCB_SCREENSAVER_KIND_BLANKED,
00029 XCB_SCREENSAVER_KIND_INTERNAL,
00030 XCB_SCREENSAVER_KIND_EXTERNAL
00031 } xcb_screensaver_kind_t;
00032
00033 typedef enum xcb_screensaver_event_t {
00034 XCB_SCREENSAVER_EVENT_NOTIFY_MASK = (1 << 0),
00035 XCB_SCREENSAVER_EVENT_CYCLE_MASK = (1 << 1)
00036 } xcb_screensaver_event_t;
00037
00038 typedef enum xcb_screensaver_state_t {
00039 XCB_SCREENSAVER_STATE_OFF,
00040 XCB_SCREENSAVER_STATE_ON,
00041 XCB_SCREENSAVER_STATE_CYCLE,
00042 XCB_SCREENSAVER_STATE_DISABLED
00043 } xcb_screensaver_state_t;
00044
00048 typedef struct xcb_screensaver_query_version_cookie_t {
00049 unsigned int sequence;
00050 } xcb_screensaver_query_version_cookie_t;
00051
00053 #define XCB_SCREENSAVER_QUERY_VERSION 0
00054
00058 typedef struct xcb_screensaver_query_version_request_t {
00059 uint8_t major_opcode;
00060 uint8_t minor_opcode;
00061 uint16_t length;
00062 uint8_t client_major_version;
00063 uint8_t client_minor_version;
00064 uint8_t pad0[2];
00065 } xcb_screensaver_query_version_request_t;
00066
00070 typedef struct xcb_screensaver_query_version_reply_t {
00071 uint8_t response_type;
00072 uint8_t pad0;
00073 uint16_t sequence;
00074 uint32_t length;
00075 uint16_t server_major_version;
00076 uint16_t server_minor_version;
00077 uint8_t pad1[20];
00078 } xcb_screensaver_query_version_reply_t;
00079
00083 typedef struct xcb_screensaver_query_info_cookie_t {
00084 unsigned int sequence;
00085 } xcb_screensaver_query_info_cookie_t;
00086
00088 #define XCB_SCREENSAVER_QUERY_INFO 1
00089
00093 typedef struct xcb_screensaver_query_info_request_t {
00094 uint8_t major_opcode;
00095 uint8_t minor_opcode;
00096 uint16_t length;
00097 xcb_drawable_t drawable;
00098 } xcb_screensaver_query_info_request_t;
00099
00103 typedef struct xcb_screensaver_query_info_reply_t {
00104 uint8_t response_type;
00105 uint8_t state;
00106 uint16_t sequence;
00107 uint32_t length;
00108 xcb_window_t saver_window;
00109 uint32_t ms_until_server;
00110 uint32_t ms_since_user_input;
00111 uint32_t event_mask;
00112 uint8_t kind;
00113 uint8_t pad0[7];
00114 } xcb_screensaver_query_info_reply_t;
00115
00117 #define XCB_SCREENSAVER_SELECT_INPUT 2
00118
00122 typedef struct xcb_screensaver_select_input_request_t {
00123 uint8_t major_opcode;
00124 uint8_t minor_opcode;
00125 uint16_t length;
00126 xcb_drawable_t drawable;
00127 uint32_t event_mask;
00128 } xcb_screensaver_select_input_request_t;
00129
00131 #define XCB_SCREENSAVER_SET_ATTRIBUTES 3
00132
00136 typedef struct xcb_screensaver_set_attributes_request_t {
00137 uint8_t major_opcode;
00138 uint8_t minor_opcode;
00139 uint16_t length;
00140 xcb_drawable_t drawable;
00141 int16_t x;
00142 int16_t y;
00143 uint16_t width;
00144 uint16_t height;
00145 uint16_t border_width;
00146 uint8_t _class;
00147 uint8_t depth;
00148 xcb_visualid_t visual;
00149 uint32_t value_mask;
00150 } xcb_screensaver_set_attributes_request_t;
00151
00153 #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4
00154
00158 typedef struct xcb_screensaver_unset_attributes_request_t {
00159 uint8_t major_opcode;
00160 uint8_t minor_opcode;
00161 uint16_t length;
00162 xcb_drawable_t drawable;
00163 } xcb_screensaver_unset_attributes_request_t;
00164
00166 #define XCB_SCREENSAVER_SUSPEND 5
00167
00171 typedef struct xcb_screensaver_suspend_request_t {
00172 uint8_t major_opcode;
00173 uint8_t minor_opcode;
00174 uint16_t length;
00175 uint8_t suspend;
00176 uint8_t pad0[3];
00177 } xcb_screensaver_suspend_request_t;
00178
00180 #define XCB_SCREENSAVER_NOTIFY 0
00181
00185 typedef struct xcb_screensaver_notify_event_t {
00186 uint8_t response_type;
00187 uint8_t code;
00188 uint16_t sequence;
00189 uint8_t state;
00190 uint16_t sequence_number;
00191 xcb_timestamp_t time;
00192 xcb_window_t root;
00193 xcb_window_t window;
00194 uint8_t kind;
00195 uint8_t forced;
00196 uint8_t pad0[14];
00197 } xcb_screensaver_notify_event_t;
00198
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219 xcb_screensaver_query_version_cookie_t
00220 xcb_screensaver_query_version (xcb_connection_t *c ,
00221 uint8_t client_major_version ,
00222 uint8_t client_minor_version );
00223
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247 xcb_screensaver_query_version_cookie_t
00248 xcb_screensaver_query_version_unchecked (xcb_connection_t *c ,
00249 uint8_t client_major_version ,
00250 uint8_t client_minor_version );
00251
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278 xcb_screensaver_query_version_reply_t *
00279 xcb_screensaver_query_version_reply (xcb_connection_t *c ,
00280 xcb_screensaver_query_version_cookie_t cookie ,
00281 xcb_generic_error_t **e );
00282
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302 xcb_screensaver_query_info_cookie_t
00303 xcb_screensaver_query_info (xcb_connection_t *c ,
00304 xcb_drawable_t drawable );
00305
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328 xcb_screensaver_query_info_cookie_t
00329 xcb_screensaver_query_info_unchecked (xcb_connection_t *c ,
00330 xcb_drawable_t drawable );
00331
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358 xcb_screensaver_query_info_reply_t *
00359 xcb_screensaver_query_info_reply (xcb_connection_t *c ,
00360 xcb_screensaver_query_info_cookie_t cookie ,
00361 xcb_generic_error_t **e );
00362
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386 xcb_void_cookie_t
00387 xcb_screensaver_select_input_checked (xcb_connection_t *c ,
00388 xcb_drawable_t drawable ,
00389 uint32_t event_mask );
00390
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411 xcb_void_cookie_t
00412 xcb_screensaver_select_input (xcb_connection_t *c ,
00413 xcb_drawable_t drawable ,
00414 uint32_t event_mask );
00415
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448 xcb_void_cookie_t
00449 xcb_screensaver_set_attributes_checked (xcb_connection_t *c ,
00450 xcb_drawable_t drawable ,
00451 int16_t x ,
00452 int16_t y ,
00453 uint16_t width ,
00454 uint16_t height ,
00455 uint16_t border_width ,
00456 uint8_t _class ,
00457 uint8_t depth ,
00458 xcb_visualid_t visual ,
00459 uint32_t value_mask ,
00460 const uint32_t *value_list );
00461
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491 xcb_void_cookie_t
00492 xcb_screensaver_set_attributes (xcb_connection_t *c ,
00493 xcb_drawable_t drawable ,
00494 int16_t x ,
00495 int16_t y ,
00496 uint16_t width ,
00497 uint16_t height ,
00498 uint16_t border_width ,
00499 uint8_t _class ,
00500 uint8_t depth ,
00501 xcb_visualid_t visual ,
00502 uint32_t value_mask ,
00503 const uint32_t *value_list );
00504
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527 xcb_void_cookie_t
00528 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c ,
00529 xcb_drawable_t drawable );
00530
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550 xcb_void_cookie_t
00551 xcb_screensaver_unset_attributes (xcb_connection_t *c ,
00552 xcb_drawable_t drawable );
00553
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576 xcb_void_cookie_t
00577 xcb_screensaver_suspend_checked (xcb_connection_t *c ,
00578 uint8_t suspend );
00579
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599 xcb_void_cookie_t
00600 xcb_screensaver_suspend (xcb_connection_t *c ,
00601 uint8_t suspend );
00602
00603
00604 #ifdef __cplusplus
00605 }
00606 #endif
00607
00608 #endif
00609