fff50f42a4ea15782f1ede69e9aa688f0812419b
1 /*
2 * Copyright © 2013-2014 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 */
26 #include <stdlib.h>
27 #include <stdint.h>
28 #include "wayland-util.h"
30 extern const struct wl_interface wl_surface_interface;
31 extern const struct wl_interface wl_viewport_interface;
33 static const struct wl_interface *types[] = {
34 NULL,
35 NULL,
36 NULL,
37 NULL,
38 NULL,
39 NULL,
40 &wl_viewport_interface,
41 &wl_surface_interface,
42 };
44 static const struct wl_message wl_scaler_requests[] = {
45 { "destroy", "", types + 0 },
46 { "get_viewport", "no", types + 6 },
47 };
49 WL_EXPORT const struct wl_interface wl_scaler_interface = {
50 "wl_scaler", 2,
51 2, wl_scaler_requests,
52 0, NULL,
53 };
55 static const struct wl_message wl_viewport_requests[] = {
56 { "destroy", "", types + 0 },
57 { "set", "ffffii", types + 0 },
58 { "set_source", "2ffff", types + 0 },
59 { "set_destination", "2ii", types + 0 },
60 };
62 WL_EXPORT const struct wl_interface wl_viewport_interface = {
63 "wl_viewport", 2,
64 4, wl_viewport_requests,
65 0, NULL,
66 };