1 /*
2 * Copyright © 2008-2011 Kristian Høgsberg
3 * Copyright © 2010-2011 Intel Corporation
4 *
5 * Permission to use, copy, modify, distribute, and sell this
6 * software and its documentation for any purpose is hereby granted
7 * without fee, provided that\n the above copyright notice appear in
8 * all copies and that both that copyright notice and this permission
9 * notice appear in supporting documentation, and that the name of
10 * the copyright holders not be used in advertising or publicity
11 * pertaining to distribution of the software without specific,
12 * written prior permission. The copyright holders make no
13 * representations about the suitability of this software for any
14 * purpose. It is provided "as is" without express or implied
15 * warranty.
16 *
17 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
18 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
21 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
22 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
24 * THIS SOFTWARE.
25 */
27 #include <stdlib.h>
28 #include <stdint.h>
29 #include "wayland-util.h"
31 #define ARRAY_LENGTH(a) (sizeof (a) /sizeof (a)[0])
33 extern const struct wl_interface wl_buffer_interface;
34 extern const struct wl_interface wl_buffer_interface;
36 static const struct wl_interface *types[] = {
37 NULL,
38 &wl_buffer_interface,
39 NULL,
40 NULL,
41 NULL,
42 NULL,
43 NULL,
44 &wl_buffer_interface,
45 NULL,
46 NULL,
47 NULL,
48 NULL,
49 NULL,
50 NULL,
51 NULL,
52 NULL,
53 NULL,
54 NULL,
55 };
57 static const struct wl_message wl_drm_requests[] = {
58 { "authenticate", "u", types + 0 },
59 { "create_buffer", "nuiiuu", types + 1 },
60 { "create_planar_buffer", "nuiiuiiiiii", types + 7 },
61 };
63 static const struct wl_message wl_drm_events[] = {
64 { "device", "s", types + 0 },
65 { "format", "u", types + 0 },
66 { "authenticated", "", types + 0 },
67 };
69 WL_EXPORT const struct wl_interface wl_drm_interface = {
70 "wl_drm", 1,
71 ARRAY_LENGTH(wl_drm_requests), wl_drm_requests,
72 ARRAY_LENGTH(wl_drm_events), wl_drm_events,
73 };