1/*
2 * This file generated automatically from damage.xml by c_client.py.
3 * Edit at your peril.
4 */
5
6/**
7 * @defgroup XCB_Damage_API XCB Damage API
8 * @brief Damage XCB Protocol Implementation.
9 * @{
10 **/
11
12#ifndef __DAMAGE_H
13#define __DAMAGE_H
14
15#include "xcb.h"
16#include "xproto.h"
17#include "xfixes.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23#define XCB_DAMAGE_MAJOR_VERSION 1
24#define XCB_DAMAGE_MINOR_VERSION 1
25
26extern xcb_extension_t xcb_damage_id;
27
28typedef uint32_t xcb_damage_damage_t;
29
30/**
31 * @brief xcb_damage_damage_iterator_t
32 **/
33typedef struct xcb_damage_damage_iterator_t {
34 xcb_damage_damage_t *data;
35 int rem;
36 int index;
37} xcb_damage_damage_iterator_t;
38
39typedef enum xcb_damage_report_level_t {
40 XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES = 0,
41 XCB_DAMAGE_REPORT_LEVEL_DELTA_RECTANGLES = 1,
42 XCB_DAMAGE_REPORT_LEVEL_BOUNDING_BOX = 2,
43 XCB_DAMAGE_REPORT_LEVEL_NON_EMPTY = 3
44} xcb_damage_report_level_t;
45
46/** Opcode for xcb_damage_bad_damage. */
47#define XCB_DAMAGE_BAD_DAMAGE 0
48
49/**
50 * @brief xcb_damage_bad_damage_error_t
51 **/
52typedef struct xcb_damage_bad_damage_error_t {
53 uint8_t response_type;
54 uint8_t error_code;
55 uint16_t sequence;
56} xcb_damage_bad_damage_error_t;
57
58/**
59 * @brief xcb_damage_query_version_cookie_t
60 **/
61typedef struct xcb_damage_query_version_cookie_t {
62 unsigned int sequence;
63} xcb_damage_query_version_cookie_t;
64
65/** Opcode for xcb_damage_query_version. */
66#define XCB_DAMAGE_QUERY_VERSION 0
67
68/**
69 * @brief xcb_damage_query_version_request_t
70 **/
71typedef struct xcb_damage_query_version_request_t {
72 uint8_t major_opcode;
73 uint8_t minor_opcode;
74 uint16_t length;
75 uint32_t client_major_version;
76 uint32_t client_minor_version;
77} xcb_damage_query_version_request_t;
78
79/**
80 * @brief xcb_damage_query_version_reply_t
81 **/
82typedef struct xcb_damage_query_version_reply_t {
83 uint8_t response_type;
84 uint8_t pad0;
85 uint16_t sequence;
86 uint32_t length;
87 uint32_t major_version;
88 uint32_t minor_version;
89 uint8_t pad1[16];
90} xcb_damage_query_version_reply_t;
91
92/** Opcode for xcb_damage_create. */
93#define XCB_DAMAGE_CREATE 1
94
95/**
96 * @brief xcb_damage_create_request_t
97 **/
98typedef struct xcb_damage_create_request_t {
99 uint8_t major_opcode;
100 uint8_t minor_opcode;
101 uint16_t length;
102 xcb_damage_damage_t damage;
103 xcb_drawable_t drawable;
104 uint8_t level;
105 uint8_t pad0[3];
106} xcb_damage_create_request_t;
107
108/** Opcode for xcb_damage_destroy. */
109#define XCB_DAMAGE_DESTROY 2
110
111/**
112 * @brief xcb_damage_destroy_request_t
113 **/
114typedef struct xcb_damage_destroy_request_t {
115 uint8_t major_opcode;
116 uint8_t minor_opcode;
117 uint16_t length;
118 xcb_damage_damage_t damage;
119} xcb_damage_destroy_request_t;
120
121/** Opcode for xcb_damage_subtract. */
122#define XCB_DAMAGE_SUBTRACT 3
123
124/**
125 * @brief xcb_damage_subtract_request_t
126 **/
127typedef struct xcb_damage_subtract_request_t {
128 uint8_t major_opcode;
129 uint8_t minor_opcode;
130 uint16_t length;
131 xcb_damage_damage_t damage;
132 xcb_xfixes_region_t repair;
133 xcb_xfixes_region_t parts;
134} xcb_damage_subtract_request_t;
135
136/** Opcode for xcb_damage_add. */
137#define XCB_DAMAGE_ADD 4
138
139/**
140 * @brief xcb_damage_add_request_t
141 **/
142typedef struct xcb_damage_add_request_t {
143 uint8_t major_opcode;
144 uint8_t minor_opcode;
145 uint16_t length;
146 xcb_drawable_t drawable;
147 xcb_xfixes_region_t region;
148} xcb_damage_add_request_t;
149
150/** Opcode for xcb_damage_notify. */
151#define XCB_DAMAGE_NOTIFY 0
152
153/**
154 * @brief xcb_damage_notify_event_t
155 **/
156typedef struct xcb_damage_notify_event_t {
157 uint8_t response_type;
158 uint8_t level;
159 uint16_t sequence;
160 xcb_drawable_t drawable;
161 xcb_damage_damage_t damage;
162 xcb_timestamp_t timestamp;
163 xcb_rectangle_t area;
164 xcb_rectangle_t geometry;
165} xcb_damage_notify_event_t;
166
167/**
168 * Get the next element of the iterator
169 * @param i Pointer to a xcb_damage_damage_iterator_t
170 *
171 * Get the next element in the iterator. The member rem is
172 * decreased by one. The member data points to the next
173 * element. The member index is increased by sizeof(xcb_damage_damage_t)
174 */
175void
176xcb_damage_damage_next (xcb_damage_damage_iterator_t *i);
177
178/**
179 * Return the iterator pointing to the last element
180 * @param i An xcb_damage_damage_iterator_t
181 * @return The iterator pointing to the last element
182 *
183 * Set the current element in the iterator to the last element.
184 * The member rem is set to 0. The member data points to the
185 * last element.
186 */
187xcb_generic_iterator_t
188xcb_damage_damage_end (xcb_damage_damage_iterator_t i);
189
190/**
191 *
192 * @param c The connection
193 * @return A cookie
194 *
195 * Delivers a request to the X server.
196 *
197 */
198xcb_damage_query_version_cookie_t
199xcb_damage_query_version (xcb_connection_t *c,
200 uint32_t client_major_version,
201 uint32_t client_minor_version);
202
203/**
204 *
205 * @param c The connection
206 * @return A cookie
207 *
208 * Delivers a request to the X server.
209 *
210 * This form can be used only if the request will cause
211 * a reply to be generated. Any returned error will be
212 * placed in the event queue.
213 */
214xcb_damage_query_version_cookie_t
215xcb_damage_query_version_unchecked (xcb_connection_t *c,
216 uint32_t client_major_version,
217 uint32_t client_minor_version);
218
219/**
220 * Return the reply
221 * @param c The connection
222 * @param cookie The cookie
223 * @param e The xcb_generic_error_t supplied
224 *
225 * Returns the reply of the request asked by
226 *
227 * The parameter @p e supplied to this function must be NULL if
228 * xcb_damage_query_version_unchecked(). is used.
229 * Otherwise, it stores the error if any.
230 *
231 * The returned value must be freed by the caller using free().
232 */
233xcb_damage_query_version_reply_t *
234xcb_damage_query_version_reply (xcb_connection_t *c,
235 xcb_damage_query_version_cookie_t cookie /**< */,
236 xcb_generic_error_t **e);
237
238/**
239 *
240 * @param c The connection
241 * @return A cookie
242 *
243 * Delivers a request to the X server.
244 *
245 * This form can be used only if the request will not cause
246 * a reply to be generated. Any returned error will be
247 * saved for handling by xcb_request_check().
248 */
249xcb_void_cookie_t
250xcb_damage_create_checked (xcb_connection_t *c,
251 xcb_damage_damage_t damage,
252 xcb_drawable_t drawable,
253 uint8_t level);
254
255/**
256 *
257 * @param c The connection
258 * @return A cookie
259 *
260 * Delivers a request to the X server.
261 *
262 */
263xcb_void_cookie_t
264xcb_damage_create (xcb_connection_t *c,
265 xcb_damage_damage_t damage,
266 xcb_drawable_t drawable,
267 uint8_t level);
268
269/**
270 *
271 * @param c The connection
272 * @return A cookie
273 *
274 * Delivers a request to the X server.
275 *
276 * This form can be used only if the request will not cause
277 * a reply to be generated. Any returned error will be
278 * saved for handling by xcb_request_check().
279 */
280xcb_void_cookie_t
281xcb_damage_destroy_checked (xcb_connection_t *c,
282 xcb_damage_damage_t damage);
283
284/**
285 *
286 * @param c The connection
287 * @return A cookie
288 *
289 * Delivers a request to the X server.
290 *
291 */
292xcb_void_cookie_t
293xcb_damage_destroy (xcb_connection_t *c,
294 xcb_damage_damage_t damage);
295
296/**
297 *
298 * @param c The connection
299 * @return A cookie
300 *
301 * Delivers a request to the X server.
302 *
303 * This form can be used only if the request will not cause
304 * a reply to be generated. Any returned error will be
305 * saved for handling by xcb_request_check().
306 */
307xcb_void_cookie_t
308xcb_damage_subtract_checked (xcb_connection_t *c,
309 xcb_damage_damage_t damage,
310 xcb_xfixes_region_t repair,
311 xcb_xfixes_region_t parts);
312
313/**
314 *
315 * @param c The connection
316 * @return A cookie
317 *
318 * Delivers a request to the X server.
319 *
320 */
321xcb_void_cookie_t
322xcb_damage_subtract (xcb_connection_t *c,
323 xcb_damage_damage_t damage,
324 xcb_xfixes_region_t repair,
325 xcb_xfixes_region_t parts);
326
327/**
328 *
329 * @param c The connection
330 * @return A cookie
331 *
332 * Delivers a request to the X server.
333 *
334 * This form can be used only if the request will not cause
335 * a reply to be generated. Any returned error will be
336 * saved for handling by xcb_request_check().
337 */
338xcb_void_cookie_t
339xcb_damage_add_checked (xcb_connection_t *c,
340 xcb_drawable_t drawable,
341 xcb_xfixes_region_t region);
342
343/**
344 *
345 * @param c The connection
346 * @return A cookie
347 *
348 * Delivers a request to the X server.
349 *
350 */
351xcb_void_cookie_t
352xcb_damage_add (xcb_connection_t *c,
353 xcb_drawable_t drawable,
354 xcb_xfixes_region_t region);
355
356
357#ifdef __cplusplus
358}
359#endif
360
361#endif
362
363/**
364 * @}
365 */
366