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

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

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

Powered by Google App Engine
This is Rietveld 408576698