00001
00002
00003
00004
00005
00012 #ifndef __DPMS_H
00013 #define __DPMS_H
00014
00015 #include "xcb.h"
00016
00017 #ifdef __cplusplus
00018 extern "C" {
00019 #endif
00020
00021 #define XCB_DPMS_MAJOR_VERSION 0
00022 #define XCB_DPMS_MINOR_VERSION 0
00023
00024 extern xcb_extension_t xcb_dpms_id;
00025
00029 typedef struct xcb_dpms_get_version_cookie_t {
00030 unsigned int sequence;
00031 } xcb_dpms_get_version_cookie_t;
00032
00034 #define XCB_DPMS_GET_VERSION 0
00035
00039 typedef struct xcb_dpms_get_version_request_t {
00040 uint8_t major_opcode;
00041 uint8_t minor_opcode;
00042 uint16_t length;
00043 uint16_t client_major_version;
00044 uint16_t client_minor_version;
00045 } xcb_dpms_get_version_request_t;
00046
00050 typedef struct xcb_dpms_get_version_reply_t {
00051 uint8_t response_type;
00052 uint8_t pad0;
00053 uint16_t sequence;
00054 uint32_t length;
00055 uint16_t server_major_version;
00056 uint16_t server_minor_version;
00057 } xcb_dpms_get_version_reply_t;
00058
00062 typedef struct xcb_dpms_capable_cookie_t {
00063 unsigned int sequence;
00064 } xcb_dpms_capable_cookie_t;
00065
00067 #define XCB_DPMS_CAPABLE 1
00068
00072 typedef struct xcb_dpms_capable_request_t {
00073 uint8_t major_opcode;
00074 uint8_t minor_opcode;
00075 uint16_t length;
00076 } xcb_dpms_capable_request_t;
00077
00081 typedef struct xcb_dpms_capable_reply_t {
00082 uint8_t response_type;
00083 uint8_t pad0;
00084 uint16_t sequence;
00085 uint32_t length;
00086 uint8_t capable;
00087 uint8_t pad1[23];
00088 } xcb_dpms_capable_reply_t;
00089
00093 typedef struct xcb_dpms_get_timeouts_cookie_t {
00094 unsigned int sequence;
00095 } xcb_dpms_get_timeouts_cookie_t;
00096
00098 #define XCB_DPMS_GET_TIMEOUTS 2
00099
00103 typedef struct xcb_dpms_get_timeouts_request_t {
00104 uint8_t major_opcode;
00105 uint8_t minor_opcode;
00106 uint16_t length;
00107 } xcb_dpms_get_timeouts_request_t;
00108
00112 typedef struct xcb_dpms_get_timeouts_reply_t {
00113 uint8_t response_type;
00114 uint8_t pad0;
00115 uint16_t sequence;
00116 uint32_t length;
00117 uint16_t standby_timeout;
00118 uint16_t suspend_timeout;
00119 uint16_t off_timeout;
00120 uint8_t pad1[18];
00121 } xcb_dpms_get_timeouts_reply_t;
00122
00124 #define XCB_DPMS_SET_TIMEOUTS 3
00125
00129 typedef struct xcb_dpms_set_timeouts_request_t {
00130 uint8_t major_opcode;
00131 uint8_t minor_opcode;
00132 uint16_t length;
00133 uint16_t standby_timeout;
00134 uint16_t suspend_timeout;
00135 uint16_t off_timeout;
00136 } xcb_dpms_set_timeouts_request_t;
00137
00139 #define XCB_DPMS_ENABLE 4
00140
00144 typedef struct xcb_dpms_enable_request_t {
00145 uint8_t major_opcode;
00146 uint8_t minor_opcode;
00147 uint16_t length;
00148 } xcb_dpms_enable_request_t;
00149
00151 #define XCB_DPMS_DISABLE 5
00152
00156 typedef struct xcb_dpms_disable_request_t {
00157 uint8_t major_opcode;
00158 uint8_t minor_opcode;
00159 uint16_t length;
00160 } xcb_dpms_disable_request_t;
00161
00163 #define XCB_DPMS_FORCE_LEVEL 6
00164
00168 typedef struct xcb_dpms_force_level_request_t {
00169 uint8_t major_opcode;
00170 uint8_t minor_opcode;
00171 uint16_t length;
00172 uint16_t power_level;
00173 } xcb_dpms_force_level_request_t;
00174
00178 typedef struct xcb_dpms_info_cookie_t {
00179 unsigned int sequence;
00180 } xcb_dpms_info_cookie_t;
00181
00183 #define XCB_DPMS_INFO 7
00184
00188 typedef struct xcb_dpms_info_request_t {
00189 uint8_t major_opcode;
00190 uint8_t minor_opcode;
00191 uint16_t length;
00192 } xcb_dpms_info_request_t;
00193
00197 typedef struct xcb_dpms_info_reply_t {
00198 uint8_t response_type;
00199 uint8_t pad0;
00200 uint16_t sequence;
00201 uint32_t length;
00202 uint16_t power_level;
00203 uint8_t state;
00204 uint8_t pad1[21];
00205 } xcb_dpms_info_reply_t;
00206
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227 xcb_dpms_get_version_cookie_t
00228 xcb_dpms_get_version (xcb_connection_t *c ,
00229 uint16_t client_major_version ,
00230 uint16_t client_minor_version );
00231
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255 xcb_dpms_get_version_cookie_t
00256 xcb_dpms_get_version_unchecked (xcb_connection_t *c ,
00257 uint16_t client_major_version ,
00258 uint16_t client_minor_version );
00259
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286 xcb_dpms_get_version_reply_t *
00287 xcb_dpms_get_version_reply (xcb_connection_t *c ,
00288 xcb_dpms_get_version_cookie_t cookie ,
00289 xcb_generic_error_t **e );
00290
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309 xcb_dpms_capable_cookie_t
00310 xcb_dpms_capable (xcb_connection_t *c );
00311
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333 xcb_dpms_capable_cookie_t
00334 xcb_dpms_capable_unchecked (xcb_connection_t *c );
00335
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362 xcb_dpms_capable_reply_t *
00363 xcb_dpms_capable_reply (xcb_connection_t *c ,
00364 xcb_dpms_capable_cookie_t cookie ,
00365 xcb_generic_error_t **e );
00366
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385 xcb_dpms_get_timeouts_cookie_t
00386 xcb_dpms_get_timeouts (xcb_connection_t *c );
00387
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409 xcb_dpms_get_timeouts_cookie_t
00410 xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c );
00411
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438 xcb_dpms_get_timeouts_reply_t *
00439 xcb_dpms_get_timeouts_reply (xcb_connection_t *c ,
00440 xcb_dpms_get_timeouts_cookie_t cookie ,
00441 xcb_generic_error_t **e );
00442
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467 xcb_void_cookie_t
00468 xcb_dpms_set_timeouts_checked (xcb_connection_t *c ,
00469 uint16_t standby_timeout ,
00470 uint16_t suspend_timeout ,
00471 uint16_t off_timeout );
00472
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494 xcb_void_cookie_t
00495 xcb_dpms_set_timeouts (xcb_connection_t *c ,
00496 uint16_t standby_timeout ,
00497 uint16_t suspend_timeout ,
00498 uint16_t off_timeout );
00499
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521 xcb_void_cookie_t
00522 xcb_dpms_enable_checked (xcb_connection_t *c );
00523
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542 xcb_void_cookie_t
00543 xcb_dpms_enable (xcb_connection_t *c );
00544
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566 xcb_void_cookie_t
00567 xcb_dpms_disable_checked (xcb_connection_t *c );
00568
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587 xcb_void_cookie_t
00588 xcb_dpms_disable (xcb_connection_t *c );
00589
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612 xcb_void_cookie_t
00613 xcb_dpms_force_level_checked (xcb_connection_t *c ,
00614 uint16_t power_level );
00615
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635 xcb_void_cookie_t
00636 xcb_dpms_force_level (xcb_connection_t *c ,
00637 uint16_t power_level );
00638
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657 xcb_dpms_info_cookie_t
00658 xcb_dpms_info (xcb_connection_t *c );
00659
00672
00673
00674
00675
00676
00677
00678
00679
00680
00681 xcb_dpms_info_cookie_t
00682 xcb_dpms_info_unchecked (xcb_connection_t *c );
00683
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710 xcb_dpms_info_reply_t *
00711 xcb_dpms_info_reply (xcb_connection_t *c ,
00712 xcb_dpms_info_cookie_t cookie ,
00713 xcb_generic_error_t **e );
00714
00715
00716 #ifdef __cplusplus
00717 }
00718 #endif
00719
00720 #endif
00721