xinerama.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. /*
  2. * This file generated automatically from xinerama.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_Xinerama_API XCB Xinerama API
  7. * @brief Xinerama XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __XINERAMA_H
  11. #define __XINERAMA_H
  12. #include "xcb.h"
  13. #include "xproto.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define XCB_XINERAMA_MAJOR_VERSION 1
  18. #define XCB_XINERAMA_MINOR_VERSION 1
  19. extern xcb_extension_t xcb_xinerama_id;
  20. /**
  21. * @brief xcb_xinerama_screen_info_t
  22. **/
  23. typedef struct xcb_xinerama_screen_info_t {
  24. int16_t x_org;
  25. int16_t y_org;
  26. uint16_t width;
  27. uint16_t height;
  28. } xcb_xinerama_screen_info_t;
  29. /**
  30. * @brief xcb_xinerama_screen_info_iterator_t
  31. **/
  32. typedef struct xcb_xinerama_screen_info_iterator_t {
  33. xcb_xinerama_screen_info_t *data;
  34. int rem;
  35. int index;
  36. } xcb_xinerama_screen_info_iterator_t;
  37. /**
  38. * @brief xcb_xinerama_query_version_cookie_t
  39. **/
  40. typedef struct xcb_xinerama_query_version_cookie_t {
  41. unsigned int sequence;
  42. } xcb_xinerama_query_version_cookie_t;
  43. /** Opcode for xcb_xinerama_query_version. */
  44. #define XCB_XINERAMA_QUERY_VERSION 0
  45. /**
  46. * @brief xcb_xinerama_query_version_request_t
  47. **/
  48. typedef struct xcb_xinerama_query_version_request_t {
  49. uint8_t major_opcode;
  50. uint8_t minor_opcode;
  51. uint16_t length;
  52. uint8_t major;
  53. uint8_t minor;
  54. } xcb_xinerama_query_version_request_t;
  55. /**
  56. * @brief xcb_xinerama_query_version_reply_t
  57. **/
  58. typedef struct xcb_xinerama_query_version_reply_t {
  59. uint8_t response_type;
  60. uint8_t pad0;
  61. uint16_t sequence;
  62. uint32_t length;
  63. uint16_t major;
  64. uint16_t minor;
  65. } xcb_xinerama_query_version_reply_t;
  66. /**
  67. * @brief xcb_xinerama_get_state_cookie_t
  68. **/
  69. typedef struct xcb_xinerama_get_state_cookie_t {
  70. unsigned int sequence;
  71. } xcb_xinerama_get_state_cookie_t;
  72. /** Opcode for xcb_xinerama_get_state. */
  73. #define XCB_XINERAMA_GET_STATE 1
  74. /**
  75. * @brief xcb_xinerama_get_state_request_t
  76. **/
  77. typedef struct xcb_xinerama_get_state_request_t {
  78. uint8_t major_opcode;
  79. uint8_t minor_opcode;
  80. uint16_t length;
  81. xcb_window_t window;
  82. } xcb_xinerama_get_state_request_t;
  83. /**
  84. * @brief xcb_xinerama_get_state_reply_t
  85. **/
  86. typedef struct xcb_xinerama_get_state_reply_t {
  87. uint8_t response_type;
  88. uint8_t state;
  89. uint16_t sequence;
  90. uint32_t length;
  91. xcb_window_t window;
  92. } xcb_xinerama_get_state_reply_t;
  93. /**
  94. * @brief xcb_xinerama_get_screen_count_cookie_t
  95. **/
  96. typedef struct xcb_xinerama_get_screen_count_cookie_t {
  97. unsigned int sequence;
  98. } xcb_xinerama_get_screen_count_cookie_t;
  99. /** Opcode for xcb_xinerama_get_screen_count. */
  100. #define XCB_XINERAMA_GET_SCREEN_COUNT 2
  101. /**
  102. * @brief xcb_xinerama_get_screen_count_request_t
  103. **/
  104. typedef struct xcb_xinerama_get_screen_count_request_t {
  105. uint8_t major_opcode;
  106. uint8_t minor_opcode;
  107. uint16_t length;
  108. xcb_window_t window;
  109. } xcb_xinerama_get_screen_count_request_t;
  110. /**
  111. * @brief xcb_xinerama_get_screen_count_reply_t
  112. **/
  113. typedef struct xcb_xinerama_get_screen_count_reply_t {
  114. uint8_t response_type;
  115. uint8_t screen_count;
  116. uint16_t sequence;
  117. uint32_t length;
  118. xcb_window_t window;
  119. } xcb_xinerama_get_screen_count_reply_t;
  120. /**
  121. * @brief xcb_xinerama_get_screen_size_cookie_t
  122. **/
  123. typedef struct xcb_xinerama_get_screen_size_cookie_t {
  124. unsigned int sequence;
  125. } xcb_xinerama_get_screen_size_cookie_t;
  126. /** Opcode for xcb_xinerama_get_screen_size. */
  127. #define XCB_XINERAMA_GET_SCREEN_SIZE 3
  128. /**
  129. * @brief xcb_xinerama_get_screen_size_request_t
  130. **/
  131. typedef struct xcb_xinerama_get_screen_size_request_t {
  132. uint8_t major_opcode;
  133. uint8_t minor_opcode;
  134. uint16_t length;
  135. xcb_window_t window;
  136. uint32_t screen;
  137. } xcb_xinerama_get_screen_size_request_t;
  138. /**
  139. * @brief xcb_xinerama_get_screen_size_reply_t
  140. **/
  141. typedef struct xcb_xinerama_get_screen_size_reply_t {
  142. uint8_t response_type;
  143. uint8_t pad0;
  144. uint16_t sequence;
  145. uint32_t length;
  146. uint32_t width;
  147. uint32_t height;
  148. xcb_window_t window;
  149. uint32_t screen;
  150. } xcb_xinerama_get_screen_size_reply_t;
  151. /**
  152. * @brief xcb_xinerama_is_active_cookie_t
  153. **/
  154. typedef struct xcb_xinerama_is_active_cookie_t {
  155. unsigned int sequence;
  156. } xcb_xinerama_is_active_cookie_t;
  157. /** Opcode for xcb_xinerama_is_active. */
  158. #define XCB_XINERAMA_IS_ACTIVE 4
  159. /**
  160. * @brief xcb_xinerama_is_active_request_t
  161. **/
  162. typedef struct xcb_xinerama_is_active_request_t {
  163. uint8_t major_opcode;
  164. uint8_t minor_opcode;
  165. uint16_t length;
  166. } xcb_xinerama_is_active_request_t;
  167. /**
  168. * @brief xcb_xinerama_is_active_reply_t
  169. **/
  170. typedef struct xcb_xinerama_is_active_reply_t {
  171. uint8_t response_type;
  172. uint8_t pad0;
  173. uint16_t sequence;
  174. uint32_t length;
  175. uint32_t state;
  176. } xcb_xinerama_is_active_reply_t;
  177. /**
  178. * @brief xcb_xinerama_query_screens_cookie_t
  179. **/
  180. typedef struct xcb_xinerama_query_screens_cookie_t {
  181. unsigned int sequence;
  182. } xcb_xinerama_query_screens_cookie_t;
  183. /** Opcode for xcb_xinerama_query_screens. */
  184. #define XCB_XINERAMA_QUERY_SCREENS 5
  185. /**
  186. * @brief xcb_xinerama_query_screens_request_t
  187. **/
  188. typedef struct xcb_xinerama_query_screens_request_t {
  189. uint8_t major_opcode;
  190. uint8_t minor_opcode;
  191. uint16_t length;
  192. } xcb_xinerama_query_screens_request_t;
  193. /**
  194. * @brief xcb_xinerama_query_screens_reply_t
  195. **/
  196. typedef struct xcb_xinerama_query_screens_reply_t {
  197. uint8_t response_type;
  198. uint8_t pad0;
  199. uint16_t sequence;
  200. uint32_t length;
  201. uint32_t number;
  202. uint8_t pad1[20];
  203. } xcb_xinerama_query_screens_reply_t;
  204. /**
  205. * Get the next element of the iterator
  206. * @param i Pointer to a xcb_xinerama_screen_info_iterator_t
  207. *
  208. * Get the next element in the iterator. The member rem is
  209. * decreased by one. The member data points to the next
  210. * element. The member index is increased by sizeof(xcb_xinerama_screen_info_t)
  211. */
  212. void
  213. xcb_xinerama_screen_info_next (xcb_xinerama_screen_info_iterator_t *i);
  214. /**
  215. * Return the iterator pointing to the last element
  216. * @param i An xcb_xinerama_screen_info_iterator_t
  217. * @return The iterator pointing to the last element
  218. *
  219. * Set the current element in the iterator to the last element.
  220. * The member rem is set to 0. The member data points to the
  221. * last element.
  222. */
  223. xcb_generic_iterator_t
  224. xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i);
  225. /**
  226. *
  227. * @param c The connection
  228. * @return A cookie
  229. *
  230. * Delivers a request to the X server.
  231. *
  232. */
  233. xcb_xinerama_query_version_cookie_t
  234. xcb_xinerama_query_version (xcb_connection_t *c,
  235. uint8_t major,
  236. uint8_t minor);
  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_xinerama_query_version_cookie_t
  249. xcb_xinerama_query_version_unchecked (xcb_connection_t *c,
  250. uint8_t major,
  251. uint8_t minor);
  252. /**
  253. * Return the reply
  254. * @param c The connection
  255. * @param cookie The cookie
  256. * @param e The xcb_generic_error_t supplied
  257. *
  258. * Returns the reply of the request asked by
  259. *
  260. * The parameter @p e supplied to this function must be NULL if
  261. * xcb_xinerama_query_version_unchecked(). is used.
  262. * Otherwise, it stores the error if any.
  263. *
  264. * The returned value must be freed by the caller using free().
  265. */
  266. xcb_xinerama_query_version_reply_t *
  267. xcb_xinerama_query_version_reply (xcb_connection_t *c,
  268. xcb_xinerama_query_version_cookie_t cookie /**< */,
  269. xcb_generic_error_t **e);
  270. /**
  271. *
  272. * @param c The connection
  273. * @return A cookie
  274. *
  275. * Delivers a request to the X server.
  276. *
  277. */
  278. xcb_xinerama_get_state_cookie_t
  279. xcb_xinerama_get_state (xcb_connection_t *c,
  280. xcb_window_t window);
  281. /**
  282. *
  283. * @param c The connection
  284. * @return A cookie
  285. *
  286. * Delivers a request to the X server.
  287. *
  288. * This form can be used only if the request will cause
  289. * a reply to be generated. Any returned error will be
  290. * placed in the event queue.
  291. */
  292. xcb_xinerama_get_state_cookie_t
  293. xcb_xinerama_get_state_unchecked (xcb_connection_t *c,
  294. xcb_window_t window);
  295. /**
  296. * Return the reply
  297. * @param c The connection
  298. * @param cookie The cookie
  299. * @param e The xcb_generic_error_t supplied
  300. *
  301. * Returns the reply of the request asked by
  302. *
  303. * The parameter @p e supplied to this function must be NULL if
  304. * xcb_xinerama_get_state_unchecked(). is used.
  305. * Otherwise, it stores the error if any.
  306. *
  307. * The returned value must be freed by the caller using free().
  308. */
  309. xcb_xinerama_get_state_reply_t *
  310. xcb_xinerama_get_state_reply (xcb_connection_t *c,
  311. xcb_xinerama_get_state_cookie_t cookie /**< */,
  312. xcb_generic_error_t **e);
  313. /**
  314. *
  315. * @param c The connection
  316. * @return A cookie
  317. *
  318. * Delivers a request to the X server.
  319. *
  320. */
  321. xcb_xinerama_get_screen_count_cookie_t
  322. xcb_xinerama_get_screen_count (xcb_connection_t *c,
  323. xcb_window_t window);
  324. /**
  325. *
  326. * @param c The connection
  327. * @return A cookie
  328. *
  329. * Delivers a request to the X server.
  330. *
  331. * This form can be used only if the request will cause
  332. * a reply to be generated. Any returned error will be
  333. * placed in the event queue.
  334. */
  335. xcb_xinerama_get_screen_count_cookie_t
  336. xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c,
  337. xcb_window_t window);
  338. /**
  339. * Return the reply
  340. * @param c The connection
  341. * @param cookie The cookie
  342. * @param e The xcb_generic_error_t supplied
  343. *
  344. * Returns the reply of the request asked by
  345. *
  346. * The parameter @p e supplied to this function must be NULL if
  347. * xcb_xinerama_get_screen_count_unchecked(). is used.
  348. * Otherwise, it stores the error if any.
  349. *
  350. * The returned value must be freed by the caller using free().
  351. */
  352. xcb_xinerama_get_screen_count_reply_t *
  353. xcb_xinerama_get_screen_count_reply (xcb_connection_t *c,
  354. xcb_xinerama_get_screen_count_cookie_t cookie /**< */,
  355. xcb_generic_error_t **e);
  356. /**
  357. *
  358. * @param c The connection
  359. * @return A cookie
  360. *
  361. * Delivers a request to the X server.
  362. *
  363. */
  364. xcb_xinerama_get_screen_size_cookie_t
  365. xcb_xinerama_get_screen_size (xcb_connection_t *c,
  366. xcb_window_t window,
  367. uint32_t screen);
  368. /**
  369. *
  370. * @param c The connection
  371. * @return A cookie
  372. *
  373. * Delivers a request to the X server.
  374. *
  375. * This form can be used only if the request will cause
  376. * a reply to be generated. Any returned error will be
  377. * placed in the event queue.
  378. */
  379. xcb_xinerama_get_screen_size_cookie_t
  380. xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c,
  381. xcb_window_t window,
  382. uint32_t screen);
  383. /**
  384. * Return the reply
  385. * @param c The connection
  386. * @param cookie The cookie
  387. * @param e The xcb_generic_error_t supplied
  388. *
  389. * Returns the reply of the request asked by
  390. *
  391. * The parameter @p e supplied to this function must be NULL if
  392. * xcb_xinerama_get_screen_size_unchecked(). is used.
  393. * Otherwise, it stores the error if any.
  394. *
  395. * The returned value must be freed by the caller using free().
  396. */
  397. xcb_xinerama_get_screen_size_reply_t *
  398. xcb_xinerama_get_screen_size_reply (xcb_connection_t *c,
  399. xcb_xinerama_get_screen_size_cookie_t cookie /**< */,
  400. xcb_generic_error_t **e);
  401. /**
  402. *
  403. * @param c The connection
  404. * @return A cookie
  405. *
  406. * Delivers a request to the X server.
  407. *
  408. */
  409. xcb_xinerama_is_active_cookie_t
  410. xcb_xinerama_is_active (xcb_connection_t *c);
  411. /**
  412. *
  413. * @param c The connection
  414. * @return A cookie
  415. *
  416. * Delivers a request to the X server.
  417. *
  418. * This form can be used only if the request will cause
  419. * a reply to be generated. Any returned error will be
  420. * placed in the event queue.
  421. */
  422. xcb_xinerama_is_active_cookie_t
  423. xcb_xinerama_is_active_unchecked (xcb_connection_t *c);
  424. /**
  425. * Return the reply
  426. * @param c The connection
  427. * @param cookie The cookie
  428. * @param e The xcb_generic_error_t supplied
  429. *
  430. * Returns the reply of the request asked by
  431. *
  432. * The parameter @p e supplied to this function must be NULL if
  433. * xcb_xinerama_is_active_unchecked(). is used.
  434. * Otherwise, it stores the error if any.
  435. *
  436. * The returned value must be freed by the caller using free().
  437. */
  438. xcb_xinerama_is_active_reply_t *
  439. xcb_xinerama_is_active_reply (xcb_connection_t *c,
  440. xcb_xinerama_is_active_cookie_t cookie /**< */,
  441. xcb_generic_error_t **e);
  442. int
  443. xcb_xinerama_query_screens_sizeof (const void *_buffer);
  444. /**
  445. *
  446. * @param c The connection
  447. * @return A cookie
  448. *
  449. * Delivers a request to the X server.
  450. *
  451. */
  452. xcb_xinerama_query_screens_cookie_t
  453. xcb_xinerama_query_screens (xcb_connection_t *c);
  454. /**
  455. *
  456. * @param c The connection
  457. * @return A cookie
  458. *
  459. * Delivers a request to the X server.
  460. *
  461. * This form can be used only if the request will cause
  462. * a reply to be generated. Any returned error will be
  463. * placed in the event queue.
  464. */
  465. xcb_xinerama_query_screens_cookie_t
  466. xcb_xinerama_query_screens_unchecked (xcb_connection_t *c);
  467. xcb_xinerama_screen_info_t *
  468. xcb_xinerama_query_screens_screen_info (const xcb_xinerama_query_screens_reply_t *R);
  469. int
  470. xcb_xinerama_query_screens_screen_info_length (const xcb_xinerama_query_screens_reply_t *R);
  471. xcb_xinerama_screen_info_iterator_t
  472. xcb_xinerama_query_screens_screen_info_iterator (const xcb_xinerama_query_screens_reply_t *R);
  473. /**
  474. * Return the reply
  475. * @param c The connection
  476. * @param cookie The cookie
  477. * @param e The xcb_generic_error_t supplied
  478. *
  479. * Returns the reply of the request asked by
  480. *
  481. * The parameter @p e supplied to this function must be NULL if
  482. * xcb_xinerama_query_screens_unchecked(). is used.
  483. * Otherwise, it stores the error if any.
  484. *
  485. * The returned value must be freed by the caller using free().
  486. */
  487. xcb_xinerama_query_screens_reply_t *
  488. xcb_xinerama_query_screens_reply (xcb_connection_t *c,
  489. xcb_xinerama_query_screens_cookie_t cookie /**< */,
  490. xcb_generic_error_t **e);
  491. #ifdef __cplusplus
  492. }
  493. #endif
  494. #endif
  495. /**
  496. * @}
  497. */