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