1 | /* Generated by wayland-scanner 1.16.0 */ |
2 | |
3 | /* |
4 | * Copyright © 2008-2011 Kristian Høgsberg |
5 | * Copyright © 2010-2011 Intel Corporation |
6 | * Copyright © 2012-2013 Collabora, Ltd. |
7 | * |
8 | * Permission is hereby granted, free of charge, to any person |
9 | * obtaining a copy of this software and associated documentation files |
10 | * (the "Software"), to deal in the Software without restriction, |
11 | * including without limitation the rights to use, copy, modify, merge, |
12 | * publish, distribute, sublicense, and/or sell copies of the Software, |
13 | * and to permit persons to whom the Software is furnished to do so, |
14 | * subject to the following conditions: |
15 | * |
16 | * The above copyright notice and this permission notice (including the |
17 | * next paragraph) shall be included in all copies or substantial |
18 | * portions of the Software. |
19 | * |
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
23 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS |
24 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
25 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
26 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
27 | * SOFTWARE. |
28 | */ |
29 | |
30 | #include <stdlib.h> |
31 | #include <stdint.h> |
32 | #include "wayland-util.h" |
33 | |
34 | #ifndef __has_attribute |
35 | # define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ |
36 | #endif |
37 | |
38 | #if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) |
39 | #define WL_PRIVATE __attribute__ ((visibility("hidden"))) |
40 | #else |
41 | #define WL_PRIVATE |
42 | #endif |
43 | |
44 | extern const struct wl_interface wl_buffer_interface; |
45 | extern const struct wl_interface wl_callback_interface; |
46 | extern const struct wl_interface wl_data_device_interface; |
47 | extern const struct wl_interface wl_data_offer_interface; |
48 | extern const struct wl_interface wl_data_source_interface; |
49 | extern const struct wl_interface wl_keyboard_interface; |
50 | extern const struct wl_interface wl_output_interface; |
51 | extern const struct wl_interface wl_pointer_interface; |
52 | extern const struct wl_interface wl_region_interface; |
53 | extern const struct wl_interface wl_registry_interface; |
54 | extern const struct wl_interface wl_seat_interface; |
55 | extern const struct wl_interface wl_shell_surface_interface; |
56 | extern const struct wl_interface wl_shm_pool_interface; |
57 | extern const struct wl_interface wl_subsurface_interface; |
58 | extern const struct wl_interface wl_surface_interface; |
59 | extern const struct wl_interface wl_touch_interface; |
60 | |
61 | static const struct wl_interface *types[] = { |
62 | NULL, |
63 | NULL, |
64 | NULL, |
65 | NULL, |
66 | NULL, |
67 | NULL, |
68 | NULL, |
69 | NULL, |
70 | &wl_callback_interface, |
71 | &wl_registry_interface, |
72 | &wl_surface_interface, |
73 | &wl_region_interface, |
74 | &wl_buffer_interface, |
75 | NULL, |
76 | NULL, |
77 | NULL, |
78 | NULL, |
79 | NULL, |
80 | &wl_shm_pool_interface, |
81 | NULL, |
82 | NULL, |
83 | &wl_data_source_interface, |
84 | &wl_surface_interface, |
85 | &wl_surface_interface, |
86 | NULL, |
87 | &wl_data_source_interface, |
88 | NULL, |
89 | &wl_data_offer_interface, |
90 | NULL, |
91 | &wl_surface_interface, |
92 | NULL, |
93 | NULL, |
94 | &wl_data_offer_interface, |
95 | &wl_data_offer_interface, |
96 | &wl_data_source_interface, |
97 | &wl_data_device_interface, |
98 | &wl_seat_interface, |
99 | &wl_shell_surface_interface, |
100 | &wl_surface_interface, |
101 | &wl_seat_interface, |
102 | NULL, |
103 | &wl_seat_interface, |
104 | NULL, |
105 | NULL, |
106 | &wl_surface_interface, |
107 | NULL, |
108 | NULL, |
109 | NULL, |
110 | NULL, |
111 | NULL, |
112 | &wl_output_interface, |
113 | &wl_seat_interface, |
114 | NULL, |
115 | &wl_surface_interface, |
116 | NULL, |
117 | NULL, |
118 | NULL, |
119 | &wl_output_interface, |
120 | &wl_buffer_interface, |
121 | NULL, |
122 | NULL, |
123 | &wl_callback_interface, |
124 | &wl_region_interface, |
125 | &wl_region_interface, |
126 | &wl_output_interface, |
127 | &wl_output_interface, |
128 | &wl_pointer_interface, |
129 | &wl_keyboard_interface, |
130 | &wl_touch_interface, |
131 | NULL, |
132 | &wl_surface_interface, |
133 | NULL, |
134 | NULL, |
135 | NULL, |
136 | &wl_surface_interface, |
137 | NULL, |
138 | NULL, |
139 | NULL, |
140 | &wl_surface_interface, |
141 | NULL, |
142 | &wl_surface_interface, |
143 | NULL, |
144 | NULL, |
145 | &wl_surface_interface, |
146 | NULL, |
147 | NULL, |
148 | &wl_surface_interface, |
149 | NULL, |
150 | NULL, |
151 | NULL, |
152 | &wl_subsurface_interface, |
153 | &wl_surface_interface, |
154 | &wl_surface_interface, |
155 | &wl_surface_interface, |
156 | &wl_surface_interface, |
157 | }; |
158 | |
159 | static const struct wl_message wl_display_requests[] = { |
160 | { "sync" , "n" , types + 8 }, |
161 | { "get_registry" , "n" , types + 9 }, |
162 | }; |
163 | |
164 | static const struct wl_message wl_display_events[] = { |
165 | { "error" , "ous" , types + 0 }, |
166 | { "delete_id" , "u" , types + 0 }, |
167 | }; |
168 | |
169 | WL_PRIVATE const struct wl_interface wl_display_interface = { |
170 | "wl_display" , 1, |
171 | 2, wl_display_requests, |
172 | 2, wl_display_events, |
173 | }; |
174 | |
175 | static const struct wl_message wl_registry_requests[] = { |
176 | { "bind" , "usun" , types + 0 }, |
177 | }; |
178 | |
179 | static const struct wl_message wl_registry_events[] = { |
180 | { "global" , "usu" , types + 0 }, |
181 | { "global_remove" , "u" , types + 0 }, |
182 | }; |
183 | |
184 | WL_PRIVATE const struct wl_interface wl_registry_interface = { |
185 | "wl_registry" , 1, |
186 | 1, wl_registry_requests, |
187 | 2, wl_registry_events, |
188 | }; |
189 | |
190 | static const struct wl_message wl_callback_events[] = { |
191 | { "done" , "u" , types + 0 }, |
192 | }; |
193 | |
194 | WL_PRIVATE const struct wl_interface wl_callback_interface = { |
195 | "wl_callback" , 1, |
196 | 0, NULL, |
197 | 1, wl_callback_events, |
198 | }; |
199 | |
200 | static const struct wl_message wl_compositor_requests[] = { |
201 | { "create_surface" , "n" , types + 10 }, |
202 | { "create_region" , "n" , types + 11 }, |
203 | }; |
204 | |
205 | WL_PRIVATE const struct wl_interface wl_compositor_interface = { |
206 | "wl_compositor" , 4, |
207 | 2, wl_compositor_requests, |
208 | 0, NULL, |
209 | }; |
210 | |
211 | static const struct wl_message wl_shm_pool_requests[] = { |
212 | { "create_buffer" , "niiiiu" , types + 12 }, |
213 | { "destroy" , "" , types + 0 }, |
214 | { "resize" , "i" , types + 0 }, |
215 | }; |
216 | |
217 | WL_PRIVATE const struct wl_interface wl_shm_pool_interface = { |
218 | "wl_shm_pool" , 1, |
219 | 3, wl_shm_pool_requests, |
220 | 0, NULL, |
221 | }; |
222 | |
223 | static const struct wl_message wl_shm_requests[] = { |
224 | { "create_pool" , "nhi" , types + 18 }, |
225 | }; |
226 | |
227 | static const struct wl_message wl_shm_events[] = { |
228 | { "format" , "u" , types + 0 }, |
229 | }; |
230 | |
231 | WL_PRIVATE const struct wl_interface wl_shm_interface = { |
232 | "wl_shm" , 1, |
233 | 1, wl_shm_requests, |
234 | 1, wl_shm_events, |
235 | }; |
236 | |
237 | static const struct wl_message wl_buffer_requests[] = { |
238 | { "destroy" , "" , types + 0 }, |
239 | }; |
240 | |
241 | static const struct wl_message wl_buffer_events[] = { |
242 | { "release" , "" , types + 0 }, |
243 | }; |
244 | |
245 | WL_PRIVATE const struct wl_interface wl_buffer_interface = { |
246 | "wl_buffer" , 1, |
247 | 1, wl_buffer_requests, |
248 | 1, wl_buffer_events, |
249 | }; |
250 | |
251 | static const struct wl_message wl_data_offer_requests[] = { |
252 | { "accept" , "u?s" , types + 0 }, |
253 | { "receive" , "sh" , types + 0 }, |
254 | { "destroy" , "" , types + 0 }, |
255 | { "finish" , "3" , types + 0 }, |
256 | { "set_actions" , "3uu" , types + 0 }, |
257 | }; |
258 | |
259 | static const struct wl_message wl_data_offer_events[] = { |
260 | { "offer" , "s" , types + 0 }, |
261 | { "source_actions" , "3u" , types + 0 }, |
262 | { "action" , "3u" , types + 0 }, |
263 | }; |
264 | |
265 | WL_PRIVATE const struct wl_interface wl_data_offer_interface = { |
266 | "wl_data_offer" , 3, |
267 | 5, wl_data_offer_requests, |
268 | 3, wl_data_offer_events, |
269 | }; |
270 | |
271 | static const struct wl_message wl_data_source_requests[] = { |
272 | { "offer" , "s" , types + 0 }, |
273 | { "destroy" , "" , types + 0 }, |
274 | { "set_actions" , "3u" , types + 0 }, |
275 | }; |
276 | |
277 | static const struct wl_message wl_data_source_events[] = { |
278 | { "target" , "?s" , types + 0 }, |
279 | { "send" , "sh" , types + 0 }, |
280 | { "cancelled" , "" , types + 0 }, |
281 | { "dnd_drop_performed" , "3" , types + 0 }, |
282 | { "dnd_finished" , "3" , types + 0 }, |
283 | { "action" , "3u" , types + 0 }, |
284 | }; |
285 | |
286 | WL_PRIVATE const struct wl_interface wl_data_source_interface = { |
287 | "wl_data_source" , 3, |
288 | 3, wl_data_source_requests, |
289 | 6, wl_data_source_events, |
290 | }; |
291 | |
292 | static const struct wl_message wl_data_device_requests[] = { |
293 | { "start_drag" , "?oo?ou" , types + 21 }, |
294 | { "set_selection" , "?ou" , types + 25 }, |
295 | { "release" , "2" , types + 0 }, |
296 | }; |
297 | |
298 | static const struct wl_message wl_data_device_events[] = { |
299 | { "data_offer" , "n" , types + 27 }, |
300 | { "enter" , "uoff?o" , types + 28 }, |
301 | { "leave" , "" , types + 0 }, |
302 | { "motion" , "uff" , types + 0 }, |
303 | { "drop" , "" , types + 0 }, |
304 | { "selection" , "?o" , types + 33 }, |
305 | }; |
306 | |
307 | WL_PRIVATE const struct wl_interface wl_data_device_interface = { |
308 | "wl_data_device" , 3, |
309 | 3, wl_data_device_requests, |
310 | 6, wl_data_device_events, |
311 | }; |
312 | |
313 | static const struct wl_message wl_data_device_manager_requests[] = { |
314 | { "create_data_source" , "n" , types + 34 }, |
315 | { "get_data_device" , "no" , types + 35 }, |
316 | }; |
317 | |
318 | WL_PRIVATE const struct wl_interface wl_data_device_manager_interface = { |
319 | "wl_data_device_manager" , 3, |
320 | 2, wl_data_device_manager_requests, |
321 | 0, NULL, |
322 | }; |
323 | |
324 | static const struct wl_message wl_shell_requests[] = { |
325 | { "get_shell_surface" , "no" , types + 37 }, |
326 | }; |
327 | |
328 | WL_PRIVATE const struct wl_interface wl_shell_interface = { |
329 | "wl_shell" , 1, |
330 | 1, wl_shell_requests, |
331 | 0, NULL, |
332 | }; |
333 | |
334 | static const struct wl_message wl_shell_surface_requests[] = { |
335 | { "pong" , "u" , types + 0 }, |
336 | { "move" , "ou" , types + 39 }, |
337 | { "resize" , "ouu" , types + 41 }, |
338 | { "set_toplevel" , "" , types + 0 }, |
339 | { "set_transient" , "oiiu" , types + 44 }, |
340 | { "set_fullscreen" , "uu?o" , types + 48 }, |
341 | { "set_popup" , "ouoiiu" , types + 51 }, |
342 | { "set_maximized" , "?o" , types + 57 }, |
343 | { "set_title" , "s" , types + 0 }, |
344 | { "set_class" , "s" , types + 0 }, |
345 | }; |
346 | |
347 | static const struct wl_message wl_shell_surface_events[] = { |
348 | { "ping" , "u" , types + 0 }, |
349 | { "configure" , "uii" , types + 0 }, |
350 | { "popup_done" , "" , types + 0 }, |
351 | }; |
352 | |
353 | WL_PRIVATE const struct wl_interface wl_shell_surface_interface = { |
354 | "wl_shell_surface" , 1, |
355 | 10, wl_shell_surface_requests, |
356 | 3, wl_shell_surface_events, |
357 | }; |
358 | |
359 | static const struct wl_message wl_surface_requests[] = { |
360 | { "destroy" , "" , types + 0 }, |
361 | { "attach" , "?oii" , types + 58 }, |
362 | { "damage" , "iiii" , types + 0 }, |
363 | { "frame" , "n" , types + 61 }, |
364 | { "set_opaque_region" , "?o" , types + 62 }, |
365 | { "set_input_region" , "?o" , types + 63 }, |
366 | { "commit" , "" , types + 0 }, |
367 | { "set_buffer_transform" , "2i" , types + 0 }, |
368 | { "set_buffer_scale" , "3i" , types + 0 }, |
369 | { "damage_buffer" , "4iiii" , types + 0 }, |
370 | }; |
371 | |
372 | static const struct wl_message wl_surface_events[] = { |
373 | { "enter" , "o" , types + 64 }, |
374 | { "leave" , "o" , types + 65 }, |
375 | }; |
376 | |
377 | WL_PRIVATE const struct wl_interface wl_surface_interface = { |
378 | "wl_surface" , 4, |
379 | 10, wl_surface_requests, |
380 | 2, wl_surface_events, |
381 | }; |
382 | |
383 | static const struct wl_message wl_seat_requests[] = { |
384 | { "get_pointer" , "n" , types + 66 }, |
385 | { "get_keyboard" , "n" , types + 67 }, |
386 | { "get_touch" , "n" , types + 68 }, |
387 | { "release" , "5" , types + 0 }, |
388 | }; |
389 | |
390 | static const struct wl_message wl_seat_events[] = { |
391 | { "capabilities" , "u" , types + 0 }, |
392 | { "name" , "2s" , types + 0 }, |
393 | }; |
394 | |
395 | WL_PRIVATE const struct wl_interface wl_seat_interface = { |
396 | "wl_seat" , 6, |
397 | 4, wl_seat_requests, |
398 | 2, wl_seat_events, |
399 | }; |
400 | |
401 | static const struct wl_message wl_pointer_requests[] = { |
402 | { "set_cursor" , "u?oii" , types + 69 }, |
403 | { "release" , "3" , types + 0 }, |
404 | }; |
405 | |
406 | static const struct wl_message wl_pointer_events[] = { |
407 | { "enter" , "uoff" , types + 73 }, |
408 | { "leave" , "uo" , types + 77 }, |
409 | { "motion" , "uff" , types + 0 }, |
410 | { "button" , "uuuu" , types + 0 }, |
411 | { "axis" , "uuf" , types + 0 }, |
412 | { "frame" , "5" , types + 0 }, |
413 | { "axis_source" , "5u" , types + 0 }, |
414 | { "axis_stop" , "5uu" , types + 0 }, |
415 | { "axis_discrete" , "5ui" , types + 0 }, |
416 | }; |
417 | |
418 | WL_PRIVATE const struct wl_interface wl_pointer_interface = { |
419 | "wl_pointer" , 6, |
420 | 2, wl_pointer_requests, |
421 | 9, wl_pointer_events, |
422 | }; |
423 | |
424 | static const struct wl_message wl_keyboard_requests[] = { |
425 | { "release" , "3" , types + 0 }, |
426 | }; |
427 | |
428 | static const struct wl_message wl_keyboard_events[] = { |
429 | { "keymap" , "uhu" , types + 0 }, |
430 | { "enter" , "uoa" , types + 79 }, |
431 | { "leave" , "uo" , types + 82 }, |
432 | { "key" , "uuuu" , types + 0 }, |
433 | { "modifiers" , "uuuuu" , types + 0 }, |
434 | { "repeat_info" , "4ii" , types + 0 }, |
435 | }; |
436 | |
437 | WL_PRIVATE const struct wl_interface wl_keyboard_interface = { |
438 | "wl_keyboard" , 6, |
439 | 1, wl_keyboard_requests, |
440 | 6, wl_keyboard_events, |
441 | }; |
442 | |
443 | static const struct wl_message wl_touch_requests[] = { |
444 | { "release" , "3" , types + 0 }, |
445 | }; |
446 | |
447 | static const struct wl_message wl_touch_events[] = { |
448 | { "down" , "uuoiff" , types + 84 }, |
449 | { "up" , "uui" , types + 0 }, |
450 | { "motion" , "uiff" , types + 0 }, |
451 | { "frame" , "" , types + 0 }, |
452 | { "cancel" , "" , types + 0 }, |
453 | { "shape" , "6iff" , types + 0 }, |
454 | { "orientation" , "6if" , types + 0 }, |
455 | }; |
456 | |
457 | WL_PRIVATE const struct wl_interface wl_touch_interface = { |
458 | "wl_touch" , 6, |
459 | 1, wl_touch_requests, |
460 | 7, wl_touch_events, |
461 | }; |
462 | |
463 | static const struct wl_message wl_output_requests[] = { |
464 | { "release" , "3" , types + 0 }, |
465 | }; |
466 | |
467 | static const struct wl_message wl_output_events[] = { |
468 | { "geometry" , "iiiiissi" , types + 0 }, |
469 | { "mode" , "uiii" , types + 0 }, |
470 | { "done" , "2" , types + 0 }, |
471 | { "scale" , "2i" , types + 0 }, |
472 | }; |
473 | |
474 | WL_PRIVATE const struct wl_interface wl_output_interface = { |
475 | "wl_output" , 3, |
476 | 1, wl_output_requests, |
477 | 4, wl_output_events, |
478 | }; |
479 | |
480 | static const struct wl_message wl_region_requests[] = { |
481 | { "destroy" , "" , types + 0 }, |
482 | { "add" , "iiii" , types + 0 }, |
483 | { "subtract" , "iiii" , types + 0 }, |
484 | }; |
485 | |
486 | WL_PRIVATE const struct wl_interface wl_region_interface = { |
487 | "wl_region" , 1, |
488 | 3, wl_region_requests, |
489 | 0, NULL, |
490 | }; |
491 | |
492 | static const struct wl_message wl_subcompositor_requests[] = { |
493 | { "destroy" , "" , types + 0 }, |
494 | { "get_subsurface" , "noo" , types + 90 }, |
495 | }; |
496 | |
497 | WL_PRIVATE const struct wl_interface wl_subcompositor_interface = { |
498 | "wl_subcompositor" , 1, |
499 | 2, wl_subcompositor_requests, |
500 | 0, NULL, |
501 | }; |
502 | |
503 | static const struct wl_message wl_subsurface_requests[] = { |
504 | { "destroy" , "" , types + 0 }, |
505 | { "set_position" , "ii" , types + 0 }, |
506 | { "place_above" , "o" , types + 93 }, |
507 | { "place_below" , "o" , types + 94 }, |
508 | { "set_sync" , "" , types + 0 }, |
509 | { "set_desync" , "" , types + 0 }, |
510 | }; |
511 | |
512 | WL_PRIVATE const struct wl_interface wl_subsurface_interface = { |
513 | "wl_subsurface" , 1, |
514 | 6, wl_subsurface_requests, |
515 | 0, NULL, |
516 | }; |
517 | |
518 | |