Drop libdrm CFLAGS where no longer necessary.
[profile/ivi/wayland.git] / wayland-protocol.c
1 /*
2  * Copyright © 2008 Kristian Høgsberg
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that copyright
7  * notice and this permission notice appear in supporting documentation, and
8  * that the name of the copyright holders not be used in advertising or
9  * publicity pertaining to distribution of the software without specific,
10  * written prior permission.  The copyright holders make no representations
11  * about the suitability of this software for any purpose.  It is provided "as
12  * is" without express or implied warranty.
13  *
14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16  * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20  * OF THIS SOFTWARE.
21  */
22
23 #include <stdlib.h>
24 #include <stdint.h>
25 #include "wayland-util.h"
26 #include "wayland-protocol.h"
27
28 static const struct wl_message display_events[] = {
29         { "invalid_object", "u" },
30         { "invalid_method", "uu" },
31         { "no_memory", "" },
32         { "global", "nsu" },
33         { "range", "u" },
34 };
35
36 WL_EXPORT const struct wl_interface wl_display_interface = {
37         "display", 1,
38         0, NULL,
39         ARRAY_LENGTH(display_events), display_events,
40 };
41
42
43 static const struct wl_message compositor_methods[] = {
44         { "create_surface", "n" },
45         { "commit", "u" }
46 };
47
48 static const struct wl_message compositor_events[] = {
49         { "acknowledge", "uu" },
50         { "frame", "uu" }
51 };
52
53 WL_EXPORT const struct wl_interface wl_compositor_interface = {
54         "compositor", 1,
55         ARRAY_LENGTH(compositor_methods), compositor_methods,
56         ARRAY_LENGTH(compositor_events), compositor_events,
57 };
58
59
60 static const struct wl_message surface_methods[] = {
61         { "destroy", "" },
62         { "attach", "uuuuo" },
63         { "map", "iiii" },
64         { "copy", "iiuuiiii" },
65         { "damage", "iiii" }
66 };
67
68 WL_EXPORT const struct wl_interface wl_surface_interface = {
69         "surface", 1,
70         ARRAY_LENGTH(surface_methods), surface_methods,
71         0, NULL,
72 };
73
74
75 static const struct wl_message input_device_events[] = {
76         { "motion", "iiii" },
77         { "button", "uuiiii" },
78         { "key", "uu" },
79 };
80
81 WL_EXPORT const struct wl_interface wl_input_device_interface = {
82         "input_device", 1,
83         0, NULL,
84         ARRAY_LENGTH(input_device_events), input_device_events,
85 };
86
87
88 static const struct wl_message output_events[] = {
89         { "geometry", "uu" },
90 };
91
92 WL_EXPORT const struct wl_interface wl_output_interface = {
93         "output", 1,
94         0, NULL,
95         ARRAY_LENGTH(output_events), output_events,
96 };
97
98 WL_EXPORT const struct wl_interface wl_visual_interface = {
99         "visual", 1,
100         0, NULL,
101         0, NULL,
102 };