2 * Copyright 2015 Samsung Electronics co., Ltd. All Rights Reserved.
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
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
26 #ifndef TBM_TEST_SERVER_PROTOCOL_H
27 #define TBM_TEST_SERVER_PROTOCOL_H
35 #include "wayland-server.h"
44 struct wl_test_remote;
45 struct wl_test_surface;
47 extern const struct wl_interface wl_tbm_test_interface;
48 extern const struct wl_interface wl_test_surface_interface;
49 extern const struct wl_interface wl_test_remote_interface;
51 struct wl_tbm_test_interface {
53 * create_surface - (none)
56 void (*create_surface)(struct wl_client *client,
57 struct wl_resource *resource,
60 * set_active_queue - (none)
63 void (*set_active_queue)(struct wl_client *client,
64 struct wl_resource *resource,
65 struct wl_resource *surface);
67 * set_provider - (none)
71 void (*set_provider)(struct wl_client *client,
72 struct wl_resource *resource,
73 struct wl_resource *surface,
76 * create_remote_surface - (none)
80 void (*create_remote_surface)(struct wl_client *client,
81 struct wl_resource *resource,
87 struct wl_test_surface_interface {
91 void (*destroy)(struct wl_client *client,
92 struct wl_resource *resource);
97 void (*attach)(struct wl_client *client,
98 struct wl_resource *resource,
99 struct wl_resource *buffer);
104 void (*frame)(struct wl_client *client,
105 struct wl_resource *resource,
110 struct wl_test_remote_interface {
114 void (*destroy)(struct wl_client *client,
115 struct wl_resource *resource);
120 void (*release)(struct wl_client *client,
121 struct wl_resource *resource,
122 struct wl_resource *buffer);
127 void (*redirect)(struct wl_client *client,
128 struct wl_resource *resource,
129 struct wl_resource *wl_tbm);
131 * unredirect - (none)
133 void (*unredirect)(struct wl_client *client,
134 struct wl_resource *resource);
139 void (*bind)(struct wl_client *client,
140 struct wl_resource *resource,
141 struct wl_resource *surface);
144 #define WL_TEST_REMOTE_UPDATE 0
146 #define WL_TEST_REMOTE_UPDATE_SINCE_VERSION 1
149 wl_test_remote_send_update(struct wl_resource *resource_, struct wl_resource *buffer)
151 wl_resource_post_event(resource_, WL_TEST_REMOTE_UPDATE, buffer);