OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2015 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_CONTENTS_UNSTABLE_V1_CLIENT_PROTOCOL_H |
| 25 #define SECURE_CONTENTS_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 zwp_secure_contents_v1; |
| 39 struct zwp_secure_v1; |
| 40 |
| 41 extern const struct wl_interface zwp_secure_contents_v1_interface; |
| 42 extern const struct wl_interface zwp_secure_v1_interface; |
| 43 |
| 44 #ifndef ZWP_SECURE_CONTENTS_V1_ERROR_ENUM |
| 45 #define ZWP_SECURE_CONTENTS_V1_ERROR_ENUM |
| 46 enum zwp_secure_contents_v1_error { |
| 47 ZWP_SECURE_CONTENTS_V1_ERROR_SECURE_EXISTS = 0, |
| 48 }; |
| 49 #endif /* ZWP_SECURE_CONTENTS_V1_ERROR_ENUM */ |
| 50 |
| 51 #define ZWP_SECURE_CONTENTS_V1_DESTROY 0 |
| 52 #define ZWP_SECURE_CONTENTS_V1_GET_SECURE 1 |
| 53 |
| 54 static inline void |
| 55 zwp_secure_contents_v1_set_user_data(struct zwp_secure_contents_v1 *zwp_secure_c
ontents_v1, void *user_data) |
| 56 { |
| 57 wl_proxy_set_user_data((struct wl_proxy *) zwp_secure_contents_v1, user_
data); |
| 58 } |
| 59 |
| 60 static inline void * |
| 61 zwp_secure_contents_v1_get_user_data(struct zwp_secure_contents_v1 *zwp_secure_c
ontents_v1) |
| 62 { |
| 63 return wl_proxy_get_user_data((struct wl_proxy *) zwp_secure_contents_v1
); |
| 64 } |
| 65 |
| 66 static inline void |
| 67 zwp_secure_contents_v1_destroy(struct zwp_secure_contents_v1 *zwp_secure_content
s_v1) |
| 68 { |
| 69 wl_proxy_marshal((struct wl_proxy *) zwp_secure_contents_v1, |
| 70 ZWP_SECURE_CONTENTS_V1_DESTROY); |
| 71 |
| 72 wl_proxy_destroy((struct wl_proxy *) zwp_secure_contents_v1); |
| 73 } |
| 74 |
| 75 static inline struct zwp_secure_v1 * |
| 76 zwp_secure_contents_v1_get_secure(struct zwp_secure_contents_v1 *zwp_secure_cont
ents_v1, struct wl_surface *surface) |
| 77 { |
| 78 struct wl_proxy *id; |
| 79 |
| 80 id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_secure_content
s_v1, |
| 81 ZWP_SECURE_CONTENTS_V1_GET_SECURE, &zwp_secure_v1_inter
face, NULL, surface); |
| 82 |
| 83 return (struct zwp_secure_v1 *) id; |
| 84 } |
| 85 |
| 86 #define ZWP_SECURE_V1_DESTROY 0 |
| 87 #define ZWP_SECURE_V1_ENABLE_SENSITIVE_CONTENTS 1 |
| 88 |
| 89 static inline void |
| 90 zwp_secure_v1_set_user_data(struct zwp_secure_v1 *zwp_secure_v1, void *user_data
) |
| 91 { |
| 92 wl_proxy_set_user_data((struct wl_proxy *) zwp_secure_v1, user_data); |
| 93 } |
| 94 |
| 95 static inline void * |
| 96 zwp_secure_v1_get_user_data(struct zwp_secure_v1 *zwp_secure_v1) |
| 97 { |
| 98 return wl_proxy_get_user_data((struct wl_proxy *) zwp_secure_v1); |
| 99 } |
| 100 |
| 101 static inline void |
| 102 zwp_secure_v1_destroy(struct zwp_secure_v1 *zwp_secure_v1) |
| 103 { |
| 104 wl_proxy_marshal((struct wl_proxy *) zwp_secure_v1, |
| 105 ZWP_SECURE_V1_DESTROY); |
| 106 |
| 107 wl_proxy_destroy((struct wl_proxy *) zwp_secure_v1); |
| 108 } |
| 109 |
| 110 static inline void |
| 111 zwp_secure_v1_enable_sensitive_contents(struct zwp_secure_v1 *zwp_secure_v1) |
| 112 { |
| 113 wl_proxy_marshal((struct wl_proxy *) zwp_secure_v1, |
| 114 ZWP_SECURE_V1_ENABLE_SENSITIVE_CONTENTS); |
| 115 } |
| 116 |
| 117 #ifdef __cplusplus |
| 118 } |
| 119 #endif |
| 120 |
| 121 #endif |
OLD | NEW |