blob: 19e5db747f22d2564345d7a6e9c74922148c8325 [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", "" },
Kristian Høgsbergb3131d92008-12-24 19:30:25 -050032 { "global", "nsu" },
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øgsberg478d9262010-06-08 20:34:11 -040049 { "device", "s" },
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050050 { "acknowledge", "uu" },
51 { "frame", "uu" }
52};
53
54WL_EXPORT const struct wl_interface wl_compositor_interface = {
55 "compositor", 1,
56 ARRAY_LENGTH(compositor_methods), compositor_methods,
57 ARRAY_LENGTH(compositor_events), compositor_events,
58};
59
60
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050061static const struct wl_message surface_methods[] = {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050062 { "destroy", "" },
63 { "attach", "uuuuo" },
64 { "map", "iiii" },
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050065 { "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" },
Kristian Høgsbergdb6c2f32009-02-22 21:51:24 -050079 { "pointer_focus", "o" },
Kristian Høgsberg3c38fa02009-02-23 22:30:29 -050080 { "keyboard_focus", "oa" },
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050081};
82
83WL_EXPORT const struct wl_interface wl_input_device_interface = {
84 "input_device", 1,
85 0, NULL,
86 ARRAY_LENGTH(input_device_events), input_device_events,
87};
Kristian Høgsbergee02ca62008-12-21 23:37:12 -050088
89
90static const struct wl_message output_events[] = {
Kristian Høgsberg12ea62e2008-12-22 16:37:07 -050091 { "geometry", "uu" },
Kristian Høgsbergee02ca62008-12-21 23:37:12 -050092};
93
94WL_EXPORT const struct wl_interface wl_output_interface = {
95 "output", 1,
96 0, NULL,
97 ARRAY_LENGTH(output_events), output_events,
98};
Kristian Høgsberg12ea62e2008-12-22 16:37:07 -050099
100WL_EXPORT const struct wl_interface wl_visual_interface = {
101 "visual", 1,
102 0, NULL,
103 0, NULL,
104};