blob: 4c618109d11f4b501c191f418877b3284ccc4666 [file] [log] [blame]
Kristian Høgsbergfe831a72008-12-21 21:50:23 -05001/*
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
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050028static const struct wl_message display_events[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050029 { "invalid_object", "u" },
30 { "invalid_method", "uu" },
31 { "no_memory", "" },
32 { "global", "osu" },
Kristian Høgsberg97079ad2008-12-21 22:45:33 -050033 { "range", "u" },
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050034};
35
36WL_EXPORT const struct wl_interface wl_display_interface = {
37 "display", 1,
38 0, NULL,
39 ARRAY_LENGTH(display_events), display_events,
40};
41
42
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050043static const struct wl_message compositor_methods[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050044 { "create_surface", "n" },
45 { "commit", "u" }
46};
47
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050048static const struct wl_message compositor_events[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050049 { "acknowledge", "uu" },
50 { "frame", "uu" }
51};
52
53WL_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
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050060static const struct wl_message surface_methods[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050061 { "destroy", "" },
62 { "attach", "uuuuo" },
63 { "map", "iiii" },
64 { "copy", "iiuuiiii" },
65 { "damage", "iiii" }
66};
67
68WL_EXPORT const struct wl_interface wl_surface_interface = {
69 "surface", 1,
70 ARRAY_LENGTH(surface_methods), surface_methods,
71 0, NULL,
72};
73
74
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050075static const struct wl_message input_device_events[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050076 { "motion", "iiii" },
77 { "button", "uuiiii" },
78 { "key", "uu" },
79};
80
81WL_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};