Imported Upstream version 0.1.0+git20131207+e452e83
[deb_libhybris.git] / hybris / egl / platforms / common / wayland-android-protocol.c
1 /*
2 * Copyright © 2012 Collabora, Ltd.
3 *
4 * Permission to use, copy, modify, distribute, and sell this
5 * software and its documentation for any purpose is hereby granted
6 * without fee, provided that the above copyright notice appear in
7 * all copies and that both that copyright notice and this permission
8 * notice appear in supporting documentation, and that the name of
9 * the copyright holders not be used in advertising or publicity
10 * pertaining to distribution of the software without specific,
11 * written prior permission. The copyright holders make no
12 * representations about the suitability of this software for any
13 * purpose. It is provided "as is" without express or implied
14 * warranty.
15 *
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
17 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
18 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
21 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
22 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
23 * THIS SOFTWARE.
24 */
25
26 #include <stdlib.h>
27 #include <stdint.h>
28 #include "wayland-util.h"
29
30 extern const struct wl_interface android_wlegl_handle_interface;
31 extern const struct wl_interface wl_buffer_interface;
32 extern const struct wl_interface android_wlegl_handle_interface;
33
34 static const struct wl_interface *types[] = {
35 NULL,
36 &android_wlegl_handle_interface,
37 NULL,
38 NULL,
39 &wl_buffer_interface,
40 NULL,
41 NULL,
42 NULL,
43 NULL,
44 NULL,
45 &android_wlegl_handle_interface,
46 };
47
48 static const struct wl_message android_wlegl_requests[] = {
49 { "create_handle", "nia", types + 1 },
50 { "create_buffer", "niiiiio", types + 4 },
51 };
52
53 WL_EXPORT const struct wl_interface android_wlegl_interface = {
54 "android_wlegl", 1,
55 2, android_wlegl_requests,
56 0, NULL,
57 };
58
59 static const struct wl_message android_wlegl_handle_requests[] = {
60 { "add_fd", "h", types + 0 },
61 { "destroy", "", types + 0 },
62 };
63
64 WL_EXPORT const struct wl_interface android_wlegl_handle_interface = {
65 "android_wlegl_handle", 1,
66 2, android_wlegl_handle_requests,
67 0, NULL,
68 };
69