blob: 4e50d894efe2b89e33e085145bc8393c086c9c37 [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#ifndef WAYLAND_PROTOCOL_H
24#define WAYLAND_PROTOCOL_H
25
26#include <stdint.h>
27
28struct wl_argument {
29 uint32_t type;
30 void *data;
31};
32
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050033struct wl_message {
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050034 const char *name;
35 const char *signature;
36 const void **types;
37};
38
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050039struct wl_interface {
40 const char *name;
41 int version;
42 int method_count;
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050043 const struct wl_message *methods;
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050044 int event_count;
Kristian Høgsbergfb6d68d2008-12-21 21:54:51 -050045 const struct wl_message *events;
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050046};
47
48#define WL_DISPLAY_INVALID_OBJECT 0
49#define WL_DISPLAY_INVALID_METHOD 1
50#define WL_DISPLAY_NO_MEMORY 2
51#define WL_DISPLAY_GLOBAL 3
Kristian Høgsberg97079ad2008-12-21 22:45:33 -050052#define WL_DISPLAY_RANGE 4
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050053
54extern const struct wl_interface wl_display_interface;
55
56
57#define WL_COMPOSITOR_CREATE_SURFACE 0
58#define WL_COMPOSITOR_COMMIT 1
59
60#define WL_COMPOSITOR_ACKNOWLEDGE 0
61#define WL_COMPOSITOR_FRAME 1
62
63extern const struct wl_interface wl_compositor_interface;
64
65
66#define WL_SURFACE_DESTROY 0
67#define WL_SURFACE_ATTACH 1
68#define WL_SURFACE_MAP 2
69#define WL_SURFACE_COPY 3
70#define WL_SURFACE_DAMAGE 4
71
72extern const struct wl_interface wl_surface_interface;
73
74
75#define WL_INPUT_MOTION 0
76#define WL_INPUT_BUTTON 1
77#define WL_INPUT_KEY 2
78
79extern const struct wl_interface wl_input_device_interface;
80
Kristian Høgsbergee02ca62008-12-21 23:37:12 -050081
Kristian Høgsberg12ea62e2008-12-22 16:37:07 -050082#define WL_OUTPUT_GEOMETRY 0
Kristian Høgsbergee02ca62008-12-21 23:37:12 -050083
84extern const struct wl_interface wl_output_interface;
85
Kristian Høgsberg12ea62e2008-12-22 16:37:07 -050086
87extern const struct wl_interface wl_visual_interface;
88
Kristian Høgsbergfe831a72008-12-21 21:50:23 -050089#endif