screensaver.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. /*
  2. * This file generated automatically from screensaver.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_ScreenSaver_API XCB ScreenSaver API
  7. * @brief ScreenSaver XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __SCREENSAVER_H
  11. #define __SCREENSAVER_H
  12. #include "xcb.h"
  13. #include "xproto.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define XCB_SCREENSAVER_MAJOR_VERSION 1
  18. #define XCB_SCREENSAVER_MINOR_VERSION 1
  19. extern xcb_extension_t xcb_screensaver_id;
  20. typedef enum xcb_screensaver_kind_t {
  21. XCB_SCREENSAVER_KIND_BLANKED = 0,
  22. XCB_SCREENSAVER_KIND_INTERNAL = 1,
  23. XCB_SCREENSAVER_KIND_EXTERNAL = 2
  24. } xcb_screensaver_kind_t;
  25. typedef enum xcb_screensaver_event_t {
  26. XCB_SCREENSAVER_EVENT_NOTIFY_MASK = 1,
  27. XCB_SCREENSAVER_EVENT_CYCLE_MASK = 2
  28. } xcb_screensaver_event_t;
  29. typedef enum xcb_screensaver_state_t {
  30. XCB_SCREENSAVER_STATE_OFF = 0,
  31. XCB_SCREENSAVER_STATE_ON = 1,
  32. XCB_SCREENSAVER_STATE_CYCLE = 2,
  33. XCB_SCREENSAVER_STATE_DISABLED = 3
  34. } xcb_screensaver_state_t;
  35. /**
  36. * @brief xcb_screensaver_query_version_cookie_t
  37. **/
  38. typedef struct xcb_screensaver_query_version_cookie_t {
  39. unsigned int sequence;
  40. } xcb_screensaver_query_version_cookie_t;
  41. /** Opcode for xcb_screensaver_query_version. */
  42. #define XCB_SCREENSAVER_QUERY_VERSION 0
  43. /**
  44. * @brief xcb_screensaver_query_version_request_t
  45. **/
  46. typedef struct xcb_screensaver_query_version_request_t {
  47. uint8_t major_opcode;
  48. uint8_t minor_opcode;
  49. uint16_t length;
  50. uint8_t client_major_version;
  51. uint8_t client_minor_version;
  52. uint8_t pad0[2];
  53. } xcb_screensaver_query_version_request_t;
  54. /**
  55. * @brief xcb_screensaver_query_version_reply_t
  56. **/
  57. typedef struct xcb_screensaver_query_version_reply_t {
  58. uint8_t response_type;
  59. uint8_t pad0;
  60. uint16_t sequence;
  61. uint32_t length;
  62. uint16_t server_major_version;
  63. uint16_t server_minor_version;
  64. uint8_t pad1[20];
  65. } xcb_screensaver_query_version_reply_t;
  66. /**
  67. * @brief xcb_screensaver_query_info_cookie_t
  68. **/
  69. typedef struct xcb_screensaver_query_info_cookie_t {
  70. unsigned int sequence;
  71. } xcb_screensaver_query_info_cookie_t;
  72. /** Opcode for xcb_screensaver_query_info. */
  73. #define XCB_SCREENSAVER_QUERY_INFO 1
  74. /**
  75. * @brief xcb_screensaver_query_info_request_t
  76. **/
  77. typedef struct xcb_screensaver_query_info_request_t {
  78. uint8_t major_opcode;
  79. uint8_t minor_opcode;
  80. uint16_t length;
  81. xcb_drawable_t drawable;
  82. } xcb_screensaver_query_info_request_t;
  83. /**
  84. * @brief xcb_screensaver_query_info_reply_t
  85. **/
  86. typedef struct xcb_screensaver_query_info_reply_t {
  87. uint8_t response_type;
  88. uint8_t state;
  89. uint16_t sequence;
  90. uint32_t length;
  91. xcb_window_t saver_window;
  92. uint32_t ms_until_server;
  93. uint32_t ms_since_user_input;
  94. uint32_t event_mask;
  95. uint8_t kind;
  96. uint8_t pad0[7];
  97. } xcb_screensaver_query_info_reply_t;
  98. /** Opcode for xcb_screensaver_select_input. */
  99. #define XCB_SCREENSAVER_SELECT_INPUT 2
  100. /**
  101. * @brief xcb_screensaver_select_input_request_t
  102. **/
  103. typedef struct xcb_screensaver_select_input_request_t {
  104. uint8_t major_opcode;
  105. uint8_t minor_opcode;
  106. uint16_t length;
  107. xcb_drawable_t drawable;
  108. uint32_t event_mask;
  109. } xcb_screensaver_select_input_request_t;
  110. /**
  111. * @brief xcb_screensaver_set_attributes_value_list_t
  112. **/
  113. typedef struct xcb_screensaver_set_attributes_value_list_t {
  114. xcb_pixmap_t background_pixmap;
  115. uint32_t background_pixel;
  116. xcb_pixmap_t border_pixmap;
  117. uint32_t border_pixel;
  118. uint32_t bit_gravity;
  119. uint32_t win_gravity;
  120. uint32_t backing_store;
  121. uint32_t backing_planes;
  122. uint32_t backing_pixel;
  123. xcb_bool32_t override_redirect;
  124. xcb_bool32_t save_under;
  125. uint32_t event_mask;
  126. uint32_t do_not_propogate_mask;
  127. xcb_colormap_t colormap;
  128. xcb_cursor_t cursor;
  129. } xcb_screensaver_set_attributes_value_list_t;
  130. /** Opcode for xcb_screensaver_set_attributes. */
  131. #define XCB_SCREENSAVER_SET_ATTRIBUTES 3
  132. /**
  133. * @brief xcb_screensaver_set_attributes_request_t
  134. **/
  135. typedef struct xcb_screensaver_set_attributes_request_t {
  136. uint8_t major_opcode;
  137. uint8_t minor_opcode;
  138. uint16_t length;
  139. xcb_drawable_t drawable;
  140. int16_t x;
  141. int16_t y;
  142. uint16_t width;
  143. uint16_t height;
  144. uint16_t border_width;
  145. uint8_t _class;
  146. uint8_t depth;
  147. xcb_visualid_t visual;
  148. uint32_t value_mask;
  149. } xcb_screensaver_set_attributes_request_t;
  150. /** Opcode for xcb_screensaver_unset_attributes. */
  151. #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4
  152. /**
  153. * @brief xcb_screensaver_unset_attributes_request_t
  154. **/
  155. typedef struct xcb_screensaver_unset_attributes_request_t {
  156. uint8_t major_opcode;
  157. uint8_t minor_opcode;
  158. uint16_t length;
  159. xcb_drawable_t drawable;
  160. } xcb_screensaver_unset_attributes_request_t;
  161. /** Opcode for xcb_screensaver_suspend. */
  162. #define XCB_SCREENSAVER_SUSPEND 5
  163. /**
  164. * @brief xcb_screensaver_suspend_request_t
  165. **/
  166. typedef struct xcb_screensaver_suspend_request_t {
  167. uint8_t major_opcode;
  168. uint8_t minor_opcode;
  169. uint16_t length;
  170. uint8_t suspend;
  171. uint8_t pad0[3];
  172. } xcb_screensaver_suspend_request_t;
  173. /** Opcode for xcb_screensaver_notify. */
  174. #define XCB_SCREENSAVER_NOTIFY 0
  175. /**
  176. * @brief xcb_screensaver_notify_event_t
  177. **/
  178. typedef struct xcb_screensaver_notify_event_t {
  179. uint8_t response_type;
  180. uint8_t state;
  181. uint16_t sequence;
  182. xcb_timestamp_t time;
  183. xcb_window_t root;
  184. xcb_window_t window;
  185. uint8_t kind;
  186. uint8_t forced;
  187. uint8_t pad0[14];
  188. } xcb_screensaver_notify_event_t;
  189. /**
  190. *
  191. * @param c The connection
  192. * @return A cookie
  193. *
  194. * Delivers a request to the X server.
  195. *
  196. */
  197. xcb_screensaver_query_version_cookie_t
  198. xcb_screensaver_query_version (xcb_connection_t *c,
  199. uint8_t client_major_version,
  200. uint8_t client_minor_version);
  201. /**
  202. *
  203. * @param c The connection
  204. * @return A cookie
  205. *
  206. * Delivers a request to the X server.
  207. *
  208. * This form can be used only if the request will cause
  209. * a reply to be generated. Any returned error will be
  210. * placed in the event queue.
  211. */
  212. xcb_screensaver_query_version_cookie_t
  213. xcb_screensaver_query_version_unchecked (xcb_connection_t *c,
  214. uint8_t client_major_version,
  215. uint8_t client_minor_version);
  216. /**
  217. * Return the reply
  218. * @param c The connection
  219. * @param cookie The cookie
  220. * @param e The xcb_generic_error_t supplied
  221. *
  222. * Returns the reply of the request asked by
  223. *
  224. * The parameter @p e supplied to this function must be NULL if
  225. * xcb_screensaver_query_version_unchecked(). is used.
  226. * Otherwise, it stores the error if any.
  227. *
  228. * The returned value must be freed by the caller using free().
  229. */
  230. xcb_screensaver_query_version_reply_t *
  231. xcb_screensaver_query_version_reply (xcb_connection_t *c,
  232. xcb_screensaver_query_version_cookie_t cookie /**< */,
  233. xcb_generic_error_t **e);
  234. /**
  235. *
  236. * @param c The connection
  237. * @return A cookie
  238. *
  239. * Delivers a request to the X server.
  240. *
  241. */
  242. xcb_screensaver_query_info_cookie_t
  243. xcb_screensaver_query_info (xcb_connection_t *c,
  244. xcb_drawable_t drawable);
  245. /**
  246. *
  247. * @param c The connection
  248. * @return A cookie
  249. *
  250. * Delivers a request to the X server.
  251. *
  252. * This form can be used only if the request will cause
  253. * a reply to be generated. Any returned error will be
  254. * placed in the event queue.
  255. */
  256. xcb_screensaver_query_info_cookie_t
  257. xcb_screensaver_query_info_unchecked (xcb_connection_t *c,
  258. xcb_drawable_t drawable);
  259. /**
  260. * Return the reply
  261. * @param c The connection
  262. * @param cookie The cookie
  263. * @param e The xcb_generic_error_t supplied
  264. *
  265. * Returns the reply of the request asked by
  266. *
  267. * The parameter @p e supplied to this function must be NULL if
  268. * xcb_screensaver_query_info_unchecked(). is used.
  269. * Otherwise, it stores the error if any.
  270. *
  271. * The returned value must be freed by the caller using free().
  272. */
  273. xcb_screensaver_query_info_reply_t *
  274. xcb_screensaver_query_info_reply (xcb_connection_t *c,
  275. xcb_screensaver_query_info_cookie_t cookie /**< */,
  276. xcb_generic_error_t **e);
  277. /**
  278. *
  279. * @param c The connection
  280. * @return A cookie
  281. *
  282. * Delivers a request to the X server.
  283. *
  284. * This form can be used only if the request will not cause
  285. * a reply to be generated. Any returned error will be
  286. * saved for handling by xcb_request_check().
  287. */
  288. xcb_void_cookie_t
  289. xcb_screensaver_select_input_checked (xcb_connection_t *c,
  290. xcb_drawable_t drawable,
  291. uint32_t event_mask);
  292. /**
  293. *
  294. * @param c The connection
  295. * @return A cookie
  296. *
  297. * Delivers a request to the X server.
  298. *
  299. */
  300. xcb_void_cookie_t
  301. xcb_screensaver_select_input (xcb_connection_t *c,
  302. xcb_drawable_t drawable,
  303. uint32_t event_mask);
  304. int
  305. xcb_screensaver_set_attributes_value_list_serialize (void **_buffer,
  306. uint32_t value_mask,
  307. const xcb_screensaver_set_attributes_value_list_t *_aux);
  308. int
  309. xcb_screensaver_set_attributes_value_list_unpack (const void *_buffer,
  310. uint32_t value_mask,
  311. xcb_screensaver_set_attributes_value_list_t *_aux);
  312. int
  313. xcb_screensaver_set_attributes_value_list_sizeof (const void *_buffer,
  314. uint32_t value_mask);
  315. int
  316. xcb_screensaver_set_attributes_sizeof (const void *_buffer);
  317. /**
  318. *
  319. * @param c The connection
  320. * @return A cookie
  321. *
  322. * Delivers a request to the X server.
  323. *
  324. * This form can be used only if the request will not cause
  325. * a reply to be generated. Any returned error will be
  326. * saved for handling by xcb_request_check().
  327. */
  328. xcb_void_cookie_t
  329. xcb_screensaver_set_attributes_checked (xcb_connection_t *c,
  330. xcb_drawable_t drawable,
  331. int16_t x,
  332. int16_t y,
  333. uint16_t width,
  334. uint16_t height,
  335. uint16_t border_width,
  336. uint8_t _class,
  337. uint8_t depth,
  338. xcb_visualid_t visual,
  339. uint32_t value_mask,
  340. const void *value_list);
  341. /**
  342. *
  343. * @param c The connection
  344. * @return A cookie
  345. *
  346. * Delivers a request to the X server.
  347. *
  348. */
  349. xcb_void_cookie_t
  350. xcb_screensaver_set_attributes (xcb_connection_t *c,
  351. xcb_drawable_t drawable,
  352. int16_t x,
  353. int16_t y,
  354. uint16_t width,
  355. uint16_t height,
  356. uint16_t border_width,
  357. uint8_t _class,
  358. uint8_t depth,
  359. xcb_visualid_t visual,
  360. uint32_t value_mask,
  361. const void *value_list);
  362. /**
  363. *
  364. * @param c The connection
  365. * @return A cookie
  366. *
  367. * Delivers a request to the X server.
  368. *
  369. * This form can be used only if the request will not cause
  370. * a reply to be generated. Any returned error will be
  371. * saved for handling by xcb_request_check().
  372. */
  373. xcb_void_cookie_t
  374. xcb_screensaver_set_attributes_aux_checked (xcb_connection_t *c,
  375. xcb_drawable_t drawable,
  376. int16_t x,
  377. int16_t y,
  378. uint16_t width,
  379. uint16_t height,
  380. uint16_t border_width,
  381. uint8_t _class,
  382. uint8_t depth,
  383. xcb_visualid_t visual,
  384. uint32_t value_mask,
  385. const xcb_screensaver_set_attributes_value_list_t *value_list);
  386. /**
  387. *
  388. * @param c The connection
  389. * @return A cookie
  390. *
  391. * Delivers a request to the X server.
  392. *
  393. */
  394. xcb_void_cookie_t
  395. xcb_screensaver_set_attributes_aux (xcb_connection_t *c,
  396. xcb_drawable_t drawable,
  397. int16_t x,
  398. int16_t y,
  399. uint16_t width,
  400. uint16_t height,
  401. uint16_t border_width,
  402. uint8_t _class,
  403. uint8_t depth,
  404. xcb_visualid_t visual,
  405. uint32_t value_mask,
  406. const xcb_screensaver_set_attributes_value_list_t *value_list);
  407. void *
  408. xcb_screensaver_set_attributes_value_list (const xcb_screensaver_set_attributes_request_t *R);
  409. /**
  410. *
  411. * @param c The connection
  412. * @return A cookie
  413. *
  414. * Delivers a request to the X server.
  415. *
  416. * This form can be used only if the request will not cause
  417. * a reply to be generated. Any returned error will be
  418. * saved for handling by xcb_request_check().
  419. */
  420. xcb_void_cookie_t
  421. xcb_screensaver_unset_attributes_checked (xcb_connection_t *c,
  422. xcb_drawable_t drawable);
  423. /**
  424. *
  425. * @param c The connection
  426. * @return A cookie
  427. *
  428. * Delivers a request to the X server.
  429. *
  430. */
  431. xcb_void_cookie_t
  432. xcb_screensaver_unset_attributes (xcb_connection_t *c,
  433. xcb_drawable_t drawable);
  434. /**
  435. *
  436. * @param c The connection
  437. * @return A cookie
  438. *
  439. * Delivers a request to the X server.
  440. *
  441. * This form can be used only if the request will not cause
  442. * a reply to be generated. Any returned error will be
  443. * saved for handling by xcb_request_check().
  444. */
  445. xcb_void_cookie_t
  446. xcb_screensaver_suspend_checked (xcb_connection_t *c,
  447. uint8_t suspend);
  448. /**
  449. *
  450. * @param c The connection
  451. * @return A cookie
  452. *
  453. * Delivers a request to the X server.
  454. *
  455. */
  456. xcb_void_cookie_t
  457. xcb_screensaver_suspend (xcb_connection_t *c,
  458. uint8_t suspend);
  459. #ifdef __cplusplus
  460. }
  461. #endif
  462. #endif
  463. /**
  464. * @}
  465. */