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

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

Issue 2896943002: Add "stylus-tools" Wayland protocol. (Closed)
Patch Set: formatting Created 3 years, 7 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 /* Generated by wayland-scanner 1.12.90 */
2
3 #ifndef ANNOTATION_UNSTABLE_V1_SERVER_PROTOCOL_H
4 #define ANNOTATION_UNSTABLE_V1_SERVER_PROTOCOL_H
5
6 #include <stddef.h>
7 #include <stdint.h>
8 #include "wayland-server.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 struct wl_client;
15 struct wl_resource;
16
17 /**
18 * @page page_annotation_unstable_v1 The annotation_unstable_v1 protocol
19 * Protocol for the annotation layer
20 *
21 * @section page_desc_annotation_unstable_v1 Description
22 *
23 * This protocol specifies a set of interfaces to control the behavior
24 * or the annotation layer, a special layer allowing the user to annotate
25 * the on-screen content.
26 *
27 * Warning! The protocol described in this file is experimental and backward
28 * incompatible changes may be made. Backward compatible changes may be added
29 * together with the corresponding interface version bump. Backward
30 * incompatible changes are done by bumping the version number in the protocol
31 * and interface names and resetting the interface version. Once the protocol
32 * is to be declared stable, the 'z' prefix and the version number in the
33 * protocol and interface names are removed and the interface version number is
34 * reset.
35 *
36 * @section page_ifaces_annotation_unstable_v1 Interfaces
37 * - @subpage page_iface_zcr_annotation_v1 - annotation
38 * - @subpage page_iface_zcr_annotation_features_v1 - annotation_features
39 * interface to a wl_surface
40 * @section page_copyright_annotation_unstable_v1 Copyright
41 * <pre>
42 *
43 * Copyright 2017 The Chromium Authors.
44 *
45 * Permission is hereby granted, free of charge, to any person obtaining a
46 * copy of this software and associated documentation files (the "Software"),
47 * to deal in the Software without restriction, including without limitation
48 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
49 * and/or sell copies of the Software, and to permit persons to whom the
50 * Software is furnished to do so, subject to the following conditions:
51 *
52 * The above copyright notice and this permission notice (including the next
53 * paragraph) shall be included in all copies or substantial portions of the
54 * Software.
55 *
56 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
57 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
58 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
59 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
60 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
61 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
62 * DEALINGS IN THE SOFTWARE.
63 * </pre>
64 */
65 struct wl_surface;
66 struct zcr_annotation_features_v1;
67 struct zcr_annotation_v1;
68
69 /**
70 * @page page_iface_zcr_annotation_v1 zcr_annotation_v1
71 * @section page_iface_zcr_annotation_v1_desc Description
72 *
73 * The global interface exposing the annotation layer capabilities is
74 * used to instantiate an interface extension for a wl_surface object.
75 * This extended interface will then allow the client to specify the
76 * features of the annotation layer.
77 * @section page_iface_zcr_annotation_v1_api API
78 * See @ref iface_zcr_annotation_v1.
79 */
80 /**
81 * @defgroup iface_zcr_annotation_v1 The zcr_annotation_v1 interface
82 *
83 * The global interface exposing the annotation layer capabilities is
84 * used to instantiate an interface extension for a wl_surface object.
85 * This extended interface will then allow the client to specify the
86 * features of the annotation layer.
87 */
88 extern const struct wl_interface zcr_annotation_v1_interface;
89 /**
90 * @page page_iface_zcr_annotation_features_v1 zcr_annotation_features_v1
91 * @section page_iface_zcr_annotation_features_v1_desc Description
92 *
93 * An additional interface to a wl_surface object, which allows the
94 * client to specify the features of the annotation layer.
95 *
96 * If the wl_surface associated with the annotation_features object is
97 * destroyed, the annotation_features object becomes inert.
98 *
99 * If the annotation_features object is destroyed, the annotation_features state
100 * is removed from the wl_surface. The change will be applied on the next
101 * wl_surface.commit.
102 * @section page_iface_zcr_annotation_features_v1_api API
103 * See @ref iface_zcr_annotation_features_v1.
104 */
105 /**
106 * @defgroup iface_zcr_annotation_features_v1 The zcr_annotation_features_v1
107 * interface
108 *
109 * An additional interface to a wl_surface object, which allows the
110 * client to specify the features of the annotation layer.
111 *
112 * If the wl_surface associated with the annotation_features object is
113 * destroyed, the annotation_features object becomes inert.
114 *
115 * If the annotation_features object is destroyed, the annotation_features state
116 * is removed from the wl_surface. The change will be applied on the next
117 * wl_surface.commit.
118 */
119 extern const struct wl_interface zcr_annotation_features_v1_interface;
120
121 #ifndef ZCR_ANNOTATION_V1_ERROR_ENUM
122 #define ZCR_ANNOTATION_V1_ERROR_ENUM
123 enum zcr_annotation_v1_error {
124 /**
125 * the surface already has an annotation_features object associated
126 */
127 ZCR_ANNOTATION_V1_ERROR_ANNOTATION_FEATURES_EXISTS = 0,
128 };
129 #endif /* ZCR_ANNOTATION_V1_ERROR_ENUM */
130
131 /**
132 * @ingroup iface_zcr_annotation_v1
133 * @struct zcr_annotation_v1_interface
134 */
135 struct zcr_annotation_v1_interface {
136 /**
137 * unbind from the annotation interface
138 *
139 * Informs the server that the client will not be using this
140 * protocol object anymore. This does not affect any other objects,
141 * annotation_features objects included.
142 */
143 void (*destroy)(struct wl_client* client, struct wl_resource* resource);
144 /**
145 * extend surface interface for annotation_features
146 *
147 * Instantiate an interface extension for the given wl_surface to
148 * provide access to the annotation layer features. If the given
149 * wl_surface already has an annotation_features object associated,
150 * the annotation_features_exists protocol error is raised.
151 * @param id the new annotation_features interface id
152 * @param surface the surface
153 */
154 void (*get_annotation_features)(struct wl_client* client,
155 struct wl_resource* resource,
156 uint32_t id,
157 struct wl_resource* surface);
158 };
159
160 /**
161 * @ingroup iface_zcr_annotation_v1
162 */
163 #define ZCR_ANNOTATION_V1_DESTROY_SINCE_VERSION 1
164 /**
165 * @ingroup iface_zcr_annotation_v1
166 */
167 #define ZCR_ANNOTATION_V1_GET_ANNOTATION_FEATURES_SINCE_VERSION 1
168
169 #ifndef ZCR_ANNOTATION_FEATURES_V1_INPUT_MODE_ENUM
170 #define ZCR_ANNOTATION_FEATURES_V1_INPUT_MODE_ENUM
171 /**
172 * @ingroup iface_zcr_annotation_features_v1
173 * mode
174 *
175 * Input mode: which types of input events should be handled by
176 * the annotation layer.
177 */
178 enum zcr_annotation_features_v1_input_mode {
179 /**
180 * Handle all input events
181 */
182 ZCR_ANNOTATION_FEATURES_V1_INPUT_MODE_DEFAULT = 0,
183 /**
184 * Handle stylus only
185 */
186 ZCR_ANNOTATION_FEATURES_V1_INPUT_MODE_STYLUS_ONLY = 1,
187 };
188 #endif /* ZCR_ANNOTATION_FEATURES_V1_INPUT_MODE_ENUM */
189
190 /**
191 * @ingroup iface_zcr_annotation_features_v1
192 * @struct zcr_annotation_features_v1_interface
193 */
194 struct zcr_annotation_features_v1_interface {
195 /**
196 * remove annotation_features from the surface
197 *
198 * The associated wl_surface's annotation_features state is
199 * removed. The change is applied on the next wl_surface.commit.
200 */
201 void (*destroy)(struct wl_client* client, struct wl_resource* resource);
202 /**
203 * set the input mode
204 *
205 * Set the input mode for the annotation layer associated with
206 * the wl_surface.
207 * @param mode the new input mode
208 */
209 void (*set_input_mode)(struct wl_client* client,
210 struct wl_resource* resource,
211 uint32_t mode);
212 };
213
214 /**
215 * @ingroup iface_zcr_annotation_features_v1
216 */
217 #define ZCR_ANNOTATION_FEATURES_V1_DESTROY_SINCE_VERSION 1
218 /**
219 * @ingroup iface_zcr_annotation_features_v1
220 */
221 #define ZCR_ANNOTATION_FEATURES_V1_SET_INPUT_MODE_SINCE_VERSION 1
222
223 #ifdef __cplusplus
224 }
225 #endif
226
227 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698