xref: /aosp_15_r20/external/wayland/tests/data/small-code.c (revision 84e872a0dc482bffdb63672969dd03a827d67c73)
1*84e872a0SLloyd Pique /* SCANNER TEST */
2*84e872a0SLloyd Pique 
3*84e872a0SLloyd Pique /*
4*84e872a0SLloyd Pique  * Copyright © 2016 Collabora, Ltd.
5*84e872a0SLloyd Pique  *
6*84e872a0SLloyd Pique  * Permission is hereby granted, free of charge, to any person
7*84e872a0SLloyd Pique  * obtaining a copy of this software and associated documentation files
8*84e872a0SLloyd Pique  * (the "Software"), to deal in the Software without restriction,
9*84e872a0SLloyd Pique  * including without limitation the rights to use, copy, modify, merge,
10*84e872a0SLloyd Pique  * publish, distribute, sublicense, and/or sell copies of the Software,
11*84e872a0SLloyd Pique  * and to permit persons to whom the Software is furnished to do so,
12*84e872a0SLloyd Pique  * subject to the following conditions:
13*84e872a0SLloyd Pique  *
14*84e872a0SLloyd Pique  * The above copyright notice and this permission notice (including the
15*84e872a0SLloyd Pique  * next paragraph) shall be included in all copies or substantial
16*84e872a0SLloyd Pique  * portions of the Software.
17*84e872a0SLloyd Pique  *
18*84e872a0SLloyd Pique  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19*84e872a0SLloyd Pique  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20*84e872a0SLloyd Pique  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21*84e872a0SLloyd Pique  * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
22*84e872a0SLloyd Pique  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
23*84e872a0SLloyd Pique  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24*84e872a0SLloyd Pique  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25*84e872a0SLloyd Pique  * SOFTWARE.
26*84e872a0SLloyd Pique  */
27*84e872a0SLloyd Pique 
28*84e872a0SLloyd Pique #include <stdlib.h>
29*84e872a0SLloyd Pique #include <stdint.h>
30*84e872a0SLloyd Pique #include "wayland-util.h"
31*84e872a0SLloyd Pique 
32*84e872a0SLloyd Pique extern const struct wl_interface another_intf_interface;
33*84e872a0SLloyd Pique extern const struct wl_interface intf_not_here_interface;
34*84e872a0SLloyd Pique 
35*84e872a0SLloyd Pique static const struct wl_interface *small_test_types[] = {
36*84e872a0SLloyd Pique 	NULL,
37*84e872a0SLloyd Pique 	&intf_not_here_interface,
38*84e872a0SLloyd Pique 	NULL,
39*84e872a0SLloyd Pique 	NULL,
40*84e872a0SLloyd Pique 	NULL,
41*84e872a0SLloyd Pique 	NULL,
42*84e872a0SLloyd Pique 	NULL,
43*84e872a0SLloyd Pique 	&another_intf_interface,
44*84e872a0SLloyd Pique };
45*84e872a0SLloyd Pique 
46*84e872a0SLloyd Pique static const struct wl_message intf_A_requests[] = {
47*84e872a0SLloyd Pique 	{ "rq1", "sun", small_test_types + 0 },
48*84e872a0SLloyd Pique 	{ "rq2", "nsiufho", small_test_types + 1 },
49*84e872a0SLloyd Pique 	{ "destroy", "", small_test_types + 0 },
50*84e872a0SLloyd Pique };
51*84e872a0SLloyd Pique 
52*84e872a0SLloyd Pique static const struct wl_message intf_A_events[] = {
53*84e872a0SLloyd Pique 	{ "hey", "", small_test_types + 0 },
54*84e872a0SLloyd Pique };
55*84e872a0SLloyd Pique 
56*84e872a0SLloyd Pique WL_EXPORT const struct wl_interface intf_A_interface = {
57*84e872a0SLloyd Pique 	"intf_A", 3,
58*84e872a0SLloyd Pique 	3, intf_A_requests,
59*84e872a0SLloyd Pique 	1, intf_A_events,
60*84e872a0SLloyd Pique };
61*84e872a0SLloyd Pique 
62