sync.h 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628
  1. /*
  2. * This file generated automatically from sync.xml by c_client.py.
  3. * Edit at your peril.
  4. */
  5. /**
  6. * @defgroup XCB_Sync_API XCB Sync API
  7. * @brief Sync XCB Protocol Implementation.
  8. * @{
  9. **/
  10. #ifndef __SYNC_H
  11. #define __SYNC_H
  12. #include "xcb.h"
  13. #include "xproto.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. #define XCB_SYNC_MAJOR_VERSION 3
  18. #define XCB_SYNC_MINOR_VERSION 1
  19. extern xcb_extension_t xcb_sync_id;
  20. typedef uint32_t xcb_sync_alarm_t;
  21. /**
  22. * @brief xcb_sync_alarm_iterator_t
  23. **/
  24. typedef struct xcb_sync_alarm_iterator_t {
  25. xcb_sync_alarm_t *data;
  26. int rem;
  27. int index;
  28. } xcb_sync_alarm_iterator_t;
  29. typedef enum xcb_sync_alarmstate_t {
  30. XCB_SYNC_ALARMSTATE_ACTIVE = 0,
  31. XCB_SYNC_ALARMSTATE_INACTIVE = 1,
  32. XCB_SYNC_ALARMSTATE_DESTROYED = 2
  33. } xcb_sync_alarmstate_t;
  34. typedef uint32_t xcb_sync_counter_t;
  35. /**
  36. * @brief xcb_sync_counter_iterator_t
  37. **/
  38. typedef struct xcb_sync_counter_iterator_t {
  39. xcb_sync_counter_t *data;
  40. int rem;
  41. int index;
  42. } xcb_sync_counter_iterator_t;
  43. typedef uint32_t xcb_sync_fence_t;
  44. /**
  45. * @brief xcb_sync_fence_iterator_t
  46. **/
  47. typedef struct xcb_sync_fence_iterator_t {
  48. xcb_sync_fence_t *data;
  49. int rem;
  50. int index;
  51. } xcb_sync_fence_iterator_t;
  52. typedef enum xcb_sync_testtype_t {
  53. XCB_SYNC_TESTTYPE_POSITIVE_TRANSITION = 0,
  54. XCB_SYNC_TESTTYPE_NEGATIVE_TRANSITION = 1,
  55. XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON = 2,
  56. XCB_SYNC_TESTTYPE_NEGATIVE_COMPARISON = 3
  57. } xcb_sync_testtype_t;
  58. typedef enum xcb_sync_valuetype_t {
  59. XCB_SYNC_VALUETYPE_ABSOLUTE = 0,
  60. XCB_SYNC_VALUETYPE_RELATIVE = 1
  61. } xcb_sync_valuetype_t;
  62. typedef enum xcb_sync_ca_t {
  63. XCB_SYNC_CA_COUNTER = 1,
  64. XCB_SYNC_CA_VALUE_TYPE = 2,
  65. XCB_SYNC_CA_VALUE = 4,
  66. XCB_SYNC_CA_TEST_TYPE = 8,
  67. XCB_SYNC_CA_DELTA = 16,
  68. XCB_SYNC_CA_EVENTS = 32
  69. } xcb_sync_ca_t;
  70. /**
  71. * @brief xcb_sync_int64_t
  72. **/
  73. typedef struct xcb_sync_int64_t {
  74. int32_t hi;
  75. uint32_t lo;
  76. } xcb_sync_int64_t;
  77. /**
  78. * @brief xcb_sync_int64_iterator_t
  79. **/
  80. typedef struct xcb_sync_int64_iterator_t {
  81. xcb_sync_int64_t *data;
  82. int rem;
  83. int index;
  84. } xcb_sync_int64_iterator_t;
  85. /**
  86. * @brief xcb_sync_systemcounter_t
  87. **/
  88. typedef struct xcb_sync_systemcounter_t {
  89. xcb_sync_counter_t counter;
  90. xcb_sync_int64_t resolution;
  91. uint16_t name_len;
  92. } xcb_sync_systemcounter_t;
  93. /**
  94. * @brief xcb_sync_systemcounter_iterator_t
  95. **/
  96. typedef struct xcb_sync_systemcounter_iterator_t {
  97. xcb_sync_systemcounter_t *data;
  98. int rem;
  99. int index;
  100. } xcb_sync_systemcounter_iterator_t;
  101. /**
  102. * @brief xcb_sync_trigger_t
  103. **/
  104. typedef struct xcb_sync_trigger_t {
  105. xcb_sync_counter_t counter;
  106. uint32_t wait_type;
  107. xcb_sync_int64_t wait_value;
  108. uint32_t test_type;
  109. } xcb_sync_trigger_t;
  110. /**
  111. * @brief xcb_sync_trigger_iterator_t
  112. **/
  113. typedef struct xcb_sync_trigger_iterator_t {
  114. xcb_sync_trigger_t *data;
  115. int rem;
  116. int index;
  117. } xcb_sync_trigger_iterator_t;
  118. /**
  119. * @brief xcb_sync_waitcondition_t
  120. **/
  121. typedef struct xcb_sync_waitcondition_t {
  122. xcb_sync_trigger_t trigger;
  123. xcb_sync_int64_t event_threshold;
  124. } xcb_sync_waitcondition_t;
  125. /**
  126. * @brief xcb_sync_waitcondition_iterator_t
  127. **/
  128. typedef struct xcb_sync_waitcondition_iterator_t {
  129. xcb_sync_waitcondition_t *data;
  130. int rem;
  131. int index;
  132. } xcb_sync_waitcondition_iterator_t;
  133. /** Opcode for xcb_sync_counter. */
  134. #define XCB_SYNC_COUNTER 0
  135. /**
  136. * @brief xcb_sync_counter_error_t
  137. **/
  138. typedef struct xcb_sync_counter_error_t {
  139. uint8_t response_type;
  140. uint8_t error_code;
  141. uint16_t sequence;
  142. uint32_t bad_counter;
  143. uint16_t minor_opcode;
  144. uint8_t major_opcode;
  145. } xcb_sync_counter_error_t;
  146. /** Opcode for xcb_sync_alarm. */
  147. #define XCB_SYNC_ALARM 1
  148. /**
  149. * @brief xcb_sync_alarm_error_t
  150. **/
  151. typedef struct xcb_sync_alarm_error_t {
  152. uint8_t response_type;
  153. uint8_t error_code;
  154. uint16_t sequence;
  155. uint32_t bad_alarm;
  156. uint16_t minor_opcode;
  157. uint8_t major_opcode;
  158. } xcb_sync_alarm_error_t;
  159. /**
  160. * @brief xcb_sync_initialize_cookie_t
  161. **/
  162. typedef struct xcb_sync_initialize_cookie_t {
  163. unsigned int sequence;
  164. } xcb_sync_initialize_cookie_t;
  165. /** Opcode for xcb_sync_initialize. */
  166. #define XCB_SYNC_INITIALIZE 0
  167. /**
  168. * @brief xcb_sync_initialize_request_t
  169. **/
  170. typedef struct xcb_sync_initialize_request_t {
  171. uint8_t major_opcode;
  172. uint8_t minor_opcode;
  173. uint16_t length;
  174. uint8_t desired_major_version;
  175. uint8_t desired_minor_version;
  176. } xcb_sync_initialize_request_t;
  177. /**
  178. * @brief xcb_sync_initialize_reply_t
  179. **/
  180. typedef struct xcb_sync_initialize_reply_t {
  181. uint8_t response_type;
  182. uint8_t pad0;
  183. uint16_t sequence;
  184. uint32_t length;
  185. uint8_t major_version;
  186. uint8_t minor_version;
  187. uint8_t pad1[22];
  188. } xcb_sync_initialize_reply_t;
  189. /**
  190. * @brief xcb_sync_list_system_counters_cookie_t
  191. **/
  192. typedef struct xcb_sync_list_system_counters_cookie_t {
  193. unsigned int sequence;
  194. } xcb_sync_list_system_counters_cookie_t;
  195. /** Opcode for xcb_sync_list_system_counters. */
  196. #define XCB_SYNC_LIST_SYSTEM_COUNTERS 1
  197. /**
  198. * @brief xcb_sync_list_system_counters_request_t
  199. **/
  200. typedef struct xcb_sync_list_system_counters_request_t {
  201. uint8_t major_opcode;
  202. uint8_t minor_opcode;
  203. uint16_t length;
  204. } xcb_sync_list_system_counters_request_t;
  205. /**
  206. * @brief xcb_sync_list_system_counters_reply_t
  207. **/
  208. typedef struct xcb_sync_list_system_counters_reply_t {
  209. uint8_t response_type;
  210. uint8_t pad0;
  211. uint16_t sequence;
  212. uint32_t length;
  213. uint32_t counters_len;
  214. uint8_t pad1[20];
  215. } xcb_sync_list_system_counters_reply_t;
  216. /** Opcode for xcb_sync_create_counter. */
  217. #define XCB_SYNC_CREATE_COUNTER 2
  218. /**
  219. * @brief xcb_sync_create_counter_request_t
  220. **/
  221. typedef struct xcb_sync_create_counter_request_t {
  222. uint8_t major_opcode;
  223. uint8_t minor_opcode;
  224. uint16_t length;
  225. xcb_sync_counter_t id;
  226. xcb_sync_int64_t initial_value;
  227. } xcb_sync_create_counter_request_t;
  228. /** Opcode for xcb_sync_destroy_counter. */
  229. #define XCB_SYNC_DESTROY_COUNTER 6
  230. /**
  231. * @brief xcb_sync_destroy_counter_request_t
  232. **/
  233. typedef struct xcb_sync_destroy_counter_request_t {
  234. uint8_t major_opcode;
  235. uint8_t minor_opcode;
  236. uint16_t length;
  237. xcb_sync_counter_t counter;
  238. } xcb_sync_destroy_counter_request_t;
  239. /**
  240. * @brief xcb_sync_query_counter_cookie_t
  241. **/
  242. typedef struct xcb_sync_query_counter_cookie_t {
  243. unsigned int sequence;
  244. } xcb_sync_query_counter_cookie_t;
  245. /** Opcode for xcb_sync_query_counter. */
  246. #define XCB_SYNC_QUERY_COUNTER 5
  247. /**
  248. * @brief xcb_sync_query_counter_request_t
  249. **/
  250. typedef struct xcb_sync_query_counter_request_t {
  251. uint8_t major_opcode;
  252. uint8_t minor_opcode;
  253. uint16_t length;
  254. xcb_sync_counter_t counter;
  255. } xcb_sync_query_counter_request_t;
  256. /**
  257. * @brief xcb_sync_query_counter_reply_t
  258. **/
  259. typedef struct xcb_sync_query_counter_reply_t {
  260. uint8_t response_type;
  261. uint8_t pad0;
  262. uint16_t sequence;
  263. uint32_t length;
  264. xcb_sync_int64_t counter_value;
  265. } xcb_sync_query_counter_reply_t;
  266. /** Opcode for xcb_sync_await. */
  267. #define XCB_SYNC_AWAIT 7
  268. /**
  269. * @brief xcb_sync_await_request_t
  270. **/
  271. typedef struct xcb_sync_await_request_t {
  272. uint8_t major_opcode;
  273. uint8_t minor_opcode;
  274. uint16_t length;
  275. } xcb_sync_await_request_t;
  276. /** Opcode for xcb_sync_change_counter. */
  277. #define XCB_SYNC_CHANGE_COUNTER 4
  278. /**
  279. * @brief xcb_sync_change_counter_request_t
  280. **/
  281. typedef struct xcb_sync_change_counter_request_t {
  282. uint8_t major_opcode;
  283. uint8_t minor_opcode;
  284. uint16_t length;
  285. xcb_sync_counter_t counter;
  286. xcb_sync_int64_t amount;
  287. } xcb_sync_change_counter_request_t;
  288. /** Opcode for xcb_sync_set_counter. */
  289. #define XCB_SYNC_SET_COUNTER 3
  290. /**
  291. * @brief xcb_sync_set_counter_request_t
  292. **/
  293. typedef struct xcb_sync_set_counter_request_t {
  294. uint8_t major_opcode;
  295. uint8_t minor_opcode;
  296. uint16_t length;
  297. xcb_sync_counter_t counter;
  298. xcb_sync_int64_t value;
  299. } xcb_sync_set_counter_request_t;
  300. /**
  301. * @brief xcb_sync_create_alarm_value_list_t
  302. **/
  303. typedef struct xcb_sync_create_alarm_value_list_t {
  304. xcb_sync_counter_t counter;
  305. uint32_t valueType;
  306. xcb_sync_int64_t value;
  307. uint32_t testType;
  308. xcb_sync_int64_t delta;
  309. uint32_t events;
  310. } xcb_sync_create_alarm_value_list_t;
  311. /** Opcode for xcb_sync_create_alarm. */
  312. #define XCB_SYNC_CREATE_ALARM 8
  313. /**
  314. * @brief xcb_sync_create_alarm_request_t
  315. **/
  316. typedef struct xcb_sync_create_alarm_request_t {
  317. uint8_t major_opcode;
  318. uint8_t minor_opcode;
  319. uint16_t length;
  320. xcb_sync_alarm_t id;
  321. uint32_t value_mask;
  322. } xcb_sync_create_alarm_request_t;
  323. /**
  324. * @brief xcb_sync_change_alarm_value_list_t
  325. **/
  326. typedef struct xcb_sync_change_alarm_value_list_t {
  327. xcb_sync_counter_t counter;
  328. uint32_t valueType;
  329. xcb_sync_int64_t value;
  330. uint32_t testType;
  331. xcb_sync_int64_t delta;
  332. uint32_t events;
  333. } xcb_sync_change_alarm_value_list_t;
  334. /** Opcode for xcb_sync_change_alarm. */
  335. #define XCB_SYNC_CHANGE_ALARM 9
  336. /**
  337. * @brief xcb_sync_change_alarm_request_t
  338. **/
  339. typedef struct xcb_sync_change_alarm_request_t {
  340. uint8_t major_opcode;
  341. uint8_t minor_opcode;
  342. uint16_t length;
  343. xcb_sync_alarm_t id;
  344. uint32_t value_mask;
  345. } xcb_sync_change_alarm_request_t;
  346. /** Opcode for xcb_sync_destroy_alarm. */
  347. #define XCB_SYNC_DESTROY_ALARM 11
  348. /**
  349. * @brief xcb_sync_destroy_alarm_request_t
  350. **/
  351. typedef struct xcb_sync_destroy_alarm_request_t {
  352. uint8_t major_opcode;
  353. uint8_t minor_opcode;
  354. uint16_t length;
  355. xcb_sync_alarm_t alarm;
  356. } xcb_sync_destroy_alarm_request_t;
  357. /**
  358. * @brief xcb_sync_query_alarm_cookie_t
  359. **/
  360. typedef struct xcb_sync_query_alarm_cookie_t {
  361. unsigned int sequence;
  362. } xcb_sync_query_alarm_cookie_t;
  363. /** Opcode for xcb_sync_query_alarm. */
  364. #define XCB_SYNC_QUERY_ALARM 10
  365. /**
  366. * @brief xcb_sync_query_alarm_request_t
  367. **/
  368. typedef struct xcb_sync_query_alarm_request_t {
  369. uint8_t major_opcode;
  370. uint8_t minor_opcode;
  371. uint16_t length;
  372. xcb_sync_alarm_t alarm;
  373. } xcb_sync_query_alarm_request_t;
  374. /**
  375. * @brief xcb_sync_query_alarm_reply_t
  376. **/
  377. typedef struct xcb_sync_query_alarm_reply_t {
  378. uint8_t response_type;
  379. uint8_t pad0;
  380. uint16_t sequence;
  381. uint32_t length;
  382. xcb_sync_trigger_t trigger;
  383. xcb_sync_int64_t delta;
  384. uint8_t events;
  385. uint8_t state;
  386. uint8_t pad1[2];
  387. } xcb_sync_query_alarm_reply_t;
  388. /** Opcode for xcb_sync_set_priority. */
  389. #define XCB_SYNC_SET_PRIORITY 12
  390. /**
  391. * @brief xcb_sync_set_priority_request_t
  392. **/
  393. typedef struct xcb_sync_set_priority_request_t {
  394. uint8_t major_opcode;
  395. uint8_t minor_opcode;
  396. uint16_t length;
  397. uint32_t id;
  398. int32_t priority;
  399. } xcb_sync_set_priority_request_t;
  400. /**
  401. * @brief xcb_sync_get_priority_cookie_t
  402. **/
  403. typedef struct xcb_sync_get_priority_cookie_t {
  404. unsigned int sequence;
  405. } xcb_sync_get_priority_cookie_t;
  406. /** Opcode for xcb_sync_get_priority. */
  407. #define XCB_SYNC_GET_PRIORITY 13
  408. /**
  409. * @brief xcb_sync_get_priority_request_t
  410. **/
  411. typedef struct xcb_sync_get_priority_request_t {
  412. uint8_t major_opcode;
  413. uint8_t minor_opcode;
  414. uint16_t length;
  415. uint32_t id;
  416. } xcb_sync_get_priority_request_t;
  417. /**
  418. * @brief xcb_sync_get_priority_reply_t
  419. **/
  420. typedef struct xcb_sync_get_priority_reply_t {
  421. uint8_t response_type;
  422. uint8_t pad0;
  423. uint16_t sequence;
  424. uint32_t length;
  425. int32_t priority;
  426. } xcb_sync_get_priority_reply_t;
  427. /** Opcode for xcb_sync_create_fence. */
  428. #define XCB_SYNC_CREATE_FENCE 14
  429. /**
  430. * @brief xcb_sync_create_fence_request_t
  431. **/
  432. typedef struct xcb_sync_create_fence_request_t {
  433. uint8_t major_opcode;
  434. uint8_t minor_opcode;
  435. uint16_t length;
  436. xcb_drawable_t drawable;
  437. xcb_sync_fence_t fence;
  438. uint8_t initially_triggered;
  439. } xcb_sync_create_fence_request_t;
  440. /** Opcode for xcb_sync_trigger_fence. */
  441. #define XCB_SYNC_TRIGGER_FENCE 15
  442. /**
  443. * @brief xcb_sync_trigger_fence_request_t
  444. **/
  445. typedef struct xcb_sync_trigger_fence_request_t {
  446. uint8_t major_opcode;
  447. uint8_t minor_opcode;
  448. uint16_t length;
  449. xcb_sync_fence_t fence;
  450. } xcb_sync_trigger_fence_request_t;
  451. /** Opcode for xcb_sync_reset_fence. */
  452. #define XCB_SYNC_RESET_FENCE 16
  453. /**
  454. * @brief xcb_sync_reset_fence_request_t
  455. **/
  456. typedef struct xcb_sync_reset_fence_request_t {
  457. uint8_t major_opcode;
  458. uint8_t minor_opcode;
  459. uint16_t length;
  460. xcb_sync_fence_t fence;
  461. } xcb_sync_reset_fence_request_t;
  462. /** Opcode for xcb_sync_destroy_fence. */
  463. #define XCB_SYNC_DESTROY_FENCE 17
  464. /**
  465. * @brief xcb_sync_destroy_fence_request_t
  466. **/
  467. typedef struct xcb_sync_destroy_fence_request_t {
  468. uint8_t major_opcode;
  469. uint8_t minor_opcode;
  470. uint16_t length;
  471. xcb_sync_fence_t fence;
  472. } xcb_sync_destroy_fence_request_t;
  473. /**
  474. * @brief xcb_sync_query_fence_cookie_t
  475. **/
  476. typedef struct xcb_sync_query_fence_cookie_t {
  477. unsigned int sequence;
  478. } xcb_sync_query_fence_cookie_t;
  479. /** Opcode for xcb_sync_query_fence. */
  480. #define XCB_SYNC_QUERY_FENCE 18
  481. /**
  482. * @brief xcb_sync_query_fence_request_t
  483. **/
  484. typedef struct xcb_sync_query_fence_request_t {
  485. uint8_t major_opcode;
  486. uint8_t minor_opcode;
  487. uint16_t length;
  488. xcb_sync_fence_t fence;
  489. } xcb_sync_query_fence_request_t;
  490. /**
  491. * @brief xcb_sync_query_fence_reply_t
  492. **/
  493. typedef struct xcb_sync_query_fence_reply_t {
  494. uint8_t response_type;
  495. uint8_t pad0;
  496. uint16_t sequence;
  497. uint32_t length;
  498. uint8_t triggered;
  499. uint8_t pad1[23];
  500. } xcb_sync_query_fence_reply_t;
  501. /** Opcode for xcb_sync_await_fence. */
  502. #define XCB_SYNC_AWAIT_FENCE 19
  503. /**
  504. * @brief xcb_sync_await_fence_request_t
  505. **/
  506. typedef struct xcb_sync_await_fence_request_t {
  507. uint8_t major_opcode;
  508. uint8_t minor_opcode;
  509. uint16_t length;
  510. } xcb_sync_await_fence_request_t;
  511. /** Opcode for xcb_sync_counter_notify. */
  512. #define XCB_SYNC_COUNTER_NOTIFY 0
  513. /**
  514. * @brief xcb_sync_counter_notify_event_t
  515. **/
  516. typedef struct xcb_sync_counter_notify_event_t {
  517. uint8_t response_type;
  518. uint8_t kind;
  519. uint16_t sequence;
  520. xcb_sync_counter_t counter;
  521. xcb_sync_int64_t wait_value;
  522. xcb_sync_int64_t counter_value;
  523. xcb_timestamp_t timestamp;
  524. uint16_t count;
  525. uint8_t destroyed;
  526. uint8_t pad0;
  527. } xcb_sync_counter_notify_event_t;
  528. /** Opcode for xcb_sync_alarm_notify. */
  529. #define XCB_SYNC_ALARM_NOTIFY 1
  530. /**
  531. * @brief xcb_sync_alarm_notify_event_t
  532. **/
  533. typedef struct xcb_sync_alarm_notify_event_t {
  534. uint8_t response_type;
  535. uint8_t kind;
  536. uint16_t sequence;
  537. xcb_sync_alarm_t alarm;
  538. xcb_sync_int64_t counter_value;
  539. xcb_sync_int64_t alarm_value;
  540. xcb_timestamp_t timestamp;
  541. uint8_t state;
  542. uint8_t pad0[3];
  543. } xcb_sync_alarm_notify_event_t;
  544. /**
  545. * Get the next element of the iterator
  546. * @param i Pointer to a xcb_sync_alarm_iterator_t
  547. *
  548. * Get the next element in the iterator. The member rem is
  549. * decreased by one. The member data points to the next
  550. * element. The member index is increased by sizeof(xcb_sync_alarm_t)
  551. */
  552. void
  553. xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i);
  554. /**
  555. * Return the iterator pointing to the last element
  556. * @param i An xcb_sync_alarm_iterator_t
  557. * @return The iterator pointing to the last element
  558. *
  559. * Set the current element in the iterator to the last element.
  560. * The member rem is set to 0. The member data points to the
  561. * last element.
  562. */
  563. xcb_generic_iterator_t
  564. xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i);
  565. /**
  566. * Get the next element of the iterator
  567. * @param i Pointer to a xcb_sync_counter_iterator_t
  568. *
  569. * Get the next element in the iterator. The member rem is
  570. * decreased by one. The member data points to the next
  571. * element. The member index is increased by sizeof(xcb_sync_counter_t)
  572. */
  573. void
  574. xcb_sync_counter_next (xcb_sync_counter_iterator_t *i);
  575. /**
  576. * Return the iterator pointing to the last element
  577. * @param i An xcb_sync_counter_iterator_t
  578. * @return The iterator pointing to the last element
  579. *
  580. * Set the current element in the iterator to the last element.
  581. * The member rem is set to 0. The member data points to the
  582. * last element.
  583. */
  584. xcb_generic_iterator_t
  585. xcb_sync_counter_end (xcb_sync_counter_iterator_t i);
  586. /**
  587. * Get the next element of the iterator
  588. * @param i Pointer to a xcb_sync_fence_iterator_t
  589. *
  590. * Get the next element in the iterator. The member rem is
  591. * decreased by one. The member data points to the next
  592. * element. The member index is increased by sizeof(xcb_sync_fence_t)
  593. */
  594. void
  595. xcb_sync_fence_next (xcb_sync_fence_iterator_t *i);
  596. /**
  597. * Return the iterator pointing to the last element
  598. * @param i An xcb_sync_fence_iterator_t
  599. * @return The iterator pointing to the last element
  600. *
  601. * Set the current element in the iterator to the last element.
  602. * The member rem is set to 0. The member data points to the
  603. * last element.
  604. */
  605. xcb_generic_iterator_t
  606. xcb_sync_fence_end (xcb_sync_fence_iterator_t i);
  607. /**
  608. * Get the next element of the iterator
  609. * @param i Pointer to a xcb_sync_int64_iterator_t
  610. *
  611. * Get the next element in the iterator. The member rem is
  612. * decreased by one. The member data points to the next
  613. * element. The member index is increased by sizeof(xcb_sync_int64_t)
  614. */
  615. void
  616. xcb_sync_int64_next (xcb_sync_int64_iterator_t *i);
  617. /**
  618. * Return the iterator pointing to the last element
  619. * @param i An xcb_sync_int64_iterator_t
  620. * @return The iterator pointing to the last element
  621. *
  622. * Set the current element in the iterator to the last element.
  623. * The member rem is set to 0. The member data points to the
  624. * last element.
  625. */
  626. xcb_generic_iterator_t
  627. xcb_sync_int64_end (xcb_sync_int64_iterator_t i);
  628. int
  629. xcb_sync_systemcounter_sizeof (const void *_buffer);
  630. char *
  631. xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R);
  632. int
  633. xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R);
  634. xcb_generic_iterator_t
  635. xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t *R);
  636. /**
  637. * Get the next element of the iterator
  638. * @param i Pointer to a xcb_sync_systemcounter_iterator_t
  639. *
  640. * Get the next element in the iterator. The member rem is
  641. * decreased by one. The member data points to the next
  642. * element. The member index is increased by sizeof(xcb_sync_systemcounter_t)
  643. */
  644. void
  645. xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i);
  646. /**
  647. * Return the iterator pointing to the last element
  648. * @param i An xcb_sync_systemcounter_iterator_t
  649. * @return The iterator pointing to the last element
  650. *
  651. * Set the current element in the iterator to the last element.
  652. * The member rem is set to 0. The member data points to the
  653. * last element.
  654. */
  655. xcb_generic_iterator_t
  656. xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i);
  657. /**
  658. * Get the next element of the iterator
  659. * @param i Pointer to a xcb_sync_trigger_iterator_t
  660. *
  661. * Get the next element in the iterator. The member rem is
  662. * decreased by one. The member data points to the next
  663. * element. The member index is increased by sizeof(xcb_sync_trigger_t)
  664. */
  665. void
  666. xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i);
  667. /**
  668. * Return the iterator pointing to the last element
  669. * @param i An xcb_sync_trigger_iterator_t
  670. * @return The iterator pointing to the last element
  671. *
  672. * Set the current element in the iterator to the last element.
  673. * The member rem is set to 0. The member data points to the
  674. * last element.
  675. */
  676. xcb_generic_iterator_t
  677. xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i);
  678. /**
  679. * Get the next element of the iterator
  680. * @param i Pointer to a xcb_sync_waitcondition_iterator_t
  681. *
  682. * Get the next element in the iterator. The member rem is
  683. * decreased by one. The member data points to the next
  684. * element. The member index is increased by sizeof(xcb_sync_waitcondition_t)
  685. */
  686. void
  687. xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i);
  688. /**
  689. * Return the iterator pointing to the last element
  690. * @param i An xcb_sync_waitcondition_iterator_t
  691. * @return The iterator pointing to the last element
  692. *
  693. * Set the current element in the iterator to the last element.
  694. * The member rem is set to 0. The member data points to the
  695. * last element.
  696. */
  697. xcb_generic_iterator_t
  698. xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i);
  699. /**
  700. *
  701. * @param c The connection
  702. * @return A cookie
  703. *
  704. * Delivers a request to the X server.
  705. *
  706. */
  707. xcb_sync_initialize_cookie_t
  708. xcb_sync_initialize (xcb_connection_t *c,
  709. uint8_t desired_major_version,
  710. uint8_t desired_minor_version);
  711. /**
  712. *
  713. * @param c The connection
  714. * @return A cookie
  715. *
  716. * Delivers a request to the X server.
  717. *
  718. * This form can be used only if the request will cause
  719. * a reply to be generated. Any returned error will be
  720. * placed in the event queue.
  721. */
  722. xcb_sync_initialize_cookie_t
  723. xcb_sync_initialize_unchecked (xcb_connection_t *c,
  724. uint8_t desired_major_version,
  725. uint8_t desired_minor_version);
  726. /**
  727. * Return the reply
  728. * @param c The connection
  729. * @param cookie The cookie
  730. * @param e The xcb_generic_error_t supplied
  731. *
  732. * Returns the reply of the request asked by
  733. *
  734. * The parameter @p e supplied to this function must be NULL if
  735. * xcb_sync_initialize_unchecked(). is used.
  736. * Otherwise, it stores the error if any.
  737. *
  738. * The returned value must be freed by the caller using free().
  739. */
  740. xcb_sync_initialize_reply_t *
  741. xcb_sync_initialize_reply (xcb_connection_t *c,
  742. xcb_sync_initialize_cookie_t cookie /**< */,
  743. xcb_generic_error_t **e);
  744. int
  745. xcb_sync_list_system_counters_sizeof (const void *_buffer);
  746. /**
  747. *
  748. * @param c The connection
  749. * @return A cookie
  750. *
  751. * Delivers a request to the X server.
  752. *
  753. */
  754. xcb_sync_list_system_counters_cookie_t
  755. xcb_sync_list_system_counters (xcb_connection_t *c);
  756. /**
  757. *
  758. * @param c The connection
  759. * @return A cookie
  760. *
  761. * Delivers a request to the X server.
  762. *
  763. * This form can be used only if the request will cause
  764. * a reply to be generated. Any returned error will be
  765. * placed in the event queue.
  766. */
  767. xcb_sync_list_system_counters_cookie_t
  768. xcb_sync_list_system_counters_unchecked (xcb_connection_t *c);
  769. int
  770. xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R);
  771. xcb_sync_systemcounter_iterator_t
  772. xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t *R);
  773. /**
  774. * Return the reply
  775. * @param c The connection
  776. * @param cookie The cookie
  777. * @param e The xcb_generic_error_t supplied
  778. *
  779. * Returns the reply of the request asked by
  780. *
  781. * The parameter @p e supplied to this function must be NULL if
  782. * xcb_sync_list_system_counters_unchecked(). is used.
  783. * Otherwise, it stores the error if any.
  784. *
  785. * The returned value must be freed by the caller using free().
  786. */
  787. xcb_sync_list_system_counters_reply_t *
  788. xcb_sync_list_system_counters_reply (xcb_connection_t *c,
  789. xcb_sync_list_system_counters_cookie_t cookie /**< */,
  790. xcb_generic_error_t **e);
  791. /**
  792. *
  793. * @param c The connection
  794. * @return A cookie
  795. *
  796. * Delivers a request to the X server.
  797. *
  798. * This form can be used only if the request will not cause
  799. * a reply to be generated. Any returned error will be
  800. * saved for handling by xcb_request_check().
  801. */
  802. xcb_void_cookie_t
  803. xcb_sync_create_counter_checked (xcb_connection_t *c,
  804. xcb_sync_counter_t id,
  805. xcb_sync_int64_t initial_value);
  806. /**
  807. *
  808. * @param c The connection
  809. * @return A cookie
  810. *
  811. * Delivers a request to the X server.
  812. *
  813. */
  814. xcb_void_cookie_t
  815. xcb_sync_create_counter (xcb_connection_t *c,
  816. xcb_sync_counter_t id,
  817. xcb_sync_int64_t initial_value);
  818. /**
  819. *
  820. * @param c The connection
  821. * @return A cookie
  822. *
  823. * Delivers a request to the X server.
  824. *
  825. * This form can be used only if the request will not cause
  826. * a reply to be generated. Any returned error will be
  827. * saved for handling by xcb_request_check().
  828. */
  829. xcb_void_cookie_t
  830. xcb_sync_destroy_counter_checked (xcb_connection_t *c,
  831. xcb_sync_counter_t counter);
  832. /**
  833. *
  834. * @param c The connection
  835. * @return A cookie
  836. *
  837. * Delivers a request to the X server.
  838. *
  839. */
  840. xcb_void_cookie_t
  841. xcb_sync_destroy_counter (xcb_connection_t *c,
  842. xcb_sync_counter_t counter);
  843. /**
  844. *
  845. * @param c The connection
  846. * @return A cookie
  847. *
  848. * Delivers a request to the X server.
  849. *
  850. */
  851. xcb_sync_query_counter_cookie_t
  852. xcb_sync_query_counter (xcb_connection_t *c,
  853. xcb_sync_counter_t counter);
  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_sync_query_counter_cookie_t
  866. xcb_sync_query_counter_unchecked (xcb_connection_t *c,
  867. xcb_sync_counter_t counter);
  868. /**
  869. * Return the reply
  870. * @param c The connection
  871. * @param cookie The cookie
  872. * @param e The xcb_generic_error_t supplied
  873. *
  874. * Returns the reply of the request asked by
  875. *
  876. * The parameter @p e supplied to this function must be NULL if
  877. * xcb_sync_query_counter_unchecked(). is used.
  878. * Otherwise, it stores the error if any.
  879. *
  880. * The returned value must be freed by the caller using free().
  881. */
  882. xcb_sync_query_counter_reply_t *
  883. xcb_sync_query_counter_reply (xcb_connection_t *c,
  884. xcb_sync_query_counter_cookie_t cookie /**< */,
  885. xcb_generic_error_t **e);
  886. int
  887. xcb_sync_await_sizeof (const void *_buffer,
  888. uint32_t wait_list_len);
  889. /**
  890. *
  891. * @param c The connection
  892. * @return A cookie
  893. *
  894. * Delivers a request to the X server.
  895. *
  896. * This form can be used only if the request will not cause
  897. * a reply to be generated. Any returned error will be
  898. * saved for handling by xcb_request_check().
  899. */
  900. xcb_void_cookie_t
  901. xcb_sync_await_checked (xcb_connection_t *c,
  902. uint32_t wait_list_len,
  903. const xcb_sync_waitcondition_t *wait_list);
  904. /**
  905. *
  906. * @param c The connection
  907. * @return A cookie
  908. *
  909. * Delivers a request to the X server.
  910. *
  911. */
  912. xcb_void_cookie_t
  913. xcb_sync_await (xcb_connection_t *c,
  914. uint32_t wait_list_len,
  915. const xcb_sync_waitcondition_t *wait_list);
  916. xcb_sync_waitcondition_t *
  917. xcb_sync_await_wait_list (const xcb_sync_await_request_t *R);
  918. int
  919. xcb_sync_await_wait_list_length (const xcb_sync_await_request_t *R);
  920. xcb_sync_waitcondition_iterator_t
  921. xcb_sync_await_wait_list_iterator (const xcb_sync_await_request_t *R);
  922. /**
  923. *
  924. * @param c The connection
  925. * @return A cookie
  926. *
  927. * Delivers a request to the X server.
  928. *
  929. * This form can be used only if the request will not cause
  930. * a reply to be generated. Any returned error will be
  931. * saved for handling by xcb_request_check().
  932. */
  933. xcb_void_cookie_t
  934. xcb_sync_change_counter_checked (xcb_connection_t *c,
  935. xcb_sync_counter_t counter,
  936. xcb_sync_int64_t amount);
  937. /**
  938. *
  939. * @param c The connection
  940. * @return A cookie
  941. *
  942. * Delivers a request to the X server.
  943. *
  944. */
  945. xcb_void_cookie_t
  946. xcb_sync_change_counter (xcb_connection_t *c,
  947. xcb_sync_counter_t counter,
  948. xcb_sync_int64_t amount);
  949. /**
  950. *
  951. * @param c The connection
  952. * @return A cookie
  953. *
  954. * Delivers a request to the X server.
  955. *
  956. * This form can be used only if the request will not cause
  957. * a reply to be generated. Any returned error will be
  958. * saved for handling by xcb_request_check().
  959. */
  960. xcb_void_cookie_t
  961. xcb_sync_set_counter_checked (xcb_connection_t *c,
  962. xcb_sync_counter_t counter,
  963. xcb_sync_int64_t value);
  964. /**
  965. *
  966. * @param c The connection
  967. * @return A cookie
  968. *
  969. * Delivers a request to the X server.
  970. *
  971. */
  972. xcb_void_cookie_t
  973. xcb_sync_set_counter (xcb_connection_t *c,
  974. xcb_sync_counter_t counter,
  975. xcb_sync_int64_t value);
  976. int
  977. xcb_sync_create_alarm_value_list_serialize (void **_buffer,
  978. uint32_t value_mask,
  979. const xcb_sync_create_alarm_value_list_t *_aux);
  980. int
  981. xcb_sync_create_alarm_value_list_unpack (const void *_buffer,
  982. uint32_t value_mask,
  983. xcb_sync_create_alarm_value_list_t *_aux);
  984. int
  985. xcb_sync_create_alarm_value_list_sizeof (const void *_buffer,
  986. uint32_t value_mask);
  987. int
  988. xcb_sync_create_alarm_sizeof (const void *_buffer);
  989. /**
  990. *
  991. * @param c The connection
  992. * @return A cookie
  993. *
  994. * Delivers a request to the X server.
  995. *
  996. * This form can be used only if the request will not cause
  997. * a reply to be generated. Any returned error will be
  998. * saved for handling by xcb_request_check().
  999. */
  1000. xcb_void_cookie_t
  1001. xcb_sync_create_alarm_checked (xcb_connection_t *c,
  1002. xcb_sync_alarm_t id,
  1003. uint32_t value_mask,
  1004. const void *value_list);
  1005. /**
  1006. *
  1007. * @param c The connection
  1008. * @return A cookie
  1009. *
  1010. * Delivers a request to the X server.
  1011. *
  1012. */
  1013. xcb_void_cookie_t
  1014. xcb_sync_create_alarm (xcb_connection_t *c,
  1015. xcb_sync_alarm_t id,
  1016. uint32_t value_mask,
  1017. const void *value_list);
  1018. /**
  1019. *
  1020. * @param c The connection
  1021. * @return A cookie
  1022. *
  1023. * Delivers a request to the X server.
  1024. *
  1025. * This form can be used only if the request will not cause
  1026. * a reply to be generated. Any returned error will be
  1027. * saved for handling by xcb_request_check().
  1028. */
  1029. xcb_void_cookie_t
  1030. xcb_sync_create_alarm_aux_checked (xcb_connection_t *c,
  1031. xcb_sync_alarm_t id,
  1032. uint32_t value_mask,
  1033. const xcb_sync_create_alarm_value_list_t *value_list);
  1034. /**
  1035. *
  1036. * @param c The connection
  1037. * @return A cookie
  1038. *
  1039. * Delivers a request to the X server.
  1040. *
  1041. */
  1042. xcb_void_cookie_t
  1043. xcb_sync_create_alarm_aux (xcb_connection_t *c,
  1044. xcb_sync_alarm_t id,
  1045. uint32_t value_mask,
  1046. const xcb_sync_create_alarm_value_list_t *value_list);
  1047. void *
  1048. xcb_sync_create_alarm_value_list (const xcb_sync_create_alarm_request_t *R);
  1049. int
  1050. xcb_sync_change_alarm_value_list_serialize (void **_buffer,
  1051. uint32_t value_mask,
  1052. const xcb_sync_change_alarm_value_list_t *_aux);
  1053. int
  1054. xcb_sync_change_alarm_value_list_unpack (const void *_buffer,
  1055. uint32_t value_mask,
  1056. xcb_sync_change_alarm_value_list_t *_aux);
  1057. int
  1058. xcb_sync_change_alarm_value_list_sizeof (const void *_buffer,
  1059. uint32_t value_mask);
  1060. int
  1061. xcb_sync_change_alarm_sizeof (const void *_buffer);
  1062. /**
  1063. *
  1064. * @param c The connection
  1065. * @return A cookie
  1066. *
  1067. * Delivers a request to the X server.
  1068. *
  1069. * This form can be used only if the request will not cause
  1070. * a reply to be generated. Any returned error will be
  1071. * saved for handling by xcb_request_check().
  1072. */
  1073. xcb_void_cookie_t
  1074. xcb_sync_change_alarm_checked (xcb_connection_t *c,
  1075. xcb_sync_alarm_t id,
  1076. uint32_t value_mask,
  1077. const void *value_list);
  1078. /**
  1079. *
  1080. * @param c The connection
  1081. * @return A cookie
  1082. *
  1083. * Delivers a request to the X server.
  1084. *
  1085. */
  1086. xcb_void_cookie_t
  1087. xcb_sync_change_alarm (xcb_connection_t *c,
  1088. xcb_sync_alarm_t id,
  1089. uint32_t value_mask,
  1090. const void *value_list);
  1091. /**
  1092. *
  1093. * @param c The connection
  1094. * @return A cookie
  1095. *
  1096. * Delivers a request to the X server.
  1097. *
  1098. * This form can be used only if the request will not cause
  1099. * a reply to be generated. Any returned error will be
  1100. * saved for handling by xcb_request_check().
  1101. */
  1102. xcb_void_cookie_t
  1103. xcb_sync_change_alarm_aux_checked (xcb_connection_t *c,
  1104. xcb_sync_alarm_t id,
  1105. uint32_t value_mask,
  1106. const xcb_sync_change_alarm_value_list_t *value_list);
  1107. /**
  1108. *
  1109. * @param c The connection
  1110. * @return A cookie
  1111. *
  1112. * Delivers a request to the X server.
  1113. *
  1114. */
  1115. xcb_void_cookie_t
  1116. xcb_sync_change_alarm_aux (xcb_connection_t *c,
  1117. xcb_sync_alarm_t id,
  1118. uint32_t value_mask,
  1119. const xcb_sync_change_alarm_value_list_t *value_list);
  1120. void *
  1121. xcb_sync_change_alarm_value_list (const xcb_sync_change_alarm_request_t *R);
  1122. /**
  1123. *
  1124. * @param c The connection
  1125. * @return A cookie
  1126. *
  1127. * Delivers a request to the X server.
  1128. *
  1129. * This form can be used only if the request will not cause
  1130. * a reply to be generated. Any returned error will be
  1131. * saved for handling by xcb_request_check().
  1132. */
  1133. xcb_void_cookie_t
  1134. xcb_sync_destroy_alarm_checked (xcb_connection_t *c,
  1135. xcb_sync_alarm_t alarm);
  1136. /**
  1137. *
  1138. * @param c The connection
  1139. * @return A cookie
  1140. *
  1141. * Delivers a request to the X server.
  1142. *
  1143. */
  1144. xcb_void_cookie_t
  1145. xcb_sync_destroy_alarm (xcb_connection_t *c,
  1146. xcb_sync_alarm_t alarm);
  1147. /**
  1148. *
  1149. * @param c The connection
  1150. * @return A cookie
  1151. *
  1152. * Delivers a request to the X server.
  1153. *
  1154. */
  1155. xcb_sync_query_alarm_cookie_t
  1156. xcb_sync_query_alarm (xcb_connection_t *c,
  1157. xcb_sync_alarm_t alarm);
  1158. /**
  1159. *
  1160. * @param c The connection
  1161. * @return A cookie
  1162. *
  1163. * Delivers a request to the X server.
  1164. *
  1165. * This form can be used only if the request will cause
  1166. * a reply to be generated. Any returned error will be
  1167. * placed in the event queue.
  1168. */
  1169. xcb_sync_query_alarm_cookie_t
  1170. xcb_sync_query_alarm_unchecked (xcb_connection_t *c,
  1171. xcb_sync_alarm_t alarm);
  1172. /**
  1173. * Return the reply
  1174. * @param c The connection
  1175. * @param cookie The cookie
  1176. * @param e The xcb_generic_error_t supplied
  1177. *
  1178. * Returns the reply of the request asked by
  1179. *
  1180. * The parameter @p e supplied to this function must be NULL if
  1181. * xcb_sync_query_alarm_unchecked(). is used.
  1182. * Otherwise, it stores the error if any.
  1183. *
  1184. * The returned value must be freed by the caller using free().
  1185. */
  1186. xcb_sync_query_alarm_reply_t *
  1187. xcb_sync_query_alarm_reply (xcb_connection_t *c,
  1188. xcb_sync_query_alarm_cookie_t cookie /**< */,
  1189. xcb_generic_error_t **e);
  1190. /**
  1191. *
  1192. * @param c The connection
  1193. * @return A cookie
  1194. *
  1195. * Delivers a request to the X server.
  1196. *
  1197. * This form can be used only if the request will not cause
  1198. * a reply to be generated. Any returned error will be
  1199. * saved for handling by xcb_request_check().
  1200. */
  1201. xcb_void_cookie_t
  1202. xcb_sync_set_priority_checked (xcb_connection_t *c,
  1203. uint32_t id,
  1204. int32_t priority);
  1205. /**
  1206. *
  1207. * @param c The connection
  1208. * @return A cookie
  1209. *
  1210. * Delivers a request to the X server.
  1211. *
  1212. */
  1213. xcb_void_cookie_t
  1214. xcb_sync_set_priority (xcb_connection_t *c,
  1215. uint32_t id,
  1216. int32_t priority);
  1217. /**
  1218. *
  1219. * @param c The connection
  1220. * @return A cookie
  1221. *
  1222. * Delivers a request to the X server.
  1223. *
  1224. */
  1225. xcb_sync_get_priority_cookie_t
  1226. xcb_sync_get_priority (xcb_connection_t *c,
  1227. uint32_t id);
  1228. /**
  1229. *
  1230. * @param c The connection
  1231. * @return A cookie
  1232. *
  1233. * Delivers a request to the X server.
  1234. *
  1235. * This form can be used only if the request will cause
  1236. * a reply to be generated. Any returned error will be
  1237. * placed in the event queue.
  1238. */
  1239. xcb_sync_get_priority_cookie_t
  1240. xcb_sync_get_priority_unchecked (xcb_connection_t *c,
  1241. uint32_t id);
  1242. /**
  1243. * Return the reply
  1244. * @param c The connection
  1245. * @param cookie The cookie
  1246. * @param e The xcb_generic_error_t supplied
  1247. *
  1248. * Returns the reply of the request asked by
  1249. *
  1250. * The parameter @p e supplied to this function must be NULL if
  1251. * xcb_sync_get_priority_unchecked(). is used.
  1252. * Otherwise, it stores the error if any.
  1253. *
  1254. * The returned value must be freed by the caller using free().
  1255. */
  1256. xcb_sync_get_priority_reply_t *
  1257. xcb_sync_get_priority_reply (xcb_connection_t *c,
  1258. xcb_sync_get_priority_cookie_t cookie /**< */,
  1259. xcb_generic_error_t **e);
  1260. /**
  1261. *
  1262. * @param c The connection
  1263. * @return A cookie
  1264. *
  1265. * Delivers a request to the X server.
  1266. *
  1267. * This form can be used only if the request will not cause
  1268. * a reply to be generated. Any returned error will be
  1269. * saved for handling by xcb_request_check().
  1270. */
  1271. xcb_void_cookie_t
  1272. xcb_sync_create_fence_checked (xcb_connection_t *c,
  1273. xcb_drawable_t drawable,
  1274. xcb_sync_fence_t fence,
  1275. uint8_t initially_triggered);
  1276. /**
  1277. *
  1278. * @param c The connection
  1279. * @return A cookie
  1280. *
  1281. * Delivers a request to the X server.
  1282. *
  1283. */
  1284. xcb_void_cookie_t
  1285. xcb_sync_create_fence (xcb_connection_t *c,
  1286. xcb_drawable_t drawable,
  1287. xcb_sync_fence_t fence,
  1288. uint8_t initially_triggered);
  1289. /**
  1290. *
  1291. * @param c The connection
  1292. * @return A cookie
  1293. *
  1294. * Delivers a request to the X server.
  1295. *
  1296. * This form can be used only if the request will not cause
  1297. * a reply to be generated. Any returned error will be
  1298. * saved for handling by xcb_request_check().
  1299. */
  1300. xcb_void_cookie_t
  1301. xcb_sync_trigger_fence_checked (xcb_connection_t *c,
  1302. xcb_sync_fence_t fence);
  1303. /**
  1304. *
  1305. * @param c The connection
  1306. * @return A cookie
  1307. *
  1308. * Delivers a request to the X server.
  1309. *
  1310. */
  1311. xcb_void_cookie_t
  1312. xcb_sync_trigger_fence (xcb_connection_t *c,
  1313. xcb_sync_fence_t fence);
  1314. /**
  1315. *
  1316. * @param c The connection
  1317. * @return A cookie
  1318. *
  1319. * Delivers a request to the X server.
  1320. *
  1321. * This form can be used only if the request will not cause
  1322. * a reply to be generated. Any returned error will be
  1323. * saved for handling by xcb_request_check().
  1324. */
  1325. xcb_void_cookie_t
  1326. xcb_sync_reset_fence_checked (xcb_connection_t *c,
  1327. xcb_sync_fence_t fence);
  1328. /**
  1329. *
  1330. * @param c The connection
  1331. * @return A cookie
  1332. *
  1333. * Delivers a request to the X server.
  1334. *
  1335. */
  1336. xcb_void_cookie_t
  1337. xcb_sync_reset_fence (xcb_connection_t *c,
  1338. xcb_sync_fence_t fence);
  1339. /**
  1340. *
  1341. * @param c The connection
  1342. * @return A cookie
  1343. *
  1344. * Delivers a request to the X server.
  1345. *
  1346. * This form can be used only if the request will not cause
  1347. * a reply to be generated. Any returned error will be
  1348. * saved for handling by xcb_request_check().
  1349. */
  1350. xcb_void_cookie_t
  1351. xcb_sync_destroy_fence_checked (xcb_connection_t *c,
  1352. xcb_sync_fence_t fence);
  1353. /**
  1354. *
  1355. * @param c The connection
  1356. * @return A cookie
  1357. *
  1358. * Delivers a request to the X server.
  1359. *
  1360. */
  1361. xcb_void_cookie_t
  1362. xcb_sync_destroy_fence (xcb_connection_t *c,
  1363. xcb_sync_fence_t fence);
  1364. /**
  1365. *
  1366. * @param c The connection
  1367. * @return A cookie
  1368. *
  1369. * Delivers a request to the X server.
  1370. *
  1371. */
  1372. xcb_sync_query_fence_cookie_t
  1373. xcb_sync_query_fence (xcb_connection_t *c,
  1374. xcb_sync_fence_t fence);
  1375. /**
  1376. *
  1377. * @param c The connection
  1378. * @return A cookie
  1379. *
  1380. * Delivers a request to the X server.
  1381. *
  1382. * This form can be used only if the request will cause
  1383. * a reply to be generated. Any returned error will be
  1384. * placed in the event queue.
  1385. */
  1386. xcb_sync_query_fence_cookie_t
  1387. xcb_sync_query_fence_unchecked (xcb_connection_t *c,
  1388. xcb_sync_fence_t fence);
  1389. /**
  1390. * Return the reply
  1391. * @param c The connection
  1392. * @param cookie The cookie
  1393. * @param e The xcb_generic_error_t supplied
  1394. *
  1395. * Returns the reply of the request asked by
  1396. *
  1397. * The parameter @p e supplied to this function must be NULL if
  1398. * xcb_sync_query_fence_unchecked(). is used.
  1399. * Otherwise, it stores the error if any.
  1400. *
  1401. * The returned value must be freed by the caller using free().
  1402. */
  1403. xcb_sync_query_fence_reply_t *
  1404. xcb_sync_query_fence_reply (xcb_connection_t *c,
  1405. xcb_sync_query_fence_cookie_t cookie /**< */,
  1406. xcb_generic_error_t **e);
  1407. int
  1408. xcb_sync_await_fence_sizeof (const void *_buffer,
  1409. uint32_t fence_list_len);
  1410. /**
  1411. *
  1412. * @param c The connection
  1413. * @return A cookie
  1414. *
  1415. * Delivers a request to the X server.
  1416. *
  1417. * This form can be used only if the request will not cause
  1418. * a reply to be generated. Any returned error will be
  1419. * saved for handling by xcb_request_check().
  1420. */
  1421. xcb_void_cookie_t
  1422. xcb_sync_await_fence_checked (xcb_connection_t *c,
  1423. uint32_t fence_list_len,
  1424. const xcb_sync_fence_t *fence_list);
  1425. /**
  1426. *
  1427. * @param c The connection
  1428. * @return A cookie
  1429. *
  1430. * Delivers a request to the X server.
  1431. *
  1432. */
  1433. xcb_void_cookie_t
  1434. xcb_sync_await_fence (xcb_connection_t *c,
  1435. uint32_t fence_list_len,
  1436. const xcb_sync_fence_t *fence_list);
  1437. xcb_sync_fence_t *
  1438. xcb_sync_await_fence_fence_list (const xcb_sync_await_fence_request_t *R);
  1439. int
  1440. xcb_sync_await_fence_fence_list_length (const xcb_sync_await_fence_request_t *R);
  1441. xcb_generic_iterator_t
  1442. xcb_sync_await_fence_fence_list_end (const xcb_sync_await_fence_request_t *R);
  1443. #ifdef __cplusplus
  1444. }
  1445. #endif
  1446. #endif
  1447. /**
  1448. * @}
  1449. */