blob: 5b20154795e0dcabc0a7f3fdecd88d773642cf0d [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" },
33};
34
35WL_EXPORT const struct wl_interface wl_display_interface = {
36 "display", 1,
37 0, NULL,
38 ARRAY_LENGTH(display_events), display_events,
39};
40
41
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050042static const struct wl_message compositor_methods[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050043 { "create_surface", "n" },
44 { "commit", "u" }
45};
46
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050047static const struct wl_message compositor_events[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050048 { "acknowledge", "uu" },
49 { "frame", "uu" }
50};
51
52WL_EXPORT const struct wl_interface wl_compositor_interface = {
53 "compositor", 1,
54 ARRAY_LENGTH(compositor_methods), compositor_methods,
55 ARRAY_LENGTH(compositor_events), compositor_events,
56};
57
58
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050059static const struct wl_message surface_methods[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050060 { "destroy", "" },
61 { "attach", "uuuuo" },
62 { "map", "iiii" },
63 { "copy", "iiuuiiii" },
64 { "damage", "iiii" }
65};
66
67WL_EXPORT const struct wl_interface wl_surface_interface = {
68 "surface", 1,
69 ARRAY_LENGTH(surface_methods), surface_methods,
70 0, NULL,
71};
72
73
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050074static const struct wl_message input_device_events[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050075 { "motion", "iiii" },
76 { "button", "uuiiii" },
77 { "key", "uu" },
78};
79
80WL_EXPORT const struct wl_interface wl_input_device_interface = {
81 "input_device", 1,
82 0, NULL,
83 ARRAY_LENGTH(input_device_events), input_device_events,
84};