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

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

Issue 1804973003: third_party: Add secure_output_protocol target to wayland-protocols. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 9 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
(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_SERVER_PROTOCOL_H
25 #define SECURE_CONTENTS_UNSTABLE_V1_SERVER_PROTOCOL_H
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include <stdint.h>
32 #include <stddef.h>
33 #include "wayland-util.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 /**
52 * zwp_secure_contents_v1 - secure contents
53 * @destroy: unbind from the secure contents interface
54 * @get_secure: extend surface interface for secure contents
55 *
56 * The global interface exposing secure contents capabilities is used to
57 * instantiate an interface extension for a wl_surface object. This
58 * extended interface will then allow surfaces to be marked as having
59 * sensitive contents, effectively preventing the surface from from
60 * appearing in screenshots or from being viewed on non-secure outputs.
61 */
62 struct zwp_secure_contents_v1_interface {
63 /**
64 * destroy - unbind from the secure contents interface
65 *
66 * Informs the server that the client will not be using this
67 * protocol object anymore. This does not affect any other objects,
68 * secure objects included.
69 */
70 void (*destroy)(struct wl_client *client,
71 struct wl_resource *resource);
72 /**
73 * get_secure - extend surface interface for secure contents
74 * @id: the new secure interface id
75 * @surface: the surface
76 *
77 * Instantiate an interface extension for the given wl_surface to
78 * provide securing of contents. If the given wl_surface already
79 * has a secure object associated, the secure_exists protocol error
80 * is raised.
81 */
82 void (*get_secure)(struct wl_client *client,
83 struct wl_resource *resource,
84 uint32_t id,
85 struct wl_resource *surface);
86 };
87
88 /**
89 * zwp_secure_v1 - secure interface to a wl_surface
90 * @destroy: remove sensitive contents from the surface
91 * @enable_sensitive_contents: set the sensitive contents state
92 *
93 * An additional interface to a wl_surface object, which allows the
94 * client to specify that a surface has sensitive surface contents.
95 *
96 * If the wl_surface associated with the secure object is destroyed, the
97 * secure object becomes inert.
98 *
99 * If the secure object is destroyed, the sensitive contents state is
100 * removed from the wl_surface. The change will be applied on the next
101 * wl_surface.commit.
102 */
103 struct zwp_secure_v1_interface {
104 /**
105 * destroy - remove sensitive contents from the surface
106 *
107 * The associated wl_surface's senstaive contents state is
108 * removed. The change is applied on the next wl_surface.commit.
109 */
110 void (*destroy)(struct wl_client *client,
111 struct wl_resource *resource);
112 /**
113 * enable_sensitive_contents - set the sensitive contents state
114 *
115 * Enable sensitive contents for wl_surface. See
116 * wp_secure_contents for the description.
117 *
118 * The sensitive contents state is double-buffered state, and will
119 * be applied on the next wl_surface.commit.
120 */
121 void (*enable_sensitive_contents)(struct wl_client *client,
122 struct wl_resource *resource);
123 };
124
125 #ifdef __cplusplus
126 }
127 #endif
128
129 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698