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

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

Issue 2896943002: Add "stylus-tools" Wayland protocol. (Closed)
Patch Set: Moved the property out of aura Created 3 years, 6 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 STYLUS_TOOLS_UNSTABLE_V1_CLIENT_PROTOCOL_H
4 #define STYLUS_TOOLS_UNSTABLE_V1_CLIENT_PROTOCOL_H
5
6 #include <stddef.h>
7 #include <stdint.h>
8 #include "wayland-client.h"
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 /**
15 * @page page_stylus_tools_unstable_v1 The stylus_tools_unstable_v1 protocol
16 * Protocol for the stylus tools
17 *
18 * @section page_desc_stylus_tools_unstable_v1 Description
19 *
20 * This protocol specifies a set of interfaces used to control the behavior
21 * of stylus tools.
22 *
23 * Warning! The protocol described in this file is experimental and backward
24 * incompatible changes may be made. Backward compatible changes may be added
25 * together with the corresponding interface version bump. Backward
26 * incompatible changes are done by bumping the version number in the protocol
27 * and interface names and resetting the interface version. Once the protocol
28 * is to be declared stable, the 'z' prefix and the version number in the
29 * protocol and interface names are removed and the interface version number is
30 * reset.
31 *
32 * @section page_ifaces_stylus_tools_unstable_v1 Interfaces
33 * - @subpage page_iface_zcr_stylus_tools_v1 - stylus_tools
34 * - @subpage page_iface_zcr_stylus_tool_v1 - stylus_tool interface to a
35 * wl_surface
36 * @section page_copyright_stylus_tools_unstable_v1 Copyright
37 * <pre>
38 *
39 * Copyright 2017 The Chromium Authors.
40 *
41 * Permission is hereby granted, free of charge, to any person obtaining a
42 * copy of this software and associated documentation files (the "Software"),
43 * to deal in the Software without restriction, including without limitation
44 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
45 * and/or sell copies of the Software, and to permit persons to whom the
46 * Software is furnished to do so, subject to the following conditions:
47 *
48 * The above copyright notice and this permission notice (including the next
49 * paragraph) shall be included in all copies or substantial portions of the
50 * Software.
51 *
52 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
55 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
56 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
57 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
58 * DEALINGS IN THE SOFTWARE.
59 * </pre>
60 */
61 struct wl_surface;
62 struct zcr_stylus_tool_v1;
63 struct zcr_stylus_tools_v1;
64
65 /**
66 * @page page_iface_zcr_stylus_tools_v1 zcr_stylus_tools_v1
67 * @section page_iface_zcr_stylus_tools_v1_desc Description
68 *
69 * The global interface is used to instantiate an interface extension for a
70 * wl_surface object. This extended interface will then allow the client to
71 * control the stylus-related behavior of the window associated with the
72 * wl_surface.
73 * @section page_iface_zcr_stylus_tools_v1_api API
74 * See @ref iface_zcr_stylus_tools_v1.
75 */
76 /**
77 * @defgroup iface_zcr_stylus_tools_v1 The zcr_stylus_tools_v1 interface
78 *
79 * The global interface is used to instantiate an interface extension for a
80 * wl_surface object. This extended interface will then allow the client to
81 * control the stylus-related behavior of the window associated with the
82 * wl_surface.
83 */
84 extern const struct wl_interface zcr_stylus_tools_v1_interface;
85 /**
86 * @page page_iface_zcr_stylus_tool_v1 zcr_stylus_tool_v1
87 * @section page_iface_zcr_stylus_tool_v1_desc Description
88 *
89 * An additional interface to a wl_surface object, which allows the
90 * client to control the behavior of stylus tools.
91 *
92 * If the wl_surface associated with the stylus_tool object is destroyed,
93 * the stylus_tool object becomes inert.
94 *
95 * If the stylus_tool object is destroyed, the stylus_tool state is removed
96 * from the wl_surface. The change will be applied on the next
97 * wl_surface.commit.
98 * @section page_iface_zcr_stylus_tool_v1_api API
99 * See @ref iface_zcr_stylus_tool_v1.
100 */
101 /**
102 * @defgroup iface_zcr_stylus_tool_v1 The zcr_stylus_tool_v1 interface
103 *
104 * An additional interface to a wl_surface object, which allows the
105 * client to control the behavior of stylus tools.
106 *
107 * If the wl_surface associated with the stylus_tool object is destroyed,
108 * the stylus_tool object becomes inert.
109 *
110 * If the stylus_tool object is destroyed, the stylus_tool state is removed
111 * from the wl_surface. The change will be applied on the next
112 * wl_surface.commit.
113 */
114 extern const struct wl_interface zcr_stylus_tool_v1_interface;
115
116 #ifndef ZCR_STYLUS_TOOLS_V1_ERROR_ENUM
117 #define ZCR_STYLUS_TOOLS_V1_ERROR_ENUM
118 enum zcr_stylus_tools_v1_error {
119 /**
120 * the surface already has a stylus_tool object associated
121 */
122 ZCR_STYLUS_TOOLS_V1_ERROR_STYLUS_TOOL_EXISTS = 0,
123 };
124 #endif /* ZCR_STYLUS_TOOLS_V1_ERROR_ENUM */
125
126 #define ZCR_STYLUS_TOOLS_V1_DESTROY 0
127 #define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL 1
128
129 /**
130 * @ingroup iface_zcr_stylus_tools_v1
131 */
132 #define ZCR_STYLUS_TOOLS_V1_DESTROY_SINCE_VERSION 1
133 /**
134 * @ingroup iface_zcr_stylus_tools_v1
135 */
136 #define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL_SINCE_VERSION 1
137
138 /** @ingroup iface_zcr_stylus_tools_v1 */
139 static inline void zcr_stylus_tools_v1_set_user_data(
140 struct zcr_stylus_tools_v1* zcr_stylus_tools_v1,
141 void* user_data) {
142 wl_proxy_set_user_data((struct wl_proxy*)zcr_stylus_tools_v1, user_data);
143 }
144
145 /** @ingroup iface_zcr_stylus_tools_v1 */
146 static inline void* zcr_stylus_tools_v1_get_user_data(
147 struct zcr_stylus_tools_v1* zcr_stylus_tools_v1) {
148 return wl_proxy_get_user_data((struct wl_proxy*)zcr_stylus_tools_v1);
149 }
150
151 static inline uint32_t zcr_stylus_tools_v1_get_version(
152 struct zcr_stylus_tools_v1* zcr_stylus_tools_v1) {
153 return wl_proxy_get_version((struct wl_proxy*)zcr_stylus_tools_v1);
154 }
155
156 /**
157 * @ingroup iface_zcr_stylus_tools_v1
158 *
159 * Informs the server that the client will not be using this
160 * protocol object anymore. This does not affect any other objects,
161 * stylus_tool objects included.
162 */
163 static inline void zcr_stylus_tools_v1_destroy(
164 struct zcr_stylus_tools_v1* zcr_stylus_tools_v1) {
165 wl_proxy_marshal((struct wl_proxy*)zcr_stylus_tools_v1,
166 ZCR_STYLUS_TOOLS_V1_DESTROY);
167
168 wl_proxy_destroy((struct wl_proxy*)zcr_stylus_tools_v1);
169 }
170
171 /**
172 * @ingroup iface_zcr_stylus_tools_v1
173 *
174 * Instantiate an interface extension for the given wl_surface to
175 * provide access to the stylus tools features. If the given
176 * wl_surface already has an stylus_tool object associated,
177 * the stylus_tool_exists protocol protocol error is raised.
178 */
179 static inline struct zcr_stylus_tool_v1* zcr_stylus_tools_v1_get_stylus_tool(
180 struct zcr_stylus_tools_v1* zcr_stylus_tools_v1,
181 struct wl_surface* surface) {
182 struct wl_proxy* id;
183
184 id = wl_proxy_marshal_constructor((struct wl_proxy*)zcr_stylus_tools_v1,
185 ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL,
186 &zcr_stylus_tool_v1_interface, NULL,
187 surface);
188
189 return (struct zcr_stylus_tool_v1*)id;
190 }
191
192 #define ZCR_STYLUS_TOOL_V1_DESTROY 0
193 #define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY 1
194
195 /**
196 * @ingroup iface_zcr_stylus_tool_v1
197 */
198 #define ZCR_STYLUS_TOOL_V1_DESTROY_SINCE_VERSION 1
199 /**
200 * @ingroup iface_zcr_stylus_tool_v1
201 */
202 #define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY_SINCE_VERSION 1
203
204 /** @ingroup iface_zcr_stylus_tool_v1 */
205 static inline void zcr_stylus_tool_v1_set_user_data(
206 struct zcr_stylus_tool_v1* zcr_stylus_tool_v1,
207 void* user_data) {
208 wl_proxy_set_user_data((struct wl_proxy*)zcr_stylus_tool_v1, user_data);
209 }
210
211 /** @ingroup iface_zcr_stylus_tool_v1 */
212 static inline void* zcr_stylus_tool_v1_get_user_data(
213 struct zcr_stylus_tool_v1* zcr_stylus_tool_v1) {
214 return wl_proxy_get_user_data((struct wl_proxy*)zcr_stylus_tool_v1);
215 }
216
217 static inline uint32_t zcr_stylus_tool_v1_get_version(
218 struct zcr_stylus_tool_v1* zcr_stylus_tool_v1) {
219 return wl_proxy_get_version((struct wl_proxy*)zcr_stylus_tool_v1);
220 }
221
222 /**
223 * @ingroup iface_zcr_stylus_tool_v1
224 *
225 * The associated wl_surface's stylus_tool state is removed.
226 * The change is applied on the next wl_surface.commit.
227 */
228 static inline void zcr_stylus_tool_v1_destroy(
229 struct zcr_stylus_tool_v1* zcr_stylus_tool_v1) {
230 wl_proxy_marshal((struct wl_proxy*)zcr_stylus_tool_v1,
231 ZCR_STYLUS_TOOL_V1_DESTROY);
232
233 wl_proxy_destroy((struct wl_proxy*)zcr_stylus_tool_v1);
234 }
235
236 /**
237 * @ingroup iface_zcr_stylus_tool_v1
238 *
239 * Enables the "stylus-only" mode for the window associated with the
240 * wl_surface.
241 */
242 static inline void zcr_stylus_tool_v1_set_stylus_only(
243 struct zcr_stylus_tool_v1* zcr_stylus_tool_v1) {
244 wl_proxy_marshal((struct wl_proxy*)zcr_stylus_tool_v1,
245 ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY);
246 }
247
248 #ifdef __cplusplus
249 }
250 #endif
251
252 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698