Package version up to 0.8.8
[platform/core/uifw/wayland-tbm.git] / test / wayland-tbm-test-protocol.c
1 /*
2  * Copyright 2015 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_buffer_interface;
31 extern const struct wl_interface wl_callback_interface;
32 extern const struct wl_interface wl_tbm_interface;
33 extern const struct wl_interface wl_test_remote_interface;
34 extern const struct wl_interface wl_test_surface_interface;
35
36 static const struct wl_interface *types[] = {
37         &wl_test_surface_interface,
38         &wl_test_surface_interface,
39         &wl_test_surface_interface,
40         NULL,
41         &wl_test_remote_interface,
42         NULL,
43         &wl_buffer_interface,
44         &wl_callback_interface,
45         &wl_buffer_interface,
46         &wl_tbm_interface,
47         &wl_test_surface_interface,
48         &wl_buffer_interface,
49 };
50
51 static const struct wl_message wl_tbm_test_requests[] = {
52         { "create_surface", "n", types + 0 },
53         { "set_active_queue", "o", types + 1 },
54         { "set_provider", "os", types + 2 },
55         { "create_remote_surface", "ns", types + 4 },
56 };
57
58 WL_EXPORT const struct wl_interface wl_tbm_test_interface = {
59         "wl_tbm_test", 1,
60         4, wl_tbm_test_requests,
61         0, NULL,
62 };
63
64 static const struct wl_message wl_test_surface_requests[] = {
65         { "destroy", "", types + 0 },
66         { "attach", "o", types + 6 },
67         { "frame", "n", types + 7 },
68 };
69
70 WL_EXPORT const struct wl_interface wl_test_surface_interface = {
71         "wl_test_surface", 1,
72         3, wl_test_surface_requests,
73         0, NULL,
74 };
75
76 static const struct wl_message wl_test_remote_requests[] = {
77         { "destroy", "", types + 0 },
78         { "release", "o", types + 8 },
79         { "redirect", "o", types + 9 },
80         { "unredirect", "", types + 0 },
81         { "bind", "o", types + 10 },
82 };
83
84 static const struct wl_message wl_test_remote_events[] = {
85         { "update", "o", types + 11 },
86 };
87
88 WL_EXPORT const struct wl_interface wl_test_remote_interface = {
89         "wl_test_remote", 1,
90         5, wl_test_remote_requests,
91         1, wl_test_remote_events,
92 };
93