| 1 |
/* Generated by wayland-scanner 1.24.0 */ |
| 2 |
|
| 3 |
#ifndef VIRTUAL_KEYBOARD_UNSTABLE_V1_CLIENT_PROTOCOL_H |
| 4 |
#define VIRTUAL_KEYBOARD_UNSTABLE_V1_CLIENT_PROTOCOL_H |
| 5 |
|
| 6 |
#include <stdint.h> |
| 7 |
#include <stddef.h> |
| 8 |
#include "wayland-client.h" |
| 9 |
|
| 10 |
#ifdef __cplusplus |
| 11 |
extern "C" { |
| 12 |
#endif |
| 13 |
|
| 14 |
/** |
| 15 |
* @page page_virtual_keyboard_unstable_v1 The virtual_keyboard_unstable_v1 protocol |
| 16 |
* @section page_ifaces_virtual_keyboard_unstable_v1 Interfaces |
| 17 |
* - @subpage page_iface_zwp_virtual_keyboard_v1 - virtual keyboard |
| 18 |
* - @subpage page_iface_zwp_virtual_keyboard_manager_v1 - virtual keyboard manager |
| 19 |
* @section page_copyright_virtual_keyboard_unstable_v1 Copyright |
| 20 |
* <pre> |
| 21 |
* |
| 22 |
* Copyright © 2008-2011 Kristian Høgsberg |
| 23 |
* Copyright © 2010-2013 Intel Corporation |
| 24 |
* Copyright © 2012-2013 Collabora, Ltd. |
| 25 |
* Copyright © 2018 Purism SPC |
| 26 |
* |
| 27 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 28 |
* copy of this software and associated documentation files (the "Software"), |
| 29 |
* to deal in the Software without restriction, including without limitation |
| 30 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 31 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 32 |
* Software is furnished to do so, subject to the following conditions: |
| 33 |
* |
| 34 |
* The above copyright notice and this permission notice (including the next |
| 35 |
* paragraph) shall be included in all copies or substantial portions of the |
| 36 |
* Software. |
| 37 |
* |
| 38 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 39 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 40 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 41 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 42 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 43 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 44 |
* DEALINGS IN THE SOFTWARE. |
| 45 |
* </pre> |
| 46 |
*/ |
| 47 |
struct wl_seat; |
| 48 |
struct zwp_virtual_keyboard_manager_v1; |
| 49 |
struct zwp_virtual_keyboard_v1; |
| 50 |
|
| 51 |
#ifndef ZWP_VIRTUAL_KEYBOARD_V1_INTERFACE |
| 52 |
#define ZWP_VIRTUAL_KEYBOARD_V1_INTERFACE |
| 53 |
/** |
| 54 |
* @page page_iface_zwp_virtual_keyboard_v1 zwp_virtual_keyboard_v1 |
| 55 |
* @section page_iface_zwp_virtual_keyboard_v1_desc Description |
| 56 |
* |
| 57 |
* The virtual keyboard provides an application with requests which emulate |
| 58 |
* the behaviour of a physical keyboard. |
| 59 |
* |
| 60 |
* This interface can be used by clients on its own to provide raw input |
| 61 |
* events, or it can accompany the input method protocol. |
| 62 |
* @section page_iface_zwp_virtual_keyboard_v1_api API |
| 63 |
* See @ref iface_zwp_virtual_keyboard_v1. |
| 64 |
*/ |
| 65 |
/** |
| 66 |
* @defgroup iface_zwp_virtual_keyboard_v1 The zwp_virtual_keyboard_v1 interface |
| 67 |
* |
| 68 |
* The virtual keyboard provides an application with requests which emulate |
| 69 |
* the behaviour of a physical keyboard. |
| 70 |
* |
| 71 |
* This interface can be used by clients on its own to provide raw input |
| 72 |
* events, or it can accompany the input method protocol. |
| 73 |
*/ |
| 74 |
extern const struct wl_interface zwp_virtual_keyboard_v1_interface; |
| 75 |
#endif |
| 76 |
#ifndef ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_INTERFACE |
| 77 |
#define ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_INTERFACE |
| 78 |
/** |
| 79 |
* @page page_iface_zwp_virtual_keyboard_manager_v1 zwp_virtual_keyboard_manager_v1 |
| 80 |
* @section page_iface_zwp_virtual_keyboard_manager_v1_desc Description |
| 81 |
* |
| 82 |
* A virtual keyboard manager allows an application to provide keyboard |
| 83 |
* input events as if they came from a physical keyboard. |
| 84 |
* @section page_iface_zwp_virtual_keyboard_manager_v1_api API |
| 85 |
* See @ref iface_zwp_virtual_keyboard_manager_v1. |
| 86 |
*/ |
| 87 |
/** |
| 88 |
* @defgroup iface_zwp_virtual_keyboard_manager_v1 The zwp_virtual_keyboard_manager_v1 interface |
| 89 |
* |
| 90 |
* A virtual keyboard manager allows an application to provide keyboard |
| 91 |
* input events as if they came from a physical keyboard. |
| 92 |
*/ |
| 93 |
extern const struct wl_interface zwp_virtual_keyboard_manager_v1_interface; |
| 94 |
#endif |
| 95 |
|
| 96 |
#ifndef ZWP_VIRTUAL_KEYBOARD_V1_ERROR_ENUM |
| 97 |
#define ZWP_VIRTUAL_KEYBOARD_V1_ERROR_ENUM |
| 98 |
enum zwp_virtual_keyboard_v1_error { |
| 99 |
/** |
| 100 |
* No keymap was set |
| 101 |
*/ |
| 102 |
ZWP_VIRTUAL_KEYBOARD_V1_ERROR_NO_KEYMAP = 0, |
| 103 |
}; |
| 104 |
#endif /* ZWP_VIRTUAL_KEYBOARD_V1_ERROR_ENUM */ |
| 105 |
|
| 106 |
#define ZWP_VIRTUAL_KEYBOARD_V1_KEYMAP 0 |
| 107 |
#define ZWP_VIRTUAL_KEYBOARD_V1_KEY 1 |
| 108 |
#define ZWP_VIRTUAL_KEYBOARD_V1_MODIFIERS 2 |
| 109 |
#define ZWP_VIRTUAL_KEYBOARD_V1_DESTROY 3 |
| 110 |
|
| 111 |
|
| 112 |
/** |
| 113 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 114 |
*/ |
| 115 |
#define ZWP_VIRTUAL_KEYBOARD_V1_KEYMAP_SINCE_VERSION 1 |
| 116 |
/** |
| 117 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 118 |
*/ |
| 119 |
#define ZWP_VIRTUAL_KEYBOARD_V1_KEY_SINCE_VERSION 1 |
| 120 |
/** |
| 121 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 122 |
*/ |
| 123 |
#define ZWP_VIRTUAL_KEYBOARD_V1_MODIFIERS_SINCE_VERSION 1 |
| 124 |
/** |
| 125 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 126 |
*/ |
| 127 |
#define ZWP_VIRTUAL_KEYBOARD_V1_DESTROY_SINCE_VERSION 1 |
| 128 |
|
| 129 |
/** @ingroup iface_zwp_virtual_keyboard_v1 */ |
| 130 |
static inline void |
| 131 |
zwp_virtual_keyboard_v1_set_user_data(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1, void *user_data) |
| 132 |
{ |
| 133 |
wl_proxy_set_user_data((struct wl_proxy *) zwp_virtual_keyboard_v1, user_data); |
| 134 |
} |
| 135 |
|
| 136 |
/** @ingroup iface_zwp_virtual_keyboard_v1 */ |
| 137 |
static inline void * |
| 138 |
zwp_virtual_keyboard_v1_get_user_data(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1) |
| 139 |
{ |
| 140 |
return wl_proxy_get_user_data((struct wl_proxy *) zwp_virtual_keyboard_v1); |
| 141 |
} |
| 142 |
|
| 143 |
static inline uint32_t |
| 144 |
zwp_virtual_keyboard_v1_get_version(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1) |
| 145 |
{ |
| 146 |
return wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_v1); |
| 147 |
} |
| 148 |
|
| 149 |
/** |
| 150 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 151 |
* |
| 152 |
* Provide a file descriptor to the compositor which can be |
| 153 |
* memory-mapped to provide a keyboard mapping description. |
| 154 |
* |
| 155 |
* Format carries a value from the keymap_format enumeration. |
| 156 |
*/ |
| 157 |
static inline void |
| 158 |
zwp_virtual_keyboard_v1_keymap(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1, uint32_t format, int32_t fd, uint32_t size) |
| 159 |
{ |
| 160 |
wl_proxy_marshal_flags((struct wl_proxy *) zwp_virtual_keyboard_v1, |
| 161 |
ZWP_VIRTUAL_KEYBOARD_V1_KEYMAP, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_v1), 0, format, fd, size); |
| 162 |
} |
| 163 |
|
| 164 |
/** |
| 165 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 166 |
* |
| 167 |
* A key was pressed or released. |
| 168 |
* The time argument is a timestamp with millisecond granularity, with an |
| 169 |
* undefined base. All requests regarding a single object must share the |
| 170 |
* same clock. |
| 171 |
* |
| 172 |
* Keymap must be set before issuing this request. |
| 173 |
* |
| 174 |
* State carries a value from the key_state enumeration. |
| 175 |
*/ |
| 176 |
static inline void |
| 177 |
zwp_virtual_keyboard_v1_key(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1, uint32_t time, uint32_t key, uint32_t state) |
| 178 |
{ |
| 179 |
wl_proxy_marshal_flags((struct wl_proxy *) zwp_virtual_keyboard_v1, |
| 180 |
ZWP_VIRTUAL_KEYBOARD_V1_KEY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_v1), 0, time, key, state); |
| 181 |
} |
| 182 |
|
| 183 |
/** |
| 184 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 185 |
* |
| 186 |
* Notifies the compositor that the modifier and/or group state has |
| 187 |
* changed, and it should update state. |
| 188 |
* |
| 189 |
* The client should use wl_keyboard.modifiers event to synchronize its |
| 190 |
* internal state with seat state. |
| 191 |
* |
| 192 |
* Keymap must be set before issuing this request. |
| 193 |
*/ |
| 194 |
static inline void |
| 195 |
zwp_virtual_keyboard_v1_modifiers(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) |
| 196 |
{ |
| 197 |
wl_proxy_marshal_flags((struct wl_proxy *) zwp_virtual_keyboard_v1, |
| 198 |
ZWP_VIRTUAL_KEYBOARD_V1_MODIFIERS, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_v1), 0, mods_depressed, mods_latched, mods_locked, group); |
| 199 |
} |
| 200 |
|
| 201 |
/** |
| 202 |
* @ingroup iface_zwp_virtual_keyboard_v1 |
| 203 |
*/ |
| 204 |
static inline void |
| 205 |
zwp_virtual_keyboard_v1_destroy(struct zwp_virtual_keyboard_v1 *zwp_virtual_keyboard_v1) |
| 206 |
{ |
| 207 |
wl_proxy_marshal_flags((struct wl_proxy *) zwp_virtual_keyboard_v1, |
| 208 |
ZWP_VIRTUAL_KEYBOARD_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_v1), WL_MARSHAL_FLAG_DESTROY); |
| 209 |
} |
| 210 |
|
| 211 |
#ifndef ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_ERROR_ENUM |
| 212 |
#define ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_ERROR_ENUM |
| 213 |
enum zwp_virtual_keyboard_manager_v1_error { |
| 214 |
/** |
| 215 |
* client not authorized to use the interface |
| 216 |
*/ |
| 217 |
ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_ERROR_UNAUTHORIZED = 0, |
| 218 |
}; |
| 219 |
#endif /* ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_ERROR_ENUM */ |
| 220 |
|
| 221 |
#define ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_CREATE_VIRTUAL_KEYBOARD 0 |
| 222 |
|
| 223 |
|
| 224 |
/** |
| 225 |
* @ingroup iface_zwp_virtual_keyboard_manager_v1 |
| 226 |
*/ |
| 227 |
#define ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_CREATE_VIRTUAL_KEYBOARD_SINCE_VERSION 1 |
| 228 |
|
| 229 |
/** @ingroup iface_zwp_virtual_keyboard_manager_v1 */ |
| 230 |
static inline void |
| 231 |
zwp_virtual_keyboard_manager_v1_set_user_data(struct zwp_virtual_keyboard_manager_v1 *zwp_virtual_keyboard_manager_v1, void *user_data) |
| 232 |
{ |
| 233 |
wl_proxy_set_user_data((struct wl_proxy *) zwp_virtual_keyboard_manager_v1, user_data); |
| 234 |
} |
| 235 |
|
| 236 |
/** @ingroup iface_zwp_virtual_keyboard_manager_v1 */ |
| 237 |
static inline void * |
| 238 |
zwp_virtual_keyboard_manager_v1_get_user_data(struct zwp_virtual_keyboard_manager_v1 *zwp_virtual_keyboard_manager_v1) |
| 239 |
{ |
| 240 |
return wl_proxy_get_user_data((struct wl_proxy *) zwp_virtual_keyboard_manager_v1); |
| 241 |
} |
| 242 |
|
| 243 |
static inline uint32_t |
| 244 |
zwp_virtual_keyboard_manager_v1_get_version(struct zwp_virtual_keyboard_manager_v1 *zwp_virtual_keyboard_manager_v1) |
| 245 |
{ |
| 246 |
return wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_manager_v1); |
| 247 |
} |
| 248 |
|
| 249 |
/** @ingroup iface_zwp_virtual_keyboard_manager_v1 */ |
| 250 |
static inline void |
| 251 |
zwp_virtual_keyboard_manager_v1_destroy(struct zwp_virtual_keyboard_manager_v1 *zwp_virtual_keyboard_manager_v1) |
| 252 |
{ |
| 253 |
wl_proxy_destroy((struct wl_proxy *) zwp_virtual_keyboard_manager_v1); |
| 254 |
} |
| 255 |
|
| 256 |
/** |
| 257 |
* @ingroup iface_zwp_virtual_keyboard_manager_v1 |
| 258 |
* |
| 259 |
* Creates a new virtual keyboard associated to a seat. |
| 260 |
* |
| 261 |
* If the compositor enables a keyboard to perform arbitrary actions, it |
| 262 |
* should present an error when an untrusted client requests a new |
| 263 |
* keyboard. |
| 264 |
*/ |
| 265 |
static inline struct zwp_virtual_keyboard_v1 * |
| 266 |
zwp_virtual_keyboard_manager_v1_create_virtual_keyboard(struct zwp_virtual_keyboard_manager_v1 *zwp_virtual_keyboard_manager_v1, struct wl_seat *seat) |
| 267 |
{ |
| 268 |
struct wl_proxy *id; |
| 269 |
|
| 270 |
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_virtual_keyboard_manager_v1, |
| 271 |
ZWP_VIRTUAL_KEYBOARD_MANAGER_V1_CREATE_VIRTUAL_KEYBOARD, &zwp_virtual_keyboard_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_virtual_keyboard_manager_v1), 0, seat, NULL); |
| 272 |
|
| 273 |
return (struct zwp_virtual_keyboard_v1 *) id; |
| 274 |
} |
| 275 |
|
| 276 |
#ifdef __cplusplus |
| 277 |
} |
| 278 |
#endif |
| 279 |
|
| 280 |
#endif |