| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | #ifndef __DPMS_H |
| 13 | #define __DPMS_H |
| 14 | |
| 15 | #include "xcb.h" |
| 16 | #include "xproto.h" |
| 17 | |
| 18 | #ifdef __cplusplus |
| 19 | extern "C" { |
| 20 | #endif |
| 21 | |
| 22 | #define XCB_DPMS_MAJOR_VERSION 1 |
| 23 | #define XCB_DPMS_MINOR_VERSION 2 |
| 24 | |
| 25 | extern xcb_extension_t xcb_dpms_id; |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | typedef struct xcb_dpms_get_version_cookie_t { |
| 31 | unsigned int sequence; |
| 32 | } xcb_dpms_get_version_cookie_t; |
| 33 | |
| 34 | |
| 35 | #define XCB_DPMS_GET_VERSION 0 |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | typedef struct xcb_dpms_get_version_request_t { |
| 41 | uint8_t major_opcode; |
| 42 | uint8_t minor_opcode; |
| 43 | uint16_t length; |
| 44 | uint16_t client_major_version; |
| 45 | uint16_t client_minor_version; |
| 46 | } xcb_dpms_get_version_request_t; |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | typedef struct xcb_dpms_get_version_reply_t { |
| 52 | uint8_t response_type; |
| 53 | uint8_t pad0; |
| 54 | uint16_t sequence; |
| 55 | uint32_t length; |
| 56 | uint16_t server_major_version; |
| 57 | uint16_t server_minor_version; |
| 58 | } xcb_dpms_get_version_reply_t; |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | typedef struct xcb_dpms_capable_cookie_t { |
| 64 | unsigned int sequence; |
| 65 | } xcb_dpms_capable_cookie_t; |
| 66 | |
| 67 | |
| 68 | #define XCB_DPMS_CAPABLE 1 |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | typedef struct xcb_dpms_capable_request_t { |
| 74 | uint8_t major_opcode; |
| 75 | uint8_t minor_opcode; |
| 76 | uint16_t length; |
| 77 | } xcb_dpms_capable_request_t; |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | typedef struct xcb_dpms_capable_reply_t { |
| 83 | uint8_t response_type; |
| 84 | uint8_t pad0; |
| 85 | uint16_t sequence; |
| 86 | uint32_t length; |
| 87 | uint8_t capable; |
| 88 | uint8_t pad1[23]; |
| 89 | } xcb_dpms_capable_reply_t; |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | typedef struct xcb_dpms_get_timeouts_cookie_t { |
| 95 | unsigned int sequence; |
| 96 | } xcb_dpms_get_timeouts_cookie_t; |
| 97 | |
| 98 | |
| 99 | #define XCB_DPMS_GET_TIMEOUTS 2 |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | typedef struct xcb_dpms_get_timeouts_request_t { |
| 105 | uint8_t major_opcode; |
| 106 | uint8_t minor_opcode; |
| 107 | uint16_t length; |
| 108 | } xcb_dpms_get_timeouts_request_t; |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | typedef struct xcb_dpms_get_timeouts_reply_t { |
| 114 | uint8_t response_type; |
| 115 | uint8_t pad0; |
| 116 | uint16_t sequence; |
| 117 | uint32_t length; |
| 118 | uint16_t standby_timeout; |
| 119 | uint16_t suspend_timeout; |
| 120 | uint16_t off_timeout; |
| 121 | uint8_t pad1[18]; |
| 122 | } xcb_dpms_get_timeouts_reply_t; |
| 123 | |
| 124 | |
| 125 | #define XCB_DPMS_SET_TIMEOUTS 3 |
| 126 | |
| 127 | |
| 128 | |
| 129 | |
| 130 | typedef struct xcb_dpms_set_timeouts_request_t { |
| 131 | uint8_t major_opcode; |
| 132 | uint8_t minor_opcode; |
| 133 | uint16_t length; |
| 134 | uint16_t standby_timeout; |
| 135 | uint16_t suspend_timeout; |
| 136 | uint16_t off_timeout; |
| 137 | } xcb_dpms_set_timeouts_request_t; |
| 138 | |
| 139 | |
| 140 | #define XCB_DPMS_ENABLE 4 |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | typedef struct xcb_dpms_enable_request_t { |
| 146 | uint8_t major_opcode; |
| 147 | uint8_t minor_opcode; |
| 148 | uint16_t length; |
| 149 | } xcb_dpms_enable_request_t; |
| 150 | |
| 151 | |
| 152 | #define XCB_DPMS_DISABLE 5 |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | typedef struct xcb_dpms_disable_request_t { |
| 158 | uint8_t major_opcode; |
| 159 | uint8_t minor_opcode; |
| 160 | uint16_t length; |
| 161 | } xcb_dpms_disable_request_t; |
| 162 | |
| 163 | typedef enum xcb_dpms_dpms_mode_t { |
| 164 | XCB_DPMS_DPMS_MODE_ON = 0, |
| 165 | XCB_DPMS_DPMS_MODE_STANDBY = 1, |
| 166 | XCB_DPMS_DPMS_MODE_SUSPEND = 2, |
| 167 | XCB_DPMS_DPMS_MODE_OFF = 3 |
| 168 | } xcb_dpms_dpms_mode_t; |
| 169 | |
| 170 | |
| 171 | #define XCB_DPMS_FORCE_LEVEL 6 |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | typedef struct xcb_dpms_force_level_request_t { |
| 177 | uint8_t major_opcode; |
| 178 | uint8_t minor_opcode; |
| 179 | uint16_t length; |
| 180 | uint16_t power_level; |
| 181 | } xcb_dpms_force_level_request_t; |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | typedef struct xcb_dpms_info_cookie_t { |
| 187 | unsigned int sequence; |
| 188 | } xcb_dpms_info_cookie_t; |
| 189 | |
| 190 | |
| 191 | #define XCB_DPMS_INFO 7 |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | typedef struct xcb_dpms_info_request_t { |
| 197 | uint8_t major_opcode; |
| 198 | uint8_t minor_opcode; |
| 199 | uint16_t length; |
| 200 | } xcb_dpms_info_request_t; |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | typedef struct xcb_dpms_info_reply_t { |
| 206 | uint8_t response_type; |
| 207 | uint8_t pad0; |
| 208 | uint16_t sequence; |
| 209 | uint32_t length; |
| 210 | uint16_t power_level; |
| 211 | uint8_t state; |
| 212 | uint8_t pad1[21]; |
| 213 | } xcb_dpms_info_reply_t; |
| 214 | |
| 215 | typedef enum xcb_dpms_event_mask_t { |
| 216 | XCB_DPMS_EVENT_MASK_INFO_NOTIFY = 1 |
| 217 | } xcb_dpms_event_mask_t; |
| 218 | |
| 219 | |
| 220 | #define XCB_DPMS_SELECT_INPUT 8 |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | typedef struct xcb_dpms_select_input_request_t { |
| 226 | uint8_t major_opcode; |
| 227 | uint8_t minor_opcode; |
| 228 | uint16_t length; |
| 229 | uint32_t event_mask; |
| 230 | } xcb_dpms_select_input_request_t; |
| 231 | |
| 232 | |
| 233 | #define XCB_DPMS_INFO_NOTIFY 0 |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | typedef struct xcb_dpms_info_notify_event_t { |
| 239 | uint8_t response_type; |
| 240 | uint8_t extension; |
| 241 | uint16_t sequence; |
| 242 | uint32_t length; |
| 243 | uint16_t event_type; |
| 244 | uint8_t pad0[2]; |
| 245 | xcb_timestamp_t timestamp; |
| 246 | uint16_t power_level; |
| 247 | uint8_t state; |
| 248 | uint8_t pad1[21]; |
| 249 | } xcb_dpms_info_notify_event_t; |
| 250 | |
| 251 | |
| 252 | |
| 253 | |
| 254 | |
| 255 | |
| 256 | |
| 257 | |
| 258 | |
| 259 | xcb_dpms_get_version_cookie_t |
| 260 | xcb_dpms_get_version (xcb_connection_t *c, |
| 261 | uint16_t client_major_version, |
| 262 | uint16_t client_minor_version); |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | |
| 268 | |
| 269 | |
| 270 | |
| 271 | |
| 272 | |
| 273 | |
| 274 | |
| 275 | xcb_dpms_get_version_cookie_t |
| 276 | xcb_dpms_get_version_unchecked (xcb_connection_t *c, |
| 277 | uint16_t client_major_version, |
| 278 | uint16_t client_minor_version); |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | |
| 287 | |
| 288 | |
| 289 | |
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | xcb_dpms_get_version_reply_t * |
| 295 | xcb_dpms_get_version_reply (xcb_connection_t *c, |
| 296 | xcb_dpms_get_version_cookie_t cookie , |
| 297 | xcb_generic_error_t **e); |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | |
| 304 | |
| 305 | |
| 306 | |
| 307 | xcb_dpms_capable_cookie_t |
| 308 | xcb_dpms_capable (xcb_connection_t *c); |
| 309 | |
| 310 | |
| 311 | |
| 312 | |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | |
| 318 | |
| 319 | |
| 320 | |
| 321 | xcb_dpms_capable_cookie_t |
| 322 | xcb_dpms_capable_unchecked (xcb_connection_t *c); |
| 323 | |
| 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | xcb_dpms_capable_reply_t * |
| 339 | xcb_dpms_capable_reply (xcb_connection_t *c, |
| 340 | xcb_dpms_capable_cookie_t cookie , |
| 341 | xcb_generic_error_t **e); |
| 342 | |
| 343 | |
| 344 | |
| 345 | |
| 346 | |
| 347 | |
| 348 | |
| 349 | |
| 350 | |
| 351 | xcb_dpms_get_timeouts_cookie_t |
| 352 | xcb_dpms_get_timeouts (xcb_connection_t *c); |
| 353 | |
| 354 | |
| 355 | |
| 356 | |
| 357 | |
| 358 | |
| 359 | |
| 360 | |
| 361 | |
| 362 | |
| 363 | |
| 364 | |
| 365 | xcb_dpms_get_timeouts_cookie_t |
| 366 | xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c); |
| 367 | |
| 368 | |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | |
| 378 | |
| 379 | |
| 380 | |
| 381 | |
| 382 | xcb_dpms_get_timeouts_reply_t * |
| 383 | xcb_dpms_get_timeouts_reply (xcb_connection_t *c, |
| 384 | xcb_dpms_get_timeouts_cookie_t cookie , |
| 385 | xcb_generic_error_t **e); |
| 386 | |
| 387 | |
| 388 | |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | |
| 397 | |
| 398 | xcb_void_cookie_t |
| 399 | xcb_dpms_set_timeouts_checked (xcb_connection_t *c, |
| 400 | uint16_t standby_timeout, |
| 401 | uint16_t suspend_timeout, |
| 402 | uint16_t off_timeout); |
| 403 | |
| 404 | |
| 405 | |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | xcb_void_cookie_t |
| 413 | xcb_dpms_set_timeouts (xcb_connection_t *c, |
| 414 | uint16_t standby_timeout, |
| 415 | uint16_t suspend_timeout, |
| 416 | uint16_t off_timeout); |
| 417 | |
| 418 | |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |
| 429 | xcb_void_cookie_t |
| 430 | xcb_dpms_enable_checked (xcb_connection_t *c); |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | |
| 436 | |
| 437 | |
| 438 | |
| 439 | |
| 440 | xcb_void_cookie_t |
| 441 | xcb_dpms_enable (xcb_connection_t *c); |
| 442 | |
| 443 | |
| 444 | |
| 445 | |
| 446 | |
| 447 | |
| 448 | |
| 449 | |
| 450 | |
| 451 | |
| 452 | |
| 453 | |
| 454 | xcb_void_cookie_t |
| 455 | xcb_dpms_disable_checked (xcb_connection_t *c); |
| 456 | |
| 457 | |
| 458 | |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | |
| 464 | |
| 465 | xcb_void_cookie_t |
| 466 | xcb_dpms_disable (xcb_connection_t *c); |
| 467 | |
| 468 | |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | |
| 479 | xcb_void_cookie_t |
| 480 | xcb_dpms_force_level_checked (xcb_connection_t *c, |
| 481 | uint16_t power_level); |
| 482 | |
| 483 | |
| 484 | |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | xcb_void_cookie_t |
| 492 | xcb_dpms_force_level (xcb_connection_t *c, |
| 493 | uint16_t power_level); |
| 494 | |
| 495 | |
| 496 | |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | |
| 502 | |
| 503 | xcb_dpms_info_cookie_t |
| 504 | xcb_dpms_info (xcb_connection_t *c); |
| 505 | |
| 506 | |
| 507 | |
| 508 | |
| 509 | |
| 510 | |
| 511 | |
| 512 | |
| 513 | |
| 514 | |
| 515 | |
| 516 | |
| 517 | xcb_dpms_info_cookie_t |
| 518 | xcb_dpms_info_unchecked (xcb_connection_t *c); |
| 519 | |
| 520 | |
| 521 | |
| 522 | |
| 523 | |
| 524 | |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 | |
| 530 | |
| 531 | |
| 532 | |
| 533 | |
| 534 | xcb_dpms_info_reply_t * |
| 535 | xcb_dpms_info_reply (xcb_connection_t *c, |
| 536 | xcb_dpms_info_cookie_t cookie , |
| 537 | xcb_generic_error_t **e); |
| 538 | |
| 539 | |
| 540 | |
| 541 | |
| 542 | |
| 543 | |
| 544 | |
| 545 | |
| 546 | |
| 547 | |
| 548 | |
| 549 | |
| 550 | xcb_void_cookie_t |
| 551 | xcb_dpms_select_input_checked (xcb_connection_t *c, |
| 552 | uint32_t event_mask); |
| 553 | |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | |
| 559 | |
| 560 | |
| 561 | |
| 562 | xcb_void_cookie_t |
| 563 | xcb_dpms_select_input (xcb_connection_t *c, |
| 564 | uint32_t event_mask); |
| 565 | |
| 566 | |
| 567 | #ifdef __cplusplus |
| 568 | } |
| 569 | #endif |
| 570 | |
| 571 | #endif |
| 572 | |
| 573 | |
| 574 | |
| 575 | |