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