Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1430)

Side by Side Diff: third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h

Issue 2350633002: third_party: Switch to zcr prefix for downstream wayland interfaces. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* Generated by wayland-scanner 1.11.0 */ 1 /* Generated by wayland-scanner 1.11.0 */
2 2
3 #ifndef SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H 3 #ifndef SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H 4 #define SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
5 5
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <stddef.h> 7 #include <stddef.h>
8 #include "wayland-client.h" 8 #include "wayland-client.h"
9 9
10 #ifdef __cplusplus 10 #ifdef __cplusplus
(...skipping 21 matching lines...) Expand all
32 * Warning! The protocol described in this file is experimental and backward 32 * Warning! The protocol described in this file is experimental and backward
33 * incompatible changes may be made. Backward compatible changes may be added 33 * incompatible changes may be made. Backward compatible changes may be added
34 * together with the corresponding interface version bump. Backward 34 * together with the corresponding interface version bump. Backward
35 * incompatible changes are done by bumping the version number in the protocol 35 * incompatible changes are done by bumping the version number in the protocol
36 * and interface names and resetting the interface version. Once the protocol 36 * and interface names and resetting the interface version. Once the protocol
37 * is to be declared stable, the 'z' prefix and the version number in the 37 * is to be declared stable, the 'z' prefix and the version number in the
38 * protocol and interface names are removed and the interface version number is 38 * protocol and interface names are removed and the interface version number is
39 * reset. 39 * reset.
40 * 40 *
41 * @section page_ifaces_secure_output_unstable_v1 Interfaces 41 * @section page_ifaces_secure_output_unstable_v1 Interfaces
42 * - @subpage page_iface_zwp_secure_output_v1 - secure output 42 * - @subpage page_iface_zcr_secure_output_v1 - secure output
43 * - @subpage page_iface_zwp_security_v1 - security interface to a wl_surface 43 * - @subpage page_iface_zcr_security_v1 - security interface to a wl_surface
44 * - @subpage page_iface_zwp_secure_output_v1 - DEPRECATED
45 * - @subpage page_iface_zwp_security_v1 - DEPRECATED
44 * @section page_copyright_secure_output_unstable_v1 Copyright 46 * @section page_copyright_secure_output_unstable_v1 Copyright
45 * <pre> 47 * <pre>
46 * 48 *
47 * Copyright 2016 The Chromium Authors. 49 * Copyright 2016 The Chromium Authors.
48 * 50 *
49 * Permission is hereby granted, free of charge, to any person obtaining a 51 * Permission is hereby granted, free of charge, to any person obtaining a
50 * copy of this software and associated documentation files (the "Software"), 52 * copy of this software and associated documentation files (the "Software"),
51 * to deal in the Software without restriction, including without limitation 53 * to deal in the Software without restriction, including without limitation
52 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 54 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
53 * and/or sell copies of the Software, and to permit persons to whom the 55 * and/or sell copies of the Software, and to permit persons to whom the
54 * Software is furnished to do so, subject to the following conditions: 56 * Software is furnished to do so, subject to the following conditions:
55 * 57 *
56 * The above copyright notice and this permission notice (including the next 58 * The above copyright notice and this permission notice (including the next
57 * paragraph) shall be included in all copies or substantial portions of the 59 * paragraph) shall be included in all copies or substantial portions of the
58 * Software. 60 * Software.
59 * 61 *
60 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 62 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 63 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 64 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
63 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 65 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 66 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
65 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 67 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
66 * DEALINGS IN THE SOFTWARE. 68 * DEALINGS IN THE SOFTWARE.
67 * </pre> 69 * </pre>
68 */ 70 */
69 struct wl_surface; 71 struct wl_surface;
72 struct zcr_secure_output_v1;
73 struct zcr_security_v1;
70 struct zwp_secure_output_v1; 74 struct zwp_secure_output_v1;
71 struct zwp_security_v1; 75 struct zwp_security_v1;
72 76
73 /** 77 /**
78 * @page page_iface_zcr_secure_output_v1 zcr_secure_output_v1
79 * @section page_iface_zcr_secure_output_v1_desc Description
80 *
81 * The global interface exposing secure output capabilities is used
82 * to instantiate an interface extension for a wl_surface object.
83 * This extended interface will then allow surfaces to be marked as
84 * as only visible on secure outputs.
85 * @section page_iface_zcr_secure_output_v1_api API
86 * See @ref iface_zcr_secure_output_v1.
87 */
88 /**
89 * @defgroup iface_zcr_secure_output_v1 The zcr_secure_output_v1 interface
90 *
91 * The global interface exposing secure output capabilities is used
92 * to instantiate an interface extension for a wl_surface object.
93 * This extended interface will then allow surfaces to be marked as
94 * as only visible on secure outputs.
95 */
96 extern const struct wl_interface zcr_secure_output_v1_interface;
97 /**
98 * @page page_iface_zcr_security_v1 zcr_security_v1
99 * @section page_iface_zcr_security_v1_desc Description
100 *
101 * An additional interface to a wl_surface object, which allows the
102 * client to specify that a surface should not appear in screenshots
103 * or be visible on non-secure outputs.
104 *
105 * If the wl_surface associated with the security object is destroyed,
106 * the security object becomes inert.
107 *
108 * If the security object is destroyed, the security state is removed
109 * from the wl_surface. The change will be applied on the next
110 * wl_surface.commit.
111 * @section page_iface_zcr_security_v1_api API
112 * See @ref iface_zcr_security_v1.
113 */
114 /**
115 * @defgroup iface_zcr_security_v1 The zcr_security_v1 interface
116 *
117 * An additional interface to a wl_surface object, which allows the
118 * client to specify that a surface should not appear in screenshots
119 * or be visible on non-secure outputs.
120 *
121 * If the wl_surface associated with the security object is destroyed,
122 * the security object becomes inert.
123 *
124 * If the security object is destroyed, the security state is removed
125 * from the wl_surface. The change will be applied on the next
126 * wl_surface.commit.
127 */
128 extern const struct wl_interface zcr_security_v1_interface;
129 /**
74 * @page page_iface_zwp_secure_output_v1 zwp_secure_output_v1 130 * @page page_iface_zwp_secure_output_v1 zwp_secure_output_v1
75 * @section page_iface_zwp_secure_output_v1_desc Description 131 * @section page_iface_zwp_secure_output_v1_desc Description
76 * 132 *
77 * The global interface exposing secure output capabilities is used 133 * The global interface exposing secure output capabilities is used
78 * to instantiate an interface extension for a wl_surface object. 134 * to instantiate an interface extension for a wl_surface object.
79 * This extended interface will then allow surfaces to be marked as 135 * This extended interface will then allow surfaces to be marked as
80 * as only visible on secure outputs. 136 * as only visible on secure outputs.
81 * @section page_iface_zwp_secure_output_v1_api API 137 * @section page_iface_zwp_secure_output_v1_api API
82 * See @ref iface_zwp_secure_output_v1. 138 * See @ref iface_zwp_secure_output_v1.
83 */ 139 */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 * 172 *
117 * If the wl_surface associated with the security object is destroyed, 173 * If the wl_surface associated with the security object is destroyed,
118 * the security object becomes inert. 174 * the security object becomes inert.
119 * 175 *
120 * If the security object is destroyed, the security state is removed 176 * If the security object is destroyed, the security state is removed
121 * from the wl_surface. The change will be applied on the next 177 * from the wl_surface. The change will be applied on the next
122 * wl_surface.commit. 178 * wl_surface.commit.
123 */ 179 */
124 extern const struct wl_interface zwp_security_v1_interface; 180 extern const struct wl_interface zwp_security_v1_interface;
125 181
182 #ifndef ZCR_SECURE_OUTPUT_V1_ERROR_ENUM
183 #define ZCR_SECURE_OUTPUT_V1_ERROR_ENUM
184 enum zcr_secure_output_v1_error {
185 /**
186 * the surface already has a security object associated
187 */
188 ZCR_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0,
189 };
190 #endif /* ZCR_SECURE_OUTPUT_V1_ERROR_ENUM */
191
192 #define ZCR_SECURE_OUTPUT_V1_DESTROY 0
193 #define ZCR_SECURE_OUTPUT_V1_GET_SECURITY 1
194
195 /**
196 * @ingroup iface_zcr_secure_output_v1
197 */
198 #define ZCR_SECURE_OUTPUT_V1_DESTROY_SINCE_VERSION 1
199 /**
200 * @ingroup iface_zcr_secure_output_v1
201 */
202 #define ZCR_SECURE_OUTPUT_V1_GET_SECURITY_SINCE_VERSION 1
203
204 /** @ingroup iface_zcr_secure_output_v1 */
205 static inline void
206 zcr_secure_output_v1_set_user_data(struct zcr_secure_output_v1 *zcr_secure_outpu t_v1, void *user_data)
207 {
208 wl_proxy_set_user_data((struct wl_proxy *) zcr_secure_output_v1, user_da ta);
209 }
210
211 /** @ingroup iface_zcr_secure_output_v1 */
212 static inline void *
213 zcr_secure_output_v1_get_user_data(struct zcr_secure_output_v1 *zcr_secure_outpu t_v1)
214 {
215 return wl_proxy_get_user_data((struct wl_proxy *) zcr_secure_output_v1);
216 }
217
218 static inline uint32_t
219 zcr_secure_output_v1_get_version(struct zcr_secure_output_v1 *zcr_secure_output_ v1)
220 {
221 return wl_proxy_get_version((struct wl_proxy *) zcr_secure_output_v1);
222 }
223
224 /**
225 * @ingroup iface_zcr_secure_output_v1
226 *
227 * Informs the server that the client will not be using this
228 * protocol object anymore. This does not affect any other objects,
229 * security objects included.
230 */
231 static inline void
232 zcr_secure_output_v1_destroy(struct zcr_secure_output_v1 *zcr_secure_output_v1)
233 {
234 wl_proxy_marshal((struct wl_proxy *) zcr_secure_output_v1,
235 ZCR_SECURE_OUTPUT_V1_DESTROY);
236
237 wl_proxy_destroy((struct wl_proxy *) zcr_secure_output_v1);
238 }
239
240 /**
241 * @ingroup iface_zcr_secure_output_v1
242 *
243 * Instantiate an interface extension for the given wl_surface to
244 * provide surface security. If the given wl_surface already has
245 * a security object associated, the security_exists protocol error
246 * is raised.
247 */
248 static inline struct zcr_security_v1 *
249 zcr_secure_output_v1_get_security(struct zcr_secure_output_v1 *zcr_secure_output _v1, struct wl_surface *surface)
250 {
251 struct wl_proxy *id;
252
253 id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_secure_output_ v1,
254 ZCR_SECURE_OUTPUT_V1_GET_SECURITY, &zcr_security_v1_int erface, NULL, surface);
255
256 return (struct zcr_security_v1 *) id;
257 }
258
259 #define ZCR_SECURITY_V1_DESTROY 0
260 #define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT 1
261
262 /**
263 * @ingroup iface_zcr_security_v1
264 */
265 #define ZCR_SECURITY_V1_DESTROY_SINCE_VERSION 1
266 /**
267 * @ingroup iface_zcr_security_v1
268 */
269 #define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT_SINCE_VERSION 1
270
271 /** @ingroup iface_zcr_security_v1 */
272 static inline void
273 zcr_security_v1_set_user_data(struct zcr_security_v1 *zcr_security_v1, void *use r_data)
274 {
275 wl_proxy_set_user_data((struct wl_proxy *) zcr_security_v1, user_data);
276 }
277
278 /** @ingroup iface_zcr_security_v1 */
279 static inline void *
280 zcr_security_v1_get_user_data(struct zcr_security_v1 *zcr_security_v1)
281 {
282 return wl_proxy_get_user_data((struct wl_proxy *) zcr_security_v1);
283 }
284
285 static inline uint32_t
286 zcr_security_v1_get_version(struct zcr_security_v1 *zcr_security_v1)
287 {
288 return wl_proxy_get_version((struct wl_proxy *) zcr_security_v1);
289 }
290
291 /**
292 * @ingroup iface_zcr_security_v1
293 *
294 * The associated wl_surface's security state is removed.
295 * The change is applied on the next wl_surface.commit.
296 */
297 static inline void
298 zcr_security_v1_destroy(struct zcr_security_v1 *zcr_security_v1)
299 {
300 wl_proxy_marshal((struct wl_proxy *) zcr_security_v1,
301 ZCR_SECURITY_V1_DESTROY);
302
303 wl_proxy_destroy((struct wl_proxy *) zcr_security_v1);
304 }
305
306 /**
307 * @ingroup iface_zcr_security_v1
308 *
309 * Constrain visibility of wl_surface contents to secure outputs.
310 * See wp_secure_output for the description.
311 *
312 * The only visible on secure output state is double-buffered state,
313 * and will be applied on the next wl_surface.commit.
314 */
315 static inline void
316 zcr_security_v1_only_visible_on_secure_output(struct zcr_security_v1 *zcr_securi ty_v1)
317 {
318 wl_proxy_marshal((struct wl_proxy *) zcr_security_v1,
319 ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT);
320 }
321
126 #ifndef ZWP_SECURE_OUTPUT_V1_ERROR_ENUM 322 #ifndef ZWP_SECURE_OUTPUT_V1_ERROR_ENUM
127 #define ZWP_SECURE_OUTPUT_V1_ERROR_ENUM 323 #define ZWP_SECURE_OUTPUT_V1_ERROR_ENUM
128 enum zwp_secure_output_v1_error { 324 enum zwp_secure_output_v1_error {
129 /** 325 /**
130 * the surface already has a security object associated 326 * the surface already has a security object associated
131 */ 327 */
132 ZWP_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0, 328 ZWP_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0,
133 }; 329 };
134 #endif /* ZWP_SECURE_OUTPUT_V1_ERROR_ENUM */ 330 #endif /* ZWP_SECURE_OUTPUT_V1_ERROR_ENUM */
135 331
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 { 457 {
262 wl_proxy_marshal((struct wl_proxy *) zwp_security_v1, 458 wl_proxy_marshal((struct wl_proxy *) zwp_security_v1,
263 ZWP_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT); 459 ZWP_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT);
264 } 460 }
265 461
266 #ifdef __cplusplus 462 #ifdef __cplusplus
267 } 463 }
268 #endif 464 #endif
269 465
270 #endif 466 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698