File indexing completed on 2025-01-18 10:14:36
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef __DPMS_H
0013 #define __DPMS_H
0014
0015 #include "xcb.h"
0016 #include "xproto.h"
0017
0018 #ifdef __cplusplus
0019 extern "C" {
0020 #endif
0021
0022 #define XCB_DPMS_MAJOR_VERSION 1
0023 #define XCB_DPMS_MINOR_VERSION 2
0024
0025 extern xcb_extension_t xcb_dpms_id;
0026
0027
0028
0029
0030 typedef struct xcb_dpms_get_version_cookie_t {
0031 unsigned int sequence;
0032 } xcb_dpms_get_version_cookie_t;
0033
0034
0035 #define XCB_DPMS_GET_VERSION 0
0036
0037
0038
0039
0040 typedef struct xcb_dpms_get_version_request_t {
0041 uint8_t major_opcode;
0042 uint8_t minor_opcode;
0043 uint16_t length;
0044 uint16_t client_major_version;
0045 uint16_t client_minor_version;
0046 } xcb_dpms_get_version_request_t;
0047
0048
0049
0050
0051 typedef struct xcb_dpms_get_version_reply_t {
0052 uint8_t response_type;
0053 uint8_t pad0;
0054 uint16_t sequence;
0055 uint32_t length;
0056 uint16_t server_major_version;
0057 uint16_t server_minor_version;
0058 } xcb_dpms_get_version_reply_t;
0059
0060
0061
0062
0063 typedef struct xcb_dpms_capable_cookie_t {
0064 unsigned int sequence;
0065 } xcb_dpms_capable_cookie_t;
0066
0067
0068 #define XCB_DPMS_CAPABLE 1
0069
0070
0071
0072
0073 typedef struct xcb_dpms_capable_request_t {
0074 uint8_t major_opcode;
0075 uint8_t minor_opcode;
0076 uint16_t length;
0077 } xcb_dpms_capable_request_t;
0078
0079
0080
0081
0082 typedef struct xcb_dpms_capable_reply_t {
0083 uint8_t response_type;
0084 uint8_t pad0;
0085 uint16_t sequence;
0086 uint32_t length;
0087 uint8_t capable;
0088 uint8_t pad1[23];
0089 } xcb_dpms_capable_reply_t;
0090
0091
0092
0093
0094 typedef struct xcb_dpms_get_timeouts_cookie_t {
0095 unsigned int sequence;
0096 } xcb_dpms_get_timeouts_cookie_t;
0097
0098
0099 #define XCB_DPMS_GET_TIMEOUTS 2
0100
0101
0102
0103
0104 typedef struct xcb_dpms_get_timeouts_request_t {
0105 uint8_t major_opcode;
0106 uint8_t minor_opcode;
0107 uint16_t length;
0108 } xcb_dpms_get_timeouts_request_t;
0109
0110
0111
0112
0113 typedef struct xcb_dpms_get_timeouts_reply_t {
0114 uint8_t response_type;
0115 uint8_t pad0;
0116 uint16_t sequence;
0117 uint32_t length;
0118 uint16_t standby_timeout;
0119 uint16_t suspend_timeout;
0120 uint16_t off_timeout;
0121 uint8_t pad1[18];
0122 } xcb_dpms_get_timeouts_reply_t;
0123
0124
0125 #define XCB_DPMS_SET_TIMEOUTS 3
0126
0127
0128
0129
0130 typedef struct xcb_dpms_set_timeouts_request_t {
0131 uint8_t major_opcode;
0132 uint8_t minor_opcode;
0133 uint16_t length;
0134 uint16_t standby_timeout;
0135 uint16_t suspend_timeout;
0136 uint16_t off_timeout;
0137 } xcb_dpms_set_timeouts_request_t;
0138
0139
0140 #define XCB_DPMS_ENABLE 4
0141
0142
0143
0144
0145 typedef struct xcb_dpms_enable_request_t {
0146 uint8_t major_opcode;
0147 uint8_t minor_opcode;
0148 uint16_t length;
0149 } xcb_dpms_enable_request_t;
0150
0151
0152 #define XCB_DPMS_DISABLE 5
0153
0154
0155
0156
0157 typedef struct xcb_dpms_disable_request_t {
0158 uint8_t major_opcode;
0159 uint8_t minor_opcode;
0160 uint16_t length;
0161 } xcb_dpms_disable_request_t;
0162
0163 typedef enum xcb_dpms_dpms_mode_t {
0164 XCB_DPMS_DPMS_MODE_ON = 0,
0165 XCB_DPMS_DPMS_MODE_STANDBY = 1,
0166 XCB_DPMS_DPMS_MODE_SUSPEND = 2,
0167 XCB_DPMS_DPMS_MODE_OFF = 3
0168 } xcb_dpms_dpms_mode_t;
0169
0170
0171 #define XCB_DPMS_FORCE_LEVEL 6
0172
0173
0174
0175
0176 typedef struct xcb_dpms_force_level_request_t {
0177 uint8_t major_opcode;
0178 uint8_t minor_opcode;
0179 uint16_t length;
0180 uint16_t power_level;
0181 } xcb_dpms_force_level_request_t;
0182
0183
0184
0185
0186 typedef struct xcb_dpms_info_cookie_t {
0187 unsigned int sequence;
0188 } xcb_dpms_info_cookie_t;
0189
0190
0191 #define XCB_DPMS_INFO 7
0192
0193
0194
0195
0196 typedef struct xcb_dpms_info_request_t {
0197 uint8_t major_opcode;
0198 uint8_t minor_opcode;
0199 uint16_t length;
0200 } xcb_dpms_info_request_t;
0201
0202
0203
0204
0205 typedef struct xcb_dpms_info_reply_t {
0206 uint8_t response_type;
0207 uint8_t pad0;
0208 uint16_t sequence;
0209 uint32_t length;
0210 uint16_t power_level;
0211 uint8_t state;
0212 uint8_t pad1[21];
0213 } xcb_dpms_info_reply_t;
0214
0215 typedef enum xcb_dpms_event_mask_t {
0216 XCB_DPMS_EVENT_MASK_INFO_NOTIFY = 1
0217 } xcb_dpms_event_mask_t;
0218
0219
0220 #define XCB_DPMS_SELECT_INPUT 8
0221
0222
0223
0224
0225 typedef struct xcb_dpms_select_input_request_t {
0226 uint8_t major_opcode;
0227 uint8_t minor_opcode;
0228 uint16_t length;
0229 uint32_t event_mask;
0230 } xcb_dpms_select_input_request_t;
0231
0232
0233 #define XCB_DPMS_INFO_NOTIFY 0
0234
0235
0236
0237
0238 typedef struct xcb_dpms_info_notify_event_t {
0239 uint8_t response_type;
0240 uint8_t extension;
0241 uint16_t sequence;
0242 uint32_t length;
0243 uint16_t event_type;
0244 uint8_t pad0[2];
0245 xcb_timestamp_t timestamp;
0246 uint16_t power_level;
0247 uint8_t state;
0248 uint8_t pad1[21];
0249 } xcb_dpms_info_notify_event_t;
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259 xcb_dpms_get_version_cookie_t
0260 xcb_dpms_get_version (xcb_connection_t *c,
0261 uint16_t client_major_version,
0262 uint16_t client_minor_version);
0263
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273
0274
0275 xcb_dpms_get_version_cookie_t
0276 xcb_dpms_get_version_unchecked (xcb_connection_t *c,
0277 uint16_t client_major_version,
0278 uint16_t client_minor_version);
0279
0280
0281
0282
0283
0284
0285
0286
0287
0288
0289
0290
0291
0292
0293
0294 xcb_dpms_get_version_reply_t *
0295 xcb_dpms_get_version_reply (xcb_connection_t *c,
0296 xcb_dpms_get_version_cookie_t cookie ,
0297 xcb_generic_error_t **e);
0298
0299
0300
0301
0302
0303
0304
0305
0306
0307 xcb_dpms_capable_cookie_t
0308 xcb_dpms_capable (xcb_connection_t *c);
0309
0310
0311
0312
0313
0314
0315
0316
0317
0318
0319
0320
0321 xcb_dpms_capable_cookie_t
0322 xcb_dpms_capable_unchecked (xcb_connection_t *c);
0323
0324
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338 xcb_dpms_capable_reply_t *
0339 xcb_dpms_capable_reply (xcb_connection_t *c,
0340 xcb_dpms_capable_cookie_t cookie ,
0341 xcb_generic_error_t **e);
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351 xcb_dpms_get_timeouts_cookie_t
0352 xcb_dpms_get_timeouts (xcb_connection_t *c);
0353
0354
0355
0356
0357
0358
0359
0360
0361
0362
0363
0364
0365 xcb_dpms_get_timeouts_cookie_t
0366 xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c);
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382 xcb_dpms_get_timeouts_reply_t *
0383 xcb_dpms_get_timeouts_reply (xcb_connection_t *c,
0384 xcb_dpms_get_timeouts_cookie_t cookie ,
0385 xcb_generic_error_t **e);
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398 xcb_void_cookie_t
0399 xcb_dpms_set_timeouts_checked (xcb_connection_t *c,
0400 uint16_t standby_timeout,
0401 uint16_t suspend_timeout,
0402 uint16_t off_timeout);
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412 xcb_void_cookie_t
0413 xcb_dpms_set_timeouts (xcb_connection_t *c,
0414 uint16_t standby_timeout,
0415 uint16_t suspend_timeout,
0416 uint16_t off_timeout);
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429 xcb_void_cookie_t
0430 xcb_dpms_enable_checked (xcb_connection_t *c);
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440 xcb_void_cookie_t
0441 xcb_dpms_enable (xcb_connection_t *c);
0442
0443
0444
0445
0446
0447
0448
0449
0450
0451
0452
0453
0454 xcb_void_cookie_t
0455 xcb_dpms_disable_checked (xcb_connection_t *c);
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465 xcb_void_cookie_t
0466 xcb_dpms_disable (xcb_connection_t *c);
0467
0468
0469
0470
0471
0472
0473
0474
0475
0476
0477
0478
0479 xcb_void_cookie_t
0480 xcb_dpms_force_level_checked (xcb_connection_t *c,
0481 uint16_t power_level);
0482
0483
0484
0485
0486
0487
0488
0489
0490
0491 xcb_void_cookie_t
0492 xcb_dpms_force_level (xcb_connection_t *c,
0493 uint16_t power_level);
0494
0495
0496
0497
0498
0499
0500
0501
0502
0503 xcb_dpms_info_cookie_t
0504 xcb_dpms_info (xcb_connection_t *c);
0505
0506
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516
0517 xcb_dpms_info_cookie_t
0518 xcb_dpms_info_unchecked (xcb_connection_t *c);
0519
0520
0521
0522
0523
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533
0534 xcb_dpms_info_reply_t *
0535 xcb_dpms_info_reply (xcb_connection_t *c,
0536 xcb_dpms_info_cookie_t cookie ,
0537 xcb_generic_error_t **e);
0538
0539
0540
0541
0542
0543
0544
0545
0546
0547
0548
0549
0550 xcb_void_cookie_t
0551 xcb_dpms_select_input_checked (xcb_connection_t *c,
0552 uint32_t event_mask);
0553
0554
0555
0556
0557
0558
0559
0560
0561
0562 xcb_void_cookie_t
0563 xcb_dpms_select_input (xcb_connection_t *c,
0564 uint32_t event_mask);
0565
0566
0567 #ifdef __cplusplus
0568 }
0569 #endif
0570
0571 #endif
0572
0573
0574
0575