OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 The Chromium Authors. |
| 3 * |
| 4 * Permission is hereby granted, free of charge, to any person obtaining a |
| 5 * copy of this software and associated documentation files (the "Software"), |
| 6 * to deal in the Software without restriction, including without limitation |
| 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 * and/or sell copies of the Software, and to permit persons to whom the |
| 9 * Software is furnished to do so, subject to the following conditions: |
| 10 * |
| 11 * The above copyright notice and this permission notice (including the next |
| 12 * paragraph) shall be included in all copies or substantial portions of the |
| 13 * Software. |
| 14 * |
| 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 21 * DEALINGS IN THE SOFTWARE. |
| 22 */ |
| 23 |
| 24 #ifndef SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H |
| 25 #define SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H |
| 26 |
| 27 #ifdef __cplusplus |
| 28 extern "C" { |
| 29 #endif |
| 30 |
| 31 #include <stdint.h> |
| 32 #include <stddef.h> |
| 33 #include "wayland-client.h" |
| 34 |
| 35 struct wl_client; |
| 36 struct wl_resource; |
| 37 |
| 38 struct wl_surface; |
| 39 struct zwp_secure_output_v1; |
| 40 struct zwp_security_v1; |
| 41 |
| 42 extern const struct wl_interface zwp_secure_output_v1_interface; |
| 43 extern const struct wl_interface zwp_security_v1_interface; |
| 44 |
| 45 #ifndef ZWP_SECURE_OUTPUT_V1_ERROR_ENUM |
| 46 #define ZWP_SECURE_OUTPUT_V1_ERROR_ENUM |
| 47 enum zwp_secure_output_v1_error { |
| 48 ZWP_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0, |
| 49 }; |
| 50 #endif /* ZWP_SECURE_OUTPUT_V1_ERROR_ENUM */ |
| 51 |
| 52 #define ZWP_SECURE_OUTPUT_V1_DESTROY 0 |
| 53 #define ZWP_SECURE_OUTPUT_V1_GET_SECURITY 1 |
| 54 |
| 55 #define ZWP_SECURE_OUTPUT_V1_DESTROY_SINCE_VERSION 1 |
| 56 #define ZWP_SECURE_OUTPUT_V1_GET_SECURITY_SINCE_VERSION 1 |
| 57 |
| 58 static inline void |
| 59 zwp_secure_output_v1_set_user_data(struct zwp_secure_output_v1 *zwp_secure_outpu
t_v1, void *user_data) |
| 60 { |
| 61 wl_proxy_set_user_data((struct wl_proxy *) zwp_secure_output_v1, user_da
ta); |
| 62 } |
| 63 |
| 64 static inline void * |
| 65 zwp_secure_output_v1_get_user_data(struct zwp_secure_output_v1 *zwp_secure_outpu
t_v1) |
| 66 { |
| 67 return wl_proxy_get_user_data((struct wl_proxy *) zwp_secure_output_v1); |
| 68 } |
| 69 |
| 70 static inline uint32_t |
| 71 zwp_secure_output_v1_get_version(struct zwp_secure_output_v1 *zwp_secure_output_
v1) |
| 72 { |
| 73 return wl_proxy_get_version((struct wl_proxy *) zwp_secure_output_v1); |
| 74 } |
| 75 |
| 76 static inline void |
| 77 zwp_secure_output_v1_destroy(struct zwp_secure_output_v1 *zwp_secure_output_v1) |
| 78 { |
| 79 wl_proxy_marshal((struct wl_proxy *) zwp_secure_output_v1, |
| 80 ZWP_SECURE_OUTPUT_V1_DESTROY); |
| 81 |
| 82 wl_proxy_destroy((struct wl_proxy *) zwp_secure_output_v1); |
| 83 } |
| 84 |
| 85 static inline struct zwp_security_v1 * |
| 86 zwp_secure_output_v1_get_security(struct zwp_secure_output_v1 *zwp_secure_output
_v1, struct wl_surface *surface) |
| 87 { |
| 88 struct wl_proxy *id; |
| 89 |
| 90 id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_secure_output_
v1, |
| 91 ZWP_SECURE_OUTPUT_V1_GET_SECURITY, &zwp_security_v1_int
erface, NULL, surface); |
| 92 |
| 93 return (struct zwp_security_v1 *) id; |
| 94 } |
| 95 |
| 96 #define ZWP_SECURITY_V1_DESTROY 0 |
| 97 #define ZWP_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT 1 |
| 98 |
| 99 #define ZWP_SECURITY_V1_DESTROY_SINCE_VERSION 1 |
| 100 #define ZWP_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT_SINCE_VERSION 1 |
| 101 |
| 102 static inline void |
| 103 zwp_security_v1_set_user_data(struct zwp_security_v1 *zwp_security_v1, void *use
r_data) |
| 104 { |
| 105 wl_proxy_set_user_data((struct wl_proxy *) zwp_security_v1, user_data); |
| 106 } |
| 107 |
| 108 static inline void * |
| 109 zwp_security_v1_get_user_data(struct zwp_security_v1 *zwp_security_v1) |
| 110 { |
| 111 return wl_proxy_get_user_data((struct wl_proxy *) zwp_security_v1); |
| 112 } |
| 113 |
| 114 static inline uint32_t |
| 115 zwp_security_v1_get_version(struct zwp_security_v1 *zwp_security_v1) |
| 116 { |
| 117 return wl_proxy_get_version((struct wl_proxy *) zwp_security_v1); |
| 118 } |
| 119 |
| 120 static inline void |
| 121 zwp_security_v1_destroy(struct zwp_security_v1 *zwp_security_v1) |
| 122 { |
| 123 wl_proxy_marshal((struct wl_proxy *) zwp_security_v1, |
| 124 ZWP_SECURITY_V1_DESTROY); |
| 125 |
| 126 wl_proxy_destroy((struct wl_proxy *) zwp_security_v1); |
| 127 } |
| 128 |
| 129 static inline void |
| 130 zwp_security_v1_only_visible_on_secure_output(struct zwp_security_v1 *zwp_securi
ty_v1) |
| 131 { |
| 132 wl_proxy_marshal((struct wl_proxy *) zwp_security_v1, |
| 133 ZWP_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT); |
| 134 } |
| 135 |
| 136 #ifdef __cplusplus |
| 137 } |
| 138 #endif |
| 139 |
| 140 #endif |
OLD | NEW |