dpms.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511
  1. /*
  2. * This file generated automatically from dpms.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_DPMS_API XCB DPMS API
  7. * @brief DPMS XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __DPMS_H
  11. #define __DPMS_H
  12. #include "xcb.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #define XCB_DPMS_MAJOR_VERSION 0
  17. #define XCB_DPMS_MINOR_VERSION 0
  18. extern xcb_extension_t xcb_dpms_id;
  19. /**
  20. * @brief xcb_dpms_get_version_cookie_t
  21. **/
  22. typedef struct xcb_dpms_get_version_cookie_t {
  23. unsigned int sequence;
  24. } xcb_dpms_get_version_cookie_t;
  25. /** Opcode for xcb_dpms_get_version. */
  26. #define XCB_DPMS_GET_VERSION 0
  27. /**
  28. * @brief xcb_dpms_get_version_request_t
  29. **/
  30. typedef struct xcb_dpms_get_version_request_t {
  31. uint8_t major_opcode;
  32. uint8_t minor_opcode;
  33. uint16_t length;
  34. uint16_t client_major_version;
  35. uint16_t client_minor_version;
  36. } xcb_dpms_get_version_request_t;
  37. /**
  38. * @brief xcb_dpms_get_version_reply_t
  39. **/
  40. typedef struct xcb_dpms_get_version_reply_t {
  41. uint8_t response_type;
  42. uint8_t pad0;
  43. uint16_t sequence;
  44. uint32_t length;
  45. uint16_t server_major_version;
  46. uint16_t server_minor_version;
  47. } xcb_dpms_get_version_reply_t;
  48. /**
  49. * @brief xcb_dpms_capable_cookie_t
  50. **/
  51. typedef struct xcb_dpms_capable_cookie_t {
  52. unsigned int sequence;
  53. } xcb_dpms_capable_cookie_t;
  54. /** Opcode for xcb_dpms_capable. */
  55. #define XCB_DPMS_CAPABLE 1
  56. /**
  57. * @brief xcb_dpms_capable_request_t
  58. **/
  59. typedef struct xcb_dpms_capable_request_t {
  60. uint8_t major_opcode;
  61. uint8_t minor_opcode;
  62. uint16_t length;
  63. } xcb_dpms_capable_request_t;
  64. /**
  65. * @brief xcb_dpms_capable_reply_t
  66. **/
  67. typedef struct xcb_dpms_capable_reply_t {
  68. uint8_t response_type;
  69. uint8_t pad0;
  70. uint16_t sequence;
  71. uint32_t length;
  72. uint8_t capable;
  73. uint8_t pad1[23];
  74. } xcb_dpms_capable_reply_t;
  75. /**
  76. * @brief xcb_dpms_get_timeouts_cookie_t
  77. **/
  78. typedef struct xcb_dpms_get_timeouts_cookie_t {
  79. unsigned int sequence;
  80. } xcb_dpms_get_timeouts_cookie_t;
  81. /** Opcode for xcb_dpms_get_timeouts. */
  82. #define XCB_DPMS_GET_TIMEOUTS 2
  83. /**
  84. * @brief xcb_dpms_get_timeouts_request_t
  85. **/
  86. typedef struct xcb_dpms_get_timeouts_request_t {
  87. uint8_t major_opcode;
  88. uint8_t minor_opcode;
  89. uint16_t length;
  90. } xcb_dpms_get_timeouts_request_t;
  91. /**
  92. * @brief xcb_dpms_get_timeouts_reply_t
  93. **/
  94. typedef struct xcb_dpms_get_timeouts_reply_t {
  95. uint8_t response_type;
  96. uint8_t pad0;
  97. uint16_t sequence;
  98. uint32_t length;
  99. uint16_t standby_timeout;
  100. uint16_t suspend_timeout;
  101. uint16_t off_timeout;
  102. uint8_t pad1[18];
  103. } xcb_dpms_get_timeouts_reply_t;
  104. /** Opcode for xcb_dpms_set_timeouts. */
  105. #define XCB_DPMS_SET_TIMEOUTS 3
  106. /**
  107. * @brief xcb_dpms_set_timeouts_request_t
  108. **/
  109. typedef struct xcb_dpms_set_timeouts_request_t {
  110. uint8_t major_opcode;
  111. uint8_t minor_opcode;
  112. uint16_t length;
  113. uint16_t standby_timeout;
  114. uint16_t suspend_timeout;
  115. uint16_t off_timeout;
  116. } xcb_dpms_set_timeouts_request_t;
  117. /** Opcode for xcb_dpms_enable. */
  118. #define XCB_DPMS_ENABLE 4
  119. /**
  120. * @brief xcb_dpms_enable_request_t
  121. **/
  122. typedef struct xcb_dpms_enable_request_t {
  123. uint8_t major_opcode;
  124. uint8_t minor_opcode;
  125. uint16_t length;
  126. } xcb_dpms_enable_request_t;
  127. /** Opcode for xcb_dpms_disable. */
  128. #define XCB_DPMS_DISABLE 5
  129. /**
  130. * @brief xcb_dpms_disable_request_t
  131. **/
  132. typedef struct xcb_dpms_disable_request_t {
  133. uint8_t major_opcode;
  134. uint8_t minor_opcode;
  135. uint16_t length;
  136. } xcb_dpms_disable_request_t;
  137. typedef enum xcb_dpms_dpms_mode_t {
  138. XCB_DPMS_DPMS_MODE_ON = 0,
  139. XCB_DPMS_DPMS_MODE_STANDBY = 1,
  140. XCB_DPMS_DPMS_MODE_SUSPEND = 2,
  141. XCB_DPMS_DPMS_MODE_OFF = 3
  142. } xcb_dpms_dpms_mode_t;
  143. /** Opcode for xcb_dpms_force_level. */
  144. #define XCB_DPMS_FORCE_LEVEL 6
  145. /**
  146. * @brief xcb_dpms_force_level_request_t
  147. **/
  148. typedef struct xcb_dpms_force_level_request_t {
  149. uint8_t major_opcode;
  150. uint8_t minor_opcode;
  151. uint16_t length;
  152. uint16_t power_level;
  153. } xcb_dpms_force_level_request_t;
  154. /**
  155. * @brief xcb_dpms_info_cookie_t
  156. **/
  157. typedef struct xcb_dpms_info_cookie_t {
  158. unsigned int sequence;
  159. } xcb_dpms_info_cookie_t;
  160. /** Opcode for xcb_dpms_info. */
  161. #define XCB_DPMS_INFO 7
  162. /**
  163. * @brief xcb_dpms_info_request_t
  164. **/
  165. typedef struct xcb_dpms_info_request_t {
  166. uint8_t major_opcode;
  167. uint8_t minor_opcode;
  168. uint16_t length;
  169. } xcb_dpms_info_request_t;
  170. /**
  171. * @brief xcb_dpms_info_reply_t
  172. **/
  173. typedef struct xcb_dpms_info_reply_t {
  174. uint8_t response_type;
  175. uint8_t pad0;
  176. uint16_t sequence;
  177. uint32_t length;
  178. uint16_t power_level;
  179. uint8_t state;
  180. uint8_t pad1[21];
  181. } xcb_dpms_info_reply_t;
  182. /**
  183. *
  184. * @param c The connection
  185. * @return A cookie
  186. *
  187. * Delivers a request to the X server.
  188. *
  189. */
  190. xcb_dpms_get_version_cookie_t
  191. xcb_dpms_get_version (xcb_connection_t *c,
  192. uint16_t client_major_version,
  193. uint16_t client_minor_version);
  194. /**
  195. *
  196. * @param c The connection
  197. * @return A cookie
  198. *
  199. * Delivers a request to the X server.
  200. *
  201. * This form can be used only if the request will cause
  202. * a reply to be generated. Any returned error will be
  203. * placed in the event queue.
  204. */
  205. xcb_dpms_get_version_cookie_t
  206. xcb_dpms_get_version_unchecked (xcb_connection_t *c,
  207. uint16_t client_major_version,
  208. uint16_t client_minor_version);
  209. /**
  210. * Return the reply
  211. * @param c The connection
  212. * @param cookie The cookie
  213. * @param e The xcb_generic_error_t supplied
  214. *
  215. * Returns the reply of the request asked by
  216. *
  217. * The parameter @p e supplied to this function must be NULL if
  218. * xcb_dpms_get_version_unchecked(). is used.
  219. * Otherwise, it stores the error if any.
  220. *
  221. * The returned value must be freed by the caller using free().
  222. */
  223. xcb_dpms_get_version_reply_t *
  224. xcb_dpms_get_version_reply (xcb_connection_t *c,
  225. xcb_dpms_get_version_cookie_t cookie /**< */,
  226. xcb_generic_error_t **e);
  227. /**
  228. *
  229. * @param c The connection
  230. * @return A cookie
  231. *
  232. * Delivers a request to the X server.
  233. *
  234. */
  235. xcb_dpms_capable_cookie_t
  236. xcb_dpms_capable (xcb_connection_t *c);
  237. /**
  238. *
  239. * @param c The connection
  240. * @return A cookie
  241. *
  242. * Delivers a request to the X server.
  243. *
  244. * This form can be used only if the request will cause
  245. * a reply to be generated. Any returned error will be
  246. * placed in the event queue.
  247. */
  248. xcb_dpms_capable_cookie_t
  249. xcb_dpms_capable_unchecked (xcb_connection_t *c);
  250. /**
  251. * Return the reply
  252. * @param c The connection
  253. * @param cookie The cookie
  254. * @param e The xcb_generic_error_t supplied
  255. *
  256. * Returns the reply of the request asked by
  257. *
  258. * The parameter @p e supplied to this function must be NULL if
  259. * xcb_dpms_capable_unchecked(). is used.
  260. * Otherwise, it stores the error if any.
  261. *
  262. * The returned value must be freed by the caller using free().
  263. */
  264. xcb_dpms_capable_reply_t *
  265. xcb_dpms_capable_reply (xcb_connection_t *c,
  266. xcb_dpms_capable_cookie_t cookie /**< */,
  267. xcb_generic_error_t **e);
  268. /**
  269. *
  270. * @param c The connection
  271. * @return A cookie
  272. *
  273. * Delivers a request to the X server.
  274. *
  275. */
  276. xcb_dpms_get_timeouts_cookie_t
  277. xcb_dpms_get_timeouts (xcb_connection_t *c);
  278. /**
  279. *
  280. * @param c The connection
  281. * @return A cookie
  282. *
  283. * Delivers a request to the X server.
  284. *
  285. * This form can be used only if the request will cause
  286. * a reply to be generated. Any returned error will be
  287. * placed in the event queue.
  288. */
  289. xcb_dpms_get_timeouts_cookie_t
  290. xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c);
  291. /**
  292. * Return the reply
  293. * @param c The connection
  294. * @param cookie The cookie
  295. * @param e The xcb_generic_error_t supplied
  296. *
  297. * Returns the reply of the request asked by
  298. *
  299. * The parameter @p e supplied to this function must be NULL if
  300. * xcb_dpms_get_timeouts_unchecked(). is used.
  301. * Otherwise, it stores the error if any.
  302. *
  303. * The returned value must be freed by the caller using free().
  304. */
  305. xcb_dpms_get_timeouts_reply_t *
  306. xcb_dpms_get_timeouts_reply (xcb_connection_t *c,
  307. xcb_dpms_get_timeouts_cookie_t cookie /**< */,
  308. xcb_generic_error_t **e);
  309. /**
  310. *
  311. * @param c The connection
  312. * @return A cookie
  313. *
  314. * Delivers a request to the X server.
  315. *
  316. * This form can be used only if the request will not cause
  317. * a reply to be generated. Any returned error will be
  318. * saved for handling by xcb_request_check().
  319. */
  320. xcb_void_cookie_t
  321. xcb_dpms_set_timeouts_checked (xcb_connection_t *c,
  322. uint16_t standby_timeout,
  323. uint16_t suspend_timeout,
  324. uint16_t off_timeout);
  325. /**
  326. *
  327. * @param c The connection
  328. * @return A cookie
  329. *
  330. * Delivers a request to the X server.
  331. *
  332. */
  333. xcb_void_cookie_t
  334. xcb_dpms_set_timeouts (xcb_connection_t *c,
  335. uint16_t standby_timeout,
  336. uint16_t suspend_timeout,
  337. uint16_t off_timeout);
  338. /**
  339. *
  340. * @param c The connection
  341. * @return A cookie
  342. *
  343. * Delivers a request to the X server.
  344. *
  345. * This form can be used only if the request will not cause
  346. * a reply to be generated. Any returned error will be
  347. * saved for handling by xcb_request_check().
  348. */
  349. xcb_void_cookie_t
  350. xcb_dpms_enable_checked (xcb_connection_t *c);
  351. /**
  352. *
  353. * @param c The connection
  354. * @return A cookie
  355. *
  356. * Delivers a request to the X server.
  357. *
  358. */
  359. xcb_void_cookie_t
  360. xcb_dpms_enable (xcb_connection_t *c);
  361. /**
  362. *
  363. * @param c The connection
  364. * @return A cookie
  365. *
  366. * Delivers a request to the X server.
  367. *
  368. * This form can be used only if the request will not cause
  369. * a reply to be generated. Any returned error will be
  370. * saved for handling by xcb_request_check().
  371. */
  372. xcb_void_cookie_t
  373. xcb_dpms_disable_checked (xcb_connection_t *c);
  374. /**
  375. *
  376. * @param c The connection
  377. * @return A cookie
  378. *
  379. * Delivers a request to the X server.
  380. *
  381. */
  382. xcb_void_cookie_t
  383. xcb_dpms_disable (xcb_connection_t *c);
  384. /**
  385. *
  386. * @param c The connection
  387. * @return A cookie
  388. *
  389. * Delivers a request to the X server.
  390. *
  391. * This form can be used only if the request will not cause
  392. * a reply to be generated. Any returned error will be
  393. * saved for handling by xcb_request_check().
  394. */
  395. xcb_void_cookie_t
  396. xcb_dpms_force_level_checked (xcb_connection_t *c,
  397. uint16_t power_level);
  398. /**
  399. *
  400. * @param c The connection
  401. * @return A cookie
  402. *
  403. * Delivers a request to the X server.
  404. *
  405. */
  406. xcb_void_cookie_t
  407. xcb_dpms_force_level (xcb_connection_t *c,
  408. uint16_t power_level);
  409. /**
  410. *
  411. * @param c The connection
  412. * @return A cookie
  413. *
  414. * Delivers a request to the X server.
  415. *
  416. */
  417. xcb_dpms_info_cookie_t
  418. xcb_dpms_info (xcb_connection_t *c);
  419. /**
  420. *
  421. * @param c The connection
  422. * @return A cookie
  423. *
  424. * Delivers a request to the X server.
  425. *
  426. * This form can be used only if the request will cause
  427. * a reply to be generated. Any returned error will be
  428. * placed in the event queue.
  429. */
  430. xcb_dpms_info_cookie_t
  431. xcb_dpms_info_unchecked (xcb_connection_t *c);
  432. /**
  433. * Return the reply
  434. * @param c The connection
  435. * @param cookie The cookie
  436. * @param e The xcb_generic_error_t supplied
  437. *
  438. * Returns the reply of the request asked by
  439. *
  440. * The parameter @p e supplied to this function must be NULL if
  441. * xcb_dpms_info_unchecked(). is used.
  442. * Otherwise, it stores the error if any.
  443. *
  444. * The returned value must be freed by the caller using free().
  445. */
  446. xcb_dpms_info_reply_t *
  447. xcb_dpms_info_reply (xcb_connection_t *c,
  448. xcb_dpms_info_cookie_t cookie /**< */,
  449. xcb_generic_error_t **e);
  450. #ifdef __cplusplus
  451. }
  452. #endif
  453. #endif
  454. /**
  455. * @}
  456. */