remove x11 dependencies
[platform/core/uifw/libeom.git] / protocol / eom-protocol.c
1 /*
2  * Copyright 2016 Samsung Electronics co., Ltd. All Rights Reserved.
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\n 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 wl_shell_surface_interface;
31 extern const struct wl_interface xdg_surface_interface;
32
33 static const struct wl_interface *types[] = {
34         NULL,
35         NULL,
36         NULL,
37         NULL,
38         NULL,
39         NULL,
40         NULL,
41         NULL,
42         NULL,
43         NULL,
44         NULL,
45         NULL,
46         NULL,
47         &xdg_surface_interface,
48         NULL,
49         &wl_shell_surface_interface,
50 };
51
52 static const struct wl_message wl_eom_requests[] = {
53         { "set_attribute", "uu", types + 0 },
54         { "set_xdg_window", "uo", types + 12 },
55         { "set_shell_window", "uo", types + 14 },
56         { "get_output_info", "u", types + 0 },
57 };
58
59 static const struct wl_message wl_eom_events[] = {
60         { "output_count", "u", types + 0 },
61         { "output_info", "uuuuuuuuuuuu", types + 0 },
62         { "output_type", "uuu", types + 0 },
63         { "output_mode", "uu", types + 0 },
64         { "output_attribute", "uuuu", types + 0 },
65         { "output_set_window", "uu", types + 0 },
66 };
67
68 WL_EXPORT const struct wl_interface wl_eom_interface = {
69         "wl_eom", 1,
70         4, wl_eom_requests,
71         6, wl_eom_events,
72 };
73