2 * This file generated automatically from present.xml by c_client.py.
7 * @defgroup XCB_Present_API XCB Present API
8 * @brief Present XCB Protocol Implementation.
25 #define XCB_PRESENT_MAJOR_VERSION 1
26 #define XCB_PRESENT_MINOR_VERSION 0
28 extern xcb_extension_t xcb_present_id
;
30 typedef enum xcb_present_event_enum_t
{
31 XCB_PRESENT_EVENT_CONFIGURE_NOTIFY
= 0,
32 XCB_PRESENT_EVENT_COMPLETE_NOTIFY
= 1,
33 XCB_PRESENT_EVENT_IDLE_NOTIFY
= 2,
34 XCB_PRESENT_EVENT_REDIRECT_NOTIFY
= 3
35 } xcb_present_event_enum_t
;
37 typedef enum xcb_present_event_mask_t
{
38 XCB_PRESENT_EVENT_MASK_NO_EVENT
= 0,
39 XCB_PRESENT_EVENT_MASK_CONFIGURE_NOTIFY
= 1,
40 XCB_PRESENT_EVENT_MASK_COMPLETE_NOTIFY
= 2,
41 XCB_PRESENT_EVENT_MASK_IDLE_NOTIFY
= 4,
42 XCB_PRESENT_EVENT_MASK_REDIRECT_NOTIFY
= 8
43 } xcb_present_event_mask_t
;
45 typedef enum xcb_present_option_t
{
46 XCB_PRESENT_OPTION_NONE
= 0,
47 XCB_PRESENT_OPTION_ASYNC
= 1,
48 XCB_PRESENT_OPTION_COPY
= 2,
49 XCB_PRESENT_OPTION_UST
= 4
50 } xcb_present_option_t
;
52 typedef enum xcb_present_capability_t
{
53 XCB_PRESENT_CAPABILITY_NONE
= 0,
54 XCB_PRESENT_CAPABILITY_ASYNC
= 1,
55 XCB_PRESENT_CAPABILITY_FENCE
= 2,
56 XCB_PRESENT_CAPABILITY_UST
= 4
57 } xcb_present_capability_t
;
59 typedef enum xcb_present_complete_kind_t
{
60 XCB_PRESENT_COMPLETE_KIND_PIXMAP
= 0,
61 XCB_PRESENT_COMPLETE_KIND_NOTIFY_MSC
= 1
62 } xcb_present_complete_kind_t
;
64 typedef enum xcb_present_complete_mode_t
{
65 XCB_PRESENT_COMPLETE_MODE_COPY
= 0,
66 XCB_PRESENT_COMPLETE_MODE_FLIP
= 1,
67 XCB_PRESENT_COMPLETE_MODE_SKIP
= 2
68 } xcb_present_complete_mode_t
;
71 * @brief xcb_present_notify_t
73 typedef struct xcb_present_notify_t
{
74 xcb_window_t window
; /**< */
75 uint32_t serial
; /**< */
76 } xcb_present_notify_t
;
79 * @brief xcb_present_notify_iterator_t
81 typedef struct xcb_present_notify_iterator_t
{
82 xcb_present_notify_t
*data
; /**< */
85 } xcb_present_notify_iterator_t
;
88 * @brief xcb_present_query_version_cookie_t
90 typedef struct xcb_present_query_version_cookie_t
{
91 unsigned int sequence
; /**< */
92 } xcb_present_query_version_cookie_t
;
94 /** Opcode for xcb_present_query_version. */
95 #define XCB_PRESENT_QUERY_VERSION 0
98 * @brief xcb_present_query_version_request_t
100 typedef struct xcb_present_query_version_request_t
{
101 uint8_t major_opcode
; /**< */
102 uint8_t minor_opcode
; /**< */
103 uint16_t length
; /**< */
104 uint32_t major_version
; /**< */
105 uint32_t minor_version
; /**< */
106 } xcb_present_query_version_request_t
;
109 * @brief xcb_present_query_version_reply_t
111 typedef struct xcb_present_query_version_reply_t
{
112 uint8_t response_type
; /**< */
113 uint8_t pad0
; /**< */
114 uint16_t sequence
; /**< */
115 uint32_t length
; /**< */
116 uint32_t major_version
; /**< */
117 uint32_t minor_version
; /**< */
118 } xcb_present_query_version_reply_t
;
120 /** Opcode for xcb_present_pixmap. */
121 #define XCB_PRESENT_PIXMAP 1
124 * @brief xcb_present_pixmap_request_t
126 typedef struct xcb_present_pixmap_request_t
{
127 uint8_t major_opcode
; /**< */
128 uint8_t minor_opcode
; /**< */
129 uint16_t length
; /**< */
130 xcb_window_t window
; /**< */
131 xcb_pixmap_t pixmap
; /**< */
132 uint32_t serial
; /**< */
133 xcb_xfixes_region_t valid
; /**< */
134 xcb_xfixes_region_t update
; /**< */
135 int16_t x_off
; /**< */
136 int16_t y_off
; /**< */
137 xcb_randr_crtc_t target_crtc
; /**< */
138 xcb_sync_fence_t wait_fence
; /**< */
139 xcb_sync_fence_t idle_fence
; /**< */
140 uint32_t options
; /**< */
141 uint8_t pad0
[4]; /**< */
142 uint64_t target_msc
; /**< */
143 uint64_t divisor
; /**< */
144 uint64_t remainder
; /**< */
145 } xcb_present_pixmap_request_t
;
147 /** Opcode for xcb_present_notify_msc. */
148 #define XCB_PRESENT_NOTIFY_MSC 2
151 * @brief xcb_present_notify_msc_request_t
153 typedef struct xcb_present_notify_msc_request_t
{
154 uint8_t major_opcode
; /**< */
155 uint8_t minor_opcode
; /**< */
156 uint16_t length
; /**< */
157 xcb_window_t window
; /**< */
158 uint32_t serial
; /**< */
159 uint8_t pad0
[4]; /**< */
160 uint64_t target_msc
; /**< */
161 uint64_t divisor
; /**< */
162 uint64_t remainder
; /**< */
163 } xcb_present_notify_msc_request_t
;
165 typedef uint32_t xcb_present_event_t
;
168 * @brief xcb_present_event_iterator_t
170 typedef struct xcb_present_event_iterator_t
{
171 xcb_present_event_t
*data
; /**< */
174 } xcb_present_event_iterator_t
;
176 /** Opcode for xcb_present_select_input. */
177 #define XCB_PRESENT_SELECT_INPUT 3
180 * @brief xcb_present_select_input_request_t
182 typedef struct xcb_present_select_input_request_t
{
183 uint8_t major_opcode
; /**< */
184 uint8_t minor_opcode
; /**< */
185 uint16_t length
; /**< */
186 xcb_present_event_t eid
; /**< */
187 xcb_window_t window
; /**< */
188 uint32_t event_mask
; /**< */
189 } xcb_present_select_input_request_t
;
192 * @brief xcb_present_query_capabilities_cookie_t
194 typedef struct xcb_present_query_capabilities_cookie_t
{
195 unsigned int sequence
; /**< */
196 } xcb_present_query_capabilities_cookie_t
;
198 /** Opcode for xcb_present_query_capabilities. */
199 #define XCB_PRESENT_QUERY_CAPABILITIES 4
202 * @brief xcb_present_query_capabilities_request_t
204 typedef struct xcb_present_query_capabilities_request_t
{
205 uint8_t major_opcode
; /**< */
206 uint8_t minor_opcode
; /**< */
207 uint16_t length
; /**< */
208 uint32_t target
; /**< */
209 } xcb_present_query_capabilities_request_t
;
212 * @brief xcb_present_query_capabilities_reply_t
214 typedef struct xcb_present_query_capabilities_reply_t
{
215 uint8_t response_type
; /**< */
216 uint8_t pad0
; /**< */
217 uint16_t sequence
; /**< */
218 uint32_t length
; /**< */
219 uint32_t capabilities
; /**< */
220 } xcb_present_query_capabilities_reply_t
;
222 /** Opcode for xcb_present_generic. */
223 #define XCB_PRESENT_GENERIC 0
226 * @brief xcb_present_generic_event_t
228 typedef struct xcb_present_generic_event_t
{
229 uint8_t response_type
; /**< */
230 uint8_t extension
; /**< */
231 uint16_t sequence
; /**< */
232 uint32_t length
; /**< */
233 uint16_t evtype
; /**< */
234 uint8_t pad0
[2]; /**< */
235 xcb_present_event_t event
; /**< */
236 } xcb_present_generic_event_t
;
238 /** Opcode for xcb_present_configure_notify. */
239 #define XCB_PRESENT_CONFIGURE_NOTIFY 0
242 * @brief xcb_present_configure_notify_event_t
244 typedef struct xcb_present_configure_notify_event_t
{
245 uint8_t response_type
; /**< */
246 uint8_t extension
; /**< */
247 uint16_t sequence
; /**< */
248 uint32_t length
; /**< */
249 uint16_t event_type
; /**< */
250 uint8_t pad0
[2]; /**< */
251 xcb_present_event_t event
; /**< */
252 xcb_window_t window
; /**< */
255 uint16_t width
; /**< */
256 uint16_t height
; /**< */
257 int16_t off_x
; /**< */
258 int16_t off_y
; /**< */
259 uint32_t full_sequence
; /**< */
260 uint16_t pixmap_width
; /**< */
261 uint16_t pixmap_height
; /**< */
262 uint32_t pixmap_flags
; /**< */
263 } xcb_present_configure_notify_event_t
;
265 /** Opcode for xcb_present_complete_notify. */
266 #define XCB_PRESENT_COMPLETE_NOTIFY 1
269 * @brief xcb_present_complete_notify_event_t
271 typedef struct xcb_present_complete_notify_event_t
{
272 uint8_t response_type
; /**< */
273 uint8_t extension
; /**< */
274 uint16_t sequence
; /**< */
275 uint32_t length
; /**< */
276 uint16_t event_type
; /**< */
277 uint8_t kind
; /**< */
278 uint8_t mode
; /**< */
279 xcb_present_event_t event
; /**< */
280 xcb_window_t window
; /**< */
281 uint32_t serial
; /**< */
282 uint64_t ust
; /**< */
283 uint32_t full_sequence
; /**< */
284 uint64_t msc
; /**< */
285 } XCB_PACKED xcb_present_complete_notify_event_t
;
287 /** Opcode for xcb_present_idle_notify. */
288 #define XCB_PRESENT_IDLE_NOTIFY 2
291 * @brief xcb_present_idle_notify_event_t
293 typedef struct xcb_present_idle_notify_event_t
{
294 uint8_t response_type
; /**< */
295 uint8_t extension
; /**< */
296 uint16_t sequence
; /**< */
297 uint32_t length
; /**< */
298 uint16_t event_type
; /**< */
299 uint8_t pad0
[2]; /**< */
300 xcb_present_event_t event
; /**< */
301 xcb_window_t window
; /**< */
302 uint32_t serial
; /**< */
303 xcb_pixmap_t pixmap
; /**< */
304 xcb_sync_fence_t idle_fence
; /**< */
305 uint32_t full_sequence
; /**< */
306 } xcb_present_idle_notify_event_t
;
308 /** Opcode for xcb_present_redirect_notify. */
309 #define XCB_PRESENT_REDIRECT_NOTIFY 3
312 * @brief xcb_present_redirect_notify_event_t
314 typedef struct xcb_present_redirect_notify_event_t
{
315 uint8_t response_type
; /**< */
316 uint8_t extension
; /**< */
317 uint16_t sequence
; /**< */
318 uint32_t length
; /**< */
319 uint16_t event_type
; /**< */
320 uint8_t update_window
; /**< */
321 uint8_t pad0
; /**< */
322 xcb_present_event_t event
; /**< */
323 xcb_window_t event_window
; /**< */
324 xcb_window_t window
; /**< */
325 xcb_pixmap_t pixmap
; /**< */
326 uint32_t serial
; /**< */
327 uint32_t full_sequence
; /**< */
328 xcb_xfixes_region_t valid_region
; /**< */
329 xcb_xfixes_region_t update_region
; /**< */
330 xcb_rectangle_t valid_rect
; /**< */
331 xcb_rectangle_t update_rect
; /**< */
332 int16_t x_off
; /**< */
333 int16_t y_off
; /**< */
334 xcb_randr_crtc_t target_crtc
; /**< */
335 xcb_sync_fence_t wait_fence
; /**< */
336 xcb_sync_fence_t idle_fence
; /**< */
337 uint32_t options
; /**< */
338 uint8_t pad1
[4]; /**< */
339 uint64_t target_msc
; /**< */
340 uint64_t divisor
; /**< */
341 uint64_t remainder
; /**< */
342 } XCB_PACKED xcb_present_redirect_notify_event_t
;
345 * Get the next element of the iterator
346 * @param i Pointer to a xcb_present_notify_iterator_t
348 * Get the next element in the iterator. The member rem is
349 * decreased by one. The member data points to the next
350 * element. The member index is increased by sizeof(xcb_present_notify_t)
353 xcb_present_notify_next (xcb_present_notify_iterator_t
*i
/**< */);
356 * Return the iterator pointing to the last element
357 * @param i An xcb_present_notify_iterator_t
358 * @return The iterator pointing to the last element
360 * Set the current element in the iterator to the last element.
361 * The member rem is set to 0. The member data points to the
364 xcb_generic_iterator_t
365 xcb_present_notify_end (xcb_present_notify_iterator_t i
/**< */);
369 * @param c The connection
372 * Delivers a request to the X server.
375 xcb_present_query_version_cookie_t
376 xcb_present_query_version (xcb_connection_t
*c
/**< */,
377 uint32_t major_version
/**< */,
378 uint32_t minor_version
/**< */);
382 * @param c The connection
385 * Delivers a request to the X server.
387 * This form can be used only if the request will cause
388 * a reply to be generated. Any returned error will be
389 * placed in the event queue.
391 xcb_present_query_version_cookie_t
392 xcb_present_query_version_unchecked (xcb_connection_t
*c
/**< */,
393 uint32_t major_version
/**< */,
394 uint32_t minor_version
/**< */);
398 * @param c The connection
399 * @param cookie The cookie
400 * @param e The xcb_generic_error_t supplied
402 * Returns the reply of the request asked by
404 * The parameter @p e supplied to this function must be NULL if
405 * xcb_present_query_version_unchecked(). is used.
406 * Otherwise, it stores the error if any.
408 * The returned value must be freed by the caller using free().
410 xcb_present_query_version_reply_t
*
411 xcb_present_query_version_reply (xcb_connection_t
*c
/**< */,
412 xcb_present_query_version_cookie_t cookie
/**< */,
413 xcb_generic_error_t
**e
/**< */);
416 xcb_present_pixmap_sizeof (const void *_buffer
/**< */,
417 uint32_t notifies_len
/**< */);
421 * @param c The connection
424 * Delivers a request to the X server.
426 * This form can be used only if the request will not cause
427 * a reply to be generated. Any returned error will be
428 * saved for handling by xcb_request_check().
431 xcb_present_pixmap_checked (xcb_connection_t
*c
/**< */,
432 xcb_window_t window
/**< */,
433 xcb_pixmap_t pixmap
/**< */,
434 uint32_t serial
/**< */,
435 xcb_xfixes_region_t valid
/**< */,
436 xcb_xfixes_region_t update
/**< */,
437 int16_t x_off
/**< */,
438 int16_t y_off
/**< */,
439 xcb_randr_crtc_t target_crtc
/**< */,
440 xcb_sync_fence_t wait_fence
/**< */,
441 xcb_sync_fence_t idle_fence
/**< */,
442 uint32_t options
/**< */,
443 uint64_t target_msc
/**< */,
444 uint64_t divisor
/**< */,
445 uint64_t remainder
/**< */,
446 uint32_t notifies_len
/**< */,
447 const xcb_present_notify_t
*notifies
/**< */);
451 * @param c The connection
454 * Delivers a request to the X server.
458 xcb_present_pixmap (xcb_connection_t
*c
/**< */,
459 xcb_window_t window
/**< */,
460 xcb_pixmap_t pixmap
/**< */,
461 uint32_t serial
/**< */,
462 xcb_xfixes_region_t valid
/**< */,
463 xcb_xfixes_region_t update
/**< */,
464 int16_t x_off
/**< */,
465 int16_t y_off
/**< */,
466 xcb_randr_crtc_t target_crtc
/**< */,
467 xcb_sync_fence_t wait_fence
/**< */,
468 xcb_sync_fence_t idle_fence
/**< */,
469 uint32_t options
/**< */,
470 uint64_t target_msc
/**< */,
471 uint64_t divisor
/**< */,
472 uint64_t remainder
/**< */,
473 uint32_t notifies_len
/**< */,
474 const xcb_present_notify_t
*notifies
/**< */);
478 * @param c The connection
481 * Delivers a request to the X server.
483 * This form can be used only if the request will not cause
484 * a reply to be generated. Any returned error will be
485 * saved for handling by xcb_request_check().
488 xcb_present_notify_msc_checked (xcb_connection_t
*c
/**< */,
489 xcb_window_t window
/**< */,
490 uint32_t serial
/**< */,
491 uint64_t target_msc
/**< */,
492 uint64_t divisor
/**< */,
493 uint64_t remainder
/**< */);
497 * @param c The connection
500 * Delivers a request to the X server.
504 xcb_present_notify_msc (xcb_connection_t
*c
/**< */,
505 xcb_window_t window
/**< */,
506 uint32_t serial
/**< */,
507 uint64_t target_msc
/**< */,
508 uint64_t divisor
/**< */,
509 uint64_t remainder
/**< */);
512 * Get the next element of the iterator
513 * @param i Pointer to a xcb_present_event_iterator_t
515 * Get the next element in the iterator. The member rem is
516 * decreased by one. The member data points to the next
517 * element. The member index is increased by sizeof(xcb_present_event_t)
520 xcb_present_event_next (xcb_present_event_iterator_t
*i
/**< */);
523 * Return the iterator pointing to the last element
524 * @param i An xcb_present_event_iterator_t
525 * @return The iterator pointing to the last element
527 * Set the current element in the iterator to the last element.
528 * The member rem is set to 0. The member data points to the
531 xcb_generic_iterator_t
532 xcb_present_event_end (xcb_present_event_iterator_t i
/**< */);
536 * @param c The connection
539 * Delivers a request to the X server.
541 * This form can be used only if the request will not cause
542 * a reply to be generated. Any returned error will be
543 * saved for handling by xcb_request_check().
546 xcb_present_select_input_checked (xcb_connection_t
*c
/**< */,
547 xcb_present_event_t eid
/**< */,
548 xcb_window_t window
/**< */,
549 uint32_t event_mask
/**< */);
553 * @param c The connection
556 * Delivers a request to the X server.
560 xcb_present_select_input (xcb_connection_t
*c
/**< */,
561 xcb_present_event_t eid
/**< */,
562 xcb_window_t window
/**< */,
563 uint32_t event_mask
/**< */);
567 * @param c The connection
570 * Delivers a request to the X server.
573 xcb_present_query_capabilities_cookie_t
574 xcb_present_query_capabilities (xcb_connection_t
*c
/**< */,
575 uint32_t target
/**< */);
579 * @param c The connection
582 * Delivers a request to the X server.
584 * This form can be used only if the request will cause
585 * a reply to be generated. Any returned error will be
586 * placed in the event queue.
588 xcb_present_query_capabilities_cookie_t
589 xcb_present_query_capabilities_unchecked (xcb_connection_t
*c
/**< */,
590 uint32_t target
/**< */);
594 * @param c The connection
595 * @param cookie The cookie
596 * @param e The xcb_generic_error_t supplied
598 * Returns the reply of the request asked by
600 * The parameter @p e supplied to this function must be NULL if
601 * xcb_present_query_capabilities_unchecked(). is used.
602 * Otherwise, it stores the error if any.
604 * The returned value must be freed by the caller using free().
606 xcb_present_query_capabilities_reply_t
*
607 xcb_present_query_capabilities_reply (xcb_connection_t
*c
/**< */,
608 xcb_present_query_capabilities_cookie_t cookie
/**< */,
609 xcb_generic_error_t
**e
/**< */);
612 xcb_present_redirect_notify_sizeof (const void *_buffer
/**< */,
613 uint32_t notifies_len
/**< */);