dri2.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305
  1. /*
  2. * This file generated automatically from dri2.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_DRI2_API XCB DRI2 API
  7. * @brief DRI2 XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __DRI2_H
  11. #define __DRI2_H
  12. #include "xcb.h"
  13. #include "xproto.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define XCB_DRI2_MAJOR_VERSION 1
  18. #define XCB_DRI2_MINOR_VERSION 4
  19. extern xcb_extension_t xcb_dri2_id;
  20. typedef enum xcb_dri2_attachment_t {
  21. XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT = 0,
  22. XCB_DRI2_ATTACHMENT_BUFFER_BACK_LEFT = 1,
  23. XCB_DRI2_ATTACHMENT_BUFFER_FRONT_RIGHT = 2,
  24. XCB_DRI2_ATTACHMENT_BUFFER_BACK_RIGHT = 3,
  25. XCB_DRI2_ATTACHMENT_BUFFER_DEPTH = 4,
  26. XCB_DRI2_ATTACHMENT_BUFFER_STENCIL = 5,
  27. XCB_DRI2_ATTACHMENT_BUFFER_ACCUM = 6,
  28. XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_LEFT = 7,
  29. XCB_DRI2_ATTACHMENT_BUFFER_FAKE_FRONT_RIGHT = 8,
  30. XCB_DRI2_ATTACHMENT_BUFFER_DEPTH_STENCIL = 9,
  31. XCB_DRI2_ATTACHMENT_BUFFER_HIZ = 10
  32. } xcb_dri2_attachment_t;
  33. typedef enum xcb_dri2_driver_type_t {
  34. XCB_DRI2_DRIVER_TYPE_DRI = 0,
  35. XCB_DRI2_DRIVER_TYPE_VDPAU = 1
  36. } xcb_dri2_driver_type_t;
  37. typedef enum xcb_dri2_event_type_t {
  38. XCB_DRI2_EVENT_TYPE_EXCHANGE_COMPLETE = 1,
  39. XCB_DRI2_EVENT_TYPE_BLIT_COMPLETE = 2,
  40. XCB_DRI2_EVENT_TYPE_FLIP_COMPLETE = 3
  41. } xcb_dri2_event_type_t;
  42. /**
  43. * @brief xcb_dri2_dri2_buffer_t
  44. **/
  45. typedef struct xcb_dri2_dri2_buffer_t {
  46. uint32_t attachment;
  47. uint32_t name;
  48. uint32_t pitch;
  49. uint32_t cpp;
  50. uint32_t flags;
  51. } xcb_dri2_dri2_buffer_t;
  52. /**
  53. * @brief xcb_dri2_dri2_buffer_iterator_t
  54. **/
  55. typedef struct xcb_dri2_dri2_buffer_iterator_t {
  56. xcb_dri2_dri2_buffer_t *data;
  57. int rem;
  58. int index;
  59. } xcb_dri2_dri2_buffer_iterator_t;
  60. /**
  61. * @brief xcb_dri2_attach_format_t
  62. **/
  63. typedef struct xcb_dri2_attach_format_t {
  64. uint32_t attachment;
  65. uint32_t format;
  66. } xcb_dri2_attach_format_t;
  67. /**
  68. * @brief xcb_dri2_attach_format_iterator_t
  69. **/
  70. typedef struct xcb_dri2_attach_format_iterator_t {
  71. xcb_dri2_attach_format_t *data;
  72. int rem;
  73. int index;
  74. } xcb_dri2_attach_format_iterator_t;
  75. /**
  76. * @brief xcb_dri2_query_version_cookie_t
  77. **/
  78. typedef struct xcb_dri2_query_version_cookie_t {
  79. unsigned int sequence;
  80. } xcb_dri2_query_version_cookie_t;
  81. /** Opcode for xcb_dri2_query_version. */
  82. #define XCB_DRI2_QUERY_VERSION 0
  83. /**
  84. * @brief xcb_dri2_query_version_request_t
  85. **/
  86. typedef struct xcb_dri2_query_version_request_t {
  87. uint8_t major_opcode;
  88. uint8_t minor_opcode;
  89. uint16_t length;
  90. uint32_t major_version;
  91. uint32_t minor_version;
  92. } xcb_dri2_query_version_request_t;
  93. /**
  94. * @brief xcb_dri2_query_version_reply_t
  95. **/
  96. typedef struct xcb_dri2_query_version_reply_t {
  97. uint8_t response_type;
  98. uint8_t pad0;
  99. uint16_t sequence;
  100. uint32_t length;
  101. uint32_t major_version;
  102. uint32_t minor_version;
  103. } xcb_dri2_query_version_reply_t;
  104. /**
  105. * @brief xcb_dri2_connect_cookie_t
  106. **/
  107. typedef struct xcb_dri2_connect_cookie_t {
  108. unsigned int sequence;
  109. } xcb_dri2_connect_cookie_t;
  110. /** Opcode for xcb_dri2_connect. */
  111. #define XCB_DRI2_CONNECT 1
  112. /**
  113. * @brief xcb_dri2_connect_request_t
  114. **/
  115. typedef struct xcb_dri2_connect_request_t {
  116. uint8_t major_opcode;
  117. uint8_t minor_opcode;
  118. uint16_t length;
  119. xcb_window_t window;
  120. uint32_t driver_type;
  121. } xcb_dri2_connect_request_t;
  122. /**
  123. * @brief xcb_dri2_connect_reply_t
  124. **/
  125. typedef struct xcb_dri2_connect_reply_t {
  126. uint8_t response_type;
  127. uint8_t pad0;
  128. uint16_t sequence;
  129. uint32_t length;
  130. uint32_t driver_name_length;
  131. uint32_t device_name_length;
  132. uint8_t pad1[16];
  133. } xcb_dri2_connect_reply_t;
  134. /**
  135. * @brief xcb_dri2_authenticate_cookie_t
  136. **/
  137. typedef struct xcb_dri2_authenticate_cookie_t {
  138. unsigned int sequence;
  139. } xcb_dri2_authenticate_cookie_t;
  140. /** Opcode for xcb_dri2_authenticate. */
  141. #define XCB_DRI2_AUTHENTICATE 2
  142. /**
  143. * @brief xcb_dri2_authenticate_request_t
  144. **/
  145. typedef struct xcb_dri2_authenticate_request_t {
  146. uint8_t major_opcode;
  147. uint8_t minor_opcode;
  148. uint16_t length;
  149. xcb_window_t window;
  150. uint32_t magic;
  151. } xcb_dri2_authenticate_request_t;
  152. /**
  153. * @brief xcb_dri2_authenticate_reply_t
  154. **/
  155. typedef struct xcb_dri2_authenticate_reply_t {
  156. uint8_t response_type;
  157. uint8_t pad0;
  158. uint16_t sequence;
  159. uint32_t length;
  160. uint32_t authenticated;
  161. } xcb_dri2_authenticate_reply_t;
  162. /** Opcode for xcb_dri2_create_drawable. */
  163. #define XCB_DRI2_CREATE_DRAWABLE 3
  164. /**
  165. * @brief xcb_dri2_create_drawable_request_t
  166. **/
  167. typedef struct xcb_dri2_create_drawable_request_t {
  168. uint8_t major_opcode;
  169. uint8_t minor_opcode;
  170. uint16_t length;
  171. xcb_drawable_t drawable;
  172. } xcb_dri2_create_drawable_request_t;
  173. /** Opcode for xcb_dri2_destroy_drawable. */
  174. #define XCB_DRI2_DESTROY_DRAWABLE 4
  175. /**
  176. * @brief xcb_dri2_destroy_drawable_request_t
  177. **/
  178. typedef struct xcb_dri2_destroy_drawable_request_t {
  179. uint8_t major_opcode;
  180. uint8_t minor_opcode;
  181. uint16_t length;
  182. xcb_drawable_t drawable;
  183. } xcb_dri2_destroy_drawable_request_t;
  184. /**
  185. * @brief xcb_dri2_get_buffers_cookie_t
  186. **/
  187. typedef struct xcb_dri2_get_buffers_cookie_t {
  188. unsigned int sequence;
  189. } xcb_dri2_get_buffers_cookie_t;
  190. /** Opcode for xcb_dri2_get_buffers. */
  191. #define XCB_DRI2_GET_BUFFERS 5
  192. /**
  193. * @brief xcb_dri2_get_buffers_request_t
  194. **/
  195. typedef struct xcb_dri2_get_buffers_request_t {
  196. uint8_t major_opcode;
  197. uint8_t minor_opcode;
  198. uint16_t length;
  199. xcb_drawable_t drawable;
  200. uint32_t count;
  201. } xcb_dri2_get_buffers_request_t;
  202. /**
  203. * @brief xcb_dri2_get_buffers_reply_t
  204. **/
  205. typedef struct xcb_dri2_get_buffers_reply_t {
  206. uint8_t response_type;
  207. uint8_t pad0;
  208. uint16_t sequence;
  209. uint32_t length;
  210. uint32_t width;
  211. uint32_t height;
  212. uint32_t count;
  213. uint8_t pad1[12];
  214. } xcb_dri2_get_buffers_reply_t;
  215. /**
  216. * @brief xcb_dri2_copy_region_cookie_t
  217. **/
  218. typedef struct xcb_dri2_copy_region_cookie_t {
  219. unsigned int sequence;
  220. } xcb_dri2_copy_region_cookie_t;
  221. /** Opcode for xcb_dri2_copy_region. */
  222. #define XCB_DRI2_COPY_REGION 6
  223. /**
  224. * @brief xcb_dri2_copy_region_request_t
  225. **/
  226. typedef struct xcb_dri2_copy_region_request_t {
  227. uint8_t major_opcode;
  228. uint8_t minor_opcode;
  229. uint16_t length;
  230. xcb_drawable_t drawable;
  231. uint32_t region;
  232. uint32_t dest;
  233. uint32_t src;
  234. } xcb_dri2_copy_region_request_t;
  235. /**
  236. * @brief xcb_dri2_copy_region_reply_t
  237. **/
  238. typedef struct xcb_dri2_copy_region_reply_t {
  239. uint8_t response_type;
  240. uint8_t pad0;
  241. uint16_t sequence;
  242. uint32_t length;
  243. } xcb_dri2_copy_region_reply_t;
  244. /**
  245. * @brief xcb_dri2_get_buffers_with_format_cookie_t
  246. **/
  247. typedef struct xcb_dri2_get_buffers_with_format_cookie_t {
  248. unsigned int sequence;
  249. } xcb_dri2_get_buffers_with_format_cookie_t;
  250. /** Opcode for xcb_dri2_get_buffers_with_format. */
  251. #define XCB_DRI2_GET_BUFFERS_WITH_FORMAT 7
  252. /**
  253. * @brief xcb_dri2_get_buffers_with_format_request_t
  254. **/
  255. typedef struct xcb_dri2_get_buffers_with_format_request_t {
  256. uint8_t major_opcode;
  257. uint8_t minor_opcode;
  258. uint16_t length;
  259. xcb_drawable_t drawable;
  260. uint32_t count;
  261. } xcb_dri2_get_buffers_with_format_request_t;
  262. /**
  263. * @brief xcb_dri2_get_buffers_with_format_reply_t
  264. **/
  265. typedef struct xcb_dri2_get_buffers_with_format_reply_t {
  266. uint8_t response_type;
  267. uint8_t pad0;
  268. uint16_t sequence;
  269. uint32_t length;
  270. uint32_t width;
  271. uint32_t height;
  272. uint32_t count;
  273. uint8_t pad1[12];
  274. } xcb_dri2_get_buffers_with_format_reply_t;
  275. /**
  276. * @brief xcb_dri2_swap_buffers_cookie_t
  277. **/
  278. typedef struct xcb_dri2_swap_buffers_cookie_t {
  279. unsigned int sequence;
  280. } xcb_dri2_swap_buffers_cookie_t;
  281. /** Opcode for xcb_dri2_swap_buffers. */
  282. #define XCB_DRI2_SWAP_BUFFERS 8
  283. /**
  284. * @brief xcb_dri2_swap_buffers_request_t
  285. **/
  286. typedef struct xcb_dri2_swap_buffers_request_t {
  287. uint8_t major_opcode;
  288. uint8_t minor_opcode;
  289. uint16_t length;
  290. xcb_drawable_t drawable;
  291. uint32_t target_msc_hi;
  292. uint32_t target_msc_lo;
  293. uint32_t divisor_hi;
  294. uint32_t divisor_lo;
  295. uint32_t remainder_hi;
  296. uint32_t remainder_lo;
  297. } xcb_dri2_swap_buffers_request_t;
  298. /**
  299. * @brief xcb_dri2_swap_buffers_reply_t
  300. **/
  301. typedef struct xcb_dri2_swap_buffers_reply_t {
  302. uint8_t response_type;
  303. uint8_t pad0;
  304. uint16_t sequence;
  305. uint32_t length;
  306. uint32_t swap_hi;
  307. uint32_t swap_lo;
  308. } xcb_dri2_swap_buffers_reply_t;
  309. /**
  310. * @brief xcb_dri2_get_msc_cookie_t
  311. **/
  312. typedef struct xcb_dri2_get_msc_cookie_t {
  313. unsigned int sequence;
  314. } xcb_dri2_get_msc_cookie_t;
  315. /** Opcode for xcb_dri2_get_msc. */
  316. #define XCB_DRI2_GET_MSC 9
  317. /**
  318. * @brief xcb_dri2_get_msc_request_t
  319. **/
  320. typedef struct xcb_dri2_get_msc_request_t {
  321. uint8_t major_opcode;
  322. uint8_t minor_opcode;
  323. uint16_t length;
  324. xcb_drawable_t drawable;
  325. } xcb_dri2_get_msc_request_t;
  326. /**
  327. * @brief xcb_dri2_get_msc_reply_t
  328. **/
  329. typedef struct xcb_dri2_get_msc_reply_t {
  330. uint8_t response_type;
  331. uint8_t pad0;
  332. uint16_t sequence;
  333. uint32_t length;
  334. uint32_t ust_hi;
  335. uint32_t ust_lo;
  336. uint32_t msc_hi;
  337. uint32_t msc_lo;
  338. uint32_t sbc_hi;
  339. uint32_t sbc_lo;
  340. } xcb_dri2_get_msc_reply_t;
  341. /**
  342. * @brief xcb_dri2_wait_msc_cookie_t
  343. **/
  344. typedef struct xcb_dri2_wait_msc_cookie_t {
  345. unsigned int sequence;
  346. } xcb_dri2_wait_msc_cookie_t;
  347. /** Opcode for xcb_dri2_wait_msc. */
  348. #define XCB_DRI2_WAIT_MSC 10
  349. /**
  350. * @brief xcb_dri2_wait_msc_request_t
  351. **/
  352. typedef struct xcb_dri2_wait_msc_request_t {
  353. uint8_t major_opcode;
  354. uint8_t minor_opcode;
  355. uint16_t length;
  356. xcb_drawable_t drawable;
  357. uint32_t target_msc_hi;
  358. uint32_t target_msc_lo;
  359. uint32_t divisor_hi;
  360. uint32_t divisor_lo;
  361. uint32_t remainder_hi;
  362. uint32_t remainder_lo;
  363. } xcb_dri2_wait_msc_request_t;
  364. /**
  365. * @brief xcb_dri2_wait_msc_reply_t
  366. **/
  367. typedef struct xcb_dri2_wait_msc_reply_t {
  368. uint8_t response_type;
  369. uint8_t pad0;
  370. uint16_t sequence;
  371. uint32_t length;
  372. uint32_t ust_hi;
  373. uint32_t ust_lo;
  374. uint32_t msc_hi;
  375. uint32_t msc_lo;
  376. uint32_t sbc_hi;
  377. uint32_t sbc_lo;
  378. } xcb_dri2_wait_msc_reply_t;
  379. /**
  380. * @brief xcb_dri2_wait_sbc_cookie_t
  381. **/
  382. typedef struct xcb_dri2_wait_sbc_cookie_t {
  383. unsigned int sequence;
  384. } xcb_dri2_wait_sbc_cookie_t;
  385. /** Opcode for xcb_dri2_wait_sbc. */
  386. #define XCB_DRI2_WAIT_SBC 11
  387. /**
  388. * @brief xcb_dri2_wait_sbc_request_t
  389. **/
  390. typedef struct xcb_dri2_wait_sbc_request_t {
  391. uint8_t major_opcode;
  392. uint8_t minor_opcode;
  393. uint16_t length;
  394. xcb_drawable_t drawable;
  395. uint32_t target_sbc_hi;
  396. uint32_t target_sbc_lo;
  397. } xcb_dri2_wait_sbc_request_t;
  398. /**
  399. * @brief xcb_dri2_wait_sbc_reply_t
  400. **/
  401. typedef struct xcb_dri2_wait_sbc_reply_t {
  402. uint8_t response_type;
  403. uint8_t pad0;
  404. uint16_t sequence;
  405. uint32_t length;
  406. uint32_t ust_hi;
  407. uint32_t ust_lo;
  408. uint32_t msc_hi;
  409. uint32_t msc_lo;
  410. uint32_t sbc_hi;
  411. uint32_t sbc_lo;
  412. } xcb_dri2_wait_sbc_reply_t;
  413. /** Opcode for xcb_dri2_swap_interval. */
  414. #define XCB_DRI2_SWAP_INTERVAL 12
  415. /**
  416. * @brief xcb_dri2_swap_interval_request_t
  417. **/
  418. typedef struct xcb_dri2_swap_interval_request_t {
  419. uint8_t major_opcode;
  420. uint8_t minor_opcode;
  421. uint16_t length;
  422. xcb_drawable_t drawable;
  423. uint32_t interval;
  424. } xcb_dri2_swap_interval_request_t;
  425. /**
  426. * @brief xcb_dri2_get_param_cookie_t
  427. **/
  428. typedef struct xcb_dri2_get_param_cookie_t {
  429. unsigned int sequence;
  430. } xcb_dri2_get_param_cookie_t;
  431. /** Opcode for xcb_dri2_get_param. */
  432. #define XCB_DRI2_GET_PARAM 13
  433. /**
  434. * @brief xcb_dri2_get_param_request_t
  435. **/
  436. typedef struct xcb_dri2_get_param_request_t {
  437. uint8_t major_opcode;
  438. uint8_t minor_opcode;
  439. uint16_t length;
  440. xcb_drawable_t drawable;
  441. uint32_t param;
  442. } xcb_dri2_get_param_request_t;
  443. /**
  444. * @brief xcb_dri2_get_param_reply_t
  445. **/
  446. typedef struct xcb_dri2_get_param_reply_t {
  447. uint8_t response_type;
  448. uint8_t is_param_recognized;
  449. uint16_t sequence;
  450. uint32_t length;
  451. uint32_t value_hi;
  452. uint32_t value_lo;
  453. } xcb_dri2_get_param_reply_t;
  454. /** Opcode for xcb_dri2_buffer_swap_complete. */
  455. #define XCB_DRI2_BUFFER_SWAP_COMPLETE 0
  456. /**
  457. * @brief xcb_dri2_buffer_swap_complete_event_t
  458. **/
  459. typedef struct xcb_dri2_buffer_swap_complete_event_t {
  460. uint8_t response_type;
  461. uint8_t pad0;
  462. uint16_t sequence;
  463. uint16_t event_type;
  464. uint8_t pad1[2];
  465. xcb_drawable_t drawable;
  466. uint32_t ust_hi;
  467. uint32_t ust_lo;
  468. uint32_t msc_hi;
  469. uint32_t msc_lo;
  470. uint32_t sbc;
  471. } xcb_dri2_buffer_swap_complete_event_t;
  472. /** Opcode for xcb_dri2_invalidate_buffers. */
  473. #define XCB_DRI2_INVALIDATE_BUFFERS 1
  474. /**
  475. * @brief xcb_dri2_invalidate_buffers_event_t
  476. **/
  477. typedef struct xcb_dri2_invalidate_buffers_event_t {
  478. uint8_t response_type;
  479. uint8_t pad0;
  480. uint16_t sequence;
  481. xcb_drawable_t drawable;
  482. } xcb_dri2_invalidate_buffers_event_t;
  483. /**
  484. * Get the next element of the iterator
  485. * @param i Pointer to a xcb_dri2_dri2_buffer_iterator_t
  486. *
  487. * Get the next element in the iterator. The member rem is
  488. * decreased by one. The member data points to the next
  489. * element. The member index is increased by sizeof(xcb_dri2_dri2_buffer_t)
  490. */
  491. void
  492. xcb_dri2_dri2_buffer_next (xcb_dri2_dri2_buffer_iterator_t *i);
  493. /**
  494. * Return the iterator pointing to the last element
  495. * @param i An xcb_dri2_dri2_buffer_iterator_t
  496. * @return The iterator pointing to the last element
  497. *
  498. * Set the current element in the iterator to the last element.
  499. * The member rem is set to 0. The member data points to the
  500. * last element.
  501. */
  502. xcb_generic_iterator_t
  503. xcb_dri2_dri2_buffer_end (xcb_dri2_dri2_buffer_iterator_t i);
  504. /**
  505. * Get the next element of the iterator
  506. * @param i Pointer to a xcb_dri2_attach_format_iterator_t
  507. *
  508. * Get the next element in the iterator. The member rem is
  509. * decreased by one. The member data points to the next
  510. * element. The member index is increased by sizeof(xcb_dri2_attach_format_t)
  511. */
  512. void
  513. xcb_dri2_attach_format_next (xcb_dri2_attach_format_iterator_t *i);
  514. /**
  515. * Return the iterator pointing to the last element
  516. * @param i An xcb_dri2_attach_format_iterator_t
  517. * @return The iterator pointing to the last element
  518. *
  519. * Set the current element in the iterator to the last element.
  520. * The member rem is set to 0. The member data points to the
  521. * last element.
  522. */
  523. xcb_generic_iterator_t
  524. xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i);
  525. /**
  526. *
  527. * @param c The connection
  528. * @return A cookie
  529. *
  530. * Delivers a request to the X server.
  531. *
  532. */
  533. xcb_dri2_query_version_cookie_t
  534. xcb_dri2_query_version (xcb_connection_t *c,
  535. uint32_t major_version,
  536. uint32_t minor_version);
  537. /**
  538. *
  539. * @param c The connection
  540. * @return A cookie
  541. *
  542. * Delivers a request to the X server.
  543. *
  544. * This form can be used only if the request will cause
  545. * a reply to be generated. Any returned error will be
  546. * placed in the event queue.
  547. */
  548. xcb_dri2_query_version_cookie_t
  549. xcb_dri2_query_version_unchecked (xcb_connection_t *c,
  550. uint32_t major_version,
  551. uint32_t minor_version);
  552. /**
  553. * Return the reply
  554. * @param c The connection
  555. * @param cookie The cookie
  556. * @param e The xcb_generic_error_t supplied
  557. *
  558. * Returns the reply of the request asked by
  559. *
  560. * The parameter @p e supplied to this function must be NULL if
  561. * xcb_dri2_query_version_unchecked(). is used.
  562. * Otherwise, it stores the error if any.
  563. *
  564. * The returned value must be freed by the caller using free().
  565. */
  566. xcb_dri2_query_version_reply_t *
  567. xcb_dri2_query_version_reply (xcb_connection_t *c,
  568. xcb_dri2_query_version_cookie_t cookie /**< */,
  569. xcb_generic_error_t **e);
  570. int
  571. xcb_dri2_connect_sizeof (const void *_buffer);
  572. /**
  573. *
  574. * @param c The connection
  575. * @return A cookie
  576. *
  577. * Delivers a request to the X server.
  578. *
  579. */
  580. xcb_dri2_connect_cookie_t
  581. xcb_dri2_connect (xcb_connection_t *c,
  582. xcb_window_t window,
  583. uint32_t driver_type);
  584. /**
  585. *
  586. * @param c The connection
  587. * @return A cookie
  588. *
  589. * Delivers a request to the X server.
  590. *
  591. * This form can be used only if the request will cause
  592. * a reply to be generated. Any returned error will be
  593. * placed in the event queue.
  594. */
  595. xcb_dri2_connect_cookie_t
  596. xcb_dri2_connect_unchecked (xcb_connection_t *c,
  597. xcb_window_t window,
  598. uint32_t driver_type);
  599. char *
  600. xcb_dri2_connect_driver_name (const xcb_dri2_connect_reply_t *R);
  601. int
  602. xcb_dri2_connect_driver_name_length (const xcb_dri2_connect_reply_t *R);
  603. xcb_generic_iterator_t
  604. xcb_dri2_connect_driver_name_end (const xcb_dri2_connect_reply_t *R);
  605. void *
  606. xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R);
  607. int
  608. xcb_dri2_connect_alignment_pad_length (const xcb_dri2_connect_reply_t *R);
  609. xcb_generic_iterator_t
  610. xcb_dri2_connect_alignment_pad_end (const xcb_dri2_connect_reply_t *R);
  611. char *
  612. xcb_dri2_connect_device_name (const xcb_dri2_connect_reply_t *R);
  613. int
  614. xcb_dri2_connect_device_name_length (const xcb_dri2_connect_reply_t *R);
  615. xcb_generic_iterator_t
  616. xcb_dri2_connect_device_name_end (const xcb_dri2_connect_reply_t *R);
  617. /**
  618. * Return the reply
  619. * @param c The connection
  620. * @param cookie The cookie
  621. * @param e The xcb_generic_error_t supplied
  622. *
  623. * Returns the reply of the request asked by
  624. *
  625. * The parameter @p e supplied to this function must be NULL if
  626. * xcb_dri2_connect_unchecked(). is used.
  627. * Otherwise, it stores the error if any.
  628. *
  629. * The returned value must be freed by the caller using free().
  630. */
  631. xcb_dri2_connect_reply_t *
  632. xcb_dri2_connect_reply (xcb_connection_t *c,
  633. xcb_dri2_connect_cookie_t cookie /**< */,
  634. xcb_generic_error_t **e);
  635. /**
  636. *
  637. * @param c The connection
  638. * @return A cookie
  639. *
  640. * Delivers a request to the X server.
  641. *
  642. */
  643. xcb_dri2_authenticate_cookie_t
  644. xcb_dri2_authenticate (xcb_connection_t *c,
  645. xcb_window_t window,
  646. uint32_t magic);
  647. /**
  648. *
  649. * @param c The connection
  650. * @return A cookie
  651. *
  652. * Delivers a request to the X server.
  653. *
  654. * This form can be used only if the request will cause
  655. * a reply to be generated. Any returned error will be
  656. * placed in the event queue.
  657. */
  658. xcb_dri2_authenticate_cookie_t
  659. xcb_dri2_authenticate_unchecked (xcb_connection_t *c,
  660. xcb_window_t window,
  661. uint32_t magic);
  662. /**
  663. * Return the reply
  664. * @param c The connection
  665. * @param cookie The cookie
  666. * @param e The xcb_generic_error_t supplied
  667. *
  668. * Returns the reply of the request asked by
  669. *
  670. * The parameter @p e supplied to this function must be NULL if
  671. * xcb_dri2_authenticate_unchecked(). is used.
  672. * Otherwise, it stores the error if any.
  673. *
  674. * The returned value must be freed by the caller using free().
  675. */
  676. xcb_dri2_authenticate_reply_t *
  677. xcb_dri2_authenticate_reply (xcb_connection_t *c,
  678. xcb_dri2_authenticate_cookie_t cookie /**< */,
  679. xcb_generic_error_t **e);
  680. /**
  681. *
  682. * @param c The connection
  683. * @return A cookie
  684. *
  685. * Delivers a request to the X server.
  686. *
  687. * This form can be used only if the request will not cause
  688. * a reply to be generated. Any returned error will be
  689. * saved for handling by xcb_request_check().
  690. */
  691. xcb_void_cookie_t
  692. xcb_dri2_create_drawable_checked (xcb_connection_t *c,
  693. xcb_drawable_t drawable);
  694. /**
  695. *
  696. * @param c The connection
  697. * @return A cookie
  698. *
  699. * Delivers a request to the X server.
  700. *
  701. */
  702. xcb_void_cookie_t
  703. xcb_dri2_create_drawable (xcb_connection_t *c,
  704. xcb_drawable_t drawable);
  705. /**
  706. *
  707. * @param c The connection
  708. * @return A cookie
  709. *
  710. * Delivers a request to the X server.
  711. *
  712. * This form can be used only if the request will not cause
  713. * a reply to be generated. Any returned error will be
  714. * saved for handling by xcb_request_check().
  715. */
  716. xcb_void_cookie_t
  717. xcb_dri2_destroy_drawable_checked (xcb_connection_t *c,
  718. xcb_drawable_t drawable);
  719. /**
  720. *
  721. * @param c The connection
  722. * @return A cookie
  723. *
  724. * Delivers a request to the X server.
  725. *
  726. */
  727. xcb_void_cookie_t
  728. xcb_dri2_destroy_drawable (xcb_connection_t *c,
  729. xcb_drawable_t drawable);
  730. int
  731. xcb_dri2_get_buffers_sizeof (const void *_buffer,
  732. uint32_t attachments_len);
  733. /**
  734. *
  735. * @param c The connection
  736. * @return A cookie
  737. *
  738. * Delivers a request to the X server.
  739. *
  740. */
  741. xcb_dri2_get_buffers_cookie_t
  742. xcb_dri2_get_buffers (xcb_connection_t *c,
  743. xcb_drawable_t drawable,
  744. uint32_t count,
  745. uint32_t attachments_len,
  746. const uint32_t *attachments);
  747. /**
  748. *
  749. * @param c The connection
  750. * @return A cookie
  751. *
  752. * Delivers a request to the X server.
  753. *
  754. * This form can be used only if the request will cause
  755. * a reply to be generated. Any returned error will be
  756. * placed in the event queue.
  757. */
  758. xcb_dri2_get_buffers_cookie_t
  759. xcb_dri2_get_buffers_unchecked (xcb_connection_t *c,
  760. xcb_drawable_t drawable,
  761. uint32_t count,
  762. uint32_t attachments_len,
  763. const uint32_t *attachments);
  764. xcb_dri2_dri2_buffer_t *
  765. xcb_dri2_get_buffers_buffers (const xcb_dri2_get_buffers_reply_t *R);
  766. int
  767. xcb_dri2_get_buffers_buffers_length (const xcb_dri2_get_buffers_reply_t *R);
  768. xcb_dri2_dri2_buffer_iterator_t
  769. xcb_dri2_get_buffers_buffers_iterator (const xcb_dri2_get_buffers_reply_t *R);
  770. /**
  771. * Return the reply
  772. * @param c The connection
  773. * @param cookie The cookie
  774. * @param e The xcb_generic_error_t supplied
  775. *
  776. * Returns the reply of the request asked by
  777. *
  778. * The parameter @p e supplied to this function must be NULL if
  779. * xcb_dri2_get_buffers_unchecked(). is used.
  780. * Otherwise, it stores the error if any.
  781. *
  782. * The returned value must be freed by the caller using free().
  783. */
  784. xcb_dri2_get_buffers_reply_t *
  785. xcb_dri2_get_buffers_reply (xcb_connection_t *c,
  786. xcb_dri2_get_buffers_cookie_t cookie /**< */,
  787. xcb_generic_error_t **e);
  788. /**
  789. *
  790. * @param c The connection
  791. * @return A cookie
  792. *
  793. * Delivers a request to the X server.
  794. *
  795. */
  796. xcb_dri2_copy_region_cookie_t
  797. xcb_dri2_copy_region (xcb_connection_t *c,
  798. xcb_drawable_t drawable,
  799. uint32_t region,
  800. uint32_t dest,
  801. uint32_t src);
  802. /**
  803. *
  804. * @param c The connection
  805. * @return A cookie
  806. *
  807. * Delivers a request to the X server.
  808. *
  809. * This form can be used only if the request will cause
  810. * a reply to be generated. Any returned error will be
  811. * placed in the event queue.
  812. */
  813. xcb_dri2_copy_region_cookie_t
  814. xcb_dri2_copy_region_unchecked (xcb_connection_t *c,
  815. xcb_drawable_t drawable,
  816. uint32_t region,
  817. uint32_t dest,
  818. uint32_t src);
  819. /**
  820. * Return the reply
  821. * @param c The connection
  822. * @param cookie The cookie
  823. * @param e The xcb_generic_error_t supplied
  824. *
  825. * Returns the reply of the request asked by
  826. *
  827. * The parameter @p e supplied to this function must be NULL if
  828. * xcb_dri2_copy_region_unchecked(). is used.
  829. * Otherwise, it stores the error if any.
  830. *
  831. * The returned value must be freed by the caller using free().
  832. */
  833. xcb_dri2_copy_region_reply_t *
  834. xcb_dri2_copy_region_reply (xcb_connection_t *c,
  835. xcb_dri2_copy_region_cookie_t cookie /**< */,
  836. xcb_generic_error_t **e);
  837. int
  838. xcb_dri2_get_buffers_with_format_sizeof (const void *_buffer,
  839. uint32_t attachments_len);
  840. /**
  841. *
  842. * @param c The connection
  843. * @return A cookie
  844. *
  845. * Delivers a request to the X server.
  846. *
  847. */
  848. xcb_dri2_get_buffers_with_format_cookie_t
  849. xcb_dri2_get_buffers_with_format (xcb_connection_t *c,
  850. xcb_drawable_t drawable,
  851. uint32_t count,
  852. uint32_t attachments_len,
  853. const xcb_dri2_attach_format_t *attachments);
  854. /**
  855. *
  856. * @param c The connection
  857. * @return A cookie
  858. *
  859. * Delivers a request to the X server.
  860. *
  861. * This form can be used only if the request will cause
  862. * a reply to be generated. Any returned error will be
  863. * placed in the event queue.
  864. */
  865. xcb_dri2_get_buffers_with_format_cookie_t
  866. xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t *c,
  867. xcb_drawable_t drawable,
  868. uint32_t count,
  869. uint32_t attachments_len,
  870. const xcb_dri2_attach_format_t *attachments);
  871. xcb_dri2_dri2_buffer_t *
  872. xcb_dri2_get_buffers_with_format_buffers (const xcb_dri2_get_buffers_with_format_reply_t *R);
  873. int
  874. xcb_dri2_get_buffers_with_format_buffers_length (const xcb_dri2_get_buffers_with_format_reply_t *R);
  875. xcb_dri2_dri2_buffer_iterator_t
  876. xcb_dri2_get_buffers_with_format_buffers_iterator (const xcb_dri2_get_buffers_with_format_reply_t *R);
  877. /**
  878. * Return the reply
  879. * @param c The connection
  880. * @param cookie The cookie
  881. * @param e The xcb_generic_error_t supplied
  882. *
  883. * Returns the reply of the request asked by
  884. *
  885. * The parameter @p e supplied to this function must be NULL if
  886. * xcb_dri2_get_buffers_with_format_unchecked(). is used.
  887. * Otherwise, it stores the error if any.
  888. *
  889. * The returned value must be freed by the caller using free().
  890. */
  891. xcb_dri2_get_buffers_with_format_reply_t *
  892. xcb_dri2_get_buffers_with_format_reply (xcb_connection_t *c,
  893. xcb_dri2_get_buffers_with_format_cookie_t cookie /**< */,
  894. xcb_generic_error_t **e);
  895. /**
  896. *
  897. * @param c The connection
  898. * @return A cookie
  899. *
  900. * Delivers a request to the X server.
  901. *
  902. */
  903. xcb_dri2_swap_buffers_cookie_t
  904. xcb_dri2_swap_buffers (xcb_connection_t *c,
  905. xcb_drawable_t drawable,
  906. uint32_t target_msc_hi,
  907. uint32_t target_msc_lo,
  908. uint32_t divisor_hi,
  909. uint32_t divisor_lo,
  910. uint32_t remainder_hi,
  911. uint32_t remainder_lo);
  912. /**
  913. *
  914. * @param c The connection
  915. * @return A cookie
  916. *
  917. * Delivers a request to the X server.
  918. *
  919. * This form can be used only if the request will cause
  920. * a reply to be generated. Any returned error will be
  921. * placed in the event queue.
  922. */
  923. xcb_dri2_swap_buffers_cookie_t
  924. xcb_dri2_swap_buffers_unchecked (xcb_connection_t *c,
  925. xcb_drawable_t drawable,
  926. uint32_t target_msc_hi,
  927. uint32_t target_msc_lo,
  928. uint32_t divisor_hi,
  929. uint32_t divisor_lo,
  930. uint32_t remainder_hi,
  931. uint32_t remainder_lo);
  932. /**
  933. * Return the reply
  934. * @param c The connection
  935. * @param cookie The cookie
  936. * @param e The xcb_generic_error_t supplied
  937. *
  938. * Returns the reply of the request asked by
  939. *
  940. * The parameter @p e supplied to this function must be NULL if
  941. * xcb_dri2_swap_buffers_unchecked(). is used.
  942. * Otherwise, it stores the error if any.
  943. *
  944. * The returned value must be freed by the caller using free().
  945. */
  946. xcb_dri2_swap_buffers_reply_t *
  947. xcb_dri2_swap_buffers_reply (xcb_connection_t *c,
  948. xcb_dri2_swap_buffers_cookie_t cookie /**< */,
  949. xcb_generic_error_t **e);
  950. /**
  951. *
  952. * @param c The connection
  953. * @return A cookie
  954. *
  955. * Delivers a request to the X server.
  956. *
  957. */
  958. xcb_dri2_get_msc_cookie_t
  959. xcb_dri2_get_msc (xcb_connection_t *c,
  960. xcb_drawable_t drawable);
  961. /**
  962. *
  963. * @param c The connection
  964. * @return A cookie
  965. *
  966. * Delivers a request to the X server.
  967. *
  968. * This form can be used only if the request will cause
  969. * a reply to be generated. Any returned error will be
  970. * placed in the event queue.
  971. */
  972. xcb_dri2_get_msc_cookie_t
  973. xcb_dri2_get_msc_unchecked (xcb_connection_t *c,
  974. xcb_drawable_t drawable);
  975. /**
  976. * Return the reply
  977. * @param c The connection
  978. * @param cookie The cookie
  979. * @param e The xcb_generic_error_t supplied
  980. *
  981. * Returns the reply of the request asked by
  982. *
  983. * The parameter @p e supplied to this function must be NULL if
  984. * xcb_dri2_get_msc_unchecked(). is used.
  985. * Otherwise, it stores the error if any.
  986. *
  987. * The returned value must be freed by the caller using free().
  988. */
  989. xcb_dri2_get_msc_reply_t *
  990. xcb_dri2_get_msc_reply (xcb_connection_t *c,
  991. xcb_dri2_get_msc_cookie_t cookie /**< */,
  992. xcb_generic_error_t **e);
  993. /**
  994. *
  995. * @param c The connection
  996. * @return A cookie
  997. *
  998. * Delivers a request to the X server.
  999. *
  1000. */
  1001. xcb_dri2_wait_msc_cookie_t
  1002. xcb_dri2_wait_msc (xcb_connection_t *c,
  1003. xcb_drawable_t drawable,
  1004. uint32_t target_msc_hi,
  1005. uint32_t target_msc_lo,
  1006. uint32_t divisor_hi,
  1007. uint32_t divisor_lo,
  1008. uint32_t remainder_hi,
  1009. uint32_t remainder_lo);
  1010. /**
  1011. *
  1012. * @param c The connection
  1013. * @return A cookie
  1014. *
  1015. * Delivers a request to the X server.
  1016. *
  1017. * This form can be used only if the request will cause
  1018. * a reply to be generated. Any returned error will be
  1019. * placed in the event queue.
  1020. */
  1021. xcb_dri2_wait_msc_cookie_t
  1022. xcb_dri2_wait_msc_unchecked (xcb_connection_t *c,
  1023. xcb_drawable_t drawable,
  1024. uint32_t target_msc_hi,
  1025. uint32_t target_msc_lo,
  1026. uint32_t divisor_hi,
  1027. uint32_t divisor_lo,
  1028. uint32_t remainder_hi,
  1029. uint32_t remainder_lo);
  1030. /**
  1031. * Return the reply
  1032. * @param c The connection
  1033. * @param cookie The cookie
  1034. * @param e The xcb_generic_error_t supplied
  1035. *
  1036. * Returns the reply of the request asked by
  1037. *
  1038. * The parameter @p e supplied to this function must be NULL if
  1039. * xcb_dri2_wait_msc_unchecked(). is used.
  1040. * Otherwise, it stores the error if any.
  1041. *
  1042. * The returned value must be freed by the caller using free().
  1043. */
  1044. xcb_dri2_wait_msc_reply_t *
  1045. xcb_dri2_wait_msc_reply (xcb_connection_t *c,
  1046. xcb_dri2_wait_msc_cookie_t cookie /**< */,
  1047. xcb_generic_error_t **e);
  1048. /**
  1049. *
  1050. * @param c The connection
  1051. * @return A cookie
  1052. *
  1053. * Delivers a request to the X server.
  1054. *
  1055. */
  1056. xcb_dri2_wait_sbc_cookie_t
  1057. xcb_dri2_wait_sbc (xcb_connection_t *c,
  1058. xcb_drawable_t drawable,
  1059. uint32_t target_sbc_hi,
  1060. uint32_t target_sbc_lo);
  1061. /**
  1062. *
  1063. * @param c The connection
  1064. * @return A cookie
  1065. *
  1066. * Delivers a request to the X server.
  1067. *
  1068. * This form can be used only if the request will cause
  1069. * a reply to be generated. Any returned error will be
  1070. * placed in the event queue.
  1071. */
  1072. xcb_dri2_wait_sbc_cookie_t
  1073. xcb_dri2_wait_sbc_unchecked (xcb_connection_t *c,
  1074. xcb_drawable_t drawable,
  1075. uint32_t target_sbc_hi,
  1076. uint32_t target_sbc_lo);
  1077. /**
  1078. * Return the reply
  1079. * @param c The connection
  1080. * @param cookie The cookie
  1081. * @param e The xcb_generic_error_t supplied
  1082. *
  1083. * Returns the reply of the request asked by
  1084. *
  1085. * The parameter @p e supplied to this function must be NULL if
  1086. * xcb_dri2_wait_sbc_unchecked(). is used.
  1087. * Otherwise, it stores the error if any.
  1088. *
  1089. * The returned value must be freed by the caller using free().
  1090. */
  1091. xcb_dri2_wait_sbc_reply_t *
  1092. xcb_dri2_wait_sbc_reply (xcb_connection_t *c,
  1093. xcb_dri2_wait_sbc_cookie_t cookie /**< */,
  1094. xcb_generic_error_t **e);
  1095. /**
  1096. *
  1097. * @param c The connection
  1098. * @return A cookie
  1099. *
  1100. * Delivers a request to the X server.
  1101. *
  1102. * This form can be used only if the request will not cause
  1103. * a reply to be generated. Any returned error will be
  1104. * saved for handling by xcb_request_check().
  1105. */
  1106. xcb_void_cookie_t
  1107. xcb_dri2_swap_interval_checked (xcb_connection_t *c,
  1108. xcb_drawable_t drawable,
  1109. uint32_t interval);
  1110. /**
  1111. *
  1112. * @param c The connection
  1113. * @return A cookie
  1114. *
  1115. * Delivers a request to the X server.
  1116. *
  1117. */
  1118. xcb_void_cookie_t
  1119. xcb_dri2_swap_interval (xcb_connection_t *c,
  1120. xcb_drawable_t drawable,
  1121. uint32_t interval);
  1122. /**
  1123. *
  1124. * @param c The connection
  1125. * @return A cookie
  1126. *
  1127. * Delivers a request to the X server.
  1128. *
  1129. */
  1130. xcb_dri2_get_param_cookie_t
  1131. xcb_dri2_get_param (xcb_connection_t *c,
  1132. xcb_drawable_t drawable,
  1133. uint32_t param);
  1134. /**
  1135. *
  1136. * @param c The connection
  1137. * @return A cookie
  1138. *
  1139. * Delivers a request to the X server.
  1140. *
  1141. * This form can be used only if the request will cause
  1142. * a reply to be generated. Any returned error will be
  1143. * placed in the event queue.
  1144. */
  1145. xcb_dri2_get_param_cookie_t
  1146. xcb_dri2_get_param_unchecked (xcb_connection_t *c,
  1147. xcb_drawable_t drawable,
  1148. uint32_t param);
  1149. /**
  1150. * Return the reply
  1151. * @param c The connection
  1152. * @param cookie The cookie
  1153. * @param e The xcb_generic_error_t supplied
  1154. *
  1155. * Returns the reply of the request asked by
  1156. *
  1157. * The parameter @p e supplied to this function must be NULL if
  1158. * xcb_dri2_get_param_unchecked(). is used.
  1159. * Otherwise, it stores the error if any.
  1160. *
  1161. * The returned value must be freed by the caller using free().
  1162. */
  1163. xcb_dri2_get_param_reply_t *
  1164. xcb_dri2_get_param_reply (xcb_connection_t *c,
  1165. xcb_dri2_get_param_cookie_t cookie /**< */,
  1166. xcb_generic_error_t **e);
  1167. #ifdef __cplusplus
  1168. }
  1169. #endif
  1170. #endif
  1171. /**
  1172. * @}
  1173. */