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