etc/protocols - sync with NetBSD-8
[minix.git] / external / mit / xorg / lib / libxcb / files / shape.h
blobf37097fee79201287a5aec8c32b0950f124aad16
1 /*
2 * This file generated automatically from shape.xml by c_client.py.
3 * Edit at your peril.
4 */
6 /**
7 * @defgroup XCB_Shape_API XCB Shape API
8 * @brief Shape XCB Protocol Implementation.
9 * @{
10 **/
12 #ifndef __SHAPE_H
13 #define __SHAPE_H
15 #include "xcb.h"
16 #include "xproto.h"
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
22 #define XCB_SHAPE_MAJOR_VERSION 1
23 #define XCB_SHAPE_MINOR_VERSION 1
25 extern xcb_extension_t xcb_shape_id;
27 typedef uint8_t xcb_shape_op_t;
29 /**
30 * @brief xcb_shape_op_iterator_t
31 **/
32 typedef struct xcb_shape_op_iterator_t {
33 xcb_shape_op_t *data; /**< */
34 int rem; /**< */
35 int index; /**< */
36 } xcb_shape_op_iterator_t;
38 typedef uint8_t xcb_shape_kind_t;
40 /**
41 * @brief xcb_shape_kind_iterator_t
42 **/
43 typedef struct xcb_shape_kind_iterator_t {
44 xcb_shape_kind_t *data; /**< */
45 int rem; /**< */
46 int index; /**< */
47 } xcb_shape_kind_iterator_t;
49 typedef enum xcb_shape_so_t {
50 XCB_SHAPE_SO_SET = 0,
51 XCB_SHAPE_SO_UNION = 1,
52 XCB_SHAPE_SO_INTERSECT = 2,
53 XCB_SHAPE_SO_SUBTRACT = 3,
54 XCB_SHAPE_SO_INVERT = 4
55 } xcb_shape_so_t;
57 typedef enum xcb_shape_sk_t {
58 XCB_SHAPE_SK_BOUNDING = 0,
59 XCB_SHAPE_SK_CLIP = 1,
60 XCB_SHAPE_SK_INPUT = 2
61 } xcb_shape_sk_t;
63 /** Opcode for xcb_shape_notify. */
64 #define XCB_SHAPE_NOTIFY 0
66 /**
67 * @brief xcb_shape_notify_event_t
68 **/
69 typedef struct xcb_shape_notify_event_t {
70 uint8_t response_type; /**< */
71 xcb_shape_kind_t shape_kind; /**< */
72 uint16_t sequence; /**< */
73 xcb_window_t affected_window; /**< */
74 int16_t extents_x; /**< */
75 int16_t extents_y; /**< */
76 uint16_t extents_width; /**< */
77 uint16_t extents_height; /**< */
78 xcb_timestamp_t server_time; /**< */
79 uint8_t shaped; /**< */
80 uint8_t pad0[11]; /**< */
81 } xcb_shape_notify_event_t;
83 /**
84 * @brief xcb_shape_query_version_cookie_t
85 **/
86 typedef struct xcb_shape_query_version_cookie_t {
87 unsigned int sequence; /**< */
88 } xcb_shape_query_version_cookie_t;
90 /** Opcode for xcb_shape_query_version. */
91 #define XCB_SHAPE_QUERY_VERSION 0
93 /**
94 * @brief xcb_shape_query_version_request_t
95 **/
96 typedef struct xcb_shape_query_version_request_t {
97 uint8_t major_opcode; /**< */
98 uint8_t minor_opcode; /**< */
99 uint16_t length; /**< */
100 } xcb_shape_query_version_request_t;
103 * @brief xcb_shape_query_version_reply_t
105 typedef struct xcb_shape_query_version_reply_t {
106 uint8_t response_type; /**< */
107 uint8_t pad0; /**< */
108 uint16_t sequence; /**< */
109 uint32_t length; /**< */
110 uint16_t major_version; /**< */
111 uint16_t minor_version; /**< */
112 } xcb_shape_query_version_reply_t;
114 /** Opcode for xcb_shape_rectangles. */
115 #define XCB_SHAPE_RECTANGLES 1
118 * @brief xcb_shape_rectangles_request_t
120 typedef struct xcb_shape_rectangles_request_t {
121 uint8_t major_opcode; /**< */
122 uint8_t minor_opcode; /**< */
123 uint16_t length; /**< */
124 xcb_shape_op_t operation; /**< */
125 xcb_shape_kind_t destination_kind; /**< */
126 uint8_t ordering; /**< */
127 uint8_t pad0; /**< */
128 xcb_window_t destination_window; /**< */
129 int16_t x_offset; /**< */
130 int16_t y_offset; /**< */
131 } xcb_shape_rectangles_request_t;
133 /** Opcode for xcb_shape_mask. */
134 #define XCB_SHAPE_MASK 2
137 * @brief xcb_shape_mask_request_t
139 typedef struct xcb_shape_mask_request_t {
140 uint8_t major_opcode; /**< */
141 uint8_t minor_opcode; /**< */
142 uint16_t length; /**< */
143 xcb_shape_op_t operation; /**< */
144 xcb_shape_kind_t destination_kind; /**< */
145 uint8_t pad0[2]; /**< */
146 xcb_window_t destination_window; /**< */
147 int16_t x_offset; /**< */
148 int16_t y_offset; /**< */
149 xcb_pixmap_t source_bitmap; /**< */
150 } xcb_shape_mask_request_t;
152 /** Opcode for xcb_shape_combine. */
153 #define XCB_SHAPE_COMBINE 3
156 * @brief xcb_shape_combine_request_t
158 typedef struct xcb_shape_combine_request_t {
159 uint8_t major_opcode; /**< */
160 uint8_t minor_opcode; /**< */
161 uint16_t length; /**< */
162 xcb_shape_op_t operation; /**< */
163 xcb_shape_kind_t destination_kind; /**< */
164 xcb_shape_kind_t source_kind; /**< */
165 uint8_t pad0; /**< */
166 xcb_window_t destination_window; /**< */
167 int16_t x_offset; /**< */
168 int16_t y_offset; /**< */
169 xcb_window_t source_window; /**< */
170 } xcb_shape_combine_request_t;
172 /** Opcode for xcb_shape_offset. */
173 #define XCB_SHAPE_OFFSET 4
176 * @brief xcb_shape_offset_request_t
178 typedef struct xcb_shape_offset_request_t {
179 uint8_t major_opcode; /**< */
180 uint8_t minor_opcode; /**< */
181 uint16_t length; /**< */
182 xcb_shape_kind_t destination_kind; /**< */
183 uint8_t pad0[3]; /**< */
184 xcb_window_t destination_window; /**< */
185 int16_t x_offset; /**< */
186 int16_t y_offset; /**< */
187 } xcb_shape_offset_request_t;
190 * @brief xcb_shape_query_extents_cookie_t
192 typedef struct xcb_shape_query_extents_cookie_t {
193 unsigned int sequence; /**< */
194 } xcb_shape_query_extents_cookie_t;
196 /** Opcode for xcb_shape_query_extents. */
197 #define XCB_SHAPE_QUERY_EXTENTS 5
200 * @brief xcb_shape_query_extents_request_t
202 typedef struct xcb_shape_query_extents_request_t {
203 uint8_t major_opcode; /**< */
204 uint8_t minor_opcode; /**< */
205 uint16_t length; /**< */
206 xcb_window_t destination_window; /**< */
207 } xcb_shape_query_extents_request_t;
210 * @brief xcb_shape_query_extents_reply_t
212 typedef struct xcb_shape_query_extents_reply_t {
213 uint8_t response_type; /**< */
214 uint8_t pad0; /**< */
215 uint16_t sequence; /**< */
216 uint32_t length; /**< */
217 uint8_t bounding_shaped; /**< */
218 uint8_t clip_shaped; /**< */
219 uint8_t pad1[2]; /**< */
220 int16_t bounding_shape_extents_x; /**< */
221 int16_t bounding_shape_extents_y; /**< */
222 uint16_t bounding_shape_extents_width; /**< */
223 uint16_t bounding_shape_extents_height; /**< */
224 int16_t clip_shape_extents_x; /**< */
225 int16_t clip_shape_extents_y; /**< */
226 uint16_t clip_shape_extents_width; /**< */
227 uint16_t clip_shape_extents_height; /**< */
228 } xcb_shape_query_extents_reply_t;
230 /** Opcode for xcb_shape_select_input. */
231 #define XCB_SHAPE_SELECT_INPUT 6
234 * @brief xcb_shape_select_input_request_t
236 typedef struct xcb_shape_select_input_request_t {
237 uint8_t major_opcode; /**< */
238 uint8_t minor_opcode; /**< */
239 uint16_t length; /**< */
240 xcb_window_t destination_window; /**< */
241 uint8_t enable; /**< */
242 uint8_t pad0[3]; /**< */
243 } xcb_shape_select_input_request_t;
246 * @brief xcb_shape_input_selected_cookie_t
248 typedef struct xcb_shape_input_selected_cookie_t {
249 unsigned int sequence; /**< */
250 } xcb_shape_input_selected_cookie_t;
252 /** Opcode for xcb_shape_input_selected. */
253 #define XCB_SHAPE_INPUT_SELECTED 7
256 * @brief xcb_shape_input_selected_request_t
258 typedef struct xcb_shape_input_selected_request_t {
259 uint8_t major_opcode; /**< */
260 uint8_t minor_opcode; /**< */
261 uint16_t length; /**< */
262 xcb_window_t destination_window; /**< */
263 } xcb_shape_input_selected_request_t;
266 * @brief xcb_shape_input_selected_reply_t
268 typedef struct xcb_shape_input_selected_reply_t {
269 uint8_t response_type; /**< */
270 uint8_t enabled; /**< */
271 uint16_t sequence; /**< */
272 uint32_t length; /**< */
273 } xcb_shape_input_selected_reply_t;
276 * @brief xcb_shape_get_rectangles_cookie_t
278 typedef struct xcb_shape_get_rectangles_cookie_t {
279 unsigned int sequence; /**< */
280 } xcb_shape_get_rectangles_cookie_t;
282 /** Opcode for xcb_shape_get_rectangles. */
283 #define XCB_SHAPE_GET_RECTANGLES 8
286 * @brief xcb_shape_get_rectangles_request_t
288 typedef struct xcb_shape_get_rectangles_request_t {
289 uint8_t major_opcode; /**< */
290 uint8_t minor_opcode; /**< */
291 uint16_t length; /**< */
292 xcb_window_t window; /**< */
293 xcb_shape_kind_t source_kind; /**< */
294 uint8_t pad0[3]; /**< */
295 } xcb_shape_get_rectangles_request_t;
298 * @brief xcb_shape_get_rectangles_reply_t
300 typedef struct xcb_shape_get_rectangles_reply_t {
301 uint8_t response_type; /**< */
302 uint8_t ordering; /**< */
303 uint16_t sequence; /**< */
304 uint32_t length; /**< */
305 uint32_t rectangles_len; /**< */
306 uint8_t pad0[20]; /**< */
307 } xcb_shape_get_rectangles_reply_t;
310 * Get the next element of the iterator
311 * @param i Pointer to a xcb_shape_op_iterator_t
313 * Get the next element in the iterator. The member rem is
314 * decreased by one. The member data points to the next
315 * element. The member index is increased by sizeof(xcb_shape_op_t)
317 void
318 xcb_shape_op_next (xcb_shape_op_iterator_t *i /**< */);
321 * Return the iterator pointing to the last element
322 * @param i An xcb_shape_op_iterator_t
323 * @return The iterator pointing to the last element
325 * Set the current element in the iterator to the last element.
326 * The member rem is set to 0. The member data points to the
327 * last element.
329 xcb_generic_iterator_t
330 xcb_shape_op_end (xcb_shape_op_iterator_t i /**< */);
333 * Get the next element of the iterator
334 * @param i Pointer to a xcb_shape_kind_iterator_t
336 * Get the next element in the iterator. The member rem is
337 * decreased by one. The member data points to the next
338 * element. The member index is increased by sizeof(xcb_shape_kind_t)
340 void
341 xcb_shape_kind_next (xcb_shape_kind_iterator_t *i /**< */);
344 * Return the iterator pointing to the last element
345 * @param i An xcb_shape_kind_iterator_t
346 * @return The iterator pointing to the last element
348 * Set the current element in the iterator to the last element.
349 * The member rem is set to 0. The member data points to the
350 * last element.
352 xcb_generic_iterator_t
353 xcb_shape_kind_end (xcb_shape_kind_iterator_t i /**< */);
357 * @param c The connection
358 * @return A cookie
360 * Delivers a request to the X server.
363 xcb_shape_query_version_cookie_t
364 xcb_shape_query_version (xcb_connection_t *c /**< */);
368 * @param c The connection
369 * @return A cookie
371 * Delivers a request to the X server.
373 * This form can be used only if the request will cause
374 * a reply to be generated. Any returned error will be
375 * placed in the event queue.
377 xcb_shape_query_version_cookie_t
378 xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */);
381 * Return the reply
382 * @param c The connection
383 * @param cookie The cookie
384 * @param e The xcb_generic_error_t supplied
386 * Returns the reply of the request asked by
388 * The parameter @p e supplied to this function must be NULL if
389 * xcb_shape_query_version_unchecked(). is used.
390 * Otherwise, it stores the error if any.
392 * The returned value must be freed by the caller using free().
394 xcb_shape_query_version_reply_t *
395 xcb_shape_query_version_reply (xcb_connection_t *c /**< */,
396 xcb_shape_query_version_cookie_t cookie /**< */,
397 xcb_generic_error_t **e /**< */);
400 xcb_shape_rectangles_sizeof (const void *_buffer /**< */,
401 uint32_t rectangles_len /**< */);
405 * @param c The connection
406 * @return A cookie
408 * Delivers a request to the X server.
410 * This form can be used only if the request will not cause
411 * a reply to be generated. Any returned error will be
412 * saved for handling by xcb_request_check().
414 xcb_void_cookie_t
415 xcb_shape_rectangles_checked (xcb_connection_t *c /**< */,
416 xcb_shape_op_t operation /**< */,
417 xcb_shape_kind_t destination_kind /**< */,
418 uint8_t ordering /**< */,
419 xcb_window_t destination_window /**< */,
420 int16_t x_offset /**< */,
421 int16_t y_offset /**< */,
422 uint32_t rectangles_len /**< */,
423 const xcb_rectangle_t *rectangles /**< */);
427 * @param c The connection
428 * @return A cookie
430 * Delivers a request to the X server.
433 xcb_void_cookie_t
434 xcb_shape_rectangles (xcb_connection_t *c /**< */,
435 xcb_shape_op_t operation /**< */,
436 xcb_shape_kind_t destination_kind /**< */,
437 uint8_t ordering /**< */,
438 xcb_window_t destination_window /**< */,
439 int16_t x_offset /**< */,
440 int16_t y_offset /**< */,
441 uint32_t rectangles_len /**< */,
442 const xcb_rectangle_t *rectangles /**< */);
446 * @param c The connection
447 * @return A cookie
449 * Delivers a request to the X server.
451 * This form can be used only if the request will not cause
452 * a reply to be generated. Any returned error will be
453 * saved for handling by xcb_request_check().
455 xcb_void_cookie_t
456 xcb_shape_mask_checked (xcb_connection_t *c /**< */,
457 xcb_shape_op_t operation /**< */,
458 xcb_shape_kind_t destination_kind /**< */,
459 xcb_window_t destination_window /**< */,
460 int16_t x_offset /**< */,
461 int16_t y_offset /**< */,
462 xcb_pixmap_t source_bitmap /**< */);
466 * @param c The connection
467 * @return A cookie
469 * Delivers a request to the X server.
472 xcb_void_cookie_t
473 xcb_shape_mask (xcb_connection_t *c /**< */,
474 xcb_shape_op_t operation /**< */,
475 xcb_shape_kind_t destination_kind /**< */,
476 xcb_window_t destination_window /**< */,
477 int16_t x_offset /**< */,
478 int16_t y_offset /**< */,
479 xcb_pixmap_t source_bitmap /**< */);
483 * @param c The connection
484 * @return A cookie
486 * Delivers a request to the X server.
488 * This form can be used only if the request will not cause
489 * a reply to be generated. Any returned error will be
490 * saved for handling by xcb_request_check().
492 xcb_void_cookie_t
493 xcb_shape_combine_checked (xcb_connection_t *c /**< */,
494 xcb_shape_op_t operation /**< */,
495 xcb_shape_kind_t destination_kind /**< */,
496 xcb_shape_kind_t source_kind /**< */,
497 xcb_window_t destination_window /**< */,
498 int16_t x_offset /**< */,
499 int16_t y_offset /**< */,
500 xcb_window_t source_window /**< */);
504 * @param c The connection
505 * @return A cookie
507 * Delivers a request to the X server.
510 xcb_void_cookie_t
511 xcb_shape_combine (xcb_connection_t *c /**< */,
512 xcb_shape_op_t operation /**< */,
513 xcb_shape_kind_t destination_kind /**< */,
514 xcb_shape_kind_t source_kind /**< */,
515 xcb_window_t destination_window /**< */,
516 int16_t x_offset /**< */,
517 int16_t y_offset /**< */,
518 xcb_window_t source_window /**< */);
522 * @param c The connection
523 * @return A cookie
525 * Delivers a request to the X server.
527 * This form can be used only if the request will not cause
528 * a reply to be generated. Any returned error will be
529 * saved for handling by xcb_request_check().
531 xcb_void_cookie_t
532 xcb_shape_offset_checked (xcb_connection_t *c /**< */,
533 xcb_shape_kind_t destination_kind /**< */,
534 xcb_window_t destination_window /**< */,
535 int16_t x_offset /**< */,
536 int16_t y_offset /**< */);
540 * @param c The connection
541 * @return A cookie
543 * Delivers a request to the X server.
546 xcb_void_cookie_t
547 xcb_shape_offset (xcb_connection_t *c /**< */,
548 xcb_shape_kind_t destination_kind /**< */,
549 xcb_window_t destination_window /**< */,
550 int16_t x_offset /**< */,
551 int16_t y_offset /**< */);
555 * @param c The connection
556 * @return A cookie
558 * Delivers a request to the X server.
561 xcb_shape_query_extents_cookie_t
562 xcb_shape_query_extents (xcb_connection_t *c /**< */,
563 xcb_window_t destination_window /**< */);
567 * @param c The connection
568 * @return A cookie
570 * Delivers a request to the X server.
572 * This form can be used only if the request will cause
573 * a reply to be generated. Any returned error will be
574 * placed in the event queue.
576 xcb_shape_query_extents_cookie_t
577 xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */,
578 xcb_window_t destination_window /**< */);
581 * Return the reply
582 * @param c The connection
583 * @param cookie The cookie
584 * @param e The xcb_generic_error_t supplied
586 * Returns the reply of the request asked by
588 * The parameter @p e supplied to this function must be NULL if
589 * xcb_shape_query_extents_unchecked(). is used.
590 * Otherwise, it stores the error if any.
592 * The returned value must be freed by the caller using free().
594 xcb_shape_query_extents_reply_t *
595 xcb_shape_query_extents_reply (xcb_connection_t *c /**< */,
596 xcb_shape_query_extents_cookie_t cookie /**< */,
597 xcb_generic_error_t **e /**< */);
601 * @param c The connection
602 * @return A cookie
604 * Delivers a request to the X server.
606 * This form can be used only if the request will not cause
607 * a reply to be generated. Any returned error will be
608 * saved for handling by xcb_request_check().
610 xcb_void_cookie_t
611 xcb_shape_select_input_checked (xcb_connection_t *c /**< */,
612 xcb_window_t destination_window /**< */,
613 uint8_t enable /**< */);
617 * @param c The connection
618 * @return A cookie
620 * Delivers a request to the X server.
623 xcb_void_cookie_t
624 xcb_shape_select_input (xcb_connection_t *c /**< */,
625 xcb_window_t destination_window /**< */,
626 uint8_t enable /**< */);
630 * @param c The connection
631 * @return A cookie
633 * Delivers a request to the X server.
636 xcb_shape_input_selected_cookie_t
637 xcb_shape_input_selected (xcb_connection_t *c /**< */,
638 xcb_window_t destination_window /**< */);
642 * @param c The connection
643 * @return A cookie
645 * Delivers a request to the X server.
647 * This form can be used only if the request will cause
648 * a reply to be generated. Any returned error will be
649 * placed in the event queue.
651 xcb_shape_input_selected_cookie_t
652 xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */,
653 xcb_window_t destination_window /**< */);
656 * Return the reply
657 * @param c The connection
658 * @param cookie The cookie
659 * @param e The xcb_generic_error_t supplied
661 * Returns the reply of the request asked by
663 * The parameter @p e supplied to this function must be NULL if
664 * xcb_shape_input_selected_unchecked(). is used.
665 * Otherwise, it stores the error if any.
667 * The returned value must be freed by the caller using free().
669 xcb_shape_input_selected_reply_t *
670 xcb_shape_input_selected_reply (xcb_connection_t *c /**< */,
671 xcb_shape_input_selected_cookie_t cookie /**< */,
672 xcb_generic_error_t **e /**< */);
675 xcb_shape_get_rectangles_sizeof (const void *_buffer /**< */);
679 * @param c The connection
680 * @return A cookie
682 * Delivers a request to the X server.
685 xcb_shape_get_rectangles_cookie_t
686 xcb_shape_get_rectangles (xcb_connection_t *c /**< */,
687 xcb_window_t window /**< */,
688 xcb_shape_kind_t source_kind /**< */);
692 * @param c The connection
693 * @return A cookie
695 * Delivers a request to the X server.
697 * This form can be used only if the request will cause
698 * a reply to be generated. Any returned error will be
699 * placed in the event queue.
701 xcb_shape_get_rectangles_cookie_t
702 xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */,
703 xcb_window_t window /**< */,
704 xcb_shape_kind_t source_kind /**< */);
706 xcb_rectangle_t *
707 xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R /**< */);
710 xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R /**< */);
712 xcb_rectangle_iterator_t
713 xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R /**< */);
716 * Return the reply
717 * @param c The connection
718 * @param cookie The cookie
719 * @param e The xcb_generic_error_t supplied
721 * Returns the reply of the request asked by
723 * The parameter @p e supplied to this function must be NULL if
724 * xcb_shape_get_rectangles_unchecked(). is used.
725 * Otherwise, it stores the error if any.
727 * The returned value must be freed by the caller using free().
729 xcb_shape_get_rectangles_reply_t *
730 xcb_shape_get_rectangles_reply (xcb_connection_t *c /**< */,
731 xcb_shape_get_rectangles_cookie_t cookie /**< */,
732 xcb_generic_error_t **e /**< */);
735 #ifdef __cplusplus
737 #endif
739 #endif
742 * @}