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
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207 xcb_screensaver_query_version_cookie_t
00208 xcb_screensaver_query_version (xcb_connection_t *c ,
00209 uint8_t client_major_version ,
00210 uint8_t client_minor_version );
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224 xcb_screensaver_query_version_cookie_t
00225 xcb_screensaver_query_version_unchecked (xcb_connection_t *c ,
00226 uint8_t client_major_version ,
00227 uint8_t client_minor_version );
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241 xcb_screensaver_query_version_reply_t *
00242 xcb_screensaver_query_version_reply (xcb_connection_t *c ,
00243 xcb_screensaver_query_version_cookie_t cookie ,
00244 xcb_generic_error_t **e );
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257 xcb_screensaver_query_info_cookie_t
00258 xcb_screensaver_query_info (xcb_connection_t *c ,
00259 xcb_drawable_t drawable );
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272 xcb_screensaver_query_info_cookie_t
00273 xcb_screensaver_query_info_unchecked (xcb_connection_t *c ,
00274 xcb_drawable_t drawable );
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288 xcb_screensaver_query_info_reply_t *
00289 xcb_screensaver_query_info_reply (xcb_connection_t *c ,
00290 xcb_screensaver_query_info_cookie_t cookie ,
00291 xcb_generic_error_t **e );
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305 xcb_void_cookie_t
00306 xcb_screensaver_select_input_checked (xcb_connection_t *c ,
00307 xcb_drawable_t drawable ,
00308 uint32_t event_mask );
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322 xcb_void_cookie_t
00323 xcb_screensaver_select_input (xcb_connection_t *c ,
00324 xcb_drawable_t drawable ,
00325 uint32_t event_mask );
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348 xcb_void_cookie_t
00349 xcb_screensaver_set_attributes_checked (xcb_connection_t *c ,
00350 xcb_drawable_t drawable ,
00351 int16_t x ,
00352 int16_t y ,
00353 uint16_t width ,
00354 uint16_t height ,
00355 uint16_t border_width ,
00356 uint8_t _class ,
00357 uint8_t depth ,
00358 xcb_visualid_t visual ,
00359 uint32_t value_mask ,
00360 const uint32_t *value_list );
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383 xcb_void_cookie_t
00384 xcb_screensaver_set_attributes (xcb_connection_t *c ,
00385 xcb_drawable_t drawable ,
00386 int16_t x ,
00387 int16_t y ,
00388 uint16_t width ,
00389 uint16_t height ,
00390 uint16_t border_width ,
00391 uint8_t _class ,
00392 uint8_t depth ,
00393 xcb_visualid_t visual ,
00394 uint32_t value_mask ,
00395 const uint32_t *value_list );
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408 xcb_void_cookie_t
00409 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c ,
00410 xcb_drawable_t drawable );
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423 xcb_void_cookie_t
00424 xcb_screensaver_unset_attributes (xcb_connection_t *c ,
00425 xcb_drawable_t drawable );
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438 xcb_void_cookie_t
00439 xcb_screensaver_suspend_checked (xcb_connection_t *c ,
00440 uint8_t suspend );
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453 xcb_void_cookie_t
00454 xcb_screensaver_suspend (xcb_connection_t *c ,
00455 uint8_t suspend );
00456
00457
00458 #endif
00459