From fa3959e2218ccc3d6992cfcb037162c1da56b7da Mon Sep 17 00:00:00 2001 From: Peterino2 Date: Fri, 18 Sep 2026 13:36:53 -0700 Subject: [PATCH] Vendor pinned XKB and D-Bus declarations and desktop protocols --- shell.nix | 2 + .../protocols/generated/cursor-shape-v1.c | 75 + .../protocols/generated/cursor-shape-v1.h | 452 +++ .../protocols/generated/dbus/dbus-arch-deps.h | 65 + .../protocols/generated/private-symbols.h | 21 + src/linux/protocols/generated/tablet-v2.c | 254 ++ src/linux/protocols/generated/tablet-v2.h | 2489 ++++++++++++ .../generated/text-input-unstable-v3.c | 97 + .../generated/text-input-unstable-v3.h | 837 ++++ .../protocols/generated/xdg-activation-v1.c | 85 + .../protocols/generated/xdg-activation-v1.h | 415 ++ .../generated/xdg-foreign-unstable-v2.c | 104 + .../generated/xdg-foreign-unstable-v2.h | 518 +++ .../generated/xdg-toplevel-icon-v1.c | 83 + .../generated/xdg-toplevel-icon-v1.h | 410 ++ src/linux/protocols/xml/cursor-shape-v1.xml | 162 + src/linux/protocols/xml/tablet-v2.xml | 1297 +++++++ .../protocols/xml/text-input-unstable-v3.xml | 456 +++ src/linux/protocols/xml/xdg-activation-v1.xml | 200 + .../protocols/xml/xdg-foreign-unstable-v2.xml | 200 + .../protocols/xml/xdg-toplevel-icon-v1.xml | 205 + src/linux/tools/protocols.py | 13 +- src/linux/vendor/README.md | 12 +- src/linux/vendor/dbus/COPYING | 23 + src/linux/vendor/dbus/dbus/dbus-address.h | 87 + .../vendor/dbus/dbus/dbus-arch-deps.h.in | 65 + src/linux/vendor/dbus/dbus/dbus-bus.h | 97 + src/linux/vendor/dbus/dbus/dbus-connection.h | 531 +++ src/linux/vendor/dbus/dbus/dbus-errors.h | 92 + src/linux/vendor/dbus/dbus/dbus-macros.h | 237 ++ src/linux/vendor/dbus/dbus/dbus-memory.h | 74 + src/linux/vendor/dbus/dbus/dbus-message.h | 401 ++ src/linux/vendor/dbus/dbus/dbus-misc.h | 60 + .../vendor/dbus/dbus/dbus-pending-call.h | 100 + src/linux/vendor/dbus/dbus/dbus-protocol.h | 488 +++ src/linux/vendor/dbus/dbus/dbus-server.h | 127 + src/linux/vendor/dbus/dbus/dbus-shared.h | 138 + src/linux/vendor/dbus/dbus/dbus-signature.h | 97 + src/linux/vendor/dbus/dbus/dbus-syntax.h | 60 + src/linux/vendor/dbus/dbus/dbus-threads.h | 191 + src/linux/vendor/dbus/dbus/dbus-types.h | 179 + src/linux/vendor/dbus/dbus/dbus.h | 106 + src/linux/vendor/manifest.json | 97 +- src/linux/vendor/xkbcommon/LICENSE | 279 ++ src/linux/vendor/xkbcommon/xkbcommon-compat.h | 80 + .../vendor/xkbcommon/xkbcommon-compose.h | 617 +++ .../vendor/xkbcommon/xkbcommon-keysyms.h | 3434 +++++++++++++++++ src/linux/vendor/xkbcommon/xkbcommon-names.h | 144 + src/linux/vendor/xkbcommon/xkbcommon.h | 2514 ++++++++++++ 49 files changed, 18763 insertions(+), 7 deletions(-) create mode 100644 src/linux/protocols/generated/cursor-shape-v1.c create mode 100644 src/linux/protocols/generated/cursor-shape-v1.h create mode 100644 src/linux/protocols/generated/dbus/dbus-arch-deps.h create mode 100644 src/linux/protocols/generated/tablet-v2.c create mode 100644 src/linux/protocols/generated/tablet-v2.h create mode 100644 src/linux/protocols/generated/text-input-unstable-v3.c create mode 100644 src/linux/protocols/generated/text-input-unstable-v3.h create mode 100644 src/linux/protocols/generated/xdg-activation-v1.c create mode 100644 src/linux/protocols/generated/xdg-activation-v1.h create mode 100644 src/linux/protocols/generated/xdg-foreign-unstable-v2.c create mode 100644 src/linux/protocols/generated/xdg-foreign-unstable-v2.h create mode 100644 src/linux/protocols/generated/xdg-toplevel-icon-v1.c create mode 100644 src/linux/protocols/generated/xdg-toplevel-icon-v1.h create mode 100644 src/linux/protocols/xml/cursor-shape-v1.xml create mode 100644 src/linux/protocols/xml/tablet-v2.xml create mode 100644 src/linux/protocols/xml/text-input-unstable-v3.xml create mode 100644 src/linux/protocols/xml/xdg-activation-v1.xml create mode 100644 src/linux/protocols/xml/xdg-foreign-unstable-v2.xml create mode 100644 src/linux/protocols/xml/xdg-toplevel-icon-v1.xml create mode 100644 src/linux/vendor/dbus/COPYING create mode 100644 src/linux/vendor/dbus/dbus/dbus-address.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-arch-deps.h.in create mode 100644 src/linux/vendor/dbus/dbus/dbus-bus.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-connection.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-errors.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-macros.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-memory.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-message.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-misc.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-pending-call.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-protocol.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-server.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-shared.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-signature.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-syntax.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-threads.h create mode 100644 src/linux/vendor/dbus/dbus/dbus-types.h create mode 100644 src/linux/vendor/dbus/dbus/dbus.h create mode 100644 src/linux/vendor/xkbcommon/LICENSE create mode 100644 src/linux/vendor/xkbcommon/xkbcommon-compat.h create mode 100644 src/linux/vendor/xkbcommon/xkbcommon-compose.h create mode 100644 src/linux/vendor/xkbcommon/xkbcommon-keysyms.h create mode 100644 src/linux/vendor/xkbcommon/xkbcommon-names.h create mode 100644 src/linux/vendor/xkbcommon/xkbcommon.h diff --git a/shell.nix b/shell.nix index 8584d19..b6cd478 100644 --- a/shell.nix +++ b/shell.nix @@ -12,5 +12,7 @@ pkgs.mkShell { LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.wayland pkgs.libglvnd + pkgs.libxkbcommon + pkgs.dbus.lib ]; } diff --git a/src/linux/protocols/generated/cursor-shape-v1.c b/src/linux/protocols/generated/cursor-shape-v1.c new file mode 100644 index 0000000..a464445 --- /dev/null +++ b/src/linux/protocols/generated/cursor-shape-v1.c @@ -0,0 +1,75 @@ +/* Generated by wayland-scanner 1.24.0 */ + +/* + * Copyright 2018 The Chromium Authors + * Copyright 2023 Simon Ser + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface wl_pointer_interface; +extern const struct wl_interface wp_cursor_shape_device_v1_interface; +extern const struct wl_interface zwp_tablet_tool_v2_interface; + +static const struct wl_interface *cursor_shape_v1_types[] = { + NULL, + NULL, + &wp_cursor_shape_device_v1_interface, + &wl_pointer_interface, + &wp_cursor_shape_device_v1_interface, + &zwp_tablet_tool_v2_interface, +}; + +static const struct wl_message wp_cursor_shape_manager_v1_requests[] = { + { "destroy", "", cursor_shape_v1_types + 0 }, + { "get_pointer", "no", cursor_shape_v1_types + 2 }, + { "get_tablet_tool_v2", "no", cursor_shape_v1_types + 4 }, +}; + +WL_PRIVATE const struct wl_interface wp_cursor_shape_manager_v1_interface = { + "wp_cursor_shape_manager_v1", 2, + 3, wp_cursor_shape_manager_v1_requests, + 0, NULL, +}; + +static const struct wl_message wp_cursor_shape_device_v1_requests[] = { + { "destroy", "", cursor_shape_v1_types + 0 }, + { "set_shape", "uu", cursor_shape_v1_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface wp_cursor_shape_device_v1_interface = { + "wp_cursor_shape_device_v1", 2, + 2, wp_cursor_shape_device_v1_requests, + 0, NULL, +}; + diff --git a/src/linux/protocols/generated/cursor-shape-v1.h b/src/linux/protocols/generated/cursor-shape-v1.h new file mode 100644 index 0000000..6284115 --- /dev/null +++ b/src/linux/protocols/generated/cursor-shape-v1.h @@ -0,0 +1,452 @@ +/* Generated by wayland-scanner 1.24.0 */ + +#ifndef CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H +#define CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H + +#include +#include +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_cursor_shape_v1 The cursor_shape_v1 protocol + * @section page_ifaces_cursor_shape_v1 Interfaces + * - @subpage page_iface_wp_cursor_shape_manager_v1 - cursor shape manager + * - @subpage page_iface_wp_cursor_shape_device_v1 - cursor shape for a device + * @section page_copyright_cursor_shape_v1 Copyright + *
+ *
+ * Copyright 2018 The Chromium Authors
+ * Copyright 2023 Simon Ser
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * 
+ */ +struct wl_pointer; +struct wp_cursor_shape_device_v1; +struct wp_cursor_shape_manager_v1; +struct zwp_tablet_tool_v2; + +#ifndef WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE +#define WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE +/** + * @page page_iface_wp_cursor_shape_manager_v1 wp_cursor_shape_manager_v1 + * @section page_iface_wp_cursor_shape_manager_v1_desc Description + * + * This global offers an alternative, optional way to set cursor images. This + * new way uses enumerated cursors instead of a wl_surface like + * wl_pointer.set_cursor does. + * + * Warning! The protocol described in this file is currently in the testing + * phase. Backward compatible changes may be added together with the + * corresponding interface version bump. Backward incompatible changes can + * only be done by creating a new major version of the extension. + * @section page_iface_wp_cursor_shape_manager_v1_api API + * See @ref iface_wp_cursor_shape_manager_v1. + */ +/** + * @defgroup iface_wp_cursor_shape_manager_v1 The wp_cursor_shape_manager_v1 interface + * + * This global offers an alternative, optional way to set cursor images. This + * new way uses enumerated cursors instead of a wl_surface like + * wl_pointer.set_cursor does. + * + * Warning! The protocol described in this file is currently in the testing + * phase. Backward compatible changes may be added together with the + * corresponding interface version bump. Backward incompatible changes can + * only be done by creating a new major version of the extension. + */ +extern const struct wl_interface wp_cursor_shape_manager_v1_interface; +#endif +#ifndef WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE +#define WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE +/** + * @page page_iface_wp_cursor_shape_device_v1 wp_cursor_shape_device_v1 + * @section page_iface_wp_cursor_shape_device_v1_desc Description + * + * This interface allows clients to set the cursor shape. + * @section page_iface_wp_cursor_shape_device_v1_api API + * See @ref iface_wp_cursor_shape_device_v1. + */ +/** + * @defgroup iface_wp_cursor_shape_device_v1 The wp_cursor_shape_device_v1 interface + * + * This interface allows clients to set the cursor shape. + */ +extern const struct wl_interface wp_cursor_shape_device_v1_interface; +#endif + +#define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY 0 +#define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER 1 +#define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2 2 + + +/** + * @ingroup iface_wp_cursor_shape_manager_v1 + */ +#define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_wp_cursor_shape_manager_v1 + */ +#define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER_SINCE_VERSION 1 +/** + * @ingroup iface_wp_cursor_shape_manager_v1 + */ +#define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2_SINCE_VERSION 1 + +/** @ingroup iface_wp_cursor_shape_manager_v1 */ +static inline void +wp_cursor_shape_manager_v1_set_user_data(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wp_cursor_shape_manager_v1, user_data); +} + +/** @ingroup iface_wp_cursor_shape_manager_v1 */ +static inline void * +wp_cursor_shape_manager_v1_get_user_data(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wp_cursor_shape_manager_v1); +} + +static inline uint32_t +wp_cursor_shape_manager_v1_get_version(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1) +{ + return wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1); +} + +/** + * @ingroup iface_wp_cursor_shape_manager_v1 + * + * Destroy the cursor shape manager. + */ +static inline void +wp_cursor_shape_manager_v1_destroy(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1, + WP_CURSOR_SHAPE_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_wp_cursor_shape_manager_v1 + * + * Obtain a wp_cursor_shape_device_v1 for a wl_pointer object. + * + * When the pointer capability is removed from the wl_seat, the + * wp_cursor_shape_device_v1 object becomes inert. + */ +static inline struct wp_cursor_shape_device_v1 * +wp_cursor_shape_manager_v1_get_pointer(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, struct wl_pointer *pointer) +{ + struct wl_proxy *cursor_shape_device; + + cursor_shape_device = wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1, + WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER, &wp_cursor_shape_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), 0, NULL, pointer); + + return (struct wp_cursor_shape_device_v1 *) cursor_shape_device; +} + +/** + * @ingroup iface_wp_cursor_shape_manager_v1 + * + * Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object. + * + * When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1 + * object becomes inert. + */ +static inline struct wp_cursor_shape_device_v1 * +wp_cursor_shape_manager_v1_get_tablet_tool_v2(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, struct zwp_tablet_tool_v2 *tablet_tool) +{ + struct wl_proxy *cursor_shape_device; + + cursor_shape_device = wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1, + WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2, &wp_cursor_shape_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), 0, NULL, tablet_tool); + + return (struct wp_cursor_shape_device_v1 *) cursor_shape_device; +} + +#ifndef WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM +#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM +/** + * @ingroup iface_wp_cursor_shape_device_v1 + * cursor shapes + * + * This enum describes cursor shapes. + * + * The names are taken from the CSS W3C specification: + * https://w3c.github.io/csswg-drafts/css-ui/#cursor + * with a few additions. + * + * Note that there are some groups of cursor shapes that are related: + * The first group is drag-and-drop cursors which are used to indicate + * the selected action during dnd operations. The second group is resize + * cursors which are used to indicate resizing and moving possibilities + * on window borders. It is recommended that the shapes in these groups + * should use visually compatible images and metaphors. + */ +enum wp_cursor_shape_device_v1_shape { + /** + * default cursor + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT = 1, + /** + * a context menu is available for the object under the cursor + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU = 2, + /** + * help is available for the object under the cursor + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP = 3, + /** + * pointer that indicates a link or another interactive element + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER = 4, + /** + * progress indicator + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS = 5, + /** + * program is busy, user should wait + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT = 6, + /** + * a cell or set of cells may be selected + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL = 7, + /** + * simple crosshair + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR = 8, + /** + * text may be selected + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT = 9, + /** + * vertical text may be selected + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT = 10, + /** + * drag-and-drop: alias of/shortcut to something is to be created + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS = 11, + /** + * drag-and-drop: something is to be copied + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY = 12, + /** + * drag-and-drop: something is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE = 13, + /** + * drag-and-drop: the dragged item cannot be dropped at the current cursor location + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP = 14, + /** + * drag-and-drop: the requested action will not be carried out + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED = 15, + /** + * drag-and-drop: something can be grabbed + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB = 16, + /** + * drag-and-drop: something is being grabbed + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING = 17, + /** + * resizing: the east border is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE = 18, + /** + * resizing: the north border is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE = 19, + /** + * resizing: the north-east corner is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE = 20, + /** + * resizing: the north-west corner is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE = 21, + /** + * resizing: the south border is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE = 22, + /** + * resizing: the south-east corner is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE = 23, + /** + * resizing: the south-west corner is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE = 24, + /** + * resizing: the west border is to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE = 25, + /** + * resizing: the east and west borders are to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE = 26, + /** + * resizing: the north and south borders are to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE = 27, + /** + * resizing: the north-east and south-west corners are to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE = 28, + /** + * resizing: the north-west and south-east corners are to be moved + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE = 29, + /** + * resizing: that the item/column can be resized horizontally + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE = 30, + /** + * resizing: that the item/row can be resized vertically + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE = 31, + /** + * something can be scrolled in any direction + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL = 32, + /** + * something can be zoomed in + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN = 33, + /** + * something can be zoomed out + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT = 34, + /** + * drag-and-drop: the user will select which action will be carried out (non-css value) + * @since 2 + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK = 35, + /** + * resizing: something can be moved or resized in any direction (non-css value) + * @since 2 + */ + WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE = 36, +}; +/** + * @ingroup iface_wp_cursor_shape_device_v1 + */ +#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK_SINCE_VERSION 2 +/** + * @ingroup iface_wp_cursor_shape_device_v1 + */ +#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE_SINCE_VERSION 2 +#endif /* WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM */ + +#ifndef WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM +#define WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM +enum wp_cursor_shape_device_v1_error { + /** + * the specified shape value is invalid + */ + WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE = 1, +}; +#endif /* WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM */ + +#define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY 0 +#define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE 1 + + +/** + * @ingroup iface_wp_cursor_shape_device_v1 + */ +#define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_wp_cursor_shape_device_v1 + */ +#define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE_SINCE_VERSION 1 + +/** @ingroup iface_wp_cursor_shape_device_v1 */ +static inline void +wp_cursor_shape_device_v1_set_user_data(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) wp_cursor_shape_device_v1, user_data); +} + +/** @ingroup iface_wp_cursor_shape_device_v1 */ +static inline void * +wp_cursor_shape_device_v1_get_user_data(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1) +{ + return wl_proxy_get_user_data((struct wl_proxy *) wp_cursor_shape_device_v1); +} + +static inline uint32_t +wp_cursor_shape_device_v1_get_version(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1) +{ + return wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1); +} + +/** + * @ingroup iface_wp_cursor_shape_device_v1 + * + * Destroy the cursor shape device. + * + * The device cursor shape remains unchanged. + */ +static inline void +wp_cursor_shape_device_v1_destroy(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_device_v1, + WP_CURSOR_SHAPE_DEVICE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_wp_cursor_shape_device_v1 + * + * Sets the device cursor to the specified shape. The compositor will + * change the cursor image based on the specified shape. + * + * The cursor actually changes only if the input device focus is one of + * the requesting client's surfaces. If any, the previous cursor image + * (surface or shape) is replaced. + * + * The "shape" argument must be a valid enum entry, otherwise the + * invalid_shape protocol error is raised. + * + * This is similar to the wl_pointer.set_cursor and + * zwp_tablet_tool_v2.set_cursor requests, but this request accepts a + * shape instead of contents in the form of a surface. Clients can mix + * set_cursor and set_shape requests. + * + * The serial parameter must match the latest wl_pointer.enter or + * zwp_tablet_tool_v2.proximity_in serial number sent to the client. + * Otherwise the request will be ignored. + */ +static inline void +wp_cursor_shape_device_v1_set_shape(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1, uint32_t serial, uint32_t shape) +{ + wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_device_v1, + WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1), 0, serial, shape); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/linux/protocols/generated/dbus/dbus-arch-deps.h b/src/linux/protocols/generated/dbus/dbus-arch-deps.h new file mode 100644 index 0000000..05b266e --- /dev/null +++ b/src/linux/protocols/generated/dbus/dbus-arch-deps.h @@ -0,0 +1,65 @@ +/* -*- mode: C; c-file-style: "gnu" -*- */ +/* dbus-arch-deps.h Header with architecture/compiler specific information, installed to libdir + * + * Copyright (C) 2003 Red Hat, Inc. + * SPDX-License-Identifier: AFL-2.0 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.0 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_ARCH_DEPS_H +#define DBUS_ARCH_DEPS_H + +#include + +DBUS_BEGIN_DECLS + +/* D-Bus no longer supports platforms with no 64-bit integer type. */ +#define DBUS_HAVE_INT64 1 +_DBUS_GNUC_EXTENSION typedef long long dbus_int64_t; +_DBUS_GNUC_EXTENSION typedef unsigned long long dbus_uint64_t; +#define DBUS_INT64_MODIFIER "ll" + +#define DBUS_INT64_CONSTANT(val) (_DBUS_GNUC_EXTENSION val##LL) +#define DBUS_UINT64_CONSTANT(val) (_DBUS_GNUC_EXTENSION val##ULL) + +typedef int dbus_int32_t; +typedef unsigned int dbus_uint32_t; + +typedef short dbus_int16_t; +typedef unsigned short dbus_uint16_t; + +#define DBUS_SIZEOF_VOID_P __SIZEOF_POINTER__ + +/* This is not really arch-dependent, but it's not worth + * creating an additional generated header just for this + */ +#define DBUS_MAJOR_VERSION 1 +#define DBUS_MINOR_VERSION 16 +#define DBUS_MICRO_VERSION 2 + +#define DBUS_VERSION_STRING "1.16.2" + +#define DBUS_VERSION ((1 << 16) | (16 << 8) | (2)) + +DBUS_END_DECLS + +#endif /* DBUS_ARCH_DEPS_H */ diff --git a/src/linux/protocols/generated/private-symbols.h b/src/linux/protocols/generated/private-symbols.h index 28d3620..51a98ed 100644 --- a/src/linux/protocols/generated/private-symbols.h +++ b/src/linux/protocols/generated/private-symbols.h @@ -1,6 +1,19 @@ /* Generated by tools/protocols.py; private protocol descriptors. */ +#define wp_cursor_shape_manager_v1_interface z_uhdk_wp_cursor_shape_manager_v1_interface +#define wp_cursor_shape_device_v1_interface z_uhdk_wp_cursor_shape_device_v1_interface #define wp_fractional_scale_manager_v1_interface z_uhdk_wp_fractional_scale_manager_v1_interface #define wp_fractional_scale_v1_interface z_uhdk_wp_fractional_scale_v1_interface +#define zwp_tablet_manager_v2_interface z_uhdk_zwp_tablet_manager_v2_interface +#define zwp_tablet_seat_v2_interface z_uhdk_zwp_tablet_seat_v2_interface +#define zwp_tablet_tool_v2_interface z_uhdk_zwp_tablet_tool_v2_interface +#define zwp_tablet_v2_interface z_uhdk_zwp_tablet_v2_interface +#define zwp_tablet_pad_ring_v2_interface z_uhdk_zwp_tablet_pad_ring_v2_interface +#define zwp_tablet_pad_strip_v2_interface z_uhdk_zwp_tablet_pad_strip_v2_interface +#define zwp_tablet_pad_group_v2_interface z_uhdk_zwp_tablet_pad_group_v2_interface +#define zwp_tablet_pad_v2_interface z_uhdk_zwp_tablet_pad_v2_interface +#define zwp_tablet_pad_dial_v2_interface z_uhdk_zwp_tablet_pad_dial_v2_interface +#define zwp_text_input_v3_interface z_uhdk_zwp_text_input_v3_interface +#define zwp_text_input_manager_v3_interface z_uhdk_zwp_text_input_manager_v3_interface #define wp_viewporter_interface z_uhdk_wp_viewporter_interface #define wp_viewport_interface z_uhdk_wp_viewport_interface #define wl_display_interface z_uhdk_wl_display_interface @@ -26,10 +39,18 @@ #define wl_subcompositor_interface z_uhdk_wl_subcompositor_interface #define wl_subsurface_interface z_uhdk_wl_subsurface_interface #define wl_fixes_interface z_uhdk_wl_fixes_interface +#define xdg_activation_v1_interface z_uhdk_xdg_activation_v1_interface +#define xdg_activation_token_v1_interface z_uhdk_xdg_activation_token_v1_interface #define zxdg_decoration_manager_v1_interface z_uhdk_zxdg_decoration_manager_v1_interface #define zxdg_toplevel_decoration_v1_interface z_uhdk_zxdg_toplevel_decoration_v1_interface +#define zxdg_exporter_v2_interface z_uhdk_zxdg_exporter_v2_interface +#define zxdg_importer_v2_interface z_uhdk_zxdg_importer_v2_interface +#define zxdg_exported_v2_interface z_uhdk_zxdg_exported_v2_interface +#define zxdg_imported_v2_interface z_uhdk_zxdg_imported_v2_interface #define xdg_wm_base_interface z_uhdk_xdg_wm_base_interface #define xdg_positioner_interface z_uhdk_xdg_positioner_interface #define xdg_surface_interface z_uhdk_xdg_surface_interface #define xdg_toplevel_interface z_uhdk_xdg_toplevel_interface #define xdg_popup_interface z_uhdk_xdg_popup_interface +#define xdg_toplevel_icon_manager_v1_interface z_uhdk_xdg_toplevel_icon_manager_v1_interface +#define xdg_toplevel_icon_v1_interface z_uhdk_xdg_toplevel_icon_v1_interface diff --git a/src/linux/protocols/generated/tablet-v2.c b/src/linux/protocols/generated/tablet-v2.c new file mode 100644 index 0000000..95c73ee --- /dev/null +++ b/src/linux/protocols/generated/tablet-v2.c @@ -0,0 +1,254 @@ +/* Generated by wayland-scanner 1.24.0 */ + +/* + * Copyright 2014 © Stephen "Lyude" Chandler Paul + * Copyright 2015-2024 © Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation files + * (the "Software"), to deal in the Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Software, + * and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface wl_seat_interface; +extern const struct wl_interface wl_surface_interface; +extern const struct wl_interface zwp_tablet_pad_dial_v2_interface; +extern const struct wl_interface zwp_tablet_pad_group_v2_interface; +extern const struct wl_interface zwp_tablet_pad_ring_v2_interface; +extern const struct wl_interface zwp_tablet_pad_strip_v2_interface; +extern const struct wl_interface zwp_tablet_pad_v2_interface; +extern const struct wl_interface zwp_tablet_seat_v2_interface; +extern const struct wl_interface zwp_tablet_tool_v2_interface; +extern const struct wl_interface zwp_tablet_v2_interface; + +static const struct wl_interface *tablet_v2_types[] = { + NULL, + NULL, + NULL, + &zwp_tablet_seat_v2_interface, + &wl_seat_interface, + &zwp_tablet_v2_interface, + &zwp_tablet_tool_v2_interface, + &zwp_tablet_pad_v2_interface, + NULL, + &wl_surface_interface, + NULL, + NULL, + NULL, + &zwp_tablet_v2_interface, + &wl_surface_interface, + &zwp_tablet_pad_ring_v2_interface, + &zwp_tablet_pad_strip_v2_interface, + &zwp_tablet_pad_dial_v2_interface, + &zwp_tablet_pad_group_v2_interface, + NULL, + &zwp_tablet_v2_interface, + &wl_surface_interface, + NULL, + &wl_surface_interface, +}; + +static const struct wl_message zwp_tablet_manager_v2_requests[] = { + { "get_tablet_seat", "no", tablet_v2_types + 3 }, + { "destroy", "", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_manager_v2_interface = { + "zwp_tablet_manager_v2", 2, + 2, zwp_tablet_manager_v2_requests, + 0, NULL, +}; + +static const struct wl_message zwp_tablet_seat_v2_requests[] = { + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_seat_v2_events[] = { + { "tablet_added", "n", tablet_v2_types + 5 }, + { "tool_added", "n", tablet_v2_types + 6 }, + { "pad_added", "n", tablet_v2_types + 7 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_seat_v2_interface = { + "zwp_tablet_seat_v2", 2, + 1, zwp_tablet_seat_v2_requests, + 3, zwp_tablet_seat_v2_events, +}; + +static const struct wl_message zwp_tablet_tool_v2_requests[] = { + { "set_cursor", "u?oii", tablet_v2_types + 8 }, + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_tool_v2_events[] = { + { "type", "u", tablet_v2_types + 0 }, + { "hardware_serial", "uu", tablet_v2_types + 0 }, + { "hardware_id_wacom", "uu", tablet_v2_types + 0 }, + { "capability", "u", tablet_v2_types + 0 }, + { "done", "", tablet_v2_types + 0 }, + { "removed", "", tablet_v2_types + 0 }, + { "proximity_in", "uoo", tablet_v2_types + 12 }, + { "proximity_out", "", tablet_v2_types + 0 }, + { "down", "u", tablet_v2_types + 0 }, + { "up", "", tablet_v2_types + 0 }, + { "motion", "ff", tablet_v2_types + 0 }, + { "pressure", "u", tablet_v2_types + 0 }, + { "distance", "u", tablet_v2_types + 0 }, + { "tilt", "ff", tablet_v2_types + 0 }, + { "rotation", "f", tablet_v2_types + 0 }, + { "slider", "i", tablet_v2_types + 0 }, + { "wheel", "fi", tablet_v2_types + 0 }, + { "button", "uuu", tablet_v2_types + 0 }, + { "frame", "u", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_tool_v2_interface = { + "zwp_tablet_tool_v2", 2, + 2, zwp_tablet_tool_v2_requests, + 19, zwp_tablet_tool_v2_events, +}; + +static const struct wl_message zwp_tablet_v2_requests[] = { + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_v2_events[] = { + { "name", "s", tablet_v2_types + 0 }, + { "id", "uu", tablet_v2_types + 0 }, + { "path", "s", tablet_v2_types + 0 }, + { "done", "", tablet_v2_types + 0 }, + { "removed", "", tablet_v2_types + 0 }, + { "bustype", "2u", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_v2_interface = { + "zwp_tablet_v2", 2, + 1, zwp_tablet_v2_requests, + 6, zwp_tablet_v2_events, +}; + +static const struct wl_message zwp_tablet_pad_ring_v2_requests[] = { + { "set_feedback", "su", tablet_v2_types + 0 }, + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_pad_ring_v2_events[] = { + { "source", "u", tablet_v2_types + 0 }, + { "angle", "f", tablet_v2_types + 0 }, + { "stop", "", tablet_v2_types + 0 }, + { "frame", "u", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_pad_ring_v2_interface = { + "zwp_tablet_pad_ring_v2", 2, + 2, zwp_tablet_pad_ring_v2_requests, + 4, zwp_tablet_pad_ring_v2_events, +}; + +static const struct wl_message zwp_tablet_pad_strip_v2_requests[] = { + { "set_feedback", "su", tablet_v2_types + 0 }, + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_pad_strip_v2_events[] = { + { "source", "u", tablet_v2_types + 0 }, + { "position", "u", tablet_v2_types + 0 }, + { "stop", "", tablet_v2_types + 0 }, + { "frame", "u", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_pad_strip_v2_interface = { + "zwp_tablet_pad_strip_v2", 2, + 2, zwp_tablet_pad_strip_v2_requests, + 4, zwp_tablet_pad_strip_v2_events, +}; + +static const struct wl_message zwp_tablet_pad_group_v2_requests[] = { + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_pad_group_v2_events[] = { + { "buttons", "a", tablet_v2_types + 0 }, + { "ring", "n", tablet_v2_types + 15 }, + { "strip", "n", tablet_v2_types + 16 }, + { "modes", "u", tablet_v2_types + 0 }, + { "done", "", tablet_v2_types + 0 }, + { "mode_switch", "uuu", tablet_v2_types + 0 }, + { "dial", "2n", tablet_v2_types + 17 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_pad_group_v2_interface = { + "zwp_tablet_pad_group_v2", 2, + 1, zwp_tablet_pad_group_v2_requests, + 7, zwp_tablet_pad_group_v2_events, +}; + +static const struct wl_message zwp_tablet_pad_v2_requests[] = { + { "set_feedback", "usu", tablet_v2_types + 0 }, + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_pad_v2_events[] = { + { "group", "n", tablet_v2_types + 18 }, + { "path", "s", tablet_v2_types + 0 }, + { "buttons", "u", tablet_v2_types + 0 }, + { "done", "", tablet_v2_types + 0 }, + { "button", "uuu", tablet_v2_types + 0 }, + { "enter", "uoo", tablet_v2_types + 19 }, + { "leave", "uo", tablet_v2_types + 22 }, + { "removed", "", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_pad_v2_interface = { + "zwp_tablet_pad_v2", 2, + 2, zwp_tablet_pad_v2_requests, + 8, zwp_tablet_pad_v2_events, +}; + +static const struct wl_message zwp_tablet_pad_dial_v2_requests[] = { + { "set_feedback", "su", tablet_v2_types + 0 }, + { "destroy", "", tablet_v2_types + 0 }, +}; + +static const struct wl_message zwp_tablet_pad_dial_v2_events[] = { + { "delta", "i", tablet_v2_types + 0 }, + { "frame", "u", tablet_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_tablet_pad_dial_v2_interface = { + "zwp_tablet_pad_dial_v2", 2, + 2, zwp_tablet_pad_dial_v2_requests, + 2, zwp_tablet_pad_dial_v2_events, +}; + diff --git a/src/linux/protocols/generated/tablet-v2.h b/src/linux/protocols/generated/tablet-v2.h new file mode 100644 index 0000000..6ba0092 --- /dev/null +++ b/src/linux/protocols/generated/tablet-v2.h @@ -0,0 +1,2489 @@ +/* Generated by wayland-scanner 1.24.0 */ + +#ifndef TABLET_V2_CLIENT_PROTOCOL_H +#define TABLET_V2_CLIENT_PROTOCOL_H + +#include +#include +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_tablet_v2 The tablet_v2 protocol + * Wayland protocol for graphics tablets + * + * @section page_desc_tablet_v2 Description + * + * This description provides a high-level overview of the interplay between + * the interfaces defined this protocol. For details, see the protocol + * specification. + * + * More than one tablet may exist, and device-specifics matter. Tablets are + * not represented by a single virtual device like wl_pointer. A client + * binds to the tablet manager object which is just a proxy object. From + * that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat) + * and that returns the actual interface that has all the tablets. With + * this indirection, we can avoid merging wp_tablet into the actual Wayland + * protocol, a long-term benefit. + * + * The wp_tablet_seat sends a "tablet added" event for each tablet + * connected. That event is followed by descriptive events about the + * hardware; currently that includes events for name, vid/pid and + * a wp_tablet.path event that describes a local path. This path can be + * used to uniquely identify a tablet or get more information through + * libwacom. Emulated or nested tablets can skip any of those, e.g. a + * virtual tablet may not have a vid/pid. The sequence of descriptive + * events is terminated by a wp_tablet.done event to signal that a client + * may now finalize any initialization for that tablet. + * + * Events from tablets require a tool in proximity. Tools are also managed + * by the tablet seat; a "tool added" event is sent whenever a tool is new + * to the compositor. That event is followed by a number of descriptive + * events about the hardware; currently that includes capabilities, + * hardware id and serial number, and tool type. Similar to the tablet + * interface, a wp_tablet_tool.done event is sent to terminate that initial + * sequence. + * + * Any event from a tool happens on the wp_tablet_tool interface. When the + * tool gets into proximity of the tablet, a proximity_in event is sent on + * the wp_tablet_tool interface, listing the tablet and the surface. That + * event is followed by a motion event with the coordinates. After that, + * it's the usual motion, axis, button, etc. events. The protocol's + * serialisation means events are grouped by wp_tablet_tool.frame events. + * + * Two special events (that don't exist in X) are down and up. They signal + * "tip touching the surface". For tablets without real proximity + * detection, the sequence is: proximity_in, motion, down, frame. + * + * When the tool leaves proximity, a proximity_out event is sent. If any + * button is still down, a button release event is sent before this + * proximity event. These button events are sent in the same frame as the + * proximity event to signal to the client that the buttons were held when + * the tool left proximity. + * + * If the tool moves out of the surface but stays in proximity (i.e. + * between windows), compositor-specific grab policies apply. This usually + * means that the proximity-out is delayed until all buttons are released. + * + * Moving a tool physically from one tablet to the other has no real effect + * on the protocol, since we already have the tool object from the "tool + * added" event. All the information is already there and the proximity + * events on both tablets are all a client needs to reconstruct what + * happened. + * + * Some extra axes are normalized, i.e. the client knows the range as + * specified in the protocol (e.g. [0, 65535]), the granularity however is + * unknown. The current normalized axes are pressure, distance, and slider. + * + * Other extra axes are in physical units as specified in the protocol. + * The current extra axes with physical units are tilt, rotation and + * wheel rotation. + * + * Since tablets work independently of the pointer controlled by the mouse, + * the focus handling is independent too and controlled by proximity. + * The wp_tablet_tool.set_cursor request sets a tool-specific cursor. + * This cursor surface may be the same as the mouse cursor, and it may be + * the same across tools but it is possible to be more fine-grained. For + * example, a client may set different cursors for the pen and eraser. + * + * Tools are generally independent of tablets and it is + * compositor-specific policy when a tool can be removed. Common approaches + * will likely include some form of removing a tool when all tablets the + * tool was used on are removed. + * + * @section page_ifaces_tablet_v2 Interfaces + * - @subpage page_iface_zwp_tablet_manager_v2 - controller object for graphic tablet devices + * - @subpage page_iface_zwp_tablet_seat_v2 - controller object for graphic tablet devices of a seat + * - @subpage page_iface_zwp_tablet_tool_v2 - a physical tablet tool + * - @subpage page_iface_zwp_tablet_v2 - graphics tablet device + * - @subpage page_iface_zwp_tablet_pad_ring_v2 - pad ring + * - @subpage page_iface_zwp_tablet_pad_strip_v2 - pad strip + * - @subpage page_iface_zwp_tablet_pad_group_v2 - a set of buttons, rings and strips + * - @subpage page_iface_zwp_tablet_pad_v2 - a set of buttons, rings, strips and dials + * - @subpage page_iface_zwp_tablet_pad_dial_v2 - pad dial + * @section page_copyright_tablet_v2 Copyright + *
+ *
+ * Copyright 2014 © Stephen "Lyude" Chandler Paul
+ * Copyright 2015-2024 © Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ * 
+ */ +struct wl_seat; +struct wl_surface; +struct zwp_tablet_manager_v2; +struct zwp_tablet_pad_dial_v2; +struct zwp_tablet_pad_group_v2; +struct zwp_tablet_pad_ring_v2; +struct zwp_tablet_pad_strip_v2; +struct zwp_tablet_pad_v2; +struct zwp_tablet_seat_v2; +struct zwp_tablet_tool_v2; +struct zwp_tablet_v2; + +#ifndef ZWP_TABLET_MANAGER_V2_INTERFACE +#define ZWP_TABLET_MANAGER_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_manager_v2 zwp_tablet_manager_v2 + * @section page_iface_zwp_tablet_manager_v2_desc Description + * + * An object that provides access to the graphics tablets available on this + * system. All tablets are associated with a seat, to get access to the + * actual tablets, use wp_tablet_manager.get_tablet_seat. + * @section page_iface_zwp_tablet_manager_v2_api API + * See @ref iface_zwp_tablet_manager_v2. + */ +/** + * @defgroup iface_zwp_tablet_manager_v2 The zwp_tablet_manager_v2 interface + * + * An object that provides access to the graphics tablets available on this + * system. All tablets are associated with a seat, to get access to the + * actual tablets, use wp_tablet_manager.get_tablet_seat. + */ +extern const struct wl_interface zwp_tablet_manager_v2_interface; +#endif +#ifndef ZWP_TABLET_SEAT_V2_INTERFACE +#define ZWP_TABLET_SEAT_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_seat_v2 zwp_tablet_seat_v2 + * @section page_iface_zwp_tablet_seat_v2_desc Description + * + * An object that provides access to the graphics tablets available on this + * seat. After binding to this interface, the compositor sends a set of + * wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. + * @section page_iface_zwp_tablet_seat_v2_api API + * See @ref iface_zwp_tablet_seat_v2. + */ +/** + * @defgroup iface_zwp_tablet_seat_v2 The zwp_tablet_seat_v2 interface + * + * An object that provides access to the graphics tablets available on this + * seat. After binding to this interface, the compositor sends a set of + * wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. + */ +extern const struct wl_interface zwp_tablet_seat_v2_interface; +#endif +#ifndef ZWP_TABLET_TOOL_V2_INTERFACE +#define ZWP_TABLET_TOOL_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_tool_v2 zwp_tablet_tool_v2 + * @section page_iface_zwp_tablet_tool_v2_desc Description + * + * An object that represents a physical tool that has been, or is + * currently in use with a tablet in this seat. Each wp_tablet_tool + * object stays valid until the client destroys it; the compositor + * reuses the wp_tablet_tool object to indicate that the object's + * respective physical tool has come into proximity of a tablet again. + * + * A wp_tablet_tool object's relation to a physical tool depends on the + * tablet's ability to report serial numbers. If the tablet supports + * this capability, then the object represents a specific physical tool + * and can be identified even when used on multiple tablets. + * + * A tablet tool has a number of static characteristics, e.g. tool type, + * hardware_serial and capabilities. These capabilities are sent in an + * event sequence after the wp_tablet_seat.tool_added event before any + * actual events from this tool. This initial event sequence is + * terminated by a wp_tablet_tool.done event. + * + * Tablet tool events are grouped by wp_tablet_tool.frame events. + * Any events received before a wp_tablet_tool.frame event should be + * considered part of the same hardware state change. + * @section page_iface_zwp_tablet_tool_v2_api API + * See @ref iface_zwp_tablet_tool_v2. + */ +/** + * @defgroup iface_zwp_tablet_tool_v2 The zwp_tablet_tool_v2 interface + * + * An object that represents a physical tool that has been, or is + * currently in use with a tablet in this seat. Each wp_tablet_tool + * object stays valid until the client destroys it; the compositor + * reuses the wp_tablet_tool object to indicate that the object's + * respective physical tool has come into proximity of a tablet again. + * + * A wp_tablet_tool object's relation to a physical tool depends on the + * tablet's ability to report serial numbers. If the tablet supports + * this capability, then the object represents a specific physical tool + * and can be identified even when used on multiple tablets. + * + * A tablet tool has a number of static characteristics, e.g. tool type, + * hardware_serial and capabilities. These capabilities are sent in an + * event sequence after the wp_tablet_seat.tool_added event before any + * actual events from this tool. This initial event sequence is + * terminated by a wp_tablet_tool.done event. + * + * Tablet tool events are grouped by wp_tablet_tool.frame events. + * Any events received before a wp_tablet_tool.frame event should be + * considered part of the same hardware state change. + */ +extern const struct wl_interface zwp_tablet_tool_v2_interface; +#endif +#ifndef ZWP_TABLET_V2_INTERFACE +#define ZWP_TABLET_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_v2 zwp_tablet_v2 + * @section page_iface_zwp_tablet_v2_desc Description + * + * The wp_tablet interface represents one graphics tablet device. The + * tablet interface itself does not generate events; all events are + * generated by wp_tablet_tool objects when in proximity above a tablet. + * + * A tablet has a number of static characteristics, e.g. device name and + * pid/vid. These capabilities are sent in an event sequence after the + * wp_tablet_seat.tablet_added event. This initial event sequence is + * terminated by a wp_tablet.done event. + * @section page_iface_zwp_tablet_v2_api API + * See @ref iface_zwp_tablet_v2. + */ +/** + * @defgroup iface_zwp_tablet_v2 The zwp_tablet_v2 interface + * + * The wp_tablet interface represents one graphics tablet device. The + * tablet interface itself does not generate events; all events are + * generated by wp_tablet_tool objects when in proximity above a tablet. + * + * A tablet has a number of static characteristics, e.g. device name and + * pid/vid. These capabilities are sent in an event sequence after the + * wp_tablet_seat.tablet_added event. This initial event sequence is + * terminated by a wp_tablet.done event. + */ +extern const struct wl_interface zwp_tablet_v2_interface; +#endif +#ifndef ZWP_TABLET_PAD_RING_V2_INTERFACE +#define ZWP_TABLET_PAD_RING_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_pad_ring_v2 zwp_tablet_pad_ring_v2 + * @section page_iface_zwp_tablet_pad_ring_v2_desc Description + * + * A circular interaction area, such as the touch ring on the Wacom Intuos + * Pro series tablets. + * + * Events on a ring are logically grouped by the wl_tablet_pad_ring.frame + * event. + * @section page_iface_zwp_tablet_pad_ring_v2_api API + * See @ref iface_zwp_tablet_pad_ring_v2. + */ +/** + * @defgroup iface_zwp_tablet_pad_ring_v2 The zwp_tablet_pad_ring_v2 interface + * + * A circular interaction area, such as the touch ring on the Wacom Intuos + * Pro series tablets. + * + * Events on a ring are logically grouped by the wl_tablet_pad_ring.frame + * event. + */ +extern const struct wl_interface zwp_tablet_pad_ring_v2_interface; +#endif +#ifndef ZWP_TABLET_PAD_STRIP_V2_INTERFACE +#define ZWP_TABLET_PAD_STRIP_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_pad_strip_v2 zwp_tablet_pad_strip_v2 + * @section page_iface_zwp_tablet_pad_strip_v2_desc Description + * + * A linear interaction area, such as the strips found in Wacom Cintiq + * models. + * + * Events on a strip are logically grouped by the wl_tablet_pad_strip.frame + * event. + * @section page_iface_zwp_tablet_pad_strip_v2_api API + * See @ref iface_zwp_tablet_pad_strip_v2. + */ +/** + * @defgroup iface_zwp_tablet_pad_strip_v2 The zwp_tablet_pad_strip_v2 interface + * + * A linear interaction area, such as the strips found in Wacom Cintiq + * models. + * + * Events on a strip are logically grouped by the wl_tablet_pad_strip.frame + * event. + */ +extern const struct wl_interface zwp_tablet_pad_strip_v2_interface; +#endif +#ifndef ZWP_TABLET_PAD_GROUP_V2_INTERFACE +#define ZWP_TABLET_PAD_GROUP_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_pad_group_v2 zwp_tablet_pad_group_v2 + * @section page_iface_zwp_tablet_pad_group_v2_desc Description + * + * A pad group describes a distinct (sub)set of buttons, rings and strips + * present in the tablet. The criteria of this grouping is usually positional, + * eg. if a tablet has buttons on the left and right side, 2 groups will be + * presented. The physical arrangement of groups is undisclosed and may + * change on the fly. + * + * Pad groups will announce their features during pad initialization. Between + * the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the + * pad group will announce the buttons, rings and strips contained in it, + * plus the number of supported modes. + * + * Modes are a mechanism to allow multiple groups of actions for every element + * in the pad group. The number of groups and available modes in each is + * persistent across device plugs. The current mode is user-switchable, it + * will be announced through the wp_tablet_pad_group.mode_switch event both + * whenever it is switched, and after wp_tablet_pad.enter. + * + * The current mode logically applies to all elements in the pad group, + * although it is at clients' discretion whether to actually perform different + * actions, and/or issue the respective .set_feedback requests to notify the + * compositor. See the wp_tablet_pad_group.mode_switch event for more details. + * @section page_iface_zwp_tablet_pad_group_v2_api API + * See @ref iface_zwp_tablet_pad_group_v2. + */ +/** + * @defgroup iface_zwp_tablet_pad_group_v2 The zwp_tablet_pad_group_v2 interface + * + * A pad group describes a distinct (sub)set of buttons, rings and strips + * present in the tablet. The criteria of this grouping is usually positional, + * eg. if a tablet has buttons on the left and right side, 2 groups will be + * presented. The physical arrangement of groups is undisclosed and may + * change on the fly. + * + * Pad groups will announce their features during pad initialization. Between + * the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the + * pad group will announce the buttons, rings and strips contained in it, + * plus the number of supported modes. + * + * Modes are a mechanism to allow multiple groups of actions for every element + * in the pad group. The number of groups and available modes in each is + * persistent across device plugs. The current mode is user-switchable, it + * will be announced through the wp_tablet_pad_group.mode_switch event both + * whenever it is switched, and after wp_tablet_pad.enter. + * + * The current mode logically applies to all elements in the pad group, + * although it is at clients' discretion whether to actually perform different + * actions, and/or issue the respective .set_feedback requests to notify the + * compositor. See the wp_tablet_pad_group.mode_switch event for more details. + */ +extern const struct wl_interface zwp_tablet_pad_group_v2_interface; +#endif +#ifndef ZWP_TABLET_PAD_V2_INTERFACE +#define ZWP_TABLET_PAD_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_pad_v2 zwp_tablet_pad_v2 + * @section page_iface_zwp_tablet_pad_v2_desc Description + * + * A pad device is a set of buttons, rings, strips and dials + * usually physically present on the tablet device itself. Some + * exceptions exist where the pad device is physically detached, e.g. the + * Wacom ExpressKey Remote. + * + * Pad devices have no axes that control the cursor and are generally + * auxiliary devices to the tool devices used on the tablet surface. + * + * A pad device has a number of static characteristics, e.g. the number + * of rings. These capabilities are sent in an event sequence after the + * wp_tablet_seat.pad_added event before any actual events from this pad. + * This initial event sequence is terminated by a wp_tablet_pad.done + * event. + * + * All pad features (buttons, rings, strips and dials) are logically divided into + * groups and all pads have at least one group. The available groups are + * notified through the wp_tablet_pad.group event; the compositor will + * emit one event per group before emitting wp_tablet_pad.done. + * + * Groups may have multiple modes. Modes allow clients to map multiple + * actions to a single pad feature. Only one mode can be active per group, + * although different groups may have different active modes. + * @section page_iface_zwp_tablet_pad_v2_api API + * See @ref iface_zwp_tablet_pad_v2. + */ +/** + * @defgroup iface_zwp_tablet_pad_v2 The zwp_tablet_pad_v2 interface + * + * A pad device is a set of buttons, rings, strips and dials + * usually physically present on the tablet device itself. Some + * exceptions exist where the pad device is physically detached, e.g. the + * Wacom ExpressKey Remote. + * + * Pad devices have no axes that control the cursor and are generally + * auxiliary devices to the tool devices used on the tablet surface. + * + * A pad device has a number of static characteristics, e.g. the number + * of rings. These capabilities are sent in an event sequence after the + * wp_tablet_seat.pad_added event before any actual events from this pad. + * This initial event sequence is terminated by a wp_tablet_pad.done + * event. + * + * All pad features (buttons, rings, strips and dials) are logically divided into + * groups and all pads have at least one group. The available groups are + * notified through the wp_tablet_pad.group event; the compositor will + * emit one event per group before emitting wp_tablet_pad.done. + * + * Groups may have multiple modes. Modes allow clients to map multiple + * actions to a single pad feature. Only one mode can be active per group, + * although different groups may have different active modes. + */ +extern const struct wl_interface zwp_tablet_pad_v2_interface; +#endif +#ifndef ZWP_TABLET_PAD_DIAL_V2_INTERFACE +#define ZWP_TABLET_PAD_DIAL_V2_INTERFACE +/** + * @page page_iface_zwp_tablet_pad_dial_v2 zwp_tablet_pad_dial_v2 + * @section page_iface_zwp_tablet_pad_dial_v2_desc Description + * + * A rotary control, e.g. a dial or a wheel. + * + * Events on a dial are logically grouped by the wl_tablet_pad_dial.frame + * event. + * @section page_iface_zwp_tablet_pad_dial_v2_api API + * See @ref iface_zwp_tablet_pad_dial_v2. + */ +/** + * @defgroup iface_zwp_tablet_pad_dial_v2 The zwp_tablet_pad_dial_v2 interface + * + * A rotary control, e.g. a dial or a wheel. + * + * Events on a dial are logically grouped by the wl_tablet_pad_dial.frame + * event. + */ +extern const struct wl_interface zwp_tablet_pad_dial_v2_interface; +#endif + +#define ZWP_TABLET_MANAGER_V2_GET_TABLET_SEAT 0 +#define ZWP_TABLET_MANAGER_V2_DESTROY 1 + + +/** + * @ingroup iface_zwp_tablet_manager_v2 + */ +#define ZWP_TABLET_MANAGER_V2_GET_TABLET_SEAT_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_manager_v2 + */ +#define ZWP_TABLET_MANAGER_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_manager_v2 */ +static inline void +zwp_tablet_manager_v2_set_user_data(struct zwp_tablet_manager_v2 *zwp_tablet_manager_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_manager_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_manager_v2 */ +static inline void * +zwp_tablet_manager_v2_get_user_data(struct zwp_tablet_manager_v2 *zwp_tablet_manager_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_manager_v2); +} + +static inline uint32_t +zwp_tablet_manager_v2_get_version(struct zwp_tablet_manager_v2 *zwp_tablet_manager_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_manager_v2); +} + +/** + * @ingroup iface_zwp_tablet_manager_v2 + * + * Get the wp_tablet_seat object for the given seat. This object + * provides access to all graphics tablets in this seat. + */ +static inline struct zwp_tablet_seat_v2 * +zwp_tablet_manager_v2_get_tablet_seat(struct zwp_tablet_manager_v2 *zwp_tablet_manager_v2, struct wl_seat *seat) +{ + struct wl_proxy *tablet_seat; + + tablet_seat = wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_manager_v2, + ZWP_TABLET_MANAGER_V2_GET_TABLET_SEAT, &zwp_tablet_seat_v2_interface, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_manager_v2), 0, NULL, seat); + + return (struct zwp_tablet_seat_v2 *) tablet_seat; +} + +/** + * @ingroup iface_zwp_tablet_manager_v2 + * + * Destroy the wp_tablet_manager object. Objects created from this + * object are unaffected and should be destroyed separately. + */ +static inline void +zwp_tablet_manager_v2_destroy(struct zwp_tablet_manager_v2 *zwp_tablet_manager_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_manager_v2, + ZWP_TABLET_MANAGER_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_manager_v2), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zwp_tablet_seat_v2 + * @struct zwp_tablet_seat_v2_listener + */ +struct zwp_tablet_seat_v2_listener { + /** + * new device notification + * + * This event is sent whenever a new tablet becomes available on + * this seat. This event only provides the object id of the tablet, + * any static information about the tablet (device name, vid/pid, + * etc.) is sent through the wp_tablet interface. + * @param id the newly added graphics tablet + */ + void (*tablet_added)(void *data, + struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2, + struct zwp_tablet_v2 *id); + /** + * a new tool has been used with a tablet + * + * This event is sent whenever a tool that has not previously + * been used with a tablet comes into use. This event only provides + * the object id of the tool; any static information about the tool + * (capabilities, type, etc.) is sent through the wp_tablet_tool + * interface. + * @param id the newly added tablet tool + */ + void (*tool_added)(void *data, + struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2, + struct zwp_tablet_tool_v2 *id); + /** + * new pad notification + * + * This event is sent whenever a new pad is known to the system. + * Typically, pads are physically attached to tablets and a + * pad_added event is sent immediately after the + * wp_tablet_seat.tablet_added. However, some standalone pad + * devices logically attach to tablets at runtime, and the client + * must wait for wp_tablet_pad.enter to know the tablet a pad is + * attached to. + * + * This event only provides the object id of the pad. All further + * features (buttons, strips, rings) are sent through the + * wp_tablet_pad interface. + * @param id the newly added pad + */ + void (*pad_added)(void *data, + struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2, + struct zwp_tablet_pad_v2 *id); +}; + +/** + * @ingroup iface_zwp_tablet_seat_v2 + */ +static inline int +zwp_tablet_seat_v2_add_listener(struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2, + const struct zwp_tablet_seat_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_seat_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_SEAT_V2_DESTROY 0 + +/** + * @ingroup iface_zwp_tablet_seat_v2 + */ +#define ZWP_TABLET_SEAT_V2_TABLET_ADDED_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_seat_v2 + */ +#define ZWP_TABLET_SEAT_V2_TOOL_ADDED_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_seat_v2 + */ +#define ZWP_TABLET_SEAT_V2_PAD_ADDED_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_tablet_seat_v2 + */ +#define ZWP_TABLET_SEAT_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_seat_v2 */ +static inline void +zwp_tablet_seat_v2_set_user_data(struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_seat_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_seat_v2 */ +static inline void * +zwp_tablet_seat_v2_get_user_data(struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_seat_v2); +} + +static inline uint32_t +zwp_tablet_seat_v2_get_version(struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_seat_v2); +} + +/** + * @ingroup iface_zwp_tablet_seat_v2 + * + * Destroy the wp_tablet_seat object. Objects created from this + * object are unaffected and should be destroyed separately. + */ +static inline void +zwp_tablet_seat_v2_destroy(struct zwp_tablet_seat_v2 *zwp_tablet_seat_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_seat_v2, + ZWP_TABLET_SEAT_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_seat_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef ZWP_TABLET_TOOL_V2_TYPE_ENUM +#define ZWP_TABLET_TOOL_V2_TYPE_ENUM +/** + * @ingroup iface_zwp_tablet_tool_v2 + * a physical tool type + * + * Describes the physical type of a tool. The physical type of a tool + * generally defines its base usage. + * + * The mouse tool represents a mouse-shaped tool that is not a relative + * device but bound to the tablet's surface, providing absolute + * coordinates. + * + * The lens tool is a mouse-shaped tool with an attached lens to + * provide precision focus. + */ +enum zwp_tablet_tool_v2_type { + /** + * Pen + */ + ZWP_TABLET_TOOL_V2_TYPE_PEN = 0x140, + /** + * Eraser + */ + ZWP_TABLET_TOOL_V2_TYPE_ERASER = 0x141, + /** + * Brush + */ + ZWP_TABLET_TOOL_V2_TYPE_BRUSH = 0x142, + /** + * Pencil + */ + ZWP_TABLET_TOOL_V2_TYPE_PENCIL = 0x143, + /** + * Airbrush + */ + ZWP_TABLET_TOOL_V2_TYPE_AIRBRUSH = 0x144, + /** + * Finger + */ + ZWP_TABLET_TOOL_V2_TYPE_FINGER = 0x145, + /** + * Mouse + */ + ZWP_TABLET_TOOL_V2_TYPE_MOUSE = 0x146, + /** + * Lens + */ + ZWP_TABLET_TOOL_V2_TYPE_LENS = 0x147, +}; +#endif /* ZWP_TABLET_TOOL_V2_TYPE_ENUM */ + +#ifndef ZWP_TABLET_TOOL_V2_CAPABILITY_ENUM +#define ZWP_TABLET_TOOL_V2_CAPABILITY_ENUM +/** + * @ingroup iface_zwp_tablet_tool_v2 + * capability flags for a tool + * + * Describes extra capabilities on a tablet. + * + * Any tool must provide x and y values, extra axes are + * device-specific. + */ +enum zwp_tablet_tool_v2_capability { + /** + * Tilt axes + */ + ZWP_TABLET_TOOL_V2_CAPABILITY_TILT = 1, + /** + * Pressure axis + */ + ZWP_TABLET_TOOL_V2_CAPABILITY_PRESSURE = 2, + /** + * Distance axis + */ + ZWP_TABLET_TOOL_V2_CAPABILITY_DISTANCE = 3, + /** + * Z-rotation axis + */ + ZWP_TABLET_TOOL_V2_CAPABILITY_ROTATION = 4, + /** + * Slider axis + */ + ZWP_TABLET_TOOL_V2_CAPABILITY_SLIDER = 5, + /** + * Wheel axis + */ + ZWP_TABLET_TOOL_V2_CAPABILITY_WHEEL = 6, +}; +#endif /* ZWP_TABLET_TOOL_V2_CAPABILITY_ENUM */ + +#ifndef ZWP_TABLET_TOOL_V2_BUTTON_STATE_ENUM +#define ZWP_TABLET_TOOL_V2_BUTTON_STATE_ENUM +/** + * @ingroup iface_zwp_tablet_tool_v2 + * physical button state + * + * Describes the physical state of a button that produced the button event. + */ +enum zwp_tablet_tool_v2_button_state { + /** + * button is not pressed + */ + ZWP_TABLET_TOOL_V2_BUTTON_STATE_RELEASED = 0, + /** + * button is pressed + */ + ZWP_TABLET_TOOL_V2_BUTTON_STATE_PRESSED = 1, +}; +#endif /* ZWP_TABLET_TOOL_V2_BUTTON_STATE_ENUM */ + +#ifndef ZWP_TABLET_TOOL_V2_ERROR_ENUM +#define ZWP_TABLET_TOOL_V2_ERROR_ENUM +enum zwp_tablet_tool_v2_error { + /** + * given wl_surface has another role + */ + ZWP_TABLET_TOOL_V2_ERROR_ROLE = 0, +}; +#endif /* ZWP_TABLET_TOOL_V2_ERROR_ENUM */ + +/** + * @ingroup iface_zwp_tablet_tool_v2 + * @struct zwp_tablet_tool_v2_listener + */ +struct zwp_tablet_tool_v2_listener { + /** + * tool type + * + * The tool type is the high-level type of the tool and usually + * decides the interaction expected from this tool. + * + * This event is sent in the initial burst of events before the + * wp_tablet_tool.done event. + * @param tool_type the physical tool type + */ + void (*type)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t tool_type); + /** + * unique hardware serial number of the tool + * + * If the physical tool can be identified by a unique 64-bit + * serial number, this event notifies the client of this serial + * number. + * + * If multiple tablets are available in the same seat and the tool + * is uniquely identifiable by the serial number, that tool may + * move between tablets. + * + * Otherwise, if the tool has no serial number and this event is + * missing, the tool is tied to the tablet it first comes into + * proximity with. Even if the physical tool is used on multiple + * tablets, separate wp_tablet_tool objects will be created, one + * per tablet. + * + * This event is sent in the initial burst of events before the + * wp_tablet_tool.done event. + * @param hardware_serial_hi the unique serial number of the tool, most significant bits + * @param hardware_serial_lo the unique serial number of the tool, least significant bits + */ + void (*hardware_serial)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t hardware_serial_hi, + uint32_t hardware_serial_lo); + /** + * hardware id notification in Wacom's format + * + * This event notifies the client of a hardware id available on + * this tool. + * + * The hardware id is a device-specific 64-bit id that provides + * extra information about the tool in use, beyond the wl_tool.type + * enumeration. The format of the id is specific to tablets made by + * Wacom Inc. For example, the hardware id of a Wacom Grip Pen (a + * stylus) is 0x802. + * + * This event is sent in the initial burst of events before the + * wp_tablet_tool.done event. + * @param hardware_id_hi the hardware id, most significant bits + * @param hardware_id_lo the hardware id, least significant bits + */ + void (*hardware_id_wacom)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t hardware_id_hi, + uint32_t hardware_id_lo); + /** + * tool capability notification + * + * This event notifies the client of any capabilities of this + * tool, beyond the main set of x/y axes and tip up/down detection. + * + * One event is sent for each extra capability available on this + * tool. + * + * This event is sent in the initial burst of events before the + * wp_tablet_tool.done event. + * @param capability the capability + */ + void (*capability)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t capability); + /** + * tool description events sequence complete + * + * This event signals the end of the initial burst of descriptive + * events. A client may consider the static description of the tool + * to be complete and finalize initialization of the tool. + */ + void (*done)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2); + /** + * tool removed + * + * This event is sent when the tool is removed from the system + * and will send no further events. Should the physical tool come + * back into proximity later, a new wp_tablet_tool object will be + * created. + * + * It is compositor-dependent when a tool is removed. A compositor + * may remove a tool on proximity out, tablet removal or any other + * reason. A compositor may also keep a tool alive until shutdown. + * + * If the tool is currently in proximity, a proximity_out event + * will be sent before the removed event. See + * wp_tablet_tool.proximity_out for the handling of any buttons + * logically down. + * + * When this event is received, the client must + * wp_tablet_tool.destroy the object. + */ + void (*removed)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2); + /** + * proximity in event + * + * Notification that this tool is focused on a certain surface. + * + * This event can be received when the tool has moved from one + * surface to another, or when the tool has come back into + * proximity above the surface. + * + * If any button is logically down when the tool comes into + * proximity, the respective button event is sent after the + * proximity_in event but within the same frame as the proximity_in + * event. + * @param tablet The tablet the tool is in proximity of + * @param surface The current surface the tablet tool is over + */ + void (*proximity_in)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t serial, + struct zwp_tablet_v2 *tablet, + struct wl_surface *surface); + /** + * proximity out event + * + * Notification that this tool has either left proximity, or is + * no longer focused on a certain surface. + * + * When the tablet tool leaves proximity of the tablet, button + * release events are sent for each button that was held down at + * the time of leaving proximity. These events are sent before the + * proximity_out event but within the same wp_tablet.frame. + * + * If the tool stays within proximity of the tablet, but the focus + * changes from one surface to another, a button release event may + * not be sent until the button is actually released or the tool + * leaves the proximity of the tablet. + */ + void (*proximity_out)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2); + /** + * tablet tool is making contact + * + * Sent whenever the tablet tool comes in contact with the + * surface of the tablet. + * + * If the tool is already in contact with the tablet when entering + * the input region, the client owning said region will receive a + * wp_tablet.proximity_in event, followed by a wp_tablet.down event + * and a wp_tablet.frame event. + * + * Note that this event describes logical contact, not physical + * contact. On some devices, a compositor may not consider a tool + * in logical contact until a minimum physical pressure threshold + * is exceeded. + */ + void (*down)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t serial); + /** + * tablet tool is no longer making contact + * + * Sent whenever the tablet tool stops making contact with the + * surface of the tablet, or when the tablet tool moves out of the + * input region and the compositor grab (if any) is dismissed. + * + * If the tablet tool moves out of the input region while in + * contact with the surface of the tablet and the compositor does + * not have an ongoing grab on the surface, the client owning said + * region will receive a wp_tablet.up event, followed by a + * wp_tablet.proximity_out event and a wp_tablet.frame event. If + * the compositor has an ongoing grab on this device, this event + * sequence is sent whenever the grab is dismissed in the future. + * + * Note that this event describes logical contact, not physical + * contact. On some devices, a compositor may not consider a tool + * out of logical contact until physical pressure falls below a + * specific threshold. + */ + void (*up)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2); + /** + * motion event + * + * Sent whenever a tablet tool moves. + * @param x surface-local x coordinate + * @param y surface-local y coordinate + */ + void (*motion)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + wl_fixed_t x, + wl_fixed_t y); + /** + * pressure change event + * + * Sent whenever the pressure axis on a tool changes. The value + * of this event is normalized to a value between 0 and 65535. + * + * Note that pressure may be nonzero even when a tool is not in + * logical contact. See the down and up events for more details. + * @param pressure The current pressure value + */ + void (*pressure)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t pressure); + /** + * distance change event + * + * Sent whenever the distance axis on a tool changes. The value + * of this event is normalized to a value between 0 and 65535. + * + * Note that distance may be nonzero even when a tool is not in + * logical contact. See the down and up events for more details. + * @param distance The current distance value + */ + void (*distance)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t distance); + /** + * tilt change event + * + * Sent whenever one or both of the tilt axes on a tool change. + * Each tilt value is in degrees, relative to the z-axis of the + * tablet. The angle is positive when the top of a tool tilts along + * the positive x or y axis. + * @param tilt_x The current value of the X tilt axis + * @param tilt_y The current value of the Y tilt axis + */ + void (*tilt)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + wl_fixed_t tilt_x, + wl_fixed_t tilt_y); + /** + * z-rotation change event + * + * Sent whenever the z-rotation axis on the tool changes. The + * rotation value is in degrees clockwise from the tool's logical + * neutral position. + * @param degrees The current rotation of the Z axis + */ + void (*rotation)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + wl_fixed_t degrees); + /** + * Slider position change event + * + * Sent whenever the slider position on the tool changes. The + * value is normalized between -65535 and 65535, with 0 as the + * logical neutral position of the slider. + * + * The slider is available on e.g. the Wacom Airbrush tool. + * @param position The current position of slider + */ + void (*slider)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + int32_t position); + /** + * Wheel delta event + * + * Sent whenever the wheel on the tool emits an event. This event + * contains two values for the same axis change. The degrees value + * is in the same orientation as the wl_pointer.vertical_scroll + * axis. The clicks value is in discrete logical clicks of the + * mouse wheel. This value may be zero if the movement of the wheel + * was less than one logical click. + * + * Clients should choose either value and avoid mixing degrees and + * clicks. The compositor may accumulate values smaller than a + * logical click and emulate click events when a certain threshold + * is met. Thus, wl_tablet_tool.wheel events with non-zero clicks + * values may have different degrees values. + * @param degrees The wheel delta in degrees + * @param clicks The wheel delta in discrete clicks + */ + void (*wheel)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + wl_fixed_t degrees, + int32_t clicks); + /** + * button event + * + * Sent whenever a button on the tool is pressed or released. + * + * If a button is held down when the tool moves in or out of + * proximity, button events are generated by the compositor. See + * wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for + * details. + * @param button The button whose state has changed + * @param state Whether the button was pressed or released + */ + void (*button)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t serial, + uint32_t button, + uint32_t state); + /** + * frame event + * + * Marks the end of a series of axis and/or button updates from + * the tablet. The Wayland protocol requires axis updates to be + * sent sequentially, however all events within a frame should be + * considered one hardware event. + * @param time The time of the event with millisecond granularity + */ + void (*frame)(void *data, + struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + uint32_t time); +}; + +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +static inline int +zwp_tablet_tool_v2_add_listener(struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, + const struct zwp_tablet_tool_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_tool_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_TOOL_V2_SET_CURSOR 0 +#define ZWP_TABLET_TOOL_V2_DESTROY 1 + +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_TYPE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_HARDWARE_SERIAL_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_HARDWARE_ID_WACOM_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_CAPABILITY_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_DONE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_REMOVED_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_PROXIMITY_IN_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_PROXIMITY_OUT_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_DOWN_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_UP_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_MOTION_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_PRESSURE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_DISTANCE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_TILT_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_ROTATION_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_SLIDER_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_WHEEL_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_BUTTON_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_FRAME_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_SET_CURSOR_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_tool_v2 + */ +#define ZWP_TABLET_TOOL_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_tool_v2 */ +static inline void +zwp_tablet_tool_v2_set_user_data(struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_tool_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_tool_v2 */ +static inline void * +zwp_tablet_tool_v2_get_user_data(struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_tool_v2); +} + +static inline uint32_t +zwp_tablet_tool_v2_get_version(struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_tool_v2); +} + +/** + * @ingroup iface_zwp_tablet_tool_v2 + * + * Sets the surface of the cursor used for this tool on the given + * tablet. This request only takes effect if the tool is in proximity + * of one of the requesting client's surfaces or the surface parameter + * is the current pointer surface. If there was a previous surface set + * with this request it is replaced. If surface is NULL, the cursor + * image is hidden. + * + * The parameters hotspot_x and hotspot_y define the position of the + * pointer surface relative to the pointer location. Its top-left corner + * is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the + * coordinates of the pointer location, in surface-local coordinates. + * + * On surface.attach requests to the pointer surface, hotspot_x and + * hotspot_y are decremented by the x and y parameters passed to the + * request. Attach must be confirmed by wl_surface.commit as usual. + * + * The hotspot can also be updated by passing the currently set pointer + * surface to this request with new values for hotspot_x and hotspot_y. + * + * The current and pending input regions of the wl_surface are cleared, + * and wl_surface.set_input_region is ignored until the wl_surface is no + * longer used as the cursor. When the use as a cursor ends, the current + * and pending input regions become undefined, and the wl_surface is + * unmapped. + * + * This request gives the surface the role of a wp_tablet_tool cursor. A + * surface may only ever be used as the cursor surface for one + * wp_tablet_tool. If the surface already has another role or has + * previously been used as cursor surface for a different tool, a + * protocol error is raised. + */ +static inline void +zwp_tablet_tool_v2_set_cursor(struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2, uint32_t serial, struct wl_surface *surface, int32_t hotspot_x, int32_t hotspot_y) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_tool_v2, + ZWP_TABLET_TOOL_V2_SET_CURSOR, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_tool_v2), 0, serial, surface, hotspot_x, hotspot_y); +} + +/** + * @ingroup iface_zwp_tablet_tool_v2 + * + * This destroys the client's resource for this tool object. + */ +static inline void +zwp_tablet_tool_v2_destroy(struct zwp_tablet_tool_v2 *zwp_tablet_tool_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_tool_v2, + ZWP_TABLET_TOOL_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_tool_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef ZWP_TABLET_V2_BUSTYPE_ENUM +#define ZWP_TABLET_V2_BUSTYPE_ENUM +/** + * @ingroup iface_zwp_tablet_v2 + * bus type + * + * Describes the bus types this tablet is connected to. + */ +enum zwp_tablet_v2_bustype { + /** + * USB + */ + ZWP_TABLET_V2_BUSTYPE_USB = 3, + /** + * Bluetooth + */ + ZWP_TABLET_V2_BUSTYPE_BLUETOOTH = 5, + /** + * Virtual + */ + ZWP_TABLET_V2_BUSTYPE_VIRTUAL = 6, + /** + * Serial + */ + ZWP_TABLET_V2_BUSTYPE_SERIAL = 17, + /** + * I2C + */ + ZWP_TABLET_V2_BUSTYPE_I2C = 24, +}; +#endif /* ZWP_TABLET_V2_BUSTYPE_ENUM */ + +/** + * @ingroup iface_zwp_tablet_v2 + * @struct zwp_tablet_v2_listener + */ +struct zwp_tablet_v2_listener { + /** + * tablet device name + * + * A descriptive name for the tablet device. + * + * If the device has no descriptive name, this event is not sent. + * + * This event is sent in the initial burst of events before the + * wp_tablet.done event. + * @param name the device name + */ + void (*name)(void *data, + struct zwp_tablet_v2 *zwp_tablet_v2, + const char *name); + /** + * tablet device vendor/product id + * + * The vendor and product IDs for the tablet device. + * + * The interpretation of the id depends on the wp_tablet.bustype. + * Prior to version v2 of this protocol, the id was implied to be a + * USB vendor and product ID. If no wp_tablet.bustype is sent, the + * ID is to be interpreted as USB vendor and product ID. + * + * If the device has no vendor/product ID, this event is not sent. + * This can happen for virtual devices or non-USB devices, for + * instance. + * + * This event is sent in the initial burst of events before the + * wp_tablet.done event. + * @param vid vendor id + * @param pid product id + */ + void (*id)(void *data, + struct zwp_tablet_v2 *zwp_tablet_v2, + uint32_t vid, + uint32_t pid); + /** + * path to the device + * + * A system-specific device path that indicates which device is + * behind this wp_tablet. This information may be used to gather + * additional information about the device, e.g. through libwacom. + * + * A device may have more than one device path. If so, multiple + * wp_tablet.path events are sent. A device may be emulated and not + * have a device path, and in that case this event will not be + * sent. + * + * The format of the path is unspecified, it may be a device node, + * a sysfs path, or some other identifier. It is up to the client + * to identify the string provided. + * + * This event is sent in the initial burst of events before the + * wp_tablet.done event. + * @param path path to local device + */ + void (*path)(void *data, + struct zwp_tablet_v2 *zwp_tablet_v2, + const char *path); + /** + * tablet description events sequence complete + * + * This event is sent immediately to signal the end of the + * initial burst of descriptive events. A client may consider the + * static description of the tablet to be complete and finalize + * initialization of the tablet. + */ + void (*done)(void *data, + struct zwp_tablet_v2 *zwp_tablet_v2); + /** + * tablet removed event + * + * Sent when the tablet has been removed from the system. When a + * tablet is removed, some tools may be removed. + * + * When this event is received, the client must wp_tablet.destroy + * the object. + */ + void (*removed)(void *data, + struct zwp_tablet_v2 *zwp_tablet_v2); + /** + * tablet device bus type + * + * The bustype argument is one of the BUS_ defines in the Linux + * kernel's linux/input.h + * + * If the device has no known bustype or the bustype cannot be + * queried, this event is not sent. + * + * This event is sent in the initial burst of events before the + * wp_tablet.done event. + * @param bustype bus type + * @since 2 + */ + void (*bustype)(void *data, + struct zwp_tablet_v2 *zwp_tablet_v2, + uint32_t bustype); +}; + +/** + * @ingroup iface_zwp_tablet_v2 + */ +static inline int +zwp_tablet_v2_add_listener(struct zwp_tablet_v2 *zwp_tablet_v2, + const struct zwp_tablet_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_V2_DESTROY 0 + +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_NAME_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_ID_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_PATH_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_DONE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_REMOVED_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_BUSTYPE_SINCE_VERSION 2 + +/** + * @ingroup iface_zwp_tablet_v2 + */ +#define ZWP_TABLET_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_v2 */ +static inline void +zwp_tablet_v2_set_user_data(struct zwp_tablet_v2 *zwp_tablet_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_v2 */ +static inline void * +zwp_tablet_v2_get_user_data(struct zwp_tablet_v2 *zwp_tablet_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_v2); +} + +static inline uint32_t +zwp_tablet_v2_get_version(struct zwp_tablet_v2 *zwp_tablet_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_v2); +} + +/** + * @ingroup iface_zwp_tablet_v2 + * + * This destroys the client's resource for this tablet object. + */ +static inline void +zwp_tablet_v2_destroy(struct zwp_tablet_v2 *zwp_tablet_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_v2, + ZWP_TABLET_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef ZWP_TABLET_PAD_RING_V2_SOURCE_ENUM +#define ZWP_TABLET_PAD_RING_V2_SOURCE_ENUM +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + * ring axis source + * + * Describes the source types for ring events. This indicates to the + * client how a ring event was physically generated; a client may + * adjust the user interface accordingly. For example, events + * from a "finger" source may trigger kinetic scrolling. + */ +enum zwp_tablet_pad_ring_v2_source { + /** + * finger + */ + ZWP_TABLET_PAD_RING_V2_SOURCE_FINGER = 1, +}; +#endif /* ZWP_TABLET_PAD_RING_V2_SOURCE_ENUM */ + +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + * @struct zwp_tablet_pad_ring_v2_listener + */ +struct zwp_tablet_pad_ring_v2_listener { + /** + * ring event source + * + * Source information for ring events. + * + * This event does not occur on its own. It is sent before a + * wp_tablet_pad_ring.frame event and carries the source + * information for all events within that frame. + * + * The source specifies how this event was generated. If the source + * is wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop + * event will be sent when the user lifts the finger off the + * device. + * + * This event is optional. If the source is unknown for an + * interaction, no event is sent. + * @param source the event source + */ + void (*source)(void *data, + struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, + uint32_t source); + /** + * angle changed + * + * Sent whenever the angle on a ring changes. + * + * The angle is provided in degrees clockwise from the logical + * north of the ring in the pad's current rotation. + * @param degrees the current angle in degrees + */ + void (*angle)(void *data, + struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, + wl_fixed_t degrees); + /** + * interaction stopped + * + * Stop notification for ring events. + * + * For some wp_tablet_pad_ring.source types, a + * wp_tablet_pad_ring.stop event is sent to notify a client that + * the interaction with the ring has terminated. This enables the + * client to implement kinetic scrolling. See the + * wp_tablet_pad_ring.source documentation for information on when + * this event may be generated. + * + * Any wp_tablet_pad_ring.angle events with the same source after + * this event should be considered as the start of a new + * interaction. + */ + void (*stop)(void *data, + struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2); + /** + * end of a ring event sequence + * + * Indicates the end of a set of ring events that logically + * belong together. A client is expected to accumulate the data in + * all events within the frame before proceeding. + * + * All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame + * event belong logically together. For example, on termination of + * a finger interaction on a ring the compositor will send a + * wp_tablet_pad_ring.source event, a wp_tablet_pad_ring.stop event + * and a wp_tablet_pad_ring.frame event. + * + * A wp_tablet_pad_ring.frame event is sent for every logical event + * group, even if the group only contains a single + * wp_tablet_pad_ring event. Specifically, a client may get a + * sequence: angle, frame, angle, frame, etc. + * @param time timestamp with millisecond granularity + */ + void (*frame)(void *data, + struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, + uint32_t time); +}; + +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +static inline int +zwp_tablet_pad_ring_v2_add_listener(struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, + const struct zwp_tablet_pad_ring_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_pad_ring_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_PAD_RING_V2_SET_FEEDBACK 0 +#define ZWP_TABLET_PAD_RING_V2_DESTROY 1 + +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +#define ZWP_TABLET_PAD_RING_V2_SOURCE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +#define ZWP_TABLET_PAD_RING_V2_ANGLE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +#define ZWP_TABLET_PAD_RING_V2_STOP_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +#define ZWP_TABLET_PAD_RING_V2_FRAME_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +#define ZWP_TABLET_PAD_RING_V2_SET_FEEDBACK_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + */ +#define ZWP_TABLET_PAD_RING_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_pad_ring_v2 */ +static inline void +zwp_tablet_pad_ring_v2_set_user_data(struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_pad_ring_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_pad_ring_v2 */ +static inline void * +zwp_tablet_pad_ring_v2_get_user_data(struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_pad_ring_v2); +} + +static inline uint32_t +zwp_tablet_pad_ring_v2_get_version(struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_ring_v2); +} + +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + * + * Request that the compositor use the provided feedback string + * associated with this ring. This request should be issued immediately + * after a wp_tablet_pad_group.mode_switch event from the corresponding + * group is received, or whenever the ring is mapped to a different + * action. See wp_tablet_pad_group.mode_switch for more details. + * + * Clients are encouraged to provide context-aware descriptions for + * the actions associated with the ring; compositors may use this + * information to offer visual feedback about the button layout + * (eg. on-screen displays). + * + * The provided string 'description' is a UTF-8 encoded string to be + * associated with this ring, and is considered user-visible; general + * internationalization rules apply. + * + * The serial argument will be that of the last + * wp_tablet_pad_group.mode_switch event received for the group of this + * ring. Requests providing other serials than the most recent one will be + * ignored. + */ +static inline void +zwp_tablet_pad_ring_v2_set_feedback(struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2, const char *description, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_ring_v2, + ZWP_TABLET_PAD_RING_V2_SET_FEEDBACK, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_ring_v2), 0, description, serial); +} + +/** + * @ingroup iface_zwp_tablet_pad_ring_v2 + * + * This destroys the client's resource for this ring object. + */ +static inline void +zwp_tablet_pad_ring_v2_destroy(struct zwp_tablet_pad_ring_v2 *zwp_tablet_pad_ring_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_ring_v2, + ZWP_TABLET_PAD_RING_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_ring_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef ZWP_TABLET_PAD_STRIP_V2_SOURCE_ENUM +#define ZWP_TABLET_PAD_STRIP_V2_SOURCE_ENUM +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + * strip axis source + * + * Describes the source types for strip events. This indicates to the + * client how a strip event was physically generated; a client may + * adjust the user interface accordingly. For example, events + * from a "finger" source may trigger kinetic scrolling. + */ +enum zwp_tablet_pad_strip_v2_source { + /** + * finger + */ + ZWP_TABLET_PAD_STRIP_V2_SOURCE_FINGER = 1, +}; +#endif /* ZWP_TABLET_PAD_STRIP_V2_SOURCE_ENUM */ + +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + * @struct zwp_tablet_pad_strip_v2_listener + */ +struct zwp_tablet_pad_strip_v2_listener { + /** + * strip event source + * + * Source information for strip events. + * + * This event does not occur on its own. It is sent before a + * wp_tablet_pad_strip.frame event and carries the source + * information for all events within that frame. + * + * The source specifies how this event was generated. If the source + * is wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop + * event will be sent when the user lifts their finger off the + * device. + * + * This event is optional. If the source is unknown for an + * interaction, no event is sent. + * @param source the event source + */ + void (*source)(void *data, + struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, + uint32_t source); + /** + * position changed + * + * Sent whenever the position on a strip changes. + * + * The position is normalized to a range of [0, 65535], the 0-value + * represents the top-most and/or left-most position of the strip + * in the pad's current rotation. + * @param position the current position + */ + void (*position)(void *data, + struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, + uint32_t position); + /** + * interaction stopped + * + * Stop notification for strip events. + * + * For some wp_tablet_pad_strip.source types, a + * wp_tablet_pad_strip.stop event is sent to notify a client that + * the interaction with the strip has terminated. This enables the + * client to implement kinetic scrolling. See the + * wp_tablet_pad_strip.source documentation for information on when + * this event may be generated. + * + * Any wp_tablet_pad_strip.position events with the same source + * after this event should be considered as the start of a new + * interaction. + */ + void (*stop)(void *data, + struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2); + /** + * end of a strip event sequence + * + * Indicates the end of a set of events that represent one + * logical hardware strip event. A client is expected to accumulate + * the data in all events within the frame before proceeding. + * + * All wp_tablet_pad_strip events before a + * wp_tablet_pad_strip.frame event belong logically together. For + * example, on termination of a finger interaction on a strip the + * compositor will send a wp_tablet_pad_strip.source event, a + * wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame + * event. + * + * A wp_tablet_pad_strip.frame event is sent for every logical + * event group, even if the group only contains a single + * wp_tablet_pad_strip event. Specifically, a client may get a + * sequence: position, frame, position, frame, etc. + * @param time timestamp with millisecond granularity + */ + void (*frame)(void *data, + struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, + uint32_t time); +}; + +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +static inline int +zwp_tablet_pad_strip_v2_add_listener(struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, + const struct zwp_tablet_pad_strip_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_pad_strip_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_PAD_STRIP_V2_SET_FEEDBACK 0 +#define ZWP_TABLET_PAD_STRIP_V2_DESTROY 1 + +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +#define ZWP_TABLET_PAD_STRIP_V2_SOURCE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +#define ZWP_TABLET_PAD_STRIP_V2_POSITION_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +#define ZWP_TABLET_PAD_STRIP_V2_STOP_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +#define ZWP_TABLET_PAD_STRIP_V2_FRAME_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +#define ZWP_TABLET_PAD_STRIP_V2_SET_FEEDBACK_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + */ +#define ZWP_TABLET_PAD_STRIP_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_pad_strip_v2 */ +static inline void +zwp_tablet_pad_strip_v2_set_user_data(struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_pad_strip_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_pad_strip_v2 */ +static inline void * +zwp_tablet_pad_strip_v2_get_user_data(struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_pad_strip_v2); +} + +static inline uint32_t +zwp_tablet_pad_strip_v2_get_version(struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_strip_v2); +} + +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + * + * Requests the compositor to use the provided feedback string + * associated with this strip. This request should be issued immediately + * after a wp_tablet_pad_group.mode_switch event from the corresponding + * group is received, or whenever the strip is mapped to a different + * action. See wp_tablet_pad_group.mode_switch for more details. + * + * Clients are encouraged to provide context-aware descriptions for + * the actions associated with the strip, and compositors may use this + * information to offer visual feedback about the button layout + * (eg. on-screen displays). + * + * The provided string 'description' is a UTF-8 encoded string to be + * associated with this ring, and is considered user-visible; general + * internationalization rules apply. + * + * The serial argument will be that of the last + * wp_tablet_pad_group.mode_switch event received for the group of this + * strip. Requests providing other serials than the most recent one will be + * ignored. + */ +static inline void +zwp_tablet_pad_strip_v2_set_feedback(struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2, const char *description, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_strip_v2, + ZWP_TABLET_PAD_STRIP_V2_SET_FEEDBACK, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_strip_v2), 0, description, serial); +} + +/** + * @ingroup iface_zwp_tablet_pad_strip_v2 + * + * This destroys the client's resource for this strip object. + */ +static inline void +zwp_tablet_pad_strip_v2_destroy(struct zwp_tablet_pad_strip_v2 *zwp_tablet_pad_strip_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_strip_v2, + ZWP_TABLET_PAD_STRIP_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_strip_v2), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + * @struct zwp_tablet_pad_group_v2_listener + */ +struct zwp_tablet_pad_group_v2_listener { + /** + * buttons announced + * + * Sent on wp_tablet_pad_group initialization to announce the + * available buttons in the group. Button indices start at 0, a + * button may only be in one group at a time. + * + * This event is first sent in the initial burst of events before + * the wp_tablet_pad_group.done event. + * + * Some buttons are reserved by the compositor. These buttons may + * not be assigned to any wp_tablet_pad_group. Compositors may + * broadcast this event in the case of changes to the mapping of + * these reserved buttons. If the compositor happens to reserve all + * buttons in a group, this event will be sent with an empty array. + * @param buttons buttons in this group + */ + void (*buttons)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + struct wl_array *buttons); + /** + * ring announced + * + * Sent on wp_tablet_pad_group initialization to announce + * available rings. One event is sent for each ring available on + * this pad group. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad_group.done event. + */ + void (*ring)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + struct zwp_tablet_pad_ring_v2 *ring); + /** + * strip announced + * + * Sent on wp_tablet_pad initialization to announce available + * strips. One event is sent for each strip available on this pad + * group. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad_group.done event. + */ + void (*strip)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + struct zwp_tablet_pad_strip_v2 *strip); + /** + * mode-switch ability announced + * + * Sent on wp_tablet_pad_group initialization to announce that + * the pad group may switch between modes. A client may use a mode + * to store a specific configuration for buttons, rings and strips + * and use the wl_tablet_pad_group.mode_switch event to toggle + * between these configurations. Mode indices start at 0. + * + * Switching modes is compositor-dependent. See the + * wp_tablet_pad_group.mode_switch event for more details. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad_group.done event. This event is only sent when + * more than more than one mode is available. + * @param modes the number of modes + */ + void (*modes)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + uint32_t modes); + /** + * tablet group description events sequence complete + * + * This event is sent immediately to signal the end of the + * initial burst of descriptive events. A client may consider the + * static description of the tablet to be complete and finalize + * initialization of the tablet group. + */ + void (*done)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2); + /** + * mode switch event + * + * Notification that the mode was switched. + * + * A mode applies to all buttons, rings, strips and dials in a + * group simultaneously, but a client is not required to assign + * different actions for each mode. For example, a client may have + * mode-specific button mappings but map the ring to vertical + * scrolling in all modes. Mode indices start at 0. + * + * Switching modes is compositor-dependent. The compositor may + * provide visual cues to the user about the mode, e.g. by toggling + * LEDs on the tablet device. Mode-switching may be + * software-controlled or controlled by one or more physical + * buttons. For example, on a Wacom Intuos Pro, the button inside + * the ring may be assigned to switch between modes. + * + * The compositor will also send this event after + * wp_tablet_pad.enter on each group in order to notify of the + * current mode. Groups that only feature one mode will use mode=0 + * when emitting this event. + * + * If a button action in the new mode differs from the action in + * the previous mode, the client should immediately issue a + * wp_tablet_pad.set_feedback request for each changed button. + * + * If a ring, strip or dial action in the new mode differs from the + * action in the previous mode, the client should immediately issue + * a wp_tablet_ring.set_feedback, wp_tablet_strip.set_feedback or + * wp_tablet_dial.set_feedback request for each changed ring, strip + * or dial. + * @param time the time of the event with millisecond granularity + * @param mode the new mode of the pad + */ + void (*mode_switch)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + uint32_t time, + uint32_t serial, + uint32_t mode); + /** + * dial announced + * + * Sent on wp_tablet_pad initialization to announce available + * dials. One event is sent for each dial available on this pad + * group. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad_group.done event. + * @since 2 + */ + void (*dial)(void *data, + struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + struct zwp_tablet_pad_dial_v2 *dial); +}; + +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +static inline int +zwp_tablet_pad_group_v2_add_listener(struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, + const struct zwp_tablet_pad_group_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_pad_group_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_PAD_GROUP_V2_DESTROY 0 + +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_BUTTONS_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_RING_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_STRIP_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_MODES_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_DONE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_MODE_SWITCH_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_DIAL_SINCE_VERSION 2 + +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + */ +#define ZWP_TABLET_PAD_GROUP_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_pad_group_v2 */ +static inline void +zwp_tablet_pad_group_v2_set_user_data(struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_pad_group_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_pad_group_v2 */ +static inline void * +zwp_tablet_pad_group_v2_get_user_data(struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_pad_group_v2); +} + +static inline uint32_t +zwp_tablet_pad_group_v2_get_version(struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_group_v2); +} + +/** + * @ingroup iface_zwp_tablet_pad_group_v2 + * + * Destroy the wp_tablet_pad_group object. Objects created from this object + * are unaffected and should be destroyed separately. + */ +static inline void +zwp_tablet_pad_group_v2_destroy(struct zwp_tablet_pad_group_v2 *zwp_tablet_pad_group_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_group_v2, + ZWP_TABLET_PAD_GROUP_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_group_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef ZWP_TABLET_PAD_V2_BUTTON_STATE_ENUM +#define ZWP_TABLET_PAD_V2_BUTTON_STATE_ENUM +/** + * @ingroup iface_zwp_tablet_pad_v2 + * physical button state + * + * Describes the physical state of a button that caused the button + * event. + */ +enum zwp_tablet_pad_v2_button_state { + /** + * the button is not pressed + */ + ZWP_TABLET_PAD_V2_BUTTON_STATE_RELEASED = 0, + /** + * the button is pressed + */ + ZWP_TABLET_PAD_V2_BUTTON_STATE_PRESSED = 1, +}; +#endif /* ZWP_TABLET_PAD_V2_BUTTON_STATE_ENUM */ + +/** + * @ingroup iface_zwp_tablet_pad_v2 + * @struct zwp_tablet_pad_v2_listener + */ +struct zwp_tablet_pad_v2_listener { + /** + * group announced + * + * Sent on wp_tablet_pad initialization to announce available + * groups. One event is sent for each pad group available. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad.done event. At least one group will be announced. + */ + void (*group)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + struct zwp_tablet_pad_group_v2 *pad_group); + /** + * path to the device + * + * A system-specific device path that indicates which device is + * behind this wp_tablet_pad. This information may be used to + * gather additional information about the device, e.g. through + * libwacom. + * + * The format of the path is unspecified, it may be a device node, + * a sysfs path, or some other identifier. It is up to the client + * to identify the string provided. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad.done event. + * @param path path to local device + */ + void (*path)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + const char *path); + /** + * buttons announced + * + * Sent on wp_tablet_pad initialization to announce the available + * buttons. + * + * This event is sent in the initial burst of events before the + * wp_tablet_pad.done event. This event is only sent when at least + * one button is available. + * @param buttons the number of buttons + */ + void (*buttons)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + uint32_t buttons); + /** + * pad description event sequence complete + * + * This event signals the end of the initial burst of descriptive + * events. A client may consider the static description of the pad + * to be complete and finalize initialization of the pad. + */ + void (*done)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2); + /** + * physical button state + * + * Sent whenever the physical state of a button changes. + * @param time the time of the event with millisecond granularity + * @param button the index of the button that changed state + */ + void (*button)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + uint32_t time, + uint32_t button, + uint32_t state); + /** + * enter event + * + * Notification that this pad is focused on the specified + * surface. + * @param serial serial number of the enter event + * @param tablet the tablet the pad is attached to + * @param surface surface the pad is focused on + */ + void (*enter)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + uint32_t serial, + struct zwp_tablet_v2 *tablet, + struct wl_surface *surface); + /** + * leave event + * + * Notification that this pad is no longer focused on the + * specified surface. + * @param serial serial number of the leave event + * @param surface surface the pad is no longer focused on + */ + void (*leave)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + uint32_t serial, + struct wl_surface *surface); + /** + * pad removed event + * + * Sent when the pad has been removed from the system. When a + * tablet is removed its pad(s) will be removed too. + * + * When this event is received, the client must destroy all rings, + * strips and groups that were offered by this pad, and issue + * wp_tablet_pad.destroy the pad itself. + */ + void (*removed)(void *data, + struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2); +}; + +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +static inline int +zwp_tablet_pad_v2_add_listener(struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, + const struct zwp_tablet_pad_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_pad_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_PAD_V2_SET_FEEDBACK 0 +#define ZWP_TABLET_PAD_V2_DESTROY 1 + +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_GROUP_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_PATH_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_BUTTONS_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_DONE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_BUTTON_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_ENTER_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_LEAVE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_REMOVED_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_SET_FEEDBACK_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_v2 + */ +#define ZWP_TABLET_PAD_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_pad_v2 */ +static inline void +zwp_tablet_pad_v2_set_user_data(struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_pad_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_pad_v2 */ +static inline void * +zwp_tablet_pad_v2_get_user_data(struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_pad_v2); +} + +static inline uint32_t +zwp_tablet_pad_v2_get_version(struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_v2); +} + +/** + * @ingroup iface_zwp_tablet_pad_v2 + * + * Requests the compositor to use the provided feedback string + * associated with this button. This request should be issued immediately + * after a wp_tablet_pad_group.mode_switch event from the corresponding + * group is received, or whenever a button is mapped to a different + * action. See wp_tablet_pad_group.mode_switch for more details. + * + * Clients are encouraged to provide context-aware descriptions for + * the actions associated with each button, and compositors may use + * this information to offer visual feedback on the button layout + * (e.g. on-screen displays). + * + * Button indices start at 0. Setting the feedback string on a button + * that is reserved by the compositor (i.e. not belonging to any + * wp_tablet_pad_group) does not generate an error but the compositor + * is free to ignore the request. + * + * The provided string 'description' is a UTF-8 encoded string to be + * associated with this ring, and is considered user-visible; general + * internationalization rules apply. + * + * The serial argument will be that of the last + * wp_tablet_pad_group.mode_switch event received for the group of this + * button. Requests providing other serials than the most recent one will + * be ignored. + */ +static inline void +zwp_tablet_pad_v2_set_feedback(struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2, uint32_t button, const char *description, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_v2, + ZWP_TABLET_PAD_V2_SET_FEEDBACK, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_v2), 0, button, description, serial); +} + +/** + * @ingroup iface_zwp_tablet_pad_v2 + * + * Destroy the wp_tablet_pad object. Objects created from this object + * are unaffected and should be destroyed separately. + */ +static inline void +zwp_tablet_pad_v2_destroy(struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_v2, + ZWP_TABLET_PAD_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_v2), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + * @struct zwp_tablet_pad_dial_v2_listener + */ +struct zwp_tablet_pad_dial_v2_listener { + /** + * delta movement + * + * Sent whenever the position on a dial changes. + * + * This event carries the wheel delta as multiples or fractions of + * 120 with each multiple of 120 representing one logical wheel + * detent. For example, an axis_value120 of 30 is one quarter of a + * logical wheel step in the positive direction, a value120 of -240 + * are two logical wheel steps in the negative direction within the + * same hardware event. See the wl_pointer.axis_value120 for more + * details. + * + * The value120 must not be zero. + * @param value120 rotation distance as fraction of 120 + */ + void (*delta)(void *data, + struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2, + int32_t value120); + /** + * end of a dial event sequence + * + * Indicates the end of a set of events that represent one + * logical hardware dial event. A client is expected to accumulate + * the data in all events within the frame before proceeding. + * + * All wp_tablet_pad_dial events before a wp_tablet_pad_dial.frame + * event belong logically together. + * + * A wp_tablet_pad_dial.frame event is sent for every logical event + * group, even if the group only contains a single + * wp_tablet_pad_dial event. Specifically, a client may get a + * sequence: delta, frame, delta, frame, etc. + * @param time timestamp with millisecond granularity + */ + void (*frame)(void *data, + struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2, + uint32_t time); +}; + +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + */ +static inline int +zwp_tablet_pad_dial_v2_add_listener(struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2, + const struct zwp_tablet_pad_dial_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_tablet_pad_dial_v2, + (void (**)(void)) listener, data); +} + +#define ZWP_TABLET_PAD_DIAL_V2_SET_FEEDBACK 0 +#define ZWP_TABLET_PAD_DIAL_V2_DESTROY 1 + +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + */ +#define ZWP_TABLET_PAD_DIAL_V2_DELTA_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + */ +#define ZWP_TABLET_PAD_DIAL_V2_FRAME_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + */ +#define ZWP_TABLET_PAD_DIAL_V2_SET_FEEDBACK_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + */ +#define ZWP_TABLET_PAD_DIAL_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zwp_tablet_pad_dial_v2 */ +static inline void +zwp_tablet_pad_dial_v2_set_user_data(struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_tablet_pad_dial_v2, user_data); +} + +/** @ingroup iface_zwp_tablet_pad_dial_v2 */ +static inline void * +zwp_tablet_pad_dial_v2_get_user_data(struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_tablet_pad_dial_v2); +} + +static inline uint32_t +zwp_tablet_pad_dial_v2_get_version(struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_dial_v2); +} + +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + * + * Requests the compositor to use the provided feedback string + * associated with this dial. This request should be issued immediately + * after a wp_tablet_pad_group.mode_switch event from the corresponding + * group is received, or whenever the dial is mapped to a different + * action. See wp_tablet_pad_group.mode_switch for more details. + * + * Clients are encouraged to provide context-aware descriptions for + * the actions associated with the dial, and compositors may use this + * information to offer visual feedback about the button layout + * (eg. on-screen displays). + * + * The provided string 'description' is a UTF-8 encoded string to be + * associated with this ring, and is considered user-visible; general + * internationalization rules apply. + * + * The serial argument will be that of the last + * wp_tablet_pad_group.mode_switch event received for the group of this + * dial. Requests providing other serials than the most recent one will be + * ignored. + */ +static inline void +zwp_tablet_pad_dial_v2_set_feedback(struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2, const char *description, uint32_t serial) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_dial_v2, + ZWP_TABLET_PAD_DIAL_V2_SET_FEEDBACK, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_dial_v2), 0, description, serial); +} + +/** + * @ingroup iface_zwp_tablet_pad_dial_v2 + * + * This destroys the client's resource for this dial object. + */ +static inline void +zwp_tablet_pad_dial_v2_destroy(struct zwp_tablet_pad_dial_v2 *zwp_tablet_pad_dial_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_tablet_pad_dial_v2, + ZWP_TABLET_PAD_DIAL_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_tablet_pad_dial_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/linux/protocols/generated/text-input-unstable-v3.c b/src/linux/protocols/generated/text-input-unstable-v3.c new file mode 100644 index 0000000..08cb29c --- /dev/null +++ b/src/linux/protocols/generated/text-input-unstable-v3.c @@ -0,0 +1,97 @@ +/* Generated by wayland-scanner 1.24.0 */ + +/* + * Copyright © 2012, 2013 Intel Corporation + * Copyright © 2015, 2016 Jan Arne Petersen + * Copyright © 2017, 2018 Red Hat, Inc. + * Copyright © 2018 Purism SPC + * + * Permission to use, copy, modify, distribute, and sell this + * software and its documentation for any purpose is hereby granted + * without fee, provided that the above copyright notice appear in + * all copies and that both that copyright notice and this permission + * notice appear in supporting documentation, and that the name of + * the copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + * THIS SOFTWARE. + */ + +#include +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface wl_seat_interface; +extern const struct wl_interface wl_surface_interface; +extern const struct wl_interface zwp_text_input_v3_interface; + +static const struct wl_interface *text_input_unstable_v3_types[] = { + NULL, + NULL, + NULL, + NULL, + &wl_surface_interface, + &wl_surface_interface, + &zwp_text_input_v3_interface, + &wl_seat_interface, +}; + +static const struct wl_message zwp_text_input_v3_requests[] = { + { "destroy", "", text_input_unstable_v3_types + 0 }, + { "enable", "", text_input_unstable_v3_types + 0 }, + { "disable", "", text_input_unstable_v3_types + 0 }, + { "set_surrounding_text", "sii", text_input_unstable_v3_types + 0 }, + { "set_text_change_cause", "u", text_input_unstable_v3_types + 0 }, + { "set_content_type", "uu", text_input_unstable_v3_types + 0 }, + { "set_cursor_rectangle", "iiii", text_input_unstable_v3_types + 0 }, + { "commit", "", text_input_unstable_v3_types + 0 }, +}; + +static const struct wl_message zwp_text_input_v3_events[] = { + { "enter", "o", text_input_unstable_v3_types + 4 }, + { "leave", "o", text_input_unstable_v3_types + 5 }, + { "preedit_string", "?sii", text_input_unstable_v3_types + 0 }, + { "commit_string", "?s", text_input_unstable_v3_types + 0 }, + { "delete_surrounding_text", "uu", text_input_unstable_v3_types + 0 }, + { "done", "u", text_input_unstable_v3_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zwp_text_input_v3_interface = { + "zwp_text_input_v3", 1, + 8, zwp_text_input_v3_requests, + 6, zwp_text_input_v3_events, +}; + +static const struct wl_message zwp_text_input_manager_v3_requests[] = { + { "destroy", "", text_input_unstable_v3_types + 0 }, + { "get_text_input", "no", text_input_unstable_v3_types + 6 }, +}; + +WL_PRIVATE const struct wl_interface zwp_text_input_manager_v3_interface = { + "zwp_text_input_manager_v3", 1, + 2, zwp_text_input_manager_v3_requests, + 0, NULL, +}; + diff --git a/src/linux/protocols/generated/text-input-unstable-v3.h b/src/linux/protocols/generated/text-input-unstable-v3.h new file mode 100644 index 0000000..dea96b8 --- /dev/null +++ b/src/linux/protocols/generated/text-input-unstable-v3.h @@ -0,0 +1,837 @@ +/* Generated by wayland-scanner 1.24.0 */ + +#ifndef TEXT_INPUT_UNSTABLE_V3_CLIENT_PROTOCOL_H +#define TEXT_INPUT_UNSTABLE_V3_CLIENT_PROTOCOL_H + +#include +#include +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_text_input_unstable_v3 The text_input_unstable_v3 protocol + * Protocol for composing text + * + * @section page_desc_text_input_unstable_v3 Description + * + * This protocol allows compositors to act as input methods and to send text + * to applications. A text input object is used to manage state of what are + * typically text entry fields in the application. + * + * This document adheres to the RFC 2119 when using words like "must", + * "should", "may", etc. + * + * Warning! The protocol described in this file is experimental and + * backward incompatible changes may be made. Backward compatible changes + * may be added together with the corresponding interface version bump. + * Backward incompatible changes are done by bumping the version number in + * the protocol and interface names and resetting the interface version. + * Once the protocol is to be declared stable, the 'z' prefix and the + * version number in the protocol and interface names are removed and the + * interface version number is reset. + * + * @section page_ifaces_text_input_unstable_v3 Interfaces + * - @subpage page_iface_zwp_text_input_v3 - text input + * - @subpage page_iface_zwp_text_input_manager_v3 - text input manager + * @section page_copyright_text_input_unstable_v3 Copyright + *
+ *
+ * Copyright © 2012, 2013 Intel Corporation
+ * Copyright © 2015, 2016 Jan Arne Petersen
+ * Copyright © 2017, 2018 Red Hat, Inc.
+ * Copyright © 2018       Purism SPC
+ *
+ * Permission to use, copy, modify, distribute, and sell this
+ * software and its documentation for any purpose is hereby granted
+ * without fee, provided that the above copyright notice appear in
+ * all copies and that both that copyright notice and this permission
+ * notice appear in supporting documentation, and that the name of
+ * the copyright holders not be used in advertising or publicity
+ * pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied
+ * warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
+ * THIS SOFTWARE.
+ * 
+ */ +struct wl_seat; +struct wl_surface; +struct zwp_text_input_manager_v3; +struct zwp_text_input_v3; + +#ifndef ZWP_TEXT_INPUT_V3_INTERFACE +#define ZWP_TEXT_INPUT_V3_INTERFACE +/** + * @page page_iface_zwp_text_input_v3 zwp_text_input_v3 + * @section page_iface_zwp_text_input_v3_desc Description + * + * The zwp_text_input_v3 interface represents text input and input methods + * associated with a seat. It provides enter/leave events to follow the + * text input focus for a seat. + * + * Requests are used to enable/disable the text-input object and set + * state information like surrounding and selected text or the content type. + * The information about the entered text is sent to the text-input object + * via the preedit_string and commit_string events. + * + * Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices + * must not point to middle bytes inside a code point: they must either + * point to the first byte of a code point or to the end of the buffer. + * Lengths must be measured between two valid indices. + * + * Focus moving throughout surfaces will result in the emission of + * zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused + * surface must commit zwp_text_input_v3.enable and + * zwp_text_input_v3.disable requests as the keyboard focus moves across + * editable and non-editable elements of the UI. Those two requests are not + * expected to be paired with each other, the compositor must be able to + * handle consecutive series of the same request. + * + * State is sent by the state requests (set_surrounding_text, + * set_content_type and set_cursor_rectangle) and a commit request. After an + * enter event or disable request all state information is invalidated and + * needs to be resent by the client. + * @section page_iface_zwp_text_input_v3_api API + * See @ref iface_zwp_text_input_v3. + */ +/** + * @defgroup iface_zwp_text_input_v3 The zwp_text_input_v3 interface + * + * The zwp_text_input_v3 interface represents text input and input methods + * associated with a seat. It provides enter/leave events to follow the + * text input focus for a seat. + * + * Requests are used to enable/disable the text-input object and set + * state information like surrounding and selected text or the content type. + * The information about the entered text is sent to the text-input object + * via the preedit_string and commit_string events. + * + * Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices + * must not point to middle bytes inside a code point: they must either + * point to the first byte of a code point or to the end of the buffer. + * Lengths must be measured between two valid indices. + * + * Focus moving throughout surfaces will result in the emission of + * zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused + * surface must commit zwp_text_input_v3.enable and + * zwp_text_input_v3.disable requests as the keyboard focus moves across + * editable and non-editable elements of the UI. Those two requests are not + * expected to be paired with each other, the compositor must be able to + * handle consecutive series of the same request. + * + * State is sent by the state requests (set_surrounding_text, + * set_content_type and set_cursor_rectangle) and a commit request. After an + * enter event or disable request all state information is invalidated and + * needs to be resent by the client. + */ +extern const struct wl_interface zwp_text_input_v3_interface; +#endif +#ifndef ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE +#define ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE +/** + * @page page_iface_zwp_text_input_manager_v3 zwp_text_input_manager_v3 + * @section page_iface_zwp_text_input_manager_v3_desc Description + * + * A factory for text-input objects. This object is a global singleton. + * @section page_iface_zwp_text_input_manager_v3_api API + * See @ref iface_zwp_text_input_manager_v3. + */ +/** + * @defgroup iface_zwp_text_input_manager_v3 The zwp_text_input_manager_v3 interface + * + * A factory for text-input objects. This object is a global singleton. + */ +extern const struct wl_interface zwp_text_input_manager_v3_interface; +#endif + +#ifndef ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM +#define ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM +/** + * @ingroup iface_zwp_text_input_v3 + * text change reason + * + * Reason for the change of surrounding text or cursor posision. + */ +enum zwp_text_input_v3_change_cause { + /** + * input method caused the change + */ + ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_INPUT_METHOD = 0, + /** + * something else than the input method caused the change + */ + ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER = 1, +}; +#endif /* ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM */ + +#ifndef ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM +#define ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM +/** + * @ingroup iface_zwp_text_input_v3 + * content hint + * + * Content hint is a bitmask to allow to modify the behavior of the text + * input. + */ +enum zwp_text_input_v3_content_hint { + /** + * no special behavior + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE = 0x0, + /** + * suggest word completions + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_COMPLETION = 0x1, + /** + * suggest word corrections + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_SPELLCHECK = 0x2, + /** + * switch to uppercase letters at the start of a sentence + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION = 0x4, + /** + * prefer lowercase letters + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_LOWERCASE = 0x8, + /** + * prefer uppercase letters + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_UPPERCASE = 0x10, + /** + * prefer casing for titles and headings (can be language dependent) + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE = 0x20, + /** + * characters should be hidden + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_HIDDEN_TEXT = 0x40, + /** + * typed text should not be stored + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_SENSITIVE_DATA = 0x80, + /** + * just Latin characters should be entered + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_LATIN = 0x100, + /** + * the text input is multiline + */ + ZWP_TEXT_INPUT_V3_CONTENT_HINT_MULTILINE = 0x200, +}; +#endif /* ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM */ + +#ifndef ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM +#define ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM +/** + * @ingroup iface_zwp_text_input_v3 + * content purpose + * + * The content purpose allows to specify the primary purpose of a text + * input. + * + * This allows an input method to show special purpose input panels with + * extra characters or to disallow some characters. + */ +enum zwp_text_input_v3_content_purpose { + /** + * default input, allowing all characters + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL = 0, + /** + * allow only alphabetic characters + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ALPHA = 1, + /** + * allow only digits + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DIGITS = 2, + /** + * input a number (including decimal separator and sign) + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NUMBER = 3, + /** + * input a phone number + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PHONE = 4, + /** + * input an URL + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_URL = 5, + /** + * input an email address + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_EMAIL = 6, + /** + * input a name of a person + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NAME = 7, + /** + * input a password (combine with sensitive_data hint) + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD = 8, + /** + * input is a numeric password (combine with sensitive_data hint) + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN = 9, + /** + * input a date + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATE = 10, + /** + * input a time + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TIME = 11, + /** + * input a date and time + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATETIME = 12, + /** + * input for a terminal + */ + ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL = 13, +}; +#endif /* ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM */ + +/** + * @ingroup iface_zwp_text_input_v3 + * @struct zwp_text_input_v3_listener + */ +struct zwp_text_input_v3_listener { + /** + * enter event + * + * Notification that this seat's text-input focus is on a certain + * surface. + * + * If client has created multiple text input objects, compositor + * must send this event to all of them. + * + * When the seat has the keyboard capability the text-input focus + * follows the keyboard focus. This event sets the current surface + * for the text-input object. + */ + void (*enter)(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + struct wl_surface *surface); + /** + * leave event + * + * Notification that this seat's text-input focus is no longer on + * a certain surface. The client should reset any preedit string + * previously set. + * + * The leave notification clears the current surface. It is sent + * before the enter notification for the new focus. After leave + * event, compositor must ignore requests from any text input + * instances until next enter event. + * + * When the seat has the keyboard capability the text-input focus + * follows the keyboard focus. + */ + void (*leave)(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + struct wl_surface *surface); + /** + * pre-edit + * + * Notify when a new composing text (pre-edit) should be set at + * the current cursor position. Any previously set composing text + * must be removed. Any previously existing selected text must be + * removed. + * + * The argument text contains the pre-edit string buffer. + * + * The parameters cursor_begin and cursor_end are counted in bytes + * relative to the beginning of the submitted text buffer. Cursor + * should be hidden when both are equal to -1. + * + * They could be represented by the client as a line if both values + * are the same, or as a text highlight otherwise. + * + * Values set with this event are double-buffered. They must be + * applied and reset to initial on the next zwp_text_input_v3.done + * event. + * + * The initial value of text is an empty string, and cursor_begin, + * cursor_end and cursor_hidden are all 0. + */ + void (*preedit_string)(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + const char *text, + int32_t cursor_begin, + int32_t cursor_end); + /** + * text commit + * + * Notify when text should be inserted into the editor widget. + * The text to commit could be either just a single character after + * a key press or the result of some composing (pre-edit). + * + * Values set with this event are double-buffered. They must be + * applied and reset to initial on the next zwp_text_input_v3.done + * event. + * + * The initial value of text is an empty string. + */ + void (*commit_string)(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + const char *text); + /** + * delete surrounding text + * + * Notify when the text around the current cursor position should + * be deleted. + * + * Before_length and after_length are the number of bytes before + * and after the current cursor index (excluding the selection) to + * delete. + * + * If a preedit text is present, in effect before_length is counted + * from the beginning of it, and after_length from its end (see + * done event sequence). + * + * Values set with this event are double-buffered. They must be + * applied and reset to initial on the next zwp_text_input_v3.done + * event. + * + * The initial values of both before_length and after_length are 0. + * @param before_length length of text before current cursor position + * @param after_length length of text after current cursor position + */ + void (*delete_surrounding_text)(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + uint32_t before_length, + uint32_t after_length); + /** + * apply changes + * + * Instruct the application to apply changes to state requested + * by the preedit_string, commit_string and delete_surrounding_text + * events. The state relating to these events is double-buffered, + * and each one modifies the pending state. This event replaces the + * current state with the pending state. + * + * The application must proceed by evaluating the changes in the + * following order: + * + * 1. Replace existing preedit string with the cursor. 2. Delete + * requested surrounding text. 3. Insert commit string with the + * cursor at its end. 4. Calculate surrounding text to send. 5. + * Insert new preedit text in cursor position. 6. Place cursor + * inside preedit text. + * + * The serial number reflects the last state of the + * zwp_text_input_v3 object known to the compositor. The value of + * the serial argument must be equal to the number of commit + * requests already issued on that object. + * + * When the client receives a done event with a serial different + * than the number of past commit requests, it must proceed with + * evaluating and applying the changes as normal, except it should + * not change the current state of the zwp_text_input_v3 object. + * All pending state requests (set_surrounding_text, + * set_content_type and set_cursor_rectangle) on the + * zwp_text_input_v3 object should be sent and committed after + * receiving a zwp_text_input_v3.done event with a matching serial. + */ + void (*done)(void *data, + struct zwp_text_input_v3 *zwp_text_input_v3, + uint32_t serial); +}; + +/** + * @ingroup iface_zwp_text_input_v3 + */ +static inline int +zwp_text_input_v3_add_listener(struct zwp_text_input_v3 *zwp_text_input_v3, + const struct zwp_text_input_v3_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zwp_text_input_v3, + (void (**)(void)) listener, data); +} + +#define ZWP_TEXT_INPUT_V3_DESTROY 0 +#define ZWP_TEXT_INPUT_V3_ENABLE 1 +#define ZWP_TEXT_INPUT_V3_DISABLE 2 +#define ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT 3 +#define ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE 4 +#define ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE 5 +#define ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE 6 +#define ZWP_TEXT_INPUT_V3_COMMIT 7 + +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_ENTER_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_LEAVE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_PREEDIT_STRING_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_COMMIT_STRING_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_DELETE_SURROUNDING_TEXT_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_DONE_SINCE_VERSION 1 + +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_ENABLE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_DISABLE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_v3 + */ +#define ZWP_TEXT_INPUT_V3_COMMIT_SINCE_VERSION 1 + +/** @ingroup iface_zwp_text_input_v3 */ +static inline void +zwp_text_input_v3_set_user_data(struct zwp_text_input_v3 *zwp_text_input_v3, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_text_input_v3, user_data); +} + +/** @ingroup iface_zwp_text_input_v3 */ +static inline void * +zwp_text_input_v3_get_user_data(struct zwp_text_input_v3 *zwp_text_input_v3) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_text_input_v3); +} + +static inline uint32_t +zwp_text_input_v3_get_version(struct zwp_text_input_v3 *zwp_text_input_v3) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Destroy the wp_text_input object. Also disables all surfaces enabled + * through this wp_text_input object. + */ +static inline void +zwp_text_input_v3_destroy(struct zwp_text_input_v3 *zwp_text_input_v3) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Requests text input on the surface previously obtained from the enter + * event. + * + * This request must be issued every time the focused text input changes + * to a new one, including within the current surface. Use + * zwp_text_input_v3.disable when there is no longer any input focus on + * the current surface. + * + * Clients must not enable more than one text input on the single seat + * and should disable the current text input before enabling the new one. + * Requests to enable a text input when another text input is enabled + * on the same seat must be ignored by compositor. + * + * This request resets all state associated with previous enable, disable, + * set_surrounding_text, set_text_change_cause, set_content_type, and + * set_cursor_rectangle requests, as well as the state associated with + * preedit_string, commit_string, and delete_surrounding_text events. + * + * The set_surrounding_text, set_content_type and set_cursor_rectangle + * requests must follow if the text input supports the necessary + * functionality. + * + * State set with this request is double-buffered. It will get applied on + * the next zwp_text_input_v3.commit request, and stay valid until the + * next committed enable or disable request. + * + * The changes must be applied by the compositor after issuing a + * zwp_text_input_v3.commit request. + */ +static inline void +zwp_text_input_v3_enable(struct zwp_text_input_v3 *zwp_text_input_v3) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_ENABLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Explicitly disable text input on the current surface (typically when + * there is no focus on any text entry inside the surface). + * + * State set with this request is double-buffered. It will get applied on + * the next zwp_text_input_v3.commit request. + */ +static inline void +zwp_text_input_v3_disable(struct zwp_text_input_v3 *zwp_text_input_v3) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_DISABLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Sets the surrounding plain text around the input, excluding the preedit + * text. + * + * The client should notify the compositor of any changes in any of the + * values carried with this request, including changes caused by handling + * incoming text-input events as well as changes caused by other + * mechanisms like keyboard typing. + * + * If the client is unaware of the text around the cursor, it should not + * issue this request, to signify lack of support to the compositor. + * + * Text is UTF-8 encoded, and should include the cursor position, the + * complete selection and additional characters before and after them. + * There is a maximum length of wayland messages, so text can not be + * longer than 4000 bytes. + * + * Cursor is the byte offset of the cursor within text buffer. + * + * Anchor is the byte offset of the selection anchor within text buffer. + * If there is no selected text, anchor is the same as cursor. + * + * If any preedit text is present, it is replaced with a cursor for the + * purpose of this event. + * + * Values set with this request are double-buffered. They will get applied + * on the next zwp_text_input_v3.commit request, and stay valid until the + * next committed enable or disable request. + * + * The initial state for affected fields is empty, meaning that the text + * input does not support sending surrounding text. If the empty values + * get applied, subsequent attempts to change them may have no effect. + */ +static inline void +zwp_text_input_v3_set_surrounding_text(struct zwp_text_input_v3 *zwp_text_input_v3, const char *text, int32_t cursor, int32_t anchor) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, text, cursor, anchor); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Tells the compositor why the text surrounding the cursor changed. + * + * Whenever the client detects an external change in text, cursor, or + * anchor posision, it must issue this request to the compositor. This + * request is intended to give the input method a chance to update the + * preedit text in an appropriate way, e.g. by removing it when the user + * starts typing with a keyboard. + * + * cause describes the source of the change. + * + * The value set with this request is double-buffered. It must be applied + * and reset to initial at the next zwp_text_input_v3.commit request. + * + * The initial value of cause is input_method. + */ +static inline void +zwp_text_input_v3_set_text_change_cause(struct zwp_text_input_v3 *zwp_text_input_v3, uint32_t cause) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, cause); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Sets the content purpose and content hint. While the purpose is the + * basic purpose of an input field, the hint flags allow to modify some of + * the behavior. + * + * Values set with this request are double-buffered. They will get applied + * on the next zwp_text_input_v3.commit request. + * Subsequent attempts to update them may have no effect. The values + * remain valid until the next committed enable or disable request. + * + * The initial value for hint is none, and the initial value for purpose + * is normal. + */ +static inline void +zwp_text_input_v3_set_content_type(struct zwp_text_input_v3 *zwp_text_input_v3, uint32_t hint, uint32_t purpose) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, hint, purpose); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Marks an area around the cursor as a x, y, width, height rectangle in + * surface local coordinates. + * + * Allows the compositor to put a window with word suggestions near the + * cursor, without obstructing the text being input. + * + * If the client is unaware of the position of edited text, it should not + * issue this request, to signify lack of support to the compositor. + * + * Values set with this request are double-buffered. They will get applied + * on the next zwp_text_input_v3.commit request, and stay valid until the + * next committed enable or disable request. + * + * The initial values describing a cursor rectangle are empty. That means + * the text input does not support describing the cursor area. If the + * empty values get applied, subsequent attempts to change them may have + * no effect. + */ +static inline void +zwp_text_input_v3_set_cursor_rectangle(struct zwp_text_input_v3 *zwp_text_input_v3, int32_t x, int32_t y, int32_t width, int32_t height) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, x, y, width, height); +} + +/** + * @ingroup iface_zwp_text_input_v3 + * + * Atomically applies state changes recently sent to the compositor. + * + * The commit request establishes and updates the state of the client, and + * must be issued after any changes to apply them. + * + * Text input state (enabled status, content purpose, content hint, + * surrounding text and change cause, cursor rectangle) is conceptually + * double-buffered within the context of a text input, i.e. between a + * committed enable request and the following committed enable or disable + * request. + * + * Protocol requests modify the pending state, as opposed to the current + * state in use by the input method. A commit request atomically applies + * all pending state, replacing the current state. After commit, the new + * pending state is as documented for each related request. + * + * Requests are applied in the order of arrival. + * + * Neither current nor pending state are modified unless noted otherwise. + * + * The compositor must count the number of commit requests coming from + * each zwp_text_input_v3 object and use the count as the serial in done + * events. + */ +static inline void +zwp_text_input_v3_commit(struct zwp_text_input_v3 *zwp_text_input_v3) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3, + ZWP_TEXT_INPUT_V3_COMMIT, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0); +} + +#define ZWP_TEXT_INPUT_MANAGER_V3_DESTROY 0 +#define ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT 1 + + +/** + * @ingroup iface_zwp_text_input_manager_v3 + */ +#define ZWP_TEXT_INPUT_MANAGER_V3_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zwp_text_input_manager_v3 + */ +#define ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT_SINCE_VERSION 1 + +/** @ingroup iface_zwp_text_input_manager_v3 */ +static inline void +zwp_text_input_manager_v3_set_user_data(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zwp_text_input_manager_v3, user_data); +} + +/** @ingroup iface_zwp_text_input_manager_v3 */ +static inline void * +zwp_text_input_manager_v3_get_user_data(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zwp_text_input_manager_v3); +} + +static inline uint32_t +zwp_text_input_manager_v3_get_version(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3) +{ + return wl_proxy_get_version((struct wl_proxy *) zwp_text_input_manager_v3); +} + +/** + * @ingroup iface_zwp_text_input_manager_v3 + * + * Destroy the wp_text_input_manager object. + */ +static inline void +zwp_text_input_manager_v3_destroy(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_manager_v3, + ZWP_TEXT_INPUT_MANAGER_V3_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_manager_v3), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zwp_text_input_manager_v3 + * + * Creates a new text-input object for a given seat. + */ +static inline struct zwp_text_input_v3 * +zwp_text_input_manager_v3_get_text_input(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3, struct wl_seat *seat) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_manager_v3, + ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT, &zwp_text_input_v3_interface, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_manager_v3), 0, NULL, seat); + + return (struct zwp_text_input_v3 *) id; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/linux/protocols/generated/xdg-activation-v1.c b/src/linux/protocols/generated/xdg-activation-v1.c new file mode 100644 index 0000000..37a2746 --- /dev/null +++ b/src/linux/protocols/generated/xdg-activation-v1.c @@ -0,0 +1,85 @@ +/* Generated by wayland-scanner 1.24.0 */ + +/* + * Copyright © 2020 Aleix Pol Gonzalez + * Copyright © 2020 Carlos Garnacho + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface wl_seat_interface; +extern const struct wl_interface wl_surface_interface; +extern const struct wl_interface xdg_activation_token_v1_interface; + +static const struct wl_interface *xdg_activation_v1_types[] = { + NULL, + &xdg_activation_token_v1_interface, + NULL, + &wl_surface_interface, + NULL, + &wl_seat_interface, + &wl_surface_interface, +}; + +static const struct wl_message xdg_activation_v1_requests[] = { + { "destroy", "", xdg_activation_v1_types + 0 }, + { "get_activation_token", "n", xdg_activation_v1_types + 1 }, + { "activate", "so", xdg_activation_v1_types + 2 }, +}; + +WL_PRIVATE const struct wl_interface xdg_activation_v1_interface = { + "xdg_activation_v1", 1, + 3, xdg_activation_v1_requests, + 0, NULL, +}; + +static const struct wl_message xdg_activation_token_v1_requests[] = { + { "set_serial", "uo", xdg_activation_v1_types + 4 }, + { "set_app_id", "s", xdg_activation_v1_types + 0 }, + { "set_surface", "o", xdg_activation_v1_types + 6 }, + { "commit", "", xdg_activation_v1_types + 0 }, + { "destroy", "", xdg_activation_v1_types + 0 }, +}; + +static const struct wl_message xdg_activation_token_v1_events[] = { + { "done", "s", xdg_activation_v1_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface xdg_activation_token_v1_interface = { + "xdg_activation_token_v1", 1, + 5, xdg_activation_token_v1_requests, + 1, xdg_activation_token_v1_events, +}; + diff --git a/src/linux/protocols/generated/xdg-activation-v1.h b/src/linux/protocols/generated/xdg-activation-v1.h new file mode 100644 index 0000000..51e2be4 --- /dev/null +++ b/src/linux/protocols/generated/xdg-activation-v1.h @@ -0,0 +1,415 @@ +/* Generated by wayland-scanner 1.24.0 */ + +#ifndef XDG_ACTIVATION_V1_CLIENT_PROTOCOL_H +#define XDG_ACTIVATION_V1_CLIENT_PROTOCOL_H + +#include +#include +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_xdg_activation_v1 The xdg_activation_v1 protocol + * Protocol for requesting activation of surfaces + * + * @section page_desc_xdg_activation_v1 Description + * + * The way for a client to pass focus to another toplevel is as follows. + * + * The client that intends to activate another toplevel uses the + * xdg_activation_v1.get_activation_token request to get an activation token. + * This token is then forwarded to the client, which is supposed to activate + * one of its surfaces, through a separate band of communication. + * + * One established way of doing this is through the XDG_ACTIVATION_TOKEN + * environment variable of a newly launched child process. The child process + * should unset the environment variable again right after reading it out in + * order to avoid propagating it to other child processes. + * + * Another established way exists for Applications implementing the D-Bus + * interface org.freedesktop.Application, which should get their token under + * activation-token on their platform_data. + * + * In general activation tokens may be transferred across clients through + * means not described in this protocol. + * + * The client to be activated will then pass the token + * it received to the xdg_activation_v1.activate request. The compositor can + * then use this token to decide how to react to the activation request. + * + * The token the activating client gets may be ineffective either already at + * the time it receives it, for example if it was not focused, for focus + * stealing prevention. The activating client will have no way to discover + * the validity of the token, and may still forward it to the to be activated + * client. + * + * The created activation token may optionally get information attached to it + * that can be used by the compositor to identify the application that we + * intend to activate. This can for example be used to display a visual hint + * about what application is being started. + * + * Warning! The protocol described in this file is currently in the testing + * phase. Backward compatible changes may be added together with the + * corresponding interface version bump. Backward incompatible changes can + * only be done by creating a new major version of the extension. + * + * @section page_ifaces_xdg_activation_v1 Interfaces + * - @subpage page_iface_xdg_activation_v1 - interface for activating surfaces + * - @subpage page_iface_xdg_activation_token_v1 - an exported activation handle + * @section page_copyright_xdg_activation_v1 Copyright + *
+ *
+ * Copyright © 2020 Aleix Pol Gonzalez 
+ * Copyright © 2020 Carlos Garnacho 
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * 
+ */ +struct wl_seat; +struct wl_surface; +struct xdg_activation_token_v1; +struct xdg_activation_v1; + +#ifndef XDG_ACTIVATION_V1_INTERFACE +#define XDG_ACTIVATION_V1_INTERFACE +/** + * @page page_iface_xdg_activation_v1 xdg_activation_v1 + * @section page_iface_xdg_activation_v1_desc Description + * + * A global interface used for informing the compositor about applications + * being activated or started, or for applications to request to be + * activated. + * @section page_iface_xdg_activation_v1_api API + * See @ref iface_xdg_activation_v1. + */ +/** + * @defgroup iface_xdg_activation_v1 The xdg_activation_v1 interface + * + * A global interface used for informing the compositor about applications + * being activated or started, or for applications to request to be + * activated. + */ +extern const struct wl_interface xdg_activation_v1_interface; +#endif +#ifndef XDG_ACTIVATION_TOKEN_V1_INTERFACE +#define XDG_ACTIVATION_TOKEN_V1_INTERFACE +/** + * @page page_iface_xdg_activation_token_v1 xdg_activation_token_v1 + * @section page_iface_xdg_activation_token_v1_desc Description + * + * An object for setting up a token and receiving a token handle that can + * be passed as an activation token to another client. + * + * The object is created using the xdg_activation_v1.get_activation_token + * request. This object should then be populated with the app_id, surface + * and serial information and committed. The compositor shall then issue a + * done event with the token. In case the request's parameters are invalid, + * the compositor will provide an invalid token. + * @section page_iface_xdg_activation_token_v1_api API + * See @ref iface_xdg_activation_token_v1. + */ +/** + * @defgroup iface_xdg_activation_token_v1 The xdg_activation_token_v1 interface + * + * An object for setting up a token and receiving a token handle that can + * be passed as an activation token to another client. + * + * The object is created using the xdg_activation_v1.get_activation_token + * request. This object should then be populated with the app_id, surface + * and serial information and committed. The compositor shall then issue a + * done event with the token. In case the request's parameters are invalid, + * the compositor will provide an invalid token. + */ +extern const struct wl_interface xdg_activation_token_v1_interface; +#endif + +#define XDG_ACTIVATION_V1_DESTROY 0 +#define XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN 1 +#define XDG_ACTIVATION_V1_ACTIVATE 2 + + +/** + * @ingroup iface_xdg_activation_v1 + */ +#define XDG_ACTIVATION_V1_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_activation_v1 + */ +#define XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_activation_v1 + */ +#define XDG_ACTIVATION_V1_ACTIVATE_SINCE_VERSION 1 + +/** @ingroup iface_xdg_activation_v1 */ +static inline void +xdg_activation_v1_set_user_data(struct xdg_activation_v1 *xdg_activation_v1, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) xdg_activation_v1, user_data); +} + +/** @ingroup iface_xdg_activation_v1 */ +static inline void * +xdg_activation_v1_get_user_data(struct xdg_activation_v1 *xdg_activation_v1) +{ + return wl_proxy_get_user_data((struct wl_proxy *) xdg_activation_v1); +} + +static inline uint32_t +xdg_activation_v1_get_version(struct xdg_activation_v1 *xdg_activation_v1) +{ + return wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1); +} + +/** + * @ingroup iface_xdg_activation_v1 + * + * Notify the compositor that the xdg_activation object will no longer be + * used. + * + * The child objects created via this interface are unaffected and should + * be destroyed separately. + */ +static inline void +xdg_activation_v1_destroy(struct xdg_activation_v1 *xdg_activation_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_v1, + XDG_ACTIVATION_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_xdg_activation_v1 + * + * Creates an xdg_activation_token_v1 object that will provide + * the initiating client with a unique token for this activation. This + * token should be offered to the clients to be activated. + */ +static inline struct xdg_activation_token_v1 * +xdg_activation_v1_get_activation_token(struct xdg_activation_v1 *xdg_activation_v1) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_v1, + XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN, &xdg_activation_token_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1), 0, NULL); + + return (struct xdg_activation_token_v1 *) id; +} + +/** + * @ingroup iface_xdg_activation_v1 + * + * Requests surface activation. It's up to the compositor to display + * this information as desired, for example by placing the surface above + * the rest. + * + * The compositor may know who requested this by checking the activation + * token and might decide not to follow through with the activation if it's + * considered unwanted. + * + * Compositors can ignore unknown activation tokens when an invalid + * token is passed. + */ +static inline void +xdg_activation_v1_activate(struct xdg_activation_v1 *xdg_activation_v1, const char *token, struct wl_surface *surface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_v1, + XDG_ACTIVATION_V1_ACTIVATE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1), 0, token, surface); +} + +#ifndef XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM +#define XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM +enum xdg_activation_token_v1_error { + /** + * The token has already been used previously + */ + XDG_ACTIVATION_TOKEN_V1_ERROR_ALREADY_USED = 0, +}; +#endif /* XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM */ + +/** + * @ingroup iface_xdg_activation_token_v1 + * @struct xdg_activation_token_v1_listener + */ +struct xdg_activation_token_v1_listener { + /** + * the exported activation token + * + * The 'done' event contains the unique token of this activation + * request and notifies that the provider is done. + * @param token the exported activation token + */ + void (*done)(void *data, + struct xdg_activation_token_v1 *xdg_activation_token_v1, + const char *token); +}; + +/** + * @ingroup iface_xdg_activation_token_v1 + */ +static inline int +xdg_activation_token_v1_add_listener(struct xdg_activation_token_v1 *xdg_activation_token_v1, + const struct xdg_activation_token_v1_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) xdg_activation_token_v1, + (void (**)(void)) listener, data); +} + +#define XDG_ACTIVATION_TOKEN_V1_SET_SERIAL 0 +#define XDG_ACTIVATION_TOKEN_V1_SET_APP_ID 1 +#define XDG_ACTIVATION_TOKEN_V1_SET_SURFACE 2 +#define XDG_ACTIVATION_TOKEN_V1_COMMIT 3 +#define XDG_ACTIVATION_TOKEN_V1_DESTROY 4 + +/** + * @ingroup iface_xdg_activation_token_v1 + */ +#define XDG_ACTIVATION_TOKEN_V1_DONE_SINCE_VERSION 1 + +/** + * @ingroup iface_xdg_activation_token_v1 + */ +#define XDG_ACTIVATION_TOKEN_V1_SET_SERIAL_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_activation_token_v1 + */ +#define XDG_ACTIVATION_TOKEN_V1_SET_APP_ID_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_activation_token_v1 + */ +#define XDG_ACTIVATION_TOKEN_V1_SET_SURFACE_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_activation_token_v1 + */ +#define XDG_ACTIVATION_TOKEN_V1_COMMIT_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_activation_token_v1 + */ +#define XDG_ACTIVATION_TOKEN_V1_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_xdg_activation_token_v1 */ +static inline void +xdg_activation_token_v1_set_user_data(struct xdg_activation_token_v1 *xdg_activation_token_v1, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) xdg_activation_token_v1, user_data); +} + +/** @ingroup iface_xdg_activation_token_v1 */ +static inline void * +xdg_activation_token_v1_get_user_data(struct xdg_activation_token_v1 *xdg_activation_token_v1) +{ + return wl_proxy_get_user_data((struct wl_proxy *) xdg_activation_token_v1); +} + +static inline uint32_t +xdg_activation_token_v1_get_version(struct xdg_activation_token_v1 *xdg_activation_token_v1) +{ + return wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1); +} + +/** + * @ingroup iface_xdg_activation_token_v1 + * + * Provides information about the seat and serial event that requested the + * token. + * + * The serial can come from an input or focus event. For instance, if a + * click triggers the launch of a third-party client, the launcher client + * should send a set_serial request with the serial and seat from the + * wl_pointer.button event. + * + * Some compositors might refuse to activate toplevels when the token + * doesn't have a valid and recent enough event serial. + * + * Must be sent before commit. This information is optional. + */ +static inline void +xdg_activation_token_v1_set_serial(struct xdg_activation_token_v1 *xdg_activation_token_v1, uint32_t serial, struct wl_seat *seat) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1, + XDG_ACTIVATION_TOKEN_V1_SET_SERIAL, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0, serial, seat); +} + +/** + * @ingroup iface_xdg_activation_token_v1 + * + * The requesting client can specify an app_id to associate the token + * being created with it. + * + * Must be sent before commit. This information is optional. + */ +static inline void +xdg_activation_token_v1_set_app_id(struct xdg_activation_token_v1 *xdg_activation_token_v1, const char *app_id) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1, + XDG_ACTIVATION_TOKEN_V1_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0, app_id); +} + +/** + * @ingroup iface_xdg_activation_token_v1 + * + * This request sets the surface requesting the activation. Note, this is + * different from the surface that will be activated. + * + * Some compositors might refuse to activate toplevels when the token + * doesn't have a requesting surface. + * + * Must be sent before commit. This information is optional. + */ +static inline void +xdg_activation_token_v1_set_surface(struct xdg_activation_token_v1 *xdg_activation_token_v1, struct wl_surface *surface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1, + XDG_ACTIVATION_TOKEN_V1_SET_SURFACE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0, surface); +} + +/** + * @ingroup iface_xdg_activation_token_v1 + * + * Requests an activation token based on the different parameters that + * have been offered through set_serial, set_surface and set_app_id. + */ +static inline void +xdg_activation_token_v1_commit(struct xdg_activation_token_v1 *xdg_activation_token_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1, + XDG_ACTIVATION_TOKEN_V1_COMMIT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0); +} + +/** + * @ingroup iface_xdg_activation_token_v1 + * + * Notify the compositor that the xdg_activation_token_v1 object will no + * longer be used. The received token stays valid. + */ +static inline void +xdg_activation_token_v1_destroy(struct xdg_activation_token_v1 *xdg_activation_token_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1, + XDG_ACTIVATION_TOKEN_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), WL_MARSHAL_FLAG_DESTROY); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/linux/protocols/generated/xdg-foreign-unstable-v2.c b/src/linux/protocols/generated/xdg-foreign-unstable-v2.c new file mode 100644 index 0000000..f89fb13 --- /dev/null +++ b/src/linux/protocols/generated/xdg-foreign-unstable-v2.c @@ -0,0 +1,104 @@ +/* Generated by wayland-scanner 1.24.0 */ + +/* + * Copyright © 2015-2016 Red Hat Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface wl_surface_interface; +extern const struct wl_interface zxdg_exported_v2_interface; +extern const struct wl_interface zxdg_imported_v2_interface; + +static const struct wl_interface *xdg_foreign_unstable_v2_types[] = { + NULL, + &zxdg_exported_v2_interface, + &wl_surface_interface, + &zxdg_imported_v2_interface, + NULL, + &wl_surface_interface, +}; + +static const struct wl_message zxdg_exporter_v2_requests[] = { + { "destroy", "", xdg_foreign_unstable_v2_types + 0 }, + { "export_toplevel", "no", xdg_foreign_unstable_v2_types + 1 }, +}; + +WL_PRIVATE const struct wl_interface zxdg_exporter_v2_interface = { + "zxdg_exporter_v2", 1, + 2, zxdg_exporter_v2_requests, + 0, NULL, +}; + +static const struct wl_message zxdg_importer_v2_requests[] = { + { "destroy", "", xdg_foreign_unstable_v2_types + 0 }, + { "import_toplevel", "ns", xdg_foreign_unstable_v2_types + 3 }, +}; + +WL_PRIVATE const struct wl_interface zxdg_importer_v2_interface = { + "zxdg_importer_v2", 1, + 2, zxdg_importer_v2_requests, + 0, NULL, +}; + +static const struct wl_message zxdg_exported_v2_requests[] = { + { "destroy", "", xdg_foreign_unstable_v2_types + 0 }, +}; + +static const struct wl_message zxdg_exported_v2_events[] = { + { "handle", "s", xdg_foreign_unstable_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zxdg_exported_v2_interface = { + "zxdg_exported_v2", 1, + 1, zxdg_exported_v2_requests, + 1, zxdg_exported_v2_events, +}; + +static const struct wl_message zxdg_imported_v2_requests[] = { + { "destroy", "", xdg_foreign_unstable_v2_types + 0 }, + { "set_parent_of", "o", xdg_foreign_unstable_v2_types + 5 }, +}; + +static const struct wl_message zxdg_imported_v2_events[] = { + { "destroyed", "", xdg_foreign_unstable_v2_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface zxdg_imported_v2_interface = { + "zxdg_imported_v2", 1, + 2, zxdg_imported_v2_requests, + 1, zxdg_imported_v2_events, +}; + diff --git a/src/linux/protocols/generated/xdg-foreign-unstable-v2.h b/src/linux/protocols/generated/xdg-foreign-unstable-v2.h new file mode 100644 index 0000000..7817412 --- /dev/null +++ b/src/linux/protocols/generated/xdg-foreign-unstable-v2.h @@ -0,0 +1,518 @@ +/* Generated by wayland-scanner 1.24.0 */ + +#ifndef XDG_FOREIGN_UNSTABLE_V2_CLIENT_PROTOCOL_H +#define XDG_FOREIGN_UNSTABLE_V2_CLIENT_PROTOCOL_H + +#include +#include +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_xdg_foreign_unstable_v2 The xdg_foreign_unstable_v2 protocol + * Protocol for exporting xdg surface handles + * + * @section page_desc_xdg_foreign_unstable_v2 Description + * + * This protocol specifies a way for making it possible to reference a surface + * of a different client. With such a reference, a client can, by using the + * interfaces provided by this protocol, manipulate the relationship between + * its own surfaces and the surface of some other client. For example, stack + * some of its own surface above the other clients surface. + * + * In order for a client A to get a reference of a surface of client B, client + * B must first export its surface using xdg_exporter.export_toplevel. Upon + * doing this, client B will receive a handle (a unique string) that it may + * share with client A in some way (for example D-Bus). After client A has + * received the handle from client B, it may use xdg_importer.import_toplevel + * to create a reference to the surface client B just exported. See the + * corresponding requests for details. + * + * A possible use case for this is out-of-process dialogs. For example when a + * sandboxed client without file system access needs the user to select a file + * on the file system, given sandbox environment support, it can export its + * surface, passing the exported surface handle to an unsandboxed process that + * can show a file browser dialog and stack it above the sandboxed client's + * surface. + * + * Warning! The protocol described in this file is experimental and backward + * incompatible changes may be made. Backward compatible changes may be added + * together with the corresponding interface version bump. Backward + * incompatible changes are done by bumping the version number in the protocol + * and interface names and resetting the interface version. Once the protocol + * is to be declared stable, the 'z' prefix and the version number in the + * protocol and interface names are removed and the interface version number is + * reset. + * + * @section page_ifaces_xdg_foreign_unstable_v2 Interfaces + * - @subpage page_iface_zxdg_exporter_v2 - interface for exporting surfaces + * - @subpage page_iface_zxdg_importer_v2 - interface for importing surfaces + * - @subpage page_iface_zxdg_exported_v2 - an exported surface handle + * - @subpage page_iface_zxdg_imported_v2 - an imported surface handle + * @section page_copyright_xdg_foreign_unstable_v2 Copyright + *
+ *
+ * Copyright © 2015-2016 Red Hat Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * 
+ */ +struct wl_surface; +struct zxdg_exported_v2; +struct zxdg_exporter_v2; +struct zxdg_imported_v2; +struct zxdg_importer_v2; + +#ifndef ZXDG_EXPORTER_V2_INTERFACE +#define ZXDG_EXPORTER_V2_INTERFACE +/** + * @page page_iface_zxdg_exporter_v2 zxdg_exporter_v2 + * @section page_iface_zxdg_exporter_v2_desc Description + * + * A global interface used for exporting surfaces that can later be imported + * using xdg_importer. + * @section page_iface_zxdg_exporter_v2_api API + * See @ref iface_zxdg_exporter_v2. + */ +/** + * @defgroup iface_zxdg_exporter_v2 The zxdg_exporter_v2 interface + * + * A global interface used for exporting surfaces that can later be imported + * using xdg_importer. + */ +extern const struct wl_interface zxdg_exporter_v2_interface; +#endif +#ifndef ZXDG_IMPORTER_V2_INTERFACE +#define ZXDG_IMPORTER_V2_INTERFACE +/** + * @page page_iface_zxdg_importer_v2 zxdg_importer_v2 + * @section page_iface_zxdg_importer_v2_desc Description + * + * A global interface used for importing surfaces exported by xdg_exporter. + * With this interface, a client can create a reference to a surface of + * another client. + * @section page_iface_zxdg_importer_v2_api API + * See @ref iface_zxdg_importer_v2. + */ +/** + * @defgroup iface_zxdg_importer_v2 The zxdg_importer_v2 interface + * + * A global interface used for importing surfaces exported by xdg_exporter. + * With this interface, a client can create a reference to a surface of + * another client. + */ +extern const struct wl_interface zxdg_importer_v2_interface; +#endif +#ifndef ZXDG_EXPORTED_V2_INTERFACE +#define ZXDG_EXPORTED_V2_INTERFACE +/** + * @page page_iface_zxdg_exported_v2 zxdg_exported_v2 + * @section page_iface_zxdg_exported_v2_desc Description + * + * An xdg_exported object represents an exported reference to a surface. The + * exported surface may be referenced as long as the xdg_exported object not + * destroyed. Destroying the xdg_exported invalidates any relationship the + * importer may have established using xdg_imported. + * @section page_iface_zxdg_exported_v2_api API + * See @ref iface_zxdg_exported_v2. + */ +/** + * @defgroup iface_zxdg_exported_v2 The zxdg_exported_v2 interface + * + * An xdg_exported object represents an exported reference to a surface. The + * exported surface may be referenced as long as the xdg_exported object not + * destroyed. Destroying the xdg_exported invalidates any relationship the + * importer may have established using xdg_imported. + */ +extern const struct wl_interface zxdg_exported_v2_interface; +#endif +#ifndef ZXDG_IMPORTED_V2_INTERFACE +#define ZXDG_IMPORTED_V2_INTERFACE +/** + * @page page_iface_zxdg_imported_v2 zxdg_imported_v2 + * @section page_iface_zxdg_imported_v2_desc Description + * + * An xdg_imported object represents an imported reference to surface exported + * by some client. A client can use this interface to manipulate + * relationships between its own surfaces and the imported surface. + * @section page_iface_zxdg_imported_v2_api API + * See @ref iface_zxdg_imported_v2. + */ +/** + * @defgroup iface_zxdg_imported_v2 The zxdg_imported_v2 interface + * + * An xdg_imported object represents an imported reference to surface exported + * by some client. A client can use this interface to manipulate + * relationships between its own surfaces and the imported surface. + */ +extern const struct wl_interface zxdg_imported_v2_interface; +#endif + +#ifndef ZXDG_EXPORTER_V2_ERROR_ENUM +#define ZXDG_EXPORTER_V2_ERROR_ENUM +/** + * @ingroup iface_zxdg_exporter_v2 + * error values + * + * These errors can be emitted in response to invalid xdg_exporter + * requests. + */ +enum zxdg_exporter_v2_error { + /** + * surface is not an xdg_toplevel + */ + ZXDG_EXPORTER_V2_ERROR_INVALID_SURFACE = 0, +}; +#endif /* ZXDG_EXPORTER_V2_ERROR_ENUM */ + +#define ZXDG_EXPORTER_V2_DESTROY 0 +#define ZXDG_EXPORTER_V2_EXPORT_TOPLEVEL 1 + + +/** + * @ingroup iface_zxdg_exporter_v2 + */ +#define ZXDG_EXPORTER_V2_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_exporter_v2 + */ +#define ZXDG_EXPORTER_V2_EXPORT_TOPLEVEL_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_exporter_v2 */ +static inline void +zxdg_exporter_v2_set_user_data(struct zxdg_exporter_v2 *zxdg_exporter_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_exporter_v2, user_data); +} + +/** @ingroup iface_zxdg_exporter_v2 */ +static inline void * +zxdg_exporter_v2_get_user_data(struct zxdg_exporter_v2 *zxdg_exporter_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_exporter_v2); +} + +static inline uint32_t +zxdg_exporter_v2_get_version(struct zxdg_exporter_v2 *zxdg_exporter_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_exporter_v2); +} + +/** + * @ingroup iface_zxdg_exporter_v2 + * + * Notify the compositor that the xdg_exporter object will no longer be + * used. + */ +static inline void +zxdg_exporter_v2_destroy(struct zxdg_exporter_v2 *zxdg_exporter_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zxdg_exporter_v2, + ZXDG_EXPORTER_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_exporter_v2), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zxdg_exporter_v2 + * + * The export_toplevel request exports the passed surface so that it can later be + * imported via xdg_importer. When called, a new xdg_exported object will + * be created and xdg_exported.handle will be sent immediately. See the + * corresponding interface and event for details. + * + * A surface may be exported multiple times, and each exported handle may + * be used to create an xdg_imported multiple times. Only xdg_toplevel + * equivalent surfaces may be exported, otherwise an invalid_surface + * protocol error is sent. + */ +static inline struct zxdg_exported_v2 * +zxdg_exporter_v2_export_toplevel(struct zxdg_exporter_v2 *zxdg_exporter_v2, struct wl_surface *surface) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_exporter_v2, + ZXDG_EXPORTER_V2_EXPORT_TOPLEVEL, &zxdg_exported_v2_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_exporter_v2), 0, NULL, surface); + + return (struct zxdg_exported_v2 *) id; +} + +#define ZXDG_IMPORTER_V2_DESTROY 0 +#define ZXDG_IMPORTER_V2_IMPORT_TOPLEVEL 1 + + +/** + * @ingroup iface_zxdg_importer_v2 + */ +#define ZXDG_IMPORTER_V2_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_importer_v2 + */ +#define ZXDG_IMPORTER_V2_IMPORT_TOPLEVEL_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_importer_v2 */ +static inline void +zxdg_importer_v2_set_user_data(struct zxdg_importer_v2 *zxdg_importer_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_importer_v2, user_data); +} + +/** @ingroup iface_zxdg_importer_v2 */ +static inline void * +zxdg_importer_v2_get_user_data(struct zxdg_importer_v2 *zxdg_importer_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_importer_v2); +} + +static inline uint32_t +zxdg_importer_v2_get_version(struct zxdg_importer_v2 *zxdg_importer_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_importer_v2); +} + +/** + * @ingroup iface_zxdg_importer_v2 + * + * Notify the compositor that the xdg_importer object will no longer be + * used. + */ +static inline void +zxdg_importer_v2_destroy(struct zxdg_importer_v2 *zxdg_importer_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zxdg_importer_v2, + ZXDG_IMPORTER_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_importer_v2), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zxdg_importer_v2 + * + * The import_toplevel request imports a surface from any client given a handle + * retrieved by exporting said surface using xdg_exporter.export_toplevel. + * When called, a new xdg_imported object will be created. This new object + * represents the imported surface, and the importing client can + * manipulate its relationship using it. See xdg_imported for details. + */ +static inline struct zxdg_imported_v2 * +zxdg_importer_v2_import_toplevel(struct zxdg_importer_v2 *zxdg_importer_v2, const char *handle) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_importer_v2, + ZXDG_IMPORTER_V2_IMPORT_TOPLEVEL, &zxdg_imported_v2_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_importer_v2), 0, NULL, handle); + + return (struct zxdg_imported_v2 *) id; +} + +/** + * @ingroup iface_zxdg_exported_v2 + * @struct zxdg_exported_v2_listener + */ +struct zxdg_exported_v2_listener { + /** + * the exported surface handle + * + * The handle event contains the unique handle of this exported + * surface reference. It may be shared with any client, which then + * can use it to import the surface by calling + * xdg_importer.import_toplevel. A handle may be used to import the + * surface multiple times. + * @param handle the exported surface handle + */ + void (*handle)(void *data, + struct zxdg_exported_v2 *zxdg_exported_v2, + const char *handle); +}; + +/** + * @ingroup iface_zxdg_exported_v2 + */ +static inline int +zxdg_exported_v2_add_listener(struct zxdg_exported_v2 *zxdg_exported_v2, + const struct zxdg_exported_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zxdg_exported_v2, + (void (**)(void)) listener, data); +} + +#define ZXDG_EXPORTED_V2_DESTROY 0 + +/** + * @ingroup iface_zxdg_exported_v2 + */ +#define ZXDG_EXPORTED_V2_HANDLE_SINCE_VERSION 1 + +/** + * @ingroup iface_zxdg_exported_v2 + */ +#define ZXDG_EXPORTED_V2_DESTROY_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_exported_v2 */ +static inline void +zxdg_exported_v2_set_user_data(struct zxdg_exported_v2 *zxdg_exported_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_exported_v2, user_data); +} + +/** @ingroup iface_zxdg_exported_v2 */ +static inline void * +zxdg_exported_v2_get_user_data(struct zxdg_exported_v2 *zxdg_exported_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_exported_v2); +} + +static inline uint32_t +zxdg_exported_v2_get_version(struct zxdg_exported_v2 *zxdg_exported_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_exported_v2); +} + +/** + * @ingroup iface_zxdg_exported_v2 + * + * Revoke the previously exported surface. This invalidates any + * relationship the importer may have set up using the xdg_imported created + * given the handle sent via xdg_exported.handle. + */ +static inline void +zxdg_exported_v2_destroy(struct zxdg_exported_v2 *zxdg_exported_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zxdg_exported_v2, + ZXDG_EXPORTED_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_exported_v2), WL_MARSHAL_FLAG_DESTROY); +} + +#ifndef ZXDG_IMPORTED_V2_ERROR_ENUM +#define ZXDG_IMPORTED_V2_ERROR_ENUM +/** + * @ingroup iface_zxdg_imported_v2 + * error values + * + * These errors can be emitted in response to invalid xdg_imported + * requests. + */ +enum zxdg_imported_v2_error { + /** + * surface is not an xdg_toplevel + */ + ZXDG_IMPORTED_V2_ERROR_INVALID_SURFACE = 0, +}; +#endif /* ZXDG_IMPORTED_V2_ERROR_ENUM */ + +/** + * @ingroup iface_zxdg_imported_v2 + * @struct zxdg_imported_v2_listener + */ +struct zxdg_imported_v2_listener { + /** + * the imported surface handle has been destroyed + * + * The imported surface handle has been destroyed and any + * relationship set up has been invalidated. This may happen for + * various reasons, for example if the exported surface or the + * exported surface handle has been destroyed, if the handle used + * for importing was invalid. + */ + void (*destroyed)(void *data, + struct zxdg_imported_v2 *zxdg_imported_v2); +}; + +/** + * @ingroup iface_zxdg_imported_v2 + */ +static inline int +zxdg_imported_v2_add_listener(struct zxdg_imported_v2 *zxdg_imported_v2, + const struct zxdg_imported_v2_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) zxdg_imported_v2, + (void (**)(void)) listener, data); +} + +#define ZXDG_IMPORTED_V2_DESTROY 0 +#define ZXDG_IMPORTED_V2_SET_PARENT_OF 1 + +/** + * @ingroup iface_zxdg_imported_v2 + */ +#define ZXDG_IMPORTED_V2_DESTROYED_SINCE_VERSION 1 + +/** + * @ingroup iface_zxdg_imported_v2 + */ +#define ZXDG_IMPORTED_V2_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_zxdg_imported_v2 + */ +#define ZXDG_IMPORTED_V2_SET_PARENT_OF_SINCE_VERSION 1 + +/** @ingroup iface_zxdg_imported_v2 */ +static inline void +zxdg_imported_v2_set_user_data(struct zxdg_imported_v2 *zxdg_imported_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) zxdg_imported_v2, user_data); +} + +/** @ingroup iface_zxdg_imported_v2 */ +static inline void * +zxdg_imported_v2_get_user_data(struct zxdg_imported_v2 *zxdg_imported_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) zxdg_imported_v2); +} + +static inline uint32_t +zxdg_imported_v2_get_version(struct zxdg_imported_v2 *zxdg_imported_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) zxdg_imported_v2); +} + +/** + * @ingroup iface_zxdg_imported_v2 + * + * Notify the compositor that it will no longer use the xdg_imported + * object. Any relationship that may have been set up will at this point + * be invalidated. + */ +static inline void +zxdg_imported_v2_destroy(struct zxdg_imported_v2 *zxdg_imported_v2) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zxdg_imported_v2, + ZXDG_IMPORTED_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_imported_v2), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_zxdg_imported_v2 + * + * Set the imported surface as the parent of some surface of the client. + * The passed surface must be an xdg_toplevel equivalent, otherwise an + * invalid_surface protocol error is sent. Calling this function sets up + * a surface to surface relation with the same stacking and positioning + * semantics as xdg_toplevel.set_parent. + */ +static inline void +zxdg_imported_v2_set_parent_of(struct zxdg_imported_v2 *zxdg_imported_v2, struct wl_surface *surface) +{ + wl_proxy_marshal_flags((struct wl_proxy *) zxdg_imported_v2, + ZXDG_IMPORTED_V2_SET_PARENT_OF, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_imported_v2), 0, surface); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/linux/protocols/generated/xdg-toplevel-icon-v1.c b/src/linux/protocols/generated/xdg-toplevel-icon-v1.c new file mode 100644 index 0000000..73d39d2 --- /dev/null +++ b/src/linux/protocols/generated/xdg-toplevel-icon-v1.c @@ -0,0 +1,83 @@ +/* Generated by wayland-scanner 1.24.0 */ + +/* + * Copyright © 2023-2024 Matthias Klumpp + * Copyright © 2024 David Edmundson + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#include +#include +#include +#include "wayland-util.h" + +#ifndef __has_attribute +# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ +#endif + +#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4) +#define WL_PRIVATE __attribute__ ((visibility("hidden"))) +#else +#define WL_PRIVATE +#endif + +extern const struct wl_interface wl_buffer_interface; +extern const struct wl_interface xdg_toplevel_interface; +extern const struct wl_interface xdg_toplevel_icon_v1_interface; + +static const struct wl_interface *xdg_toplevel_icon_v1_types[] = { + NULL, + &xdg_toplevel_icon_v1_interface, + &xdg_toplevel_interface, + &xdg_toplevel_icon_v1_interface, + &wl_buffer_interface, + NULL, +}; + +static const struct wl_message xdg_toplevel_icon_manager_v1_requests[] = { + { "destroy", "", xdg_toplevel_icon_v1_types + 0 }, + { "create_icon", "n", xdg_toplevel_icon_v1_types + 1 }, + { "set_icon", "o?o", xdg_toplevel_icon_v1_types + 2 }, +}; + +static const struct wl_message xdg_toplevel_icon_manager_v1_events[] = { + { "icon_size", "i", xdg_toplevel_icon_v1_types + 0 }, + { "done", "", xdg_toplevel_icon_v1_types + 0 }, +}; + +WL_PRIVATE const struct wl_interface xdg_toplevel_icon_manager_v1_interface = { + "xdg_toplevel_icon_manager_v1", 1, + 3, xdg_toplevel_icon_manager_v1_requests, + 2, xdg_toplevel_icon_manager_v1_events, +}; + +static const struct wl_message xdg_toplevel_icon_v1_requests[] = { + { "destroy", "", xdg_toplevel_icon_v1_types + 0 }, + { "set_name", "s", xdg_toplevel_icon_v1_types + 0 }, + { "add_buffer", "oi", xdg_toplevel_icon_v1_types + 4 }, +}; + +WL_PRIVATE const struct wl_interface xdg_toplevel_icon_v1_interface = { + "xdg_toplevel_icon_v1", 1, + 3, xdg_toplevel_icon_v1_requests, + 0, NULL, +}; + diff --git a/src/linux/protocols/generated/xdg-toplevel-icon-v1.h b/src/linux/protocols/generated/xdg-toplevel-icon-v1.h new file mode 100644 index 0000000..5d8e375 --- /dev/null +++ b/src/linux/protocols/generated/xdg-toplevel-icon-v1.h @@ -0,0 +1,410 @@ +/* Generated by wayland-scanner 1.24.0 */ + +#ifndef XDG_TOPLEVEL_ICON_V1_CLIENT_PROTOCOL_H +#define XDG_TOPLEVEL_ICON_V1_CLIENT_PROTOCOL_H + +#include +#include +#include "wayland-client.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @page page_xdg_toplevel_icon_v1 The xdg_toplevel_icon_v1 protocol + * protocol to assign icons to toplevels + * + * @section page_desc_xdg_toplevel_icon_v1 Description + * + * This protocol allows clients to set icons for their toplevel surfaces + * either via the XDG icon stock (using an icon name), or from pixel data. + * + * A toplevel icon represents the individual toplevel (unlike the application + * or launcher icon, which represents the application as a whole), and may be + * shown in window switchers, window overviews and taskbars that list + * individual windows. + * + * This document adheres to RFC 2119 when using words like "must", + * "should", "may", etc. + * + * Warning! The protocol described in this file is currently in the testing + * phase. Backward compatible changes may be added together with the + * corresponding interface version bump. Backward incompatible changes can + * only be done by creating a new major version of the extension. + * + * @section page_ifaces_xdg_toplevel_icon_v1 Interfaces + * - @subpage page_iface_xdg_toplevel_icon_manager_v1 - interface to manage toplevel icons + * - @subpage page_iface_xdg_toplevel_icon_v1 - a toplevel window icon + * @section page_copyright_xdg_toplevel_icon_v1 Copyright + *
+ *
+ * Copyright © 2023-2024 Matthias Klumpp
+ * Copyright ©      2024 David Edmundson
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * 
+ */ +struct wl_buffer; +struct xdg_toplevel; +struct xdg_toplevel_icon_manager_v1; +struct xdg_toplevel_icon_v1; + +#ifndef XDG_TOPLEVEL_ICON_MANAGER_V1_INTERFACE +#define XDG_TOPLEVEL_ICON_MANAGER_V1_INTERFACE +/** + * @page page_iface_xdg_toplevel_icon_manager_v1 xdg_toplevel_icon_manager_v1 + * @section page_iface_xdg_toplevel_icon_manager_v1_desc Description + * + * This interface allows clients to create toplevel window icons and set + * them on toplevel windows to be displayed to the user. + * @section page_iface_xdg_toplevel_icon_manager_v1_api API + * See @ref iface_xdg_toplevel_icon_manager_v1. + */ +/** + * @defgroup iface_xdg_toplevel_icon_manager_v1 The xdg_toplevel_icon_manager_v1 interface + * + * This interface allows clients to create toplevel window icons and set + * them on toplevel windows to be displayed to the user. + */ +extern const struct wl_interface xdg_toplevel_icon_manager_v1_interface; +#endif +#ifndef XDG_TOPLEVEL_ICON_V1_INTERFACE +#define XDG_TOPLEVEL_ICON_V1_INTERFACE +/** + * @page page_iface_xdg_toplevel_icon_v1 xdg_toplevel_icon_v1 + * @section page_iface_xdg_toplevel_icon_v1_desc Description + * + * This interface defines a toplevel icon. + * An icon can have a name, and multiple buffers. + * In order to be applied, the icon must have either a name, or at least + * one buffer assigned. Applying an empty icon (with no buffer or name) to + * a toplevel should reset its icon to the default icon. + * + * It is up to compositor policy whether to prefer using a buffer or loading + * an icon via its name. See 'set_name' and 'add_buffer' for details. + * @section page_iface_xdg_toplevel_icon_v1_api API + * See @ref iface_xdg_toplevel_icon_v1. + */ +/** + * @defgroup iface_xdg_toplevel_icon_v1 The xdg_toplevel_icon_v1 interface + * + * This interface defines a toplevel icon. + * An icon can have a name, and multiple buffers. + * In order to be applied, the icon must have either a name, or at least + * one buffer assigned. Applying an empty icon (with no buffer or name) to + * a toplevel should reset its icon to the default icon. + * + * It is up to compositor policy whether to prefer using a buffer or loading + * an icon via its name. See 'set_name' and 'add_buffer' for details. + */ +extern const struct wl_interface xdg_toplevel_icon_v1_interface; +#endif + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + * @struct xdg_toplevel_icon_manager_v1_listener + */ +struct xdg_toplevel_icon_manager_v1_listener { + /** + * describes a supported & preferred icon size + * + * This event indicates an icon size the compositor prefers to be + * available if the client has scalable icons and can render to any + * size. + * + * When the 'xdg_toplevel_icon_manager_v1' object is created, the + * compositor may send one or more 'icon_size' events to describe + * the list of preferred icon sizes. If the compositor has no size + * preference, it may not send any 'icon_size' event, and it is up + * to the client to decide a suitable icon size. + * + * A sequence of 'icon_size' events must be finished with a 'done' + * event. If the compositor has no size preferences, it must still + * send the 'done' event, without any preceding 'icon_size' events. + * @param size the edge size of the square icon in surface-local coordinates, e.g. 64 + */ + void (*icon_size)(void *data, + struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1, + int32_t size); + /** + * all information has been sent + * + * This event is sent after all 'icon_size' events have been + * sent. + */ + void (*done)(void *data, + struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1); +}; + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + */ +static inline int +xdg_toplevel_icon_manager_v1_add_listener(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1, + const struct xdg_toplevel_icon_manager_v1_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) xdg_toplevel_icon_manager_v1, + (void (**)(void)) listener, data); +} + +#define XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY 0 +#define XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON 1 +#define XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON 2 + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + */ +#define XDG_TOPLEVEL_ICON_MANAGER_V1_ICON_SIZE_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + */ +#define XDG_TOPLEVEL_ICON_MANAGER_V1_DONE_SINCE_VERSION 1 + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + */ +#define XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + */ +#define XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + */ +#define XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON_SINCE_VERSION 1 + +/** @ingroup iface_xdg_toplevel_icon_manager_v1 */ +static inline void +xdg_toplevel_icon_manager_v1_set_user_data(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_icon_manager_v1, user_data); +} + +/** @ingroup iface_xdg_toplevel_icon_manager_v1 */ +static inline void * +xdg_toplevel_icon_manager_v1_get_user_data(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1) +{ + return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_icon_manager_v1); +} + +static inline uint32_t +xdg_toplevel_icon_manager_v1_get_version(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1) +{ + return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1); +} + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + * + * Destroy the toplevel icon manager. + * This does not destroy objects created with the manager. + */ +static inline void +xdg_toplevel_icon_manager_v1_destroy(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_manager_v1, + XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + * + * Creates a new icon object. This icon can then be attached to a + * xdg_toplevel via the 'set_icon' request. + */ +static inline struct xdg_toplevel_icon_v1 * +xdg_toplevel_icon_manager_v1_create_icon(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_manager_v1, + XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON, &xdg_toplevel_icon_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1), 0, NULL); + + return (struct xdg_toplevel_icon_v1 *) id; +} + +/** + * @ingroup iface_xdg_toplevel_icon_manager_v1 + * + * This request assigns the icon 'icon' to 'toplevel', or clears the + * toplevel icon if 'icon' was null. + * This state is double-buffered and is applied on the next + * wl_surface.commit of the toplevel. + * + * After making this call, the xdg_toplevel_icon_v1 provided as 'icon' + * can be destroyed by the client without 'toplevel' losing its icon. + * The xdg_toplevel_icon_v1 is immutable from this point, and any + * future attempts to change it must raise the + * 'xdg_toplevel_icon_v1.immutable' protocol error. + * + * The compositor must set the toplevel icon from either the pixel data + * the icon provides, or by loading a stock icon using the icon name. + * See the description of 'xdg_toplevel_icon_v1' for details. + * + * If 'icon' is set to null, the icon of the respective toplevel is reset + * to its default icon (usually the icon of the application, derived from + * its desktop-entry file, or a placeholder icon). + * If this request is passed an icon with no pixel buffers or icon name + * assigned, the icon must be reset just like if 'icon' was null. + */ +static inline void +xdg_toplevel_icon_manager_v1_set_icon(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1, struct xdg_toplevel *toplevel, struct xdg_toplevel_icon_v1 *icon) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_manager_v1, + XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1), 0, toplevel, icon); +} + +#ifndef XDG_TOPLEVEL_ICON_V1_ERROR_ENUM +#define XDG_TOPLEVEL_ICON_V1_ERROR_ENUM +enum xdg_toplevel_icon_v1_error { + /** + * the provided buffer does not satisfy requirements + */ + XDG_TOPLEVEL_ICON_V1_ERROR_INVALID_BUFFER = 1, + /** + * the icon has already been assigned to a toplevel and must not be changed + */ + XDG_TOPLEVEL_ICON_V1_ERROR_IMMUTABLE = 2, + /** + * the provided buffer has been destroyed before the toplevel icon + */ + XDG_TOPLEVEL_ICON_V1_ERROR_NO_BUFFER = 3, +}; +#endif /* XDG_TOPLEVEL_ICON_V1_ERROR_ENUM */ + +#define XDG_TOPLEVEL_ICON_V1_DESTROY 0 +#define XDG_TOPLEVEL_ICON_V1_SET_NAME 1 +#define XDG_TOPLEVEL_ICON_V1_ADD_BUFFER 2 + + +/** + * @ingroup iface_xdg_toplevel_icon_v1 + */ +#define XDG_TOPLEVEL_ICON_V1_DESTROY_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_toplevel_icon_v1 + */ +#define XDG_TOPLEVEL_ICON_V1_SET_NAME_SINCE_VERSION 1 +/** + * @ingroup iface_xdg_toplevel_icon_v1 + */ +#define XDG_TOPLEVEL_ICON_V1_ADD_BUFFER_SINCE_VERSION 1 + +/** @ingroup iface_xdg_toplevel_icon_v1 */ +static inline void +xdg_toplevel_icon_v1_set_user_data(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_icon_v1, user_data); +} + +/** @ingroup iface_xdg_toplevel_icon_v1 */ +static inline void * +xdg_toplevel_icon_v1_get_user_data(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1) +{ + return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_icon_v1); +} + +static inline uint32_t +xdg_toplevel_icon_v1_get_version(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1) +{ + return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1); +} + +/** + * @ingroup iface_xdg_toplevel_icon_v1 + * + * Destroys the 'xdg_toplevel_icon_v1' object. + * The icon must still remain set on every toplevel it was assigned to, + * until the toplevel icon is reset explicitly. + */ +static inline void +xdg_toplevel_icon_v1_destroy(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_v1, + XDG_TOPLEVEL_ICON_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1), WL_MARSHAL_FLAG_DESTROY); +} + +/** + * @ingroup iface_xdg_toplevel_icon_v1 + * + * This request assigns an icon name to this icon. + * Any previously set name is overridden. + * + * The compositor must resolve 'icon_name' according to the lookup rules + * described in the XDG icon theme specification[1] using the + * environment's current icon theme. + * + * If the compositor does not support icon names or cannot resolve + * 'icon_name' according to the XDG icon theme specification it must + * fall back to using pixel buffer data instead. + * + * If this request is made after the icon has been assigned to a toplevel + * via 'set_icon', a 'immutable' error must be raised. + * + * [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html + */ +static inline void +xdg_toplevel_icon_v1_set_name(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1, const char *icon_name) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_v1, + XDG_TOPLEVEL_ICON_V1_SET_NAME, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1), 0, icon_name); +} + +/** + * @ingroup iface_xdg_toplevel_icon_v1 + * + * This request adds pixel data supplied as wl_buffer to the icon. + * + * The client should add pixel data for all icon sizes and scales that + * it can provide, or which are explicitly requested by the compositor + * via 'icon_size' events on xdg_toplevel_icon_manager_v1. + * + * The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm + * and must be a square (width and height being equal). + * If any of these buffer requirements are not fulfilled, a 'invalid_buffer' + * error must be raised. + * + * If this icon instance already has a buffer of the same size and scale + * from a previous 'add_buffer' request, data from the last request + * overrides the preexisting pixel data. + * + * The wl_buffer must be kept alive for as long as the xdg_toplevel_icon + * it is associated with is not destroyed, otherwise a 'no_buffer' error + * is raised. The buffer contents must not be modified after it was + * assigned to the icon. As a result, the region of the wl_shm_pool's + * backing storage used for the wl_buffer must not be modified after this + * request is sent. The wl_buffer.release event is unused. + * + * If this request is made after the icon has been assigned to a toplevel + * via 'set_icon', a 'immutable' error must be raised. + */ +static inline void +xdg_toplevel_icon_v1_add_buffer(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1, struct wl_buffer *buffer, int32_t scale) +{ + wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_v1, + XDG_TOPLEVEL_ICON_V1_ADD_BUFFER, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1), 0, buffer, scale); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/linux/protocols/xml/cursor-shape-v1.xml b/src/linux/protocols/xml/cursor-shape-v1.xml new file mode 100644 index 0000000..64b2f9b --- /dev/null +++ b/src/linux/protocols/xml/cursor-shape-v1.xml @@ -0,0 +1,162 @@ + + + + Copyright 2018 The Chromium Authors + Copyright 2023 Simon Ser + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + + This global offers an alternative, optional way to set cursor images. This + new way uses enumerated cursors instead of a wl_surface like + wl_pointer.set_cursor does. + + Warning! The protocol described in this file is currently in the testing + phase. Backward compatible changes may be added together with the + corresponding interface version bump. Backward incompatible changes can + only be done by creating a new major version of the extension. + + + + + Destroy the cursor shape manager. + + + + + + Obtain a wp_cursor_shape_device_v1 for a wl_pointer object. + + When the pointer capability is removed from the wl_seat, the + wp_cursor_shape_device_v1 object becomes inert. + + + + + + + + Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object. + + When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1 + object becomes inert. + + + + + + + + + This interface allows clients to set the cursor shape. + + + + + This enum describes cursor shapes. + + The names are taken from the CSS W3C specification: + https://w3c.github.io/csswg-drafts/css-ui/#cursor + with a few additions. + + Note that there are some groups of cursor shapes that are related: + The first group is drag-and-drop cursors which are used to indicate + the selected action during dnd operations. The second group is resize + cursors which are used to indicate resizing and moving possibilities + on window borders. It is recommended that the shapes in these groups + should use visually compatible images and metaphors. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Destroy the cursor shape device. + + The device cursor shape remains unchanged. + + + + + + Sets the device cursor to the specified shape. The compositor will + change the cursor image based on the specified shape. + + The cursor actually changes only if the input device focus is one of + the requesting client's surfaces. If any, the previous cursor image + (surface or shape) is replaced. + + The "shape" argument must be a valid enum entry, otherwise the + invalid_shape protocol error is raised. + + This is similar to the wl_pointer.set_cursor and + zwp_tablet_tool_v2.set_cursor requests, but this request accepts a + shape instead of contents in the form of a surface. Clients can mix + set_cursor and set_shape requests. + + The serial parameter must match the latest wl_pointer.enter or + zwp_tablet_tool_v2.proximity_in serial number sent to the client. + Otherwise the request will be ignored. + + + + + + diff --git a/src/linux/protocols/xml/tablet-v2.xml b/src/linux/protocols/xml/tablet-v2.xml new file mode 100644 index 0000000..e255043 --- /dev/null +++ b/src/linux/protocols/xml/tablet-v2.xml @@ -0,0 +1,1297 @@ + + + + + Copyright 2014 © Stephen "Lyude" Chandler Paul + Copyright 2015-2024 © Red Hat, Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial + portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + This description provides a high-level overview of the interplay between + the interfaces defined this protocol. For details, see the protocol + specification. + + More than one tablet may exist, and device-specifics matter. Tablets are + not represented by a single virtual device like wl_pointer. A client + binds to the tablet manager object which is just a proxy object. From + that, the client requests wp_tablet_manager.get_tablet_seat(wl_seat) + and that returns the actual interface that has all the tablets. With + this indirection, we can avoid merging wp_tablet into the actual Wayland + protocol, a long-term benefit. + + The wp_tablet_seat sends a "tablet added" event for each tablet + connected. That event is followed by descriptive events about the + hardware; currently that includes events for name, vid/pid and + a wp_tablet.path event that describes a local path. This path can be + used to uniquely identify a tablet or get more information through + libwacom. Emulated or nested tablets can skip any of those, e.g. a + virtual tablet may not have a vid/pid. The sequence of descriptive + events is terminated by a wp_tablet.done event to signal that a client + may now finalize any initialization for that tablet. + + Events from tablets require a tool in proximity. Tools are also managed + by the tablet seat; a "tool added" event is sent whenever a tool is new + to the compositor. That event is followed by a number of descriptive + events about the hardware; currently that includes capabilities, + hardware id and serial number, and tool type. Similar to the tablet + interface, a wp_tablet_tool.done event is sent to terminate that initial + sequence. + + Any event from a tool happens on the wp_tablet_tool interface. When the + tool gets into proximity of the tablet, a proximity_in event is sent on + the wp_tablet_tool interface, listing the tablet and the surface. That + event is followed by a motion event with the coordinates. After that, + it's the usual motion, axis, button, etc. events. The protocol's + serialisation means events are grouped by wp_tablet_tool.frame events. + + Two special events (that don't exist in X) are down and up. They signal + "tip touching the surface". For tablets without real proximity + detection, the sequence is: proximity_in, motion, down, frame. + + When the tool leaves proximity, a proximity_out event is sent. If any + button is still down, a button release event is sent before this + proximity event. These button events are sent in the same frame as the + proximity event to signal to the client that the buttons were held when + the tool left proximity. + + If the tool moves out of the surface but stays in proximity (i.e. + between windows), compositor-specific grab policies apply. This usually + means that the proximity-out is delayed until all buttons are released. + + Moving a tool physically from one tablet to the other has no real effect + on the protocol, since we already have the tool object from the "tool + added" event. All the information is already there and the proximity + events on both tablets are all a client needs to reconstruct what + happened. + + Some extra axes are normalized, i.e. the client knows the range as + specified in the protocol (e.g. [0, 65535]), the granularity however is + unknown. The current normalized axes are pressure, distance, and slider. + + Other extra axes are in physical units as specified in the protocol. + The current extra axes with physical units are tilt, rotation and + wheel rotation. + + Since tablets work independently of the pointer controlled by the mouse, + the focus handling is independent too and controlled by proximity. + The wp_tablet_tool.set_cursor request sets a tool-specific cursor. + This cursor surface may be the same as the mouse cursor, and it may be + the same across tools but it is possible to be more fine-grained. For + example, a client may set different cursors for the pen and eraser. + + Tools are generally independent of tablets and it is + compositor-specific policy when a tool can be removed. Common approaches + will likely include some form of removing a tool when all tablets the + tool was used on are removed. + + + + + An object that provides access to the graphics tablets available on this + system. All tablets are associated with a seat, to get access to the + actual tablets, use wp_tablet_manager.get_tablet_seat. + + + + + Get the wp_tablet_seat object for the given seat. This object + provides access to all graphics tablets in this seat. + + + + + + + + Destroy the wp_tablet_manager object. Objects created from this + object are unaffected and should be destroyed separately. + + + + + + + An object that provides access to the graphics tablets available on this + seat. After binding to this interface, the compositor sends a set of + wp_tablet_seat.tablet_added and wp_tablet_seat.tool_added events. + + + + + Destroy the wp_tablet_seat object. Objects created from this + object are unaffected and should be destroyed separately. + + + + + + This event is sent whenever a new tablet becomes available on this + seat. This event only provides the object id of the tablet, any + static information about the tablet (device name, vid/pid, etc.) is + sent through the wp_tablet interface. + + + + + + + This event is sent whenever a tool that has not previously been used + with a tablet comes into use. This event only provides the object id + of the tool; any static information about the tool (capabilities, + type, etc.) is sent through the wp_tablet_tool interface. + + + + + + + This event is sent whenever a new pad is known to the system. Typically, + pads are physically attached to tablets and a pad_added event is + sent immediately after the wp_tablet_seat.tablet_added. + However, some standalone pad devices logically attach to tablets at + runtime, and the client must wait for wp_tablet_pad.enter to know + the tablet a pad is attached to. + + This event only provides the object id of the pad. All further + features (buttons, strips, rings) are sent through the wp_tablet_pad + interface. + + + + + + + + An object that represents a physical tool that has been, or is + currently in use with a tablet in this seat. Each wp_tablet_tool + object stays valid until the client destroys it; the compositor + reuses the wp_tablet_tool object to indicate that the object's + respective physical tool has come into proximity of a tablet again. + + A wp_tablet_tool object's relation to a physical tool depends on the + tablet's ability to report serial numbers. If the tablet supports + this capability, then the object represents a specific physical tool + and can be identified even when used on multiple tablets. + + A tablet tool has a number of static characteristics, e.g. tool type, + hardware_serial and capabilities. These capabilities are sent in an + event sequence after the wp_tablet_seat.tool_added event before any + actual events from this tool. This initial event sequence is + terminated by a wp_tablet_tool.done event. + + Tablet tool events are grouped by wp_tablet_tool.frame events. + Any events received before a wp_tablet_tool.frame event should be + considered part of the same hardware state change. + + + + + Sets the surface of the cursor used for this tool on the given + tablet. This request only takes effect if the tool is in proximity + of one of the requesting client's surfaces or the surface parameter + is the current pointer surface. If there was a previous surface set + with this request it is replaced. If surface is NULL, the cursor + image is hidden. + + The parameters hotspot_x and hotspot_y define the position of the + pointer surface relative to the pointer location. Its top-left corner + is always at (x, y) - (hotspot_x, hotspot_y), where (x, y) are the + coordinates of the pointer location, in surface-local coordinates. + + On surface.attach requests to the pointer surface, hotspot_x and + hotspot_y are decremented by the x and y parameters passed to the + request. Attach must be confirmed by wl_surface.commit as usual. + + The hotspot can also be updated by passing the currently set pointer + surface to this request with new values for hotspot_x and hotspot_y. + + The current and pending input regions of the wl_surface are cleared, + and wl_surface.set_input_region is ignored until the wl_surface is no + longer used as the cursor. When the use as a cursor ends, the current + and pending input regions become undefined, and the wl_surface is + unmapped. + + This request gives the surface the role of a wp_tablet_tool cursor. A + surface may only ever be used as the cursor surface for one + wp_tablet_tool. If the surface already has another role or has + previously been used as cursor surface for a different tool, a + protocol error is raised. + + + + + + + + + + This destroys the client's resource for this tool object. + + + + + + Describes the physical type of a tool. The physical type of a tool + generally defines its base usage. + + The mouse tool represents a mouse-shaped tool that is not a relative + device but bound to the tablet's surface, providing absolute + coordinates. + + The lens tool is a mouse-shaped tool with an attached lens to + provide precision focus. + + + + + + + + + + + + + + The tool type is the high-level type of the tool and usually decides + the interaction expected from this tool. + + This event is sent in the initial burst of events before the + wp_tablet_tool.done event. + + + + + + + If the physical tool can be identified by a unique 64-bit serial + number, this event notifies the client of this serial number. + + If multiple tablets are available in the same seat and the tool is + uniquely identifiable by the serial number, that tool may move + between tablets. + + Otherwise, if the tool has no serial number and this event is + missing, the tool is tied to the tablet it first comes into + proximity with. Even if the physical tool is used on multiple + tablets, separate wp_tablet_tool objects will be created, one per + tablet. + + This event is sent in the initial burst of events before the + wp_tablet_tool.done event. + + + + + + + + This event notifies the client of a hardware id available on this tool. + + The hardware id is a device-specific 64-bit id that provides extra + information about the tool in use, beyond the wl_tool.type + enumeration. The format of the id is specific to tablets made by + Wacom Inc. For example, the hardware id of a Wacom Grip + Pen (a stylus) is 0x802. + + This event is sent in the initial burst of events before the + wp_tablet_tool.done event. + + + + + + + + Describes extra capabilities on a tablet. + + Any tool must provide x and y values, extra axes are + device-specific. + + + + + + + + + + + + This event notifies the client of any capabilities of this tool, + beyond the main set of x/y axes and tip up/down detection. + + One event is sent for each extra capability available on this tool. + + This event is sent in the initial burst of events before the + wp_tablet_tool.done event. + + + + + + + This event signals the end of the initial burst of descriptive + events. A client may consider the static description of the tool to + be complete and finalize initialization of the tool. + + + + + + This event is sent when the tool is removed from the system and will + send no further events. Should the physical tool come back into + proximity later, a new wp_tablet_tool object will be created. + + It is compositor-dependent when a tool is removed. A compositor may + remove a tool on proximity out, tablet removal or any other reason. + A compositor may also keep a tool alive until shutdown. + + If the tool is currently in proximity, a proximity_out event will be + sent before the removed event. See wp_tablet_tool.proximity_out for + the handling of any buttons logically down. + + When this event is received, the client must wp_tablet_tool.destroy + the object. + + + + + + Notification that this tool is focused on a certain surface. + + This event can be received when the tool has moved from one surface to + another, or when the tool has come back into proximity above the + surface. + + If any button is logically down when the tool comes into proximity, + the respective button event is sent after the proximity_in event but + within the same frame as the proximity_in event. + + + + + + + + + Notification that this tool has either left proximity, or is no + longer focused on a certain surface. + + When the tablet tool leaves proximity of the tablet, button release + events are sent for each button that was held down at the time of + leaving proximity. These events are sent before the proximity_out + event but within the same wp_tablet.frame. + + If the tool stays within proximity of the tablet, but the focus + changes from one surface to another, a button release event may not + be sent until the button is actually released or the tool leaves the + proximity of the tablet. + + + + + + Sent whenever the tablet tool comes in contact with the surface of the + tablet. + + If the tool is already in contact with the tablet when entering the + input region, the client owning said region will receive a + wp_tablet.proximity_in event, followed by a wp_tablet.down + event and a wp_tablet.frame event. + + Note that this event describes logical contact, not physical + contact. On some devices, a compositor may not consider a tool in + logical contact until a minimum physical pressure threshold is + exceeded. + + + + + + + Sent whenever the tablet tool stops making contact with the surface of + the tablet, or when the tablet tool moves out of the input region + and the compositor grab (if any) is dismissed. + + If the tablet tool moves out of the input region while in contact + with the surface of the tablet and the compositor does not have an + ongoing grab on the surface, the client owning said region will + receive a wp_tablet.up event, followed by a wp_tablet.proximity_out + event and a wp_tablet.frame event. If the compositor has an ongoing + grab on this device, this event sequence is sent whenever the grab + is dismissed in the future. + + Note that this event describes logical contact, not physical + contact. On some devices, a compositor may not consider a tool out + of logical contact until physical pressure falls below a specific + threshold. + + + + + + Sent whenever a tablet tool moves. + + + + + + + + Sent whenever the pressure axis on a tool changes. The value of this + event is normalized to a value between 0 and 65535. + + Note that pressure may be nonzero even when a tool is not in logical + contact. See the down and up events for more details. + + + + + + + Sent whenever the distance axis on a tool changes. The value of this + event is normalized to a value between 0 and 65535. + + Note that distance may be nonzero even when a tool is not in logical + contact. See the down and up events for more details. + + + + + + + Sent whenever one or both of the tilt axes on a tool change. Each tilt + value is in degrees, relative to the z-axis of the tablet. + The angle is positive when the top of a tool tilts along the + positive x or y axis. + + + + + + + + Sent whenever the z-rotation axis on the tool changes. The + rotation value is in degrees clockwise from the tool's + logical neutral position. + + + + + + + Sent whenever the slider position on the tool changes. The + value is normalized between -65535 and 65535, with 0 as the logical + neutral position of the slider. + + The slider is available on e.g. the Wacom Airbrush tool. + + + + + + + Sent whenever the wheel on the tool emits an event. This event + contains two values for the same axis change. The degrees value is + in the same orientation as the wl_pointer.vertical_scroll axis. The + clicks value is in discrete logical clicks of the mouse wheel. This + value may be zero if the movement of the wheel was less + than one logical click. + + Clients should choose either value and avoid mixing degrees and + clicks. The compositor may accumulate values smaller than a logical + click and emulate click events when a certain threshold is met. + Thus, wl_tablet_tool.wheel events with non-zero clicks values may + have different degrees values. + + + + + + + + Describes the physical state of a button that produced the button event. + + + + + + + + Sent whenever a button on the tool is pressed or released. + + If a button is held down when the tool moves in or out of proximity, + button events are generated by the compositor. See + wp_tablet_tool.proximity_in and wp_tablet_tool.proximity_out for + details. + + + + + + + + + Marks the end of a series of axis and/or button updates from the + tablet. The Wayland protocol requires axis updates to be sent + sequentially, however all events within a frame should be considered + one hardware event. + + + + + + + + + + + + The wp_tablet interface represents one graphics tablet device. The + tablet interface itself does not generate events; all events are + generated by wp_tablet_tool objects when in proximity above a tablet. + + A tablet has a number of static characteristics, e.g. device name and + pid/vid. These capabilities are sent in an event sequence after the + wp_tablet_seat.tablet_added event. This initial event sequence is + terminated by a wp_tablet.done event. + + + + + This destroys the client's resource for this tablet object. + + + + + + A descriptive name for the tablet device. + + If the device has no descriptive name, this event is not sent. + + This event is sent in the initial burst of events before the + wp_tablet.done event. + + + + + + + The vendor and product IDs for the tablet device. + + The interpretation of the id depends on the wp_tablet.bustype. + Prior to version v2 of this protocol, the id was implied to be a USB + vendor and product ID. If no wp_tablet.bustype is sent, the ID + is to be interpreted as USB vendor and product ID. + + If the device has no vendor/product ID, this event is not sent. + This can happen for virtual devices or non-USB devices, for instance. + + This event is sent in the initial burst of events before the + wp_tablet.done event. + + + + + + + + A system-specific device path that indicates which device is behind + this wp_tablet. This information may be used to gather additional + information about the device, e.g. through libwacom. + + A device may have more than one device path. If so, multiple + wp_tablet.path events are sent. A device may be emulated and not + have a device path, and in that case this event will not be sent. + + The format of the path is unspecified, it may be a device node, a + sysfs path, or some other identifier. It is up to the client to + identify the string provided. + + This event is sent in the initial burst of events before the + wp_tablet.done event. + + + + + + + This event is sent immediately to signal the end of the initial + burst of descriptive events. A client may consider the static + description of the tablet to be complete and finalize initialization + of the tablet. + + + + + + Sent when the tablet has been removed from the system. When a tablet + is removed, some tools may be removed. + + When this event is received, the client must wp_tablet.destroy + the object. + + + + + + + + Describes the bus types this tablet is connected to. + + + + + + + + + + + The bustype argument is one of the BUS_ defines in the Linux kernel's + linux/input.h + + If the device has no known bustype or the bustype cannot be + queried, this event is not sent. + + This event is sent in the initial burst of events before the + wp_tablet.done event. + + + + + + + + A circular interaction area, such as the touch ring on the Wacom Intuos + Pro series tablets. + + Events on a ring are logically grouped by the wl_tablet_pad_ring.frame + event. + + + + + Request that the compositor use the provided feedback string + associated with this ring. This request should be issued immediately + after a wp_tablet_pad_group.mode_switch event from the corresponding + group is received, or whenever the ring is mapped to a different + action. See wp_tablet_pad_group.mode_switch for more details. + + Clients are encouraged to provide context-aware descriptions for + the actions associated with the ring; compositors may use this + information to offer visual feedback about the button layout + (eg. on-screen displays). + + The provided string 'description' is a UTF-8 encoded string to be + associated with this ring, and is considered user-visible; general + internationalization rules apply. + + The serial argument will be that of the last + wp_tablet_pad_group.mode_switch event received for the group of this + ring. Requests providing other serials than the most recent one will be + ignored. + + + + + + + + This destroys the client's resource for this ring object. + + + + + + Describes the source types for ring events. This indicates to the + client how a ring event was physically generated; a client may + adjust the user interface accordingly. For example, events + from a "finger" source may trigger kinetic scrolling. + + + + + + + Source information for ring events. + + This event does not occur on its own. It is sent before a + wp_tablet_pad_ring.frame event and carries the source information + for all events within that frame. + + The source specifies how this event was generated. If the source is + wp_tablet_pad_ring.source.finger, a wp_tablet_pad_ring.stop event + will be sent when the user lifts the finger off the device. + + This event is optional. If the source is unknown for an interaction, + no event is sent. + + + + + + + Sent whenever the angle on a ring changes. + + The angle is provided in degrees clockwise from the logical + north of the ring in the pad's current rotation. + + + + + + + Stop notification for ring events. + + For some wp_tablet_pad_ring.source types, a wp_tablet_pad_ring.stop + event is sent to notify a client that the interaction with the ring + has terminated. This enables the client to implement kinetic scrolling. + See the wp_tablet_pad_ring.source documentation for information on + when this event may be generated. + + Any wp_tablet_pad_ring.angle events with the same source after this + event should be considered as the start of a new interaction. + + + + + + Indicates the end of a set of ring events that logically belong + together. A client is expected to accumulate the data in all events + within the frame before proceeding. + + All wp_tablet_pad_ring events before a wp_tablet_pad_ring.frame event belong + logically together. For example, on termination of a finger interaction + on a ring the compositor will send a wp_tablet_pad_ring.source event, + a wp_tablet_pad_ring.stop event and a wp_tablet_pad_ring.frame event. + + A wp_tablet_pad_ring.frame event is sent for every logical event + group, even if the group only contains a single wp_tablet_pad_ring + event. Specifically, a client may get a sequence: angle, frame, + angle, frame, etc. + + + + + + + + A linear interaction area, such as the strips found in Wacom Cintiq + models. + + Events on a strip are logically grouped by the wl_tablet_pad_strip.frame + event. + + + + + Requests the compositor to use the provided feedback string + associated with this strip. This request should be issued immediately + after a wp_tablet_pad_group.mode_switch event from the corresponding + group is received, or whenever the strip is mapped to a different + action. See wp_tablet_pad_group.mode_switch for more details. + + Clients are encouraged to provide context-aware descriptions for + the actions associated with the strip, and compositors may use this + information to offer visual feedback about the button layout + (eg. on-screen displays). + + The provided string 'description' is a UTF-8 encoded string to be + associated with this ring, and is considered user-visible; general + internationalization rules apply. + + The serial argument will be that of the last + wp_tablet_pad_group.mode_switch event received for the group of this + strip. Requests providing other serials than the most recent one will be + ignored. + + + + + + + + This destroys the client's resource for this strip object. + + + + + + Describes the source types for strip events. This indicates to the + client how a strip event was physically generated; a client may + adjust the user interface accordingly. For example, events + from a "finger" source may trigger kinetic scrolling. + + + + + + + Source information for strip events. + + This event does not occur on its own. It is sent before a + wp_tablet_pad_strip.frame event and carries the source information + for all events within that frame. + + The source specifies how this event was generated. If the source is + wp_tablet_pad_strip.source.finger, a wp_tablet_pad_strip.stop event + will be sent when the user lifts their finger off the device. + + This event is optional. If the source is unknown for an interaction, + no event is sent. + + + + + + + Sent whenever the position on a strip changes. + + The position is normalized to a range of [0, 65535], the 0-value + represents the top-most and/or left-most position of the strip in + the pad's current rotation. + + + + + + + Stop notification for strip events. + + For some wp_tablet_pad_strip.source types, a wp_tablet_pad_strip.stop + event is sent to notify a client that the interaction with the strip + has terminated. This enables the client to implement kinetic + scrolling. See the wp_tablet_pad_strip.source documentation for + information on when this event may be generated. + + Any wp_tablet_pad_strip.position events with the same source after this + event should be considered as the start of a new interaction. + + + + + + Indicates the end of a set of events that represent one logical + hardware strip event. A client is expected to accumulate the data + in all events within the frame before proceeding. + + All wp_tablet_pad_strip events before a wp_tablet_pad_strip.frame event belong + logically together. For example, on termination of a finger interaction + on a strip the compositor will send a wp_tablet_pad_strip.source event, + a wp_tablet_pad_strip.stop event and a wp_tablet_pad_strip.frame + event. + + A wp_tablet_pad_strip.frame event is sent for every logical event + group, even if the group only contains a single wp_tablet_pad_strip + event. Specifically, a client may get a sequence: position, frame, + position, frame, etc. + + + + + + + + A pad group describes a distinct (sub)set of buttons, rings and strips + present in the tablet. The criteria of this grouping is usually positional, + eg. if a tablet has buttons on the left and right side, 2 groups will be + presented. The physical arrangement of groups is undisclosed and may + change on the fly. + + Pad groups will announce their features during pad initialization. Between + the corresponding wp_tablet_pad.group event and wp_tablet_pad_group.done, the + pad group will announce the buttons, rings and strips contained in it, + plus the number of supported modes. + + Modes are a mechanism to allow multiple groups of actions for every element + in the pad group. The number of groups and available modes in each is + persistent across device plugs. The current mode is user-switchable, it + will be announced through the wp_tablet_pad_group.mode_switch event both + whenever it is switched, and after wp_tablet_pad.enter. + + The current mode logically applies to all elements in the pad group, + although it is at clients' discretion whether to actually perform different + actions, and/or issue the respective .set_feedback requests to notify the + compositor. See the wp_tablet_pad_group.mode_switch event for more details. + + + + + Destroy the wp_tablet_pad_group object. Objects created from this object + are unaffected and should be destroyed separately. + + + + + + Sent on wp_tablet_pad_group initialization to announce the available + buttons in the group. Button indices start at 0, a button may only be + in one group at a time. + + This event is first sent in the initial burst of events before the + wp_tablet_pad_group.done event. + + Some buttons are reserved by the compositor. These buttons may not be + assigned to any wp_tablet_pad_group. Compositors may broadcast this + event in the case of changes to the mapping of these reserved buttons. + If the compositor happens to reserve all buttons in a group, this event + will be sent with an empty array. + + + + + + + Sent on wp_tablet_pad_group initialization to announce available rings. + One event is sent for each ring available on this pad group. + + This event is sent in the initial burst of events before the + wp_tablet_pad_group.done event. + + + + + + + Sent on wp_tablet_pad initialization to announce available strips. + One event is sent for each strip available on this pad group. + + This event is sent in the initial burst of events before the + wp_tablet_pad_group.done event. + + + + + + + Sent on wp_tablet_pad_group initialization to announce that the pad + group may switch between modes. A client may use a mode to store a + specific configuration for buttons, rings and strips and use the + wl_tablet_pad_group.mode_switch event to toggle between these + configurations. Mode indices start at 0. + + Switching modes is compositor-dependent. See the + wp_tablet_pad_group.mode_switch event for more details. + + This event is sent in the initial burst of events before the + wp_tablet_pad_group.done event. This event is only sent when more than + more than one mode is available. + + + + + + + This event is sent immediately to signal the end of the initial + burst of descriptive events. A client may consider the static + description of the tablet to be complete and finalize initialization + of the tablet group. + + + + + + Notification that the mode was switched. + + A mode applies to all buttons, rings, strips and dials in a group + simultaneously, but a client is not required to assign different actions + for each mode. For example, a client may have mode-specific button + mappings but map the ring to vertical scrolling in all modes. Mode + indices start at 0. + + Switching modes is compositor-dependent. The compositor may provide + visual cues to the user about the mode, e.g. by toggling LEDs on + the tablet device. Mode-switching may be software-controlled or + controlled by one or more physical buttons. For example, on a Wacom + Intuos Pro, the button inside the ring may be assigned to switch + between modes. + + The compositor will also send this event after wp_tablet_pad.enter on + each group in order to notify of the current mode. Groups that only + feature one mode will use mode=0 when emitting this event. + + If a button action in the new mode differs from the action in the + previous mode, the client should immediately issue a + wp_tablet_pad.set_feedback request for each changed button. + + If a ring, strip or dial action in the new mode differs from the action + in the previous mode, the client should immediately issue a + wp_tablet_ring.set_feedback, wp_tablet_strip.set_feedback or + wp_tablet_dial.set_feedback request for each changed ring, strip or dial. + + + + + + + + + + + Sent on wp_tablet_pad initialization to announce available dials. + One event is sent for each dial available on this pad group. + + This event is sent in the initial burst of events before the + wp_tablet_pad_group.done event. + + + + + + + + A pad device is a set of buttons, rings, strips and dials + usually physically present on the tablet device itself. Some + exceptions exist where the pad device is physically detached, e.g. the + Wacom ExpressKey Remote. + + Pad devices have no axes that control the cursor and are generally + auxiliary devices to the tool devices used on the tablet surface. + + A pad device has a number of static characteristics, e.g. the number + of rings. These capabilities are sent in an event sequence after the + wp_tablet_seat.pad_added event before any actual events from this pad. + This initial event sequence is terminated by a wp_tablet_pad.done + event. + + All pad features (buttons, rings, strips and dials) are logically divided into + groups and all pads have at least one group. The available groups are + notified through the wp_tablet_pad.group event; the compositor will + emit one event per group before emitting wp_tablet_pad.done. + + Groups may have multiple modes. Modes allow clients to map multiple + actions to a single pad feature. Only one mode can be active per group, + although different groups may have different active modes. + + + + + Requests the compositor to use the provided feedback string + associated with this button. This request should be issued immediately + after a wp_tablet_pad_group.mode_switch event from the corresponding + group is received, or whenever a button is mapped to a different + action. See wp_tablet_pad_group.mode_switch for more details. + + Clients are encouraged to provide context-aware descriptions for + the actions associated with each button, and compositors may use + this information to offer visual feedback on the button layout + (e.g. on-screen displays). + + Button indices start at 0. Setting the feedback string on a button + that is reserved by the compositor (i.e. not belonging to any + wp_tablet_pad_group) does not generate an error but the compositor + is free to ignore the request. + + The provided string 'description' is a UTF-8 encoded string to be + associated with this ring, and is considered user-visible; general + internationalization rules apply. + + The serial argument will be that of the last + wp_tablet_pad_group.mode_switch event received for the group of this + button. Requests providing other serials than the most recent one will + be ignored. + + + + + + + + + Destroy the wp_tablet_pad object. Objects created from this object + are unaffected and should be destroyed separately. + + + + + + Sent on wp_tablet_pad initialization to announce available groups. + One event is sent for each pad group available. + + This event is sent in the initial burst of events before the + wp_tablet_pad.done event. At least one group will be announced. + + + + + + + A system-specific device path that indicates which device is behind + this wp_tablet_pad. This information may be used to gather additional + information about the device, e.g. through libwacom. + + The format of the path is unspecified, it may be a device node, a + sysfs path, or some other identifier. It is up to the client to + identify the string provided. + + This event is sent in the initial burst of events before the + wp_tablet_pad.done event. + + + + + + + Sent on wp_tablet_pad initialization to announce the available + buttons. + + This event is sent in the initial burst of events before the + wp_tablet_pad.done event. This event is only sent when at least one + button is available. + + + + + + + This event signals the end of the initial burst of descriptive + events. A client may consider the static description of the pad to + be complete and finalize initialization of the pad. + + + + + + Describes the physical state of a button that caused the button + event. + + + + + + + + Sent whenever the physical state of a button changes. + + + + + + + + + Notification that this pad is focused on the specified surface. + + + + + + + + + Notification that this pad is no longer focused on the specified + surface. + + + + + + + + Sent when the pad has been removed from the system. When a tablet + is removed its pad(s) will be removed too. + + When this event is received, the client must destroy all rings, strips + and groups that were offered by this pad, and issue wp_tablet_pad.destroy + the pad itself. + + + + + + + A rotary control, e.g. a dial or a wheel. + + Events on a dial are logically grouped by the wl_tablet_pad_dial.frame + event. + + + + + Requests the compositor to use the provided feedback string + associated with this dial. This request should be issued immediately + after a wp_tablet_pad_group.mode_switch event from the corresponding + group is received, or whenever the dial is mapped to a different + action. See wp_tablet_pad_group.mode_switch for more details. + + Clients are encouraged to provide context-aware descriptions for + the actions associated with the dial, and compositors may use this + information to offer visual feedback about the button layout + (eg. on-screen displays). + + The provided string 'description' is a UTF-8 encoded string to be + associated with this ring, and is considered user-visible; general + internationalization rules apply. + + The serial argument will be that of the last + wp_tablet_pad_group.mode_switch event received for the group of this + dial. Requests providing other serials than the most recent one will be + ignored. + + + + + + + + This destroys the client's resource for this dial object. + + + + + + Sent whenever the position on a dial changes. + + This event carries the wheel delta as multiples or fractions + of 120 with each multiple of 120 representing one logical wheel detent. + For example, an axis_value120 of 30 is one quarter of + a logical wheel step in the positive direction, a value120 of + -240 are two logical wheel steps in the negative direction within the + same hardware event. See the wl_pointer.axis_value120 for more details. + + The value120 must not be zero. + + + + + + + Indicates the end of a set of events that represent one logical + hardware dial event. A client is expected to accumulate the data + in all events within the frame before proceeding. + + All wp_tablet_pad_dial events before a wp_tablet_pad_dial.frame event belong + logically together. + + A wp_tablet_pad_dial.frame event is sent for every logical event + group, even if the group only contains a single wp_tablet_pad_dial + event. Specifically, a client may get a sequence: delta, frame, + delta, frame, etc. + + + + + diff --git a/src/linux/protocols/xml/text-input-unstable-v3.xml b/src/linux/protocols/xml/text-input-unstable-v3.xml new file mode 100644 index 0000000..c1c1b22 --- /dev/null +++ b/src/linux/protocols/xml/text-input-unstable-v3.xml @@ -0,0 +1,456 @@ + + + + + Copyright © 2012, 2013 Intel Corporation + Copyright © 2015, 2016 Jan Arne Petersen + Copyright © 2017, 2018 Red Hat, Inc. + Copyright © 2018 Purism SPC + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of + the copyright holders not be used in advertising or publicity + pertaining to distribution of the software without specific, + written prior permission. The copyright holders make no + representations about the suitability of this software for any + purpose. It is provided "as is" without express or implied + warranty. + + THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + + + + This protocol allows compositors to act as input methods and to send text + to applications. A text input object is used to manage state of what are + typically text entry fields in the application. + + This document adheres to the RFC 2119 when using words like "must", + "should", "may", etc. + + Warning! The protocol described in this file is experimental and + backward incompatible changes may be made. Backward compatible changes + may be added together with the corresponding interface version bump. + Backward incompatible changes are done by bumping the version number in + the protocol and interface names and resetting the interface version. + Once the protocol is to be declared stable, the 'z' prefix and the + version number in the protocol and interface names are removed and the + interface version number is reset. + + + + + The zwp_text_input_v3 interface represents text input and input methods + associated with a seat. It provides enter/leave events to follow the + text input focus for a seat. + + Requests are used to enable/disable the text-input object and set + state information like surrounding and selected text or the content type. + The information about the entered text is sent to the text-input object + via the preedit_string and commit_string events. + + Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices + must not point to middle bytes inside a code point: they must either + point to the first byte of a code point or to the end of the buffer. + Lengths must be measured between two valid indices. + + Focus moving throughout surfaces will result in the emission of + zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused + surface must commit zwp_text_input_v3.enable and + zwp_text_input_v3.disable requests as the keyboard focus moves across + editable and non-editable elements of the UI. Those two requests are not + expected to be paired with each other, the compositor must be able to + handle consecutive series of the same request. + + State is sent by the state requests (set_surrounding_text, + set_content_type and set_cursor_rectangle) and a commit request. After an + enter event or disable request all state information is invalidated and + needs to be resent by the client. + + + + + Destroy the wp_text_input object. Also disables all surfaces enabled + through this wp_text_input object. + + + + + + Requests text input on the surface previously obtained from the enter + event. + + This request must be issued every time the focused text input changes + to a new one, including within the current surface. Use + zwp_text_input_v3.disable when there is no longer any input focus on + the current surface. + + Clients must not enable more than one text input on the single seat + and should disable the current text input before enabling the new one. + Requests to enable a text input when another text input is enabled + on the same seat must be ignored by compositor. + + This request resets all state associated with previous enable, disable, + set_surrounding_text, set_text_change_cause, set_content_type, and + set_cursor_rectangle requests, as well as the state associated with + preedit_string, commit_string, and delete_surrounding_text events. + + The set_surrounding_text, set_content_type and set_cursor_rectangle + requests must follow if the text input supports the necessary + functionality. + + State set with this request is double-buffered. It will get applied on + the next zwp_text_input_v3.commit request, and stay valid until the + next committed enable or disable request. + + The changes must be applied by the compositor after issuing a + zwp_text_input_v3.commit request. + + + + + + Explicitly disable text input on the current surface (typically when + there is no focus on any text entry inside the surface). + + State set with this request is double-buffered. It will get applied on + the next zwp_text_input_v3.commit request. + + + + + + Sets the surrounding plain text around the input, excluding the preedit + text. + + The client should notify the compositor of any changes in any of the + values carried with this request, including changes caused by handling + incoming text-input events as well as changes caused by other + mechanisms like keyboard typing. + + If the client is unaware of the text around the cursor, it should not + issue this request, to signify lack of support to the compositor. + + Text is UTF-8 encoded, and should include the cursor position, the + complete selection and additional characters before and after them. + There is a maximum length of wayland messages, so text can not be + longer than 4000 bytes. + + Cursor is the byte offset of the cursor within text buffer. + + Anchor is the byte offset of the selection anchor within text buffer. + If there is no selected text, anchor is the same as cursor. + + If any preedit text is present, it is replaced with a cursor for the + purpose of this event. + + Values set with this request are double-buffered. They will get applied + on the next zwp_text_input_v3.commit request, and stay valid until the + next committed enable or disable request. + + The initial state for affected fields is empty, meaning that the text + input does not support sending surrounding text. If the empty values + get applied, subsequent attempts to change them may have no effect. + + + + + + + + + Reason for the change of surrounding text or cursor posision. + + + + + + + + Tells the compositor why the text surrounding the cursor changed. + + Whenever the client detects an external change in text, cursor, or + anchor posision, it must issue this request to the compositor. This + request is intended to give the input method a chance to update the + preedit text in an appropriate way, e.g. by removing it when the user + starts typing with a keyboard. + + cause describes the source of the change. + + The value set with this request is double-buffered. It must be applied + and reset to initial at the next zwp_text_input_v3.commit request. + + The initial value of cause is input_method. + + + + + + + Content hint is a bitmask to allow to modify the behavior of the text + input. + + + + + + + + + + + + + + + + + The content purpose allows to specify the primary purpose of a text + input. + + This allows an input method to show special purpose input panels with + extra characters or to disallow some characters. + + + + + + + + + + + + + + + + + + + + Sets the content purpose and content hint. While the purpose is the + basic purpose of an input field, the hint flags allow to modify some of + the behavior. + + Values set with this request are double-buffered. They will get applied + on the next zwp_text_input_v3.commit request. + Subsequent attempts to update them may have no effect. The values + remain valid until the next committed enable or disable request. + + The initial value for hint is none, and the initial value for purpose + is normal. + + + + + + + + Marks an area around the cursor as a x, y, width, height rectangle in + surface local coordinates. + + Allows the compositor to put a window with word suggestions near the + cursor, without obstructing the text being input. + + If the client is unaware of the position of edited text, it should not + issue this request, to signify lack of support to the compositor. + + Values set with this request are double-buffered. They will get applied + on the next zwp_text_input_v3.commit request, and stay valid until the + next committed enable or disable request. + + The initial values describing a cursor rectangle are empty. That means + the text input does not support describing the cursor area. If the + empty values get applied, subsequent attempts to change them may have + no effect. + + + + + + + + + + Atomically applies state changes recently sent to the compositor. + + The commit request establishes and updates the state of the client, and + must be issued after any changes to apply them. + + Text input state (enabled status, content purpose, content hint, + surrounding text and change cause, cursor rectangle) is conceptually + double-buffered within the context of a text input, i.e. between a + committed enable request and the following committed enable or disable + request. + + Protocol requests modify the pending state, as opposed to the current + state in use by the input method. A commit request atomically applies + all pending state, replacing the current state. After commit, the new + pending state is as documented for each related request. + + Requests are applied in the order of arrival. + + Neither current nor pending state are modified unless noted otherwise. + + The compositor must count the number of commit requests coming from + each zwp_text_input_v3 object and use the count as the serial in done + events. + + + + + + Notification that this seat's text-input focus is on a certain surface. + + If client has created multiple text input objects, compositor must send + this event to all of them. + + When the seat has the keyboard capability the text-input focus follows + the keyboard focus. This event sets the current surface for the + text-input object. + + + + + + + Notification that this seat's text-input focus is no longer on a + certain surface. The client should reset any preedit string previously + set. + + The leave notification clears the current surface. It is sent before + the enter notification for the new focus. After leave event, compositor + must ignore requests from any text input instances until next enter + event. + + When the seat has the keyboard capability the text-input focus follows + the keyboard focus. + + + + + + + Notify when a new composing text (pre-edit) should be set at the + current cursor position. Any previously set composing text must be + removed. Any previously existing selected text must be removed. + + The argument text contains the pre-edit string buffer. + + The parameters cursor_begin and cursor_end are counted in bytes + relative to the beginning of the submitted text buffer. Cursor should + be hidden when both are equal to -1. + + They could be represented by the client as a line if both values are + the same, or as a text highlight otherwise. + + Values set with this event are double-buffered. They must be applied + and reset to initial on the next zwp_text_input_v3.done event. + + The initial value of text is an empty string, and cursor_begin, + cursor_end and cursor_hidden are all 0. + + + + + + + + + Notify when text should be inserted into the editor widget. The text to + commit could be either just a single character after a key press or the + result of some composing (pre-edit). + + Values set with this event are double-buffered. They must be applied + and reset to initial on the next zwp_text_input_v3.done event. + + The initial value of text is an empty string. + + + + + + + Notify when the text around the current cursor position should be + deleted. + + Before_length and after_length are the number of bytes before and after + the current cursor index (excluding the selection) to delete. + + If a preedit text is present, in effect before_length is counted from + the beginning of it, and after_length from its end (see done event + sequence). + + Values set with this event are double-buffered. They must be applied + and reset to initial on the next zwp_text_input_v3.done event. + + The initial values of both before_length and after_length are 0. + + + + + + + + Instruct the application to apply changes to state requested by the + preedit_string, commit_string and delete_surrounding_text events. The + state relating to these events is double-buffered, and each one + modifies the pending state. This event replaces the current state with + the pending state. + + The application must proceed by evaluating the changes in the following + order: + + 1. Replace existing preedit string with the cursor. + 2. Delete requested surrounding text. + 3. Insert commit string with the cursor at its end. + 4. Calculate surrounding text to send. + 5. Insert new preedit text in cursor position. + 6. Place cursor inside preedit text. + + The serial number reflects the last state of the zwp_text_input_v3 + object known to the compositor. The value of the serial argument must + be equal to the number of commit requests already issued on that object. + + When the client receives a done event with a serial different than the + number of past commit requests, it must proceed with evaluating and + applying the changes as normal, except it should not change the current + state of the zwp_text_input_v3 object. All pending state requests + (set_surrounding_text, set_content_type and set_cursor_rectangle) on + the zwp_text_input_v3 object should be sent and committed after + receiving a zwp_text_input_v3.done event with a matching serial. + + + + + + + + A factory for text-input objects. This object is a global singleton. + + + + + Destroy the wp_text_input_manager object. + + + + + + Creates a new text-input object for a given seat. + + + + + + diff --git a/src/linux/protocols/xml/xdg-activation-v1.xml b/src/linux/protocols/xml/xdg-activation-v1.xml new file mode 100644 index 0000000..9adcc27 --- /dev/null +++ b/src/linux/protocols/xml/xdg-activation-v1.xml @@ -0,0 +1,200 @@ + + + + + Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org> + Copyright © 2020 Carlos Garnacho <carlosg@gnome.org> + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + The way for a client to pass focus to another toplevel is as follows. + + The client that intends to activate another toplevel uses the + xdg_activation_v1.get_activation_token request to get an activation token. + This token is then forwarded to the client, which is supposed to activate + one of its surfaces, through a separate band of communication. + + One established way of doing this is through the XDG_ACTIVATION_TOKEN + environment variable of a newly launched child process. The child process + should unset the environment variable again right after reading it out in + order to avoid propagating it to other child processes. + + Another established way exists for Applications implementing the D-Bus + interface org.freedesktop.Application, which should get their token under + activation-token on their platform_data. + + In general activation tokens may be transferred across clients through + means not described in this protocol. + + The client to be activated will then pass the token + it received to the xdg_activation_v1.activate request. The compositor can + then use this token to decide how to react to the activation request. + + The token the activating client gets may be ineffective either already at + the time it receives it, for example if it was not focused, for focus + stealing prevention. The activating client will have no way to discover + the validity of the token, and may still forward it to the to be activated + client. + + The created activation token may optionally get information attached to it + that can be used by the compositor to identify the application that we + intend to activate. This can for example be used to display a visual hint + about what application is being started. + + Warning! The protocol described in this file is currently in the testing + phase. Backward compatible changes may be added together with the + corresponding interface version bump. Backward incompatible changes can + only be done by creating a new major version of the extension. + + + + + A global interface used for informing the compositor about applications + being activated or started, or for applications to request to be + activated. + + + + + Notify the compositor that the xdg_activation object will no longer be + used. + + The child objects created via this interface are unaffected and should + be destroyed separately. + + + + + + Creates an xdg_activation_token_v1 object that will provide + the initiating client with a unique token for this activation. This + token should be offered to the clients to be activated. + + + + + + + + Requests surface activation. It's up to the compositor to display + this information as desired, for example by placing the surface above + the rest. + + The compositor may know who requested this by checking the activation + token and might decide not to follow through with the activation if it's + considered unwanted. + + Compositors can ignore unknown activation tokens when an invalid + token is passed. + + + + + + + + + An object for setting up a token and receiving a token handle that can + be passed as an activation token to another client. + + The object is created using the xdg_activation_v1.get_activation_token + request. This object should then be populated with the app_id, surface + and serial information and committed. The compositor shall then issue a + done event with the token. In case the request's parameters are invalid, + the compositor will provide an invalid token. + + + + + + + + + Provides information about the seat and serial event that requested the + token. + + The serial can come from an input or focus event. For instance, if a + click triggers the launch of a third-party client, the launcher client + should send a set_serial request with the serial and seat from the + wl_pointer.button event. + + Some compositors might refuse to activate toplevels when the token + doesn't have a valid and recent enough event serial. + + Must be sent before commit. This information is optional. + + + + + + + + The requesting client can specify an app_id to associate the token + being created with it. + + Must be sent before commit. This information is optional. + + + + + + + This request sets the surface requesting the activation. Note, this is + different from the surface that will be activated. + + Some compositors might refuse to activate toplevels when the token + doesn't have a requesting surface. + + Must be sent before commit. This information is optional. + + + + + + + Requests an activation token based on the different parameters that + have been offered through set_serial, set_surface and set_app_id. + + + + + + The 'done' event contains the unique token of this activation request + and notifies that the provider is done. + + + + + + + Notify the compositor that the xdg_activation_token_v1 object will no + longer be used. The received token stays valid. + + + + diff --git a/src/linux/protocols/xml/xdg-foreign-unstable-v2.xml b/src/linux/protocols/xml/xdg-foreign-unstable-v2.xml new file mode 100644 index 0000000..cc3271d --- /dev/null +++ b/src/linux/protocols/xml/xdg-foreign-unstable-v2.xml @@ -0,0 +1,200 @@ + + + + + Copyright © 2015-2016 Red Hat Inc. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol specifies a way for making it possible to reference a surface + of a different client. With such a reference, a client can, by using the + interfaces provided by this protocol, manipulate the relationship between + its own surfaces and the surface of some other client. For example, stack + some of its own surface above the other clients surface. + + In order for a client A to get a reference of a surface of client B, client + B must first export its surface using xdg_exporter.export_toplevel. Upon + doing this, client B will receive a handle (a unique string) that it may + share with client A in some way (for example D-Bus). After client A has + received the handle from client B, it may use xdg_importer.import_toplevel + to create a reference to the surface client B just exported. See the + corresponding requests for details. + + A possible use case for this is out-of-process dialogs. For example when a + sandboxed client without file system access needs the user to select a file + on the file system, given sandbox environment support, it can export its + surface, passing the exported surface handle to an unsandboxed process that + can show a file browser dialog and stack it above the sandboxed client's + surface. + + Warning! The protocol described in this file is experimental and backward + incompatible changes may be made. Backward compatible changes may be added + together with the corresponding interface version bump. Backward + incompatible changes are done by bumping the version number in the protocol + and interface names and resetting the interface version. Once the protocol + is to be declared stable, the 'z' prefix and the version number in the + protocol and interface names are removed and the interface version number is + reset. + + + + + A global interface used for exporting surfaces that can later be imported + using xdg_importer. + + + + + Notify the compositor that the xdg_exporter object will no longer be + used. + + + + + + These errors can be emitted in response to invalid xdg_exporter + requests. + + + + + + + The export_toplevel request exports the passed surface so that it can later be + imported via xdg_importer. When called, a new xdg_exported object will + be created and xdg_exported.handle will be sent immediately. See the + corresponding interface and event for details. + + A surface may be exported multiple times, and each exported handle may + be used to create an xdg_imported multiple times. Only xdg_toplevel + equivalent surfaces may be exported, otherwise an invalid_surface + protocol error is sent. + + + + + + + + + A global interface used for importing surfaces exported by xdg_exporter. + With this interface, a client can create a reference to a surface of + another client. + + + + + Notify the compositor that the xdg_importer object will no longer be + used. + + + + + + The import_toplevel request imports a surface from any client given a handle + retrieved by exporting said surface using xdg_exporter.export_toplevel. + When called, a new xdg_imported object will be created. This new object + represents the imported surface, and the importing client can + manipulate its relationship using it. See xdg_imported for details. + + + + + + + + + An xdg_exported object represents an exported reference to a surface. The + exported surface may be referenced as long as the xdg_exported object not + destroyed. Destroying the xdg_exported invalidates any relationship the + importer may have established using xdg_imported. + + + + + Revoke the previously exported surface. This invalidates any + relationship the importer may have set up using the xdg_imported created + given the handle sent via xdg_exported.handle. + + + + + + The handle event contains the unique handle of this exported surface + reference. It may be shared with any client, which then can use it to + import the surface by calling xdg_importer.import_toplevel. A handle + may be used to import the surface multiple times. + + + + + + + + An xdg_imported object represents an imported reference to surface exported + by some client. A client can use this interface to manipulate + relationships between its own surfaces and the imported surface. + + + + + These errors can be emitted in response to invalid xdg_imported + requests. + + + + + + + Notify the compositor that it will no longer use the xdg_imported + object. Any relationship that may have been set up will at this point + be invalidated. + + + + + + Set the imported surface as the parent of some surface of the client. + The passed surface must be an xdg_toplevel equivalent, otherwise an + invalid_surface protocol error is sent. Calling this function sets up + a surface to surface relation with the same stacking and positioning + semantics as xdg_toplevel.set_parent. + + + + + + + The imported surface handle has been destroyed and any relationship set + up has been invalidated. This may happen for various reasons, for + example if the exported surface or the exported surface handle has been + destroyed, if the handle used for importing was invalid. + + + + + diff --git a/src/linux/protocols/xml/xdg-toplevel-icon-v1.xml b/src/linux/protocols/xml/xdg-toplevel-icon-v1.xml new file mode 100644 index 0000000..fc409fe --- /dev/null +++ b/src/linux/protocols/xml/xdg-toplevel-icon-v1.xml @@ -0,0 +1,205 @@ + + + + + Copyright © 2023-2024 Matthias Klumpp + Copyright © 2024 David Edmundson + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol allows clients to set icons for their toplevel surfaces + either via the XDG icon stock (using an icon name), or from pixel data. + + A toplevel icon represents the individual toplevel (unlike the application + or launcher icon, which represents the application as a whole), and may be + shown in window switchers, window overviews and taskbars that list + individual windows. + + This document adheres to RFC 2119 when using words like "must", + "should", "may", etc. + + Warning! The protocol described in this file is currently in the testing + phase. Backward compatible changes may be added together with the + corresponding interface version bump. Backward incompatible changes can + only be done by creating a new major version of the extension. + + + + + This interface allows clients to create toplevel window icons and set + them on toplevel windows to be displayed to the user. + + + + + Destroy the toplevel icon manager. + This does not destroy objects created with the manager. + + + + + + Creates a new icon object. This icon can then be attached to a + xdg_toplevel via the 'set_icon' request. + + + + + + + This request assigns the icon 'icon' to 'toplevel', or clears the + toplevel icon if 'icon' was null. + This state is double-buffered and is applied on the next + wl_surface.commit of the toplevel. + + After making this call, the xdg_toplevel_icon_v1 provided as 'icon' + can be destroyed by the client without 'toplevel' losing its icon. + The xdg_toplevel_icon_v1 is immutable from this point, and any + future attempts to change it must raise the + 'xdg_toplevel_icon_v1.immutable' protocol error. + + The compositor must set the toplevel icon from either the pixel data + the icon provides, or by loading a stock icon using the icon name. + See the description of 'xdg_toplevel_icon_v1' for details. + + If 'icon' is set to null, the icon of the respective toplevel is reset + to its default icon (usually the icon of the application, derived from + its desktop-entry file, or a placeholder icon). + If this request is passed an icon with no pixel buffers or icon name + assigned, the icon must be reset just like if 'icon' was null. + + + + + + + + This event indicates an icon size the compositor prefers to be + available if the client has scalable icons and can render to any size. + + When the 'xdg_toplevel_icon_manager_v1' object is created, the + compositor may send one or more 'icon_size' events to describe the list + of preferred icon sizes. If the compositor has no size preference, it + may not send any 'icon_size' event, and it is up to the client to + decide a suitable icon size. + + A sequence of 'icon_size' events must be finished with a 'done' event. + If the compositor has no size preferences, it must still send the + 'done' event, without any preceding 'icon_size' events. + + + + + + + This event is sent after all 'icon_size' events have been sent. + + + + + + + This interface defines a toplevel icon. + An icon can have a name, and multiple buffers. + In order to be applied, the icon must have either a name, or at least + one buffer assigned. Applying an empty icon (with no buffer or name) to + a toplevel should reset its icon to the default icon. + + It is up to compositor policy whether to prefer using a buffer or loading + an icon via its name. See 'set_name' and 'add_buffer' for details. + + + + + + + + + + + Destroys the 'xdg_toplevel_icon_v1' object. + The icon must still remain set on every toplevel it was assigned to, + until the toplevel icon is reset explicitly. + + + + + + This request assigns an icon name to this icon. + Any previously set name is overridden. + + The compositor must resolve 'icon_name' according to the lookup rules + described in the XDG icon theme specification[1] using the + environment's current icon theme. + + If the compositor does not support icon names or cannot resolve + 'icon_name' according to the XDG icon theme specification it must + fall back to using pixel buffer data instead. + + If this request is made after the icon has been assigned to a toplevel + via 'set_icon', a 'immutable' error must be raised. + + [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html + + + + + + + This request adds pixel data supplied as wl_buffer to the icon. + + The client should add pixel data for all icon sizes and scales that + it can provide, or which are explicitly requested by the compositor + via 'icon_size' events on xdg_toplevel_icon_manager_v1. + + The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm + and must be a square (width and height being equal). + If any of these buffer requirements are not fulfilled, a 'invalid_buffer' + error must be raised. + + If this icon instance already has a buffer of the same size and scale + from a previous 'add_buffer' request, data from the last request + overrides the preexisting pixel data. + + The wl_buffer must be kept alive for as long as the xdg_toplevel_icon + it is associated with is not destroyed, otherwise a 'no_buffer' error + is raised. The buffer contents must not be modified after it was + assigned to the icon. As a result, the region of the wl_shm_pool's + backing storage used for the wl_buffer must not be modified after this + request is sent. The wl_buffer.release event is unused. + + If this request is made after the icon has been assigned to a toplevel + via 'set_icon', a 'immutable' error must be raised. + + + + + + diff --git a/src/linux/tools/protocols.py b/src/linux/tools/protocols.py index d55c177..37483fb 100644 --- a/src/linux/tools/protocols.py +++ b/src/linux/tools/protocols.py @@ -30,6 +30,17 @@ def generate(root, version): version_h = version_h.replace('@WAYLAND_VERSION_' + key + '@', value) version_h = version_h.replace('@WAYLAND_VERSION@', version) (output / 'wayland-version.h').write_text(version_h) + arch = (root / 'vendor/dbus/dbus/dbus-arch-deps.h.in').read_text() + replacements = {'DBUS_INT64_TYPE': 'long long', 'DBUS_INT64_MODIFIER': 'll', + 'DBUS_INT64_CONSTANT': 'val##LL', 'DBUS_UINT64_CONSTANT': 'val##ULL', + 'DBUS_INT32_TYPE': 'int', 'DBUS_INT16_TYPE': 'short', + 'DBUS_SIZEOF_VOID_P': '__SIZEOF_POINTER__', 'DBUS_MAJOR_VERSION': '1', + 'DBUS_MINOR_VERSION': '16', 'DBUS_MICRO_VERSION': '2', 'DBUS_VERSION': '1.16.2'} + for key, value in replacements.items(): + arch = arch.replace('@' + key + '@', value) + assert '@' not in arch + (output / 'dbus').mkdir(exist_ok=True) + (output / 'dbus/dbus-arch-deps.h').write_text(arch) symbols = ['/* Generated by tools/protocols.py; private protocol descriptors. */'] for xml in sorted((root / 'protocols/xml').glob('*.xml')): for interface in ET.parse(xml).getroot().findall('interface'): @@ -64,7 +75,7 @@ def main(): if args.regenerate: generate(ROOT, manifest['scanner']) manifest['generated'] = {str(p.relative_to(ROOT)): digest(p.read_bytes()) - for p in sorted((ROOT / 'protocols/generated').iterdir())} + for p in sorted((ROOT / 'protocols/generated').rglob('*')) if p.is_file()} MANIFEST.write_text(json.dumps(manifest, indent=2) + '\n') if args.verify_generation: import shutil diff --git a/src/linux/vendor/README.md b/src/linux/vendor/README.md index 97e90ce..74e1d08 100644 --- a/src/linux/vendor/README.md +++ b/src/linux/vendor/README.md @@ -7,14 +7,22 @@ per-file digests, and the scanner version. - Wayland 1.24.0: client/utility/EGL ABI headers and core XML. MIT license in `wayland/COPYING` and individual file notices. -- wayland-protocols 1.45: xdg-shell, xdg-decoration, viewporter, fractional-scale. +- wayland-protocols 1.45: xdg-shell, xdg-decoration, viewporter, fractional-scale, + cursor-shape, tablet descriptors, text-input-v3, xdg-foreign-v2, activation, + and toplevel icons. License in `wayland-protocols/COPYING` and each XML's copyright element. - Khronos EGL-Registry revision `5961a7fe64cf8a126890ced6f13d69e0a1e1b83e`: EGL and platform ABI headers. Apache-2.0 text is in `khronos/LICENSE-2.0.txt`; copyright/SPDX and full MIT notices remain in the headers. +- libxkbcommon 1.11.0: keyboard and compose ABI declarations; MIT notices in + `xkbcommon/LICENSE` and the headers. +- D-Bus 1.16.2: public ABI declarations; licenses in `dbus/COPYING`. + Upstream files are unmodified. `wayland-version.h` is produced by substituting -the release version into the upstream template. The scanner generates client +the release version into the upstream template. The D-Bus architecture header +is generated from its upstream template using fixed Linux integer widths and +the target compiler’s pointer size, rather than a build-machine configuration. The scanner generates client headers and private descriptor C files. `private-symbols.h` gives the descriptors UHDK-specific names at compilation, preventing collisions with other clients. diff --git a/src/linux/vendor/dbus/COPYING b/src/linux/vendor/dbus/COPYING new file mode 100644 index 0000000..d0afa71 --- /dev/null +++ b/src/linux/vendor/dbus/COPYING @@ -0,0 +1,23 @@ +dbus is licensed to you under your choice of the Academic Free +License version 2.1, or the GNU General Public License version 2 +(or, at your option any later version). +The full text of these licenses can be found in LICENSES/AFL-2.1.txt +and LICENSES/GPL-2.0-or-later.txt. + +Some source files are under more permissive BSD-/MIT-style licenses +that are compatible with the AFL and GPL. + +When contributing new code, our preferred license for new code is the +version of the MIT/X11 license used by the Expat library, referred to +as "MIT" by SPDX, which can be found in LICENSES/MIT.txt. + +Some of the standalone binaries are under the GPL only; in particular, +but not limited to, tools/dbus-cleanup-sockets.c and test/decode-gcov.c. + +Each source code file is marked with the proper copyright information - +if you find a file that isn't marked please bring it to our attention. + +Some files contain a SPDX-License-Identifier marker. These markers +indicate the license of that file, consistent with the SPDX and REUSE +specifications: see . dbus is not yet fully +REUSE-compliant, and not all files carry these markers. diff --git a/src/linux/vendor/dbus/dbus/dbus-address.h b/src/linux/vendor/dbus/dbus/dbus-address.h new file mode 100644 index 0000000..c030343 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-address.h @@ -0,0 +1,87 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-address.h Server address parser. + * + * Copyright (C) 2003 CodeFactory AB + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_ADDRESS_H +#define DBUS_ADDRESS_H + +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusAddress + * @{ + */ + +/** Opaque type representing one of the semicolon-separated items in an address */ +typedef struct DBusAddressEntry DBusAddressEntry; + +DBUS_EXPORT +dbus_bool_t dbus_parse_address (const char *address, + DBusAddressEntry ***entry_result, + int *array_len, + DBusError *error); +DBUS_EXPORT +const char *dbus_address_entry_get_value (DBusAddressEntry *entry, + const char *key); +DBUS_EXPORT +const char *dbus_address_entry_get_method (DBusAddressEntry *entry); +DBUS_EXPORT +void dbus_address_entries_free (DBusAddressEntry **entries); + +DBUS_EXPORT +char* dbus_address_escape_value (const char *value); +DBUS_EXPORT +char* dbus_address_unescape_value (const char *value, + DBusError *error); + +/** + * Clear a variable or struct member that contains an array of #DBusAddressEntry. + * If it does not contain #NULL, the entries that were previously + * there are freed with dbus_address_entries_free(). + * + * This is similar to dbus_clear_connection(): see that function + * for more details. + * + * @param pointer_to_entries A pointer to a variable or struct member. + * pointer_to_entries must not be #NULL, but *pointer_to_entries + * may be #NULL. + */ +static inline void +dbus_clear_address_entries (DBusAddressEntry ***pointer_to_entries) +{ + _dbus_clear_pointer_impl (DBusAddressEntry *, pointer_to_entries, + dbus_address_entries_free); +} + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_ADDRESS_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-arch-deps.h.in b/src/linux/vendor/dbus/dbus/dbus-arch-deps.h.in new file mode 100644 index 0000000..9dcb83c --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-arch-deps.h.in @@ -0,0 +1,65 @@ +/* -*- mode: C; c-file-style: "gnu" -*- */ +/* dbus-arch-deps.h Header with architecture/compiler specific information, installed to libdir + * + * Copyright (C) 2003 Red Hat, Inc. + * SPDX-License-Identifier: AFL-2.0 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.0 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_ARCH_DEPS_H +#define DBUS_ARCH_DEPS_H + +#include + +DBUS_BEGIN_DECLS + +/* D-Bus no longer supports platforms with no 64-bit integer type. */ +#define DBUS_HAVE_INT64 1 +_DBUS_GNUC_EXTENSION typedef @DBUS_INT64_TYPE@ dbus_int64_t; +_DBUS_GNUC_EXTENSION typedef unsigned @DBUS_INT64_TYPE@ dbus_uint64_t; +#define DBUS_INT64_MODIFIER "@DBUS_INT64_MODIFIER@" + +#define DBUS_INT64_CONSTANT(val) (_DBUS_GNUC_EXTENSION @DBUS_INT64_CONSTANT@) +#define DBUS_UINT64_CONSTANT(val) (_DBUS_GNUC_EXTENSION @DBUS_UINT64_CONSTANT@) + +typedef @DBUS_INT32_TYPE@ dbus_int32_t; +typedef unsigned @DBUS_INT32_TYPE@ dbus_uint32_t; + +typedef @DBUS_INT16_TYPE@ dbus_int16_t; +typedef unsigned @DBUS_INT16_TYPE@ dbus_uint16_t; + +#define DBUS_SIZEOF_VOID_P @DBUS_SIZEOF_VOID_P@ + +/* This is not really arch-dependent, but it's not worth + * creating an additional generated header just for this + */ +#define DBUS_MAJOR_VERSION @DBUS_MAJOR_VERSION@ +#define DBUS_MINOR_VERSION @DBUS_MINOR_VERSION@ +#define DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@ + +#define DBUS_VERSION_STRING "@DBUS_VERSION@" + +#define DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@)) + +DBUS_END_DECLS + +#endif /* DBUS_ARCH_DEPS_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-bus.h b/src/linux/vendor/dbus/dbus/dbus-bus.h new file mode 100644 index 0000000..31ade9a --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-bus.h @@ -0,0 +1,97 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-bus.h Convenience functions for communicating with the bus. + * + * Copyright (C) 2003 CodeFactory AB + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_BUS_H +#define DBUS_BUS_H + +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusBus + * @{ + */ + +DBUS_EXPORT +DBusConnection *dbus_bus_get (DBusBusType type, + DBusError *error); +DBUS_EXPORT +DBusConnection *dbus_bus_get_private (DBusBusType type, + DBusError *error); + +DBUS_EXPORT +dbus_bool_t dbus_bus_register (DBusConnection *connection, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_bus_set_unique_name (DBusConnection *connection, + const char *unique_name); +DBUS_EXPORT +const char* dbus_bus_get_unique_name (DBusConnection *connection); +DBUS_EXPORT +unsigned long dbus_bus_get_unix_user (DBusConnection *connection, + const char *name, + DBusError *error); +DBUS_EXPORT +char* dbus_bus_get_id (DBusConnection *connection, + DBusError *error); +DBUS_EXPORT +int dbus_bus_request_name (DBusConnection *connection, + const char *name, + unsigned int flags, + DBusError *error); +DBUS_EXPORT +int dbus_bus_release_name (DBusConnection *connection, + const char *name, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_bus_name_has_owner (DBusConnection *connection, + const char *name, + DBusError *error); + +DBUS_EXPORT +dbus_bool_t dbus_bus_start_service_by_name (DBusConnection *connection, + const char *name, + dbus_uint32_t flags, + dbus_uint32_t *reply, + DBusError *error); + +DBUS_EXPORT +void dbus_bus_add_match (DBusConnection *connection, + const char *rule, + DBusError *error); +DBUS_EXPORT +void dbus_bus_remove_match (DBusConnection *connection, + const char *rule, + DBusError *error); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_BUS_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-connection.h b/src/linux/vendor/dbus/dbus/dbus-connection.h new file mode 100644 index 0000000..b79fda8 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-connection.h @@ -0,0 +1,531 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-connection.h DBusConnection object + * + * Copyright (C) 2002, 2003 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_CONNECTION_H +#define DBUS_CONNECTION_H + +#include +#include +#include +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusConnection + * @{ + */ + +/* documented in dbus-watch.c */ +typedef struct DBusWatch DBusWatch; +/* documented in dbus-timeout.c */ +typedef struct DBusTimeout DBusTimeout; +/** Opaque type representing preallocated resources so a message can be sent without further memory allocation. */ +typedef struct DBusPreallocatedSend DBusPreallocatedSend; +/** Opaque type representing a method call that has not yet received a reply. */ +typedef struct DBusPendingCall DBusPendingCall; +/** Opaque type representing a connection to a remote application and associated incoming/outgoing message queues. */ +typedef struct DBusConnection DBusConnection; +/** Set of functions that must be implemented to handle messages sent to a particular object path. */ +typedef struct DBusObjectPathVTable DBusObjectPathVTable; + +/** + * Indicates the status of a #DBusWatch. + */ +typedef enum +{ + DBUS_WATCH_READABLE = 1 << 0, /**< As in POLLIN */ + DBUS_WATCH_WRITABLE = 1 << 1, /**< As in POLLOUT */ + DBUS_WATCH_ERROR = 1 << 2, /**< As in POLLERR (can't watch for + * this, but can be present in + * current state passed to + * dbus_watch_handle()). + */ + DBUS_WATCH_HANGUP = 1 << 3 /**< As in POLLHUP (can't watch for + * it, but can be present in current + * state passed to + * dbus_watch_handle()). + */ + /* Internal to libdbus, there is also _DBUS_WATCH_NVAL in dbus-watch.h */ +} DBusWatchFlags; + +/** + * Indicates the status of incoming data on a #DBusConnection. This determines whether + * dbus_connection_dispatch() needs to be called. + */ +typedef enum +{ + DBUS_DISPATCH_DATA_REMAINS, /**< There is more data to potentially convert to messages. */ + DBUS_DISPATCH_COMPLETE, /**< All currently available data has been processed. */ + DBUS_DISPATCH_NEED_MEMORY /**< More memory is needed to continue. */ +} DBusDispatchStatus; + +/** Called when libdbus needs a new watch to be monitored by the main + * loop. Returns #FALSE if it lacks enough memory to add the + * watch. Set by dbus_connection_set_watch_functions() or + * dbus_server_set_watch_functions(). + */ +typedef dbus_bool_t (* DBusAddWatchFunction) (DBusWatch *watch, + void *data); +/** Called when dbus_watch_get_enabled() may return a different value + * than it did before. Set by dbus_connection_set_watch_functions() + * or dbus_server_set_watch_functions(). + */ +typedef void (* DBusWatchToggledFunction) (DBusWatch *watch, + void *data); +/** Called when libdbus no longer needs a watch to be monitored by the + * main loop. Set by dbus_connection_set_watch_functions() or + * dbus_server_set_watch_functions(). + */ +typedef void (* DBusRemoveWatchFunction) (DBusWatch *watch, + void *data); +/** Called when libdbus needs a new timeout to be monitored by the main + * loop. Returns #FALSE if it lacks enough memory to add the + * watch. Set by dbus_connection_set_timeout_functions() or + * dbus_server_set_timeout_functions(). + */ +typedef dbus_bool_t (* DBusAddTimeoutFunction) (DBusTimeout *timeout, + void *data); +/** Called when dbus_timeout_get_enabled() may return a different + * value than it did before. + * Set by dbus_connection_set_timeout_functions() or + * dbus_server_set_timeout_functions(). + */ +typedef void (* DBusTimeoutToggledFunction) (DBusTimeout *timeout, + void *data); +/** Called when libdbus no longer needs a timeout to be monitored by the + * main loop. Set by dbus_connection_set_timeout_functions() or + * dbus_server_set_timeout_functions(). + */ +typedef void (* DBusRemoveTimeoutFunction) (DBusTimeout *timeout, + void *data); +/** Called when the return value of dbus_connection_get_dispatch_status() + * may have changed. Set with dbus_connection_set_dispatch_status_function(). + */ +typedef void (* DBusDispatchStatusFunction) (DBusConnection *connection, + DBusDispatchStatus new_status, + void *data); +/** + * Called when the main loop's thread should be notified that there's now work + * to do. Set with dbus_connection_set_wakeup_main_function(). + */ +typedef void (* DBusWakeupMainFunction) (void *data); + +/** + * Called during authentication to check whether the given UNIX user + * ID is allowed to connect, if the client tried to auth as a UNIX + * user ID. Normally on Windows this would never happen. Set with + * dbus_connection_set_unix_user_function(). + */ +typedef dbus_bool_t (* DBusAllowUnixUserFunction) (DBusConnection *connection, + unsigned long uid, + void *data); + +/** + * Called during authentication to check whether the given Windows user + * ID is allowed to connect, if the client tried to auth as a Windows + * user ID. Normally on UNIX this would never happen. Set with + * dbus_connection_set_windows_user_function(). + */ +typedef dbus_bool_t (* DBusAllowWindowsUserFunction) (DBusConnection *connection, + const char *user_sid, + void *data); + + +/** + * Called when a pending call now has a reply available. Set with + * dbus_pending_call_set_notify(). + */ +typedef void (* DBusPendingCallNotifyFunction) (DBusPendingCall *pending, + void *user_data); + +/** + * Called when a message needs to be handled. The result indicates whether or + * not more handlers should be run. Set with dbus_connection_add_filter(). + */ +typedef DBusHandlerResult (* DBusHandleMessageFunction) (DBusConnection *connection, + DBusMessage *message, + void *user_data); +DBUS_EXPORT +DBusConnection* dbus_connection_open (const char *address, + DBusError *error); +DBUS_EXPORT +DBusConnection* dbus_connection_open_private (const char *address, + DBusError *error); +DBUS_EXPORT +DBusConnection* dbus_connection_ref (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_unref (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_close (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_is_connected (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_is_authenticated (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_is_anonymous (DBusConnection *connection); +DBUS_EXPORT +char* dbus_connection_get_server_id (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_can_send_type (DBusConnection *connection, + int type); + +DBUS_EXPORT +void dbus_connection_set_exit_on_disconnect (DBusConnection *connection, + dbus_bool_t exit_on_disconnect); +DBUS_EXPORT +void dbus_connection_flush (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_read_write_dispatch (DBusConnection *connection, + int timeout_milliseconds); +DBUS_EXPORT +dbus_bool_t dbus_connection_read_write (DBusConnection *connection, + int timeout_milliseconds); +DBUS_EXPORT +DBusMessage* dbus_connection_borrow_message (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_return_message (DBusConnection *connection, + DBusMessage *message); +DBUS_EXPORT +void dbus_connection_steal_borrowed_message (DBusConnection *connection, + DBusMessage *message); +DBUS_EXPORT +DBusMessage* dbus_connection_pop_message (DBusConnection *connection); +DBUS_EXPORT +DBusDispatchStatus dbus_connection_get_dispatch_status (DBusConnection *connection); +DBUS_EXPORT +DBusDispatchStatus dbus_connection_dispatch (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_has_messages_to_send (DBusConnection *connection); +DBUS_EXPORT +dbus_bool_t dbus_connection_send (DBusConnection *connection, + DBusMessage *message, + dbus_uint32_t *client_serial); +DBUS_EXPORT +dbus_bool_t dbus_connection_send_with_reply (DBusConnection *connection, + DBusMessage *message, + DBusPendingCall **pending_return, + int timeout_milliseconds); +DBUS_EXPORT +DBusMessage * dbus_connection_send_with_reply_and_block (DBusConnection *connection, + DBusMessage *message, + int timeout_milliseconds, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_connection_set_watch_functions (DBusConnection *connection, + DBusAddWatchFunction add_function, + DBusRemoveWatchFunction remove_function, + DBusWatchToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_connection_set_timeout_functions (DBusConnection *connection, + DBusAddTimeoutFunction add_function, + DBusRemoveTimeoutFunction remove_function, + DBusTimeoutToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +void dbus_connection_set_wakeup_main_function (DBusConnection *connection, + DBusWakeupMainFunction wakeup_main_function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +void dbus_connection_set_dispatch_status_function (DBusConnection *connection, + DBusDispatchStatusFunction function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_unix_user (DBusConnection *connection, + unsigned long *uid); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_unix_process_id (DBusConnection *connection, + unsigned long *pid); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_adt_audit_session_data (DBusConnection *connection, + void **data, + dbus_int32_t *data_size); +DBUS_EXPORT +void dbus_connection_set_unix_user_function (DBusConnection *connection, + DBusAllowUnixUserFunction function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_windows_user (DBusConnection *connection, + char **windows_sid_p); +DBUS_EXPORT +void dbus_connection_set_windows_user_function (DBusConnection *connection, + DBusAllowWindowsUserFunction function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +void dbus_connection_set_allow_anonymous (DBusConnection *connection, + dbus_bool_t value); +DBUS_EXPORT +void dbus_connection_set_builtin_filters_enabled (DBusConnection *connection, + dbus_bool_t value); +DBUS_EXPORT +void dbus_connection_set_route_peer_messages (DBusConnection *connection, + dbus_bool_t value); + + +/* Filters */ + +DBUS_EXPORT +dbus_bool_t dbus_connection_add_filter (DBusConnection *connection, + DBusHandleMessageFunction function, + void *user_data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +void dbus_connection_remove_filter (DBusConnection *connection, + DBusHandleMessageFunction function, + void *user_data); + + +/* Other */ +DBUS_EXPORT +dbus_bool_t dbus_connection_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +void dbus_connection_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +dbus_bool_t dbus_connection_set_data (DBusConnection *connection, + dbus_int32_t slot, + void *data, + DBusFreeFunction free_data_func); +DBUS_EXPORT +void* dbus_connection_get_data (DBusConnection *connection, + dbus_int32_t slot); + +DBUS_EXPORT +void dbus_connection_set_change_sigpipe (dbus_bool_t will_modify_sigpipe); + +DBUS_EXPORT +void dbus_connection_set_max_message_size (DBusConnection *connection, + long size); +DBUS_EXPORT +long dbus_connection_get_max_message_size (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_set_max_received_size (DBusConnection *connection, + long size); +DBUS_EXPORT +long dbus_connection_get_max_received_size (DBusConnection *connection); + +DBUS_EXPORT +void dbus_connection_set_max_message_unix_fds (DBusConnection *connection, + long n); +DBUS_EXPORT +long dbus_connection_get_max_message_unix_fds (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_set_max_received_unix_fds(DBusConnection *connection, + long n); +DBUS_EXPORT +long dbus_connection_get_max_received_unix_fds(DBusConnection *connection); + +DBUS_EXPORT +long dbus_connection_get_outgoing_size (DBusConnection *connection); +DBUS_EXPORT +long dbus_connection_get_outgoing_unix_fds (DBusConnection *connection); + +DBUS_EXPORT +DBusPreallocatedSend* dbus_connection_preallocate_send (DBusConnection *connection); +DBUS_EXPORT +void dbus_connection_free_preallocated_send (DBusConnection *connection, + DBusPreallocatedSend *preallocated); +DBUS_EXPORT +void dbus_connection_send_preallocated (DBusConnection *connection, + DBusPreallocatedSend *preallocated, + DBusMessage *message, + dbus_uint32_t *client_serial); + + +/* Object tree functionality */ + +/** + * Called when a #DBusObjectPathVTable is unregistered (or its connection is freed). + * Found in #DBusObjectPathVTable. + */ +typedef void (* DBusObjectPathUnregisterFunction) (DBusConnection *connection, + void *user_data); +/** + * Called when a message is sent to a registered object path. Found in + * #DBusObjectPathVTable which is registered with dbus_connection_register_object_path() + * or dbus_connection_register_fallback(). + */ +typedef DBusHandlerResult (* DBusObjectPathMessageFunction) (DBusConnection *connection, + DBusMessage *message, + void *user_data); + +/** + * Virtual table that must be implemented to handle a portion of the + * object path hierarchy. Attach the vtable to a particular path using + * dbus_connection_register_object_path() or + * dbus_connection_register_fallback(). + */ +struct DBusObjectPathVTable +{ + DBusObjectPathUnregisterFunction unregister_function; /**< Function to unregister this handler */ + DBusObjectPathMessageFunction message_function; /**< Function to handle messages */ + + void (* dbus_internal_pad1) (void *); /**< Reserved for future expansion */ + void (* dbus_internal_pad2) (void *); /**< Reserved for future expansion */ + void (* dbus_internal_pad3) (void *); /**< Reserved for future expansion */ + void (* dbus_internal_pad4) (void *); /**< Reserved for future expansion */ +}; + +DBUS_EXPORT +dbus_bool_t dbus_connection_try_register_object_path (DBusConnection *connection, + const char *path, + const DBusObjectPathVTable *vtable, + void *user_data, + DBusError *error); + +DBUS_EXPORT +dbus_bool_t dbus_connection_register_object_path (DBusConnection *connection, + const char *path, + const DBusObjectPathVTable *vtable, + void *user_data); + +DBUS_EXPORT +dbus_bool_t dbus_connection_try_register_fallback (DBusConnection *connection, + const char *path, + const DBusObjectPathVTable *vtable, + void *user_data, + DBusError *error); + +DBUS_EXPORT +dbus_bool_t dbus_connection_register_fallback (DBusConnection *connection, + const char *path, + const DBusObjectPathVTable *vtable, + void *user_data); +DBUS_EXPORT +dbus_bool_t dbus_connection_unregister_object_path (DBusConnection *connection, + const char *path); + +DBUS_EXPORT +dbus_bool_t dbus_connection_get_object_path_data (DBusConnection *connection, + const char *path, + void **data_p); + +DBUS_EXPORT +dbus_bool_t dbus_connection_list_registered (DBusConnection *connection, + const char *parent_path, + char ***child_entries); + +DBUS_EXPORT +dbus_bool_t dbus_connection_get_unix_fd (DBusConnection *connection, + int *fd); +DBUS_EXPORT +dbus_bool_t dbus_connection_get_socket (DBusConnection *connection, + int *fd); + +/** + * Clear a variable or struct member that contains a #DBusConnection. + * If it does not contain #NULL, the connection that was previously + * there is unreferenced with dbus_connection_unref(). + * + * For example, this function and the similar functions for + * other reference-counted types can be used in code like this: + * + * @code + * DBusConnection *conn = NULL; + * struct { ...; DBusMessage *m; ... } *larger_structure = ...; + * + * ... code that might set conn or m to be non-NULL ... + * + * dbus_clear_connection (&conn); + * dbus_clear_message (&larger_structure->m); + * @endcode + * + * @param pointer_to_connection A pointer to a variable or struct member. + * pointer_to_connection must not be #NULL, but *pointer_to_connection + * may be #NULL. + */ +static inline void +dbus_clear_connection (DBusConnection **pointer_to_connection) +{ + _dbus_clear_pointer_impl (DBusConnection, pointer_to_connection, + dbus_connection_unref); +} + +/** @} */ + + +/** + * @addtogroup DBusWatch + * @{ + */ + +#ifndef DBUS_DISABLE_DEPRECATED +DBUS_EXPORT +DBUS_DEPRECATED int dbus_watch_get_fd (DBusWatch *watch); +#endif + +DBUS_EXPORT +int dbus_watch_get_unix_fd (DBusWatch *watch); +DBUS_EXPORT +int dbus_watch_get_socket (DBusWatch *watch); +DBUS_EXPORT +unsigned int dbus_watch_get_flags (DBusWatch *watch); +DBUS_EXPORT +void* dbus_watch_get_data (DBusWatch *watch); +DBUS_EXPORT +void dbus_watch_set_data (DBusWatch *watch, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_watch_handle (DBusWatch *watch, + unsigned int flags); +DBUS_EXPORT +dbus_bool_t dbus_watch_get_enabled (DBusWatch *watch); + +/** @} */ + +/** + * @addtogroup DBusTimeout + * @{ + */ + +DBUS_EXPORT +int dbus_timeout_get_interval (DBusTimeout *timeout); +DBUS_EXPORT +void* dbus_timeout_get_data (DBusTimeout *timeout); +DBUS_EXPORT +void dbus_timeout_set_data (DBusTimeout *timeout, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_timeout_handle (DBusTimeout *timeout); +DBUS_EXPORT +dbus_bool_t dbus_timeout_get_enabled (DBusTimeout *timeout); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_CONNECTION_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-errors.h b/src/linux/vendor/dbus/dbus/dbus-errors.h new file mode 100644 index 0000000..003f583 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-errors.h @@ -0,0 +1,92 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-errors.h Error reporting + * + * Copyright (C) 2002 Red Hat Inc. + * Copyright (C) 2003 CodeFactory AB + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_ERROR_H +#define DBUS_ERROR_H + +#include +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusErrors + * @{ + */ + +/** Mostly-opaque type representing an error that occurred */ +typedef struct DBusError DBusError; + +/** + * Object representing an exception. + */ +struct DBusError +{ + const char *name; /**< public error name field */ + const char *message; /**< public error message field */ + + unsigned int dummy1 : 1; /**< placeholder */ + unsigned int dummy2 : 1; /**< placeholder */ + unsigned int dummy3 : 1; /**< placeholder */ + unsigned int dummy4 : 1; /**< placeholder */ + unsigned int dummy5 : 1; /**< placeholder */ + + void *padding1; /**< placeholder */ +}; + +#define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL } + +DBUS_EXPORT +void dbus_error_init (DBusError *error); +DBUS_EXPORT +void dbus_error_free (DBusError *error); +DBUS_EXPORT +void dbus_set_error (DBusError *error, + const char *name, + const char *message, + ...) _DBUS_GNUC_PRINTF (3, 4); +DBUS_EXPORT +void dbus_set_error_const (DBusError *error, + const char *name, + const char *message); +DBUS_EXPORT +void dbus_move_error (DBusError *src, + DBusError *dest); +DBUS_EXPORT +dbus_bool_t dbus_error_has_name (const DBusError *error, + const char *name); +DBUS_EXPORT +dbus_bool_t dbus_error_is_set (const DBusError *error); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_ERROR_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-macros.h b/src/linux/vendor/dbus/dbus/dbus-macros.h new file mode 100644 index 0000000..5ca7bf0 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-macros.h @@ -0,0 +1,237 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-macros.h generic macros + * + * Copyright (C) 2002 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_MACROS_H +#define DBUS_MACROS_H + +#ifdef __cplusplus +# define DBUS_BEGIN_DECLS extern "C" { +# define DBUS_END_DECLS } +#else +# define DBUS_BEGIN_DECLS +# define DBUS_END_DECLS +#endif + +#ifndef TRUE +# define TRUE 1 +#endif +#ifndef FALSE +# define FALSE 0 +#endif + +#ifndef NULL +# ifdef __cplusplus +# define NULL (0L) +# else /* !__cplusplus */ +# define NULL ((void*) 0) +# endif /* !__cplusplus */ +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +# define DBUS_DEPRECATED __attribute__ ((__deprecated__)) +#elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# define DBUS_DEPRECATED __declspec(deprecated) +#else +# define DBUS_DEPRECATED +#endif + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) +# define _DBUS_GNUC_EXTENSION __extension__ +#else +# define _DBUS_GNUC_EXTENSION +#endif + +#if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)) || \ + defined(__clang__) +#define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) \ + __attribute__((__format__ (__printf__, format_idx, arg_idx))) +#define _DBUS_GNUC_NORETURN \ + __attribute__((__noreturn__)) +#define _DBUS_GNUC_UNUSED \ + __attribute__((__unused__)) +#else /* !__GNUC__ */ +#define _DBUS_GNUC_PRINTF( format_idx, arg_idx ) +#define _DBUS_GNUC_NORETURN +#define _DBUS_GNUC_UNUSED +#endif /* !__GNUC__ */ + +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +#define DBUS_MALLOC __attribute__((__malloc__)) +#else +#define DBUS_MALLOC +#endif + +#if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) +#define DBUS_ALLOC_SIZE(x) __attribute__((__alloc_size__(x))) +#define DBUS_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y))) +#else +#define DBUS_ALLOC_SIZE(x) +#define DBUS_ALLOC_SIZE2(x,y) +#endif + +/** @def _DBUS_WARN_UNUSED_RESULT + * + * An attribute for functions whose result must be checked by the caller. + * + * This macro is used in function declarations. Unlike gcc-specific + * attributes, to avoid compilation failure with MSVC it must appear + * somewhere before the function name in the declaration. Our preferred + * coding style is to place it before the return type, for example: + * + * DBUS_PRIVATE_EXPORT _DBUS_WARN_UNUSED_RESULT + * dbus_bool_t _dbus_user_database_lock_system (void); + */ +#if defined(_MSC_VER) && (_MSC_VER >= 1700) +#define _DBUS_WARN_UNUSED_RESULT _Must_inspect_result_ +#elif (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +#define _DBUS_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#else +#define _DBUS_WARN_UNUSED_RESULT +#endif + +/** @def _DBUS_GNUC_PRINTF + * used to tell gcc about printf format strings + */ +/** @def _DBUS_GNUC_NORETURN + * used to tell gcc about functions that never return, such as _dbus_abort() + */ + +/* Normally docs are in .c files, but there isn't a .c file for this. */ +/** + * @defgroup DBusMacros Utility macros + * @ingroup DBus + * @brief #TRUE, #FALSE, #NULL, and so on + * + * Utility macros. + * + * @{ + */ + +/** + * @def DBUS_BEGIN_DECLS + * + * Macro used prior to declaring functions in the D-Bus header + * files. Expands to "extern "C"" when using a C++ compiler, + * and expands to nothing when using a C compiler. + * + * Please don't use this in your own code, consider it + * D-Bus internal. + */ +/** + * @def DBUS_END_DECLS + * + * Macro used after declaring functions in the D-Bus header + * files. Expands to "}" when using a C++ compiler, + * and expands to nothing when using a C compiler. + * + * Please don't use this in your own code, consider it + * D-Bus internal. + */ +/** + * @def TRUE + * + * Expands to "1" + */ +/** + * @def FALSE + * + * Expands to "0" + */ +/** + * @def NULL + * + * A null pointer, defined appropriately for C or C++. + */ +/** + * @def DBUS_DEPRECATED + * + * Tells the compiler to warn about a function or type if it's used. + * Code marked in this way should also be enclosed in + * @code + * #ifndef DBUS_DISABLE_DEPRECATED + * deprecated stuff here + * #endif + * @endcode + * + * Please don't use this in your own code, consider it + * D-Bus internal. + */ +/** + * @def _DBUS_GNUC_EXTENSION + * + * Tells gcc not to warn about extensions to the C standard in the + * following expression, even if compiling with -pedantic. Do not use + * this macro in your own code; please consider it to be internal to libdbus. + */ + +/* + * @def DBUS_EXPORT + * + * Declare the following symbol as public. This is currently a noop on + * platforms other than Windows. + */ + +#if defined(DBUS_EXPORT) + /* value forced by compiler command line, don't redefine */ +#elif defined(_WIN32) +# if defined(DBUS_STATIC_BUILD) +# define DBUS_EXPORT +# elif defined(dbus_1_EXPORTS) +# define DBUS_EXPORT __declspec(dllexport) +# else +# define DBUS_EXPORT __declspec(dllimport) +# endif +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define DBUS_EXPORT __attribute__ ((__visibility__ ("default"))) +#else +#define DBUS_EXPORT +#endif + +/* Implementation for dbus_clear_message() etc. This is not API, + * do not use it directly. + * + * We're using a specific type (T ** and T *) instead of void ** and + * void * partly for type-safety, partly to be strict-aliasing-compliant, + * and partly to keep C++ compilers happy. This code is inlined into + * users of libdbus, so we can't rely on it having dbus' own compiler + * settings. */ +#define _dbus_clear_pointer_impl(T, pointer_to_pointer, destroy) \ + do { \ + T **_pp = (pointer_to_pointer); \ + T *_value = *_pp; \ + \ + *_pp = NULL; \ + \ + if (_value != NULL) \ + destroy (_value); \ + } while (0) +/* Not (destroy) (_value) in case destroy() is a function-like macro */ + +/** @} */ + +#endif /* DBUS_MACROS_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-memory.h b/src/linux/vendor/dbus/dbus/dbus-memory.h new file mode 100644 index 0000000..5b5a41e --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-memory.h @@ -0,0 +1,74 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-memory.h D-Bus memory handling + * + * Copyright (C) 2002 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_MEMORY_H +#define DBUS_MEMORY_H + +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusMemory + * @{ + */ + +DBUS_EXPORT +DBUS_MALLOC +DBUS_ALLOC_SIZE(1) +void* dbus_malloc (size_t bytes); + +DBUS_EXPORT +DBUS_MALLOC +DBUS_ALLOC_SIZE(1) +void* dbus_malloc0 (size_t bytes); + +DBUS_EXPORT +DBUS_ALLOC_SIZE(2) +void* dbus_realloc (void *memory, + size_t bytes); +DBUS_EXPORT +void dbus_free (void *memory); + +#define dbus_new(type, count) ((type*)dbus_malloc (sizeof (type) * (count))) +#define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count))) + +DBUS_EXPORT +void dbus_free_string_array (char **str_array); + +typedef void (* DBusFreeFunction) (void *memory); + +DBUS_EXPORT +void dbus_shutdown (void); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_MEMORY_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-message.h b/src/linux/vendor/dbus/dbus/dbus-message.h new file mode 100644 index 0000000..0bbad3d --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-message.h @@ -0,0 +1,401 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-message.h DBusMessage object + * + * Copyright (C) 2002, 2003, 2005 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_MESSAGE_H +#define DBUS_MESSAGE_H + +#include +#include +#include +#include +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusMessage + * @{ + */ + +typedef struct DBusMessage DBusMessage; +/** + * Opaque type representing a message iterator. Can be copied by value and + * allocated on the stack. + * + * A DBusMessageIter usually contains no allocated memory. However, there + * is one special case: after a successful call to + * dbus_message_iter_open_container(), the caller is responsible for calling + * either dbus_message_iter_close_container() or + * dbus_message_iter_abandon_container() exactly once, with the same pair + * of iterators. + */ +typedef struct DBusMessageIter DBusMessageIter; + +/** + * DBusMessageIter struct; contains no public fields. + */ +struct DBusMessageIter +{ +#if DBUS_SIZEOF_VOID_P > 8 + void *dummy[16]; /**< Don't use this */ +#else + void *dummy1; /**< Don't use this */ + void *dummy2; /**< Don't use this */ + dbus_uint32_t dummy3; /**< Don't use this */ + int dummy4; /**< Don't use this */ + int dummy5; /**< Don't use this */ + int dummy6; /**< Don't use this */ + int dummy7; /**< Don't use this */ + int dummy8; /**< Don't use this */ + int dummy9; /**< Don't use this */ + int dummy10; /**< Don't use this */ + int dummy11; /**< Don't use this */ + int pad1; /**< Don't use this */ + void *pad2; /**< Don't use this */ + void *pad3; /**< Don't use this */ +#endif +}; + +/** + * A message iterator for which dbus_message_iter_abandon_container_if_open() + * is the only valid operation. + */ +#if DBUS_SIZEOF_VOID_P > 8 +#define DBUS_MESSAGE_ITER_INIT_CLOSED \ +{ \ + { \ + NULL, NULL, NULL, NULL, \ + NULL, NULL, NULL, NULL, \ + NULL, NULL, NULL, NULL, \ + NULL, NULL, NULL, NULL \ + } \ +} +#else +#define DBUS_MESSAGE_ITER_INIT_CLOSED \ +{ \ + NULL, /* dummy1 */ \ + NULL, /* dummy2 */ \ + 0, /* dummy3 */ \ + 0, /* dummy4 */ \ + 0, /* dummy5 */ \ + 0, /* dummy6 */ \ + 0, /* dummy7 */ \ + 0, /* dummy8 */ \ + 0, /* dummy9 */ \ + 0, /* dummy10 */ \ + 0, /* dummy11 */ \ + 0, /* pad1 */ \ + NULL, /* pad2 */ \ + NULL /* pad3 */ \ +} +#endif + +DBUS_EXPORT +DBusMessage* dbus_message_new (int message_type); +DBUS_EXPORT +DBusMessage* dbus_message_new_method_call (const char *bus_name, + const char *path, + const char *iface, + const char *method); +DBUS_EXPORT +DBusMessage* dbus_message_new_method_return (DBusMessage *method_call); +DBUS_EXPORT +DBusMessage* dbus_message_new_signal (const char *path, + const char *iface, + const char *name); +DBUS_EXPORT +DBusMessage* dbus_message_new_error (DBusMessage *reply_to, + const char *error_name, + const char *error_message); +DBUS_EXPORT +DBusMessage* dbus_message_new_error_printf (DBusMessage *reply_to, + const char *error_name, + const char *error_format, + ...) _DBUS_GNUC_PRINTF (3, 4); + +DBUS_EXPORT +DBusMessage* dbus_message_copy (const DBusMessage *message); + +DBUS_EXPORT +DBusMessage* dbus_message_ref (DBusMessage *message); +DBUS_EXPORT +void dbus_message_unref (DBusMessage *message); +DBUS_EXPORT +int dbus_message_get_type (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_set_path (DBusMessage *message, + const char *object_path); +DBUS_EXPORT +const char* dbus_message_get_path (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_has_path (DBusMessage *message, + const char *object_path); +DBUS_EXPORT +dbus_bool_t dbus_message_set_interface (DBusMessage *message, + const char *iface); +DBUS_EXPORT +const char* dbus_message_get_interface (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_has_interface (DBusMessage *message, + const char *iface); +DBUS_EXPORT +dbus_bool_t dbus_message_set_member (DBusMessage *message, + const char *member); +DBUS_EXPORT +const char* dbus_message_get_member (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_has_member (DBusMessage *message, + const char *member); +DBUS_EXPORT +dbus_bool_t dbus_message_set_error_name (DBusMessage *message, + const char *name); +DBUS_EXPORT +const char* dbus_message_get_error_name (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_set_destination (DBusMessage *message, + const char *destination); +DBUS_EXPORT +const char* dbus_message_get_destination (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_set_sender (DBusMessage *message, + const char *sender); +DBUS_EXPORT +const char* dbus_message_get_sender (DBusMessage *message); +DBUS_EXPORT +const char* dbus_message_get_signature (DBusMessage *message); +DBUS_EXPORT +void dbus_message_set_no_reply (DBusMessage *message, + dbus_bool_t no_reply); +DBUS_EXPORT +dbus_bool_t dbus_message_get_no_reply (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_is_method_call (DBusMessage *message, + const char *iface, + const char *method); +DBUS_EXPORT +dbus_bool_t dbus_message_is_signal (DBusMessage *message, + const char *iface, + const char *signal_name); +DBUS_EXPORT +dbus_bool_t dbus_message_is_error (DBusMessage *message, + const char *error_name); +DBUS_EXPORT +dbus_bool_t dbus_message_has_destination (DBusMessage *message, + const char *bus_name); +DBUS_EXPORT +dbus_bool_t dbus_message_has_sender (DBusMessage *message, + const char *unique_bus_name); +DBUS_EXPORT +dbus_bool_t dbus_message_has_signature (DBusMessage *message, + const char *signature); +DBUS_EXPORT +dbus_uint32_t dbus_message_get_serial (DBusMessage *message); +DBUS_EXPORT +void dbus_message_set_serial (DBusMessage *message, + dbus_uint32_t serial); +DBUS_EXPORT +dbus_bool_t dbus_message_set_reply_serial (DBusMessage *message, + dbus_uint32_t reply_serial); +DBUS_EXPORT +dbus_uint32_t dbus_message_get_reply_serial (DBusMessage *message); + +DBUS_EXPORT +void dbus_message_set_auto_start (DBusMessage *message, + dbus_bool_t auto_start); +DBUS_EXPORT +dbus_bool_t dbus_message_get_auto_start (DBusMessage *message); + +DBUS_EXPORT +dbus_bool_t dbus_message_get_path_decomposed (DBusMessage *message, + char ***path); + +DBUS_EXPORT +const char *dbus_message_get_container_instance (DBusMessage *message); +DBUS_EXPORT +dbus_bool_t dbus_message_set_container_instance (DBusMessage *message, + const char *object_path); + +DBUS_EXPORT +dbus_bool_t dbus_message_append_args (DBusMessage *message, + int first_arg_type, + ...); +DBUS_EXPORT +dbus_bool_t dbus_message_append_args_valist (DBusMessage *message, + int first_arg_type, + va_list var_args); +DBUS_EXPORT +dbus_bool_t dbus_message_get_args (DBusMessage *message, + DBusError *error, + int first_arg_type, + ...); +DBUS_EXPORT +dbus_bool_t dbus_message_get_args_valist (DBusMessage *message, + DBusError *error, + int first_arg_type, + va_list var_args); + +DBUS_EXPORT +dbus_bool_t dbus_message_contains_unix_fds (DBusMessage *message); + +DBUS_EXPORT +void dbus_message_iter_init_closed (DBusMessageIter *iter); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_init (DBusMessage *message, + DBusMessageIter *iter); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_has_next (DBusMessageIter *iter); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_next (DBusMessageIter *iter); +DBUS_EXPORT +char* dbus_message_iter_get_signature (DBusMessageIter *iter); +DBUS_EXPORT +int dbus_message_iter_get_arg_type (DBusMessageIter *iter); +DBUS_EXPORT +int dbus_message_iter_get_element_type (DBusMessageIter *iter); +DBUS_EXPORT +void dbus_message_iter_recurse (DBusMessageIter *iter, + DBusMessageIter *sub); +DBUS_EXPORT +void dbus_message_iter_get_basic (DBusMessageIter *iter, + void *value); +DBUS_EXPORT +int dbus_message_iter_get_element_count(DBusMessageIter *iter); + +#ifndef DBUS_DISABLE_DEPRECATED +/* This function returns the wire protocol size of the array in bytes, + * you do not want to know that probably + */ +DBUS_EXPORT +DBUS_DEPRECATED int dbus_message_iter_get_array_len (DBusMessageIter *iter); +#endif +DBUS_EXPORT +void dbus_message_iter_get_fixed_array (DBusMessageIter *iter, + void *value, + int *n_elements); + + +DBUS_EXPORT +void dbus_message_iter_init_append (DBusMessage *message, + DBusMessageIter *iter); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_append_basic (DBusMessageIter *iter, + int type, + const void *value); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_append_fixed_array (DBusMessageIter *iter, + int element_type, + const void *value, + int n_elements); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_open_container (DBusMessageIter *iter, + int type, + const char *contained_signature, + DBusMessageIter *sub); +DBUS_EXPORT +dbus_bool_t dbus_message_iter_close_container (DBusMessageIter *iter, + DBusMessageIter *sub); +DBUS_EXPORT +void dbus_message_iter_abandon_container (DBusMessageIter *iter, + DBusMessageIter *sub); + +DBUS_EXPORT +void dbus_message_iter_abandon_container_if_open (DBusMessageIter *iter, + DBusMessageIter *sub); + +DBUS_EXPORT +void dbus_message_lock (DBusMessage *message); + +DBUS_EXPORT +dbus_bool_t dbus_set_error_from_message (DBusError *error, + DBusMessage *message); + + +DBUS_EXPORT +dbus_bool_t dbus_message_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +void dbus_message_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +dbus_bool_t dbus_message_set_data (DBusMessage *message, + dbus_int32_t slot, + void *data, + DBusFreeFunction free_data_func); +DBUS_EXPORT +void* dbus_message_get_data (DBusMessage *message, + dbus_int32_t slot); + +DBUS_EXPORT +int dbus_message_type_from_string (const char *type_str); +DBUS_EXPORT +const char* dbus_message_type_to_string (int type); + +DBUS_EXPORT +dbus_bool_t dbus_message_marshal (DBusMessage *msg, + char **marshalled_data_p, + int *len_p); +DBUS_EXPORT +DBusMessage* dbus_message_demarshal (const char *str, + int len, + DBusError *error); + +DBUS_EXPORT +int dbus_message_demarshal_bytes_needed (const char *str, + int len); + +DBUS_EXPORT +void dbus_message_set_allow_interactive_authorization (DBusMessage *message, + dbus_bool_t allow); + +DBUS_EXPORT +dbus_bool_t dbus_message_get_allow_interactive_authorization ( + DBusMessage *message); + +/** + * Clear a variable or struct member that contains a #DBusMessage. + * If it does not contain #NULL, the message that was previously + * there is unreferenced with dbus_message_unref(). + * + * This is very similar to dbus_clear_connection(): see that function + * for more details. + * + * @param pointer_to_message A pointer to a variable or struct member. + * pointer_to_message must not be #NULL, but *pointer_to_message + * may be #NULL. + */ +static inline void +dbus_clear_message (DBusMessage **pointer_to_message) +{ + _dbus_clear_pointer_impl (DBusMessage, pointer_to_message, + dbus_message_unref); +} + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_MESSAGE_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-misc.h b/src/linux/vendor/dbus/dbus/dbus-misc.h new file mode 100644 index 0000000..3442ab7 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-misc.h @@ -0,0 +1,60 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-misc.h A few assorted public functions that don't fit elsewhere + * + * Copyright (C) 2006 Red Hat, Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_MISC_H +#define DBUS_MISC_H + +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusMisc + * @{ + */ +DBUS_EXPORT +char* dbus_get_local_machine_id (void); + +DBUS_EXPORT +void dbus_get_version (int *major_version_p, + int *minor_version_p, + int *micro_version_p); + +DBUS_EXPORT +dbus_bool_t dbus_setenv (const char *variable, + const char *value); + +DBUS_EXPORT +char *dbus_try_get_local_machine_id (DBusError *error); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_MISC_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-pending-call.h b/src/linux/vendor/dbus/dbus/dbus-pending-call.h new file mode 100644 index 0000000..3539a1f --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-pending-call.h @@ -0,0 +1,100 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-pending-call.h Object representing a call in progress. + * + * Copyright (C) 2002, 2003 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_PENDING_CALL_H +#define DBUS_PENDING_CALL_H + +#include +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusPendingCall + * @{ + */ + +#define DBUS_TIMEOUT_INFINITE ((int) 0x7fffffff) +#define DBUS_TIMEOUT_USE_DEFAULT (-1) + +DBUS_EXPORT +DBusPendingCall* dbus_pending_call_ref (DBusPendingCall *pending); +DBUS_EXPORT +void dbus_pending_call_unref (DBusPendingCall *pending); +DBUS_EXPORT +dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall *pending, + DBusPendingCallNotifyFunction function, + void *user_data, + DBusFreeFunction free_user_data); +DBUS_EXPORT +void dbus_pending_call_cancel (DBusPendingCall *pending); +DBUS_EXPORT +dbus_bool_t dbus_pending_call_get_completed (DBusPendingCall *pending); +DBUS_EXPORT +DBusMessage* dbus_pending_call_steal_reply (DBusPendingCall *pending); +DBUS_EXPORT +void dbus_pending_call_block (DBusPendingCall *pending); + +DBUS_EXPORT +dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +void dbus_pending_call_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +dbus_bool_t dbus_pending_call_set_data (DBusPendingCall *pending, + dbus_int32_t slot, + void *data, + DBusFreeFunction free_data_func); +DBUS_EXPORT +void* dbus_pending_call_get_data (DBusPendingCall *pending, + dbus_int32_t slot); + +/** + * Clear a variable or struct member that contains a #DBusPendingCall. + * If it does not contain #NULL, the pending call that was previously + * there is unreferenced with dbus_pending_call_unref(). + * + * This is very similar to dbus_clear_connection(): see that function + * for more details. + * + * @param pointer_to_pending_call A pointer to a variable or struct member. + * pointer_to_pending_call must not be #NULL, but *pointer_to_pending_call + * may be #NULL. + */ +static inline void +dbus_clear_pending_call (DBusPendingCall **pointer_to_pending_call) +{ + _dbus_clear_pointer_impl (DBusPendingCall, pointer_to_pending_call, + dbus_pending_call_unref); +} + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_PENDING_CALL_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-protocol.h b/src/linux/vendor/dbus/dbus/dbus-protocol.h new file mode 100644 index 0000000..33e39df --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-protocol.h @@ -0,0 +1,488 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-protocol.h D-Bus protocol constants + * + * Copyright (C) 2002, 2003 CodeFactory AB + * Copyright (C) 2004, 2005 Red Hat, Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_PROTOCOL_H +#define DBUS_PROTOCOL_H + +/* Don't include anything in here from anywhere else. It's + * intended for use by any random library. + */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* avoids confusing emacs indentation */ +#endif +#endif + +/* Normally docs are in .c files, but there isn't a .c file for this. */ +/** + * @defgroup DBusProtocol Protocol constants + * @ingroup DBus + * + * @brief Defines constants which are part of the D-Bus protocol + * + * This header is intended for use by any library, not only libdbus. + * + * @{ + */ + + +/* Message byte order */ +#define DBUS_LITTLE_ENDIAN ('l') /**< Code marking LSB-first byte order in the wire protocol. */ +#define DBUS_BIG_ENDIAN ('B') /**< Code marking MSB-first byte order in the wire protocol. */ + +/** Protocol version. */ +#define DBUS_MAJOR_PROTOCOL_VERSION 1 + +/** Type code that is never equal to a legitimate type code */ +#define DBUS_TYPE_INVALID ((int) '\0') +/** #DBUS_TYPE_INVALID as a string literal instead of a int literal */ +#define DBUS_TYPE_INVALID_AS_STRING "\0" + +/* Primitive types */ +/** Type code marking an 8-bit unsigned integer */ +#define DBUS_TYPE_BYTE ((int) 'y') +/** #DBUS_TYPE_BYTE as a string literal instead of a int literal */ +#define DBUS_TYPE_BYTE_AS_STRING "y" +/** Type code marking a boolean */ +#define DBUS_TYPE_BOOLEAN ((int) 'b') +/** #DBUS_TYPE_BOOLEAN as a string literal instead of a int literal */ +#define DBUS_TYPE_BOOLEAN_AS_STRING "b" +/** Type code marking a 16-bit signed integer */ +#define DBUS_TYPE_INT16 ((int) 'n') +/** #DBUS_TYPE_INT16 as a string literal instead of a int literal */ +#define DBUS_TYPE_INT16_AS_STRING "n" +/** Type code marking a 16-bit unsigned integer */ +#define DBUS_TYPE_UINT16 ((int) 'q') +/** #DBUS_TYPE_UINT16 as a string literal instead of a int literal */ +#define DBUS_TYPE_UINT16_AS_STRING "q" +/** Type code marking a 32-bit signed integer */ +#define DBUS_TYPE_INT32 ((int) 'i') +/** #DBUS_TYPE_INT32 as a string literal instead of a int literal */ +#define DBUS_TYPE_INT32_AS_STRING "i" +/** Type code marking a 32-bit unsigned integer */ +#define DBUS_TYPE_UINT32 ((int) 'u') +/** #DBUS_TYPE_UINT32 as a string literal instead of a int literal */ +#define DBUS_TYPE_UINT32_AS_STRING "u" +/** Type code marking a 64-bit signed integer */ +#define DBUS_TYPE_INT64 ((int) 'x') +/** #DBUS_TYPE_INT64 as a string literal instead of a int literal */ +#define DBUS_TYPE_INT64_AS_STRING "x" +/** Type code marking a 64-bit unsigned integer */ +#define DBUS_TYPE_UINT64 ((int) 't') +/** #DBUS_TYPE_UINT64 as a string literal instead of a int literal */ +#define DBUS_TYPE_UINT64_AS_STRING "t" +/** Type code marking an 8-byte double in IEEE 754 format */ +#define DBUS_TYPE_DOUBLE ((int) 'd') +/** #DBUS_TYPE_DOUBLE as a string literal instead of a int literal */ +#define DBUS_TYPE_DOUBLE_AS_STRING "d" +/** Type code marking a UTF-8 encoded, nul-terminated Unicode string */ +#define DBUS_TYPE_STRING ((int) 's') +/** #DBUS_TYPE_STRING as a string literal instead of a int literal */ +#define DBUS_TYPE_STRING_AS_STRING "s" +/** Type code marking a D-Bus object path */ +#define DBUS_TYPE_OBJECT_PATH ((int) 'o') +/** #DBUS_TYPE_OBJECT_PATH as a string literal instead of a int literal */ +#define DBUS_TYPE_OBJECT_PATH_AS_STRING "o" +/** Type code marking a D-Bus type signature */ +#define DBUS_TYPE_SIGNATURE ((int) 'g') +/** #DBUS_TYPE_SIGNATURE as a string literal instead of a int literal */ +#define DBUS_TYPE_SIGNATURE_AS_STRING "g" +/** Type code marking a unix file descriptor */ +#define DBUS_TYPE_UNIX_FD ((int) 'h') +/** #DBUS_TYPE_UNIX_FD as a string literal instead of a int literal */ +#define DBUS_TYPE_UNIX_FD_AS_STRING "h" + +/* Compound types */ +/** Type code marking a D-Bus array type */ +#define DBUS_TYPE_ARRAY ((int) 'a') +/** #DBUS_TYPE_ARRAY as a string literal instead of a int literal */ +#define DBUS_TYPE_ARRAY_AS_STRING "a" +/** Type code marking a D-Bus variant type */ +#define DBUS_TYPE_VARIANT ((int) 'v') +/** #DBUS_TYPE_VARIANT as a string literal instead of a int literal */ +#define DBUS_TYPE_VARIANT_AS_STRING "v" + +/** STRUCT and DICT_ENTRY are sort of special since their codes can't + * appear in a type string, instead + * DBUS_STRUCT_BEGIN_CHAR/DBUS_DICT_ENTRY_BEGIN_CHAR have to appear + */ +/** Type code used to represent a struct; however, this type code does not appear + * in type signatures, instead #DBUS_STRUCT_BEGIN_CHAR and #DBUS_STRUCT_END_CHAR will + * appear in a signature. + */ +#define DBUS_TYPE_STRUCT ((int) 'r') +/** #DBUS_TYPE_STRUCT as a string literal instead of a int literal */ +#define DBUS_TYPE_STRUCT_AS_STRING "r" +/** Type code used to represent a dict entry; however, this type code does not appear + * in type signatures, instead #DBUS_DICT_ENTRY_BEGIN_CHAR and #DBUS_DICT_ENTRY_END_CHAR will + * appear in a signature. + */ +#define DBUS_TYPE_DICT_ENTRY ((int) 'e') +/** #DBUS_TYPE_DICT_ENTRY as a string literal instead of a int literal */ +#define DBUS_TYPE_DICT_ENTRY_AS_STRING "e" + +/** Does not include #DBUS_TYPE_INVALID, #DBUS_STRUCT_BEGIN_CHAR, #DBUS_STRUCT_END_CHAR, + * #DBUS_DICT_ENTRY_BEGIN_CHAR, or #DBUS_DICT_ENTRY_END_CHAR - i.e. it is the number of + * valid types, not the number of distinct characters that may appear in a type signature. + */ +#define DBUS_NUMBER_OF_TYPES (16) + +/* characters other than typecodes that appear in type signatures */ + +/** Code marking the start of a struct type in a type signature */ +#define DBUS_STRUCT_BEGIN_CHAR ((int) '(') +/** #DBUS_STRUCT_BEGIN_CHAR as a string literal instead of a int literal */ +#define DBUS_STRUCT_BEGIN_CHAR_AS_STRING "(" +/** Code marking the end of a struct type in a type signature */ +#define DBUS_STRUCT_END_CHAR ((int) ')') +/** #DBUS_STRUCT_END_CHAR a string literal instead of a int literal */ +#define DBUS_STRUCT_END_CHAR_AS_STRING ")" +/** Code marking the start of a dict entry type in a type signature */ +#define DBUS_DICT_ENTRY_BEGIN_CHAR ((int) '{') +/** #DBUS_DICT_ENTRY_BEGIN_CHAR as a string literal instead of a int literal */ +#define DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING "{" +/** Code marking the end of a dict entry type in a type signature */ +#define DBUS_DICT_ENTRY_END_CHAR ((int) '}') +/** #DBUS_DICT_ENTRY_END_CHAR as a string literal instead of a int literal */ +#define DBUS_DICT_ENTRY_END_CHAR_AS_STRING "}" + +/** Max length in bytes of a bus name, interface, or member (not object + * path, paths are unlimited). This is limited because lots of stuff + * is O(n) in this number, plus it would be obnoxious to type in a + * paragraph-long method name so most likely something like that would + * be an exploit. + */ +#define DBUS_MAXIMUM_NAME_LENGTH 255 + +/** This one is 255 so it fits in a byte */ +#define DBUS_MAXIMUM_SIGNATURE_LENGTH 255 + +/** Max length of a match rule string; to keep people from hosing the + * daemon with some huge rule + */ +#define DBUS_MAXIMUM_MATCH_RULE_LENGTH 1024 + +/** Max arg number you can match on in a match rule, e.g. + * arg0='hello' is OK, arg3489720987='hello' is not + */ +#define DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER 63 + +/** Max length of a marshaled array in bytes (64M, 2^26) We use signed + * int for lengths so must be INT_MAX or less. We need something a + * bit smaller than INT_MAX because the array is inside a message with + * header info, etc. so an INT_MAX array wouldn't allow the message + * overhead. The 64M number is an attempt at a larger number than + * we'd reasonably ever use, but small enough that your bus would chew + * through it fairly quickly without locking up forever. If you have + * data that's likely to be larger than this, you should probably be + * sending it in multiple incremental messages anyhow. + */ +#define DBUS_MAXIMUM_ARRAY_LENGTH (67108864) +/** Number of bits you need in an unsigned to store the max array size */ +#define DBUS_MAXIMUM_ARRAY_LENGTH_BITS 26 + +/** The maximum total message size including header and body; similar + * rationale to max array size. + */ +#define DBUS_MAXIMUM_MESSAGE_LENGTH (DBUS_MAXIMUM_ARRAY_LENGTH * 2) +/** Number of bits you need in an unsigned to store the max message size */ +#define DBUS_MAXIMUM_MESSAGE_LENGTH_BITS 27 + +/** The maximum total number of unix fds in a message. Similar + * rationale as DBUS_MAXIMUM_MESSAGE_LENGTH. However we divide by four + * given that one fd is an int and hence at least 32 bits. + */ +#define DBUS_MAXIMUM_MESSAGE_UNIX_FDS (DBUS_MAXIMUM_MESSAGE_LENGTH/4) +/** Number of bits you need in an unsigned to store the max message unix fds */ +#define DBUS_MAXIMUM_MESSAGE_UNIX_FDS_BITS (DBUS_MAXIMUM_MESSAGE_LENGTH_BITS-2) + +/** Depth of recursion in the type tree. This is automatically limited + * to DBUS_MAXIMUM_SIGNATURE_LENGTH since you could only have an array + * of array of array of ... that fit in the max signature. But that's + * probably a bit too large. + */ +#define DBUS_MAXIMUM_TYPE_RECURSION_DEPTH 32 + +/* Types of message */ + +/** This value is never a valid message type, see dbus_message_get_type() */ +#define DBUS_MESSAGE_TYPE_INVALID 0 +/** Message type of a method call message, see dbus_message_get_type() */ +#define DBUS_MESSAGE_TYPE_METHOD_CALL 1 +/** Message type of a method return message, see dbus_message_get_type() */ +#define DBUS_MESSAGE_TYPE_METHOD_RETURN 2 +/** Message type of an error reply message, see dbus_message_get_type() */ +#define DBUS_MESSAGE_TYPE_ERROR 3 +/** Message type of a signal message, see dbus_message_get_type() */ +#define DBUS_MESSAGE_TYPE_SIGNAL 4 + +#define DBUS_NUM_MESSAGE_TYPES 5 + +/* Header flags */ + +/** If set, this flag means that the sender of a message does not care about getting + * a reply, so the recipient need not send one. See dbus_message_set_no_reply(). + */ +#define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1 +/** + * If set, this flag means that even if the message bus knows how to start an owner for + * the destination bus name (see dbus_message_set_destination()), it should not + * do so. If this flag is not set, the bus may launch a program to process the + * message. + */ +#define DBUS_HEADER_FLAG_NO_AUTO_START 0x2 +/** + * If set on a method call, this flag means that the caller is prepared to + * wait for interactive authorization. + */ +#define DBUS_HEADER_FLAG_ALLOW_INTERACTIVE_AUTHORIZATION 0x4 + +/* Header fields */ + +/** Not equal to any valid header field code */ +#define DBUS_HEADER_FIELD_INVALID 0 +/** Header field code for the path - the path is the object emitting a signal or the object receiving a method call. + * See dbus_message_set_path(). + */ +#define DBUS_HEADER_FIELD_PATH 1 +/** Header field code for the interface containing a member (method or signal). + * See dbus_message_set_interface(). + */ +#define DBUS_HEADER_FIELD_INTERFACE 2 +/** Header field code for a member (method or signal). See dbus_message_set_member(). */ +#define DBUS_HEADER_FIELD_MEMBER 3 +/** Header field code for an error name (found in #DBUS_MESSAGE_TYPE_ERROR messages). + * See dbus_message_set_error_name(). + */ +#define DBUS_HEADER_FIELD_ERROR_NAME 4 +/** Header field code for a reply serial, used to match a #DBUS_MESSAGE_TYPE_METHOD_RETURN message with the + * message that it's a reply to. See dbus_message_set_reply_serial(). + */ +#define DBUS_HEADER_FIELD_REPLY_SERIAL 5 +/** + * Header field code for the destination bus name of a message. See dbus_message_set_destination(). + */ +#define DBUS_HEADER_FIELD_DESTINATION 6 +/** + * Header field code for the sender of a message; usually initialized by the message bus. + * See dbus_message_set_sender(). + */ +#define DBUS_HEADER_FIELD_SENDER 7 +/** + * Header field code for the type signature of a message. + */ +#define DBUS_HEADER_FIELD_SIGNATURE 8 +/** + * Header field code for the number of unix file descriptors associated + * with this message. + */ +#define DBUS_HEADER_FIELD_UNIX_FDS 9 +/** + * Header field code for the container instance that sent this message. + */ +#define DBUS_HEADER_FIELD_CONTAINER_INSTANCE 10 + + +/** + * Value of the highest-numbered header field code, can be used to determine + * the size of an array indexed by header field code. Remember though + * that unknown codes must be ignored, so check for that before + * indexing the array. + */ +#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_CONTAINER_INSTANCE + +/** Header format is defined as a signature: + * byte byte order + * byte message type ID + * byte flags + * byte protocol version + * uint32 body length + * uint32 serial + * array of struct (byte,variant) (field name, value) + * + * The length of the header can be computed as the + * fixed size of the initial data, plus the length of + * the array at the end, plus padding to an 8-boundary. + */ +#define DBUS_HEADER_SIGNATURE \ + DBUS_TYPE_BYTE_AS_STRING \ + DBUS_TYPE_BYTE_AS_STRING \ + DBUS_TYPE_BYTE_AS_STRING \ + DBUS_TYPE_BYTE_AS_STRING \ + DBUS_TYPE_UINT32_AS_STRING \ + DBUS_TYPE_UINT32_AS_STRING \ + DBUS_TYPE_ARRAY_AS_STRING \ + DBUS_STRUCT_BEGIN_CHAR_AS_STRING \ + DBUS_TYPE_BYTE_AS_STRING \ + DBUS_TYPE_VARIANT_AS_STRING \ + DBUS_STRUCT_END_CHAR_AS_STRING + + +/** + * The smallest header size that can occur. (It won't be valid due to + * missing required header fields.) This is 4 bytes, two uint32, an + * array length. This isn't any kind of resource limit, just the + * necessary/logical outcome of the header signature. + */ +#define DBUS_MINIMUM_HEADER_SIZE 16 + +/* Errors */ +/* WARNING these get autoconverted to an enum in dbus-glib.h. Thus, + * if you change the order it breaks the ABI. Keep them in order. + * Also, don't change the formatting since that will break the sed + * script. + */ +/** A generic error; "something went wrong" - see the error message for more. */ +#define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed" +/** There was not enough memory to complete an operation. */ +#define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory" +/** The bus doesn't know how to launch a service to supply the bus name you wanted. */ +#define DBUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown" +/** The bus name you referenced doesn't exist (i.e. no application owns it). */ +#define DBUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner" +/** No reply to a message expecting one, usually means a timeout occurred. */ +#define DBUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply" +/** Something went wrong reading or writing to a socket, for example. */ +#define DBUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError" +/** A D-Bus bus address was malformed. */ +#define DBUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress" +/** Requested operation isn't supported (like ENOSYS on UNIX). */ +#define DBUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported" +/** Some limited resource is exhausted. */ +#define DBUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded" +/** Security restrictions don't allow doing what you're trying to do. */ +#define DBUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied" +/** Authentication didn't work. */ +#define DBUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed" +/** Unable to connect to server (probably caused by ECONNREFUSED on a socket). */ +#define DBUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer" +/** Certain timeout errors, possibly ETIMEDOUT on a socket. + * Note that #DBUS_ERROR_NO_REPLY is used for message reply timeouts. + * @warning this is confusingly-named given that #DBUS_ERROR_TIMED_OUT also exists. We can't fix + * it for compatibility reasons so just be careful. + */ +#define DBUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout" +/** No network access (probably ENETUNREACH on a socket). */ +#define DBUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork" +/** Can't bind a socket since its address is in use (i.e. EADDRINUSE). */ +#define DBUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse" +/** The connection is disconnected and you're trying to use it. */ +#define DBUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected" +/** Invalid arguments passed to a method call. */ +#define DBUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs" +/** Missing file. */ +#define DBUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound" +/** Existing file and the operation you're using does not silently overwrite. */ +#define DBUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists" +/** Method name you invoked isn't known by the object you invoked it on. */ +#define DBUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod" +/** Object you invoked a method on isn't known. */ +#define DBUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject" +/** Interface you invoked a method on isn't known by the object. */ +#define DBUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface" +/** Property you tried to access isn't known by the object. */ +#define DBUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty" +/** Property you tried to set is read-only. */ +#define DBUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly" +/** Certain timeout errors, e.g. while starting a service. + * @warning this is confusingly-named given that #DBUS_ERROR_TIMEOUT also exists. We can't fix + * it for compatibility reasons so just be careful. + */ +#define DBUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut" +/** Tried to remove or modify a match rule that didn't exist. */ +#define DBUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound" +/** The match rule isn't syntactically valid. */ +#define DBUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid" +/** While starting a new process, the exec() call failed. */ +#define DBUS_ERROR_SPAWN_EXEC_FAILED "org.freedesktop.DBus.Error.Spawn.ExecFailed" +/** While starting a new process, the fork() call failed. */ +#define DBUS_ERROR_SPAWN_FORK_FAILED "org.freedesktop.DBus.Error.Spawn.ForkFailed" +/** While starting a new process, the child exited with a status code. */ +#define DBUS_ERROR_SPAWN_CHILD_EXITED "org.freedesktop.DBus.Error.Spawn.ChildExited" +/** While starting a new process, the child exited on a signal. */ +#define DBUS_ERROR_SPAWN_CHILD_SIGNALED "org.freedesktop.DBus.Error.Spawn.ChildSignaled" +/** While starting a new process, something went wrong. */ +#define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed" +/** We failed to setup the environment correctly. */ +#define DBUS_ERROR_SPAWN_SETUP_FAILED "org.freedesktop.DBus.Error.Spawn.FailedToSetup" +/** We failed to setup the config parser correctly. */ +#define DBUS_ERROR_SPAWN_CONFIG_INVALID "org.freedesktop.DBus.Error.Spawn.ConfigInvalid" +/** Bus name was not valid. */ +#define DBUS_ERROR_SPAWN_SERVICE_INVALID "org.freedesktop.DBus.Error.Spawn.ServiceNotValid" +/** Service file not found in system-services directory. */ +#define DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.Spawn.ServiceNotFound" +/** Permissions are incorrect on the setuid helper. */ +#define DBUS_ERROR_SPAWN_PERMISSIONS_INVALID "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid" +/** Service file invalid (Name, User or Exec missing). */ +#define DBUS_ERROR_SPAWN_FILE_INVALID "org.freedesktop.DBus.Error.Spawn.FileInvalid" +/** There was not enough memory to complete the operation. */ +#define DBUS_ERROR_SPAWN_NO_MEMORY "org.freedesktop.DBus.Error.Spawn.NoMemory" +/** Tried to get a UNIX process ID and it wasn't available. */ +#define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown" +/** A type signature is not valid. */ +#define DBUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature" +/** A file contains invalid syntax or is otherwise broken. */ +#define DBUS_ERROR_INVALID_FILE_CONTENT "org.freedesktop.DBus.Error.InvalidFileContent" +/** Asked for SELinux security context and it wasn't available. */ +#define DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown" +/** Asked for ADT audit data and it wasn't available. */ +#define DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN "org.freedesktop.DBus.Error.AdtAuditDataUnknown" +/** There's already an object with the requested object path. */ +#define DBUS_ERROR_OBJECT_PATH_IN_USE "org.freedesktop.DBus.Error.ObjectPathInUse" +/** The message meta data does not match the payload. e.g. expected + number of file descriptors were not sent over the socket this message was received on. */ +#define DBUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage" +/** The message is not allowed without performing interactive authorization, + * but could have succeeded if an interactive authorization step was + * allowed. */ +#define DBUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED "org.freedesktop.DBus.Error.InteractiveAuthorizationRequired" +/** The connection is not from a container, or the specified container instance + * does not exist. */ +#define DBUS_ERROR_NOT_CONTAINER "org.freedesktop.DBus.Error.NotContainer" + +/* XML introspection format */ + +/** XML namespace of the introspection format version 1.0 */ +#define DBUS_INTROSPECT_1_0_XML_NAMESPACE "http://www.freedesktop.org/standards/dbus" +/** XML public identifier of the introspection format version 1.0 */ +#define DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" +/** XML system identifier of the introspection format version 1.0 */ +#define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd" +/** XML document type declaration of the introspection format version 1.0 */ +#define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "\n" + +/** @} */ + +#ifdef __cplusplus +#if 0 +{ /* avoids confusing emacs indentation */ +#endif +} +#endif + +#endif /* DBUS_PROTOCOL_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-server.h b/src/linux/vendor/dbus/dbus/dbus-server.h new file mode 100644 index 0000000..1f8c594 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-server.h @@ -0,0 +1,127 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-server.h DBusServer object + * + * Copyright (C) 2002, 2003 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_SERVER_H +#define DBUS_SERVER_H + +#include +#include +#include +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusServer + * @{ + */ + +typedef struct DBusServer DBusServer; + +/** Called when a new connection to the server is available. Must reference and save the new + * connection, or close the new connection. Set with dbus_server_set_new_connection_function(). + */ +typedef void (* DBusNewConnectionFunction) (DBusServer *server, + DBusConnection *new_connection, + void *data); + +DBUS_EXPORT +DBusServer* dbus_server_listen (const char *address, + DBusError *error); +DBUS_EXPORT +DBusServer* dbus_server_ref (DBusServer *server); +DBUS_EXPORT +void dbus_server_unref (DBusServer *server); +DBUS_EXPORT +void dbus_server_disconnect (DBusServer *server); +DBUS_EXPORT +dbus_bool_t dbus_server_get_is_connected (DBusServer *server); +DBUS_EXPORT +char* dbus_server_get_address (DBusServer *server); +DBUS_EXPORT +char* dbus_server_get_id (DBusServer *server); +DBUS_EXPORT +void dbus_server_set_new_connection_function (DBusServer *server, + DBusNewConnectionFunction function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_server_set_watch_functions (DBusServer *server, + DBusAddWatchFunction add_function, + DBusRemoveWatchFunction remove_function, + DBusWatchToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server, + DBusAddTimeoutFunction add_function, + DBusRemoveTimeoutFunction remove_function, + DBusTimeoutToggledFunction toggled_function, + void *data, + DBusFreeFunction free_data_function); +DBUS_EXPORT +dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server, + const char **mechanisms); + +DBUS_EXPORT +dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +void dbus_server_free_data_slot (dbus_int32_t *slot_p); +DBUS_EXPORT +dbus_bool_t dbus_server_set_data (DBusServer *server, + int slot, + void *data, + DBusFreeFunction free_data_func); +DBUS_EXPORT +void* dbus_server_get_data (DBusServer *server, + int slot); + +/** + * Clear a variable or struct member that contains a #DBusServer. + * If it does not contain #NULL, the server that was previously + * there is unreferenced with dbus_server_unref(). + * + * This is very similar to dbus_clear_connection(): see that function + * for more details. + * + * @param pointer_to_server A pointer to a variable or struct member. + * pointer_to_server must not be #NULL, but *pointer_to_server + * may be #NULL. + */ +static inline void +dbus_clear_server (DBusServer **pointer_to_server) +{ + _dbus_clear_pointer_impl (DBusServer, pointer_to_server, dbus_server_unref); +} + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_SERVER_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-shared.h b/src/linux/vendor/dbus/dbus/dbus-shared.h new file mode 100644 index 0000000..87c0bd8 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-shared.h @@ -0,0 +1,138 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-shared.h Stuff used by both dbus/dbus.h low-level and C/C++ binding APIs + * + * Copyright (C) 2004 Red Hat, Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_SHARED_H +#define DBUS_SHARED_H + +/* Don't include anything in here from anywhere else. It's + * intended for use by any random library. + */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* avoids confusing emacs indentation */ +#endif +#endif + +/* Normally docs are in .c files, but there isn't a .c file for this. */ +/** + * @defgroup DBusShared Shared constants + * @ingroup DBus + * + * @brief Shared header included by both libdbus and C/C++ bindings such as the GLib bindings. + * + * Usually a C/C++ binding such as the GLib or Qt binding won't want to include dbus.h in its + * public headers. However, a few constants and macros may be useful to include; those are + * found here and in dbus-protocol.h + * + * @{ + */ + + +/** + * Well-known bus types. See dbus_bus_get(). + */ +typedef enum +{ + DBUS_BUS_SESSION, /**< The login session bus */ + DBUS_BUS_SYSTEM, /**< The systemwide bus */ + DBUS_BUS_STARTER /**< The bus that started us, if any */ +} DBusBusType; + +/** + * Results that a message handler can return. + */ +typedef enum +{ + DBUS_HANDLER_RESULT_HANDLED, /**< Message has had its effect - no need to run more handlers. */ + DBUS_HANDLER_RESULT_NOT_YET_HANDLED, /**< Message has not had any effect - see if other handlers want it. */ + DBUS_HANDLER_RESULT_NEED_MEMORY /**< Need more memory in order to return #DBUS_HANDLER_RESULT_HANDLED or #DBUS_HANDLER_RESULT_NOT_YET_HANDLED. Please try again later with more memory. */ +} DBusHandlerResult; + +/* Bus names */ + +/** The bus name used to talk to the bus itself. */ +#define DBUS_SERVICE_DBUS "org.freedesktop.DBus" + +/* Paths */ +/** The object path used to talk to the bus itself. */ +#define DBUS_PATH_DBUS "/org/freedesktop/DBus" +/** The object path used in local/in-process-generated messages. */ +#define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local" + +/* Interfaces, these #define don't do much other than + * catch typos at compile time + */ +/** The interface exported by the object with #DBUS_SERVICE_DBUS and #DBUS_PATH_DBUS */ +#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" +/** The monitoring interface exported by the dbus-daemon */ +#define DBUS_INTERFACE_MONITORING "org.freedesktop.DBus.Monitoring" + +/** The verbose interface exported by the dbus-daemon */ +#define DBUS_INTERFACE_VERBOSE "org.freedesktop.DBus.Verbose" +/** The interface supported by introspectable objects */ +#define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable" +/** The interface supported by objects with properties */ +#define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties" +/** The interface supported by most dbus peers */ +#define DBUS_INTERFACE_PEER "org.freedesktop.DBus.Peer" + +/** This is a special interface whose methods can only be invoked + * by the local implementation (messages from remote apps aren't + * allowed to specify this interface). + */ +#define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local" + +/* Owner flags */ +#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */ +#define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2 /**< Request to replace the current primary owner */ +#define DBUS_NAME_FLAG_DO_NOT_QUEUE 0x4 /**< If we can not become the primary owner do not place us in the queue */ + +/* Replies to request for a name */ +#define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1 /**< Service has become the primary owner of the requested name */ +#define DBUS_REQUEST_NAME_REPLY_IN_QUEUE 2 /**< Service could not become the primary owner and has been placed in the queue */ +#define DBUS_REQUEST_NAME_REPLY_EXISTS 3 /**< Service is already in the queue */ +#define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4 /**< Service is already the primary owner */ + +/* Replies to releasing a name */ +#define DBUS_RELEASE_NAME_REPLY_RELEASED 1 /**< Service was released from the given name */ +#define DBUS_RELEASE_NAME_REPLY_NON_EXISTENT 2 /**< The given name does not exist on the bus */ +#define DBUS_RELEASE_NAME_REPLY_NOT_OWNER 3 /**< Service is not an owner of the given name */ + +/* Replies to service starts */ +#define DBUS_START_REPLY_SUCCESS 1 /**< Service was auto started */ +#define DBUS_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */ + +/** @} */ + +#ifdef __cplusplus +#if 0 +{ /* avoids confusing emacs indentation */ +#endif +} +#endif + +#endif /* DBUS_SHARED_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-signature.h b/src/linux/vendor/dbus/dbus/dbus-signature.h new file mode 100644 index 0000000..a8a0486 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-signature.h @@ -0,0 +1,97 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-signatures.h utility functions for D-Bus types + * + * Copyright (C) 2005 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_SIGNATURES_H +#define DBUS_SIGNATURES_H + +#include +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusSignature + * @{ + */ + +/** + * DBusSignatureIter struct; contains no public fields + */ +typedef struct +{ + void *dummy1; /**< Don't use this */ + void *dummy2; /**< Don't use this */ + dbus_uint32_t dummy8; /**< Don't use this */ + int dummy12; /**< Don't use this */ + int dummy17; /**< Don't use this */ +} DBusSignatureIter; + +DBUS_EXPORT +void dbus_signature_iter_init (DBusSignatureIter *iter, + const char *signature); + +DBUS_EXPORT +int dbus_signature_iter_get_current_type (const DBusSignatureIter *iter); + +DBUS_EXPORT +char * dbus_signature_iter_get_signature (const DBusSignatureIter *iter); + +DBUS_EXPORT +int dbus_signature_iter_get_element_type (const DBusSignatureIter *iter); + +DBUS_EXPORT +dbus_bool_t dbus_signature_iter_next (DBusSignatureIter *iter); + +DBUS_EXPORT +void dbus_signature_iter_recurse (const DBusSignatureIter *iter, + DBusSignatureIter *subiter); + +DBUS_EXPORT +dbus_bool_t dbus_signature_validate (const char *signature, + DBusError *error); + +DBUS_EXPORT +dbus_bool_t dbus_signature_validate_single (const char *signature, + DBusError *error); + +DBUS_EXPORT +dbus_bool_t dbus_type_is_valid (int typecode); + +DBUS_EXPORT +dbus_bool_t dbus_type_is_basic (int typecode); +DBUS_EXPORT +dbus_bool_t dbus_type_is_container (int typecode); +DBUS_EXPORT +dbus_bool_t dbus_type_is_fixed (int typecode); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_SIGNATURE_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-syntax.h b/src/linux/vendor/dbus/dbus/dbus-syntax.h new file mode 100644 index 0000000..57459b1 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-syntax.h @@ -0,0 +1,60 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-syntax.h - utility functions for strings with special syntax + * + * Author: Simon McVittie + * Copyright © 2011 Nokia Corporation + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_SYNTAX_H +#define DBUS_SYNTAX_H + +#include +#include +#include + +DBUS_BEGIN_DECLS + +DBUS_EXPORT +dbus_bool_t dbus_validate_path (const char *path, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_validate_interface (const char *name, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_validate_member (const char *name, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_validate_error_name (const char *name, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_validate_bus_name (const char *name, + DBusError *error); +DBUS_EXPORT +dbus_bool_t dbus_validate_utf8 (const char *alleged_utf8, + DBusError *error); + +DBUS_END_DECLS + +#endif /* multiple-inclusion guard */ diff --git a/src/linux/vendor/dbus/dbus/dbus-threads.h b/src/linux/vendor/dbus/dbus/dbus-threads.h new file mode 100644 index 0000000..33e1e32 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-threads.h @@ -0,0 +1,191 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-threads.h D-Bus threads handling + * + * Copyright (C) 2002 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_THREADS_H +#define DBUS_THREADS_H + +#include +#include + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusThreads + * @{ + */ + +/** An opaque mutex type provided by the #DBusThreadFunctions implementation installed by dbus_threads_init(). */ +typedef struct DBusMutex DBusMutex; +/** An opaque condition variable type provided by the #DBusThreadFunctions implementation installed by dbus_threads_init(). */ +typedef struct DBusCondVar DBusCondVar; + +/** Deprecated, provide DBusRecursiveMutexNewFunction instead. */ +typedef DBusMutex* (* DBusMutexNewFunction) (void); +/** Deprecated, provide DBusRecursiveMutexFreeFunction instead. */ +typedef void (* DBusMutexFreeFunction) (DBusMutex *mutex); +/** Deprecated, provide DBusRecursiveMutexLockFunction instead. Return value is lock success, but gets ignored in practice. */ +typedef dbus_bool_t (* DBusMutexLockFunction) (DBusMutex *mutex); +/** Deprecated, provide DBusRecursiveMutexUnlockFunction instead. Return value is unlock success, but gets ignored in practice. */ +typedef dbus_bool_t (* DBusMutexUnlockFunction) (DBusMutex *mutex); + +/** Creates a new recursively-lockable mutex, or returns #NULL if not + * enough memory. Can only fail due to lack of memory. Found in + * #DBusThreadFunctions. Do not just use PTHREAD_MUTEX_RECURSIVE for + * this, because it does not save/restore the recursion count when + * waiting on a condition. libdbus requires the Java-style behavior + * where the mutex is fully unlocked to wait on a condition. + */ +typedef DBusMutex* (* DBusRecursiveMutexNewFunction) (void); +/** Frees a recursively-lockable mutex. Found in #DBusThreadFunctions. + */ +typedef void (* DBusRecursiveMutexFreeFunction) (DBusMutex *mutex); +/** Locks a recursively-lockable mutex. Found in #DBusThreadFunctions. + * Can only fail due to lack of memory. + */ +typedef void (* DBusRecursiveMutexLockFunction) (DBusMutex *mutex); +/** Unlocks a recursively-lockable mutex. Found in #DBusThreadFunctions. + * Can only fail due to lack of memory. + */ +typedef void (* DBusRecursiveMutexUnlockFunction) (DBusMutex *mutex); + +/** Creates a new condition variable. Found in #DBusThreadFunctions. + * Can only fail (returning #NULL) due to lack of memory. + */ +typedef DBusCondVar* (* DBusCondVarNewFunction) (void); +/** Frees a condition variable. Found in #DBusThreadFunctions. + */ +typedef void (* DBusCondVarFreeFunction) (DBusCondVar *cond); + +/** Waits on a condition variable. Found in + * #DBusThreadFunctions. Must work with either a recursive or + * nonrecursive mutex, whichever the thread implementation + * provides. Note that PTHREAD_MUTEX_RECURSIVE does not work with + * condition variables (does not save/restore the recursion count) so + * don't try using simply pthread_cond_wait() and a + * PTHREAD_MUTEX_RECURSIVE to implement this, it won't work right. + * + * Has no error conditions. Must succeed if it returns. + */ +typedef void (* DBusCondVarWaitFunction) (DBusCondVar *cond, + DBusMutex *mutex); + +/** Waits on a condition variable with a timeout. Found in + * #DBusThreadFunctions. Returns #TRUE if the wait did not + * time out, and #FALSE if it did. + * + * Has no error conditions. Must succeed if it returns. + */ +typedef dbus_bool_t (* DBusCondVarWaitTimeoutFunction) (DBusCondVar *cond, + DBusMutex *mutex, + int timeout_milliseconds); +/** Wakes one waiting thread on a condition variable. Found in #DBusThreadFunctions. + * + * Has no error conditions. Must succeed if it returns. + */ +typedef void (* DBusCondVarWakeOneFunction) (DBusCondVar *cond); + +/** Wakes all waiting threads on a condition variable. Found in #DBusThreadFunctions. + * + * Has no error conditions. Must succeed if it returns. + */ +typedef void (* DBusCondVarWakeAllFunction) (DBusCondVar *cond); + +/** + * Flags indicating which functions are present in #DBusThreadFunctions. Used to allow + * the library to detect older callers of dbus_threads_init() if new possible functions + * are added to #DBusThreadFunctions. + */ +typedef enum +{ + DBUS_THREAD_FUNCTIONS_MUTEX_NEW_MASK = 1 << 0, + DBUS_THREAD_FUNCTIONS_MUTEX_FREE_MASK = 1 << 1, + DBUS_THREAD_FUNCTIONS_MUTEX_LOCK_MASK = 1 << 2, + DBUS_THREAD_FUNCTIONS_MUTEX_UNLOCK_MASK = 1 << 3, + DBUS_THREAD_FUNCTIONS_CONDVAR_NEW_MASK = 1 << 4, + DBUS_THREAD_FUNCTIONS_CONDVAR_FREE_MASK = 1 << 5, + DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_MASK = 1 << 6, + DBUS_THREAD_FUNCTIONS_CONDVAR_WAIT_TIMEOUT_MASK = 1 << 7, + DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ONE_MASK = 1 << 8, + DBUS_THREAD_FUNCTIONS_CONDVAR_WAKE_ALL_MASK = 1 << 9, + DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_NEW_MASK = 1 << 10, + DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_FREE_MASK = 1 << 11, + DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_LOCK_MASK = 1 << 12, + DBUS_THREAD_FUNCTIONS_RECURSIVE_MUTEX_UNLOCK_MASK = 1 << 13, + DBUS_THREAD_FUNCTIONS_ALL_MASK = (1 << 14) - 1 +} DBusThreadFunctionsMask; + +/** + * Functions that must be implemented to make the D-Bus library + * thread-aware. + * + * If you supply both recursive and non-recursive mutexes, + * libdbus will use the non-recursive version for condition variables, + * and the recursive version in other contexts. + * + * The condition variable functions have to work with nonrecursive + * mutexes if you provide those, or with recursive mutexes if you + * don't. + */ +typedef struct +{ + unsigned int mask; /**< Mask indicating which functions are present. */ + + DBusMutexNewFunction mutex_new; /**< Function to create a mutex; optional and deprecated. */ + DBusMutexFreeFunction mutex_free; /**< Function to free a mutex; optional and deprecated. */ + DBusMutexLockFunction mutex_lock; /**< Function to lock a mutex; optional and deprecated. */ + DBusMutexUnlockFunction mutex_unlock; /**< Function to unlock a mutex; optional and deprecated. */ + + DBusCondVarNewFunction condvar_new; /**< Function to create a condition variable */ + DBusCondVarFreeFunction condvar_free; /**< Function to free a condition variable */ + DBusCondVarWaitFunction condvar_wait; /**< Function to wait on a condition */ + DBusCondVarWaitTimeoutFunction condvar_wait_timeout; /**< Function to wait on a condition with a timeout */ + DBusCondVarWakeOneFunction condvar_wake_one; /**< Function to wake one thread waiting on the condition */ + DBusCondVarWakeAllFunction condvar_wake_all; /**< Function to wake all threads waiting on the condition */ + + DBusRecursiveMutexNewFunction recursive_mutex_new; /**< Function to create a recursive mutex */ + DBusRecursiveMutexFreeFunction recursive_mutex_free; /**< Function to free a recursive mutex */ + DBusRecursiveMutexLockFunction recursive_mutex_lock; /**< Function to lock a recursive mutex */ + DBusRecursiveMutexUnlockFunction recursive_mutex_unlock; /**< Function to unlock a recursive mutex */ + + void (* padding1) (void); /**< Reserved for future expansion */ + void (* padding2) (void); /**< Reserved for future expansion */ + void (* padding3) (void); /**< Reserved for future expansion */ + void (* padding4) (void); /**< Reserved for future expansion */ + +} DBusThreadFunctions; + +DBUS_EXPORT +dbus_bool_t dbus_threads_init (const DBusThreadFunctions *functions); +DBUS_EXPORT +dbus_bool_t dbus_threads_init_default (void); + +/** @} */ + +DBUS_END_DECLS + +#endif /* DBUS_THREADS_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus-types.h b/src/linux/vendor/dbus/dbus/dbus-types.h new file mode 100644 index 0000000..5ace273 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus-types.h @@ -0,0 +1,179 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-types.h types such as dbus_bool_t + * + * Copyright (C) 2002 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) +#error "Only can be included directly, this file may disappear or change contents." +#endif + +#ifndef DBUS_TYPES_H +#define DBUS_TYPES_H + +#include +#include + +typedef dbus_uint32_t dbus_unichar_t; +/* boolean size must be fixed at 4 bytes due to wire protocol! */ +typedef dbus_uint32_t dbus_bool_t; + +/* Normally docs are in .c files, but there isn't a .c file for this. */ +/** + * @defgroup DBusTypes Basic types + * @ingroup DBus + * @brief dbus_bool_t, dbus_int32_t, etc. + * + * Typedefs for common primitive types. + * + * @{ + */ + +/** + * @typedef dbus_bool_t + * + * A boolean, valid values are #TRUE and #FALSE. + */ + +/** + * @typedef dbus_uint32_t + * + * A 32-bit unsigned integer on all platforms. + */ + +/** + * @typedef dbus_int32_t + * + * A 32-bit signed integer on all platforms. + */ + +/** + * @typedef dbus_uint16_t + * + * A 16-bit unsigned integer on all platforms. + */ + +/** + * @typedef dbus_int16_t + * + * A 16-bit signed integer on all platforms. + */ + + +/** + * @typedef dbus_uint64_t + * + * A 64-bit unsigned integer. + */ + +/** + * @typedef dbus_int64_t + * + * A 64-bit signed integer. + */ + +/** + * @def DBUS_HAVE_INT64 + * + * Always defined. + * + * In older libdbus versions, this would be undefined if there was no + * 64-bit integer type on that platform. libdbus no longer supports + * such platforms. + */ + +/** + * @def DBUS_INT64_CONSTANT + * + * Declare a 64-bit signed integer constant. The macro + * adds the necessary "LL" or whatever after the integer, + * giving a literal such as "325145246765LL" + */ + +/** + * @def DBUS_UINT64_CONSTANT + * + * Declare a 64-bit unsigned integer constant. The macro + * adds the necessary "ULL" or whatever after the integer, + * giving a literal such as "325145246765ULL" + */ + +/** + * @def DBUS_INT64_MODIFIER + * + * A string literal for a length modifier that is appropriate to print + * the #dbus_int64_t and #dbus_uint64_t types. + * For example, it might be an empty string, "l", "ll", or "I64". + * + * This modifier needs to be concatenated with a literal "%" and a + * conversion specifier that can print signed or unsigned integers, + * for example: + * + * @code + * dbus_int64_t i = -123; + * dbus_uint64_t u = 456; + * + * printf ("signed: %" DBUS_INT64_MODIFIER "d\n", i); + * printf ("unsigned decimal: %" DBUS_INT64_MODIFIER "u\n", u); + * printf ("unsigned hex: 0x%" DBUS_INT64_MODIFIER "x\n", x); + * @endcode + */ + +/** + * An 8-byte struct you could use to access int64 without having + * int64 support. Use #dbus_int64_t or #dbus_uint64_t instead. + */ +typedef struct +{ + dbus_uint32_t first32; /**< first 32 bits in the 8 bytes (beware endian issues) */ + dbus_uint32_t second32; /**< second 32 bits in the 8 bytes (beware endian issues) */ +} DBus8ByteStruct; + +/** + * A simple value union that lets you access bytes as if they + * were various types; useful when dealing with basic types via + * void pointers and varargs. + * + * This union also contains a pointer member (which can be used + * to retrieve a string from dbus_message_iter_get_basic(), for + * instance), so on future platforms it could conceivably be larger + * than 8 bytes. + */ +typedef union +{ + unsigned char bytes[8]; /**< as 8 individual bytes */ + dbus_int16_t i16; /**< as int16 */ + dbus_uint16_t u16; /**< as int16 */ + dbus_int32_t i32; /**< as int32 */ + dbus_uint32_t u32; /**< as int32 */ + dbus_bool_t bool_val; /**< as boolean */ + dbus_int64_t i64; /**< as int64 */ + dbus_uint64_t u64; /**< as int64 */ + DBus8ByteStruct eight; /**< as 8-byte struct */ + double dbl; /**< as double */ + unsigned char byt; /**< as byte */ + char *str; /**< as char* (string, object path or signature) */ + int fd; /**< as Unix file descriptor */ +} DBusBasicValue; + +/** @} */ + +#endif /* DBUS_TYPES_H */ diff --git a/src/linux/vendor/dbus/dbus/dbus.h b/src/linux/vendor/dbus/dbus/dbus.h new file mode 100644 index 0000000..53998c5 --- /dev/null +++ b/src/linux/vendor/dbus/dbus/dbus.h @@ -0,0 +1,106 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus.h Convenience header including all other headers + * + * Copyright (C) 2002, 2003 Red Hat Inc. + * + * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_H +#define DBUS_H + +#define DBUS_INSIDE_DBUS_H 1 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef DBUS_INSIDE_DBUS_H + +/** + * @defgroup DBus D-Bus low-level public API + * @brief The low-level public API of the D-Bus library + * + * libdbus provides a low-level C API intended primarily for use by + * bindings to specific object systems and languages. D-Bus is most + * convenient when used with the GLib bindings, Python bindings, Qt + * bindings, Mono bindings, and so forth. This low-level API has a + * lot of complexity useful only for bindings. + * + * @{ + */ + +/** @} */ + +/** + * @mainpage + * + * This manual documents the low-level D-Bus C API. If you use + * this low-level API directly, you're signing up for some pain. + * + * Caveats aside, you might get started learning the low-level API by reading + * about @ref DBusConnection and @ref DBusMessage. + * + * There are several other places to look for D-Bus information, such + * as the tutorial and the specification; those can be found at the D-Bus + * website. If you're interested in a sysadmin or package + * maintainer's perspective on the dbus-daemon itself and its + * configuration, be sure to check out the man pages as well. + * + * The low-level API documented in this manual deliberately lacks + * most convenience functions - those are left up to higher-level libraries + * based on frameworks such as GLib, Qt, Python, Mono, Java, + * etc. These higher-level libraries (often called "D-Bus bindings") + * have features such as object systems and main loops that allow a + * much more convenient API. + * + * The low-level API also contains plenty of clutter to support + * integration with arbitrary object systems, languages, main loops, + * and so forth. These features add a lot of noise to the API that you + * probably don't care about unless you're coding a binding. + * + * This manual also contains docs for @ref DBusInternals "D-Bus internals", + * so you can use it to get oriented to the D-Bus source code if you're + * interested in patching the code. You should also read the + * file CONTRIBUTING.md which comes with the source code if you plan to + * contribute to D-Bus. + * + * As you read the code, you can identify internal D-Bus functions + * because they start with an underscore ('_') character. Also, any + * identifier or macro that lacks a DBus, dbus_, or DBUS_ namepace + * prefix is internal, with a couple of exceptions such as #NULL, + * #TRUE, and #FALSE. + */ + +#endif /* DBUS_H */ diff --git a/src/linux/vendor/manifest.json b/src/linux/vendor/manifest.json index 00319ff..0615601 100644 --- a/src/linux/vendor/manifest.json +++ b/src/linux/vendor/manifest.json @@ -24,7 +24,13 @@ "stable/xdg-shell/xdg-shell.xml": "protocols/xml/xdg-shell.xml", "unstable/xdg-decoration/xdg-decoration-unstable-v1.xml": "protocols/xml/xdg-decoration-unstable-v1.xml", "stable/viewporter/viewporter.xml": "protocols/xml/viewporter.xml", - "staging/fractional-scale/fractional-scale-v1.xml": "protocols/xml/fractional-scale-v1.xml" + "staging/fractional-scale/fractional-scale-v1.xml": "protocols/xml/fractional-scale-v1.xml", + "staging/cursor-shape/cursor-shape-v1.xml": "protocols/xml/cursor-shape-v1.xml", + "stable/tablet/tablet-v2.xml": "protocols/xml/tablet-v2.xml", + "unstable/text-input/text-input-unstable-v3.xml": "protocols/xml/text-input-unstable-v3.xml", + "unstable/xdg-foreign/xdg-foreign-unstable-v2.xml": "protocols/xml/xdg-foreign-unstable-v2.xml", + "staging/xdg-activation/xdg-activation-v1.xml": "protocols/xml/xdg-activation-v1.xml", + "staging/xdg-toplevel-icon/xdg-toplevel-icon-v1.xml": "protocols/xml/xdg-toplevel-icon-v1.xml" } }, { @@ -51,6 +57,45 @@ "url": "https://www.apache.org/licenses/LICENSE-2.0.txt", "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", "destination": "vendor/khronos/LICENSE-2.0.txt" + }, + { + "url": "https://github.com/xkbcommon/libxkbcommon/archive/refs/tags/xkbcommon-1.11.0.tar.gz", + "sha256": "78a6b14f16e9a55025978c252e53ce9e16a02bfdb929550b9a0db5af87db7e02", + "prefix": "libxkbcommon-xkbcommon-1.11.0/", + "files": { + "include/xkbcommon/xkbcommon.h": "vendor/xkbcommon/xkbcommon.h", + "include/xkbcommon/xkbcommon-names.h": "vendor/xkbcommon/xkbcommon-names.h", + "include/xkbcommon/xkbcommon-keysyms.h": "vendor/xkbcommon/xkbcommon-keysyms.h", + "include/xkbcommon/xkbcommon-compose.h": "vendor/xkbcommon/xkbcommon-compose.h", + "LICENSE": "vendor/xkbcommon/LICENSE", + "include/xkbcommon/xkbcommon-compat.h": "vendor/xkbcommon/xkbcommon-compat.h" + } + }, + { + "url": "https://dbus.freedesktop.org/releases/dbus/dbus-1.16.2.tar.xz", + "sha256": "0ba2a1a4b16afe7bceb2c07e9ce99a8c2c3508e5dec290dbb643384bd6beb7e2", + "prefix": "dbus-1.16.2/", + "files": { + "COPYING": "vendor/dbus/COPYING", + "dbus/dbus.h": "vendor/dbus/dbus/dbus.h", + "dbus/dbus-types.h": "vendor/dbus/dbus/dbus-types.h", + "dbus/dbus-arch-deps.h.in": "vendor/dbus/dbus/dbus-arch-deps.h.in", + "dbus/dbus-macros.h": "vendor/dbus/dbus/dbus-macros.h", + "dbus/dbus-threads.h": "vendor/dbus/dbus/dbus-threads.h", + "dbus/dbus-syntax.h": "vendor/dbus/dbus/dbus-syntax.h", + "dbus/dbus-errors.h": "vendor/dbus/dbus/dbus-errors.h", + "dbus/dbus-protocol.h": "vendor/dbus/dbus/dbus-protocol.h", + "dbus/dbus-signature.h": "vendor/dbus/dbus/dbus-signature.h", + "dbus/dbus-shared.h": "vendor/dbus/dbus/dbus-shared.h", + "dbus/dbus-server.h": "vendor/dbus/dbus/dbus-server.h", + "dbus/dbus-connection.h": "vendor/dbus/dbus/dbus-connection.h", + "dbus/dbus-message.h": "vendor/dbus/dbus/dbus-message.h", + "dbus/dbus-memory.h": "vendor/dbus/dbus/dbus-memory.h", + "dbus/dbus-pending-call.h": "vendor/dbus/dbus/dbus-pending-call.h", + "dbus/dbus-misc.h": "vendor/dbus/dbus/dbus-misc.h", + "dbus/dbus-bus.h": "vendor/dbus/dbus/dbus-bus.h", + "dbus/dbus-address.h": "vendor/dbus/dbus/dbus-address.h" + } } ], "files": { @@ -70,20 +115,64 @@ "vendor/khronos/EGL/eglplatform.h": "25b5391655effcf363a38fa00c3154f356a3eab3d35dc067847875513cf1e441", "vendor/khronos/KHR/khrplatform.h": "7b1e01aaa7ad8f6fc34b5c7bdf79ebf5189bb09e2c4d2e79fc5d350623d11e83", "vendor/wayland/wayland-client.h": "e9dd1fb014aa6ad848cb7d241cc223b1a70fc0b17fed5997262024e4c05532f7", - "vendor/khronos/LICENSE-2.0.txt": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" + "vendor/khronos/LICENSE-2.0.txt": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "vendor/xkbcommon/xkbcommon.h": "9f2d729a0a5a0aac5bd2e229c2be8346823ca90342b0f87cc9132ff2816a6b74", + "vendor/xkbcommon/xkbcommon-names.h": "a5b0ed01c8b1816da8b5ed29cf776eb2ad1f707cf03ff74e62e36a5ca9009f61", + "vendor/xkbcommon/xkbcommon-keysyms.h": "e854c5a8edd8da610e51404f6b09c741027089701c386bdd9bdf5ce851a585a1", + "vendor/xkbcommon/xkbcommon-compose.h": "e6facb4fc280991d15679dd3e5d06af8decdbb6d1eeaaea729642990502c57fe", + "vendor/xkbcommon/LICENSE": "967e97b28658f0037bbe164a237bdfb0c3ec790e67f6c29372ea5b09306f61f3", + "vendor/dbus/COPYING": "150e5d08e1cb5e62b65967d7931acad2c42d98ec1bbb584bebb01921cbc853c2", + "vendor/dbus/dbus/dbus.h": "56ff456922bf6df191958a291fc5d6d66f39b82b156bc2d715ef87add155cea5", + "vendor/dbus/dbus/dbus-types.h": "0228e51763888e7319f0b8c862f0ee928e3079340408512f7e4a594e1eeae48d", + "vendor/dbus/dbus/dbus-arch-deps.h.in": "ecbce7c0446c22e0ce4d4bf2641f2aa6419e721a6c9c1ccbb41b800028334265", + "vendor/dbus/dbus/dbus-macros.h": "78fc922e402466c826145dbfe31d2ae87682ef2df6233d436dc3399552f6362f", + "vendor/dbus/dbus/dbus-threads.h": "16c10fafae90e9aaeaf0506f41432bfa389dfdf333115f8934680d88d83ae12d", + "vendor/dbus/dbus/dbus-syntax.h": "200170d6ee508b6daa8a17dc9b804a0a35fa555d8d8c8768258edd75dd36cd43", + "vendor/dbus/dbus/dbus-errors.h": "00292ccbbc3d30603c293122155151fd21aa26aa0adbc8333972440544f37ded", + "vendor/dbus/dbus/dbus-protocol.h": "533fd55283662d1c013792a29e9993e31babe20d5a5dfedae2c4b8e8bebafc6a", + "vendor/dbus/dbus/dbus-signature.h": "13a10246dee6a378899c88a9ac37e0eb618a1f91766fc27de0053309e6aac941", + "vendor/dbus/dbus/dbus-shared.h": "97ed7edf5baf42bdee4d5777d63158599667078499ca1b0360ccedb013d3531c", + "vendor/dbus/dbus/dbus-server.h": "f63bbd5503d13b1486b66a76cc9f289e19ff46d7b3c5f39df9953af3e6df0323", + "vendor/dbus/dbus/dbus-connection.h": "f9496c07830e44fbda1668328b40c78527251c99e62919c80af479631ff794bf", + "vendor/dbus/dbus/dbus-message.h": "2dd354759e49fad23f25b3b85e73d9e6d4ad0034c08828af1d5f7226971f66d6", + "vendor/dbus/dbus/dbus-memory.h": "7e0487d09e88e705bd166432e3d581aafe2e90c5654224505b73c56ae8d8cf2f", + "vendor/dbus/dbus/dbus-pending-call.h": "0aee41fe9624a284935fee0d4b572a313f83230ac31bdead59dff96309b7d1e0", + "vendor/dbus/dbus/dbus-misc.h": "6ff2e2f874f55a6b4738aea905ee413d814fec320b48ffd7f30a2df3237894aa", + "vendor/dbus/dbus/dbus-bus.h": "c50a3f89fab412a98544d98a1c94dc07ad5b540ebbf63e63105877039ff2f374", + "vendor/dbus/dbus/dbus-address.h": "5a6834badb73f871acaaea7f03f6497f50e958232a1dbe64f1f098e56c4557ce", + "protocols/xml/cursor-shape-v1.xml": "bb57d91e53a79dadab7c612dab87c233393cee73673feefa7442cfbfdd9aed2f", + "protocols/xml/tablet-v2.xml": "3ea2783210086dfddef3994fec974f46a00cf175c06efdd8ea47c3007f812a80", + "protocols/xml/text-input-unstable-v3.xml": "2d08f2cddb463e169c23f1c34769de12ae255540e51ee8f515b54667d60b90ba", + "protocols/xml/xdg-foreign-unstable-v2.xml": "625d83fbb068f48e69e739eafde507f10cdfe7480146f3ac10af9a2ddf551c80", + "protocols/xml/xdg-activation-v1.xml": "d8418be2d5738d50aff788bef1c7574f33f26659aa045447ff2ef9b78c58fe01", + "protocols/xml/xdg-toplevel-icon-v1.xml": "791dbfed89280c1b8031689955a03e9b2da55601be3c5854a6198e38cea4978f", + "vendor/xkbcommon/xkbcommon-compat.h": "fb0384a704897c0dcfcc49f021ad38fadbbedc3307d5390f4f0d1019e3d1a4d9" }, "generated": { + "protocols/generated/cursor-shape-v1.c": "6027922a5c0a8e0d70ee6948e32aa8231b23cd3f82d323875186b29d36881f78", + "protocols/generated/cursor-shape-v1.h": "87edf9719e935db05a0f5545e20d8bdf67f2c2557676f9d1e697b83cc98d6529", + "protocols/generated/dbus/dbus-arch-deps.h": "87a896df22f7b5e6ec5367cc9b3ed7c77c65b54405a50fd3c7133cd4c6fc3281", "protocols/generated/fractional-scale-v1.c": "fb40e729ee05acafe996d1261367424b47722be02dbee65c90b3f4972f259dca", "protocols/generated/fractional-scale-v1.h": "9243e57b2ce11317f6aaa2cd76c0a9f999fb54ced38b880d81891a6ee5dd27df", - "protocols/generated/private-symbols.h": "e66e9c2dd9608df352bf1dc53c6d244225018557844f5ec9c9ae258ea47e3521", + "protocols/generated/private-symbols.h": "93778cae319dc148bd51ec6ec9725f89735c8a9ccf937f9c52ae45b6768cc02d", + "protocols/generated/tablet-v2.c": "6ce7899f31da919e1f04a8bd44038df5095b58a98b1178f9aa0a84d0835424c0", + "protocols/generated/tablet-v2.h": "eff5398428ff21523ae6c745d57081f3bd5c18509c4bf5b18de75d89d58d18cd", + "protocols/generated/text-input-unstable-v3.c": "5de60647b6e122860802d59b547632d4bcf838a443cebeb04429bbb17b5c971b", + "protocols/generated/text-input-unstable-v3.h": "051057bc8292414f82c46fb854455616fd212cfffb95222aa5af1e2e2cde3067", "protocols/generated/viewporter.c": "ee3b669764240a69b4436e8cc7cb2e4d42dc872752df3f34df98851bbcb51d11", "protocols/generated/viewporter.h": "dbb68745babf07d3d5587b3f3b83a7cb46848f03885bde4b9cd5e71d19114458", "protocols/generated/wayland-client-protocol.h": "3643fd6aca2f52abcb92a125a0f659c3697268435608a7d3a54e0b614e150f83", "protocols/generated/wayland-version.h": "9ba722d91f4ae3f2820757785f66247868571bc7014f7a679a22f729daaac79f", "protocols/generated/wayland.c": "9a3a273b8d007ff2f40906d36734034a0967a67796965d46e0a5873ff0045315", + "protocols/generated/xdg-activation-v1.c": "6cb4f16e1cf504c86f5424c7b9f80c5bd41e446552c34c575808848ac4086c16", + "protocols/generated/xdg-activation-v1.h": "c7d669611bcbdd68fea255c102a91f7a686cdb53f58bcbf2b97473edf2221a26", "protocols/generated/xdg-decoration-unstable-v1.c": "a6cafd5ed52a70e30eacc91e6e230eb8cbed6a6cf790cdcb732acb7e19e51579", "protocols/generated/xdg-decoration-unstable-v1.h": "fa1d17dbdfad9e13f35a0d807906926a054edb18cef836cc39063a586d5f6dd4", + "protocols/generated/xdg-foreign-unstable-v2.c": "8f9da32a90206a500a8bf5ea1414f19be5422aa729b3ed0e5eb373a89af15b7c", + "protocols/generated/xdg-foreign-unstable-v2.h": "f384a4e83ce05ccdc0101cb3bb98b8a36496d6c5a34d921a4b448b14d07e0761", "protocols/generated/xdg-shell.c": "7788ec2e1e8774e4f069d361c450048ccb7e907a204d4ca2d74a64fab7bf7be5", - "protocols/generated/xdg-shell.h": "4b472982e483e37f9e28a1b655aabb5718a6e6a54023dac90fee45bad316ecc9" + "protocols/generated/xdg-shell.h": "4b472982e483e37f9e28a1b655aabb5718a6e6a54023dac90fee45bad316ecc9", + "protocols/generated/xdg-toplevel-icon-v1.c": "f6947ef5b94fa2eeae192b857287d676d6c8bfc094594bd2d9bdf8a56b28babc", + "protocols/generated/xdg-toplevel-icon-v1.h": "aa7939d3a1b64c280dd73ed5a4d765a838175fbf6e4ef6eada6750c4826e22b6" } } diff --git a/src/linux/vendor/xkbcommon/LICENSE b/src/linux/vendor/xkbcommon/LICENSE new file mode 100644 index 0000000..46452cf --- /dev/null +++ b/src/linux/vendor/xkbcommon/LICENSE @@ -0,0 +1,279 @@ +The following is a list of all copyright notices and license statements which +appear in the xkbcommon source tree, along with the SPDX short license +identifiers which source files use to refer to them. To see which parts are +covered by which license and copyright, refer to the source files. + +If making new contributions, the MIT License is vastly preferred. + +All licenses are derivative of the MIT/X11 license, mostly identical other +than no-endorsement clauses (e.g. paragraph 4 of The Open Group's license). + +These statements are split into two sections: one for the code compiled and +distributed as part of the libxkbcommon shared library and the code component +of all tests, and another only for the test data under test/data, which is +distributed with the xkbcommon source code, but not installed to the system. + +BEGINNING OF SOFTWARE COPYRIGHT/LICENSE STATEMENTS: + + +------------------------------------------------------------------------------- +SPDX full name: MIT License +SPDX short identifier: MIT +License text: + +Copyright © 2008-2009 Dan Nicholson +Copyright © 2009-2012, 2016 Daniel Stone +Copyright © 2012-2014, 2020-2022, 2025 Ran Benita +Copyright © 2010-2012, 2016 Intel Corporation +Copyright © 2013-2015, 2018-2020 Red Hat, Inc. +Copyright © 2023-2024 Pierre Le Marre +Copyright (c) 1991, Oracle and/or its affiliates. +Copyright © 2008-2011 Kristian Høgsberg +Copyright © 2010 Francisco Jerez +Copyright © 2012 Collabora, Ltd. +Copyright © 2015 Kazunobu Kuriyama +Copyright (C) 2011 Joseph Adams + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +------------------------------------------------------------------------------- +SPDX full name: MIT Open Group variant +SPDX short identifier: MIT-open-group +License text: + +Copyright 1985, 1987, 1988, 1990, 1998 The Open Group + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the names of the authors or their +institutions shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the authors. + + +------------------------------------------------------------------------------- +SPDX full name: Historical Permission Notice and Disclaimer +SPDX short identifier: HPND +License text: + +Copyright (c) 1993, 1994, 1995, 1996 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +------------------------------------------------------------------------------- +SPDX full name: Historical Permission Notice and Disclaimer - sell variant +SPDX short identifier: HPND-sell-variant +License text: + +Copyright 1992 by Oki Technosystems Laboratory, Inc. +Copyright 1992 by Fuji Xerox Co., Ltd. + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation, and that the name of Oki Technosystems +Laboratory and Fuji Xerox not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. +Oki Technosystems Laboratory and Fuji Xerox make no representations +about the suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +OKI TECHNOSYSTEMS LABORATORY AND FUJI XEROX DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OKI TECHNOSYSTEMS +LABORATORY AND FUJI XEROX BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE +OR PERFORMANCE OF THIS SOFTWARE. + + +------------------------------------------------------------------------------- +SPDX full name: +SPDX short identifier: LicenseRef-digital-equipment-corporation +License text: + +Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +------------------------------------------------------------------------------- + + + +END OF SOFTWARE COPYRIGHT/LICENSE STATEMENTS + + +BEGINNING OF LICENSE STATEMENTS ONLY FOR UNDISTRIBUTED DATA FILES IN test/data, +derived from xkeyboard-config and libX11 nls/ directory: + + + +------------------------------------------------------------------------------- +SPDX full name: Historical Permission Notice and Disclaimer - sell variant +SPDX short identifier: HPND-sell-variant + +Copyright 1996 by Joseph Moss +Copyright (C) 2002-2007 Free Software Foundation, Inc. +Copyright (C) Dmitry Golubev , 2003-2004 +Copyright (C) 2004, Gregory Mokhin +Copyright (C) 2006 Erdal Ronahî + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of the copyright holder(s) not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. The copyright holder(s) makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +THE COPYRIGHT HOLDER(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + + +------------------------------------------------------------------------------- +SPDX full name: MIT License +SPDX short identifier: MIT + +Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved. + + +------------------------------------------------------------------------------- +SPDX full name: X11 License +SPDX short identifier: X11 +License text: + +Copyright (c) 1996 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + + + +------------------------------------------------------------------------------- +SPDX full name: MIT Open Group variant +SPDX short identifier: MIT-open-group + +Copyright (C) 2004, 2006 Ævar Arnfjörð Bjarmason + + +------------------------------------------------------------------------------- +SPDX full name: +SPDX short identifier: MIT-open-group +SPDX short identifier: LicenseRef-anton-zinoviev +License text: + +Copyright (C) 1999, 2000 by Anton Zinoviev + +This software may be used, modified, copied, distributed, and sold, +in both source and binary form provided that the above copyright +and these terms are retained. Under no circumstances is the author +responsible for the proper functioning of this software, nor does +the author assume any responsibility for damages incurred with its +use. + +Permission is granted to anyone to use, distribute and modify +this file in any way, provided that the above copyright notice +is left intact and the author of the modification summarizes +the changes in this header. + +This file is distributed without any expressed or implied warranty. diff --git a/src/linux/vendor/xkbcommon/xkbcommon-compat.h b/src/linux/vendor/xkbcommon/xkbcommon-compat.h new file mode 100644 index 0000000..907d030 --- /dev/null +++ b/src/linux/vendor/xkbcommon/xkbcommon-compat.h @@ -0,0 +1,80 @@ +/* + * Copyright © 2012 Daniel Stone + * SPDX-License-Identifier: MIT + * + * Author: Daniel Stone + */ + +#ifndef _XKBCOMMON_COMPAT_H +#define _XKBCOMMON_COMPAT_H + +/** + * Renamed keymap API. + */ +#define xkb_group_index_t xkb_layout_index_t +#define xkb_group_mask_t xkb_layout_mask_t +#define xkb_map_compile_flags xkb_keymap_compile_flags +#define XKB_GROUP_INVALID XKB_LAYOUT_INVALID + +#define XKB_STATE_DEPRESSED \ + (XKB_STATE_MODS_DEPRESSED | XKB_STATE_LAYOUT_DEPRESSED) +#define XKB_STATE_LATCHED \ + (XKB_STATE_MODS_LATCHED | XKB_STATE_LAYOUT_LATCHED) +#define XKB_STATE_LOCKED \ + (XKB_STATE_MODS_LOCKED | XKB_STATE_LAYOUT_LOCKED) +#define XKB_STATE_EFFECTIVE \ + (XKB_STATE_DEPRESSED | XKB_STATE_LATCHED | XKB_STATE_LOCKED | \ + XKB_STATE_MODS_EFFECTIVE | XKB_STATE_LAYOUT_EFFECTIVE) + +#define xkb_map_new_from_names(context, names, flags) \ + xkb_keymap_new_from_names(context, names, flags) +#define xkb_map_new_from_file(context, file, format, flags) \ + xkb_keymap_new_from_file(context, file, format, flags) +#define xkb_map_new_from_string(context, string, format, flags) \ + xkb_keymap_new_from_string(context, string, format, flags) +#define xkb_map_get_as_string(keymap) \ + xkb_keymap_get_as_string(keymap, XKB_KEYMAP_FORMAT_TEXT_V1) +#define xkb_map_ref(keymap) xkb_keymap_ref(keymap) +#define xkb_map_unref(keymap) xkb_keymap_unref(keymap) + +#define xkb_map_num_mods(keymap) xkb_keymap_num_mods(keymap) +#define xkb_map_mod_get_name(keymap, idx) xkb_keymap_mod_get_name(keymap, idx) +#define xkb_map_mod_get_index(keymap, str) xkb_keymap_mod_get_index(keymap, str) +#define xkb_key_mod_index_is_consumed(state, key, mod) \ + xkb_state_mod_index_is_consumed(state, key, mod) +#define xkb_key_mod_mask_remove_consumed(state, key, modmask) \ + xkb_state_mod_mask_remove_consumed(state, key, modmask) + +#define xkb_map_num_groups(keymap) xkb_keymap_num_layouts(keymap) +#define xkb_key_num_groups(keymap, key) \ + xkb_keymap_num_layouts_for_key(keymap, key) +#define xkb_map_group_get_name(keymap, idx) \ + xkb_keymap_layout_get_name(keymap, idx) +#define xkb_map_group_get_index(keymap, str) \ + xkb_keymap_layout_get_index(keymap, str) + +#define xkb_map_num_leds(keymap) xkb_keymap_num_leds(keymap) +#define xkb_map_led_get_name(keymap, idx) xkb_keymap_led_get_name(keymap, idx) +#define xkb_map_led_get_index(keymap, str) \ + xkb_keymap_led_get_index(keymap, str) + +#define xkb_key_repeats(keymap, key) xkb_keymap_key_repeats(keymap, key) + +#define xkb_key_get_syms(state, key, syms_out) \ + xkb_state_key_get_syms(state, key, syms_out) + +#define xkb_state_group_name_is_active(state, name, type) \ + xkb_state_layout_name_is_active(state, name, type) +#define xkb_state_group_index_is_active(state, idx, type) \ + xkb_state_layout_index_is_active(state, idx, type) + +#define xkb_state_serialize_group(state, component) \ + xkb_state_serialize_layout(state, component) + +#define xkb_state_get_map(state) xkb_state_get_keymap(state) + +/* Not needed anymore, since there's NO_FLAGS. */ +#define XKB_MAP_COMPILE_PLACEHOLDER XKB_KEYMAP_COMPILE_NO_FLAGS +#define XKB_MAP_COMPILE_NO_FLAGS XKB_KEYMAP_COMPILE_NO_FLAGS + +#endif diff --git a/src/linux/vendor/xkbcommon/xkbcommon-compose.h b/src/linux/vendor/xkbcommon/xkbcommon-compose.h new file mode 100644 index 0000000..a65a1e5 --- /dev/null +++ b/src/linux/vendor/xkbcommon/xkbcommon-compose.h @@ -0,0 +1,617 @@ +/* + * Copyright © 2013 Ran Benita + * SPDX-License-Identifier: MIT + */ + +#ifndef _XKBCOMMON_COMPOSE_H +#define _XKBCOMMON_COMPOSE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @file + * libxkbcommon Compose API - support for Compose and dead-keys. + */ + +/** + * @defgroup compose Compose and dead-keys support + * Support for Compose and dead-keys. + * @since 0.5.0 + * + * @{ + */ + +/** + * @page compose-overview Overview + * @parblock + * + * Compose and dead-keys are a common feature of many keyboard input + * systems. They extend the range of the keysyms that can be produced + * directly from a keyboard by using a sequence of key strokes, instead + * of just one. + * + * Here are some example sequences, in the libX11 Compose file format: + * + * : "á" aacute # LATIN SMALL LETTER A WITH ACUTE + * : "@" at # COMMERCIAL AT + * + * When the user presses a key which produces the `` keysym, + * nothing initially happens (thus the key is dubbed a *dead-key*). But + * when the user enters ``, “á” is *composed*, in place of “a”. If + * instead the user had entered a keysym which does not follow + * `` in any compose sequence, the sequence is said to be + * *cancelled*. + * + * Compose files define many such sequences. For a description of the + * common file format for Compose files, see the `Compose(5)` man page. + * + * A successfully-composed sequence has two results: a keysym and a UTF-8 + * string. At least one of the two is defined for each sequence. If only + * a keysym is given, the keysym’s string representation is used for the + * result string (using xkb_keysym_to_utf8()). + * + * This library provides low-level support for Compose file parsing and + * processing. Higher-level APIs (such as libX11’s `Xutf8LookupString(3)`) + * may be built upon it, or it can be used directly. + * + * @endparblock + */ + +/** + * @page compose-conflicting Conflicting Sequences + * @parblock + * + * To avoid ambiguity, a sequence is not allowed to be a prefix of another. + * When such a conflict occurs, the sequence defined last is the one retained. + * + * Sequences of length 1 are allowed. + * + * @endparblock + */ + +/** + * @page compose-cancellation Cancellation Behavior + * @parblock + * + * What should happen when a sequence is cancelled? For example, consider + * there are only the above sequences, and the input keysyms are + * ` `. There are a few approaches: + * + * 1. Swallow the cancelling keysym; that is, no keysym is produced. + * This is the approach taken by libX11. + * 2. Let the cancelling keysym through; that is, `` is produced. + * 3. Replay the entire sequence; that is, ` ` is produced. + * This is the approach taken by Microsoft Windows (approximately; + * instead of ``, the underlying key is used. This is + * difficult to simulate with XKB keymaps). + * + * You can program whichever approach best fits users' expectations. + * + * @endparblock + */ + +/** + * @struct xkb_compose_table + * Opaque Compose table object. + * + * The compose table holds the definitions of the Compose sequences, as + * gathered from Compose files. It is immutable. + */ +struct xkb_compose_table; + +/** + * @struct xkb_compose_state + * Opaque Compose state object. + * + * The compose state maintains state for compose sequence matching, such + * as which possible sequences are being matched, and the position within + * these sequences. It acts as a simple state machine wherein keysyms are + * the input, and composed keysyms and strings are the output. + * + * The compose state is usually associated with a keyboard device. + */ +struct xkb_compose_state; + +/** Flags affecting Compose file compilation. */ +enum xkb_compose_compile_flags { + /** Do not apply any flags. */ + XKB_COMPOSE_COMPILE_NO_FLAGS = 0 +}; + +/** The recognized Compose file formats. */ +enum xkb_compose_format { + /** The classic libX11 Compose text format, described in Compose(5). */ + XKB_COMPOSE_FORMAT_TEXT_V1 = 1 +}; + +/** + * @page compose-locale Compose Locale + * @parblock + * + * Compose files are locale dependent: + * - Compose files are written for a locale, and the locale is used when + * searching for the appropriate file to use. + * - Compose files may reference the locale internally, with directives + * such as `%%L`. + * + * As such, functions like `xkb_compose_table::xkb_compose_table_new_from_locale()` + * require a `locale` parameter. This will usually be the current locale (see + * `locale(7)` for more details). You may also want to allow the user to + * explicitly configure it, so he can use the Compose file of a given + * locale, but not use that locale for other things. + * + * You may query the current locale as follows: + * + * ```c + * const char *locale; + * locale = setlocale(LC_CTYPE, NULL); + * ``` + * + * This will only give useful results if the program had previously set + * the current locale using setlocale(3), with `LC_CTYPE` or `LC_ALL` + * and a non-`NULL` argument. + * + * If you prefer not to use the locale system of the C runtime library, + * you may nevertheless obtain the user’s locale directly using + * environment variables, as described in `locale(7)`. For example, + * + * ```c + * const char *locale; + * locale = getenv("LC_ALL"); + * if (!locale || !*locale) + * locale = getenv("LC_CTYPE"); + * if (!locale || !*locale) + * locale = getenv("LANG"); + * if (!locale || !*locale) + * locale = "C"; + * ``` + * + * Note that some locales supported by the C standard library may not + * have a Compose file assigned. + * + * @endparblock + */ + +/** + * Create a compose table for a given locale. + * + * The locale is used for searching the file-system for an appropriate + * Compose file. The search order is described in Compose(5). It is + * affected by the following environment variables: + * + * 1. `XCOMPOSEFILE` - see Compose(5). + * 2. `XDG_CONFIG_HOME` - before `$HOME/.XCompose` is checked, + * `$XDG_CONFIG_HOME/XCompose` is checked (with a fall back to + * `$HOME/.config/XCompose` if `XDG_CONFIG_HOME` is not defined). + * This is a libxkbcommon extension to the search procedure in + * Compose(5) (since libxkbcommon 1.0.0). Note that other + * implementations, such as libX11, might not find a Compose file in + * this path. + * 3. `HOME` - see Compose(5). + * 4. `XLOCALEDIR` - if set, used as the base directory for the system’s + * X locale files, e.g. `/usr/share/X11/locale`, instead of the + * preconfigured directory. + * + * @param context + * The library context in which to create the compose table. + * @param locale + * The current locale. See @ref compose-locale. + * \n + * The value is copied, so it is safe to pass the result of `getenv(3)` + * (or similar) without fear of it being invalidated by a subsequent + * `setenv(3)` (or similar). + * @param flags + * Optional flags for the compose table, or 0. + * + * @returns A compose table for the given locale, or `NULL` if the + * compilation failed or a Compose file was not found. + * + * @memberof xkb_compose_table + */ +XKB_EXPORT struct xkb_compose_table * +xkb_compose_table_new_from_locale(struct xkb_context *context, + const char *locale, + enum xkb_compose_compile_flags flags); + +/** + * Create a new compose table from a Compose file. + * + * @param context + * The library context in which to create the compose table. + * @param file + * The Compose file to compile. + * @param locale + * The current locale. See @ref compose-locale. + * @param format + * The text format of the Compose file to compile. + * @param flags + * Optional flags for the compose table, or 0. + * + * @returns A compose table compiled from the given file, or `NULL` if + * the compilation failed. + * + * @memberof xkb_compose_table + */ +XKB_EXPORT struct xkb_compose_table * +xkb_compose_table_new_from_file(struct xkb_context *context, + FILE *file, + const char *locale, + enum xkb_compose_format format, + enum xkb_compose_compile_flags flags); + +/** + * Create a new compose table from a memory buffer. + * + * This is just like xkb_compose_table_new_from_file(), but instead of + * a file, gets the table as one enormous string. + * + * @see xkb_compose_table_new_from_file() + * @memberof xkb_compose_table + */ +XKB_EXPORT struct xkb_compose_table * +xkb_compose_table_new_from_buffer(struct xkb_context *context, + const char *buffer, size_t length, + const char *locale, + enum xkb_compose_format format, + enum xkb_compose_compile_flags flags); + +/** + * Take a new reference on a compose table. + * + * @returns The passed in object. + * + * @memberof xkb_compose_table + */ +XKB_EXPORT struct xkb_compose_table * +xkb_compose_table_ref(struct xkb_compose_table *table); + +/** + * Release a reference on a compose table, and possibly free it. + * + * @param table The object. If it is `NULL`, this function does nothing. + * + * @memberof xkb_compose_table + */ +XKB_EXPORT void +xkb_compose_table_unref(struct xkb_compose_table *table); + +/** + * @struct xkb_compose_table_entry + * Opaque Compose table entry object. + * + * Represents a single entry in a Compose file in the iteration API. + * It is immutable. + * + * @sa xkb_compose_table_iterator_new + * @since 1.6.0 + */ +struct xkb_compose_table_entry; + +/** + * Get the left-hand keysym sequence of a Compose table entry. + * + * For example, given the following entry: + * + * ``` + * : "~" asciitilde # TILDE + * ``` + * + * it will return `{XKB_KEY_dead_tilde, XKB_KEY_space}`. + * + * @param[in] entry The compose table entry object to process. + * + * @param[out] sequence_length Number of keysyms in the sequence. + * + * @returns The array of left-hand side keysyms. The number of keysyms + * is returned in the @p sequence_length out-parameter. + * + * @memberof xkb_compose_table_entry + * @since 1.6.0 + */ +XKB_EXPORT const xkb_keysym_t * +xkb_compose_table_entry_sequence(struct xkb_compose_table_entry *entry, + size_t *sequence_length); + +/** + * Get the right-hand result keysym of a Compose table entry. + * + * For example, given the following entry: + * + * ``` + * : "~" asciitilde # TILDE + * ``` + * + * it will return `XKB_KEY_asciitilde`. + * + * The keysym is optional; if the entry does not specify a keysym, + * returns `XKB_KEY_NoSymbol`. + * + * @memberof xkb_compose_table_entry + * @since 1.6.0 + */ +XKB_EXPORT xkb_keysym_t +xkb_compose_table_entry_keysym(struct xkb_compose_table_entry *entry); + +/** + * Get the right-hand result string of a Compose table entry. + * + * The string is UTF-8 encoded and `NULL`-terminated. + * + * For example, given the following entry: + * + * ``` + * : "~" asciitilde # TILDE + * ``` + * + * it will return `"~"`. + * + * The string is optional; if the entry does not specify a string, + * returns the empty string. + * + * @memberof xkb_compose_table_entry + * @since 1.6.0 + */ +XKB_EXPORT const char * +xkb_compose_table_entry_utf8(struct xkb_compose_table_entry *entry); + +/** + * @struct xkb_compose_table_iterator + * Iterator over a compose table’s entries. + * + * @sa xkb_compose_table_iterator_new() + * @since 1.6.0 + */ +struct xkb_compose_table_iterator; + +/** + * Create a new iterator for a compose table. + * + * Intended use: + * + * ```c + * struct xkb_compose_table_iterator *iter = xkb_compose_table_iterator_new(compose_table); + * struct xkb_compose_table_entry *entry; + * while ((entry = xkb_compose_table_iterator_next(iter))) { + * // ... + * } + * xkb_compose_table_iterator_free(iter); + * ``` + * + * @returns A new compose table iterator, or `NULL` on failure. + * + * @memberof xkb_compose_table_iterator + * @sa xkb_compose_table_iterator_free() + * @since 1.6.0 + */ +XKB_EXPORT struct xkb_compose_table_iterator * +xkb_compose_table_iterator_new(struct xkb_compose_table *table); + +/** + * Free a compose iterator. + * + * @memberof xkb_compose_table_iterator + * @since 1.6.0 + */ +XKB_EXPORT void +xkb_compose_table_iterator_free(struct xkb_compose_table_iterator *iter); + +/** + * Get the next compose entry from a compose table iterator. + * + * The entries are returned in lexicographic order of the left-hand + * side of entries. This does not correspond to the order in which + * the entries appear in the Compose file. + * + * @attention The return value is valid until the next call to this function. + * + * Returns `NULL` in case there is no more entries. + * + * @memberof xkb_compose_table_iterator + * @since 1.6.0 + */ +XKB_EXPORT struct xkb_compose_table_entry * +xkb_compose_table_iterator_next(struct xkb_compose_table_iterator *iter); + +/** Flags for compose state creation. */ +enum xkb_compose_state_flags { + /** Do not apply any flags. */ + XKB_COMPOSE_STATE_NO_FLAGS = 0 +}; + +/** + * Create a new compose state object. + * + * @param table + * The compose table the state will use. + * @param flags + * Optional flags for the compose state, or 0. + * + * @returns A new compose state, or `NULL` on failure. + * + * @memberof xkb_compose_state + */ +XKB_EXPORT struct xkb_compose_state * +xkb_compose_state_new(struct xkb_compose_table *table, + enum xkb_compose_state_flags flags); + +/** + * Take a new reference on a compose state object. + * + * @returns The passed in object. + * + * @memberof xkb_compose_state + */ +XKB_EXPORT struct xkb_compose_state * +xkb_compose_state_ref(struct xkb_compose_state *state); + +/** + * Release a reference on a compose state object, and possibly free it. + * + * @param state The object. If `NULL`, do nothing. + * + * @memberof xkb_compose_state + */ +XKB_EXPORT void +xkb_compose_state_unref(struct xkb_compose_state *state); + +/** + * Get the compose table which a compose state object is using. + * + * @returns The compose table which was passed to xkb_compose_state_new() + * when creating this state object. + * + * This function does not take a new reference on the compose table; you + * must explicitly reference it yourself if you plan to use it beyond the + * lifetime of the state. + * + * @memberof xkb_compose_state + */ +XKB_EXPORT struct xkb_compose_table * +xkb_compose_state_get_compose_table(struct xkb_compose_state *state); + +/** Status of the Compose sequence state machine. */ +enum xkb_compose_status { + /** The initial state; no sequence has started yet. */ + XKB_COMPOSE_NOTHING, + /** In the middle of a sequence. */ + XKB_COMPOSE_COMPOSING, + /** A complete sequence has been matched. */ + XKB_COMPOSE_COMPOSED, + /** The last sequence was cancelled due to an unmatched keysym. */ + XKB_COMPOSE_CANCELLED +}; + +/** The effect of a keysym fed to xkb_compose_state_feed(). */ +enum xkb_compose_feed_result { + /** The keysym had no effect - it did not affect the status. */ + XKB_COMPOSE_FEED_IGNORED, + /** The keysym started, advanced or cancelled a sequence. */ + XKB_COMPOSE_FEED_ACCEPTED +}; + +/** + * Feed one keysym to the Compose sequence state machine. + * + * This function can advance into a compose sequence, cancel a sequence, + * start a new sequence, or do nothing in particular. The resulting + * status may be observed with `xkb_compose_state_get_status()`. + * + * Some keysyms, such as keysyms for modifier keys, are ignored - they + * have no effect on the status or otherwise. + * + * The following is a description of the possible status transitions, in + * the format CURRENT STATUS => NEXT STATUS, given a non-ignored input + * keysym `keysym`: + * + @verbatim + NOTHING or CANCELLED or COMPOSED => + NOTHING if keysym does not start a sequence. + COMPOSING if keysym starts a sequence. + COMPOSED if keysym starts and terminates a single-keysym sequence. + + COMPOSING => + COMPOSING if keysym advances any of the currently possible + sequences but does not terminate any of them. + COMPOSED if keysym terminates one of the currently possible + sequences. + CANCELLED if keysym does not advance any of the currently + possible sequences. + @endverbatim + * + * The current Compose formats do not support multiple-keysyms. Therefore, if + * you are using a function such as `xkb_state::xkb_state_key_get_syms()` + * and it returns more than one keysym, consider feeding `XKB_KEY_NoSymbol` + * instead. + * + * @param state + * The compose state object. + * @param keysym + * A keysym, usually obtained after a key-press event, with a + * function such as `xkb_state::xkb_state_key_get_one_sym()`. + * + * @returns Whether the keysym was ignored. This is useful, for example, + * if you want to keep a record of the sequence matched thus far. + * + * @memberof xkb_compose_state + */ +XKB_EXPORT enum xkb_compose_feed_result +xkb_compose_state_feed(struct xkb_compose_state *state, + xkb_keysym_t keysym); + +/** + * Reset the Compose sequence state machine. + * + * The status is set to `::XKB_COMPOSE_NOTHING`, and the current sequence + * is discarded. + * + * @memberof xkb_compose_state + */ +XKB_EXPORT void +xkb_compose_state_reset(struct xkb_compose_state *state); + +/** + * Get the current status of the compose state machine. + * + * @see xkb_compose_status + * @memberof xkb_compose_state + **/ +XKB_EXPORT enum xkb_compose_status +xkb_compose_state_get_status(struct xkb_compose_state *state); + +/** + * Get the result Unicode/UTF-8 string for a composed sequence. + * + * See @ref compose-overview for more details. This function is only + * useful when the status is `::XKB_COMPOSE_COMPOSED`. + * + * @param[in] state + * The compose state. + * @param[out] buffer + * A buffer to write the string into. + * @param[in] size + * Size of the buffer. + * + * @warning If the buffer passed is too small, the string is truncated + * (though still `NULL`-terminated). + * + * @returns + * The number of bytes required for the string, excluding the `NULL` byte. + * If the sequence is not complete, or does not have a viable result + * string, returns 0, and sets `buffer` to the empty string (if possible). + * @returns + * You may check if truncation has occurred by comparing the return value + * with the size of `buffer`, similarly to the `snprintf(3)` function. + * You may safely pass `NULL` and 0 to `buffer` and `size` to find the + * required size (without the `NULL`-byte). + * + * @memberof xkb_compose_state + **/ +XKB_EXPORT int +xkb_compose_state_get_utf8(struct xkb_compose_state *state, + char *buffer, size_t size); + +/** + * Get the result keysym for a composed sequence. + * + * See @ref compose-overview for more details. This function is only + * useful when the status is `::XKB_COMPOSE_COMPOSED`. + * + * @returns The result keysym. If the sequence is not complete, or does + * not specify a result keysym, returns `XKB_KEY_NoSymbol`. + * + * @memberof xkb_compose_state + **/ +XKB_EXPORT xkb_keysym_t +xkb_compose_state_get_one_sym(struct xkb_compose_state *state); + +/** @} */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* _XKBCOMMON_COMPOSE_H */ diff --git a/src/linux/vendor/xkbcommon/xkbcommon-keysyms.h b/src/linux/vendor/xkbcommon/xkbcommon-keysyms.h new file mode 100644 index 0000000..258feb7 --- /dev/null +++ b/src/linux/vendor/xkbcommon/xkbcommon-keysyms.h @@ -0,0 +1,3434 @@ +#ifndef _XKBCOMMON_KEYSYMS_H +#define _XKBCOMMON_KEYSYMS_H + +/* This file is autogenerated; please do not commit directly. */ + +/** + * @file + * Key symbols (keysyms) definitions. + */ + +#define XKB_KEY_NoSymbol 0x000000 /* Special KeySym */ + +/*********************************************************** +Copyright 1987, 1994, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* + * The "X11 Window System Protocol" standard defines in Appendix A the + * keysym codes. These 29-bit integer values identify characters or + * functions associated with each key (e.g., via the visible + * engraving) of a keyboard layout. This file assigns mnemonic macro + * names for these keysyms. + * + * This file is also compiled (by src/util/makekeys.c in libX11) into + * hash tables that can be accessed with X11 library functions such as + * XStringToKeysym() and XKeysymToString(). + * + * Where a keysym corresponds one-to-one to an ISO 10646 / Unicode + * character, this is noted in a comment that provides both the U+xxxx + * Unicode position, as well as the official Unicode name of the + * character. + * + * Some keysyms map to a character already mapped by another keysym, + * with compatible but more precise semantics, such as the keypad- + * related keysyms. In this case, none of the keysym are deprecated. + * The most generic keysym is annotated as previously and more specific + * keysyms have the same annotation between angle brackets: + * + * #define XKB_KEY_space 0x0020 // U+0020 SPACE + * #define XKB_KEY_KP_Space 0xff80 // + * + * Where the correspondence is either not one-to-one or semantically + * unclear, the Unicode position and name are enclosed in + * parentheses. Such legacy keysyms should be considered deprecated + * and are not recommended for use in future keyboard mappings. + * + * For any future extension of the keysyms with characters already + * found in ISO 10646 / Unicode, the following algorithm shall be + * used. The new keysym code position will simply be the character's + * Unicode number plus 0x01000000. The keysym values in the range + * 0x01000100 to 0x0110ffff are reserved to represent Unicode + * characters in the range U+0100 to U+10FFFF. + * + * While most newer Unicode-based X11 clients do already accept + * Unicode-mapped keysyms in the range 0x01000100 to 0x0110ffff, it + * will remain necessary for clients -- in the interest of + * compatibility with existing servers -- to also understand the + * existing legacy keysym values in the range 0x0100 to 0x20ff. + * + * Where several mnemonic names are defined for the same keysym in this + * file, the first one listed is considered the "canonical" name. This + * is the name that should be used when retrieving a keysym name from + * its code. The next names are considered "aliases" to the canonical + * name. + * + * Aliases are made explicit by writing in their comment "alias for", + * followed by the corresponding canonical name. Example: + * + * #define XKB_KEY_dead_tilde 0xfe53 + * #define XKB_KEY_dead_perispomeni 0xfe53 // alias for dead_tilde + * + * The rules to consider a keysym mnemonic name deprecated are: + * + * 1. A legacy keysym with its Unicode mapping in parentheses is + * deprecated (see above). + * + * 2. A keysym name is *explicitly* deprecated by starting its comment + * with "deprecated". Examples: + * + * #define XKB_KEY_L1 0xffc8 // deprecated alias for F11 + * #define XKB_KEY_quoteleft 0x0060 // deprecated + * + * 3. A keysym name is *explicitly* *not* deprecated by starting its + * comment with "non-deprecated alias". Examples: + * + * #define XKB_KEY_dead_tilde 0xfe53 + * #define XKB_KEY_dead_perispomeni 0xfe53 // non-deprecated alias for dead_tilde + * + * 4. If none of the previous rules apply, an alias is *implicitly* + * deprecated if there is at least one previous name for the + * corresponding keysym that is *not* explicitly deprecated. + * + * Examples: + * + * // SingleCandidate is the canonical name + * #define XKB_KEY_SingleCandidate 0xff3c + * // Hangul_SingleCandidate is deprecated because it is an alias + * // and it does not start with "non-deprecated alias" + * #define XKB_KEY_Hangul_SingleCandidate 0xff3c // Single candidate + * + * // guillemotleft is the canonical name, but it is deprecated + * #define XKB_KEY_guillemotleft 0x00ab // deprecated alias for guillemetleft (misspelling) + * // guillemetleft is not deprecated, because the keysym has no endorsed name before it. + * #define XKB_KEY_guillemetleft 0x00ab // U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + * // The following hypothetical name is deprecated because guillemetleft come before. + * #define XKB_KEY_guillemetleft2 0x00ab + * + * Mnemonic names for keysyms are defined in this file with lines + * that match one of these Perl regular expressions: + * + * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\* U\+([0-9A-F]{4,6}) (.*) \*\/\s*$/ + * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\*\/\s*$/ + * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*\/\*\(U\+([0-9A-F]{4,6}) (.*)\)\*\/\s*$/ + * /^\#define XKB_KEY_([a-zA-Z_0-9]+)\s+0x([0-9a-f]+)\s*(\/\*\s*(.*)\s*\*\/)?\s*$/ + * + * Before adding new keysyms, please do consider the following: In + * addition to the keysym names defined in this file, the + * XStringToKeysym() and XKeysymToString() functions will also handle + * any keysym string of the form "U0020" to "U007E" and "U00A0" to + * "U10FFFF" for all possible Unicode characters. In other words, + * every possible Unicode character has already a keysym string + * defined algorithmically, even if it is not listed here. Therefore, + * defining an additional keysym macro is only necessary where a + * non-hexadecimal mnemonic name is needed, or where the new keysym + * does not represent any existing Unicode character. + * + * When adding new keysyms to this file, do not forget to also update the + * following as needed: + * + * - the mappings in src/KeyBind.c in the libX11 repo + * https://gitlab.freedesktop.org/xorg/lib/libx11 + * + * - the protocol specification in specs/keysyms.xml in this repo + * https://gitlab.freedesktop.org/xorg/proto/xorgproto + * + * Before removing or changing the order of the keysyms, please consider + * the following: it is very difficult to know what keysyms are used and + * how. + * + * - A sandboxed application may have incompatibilities with the host + * system. For example, if new keysym name is introduced and is made + * the canonical name, then an application with an older keysym parser + * will not be able to parse the new name. + * - Customization of keyboard layout and Compose files are two popular + * use cases. Checking the standard keyboard layout database xkeyboard-config + * https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config + * and the standard Compose files in libx11 + * https://gitlab.freedesktop.org/xorg/lib/libx11 is a mandatory + * step, but may *not* be enough for a proper impact assessment for + * e.g. keysyms removals. + * + * Therefore, it is advised to proceed to no removal and to make a new + * name canonical only 10 years after its introduction. This means that + * some keysyms may have their first listed name deprecated during the + * period of transition. Once this period is over, the deprecated name + * should be moved after the new canonical name. + */ + +#define XKB_KEY_VoidSymbol 0xffffff /* Void symbol */ + +/* + * TTY function keys, cleverly chosen to map to ASCII, for convenience of + * programming, but could have been arbitrary (at the cost of lookup + * tables in client code). + */ + +#define XKB_KEY_BackSpace 0xff08 /* U+0008 BACKSPACE */ +#define XKB_KEY_Tab 0xff09 /* U+0009 CHARACTER TABULATION */ +#define XKB_KEY_Linefeed 0xff0a /* U+000A LINE FEED */ +#define XKB_KEY_Clear 0xff0b /* U+000B LINE TABULATION */ +#define XKB_KEY_Return 0xff0d /* U+000D CARRIAGE RETURN */ +#define XKB_KEY_Pause 0xff13 /* Pause, hold */ +#define XKB_KEY_Scroll_Lock 0xff14 +#define XKB_KEY_Sys_Req 0xff15 +#define XKB_KEY_Escape 0xff1b /* U+001B ESCAPE */ +#define XKB_KEY_Delete 0xffff /* U+007F DELETE */ + + + +/* International & multi-key character composition */ + +#define XKB_KEY_Multi_key 0xff20 /* Multi-key character compose */ +#define XKB_KEY_Codeinput 0xff37 +#define XKB_KEY_SingleCandidate 0xff3c +#define XKB_KEY_MultipleCandidate 0xff3d +#define XKB_KEY_PreviousCandidate 0xff3e + +/* Japanese keyboard support */ + +#define XKB_KEY_Kanji 0xff21 /* Kanji, Kanji convert */ +#define XKB_KEY_Muhenkan 0xff22 /* Cancel Conversion */ +#define XKB_KEY_Henkan_Mode 0xff23 /* Start/Stop Conversion */ +#define XKB_KEY_Henkan 0xff23 /* non-deprecated alias for Henkan_Mode */ +#define XKB_KEY_Romaji 0xff24 /* to Romaji */ +#define XKB_KEY_Hiragana 0xff25 /* to Hiragana */ +#define XKB_KEY_Katakana 0xff26 /* to Katakana */ +#define XKB_KEY_Hiragana_Katakana 0xff27 /* Hiragana/Katakana toggle */ +#define XKB_KEY_Zenkaku 0xff28 /* to Zenkaku */ +#define XKB_KEY_Hankaku 0xff29 /* to Hankaku */ +#define XKB_KEY_Zenkaku_Hankaku 0xff2a /* Zenkaku/Hankaku toggle */ +#define XKB_KEY_Touroku 0xff2b /* Add to Dictionary */ +#define XKB_KEY_Massyo 0xff2c /* Delete from Dictionary */ +#define XKB_KEY_Kana_Lock 0xff2d /* Kana Lock */ +#define XKB_KEY_Kana_Shift 0xff2e /* Kana Shift */ +#define XKB_KEY_Eisu_Shift 0xff2f /* Alphanumeric Shift */ +#define XKB_KEY_Eisu_toggle 0xff30 /* Alphanumeric toggle */ +#define XKB_KEY_Kanji_Bangou 0xff37 /* Codeinput */ +#define XKB_KEY_Zen_Koho 0xff3d /* Multiple/All Candidate(s) */ +#define XKB_KEY_Mae_Koho 0xff3e /* Previous Candidate */ + +/* 0xff31 thru 0xff3f are under XK_KOREAN */ + +/* Cursor control & motion */ + +#define XKB_KEY_Home 0xff50 +#define XKB_KEY_Left 0xff51 /* Move left, left arrow */ +#define XKB_KEY_Up 0xff52 /* Move up, up arrow */ +#define XKB_KEY_Right 0xff53 /* Move right, right arrow */ +#define XKB_KEY_Down 0xff54 /* Move down, down arrow */ +#define XKB_KEY_Prior 0xff55 /* Prior, previous */ +#define XKB_KEY_Page_Up 0xff55 /* deprecated alias for Prior */ +#define XKB_KEY_Next 0xff56 /* Next */ +#define XKB_KEY_Page_Down 0xff56 /* deprecated alias for Next */ +#define XKB_KEY_End 0xff57 /* EOL */ +#define XKB_KEY_Begin 0xff58 /* BOL */ + + +/* Misc functions */ + +#define XKB_KEY_Select 0xff60 /* Select, mark */ +#define XKB_KEY_Print 0xff61 +#define XKB_KEY_Execute 0xff62 /* Execute, run, do */ +#define XKB_KEY_Insert 0xff63 /* Insert, insert here */ +#define XKB_KEY_Undo 0xff65 +#define XKB_KEY_Redo 0xff66 /* Redo, again */ +#define XKB_KEY_Menu 0xff67 +#define XKB_KEY_Find 0xff68 /* Find, search */ +#define XKB_KEY_Cancel 0xff69 /* Cancel, stop, abort, exit */ +#define XKB_KEY_Help 0xff6a /* Help */ +#define XKB_KEY_Break 0xff6b +#define XKB_KEY_Mode_switch 0xff7e /* Character set switch */ +#define XKB_KEY_script_switch 0xff7e /* non-deprecated alias for Mode_switch */ +#define XKB_KEY_Num_Lock 0xff7f + +/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */ + +#define XKB_KEY_KP_Space 0xff80 /**/ +#define XKB_KEY_KP_Tab 0xff89 /**/ +#define XKB_KEY_KP_Enter 0xff8d /**/ +#define XKB_KEY_KP_F1 0xff91 /* PF1, KP_A, ... */ +#define XKB_KEY_KP_F2 0xff92 +#define XKB_KEY_KP_F3 0xff93 +#define XKB_KEY_KP_F4 0xff94 +#define XKB_KEY_KP_Home 0xff95 +#define XKB_KEY_KP_Left 0xff96 +#define XKB_KEY_KP_Up 0xff97 +#define XKB_KEY_KP_Right 0xff98 +#define XKB_KEY_KP_Down 0xff99 +#define XKB_KEY_KP_Prior 0xff9a +#define XKB_KEY_KP_Page_Up 0xff9a /* deprecated alias for KP_Prior */ +#define XKB_KEY_KP_Next 0xff9b +#define XKB_KEY_KP_Page_Down 0xff9b /* deprecated alias for KP_Next */ +#define XKB_KEY_KP_End 0xff9c +#define XKB_KEY_KP_Begin 0xff9d +#define XKB_KEY_KP_Insert 0xff9e +#define XKB_KEY_KP_Delete 0xff9f +#define XKB_KEY_KP_Equal 0xffbd /**/ +#define XKB_KEY_KP_Multiply 0xffaa /**/ +#define XKB_KEY_KP_Add 0xffab /**/ +#define XKB_KEY_KP_Separator 0xffac /**/ +#define XKB_KEY_KP_Subtract 0xffad /**/ +#define XKB_KEY_KP_Decimal 0xffae /**/ +#define XKB_KEY_KP_Divide 0xffaf /**/ + +#define XKB_KEY_KP_0 0xffb0 /**/ +#define XKB_KEY_KP_1 0xffb1 /**/ +#define XKB_KEY_KP_2 0xffb2 /**/ +#define XKB_KEY_KP_3 0xffb3 /**/ +#define XKB_KEY_KP_4 0xffb4 /**/ +#define XKB_KEY_KP_5 0xffb5 /**/ +#define XKB_KEY_KP_6 0xffb6 /**/ +#define XKB_KEY_KP_7 0xffb7 /**/ +#define XKB_KEY_KP_8 0xffb8 /**/ +#define XKB_KEY_KP_9 0xffb9 /**/ + + + +/* + * Auxiliary functions; note the duplicate definitions for left and right + * function keys; Sun keyboards and a few other manufacturers have such + * function key groups on the left and/or right sides of the keyboard. + * We've not found a keyboard with more than 35 function keys total. + */ + +#define XKB_KEY_F1 0xffbe +#define XKB_KEY_F2 0xffbf +#define XKB_KEY_F3 0xffc0 +#define XKB_KEY_F4 0xffc1 +#define XKB_KEY_F5 0xffc2 +#define XKB_KEY_F6 0xffc3 +#define XKB_KEY_F7 0xffc4 +#define XKB_KEY_F8 0xffc5 +#define XKB_KEY_F9 0xffc6 +#define XKB_KEY_F10 0xffc7 +#define XKB_KEY_F11 0xffc8 +#define XKB_KEY_L1 0xffc8 /* deprecated alias for F11 */ +#define XKB_KEY_F12 0xffc9 +#define XKB_KEY_L2 0xffc9 /* deprecated alias for F12 */ +#define XKB_KEY_F13 0xffca +#define XKB_KEY_L3 0xffca /* deprecated alias for F13 */ +#define XKB_KEY_F14 0xffcb +#define XKB_KEY_L4 0xffcb /* deprecated alias for F14 */ +#define XKB_KEY_F15 0xffcc +#define XKB_KEY_L5 0xffcc /* deprecated alias for F15 */ +#define XKB_KEY_F16 0xffcd +#define XKB_KEY_L6 0xffcd /* deprecated alias for F16 */ +#define XKB_KEY_F17 0xffce +#define XKB_KEY_L7 0xffce /* deprecated alias for F17 */ +#define XKB_KEY_F18 0xffcf +#define XKB_KEY_L8 0xffcf /* deprecated alias for F18 */ +#define XKB_KEY_F19 0xffd0 +#define XKB_KEY_L9 0xffd0 /* deprecated alias for F19 */ +#define XKB_KEY_F20 0xffd1 +#define XKB_KEY_L10 0xffd1 /* deprecated alias for F20 */ +#define XKB_KEY_F21 0xffd2 +#define XKB_KEY_R1 0xffd2 /* deprecated alias for F21 */ +#define XKB_KEY_F22 0xffd3 +#define XKB_KEY_R2 0xffd3 /* deprecated alias for F22 */ +#define XKB_KEY_F23 0xffd4 +#define XKB_KEY_R3 0xffd4 /* deprecated alias for F23 */ +#define XKB_KEY_F24 0xffd5 +#define XKB_KEY_R4 0xffd5 /* deprecated alias for F24 */ +#define XKB_KEY_F25 0xffd6 +#define XKB_KEY_R5 0xffd6 /* deprecated alias for F25 */ +#define XKB_KEY_F26 0xffd7 +#define XKB_KEY_R6 0xffd7 /* deprecated alias for F26 */ +#define XKB_KEY_F27 0xffd8 +#define XKB_KEY_R7 0xffd8 /* deprecated alias for F27 */ +#define XKB_KEY_F28 0xffd9 +#define XKB_KEY_R8 0xffd9 /* deprecated alias for F28 */ +#define XKB_KEY_F29 0xffda +#define XKB_KEY_R9 0xffda /* deprecated alias for F29 */ +#define XKB_KEY_F30 0xffdb +#define XKB_KEY_R10 0xffdb /* deprecated alias for F30 */ +#define XKB_KEY_F31 0xffdc +#define XKB_KEY_R11 0xffdc /* deprecated alias for F31 */ +#define XKB_KEY_F32 0xffdd +#define XKB_KEY_R12 0xffdd /* deprecated alias for F32 */ +#define XKB_KEY_F33 0xffde +#define XKB_KEY_R13 0xffde /* deprecated alias for F33 */ +#define XKB_KEY_F34 0xffdf +#define XKB_KEY_R14 0xffdf /* deprecated alias for F34 */ +#define XKB_KEY_F35 0xffe0 +#define XKB_KEY_R15 0xffe0 /* deprecated alias for F35 */ + +/* Modifiers */ + +#define XKB_KEY_Shift_L 0xffe1 /* Left shift */ +#define XKB_KEY_Shift_R 0xffe2 /* Right shift */ +#define XKB_KEY_Control_L 0xffe3 /* Left control */ +#define XKB_KEY_Control_R 0xffe4 /* Right control */ +#define XKB_KEY_Caps_Lock 0xffe5 /* Caps lock */ +#define XKB_KEY_Shift_Lock 0xffe6 /* Shift lock */ + +#define XKB_KEY_Meta_L 0xffe7 /* Left meta */ +#define XKB_KEY_Meta_R 0xffe8 /* Right meta */ +#define XKB_KEY_Alt_L 0xffe9 /* Left alt */ +#define XKB_KEY_Alt_R 0xffea /* Right alt */ +#define XKB_KEY_Super_L 0xffeb /* Left super */ +#define XKB_KEY_Super_R 0xffec /* Right super */ +#define XKB_KEY_Hyper_L 0xffed /* Left hyper */ +#define XKB_KEY_Hyper_R 0xffee /* Right hyper */ + +/* + * Keyboard (XKB) Extension function and modifier keys + * (from Appendix C of "The X Keyboard Extension: Protocol Specification") + * Byte 3 = 0xfe + */ + +#define XKB_KEY_ISO_Lock 0xfe01 +#define XKB_KEY_ISO_Level2_Latch 0xfe02 +#define XKB_KEY_ISO_Level3_Shift 0xfe03 +#define XKB_KEY_ISO_Level3_Latch 0xfe04 +#define XKB_KEY_ISO_Level3_Lock 0xfe05 +#define XKB_KEY_ISO_Level5_Shift 0xfe11 +#define XKB_KEY_ISO_Level5_Latch 0xfe12 +#define XKB_KEY_ISO_Level5_Lock 0xfe13 +#define XKB_KEY_ISO_Group_Shift 0xff7e /* non-deprecated alias for Mode_switch */ +#define XKB_KEY_ISO_Group_Latch 0xfe06 +#define XKB_KEY_ISO_Group_Lock 0xfe07 +#define XKB_KEY_ISO_Next_Group 0xfe08 +#define XKB_KEY_ISO_Next_Group_Lock 0xfe09 +#define XKB_KEY_ISO_Prev_Group 0xfe0a +#define XKB_KEY_ISO_Prev_Group_Lock 0xfe0b +#define XKB_KEY_ISO_First_Group 0xfe0c +#define XKB_KEY_ISO_First_Group_Lock 0xfe0d +#define XKB_KEY_ISO_Last_Group 0xfe0e +#define XKB_KEY_ISO_Last_Group_Lock 0xfe0f + +#define XKB_KEY_ISO_Left_Tab 0xfe20 +#define XKB_KEY_ISO_Move_Line_Up 0xfe21 +#define XKB_KEY_ISO_Move_Line_Down 0xfe22 +#define XKB_KEY_ISO_Partial_Line_Up 0xfe23 +#define XKB_KEY_ISO_Partial_Line_Down 0xfe24 +#define XKB_KEY_ISO_Partial_Space_Left 0xfe25 +#define XKB_KEY_ISO_Partial_Space_Right 0xfe26 +#define XKB_KEY_ISO_Set_Margin_Left 0xfe27 +#define XKB_KEY_ISO_Set_Margin_Right 0xfe28 +#define XKB_KEY_ISO_Release_Margin_Left 0xfe29 +#define XKB_KEY_ISO_Release_Margin_Right 0xfe2a +#define XKB_KEY_ISO_Release_Both_Margins 0xfe2b +#define XKB_KEY_ISO_Fast_Cursor_Left 0xfe2c +#define XKB_KEY_ISO_Fast_Cursor_Right 0xfe2d +#define XKB_KEY_ISO_Fast_Cursor_Up 0xfe2e +#define XKB_KEY_ISO_Fast_Cursor_Down 0xfe2f +#define XKB_KEY_ISO_Continuous_Underline 0xfe30 +#define XKB_KEY_ISO_Discontinuous_Underline 0xfe31 +#define XKB_KEY_ISO_Emphasize 0xfe32 +#define XKB_KEY_ISO_Center_Object 0xfe33 +#define XKB_KEY_ISO_Enter 0xfe34 + +#define XKB_KEY_dead_grave 0xfe50 +#define XKB_KEY_dead_acute 0xfe51 +#define XKB_KEY_dead_circumflex 0xfe52 +#define XKB_KEY_dead_tilde 0xfe53 +#define XKB_KEY_dead_perispomeni 0xfe53 /* non-deprecated alias for dead_tilde */ +#define XKB_KEY_dead_macron 0xfe54 +#define XKB_KEY_dead_breve 0xfe55 +#define XKB_KEY_dead_abovedot 0xfe56 +#define XKB_KEY_dead_diaeresis 0xfe57 +#define XKB_KEY_dead_abovering 0xfe58 +#define XKB_KEY_dead_doubleacute 0xfe59 +#define XKB_KEY_dead_caron 0xfe5a +#define XKB_KEY_dead_cedilla 0xfe5b +#define XKB_KEY_dead_ogonek 0xfe5c +#define XKB_KEY_dead_iota 0xfe5d +#define XKB_KEY_dead_voiced_sound 0xfe5e +#define XKB_KEY_dead_semivoiced_sound 0xfe5f +#define XKB_KEY_dead_belowdot 0xfe60 +#define XKB_KEY_dead_hook 0xfe61 +#define XKB_KEY_dead_horn 0xfe62 +#define XKB_KEY_dead_stroke 0xfe63 +#define XKB_KEY_dead_abovecomma 0xfe64 +#define XKB_KEY_dead_psili 0xfe64 /* non-deprecated alias for dead_abovecomma */ +#define XKB_KEY_dead_abovereversedcomma 0xfe65 +#define XKB_KEY_dead_dasia 0xfe65 /* non-deprecated alias for dead_abovereversedcomma */ +#define XKB_KEY_dead_doublegrave 0xfe66 +#define XKB_KEY_dead_belowring 0xfe67 +#define XKB_KEY_dead_belowmacron 0xfe68 +#define XKB_KEY_dead_belowcircumflex 0xfe69 +#define XKB_KEY_dead_belowtilde 0xfe6a +#define XKB_KEY_dead_belowbreve 0xfe6b +#define XKB_KEY_dead_belowdiaeresis 0xfe6c +#define XKB_KEY_dead_invertedbreve 0xfe6d +#define XKB_KEY_dead_belowcomma 0xfe6e +#define XKB_KEY_dead_currency 0xfe6f + +/* extra dead elements for German T3 layout */ +#define XKB_KEY_dead_lowline 0xfe90 +#define XKB_KEY_dead_aboveverticalline 0xfe91 +#define XKB_KEY_dead_belowverticalline 0xfe92 +#define XKB_KEY_dead_longsolidusoverlay 0xfe93 + +/* dead vowels for universal syllable entry */ +#define XKB_KEY_dead_a 0xfe80 +#define XKB_KEY_dead_A 0xfe81 +#define XKB_KEY_dead_e 0xfe82 +#define XKB_KEY_dead_E 0xfe83 +#define XKB_KEY_dead_i 0xfe84 +#define XKB_KEY_dead_I 0xfe85 +#define XKB_KEY_dead_o 0xfe86 +#define XKB_KEY_dead_O 0xfe87 +#define XKB_KEY_dead_u 0xfe88 +#define XKB_KEY_dead_U 0xfe89 +#define XKB_KEY_dead_small_schwa 0xfe8a /* deprecated alias for dead_schwa */ +#define XKB_KEY_dead_schwa 0xfe8a +#define XKB_KEY_dead_capital_schwa 0xfe8b /* deprecated alias for dead_SCHWA */ +#define XKB_KEY_dead_SCHWA 0xfe8b + +#define XKB_KEY_dead_greek 0xfe8c +#define XKB_KEY_dead_hamza 0xfe8d + +#define XKB_KEY_First_Virtual_Screen 0xfed0 +#define XKB_KEY_Prev_Virtual_Screen 0xfed1 +#define XKB_KEY_Next_Virtual_Screen 0xfed2 +#define XKB_KEY_Last_Virtual_Screen 0xfed4 +#define XKB_KEY_Terminate_Server 0xfed5 + +#define XKB_KEY_AccessX_Enable 0xfe70 +#define XKB_KEY_AccessX_Feedback_Enable 0xfe71 +#define XKB_KEY_RepeatKeys_Enable 0xfe72 +#define XKB_KEY_SlowKeys_Enable 0xfe73 +#define XKB_KEY_BounceKeys_Enable 0xfe74 +#define XKB_KEY_StickyKeys_Enable 0xfe75 +#define XKB_KEY_MouseKeys_Enable 0xfe76 +#define XKB_KEY_MouseKeys_Accel_Enable 0xfe77 +#define XKB_KEY_Overlay1_Enable 0xfe78 +#define XKB_KEY_Overlay2_Enable 0xfe79 +#define XKB_KEY_AudibleBell_Enable 0xfe7a + +#define XKB_KEY_Pointer_Left 0xfee0 +#define XKB_KEY_Pointer_Right 0xfee1 +#define XKB_KEY_Pointer_Up 0xfee2 +#define XKB_KEY_Pointer_Down 0xfee3 +#define XKB_KEY_Pointer_UpLeft 0xfee4 +#define XKB_KEY_Pointer_UpRight 0xfee5 +#define XKB_KEY_Pointer_DownLeft 0xfee6 +#define XKB_KEY_Pointer_DownRight 0xfee7 +#define XKB_KEY_Pointer_Button_Dflt 0xfee8 +#define XKB_KEY_Pointer_Button1 0xfee9 +#define XKB_KEY_Pointer_Button2 0xfeea +#define XKB_KEY_Pointer_Button3 0xfeeb +#define XKB_KEY_Pointer_Button4 0xfeec +#define XKB_KEY_Pointer_Button5 0xfeed +#define XKB_KEY_Pointer_DblClick_Dflt 0xfeee +#define XKB_KEY_Pointer_DblClick1 0xfeef +#define XKB_KEY_Pointer_DblClick2 0xfef0 +#define XKB_KEY_Pointer_DblClick3 0xfef1 +#define XKB_KEY_Pointer_DblClick4 0xfef2 +#define XKB_KEY_Pointer_DblClick5 0xfef3 +#define XKB_KEY_Pointer_Drag_Dflt 0xfef4 +#define XKB_KEY_Pointer_Drag1 0xfef5 +#define XKB_KEY_Pointer_Drag2 0xfef6 +#define XKB_KEY_Pointer_Drag3 0xfef7 +#define XKB_KEY_Pointer_Drag4 0xfef8 +#define XKB_KEY_Pointer_Drag5 0xfefd + +#define XKB_KEY_Pointer_EnableKeys 0xfef9 +#define XKB_KEY_Pointer_Accelerate 0xfefa +#define XKB_KEY_Pointer_DfltBtnNext 0xfefb +#define XKB_KEY_Pointer_DfltBtnPrev 0xfefc + +/* Single-Stroke Multiple-Character N-Graph Keysyms For The X Input Method */ + +#define XKB_KEY_ch 0xfea0 +#define XKB_KEY_Ch 0xfea1 +#define XKB_KEY_CH 0xfea2 +#define XKB_KEY_c_h 0xfea3 +#define XKB_KEY_C_h 0xfea4 +#define XKB_KEY_C_H 0xfea5 + + +/* + * 3270 Terminal Keys + * Byte 3 = 0xfd + */ + +#define XKB_KEY_3270_Duplicate 0xfd01 +#define XKB_KEY_3270_FieldMark 0xfd02 +#define XKB_KEY_3270_Right2 0xfd03 +#define XKB_KEY_3270_Left2 0xfd04 +#define XKB_KEY_3270_BackTab 0xfd05 +#define XKB_KEY_3270_EraseEOF 0xfd06 +#define XKB_KEY_3270_EraseInput 0xfd07 +#define XKB_KEY_3270_Reset 0xfd08 +#define XKB_KEY_3270_Quit 0xfd09 +#define XKB_KEY_3270_PA1 0xfd0a +#define XKB_KEY_3270_PA2 0xfd0b +#define XKB_KEY_3270_PA3 0xfd0c +#define XKB_KEY_3270_Test 0xfd0d +#define XKB_KEY_3270_Attn 0xfd0e +#define XKB_KEY_3270_CursorBlink 0xfd0f +#define XKB_KEY_3270_AltCursor 0xfd10 +#define XKB_KEY_3270_KeyClick 0xfd11 +#define XKB_KEY_3270_Jump 0xfd12 +#define XKB_KEY_3270_Ident 0xfd13 +#define XKB_KEY_3270_Rule 0xfd14 +#define XKB_KEY_3270_Copy 0xfd15 +#define XKB_KEY_3270_Play 0xfd16 +#define XKB_KEY_3270_Setup 0xfd17 +#define XKB_KEY_3270_Record 0xfd18 +#define XKB_KEY_3270_ChangeScreen 0xfd19 +#define XKB_KEY_3270_DeleteWord 0xfd1a +#define XKB_KEY_3270_ExSelect 0xfd1b +#define XKB_KEY_3270_CursorSelect 0xfd1c +#define XKB_KEY_3270_PrintScreen 0xfd1d +#define XKB_KEY_3270_Enter 0xfd1e + +/* + * Latin 1 + * (ISO/IEC 8859-1 = Unicode U+0020..U+00FF) + * Byte 3 = 0 + */ +#define XKB_KEY_space 0x0020 /* U+0020 SPACE */ +#define XKB_KEY_exclam 0x0021 /* U+0021 EXCLAMATION MARK */ +#define XKB_KEY_quotedbl 0x0022 /* U+0022 QUOTATION MARK */ +#define XKB_KEY_numbersign 0x0023 /* U+0023 NUMBER SIGN */ +#define XKB_KEY_dollar 0x0024 /* U+0024 DOLLAR SIGN */ +#define XKB_KEY_percent 0x0025 /* U+0025 PERCENT SIGN */ +#define XKB_KEY_ampersand 0x0026 /* U+0026 AMPERSAND */ +#define XKB_KEY_apostrophe 0x0027 /* U+0027 APOSTROPHE */ +#define XKB_KEY_quoteright 0x0027 /* deprecated */ +#define XKB_KEY_parenleft 0x0028 /* U+0028 LEFT PARENTHESIS */ +#define XKB_KEY_parenright 0x0029 /* U+0029 RIGHT PARENTHESIS */ +#define XKB_KEY_asterisk 0x002a /* U+002A ASTERISK */ +#define XKB_KEY_plus 0x002b /* U+002B PLUS SIGN */ +#define XKB_KEY_comma 0x002c /* U+002C COMMA */ +#define XKB_KEY_minus 0x002d /* U+002D HYPHEN-MINUS */ +#define XKB_KEY_period 0x002e /* U+002E FULL STOP */ +#define XKB_KEY_slash 0x002f /* U+002F SOLIDUS */ +#define XKB_KEY_0 0x0030 /* U+0030 DIGIT ZERO */ +#define XKB_KEY_1 0x0031 /* U+0031 DIGIT ONE */ +#define XKB_KEY_2 0x0032 /* U+0032 DIGIT TWO */ +#define XKB_KEY_3 0x0033 /* U+0033 DIGIT THREE */ +#define XKB_KEY_4 0x0034 /* U+0034 DIGIT FOUR */ +#define XKB_KEY_5 0x0035 /* U+0035 DIGIT FIVE */ +#define XKB_KEY_6 0x0036 /* U+0036 DIGIT SIX */ +#define XKB_KEY_7 0x0037 /* U+0037 DIGIT SEVEN */ +#define XKB_KEY_8 0x0038 /* U+0038 DIGIT EIGHT */ +#define XKB_KEY_9 0x0039 /* U+0039 DIGIT NINE */ +#define XKB_KEY_colon 0x003a /* U+003A COLON */ +#define XKB_KEY_semicolon 0x003b /* U+003B SEMICOLON */ +#define XKB_KEY_less 0x003c /* U+003C LESS-THAN SIGN */ +#define XKB_KEY_equal 0x003d /* U+003D EQUALS SIGN */ +#define XKB_KEY_greater 0x003e /* U+003E GREATER-THAN SIGN */ +#define XKB_KEY_question 0x003f /* U+003F QUESTION MARK */ +#define XKB_KEY_at 0x0040 /* U+0040 COMMERCIAL AT */ +#define XKB_KEY_A 0x0041 /* U+0041 LATIN CAPITAL LETTER A */ +#define XKB_KEY_B 0x0042 /* U+0042 LATIN CAPITAL LETTER B */ +#define XKB_KEY_C 0x0043 /* U+0043 LATIN CAPITAL LETTER C */ +#define XKB_KEY_D 0x0044 /* U+0044 LATIN CAPITAL LETTER D */ +#define XKB_KEY_E 0x0045 /* U+0045 LATIN CAPITAL LETTER E */ +#define XKB_KEY_F 0x0046 /* U+0046 LATIN CAPITAL LETTER F */ +#define XKB_KEY_G 0x0047 /* U+0047 LATIN CAPITAL LETTER G */ +#define XKB_KEY_H 0x0048 /* U+0048 LATIN CAPITAL LETTER H */ +#define XKB_KEY_I 0x0049 /* U+0049 LATIN CAPITAL LETTER I */ +#define XKB_KEY_J 0x004a /* U+004A LATIN CAPITAL LETTER J */ +#define XKB_KEY_K 0x004b /* U+004B LATIN CAPITAL LETTER K */ +#define XKB_KEY_L 0x004c /* U+004C LATIN CAPITAL LETTER L */ +#define XKB_KEY_M 0x004d /* U+004D LATIN CAPITAL LETTER M */ +#define XKB_KEY_N 0x004e /* U+004E LATIN CAPITAL LETTER N */ +#define XKB_KEY_O 0x004f /* U+004F LATIN CAPITAL LETTER O */ +#define XKB_KEY_P 0x0050 /* U+0050 LATIN CAPITAL LETTER P */ +#define XKB_KEY_Q 0x0051 /* U+0051 LATIN CAPITAL LETTER Q */ +#define XKB_KEY_R 0x0052 /* U+0052 LATIN CAPITAL LETTER R */ +#define XKB_KEY_S 0x0053 /* U+0053 LATIN CAPITAL LETTER S */ +#define XKB_KEY_T 0x0054 /* U+0054 LATIN CAPITAL LETTER T */ +#define XKB_KEY_U 0x0055 /* U+0055 LATIN CAPITAL LETTER U */ +#define XKB_KEY_V 0x0056 /* U+0056 LATIN CAPITAL LETTER V */ +#define XKB_KEY_W 0x0057 /* U+0057 LATIN CAPITAL LETTER W */ +#define XKB_KEY_X 0x0058 /* U+0058 LATIN CAPITAL LETTER X */ +#define XKB_KEY_Y 0x0059 /* U+0059 LATIN CAPITAL LETTER Y */ +#define XKB_KEY_Z 0x005a /* U+005A LATIN CAPITAL LETTER Z */ +#define XKB_KEY_bracketleft 0x005b /* U+005B LEFT SQUARE BRACKET */ +#define XKB_KEY_backslash 0x005c /* U+005C REVERSE SOLIDUS */ +#define XKB_KEY_bracketright 0x005d /* U+005D RIGHT SQUARE BRACKET */ +#define XKB_KEY_asciicircum 0x005e /* U+005E CIRCUMFLEX ACCENT */ +#define XKB_KEY_underscore 0x005f /* U+005F LOW LINE */ +#define XKB_KEY_grave 0x0060 /* U+0060 GRAVE ACCENT */ +#define XKB_KEY_quoteleft 0x0060 /* deprecated */ +#define XKB_KEY_a 0x0061 /* U+0061 LATIN SMALL LETTER A */ +#define XKB_KEY_b 0x0062 /* U+0062 LATIN SMALL LETTER B */ +#define XKB_KEY_c 0x0063 /* U+0063 LATIN SMALL LETTER C */ +#define XKB_KEY_d 0x0064 /* U+0064 LATIN SMALL LETTER D */ +#define XKB_KEY_e 0x0065 /* U+0065 LATIN SMALL LETTER E */ +#define XKB_KEY_f 0x0066 /* U+0066 LATIN SMALL LETTER F */ +#define XKB_KEY_g 0x0067 /* U+0067 LATIN SMALL LETTER G */ +#define XKB_KEY_h 0x0068 /* U+0068 LATIN SMALL LETTER H */ +#define XKB_KEY_i 0x0069 /* U+0069 LATIN SMALL LETTER I */ +#define XKB_KEY_j 0x006a /* U+006A LATIN SMALL LETTER J */ +#define XKB_KEY_k 0x006b /* U+006B LATIN SMALL LETTER K */ +#define XKB_KEY_l 0x006c /* U+006C LATIN SMALL LETTER L */ +#define XKB_KEY_m 0x006d /* U+006D LATIN SMALL LETTER M */ +#define XKB_KEY_n 0x006e /* U+006E LATIN SMALL LETTER N */ +#define XKB_KEY_o 0x006f /* U+006F LATIN SMALL LETTER O */ +#define XKB_KEY_p 0x0070 /* U+0070 LATIN SMALL LETTER P */ +#define XKB_KEY_q 0x0071 /* U+0071 LATIN SMALL LETTER Q */ +#define XKB_KEY_r 0x0072 /* U+0072 LATIN SMALL LETTER R */ +#define XKB_KEY_s 0x0073 /* U+0073 LATIN SMALL LETTER S */ +#define XKB_KEY_t 0x0074 /* U+0074 LATIN SMALL LETTER T */ +#define XKB_KEY_u 0x0075 /* U+0075 LATIN SMALL LETTER U */ +#define XKB_KEY_v 0x0076 /* U+0076 LATIN SMALL LETTER V */ +#define XKB_KEY_w 0x0077 /* U+0077 LATIN SMALL LETTER W */ +#define XKB_KEY_x 0x0078 /* U+0078 LATIN SMALL LETTER X */ +#define XKB_KEY_y 0x0079 /* U+0079 LATIN SMALL LETTER Y */ +#define XKB_KEY_z 0x007a /* U+007A LATIN SMALL LETTER Z */ +#define XKB_KEY_braceleft 0x007b /* U+007B LEFT CURLY BRACKET */ +#define XKB_KEY_bar 0x007c /* U+007C VERTICAL LINE */ +#define XKB_KEY_braceright 0x007d /* U+007D RIGHT CURLY BRACKET */ +#define XKB_KEY_asciitilde 0x007e /* U+007E TILDE */ + +#define XKB_KEY_nobreakspace 0x00a0 /* U+00A0 NO-BREAK SPACE */ +#define XKB_KEY_exclamdown 0x00a1 /* U+00A1 INVERTED EXCLAMATION MARK */ +#define XKB_KEY_cent 0x00a2 /* U+00A2 CENT SIGN */ +#define XKB_KEY_sterling 0x00a3 /* U+00A3 POUND SIGN */ +#define XKB_KEY_currency 0x00a4 /* U+00A4 CURRENCY SIGN */ +#define XKB_KEY_yen 0x00a5 /* U+00A5 YEN SIGN */ +#define XKB_KEY_brokenbar 0x00a6 /* U+00A6 BROKEN BAR */ +#define XKB_KEY_section 0x00a7 /* U+00A7 SECTION SIGN */ +#define XKB_KEY_diaeresis 0x00a8 /* U+00A8 DIAERESIS */ +#define XKB_KEY_copyright 0x00a9 /* U+00A9 COPYRIGHT SIGN */ +#define XKB_KEY_ordfeminine 0x00aa /* U+00AA FEMININE ORDINAL INDICATOR */ +#define XKB_KEY_guillemotleft 0x00ab /* deprecated alias for guillemetleft (misspelling) */ +#define XKB_KEY_guillemetleft 0x00ab /* U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */ +#define XKB_KEY_notsign 0x00ac /* U+00AC NOT SIGN */ +#define XKB_KEY_hyphen 0x00ad /* U+00AD SOFT HYPHEN */ +#define XKB_KEY_registered 0x00ae /* U+00AE REGISTERED SIGN */ +#define XKB_KEY_macron 0x00af /* U+00AF MACRON */ +#define XKB_KEY_degree 0x00b0 /* U+00B0 DEGREE SIGN */ +#define XKB_KEY_plusminus 0x00b1 /* U+00B1 PLUS-MINUS SIGN */ +#define XKB_KEY_twosuperior 0x00b2 /* U+00B2 SUPERSCRIPT TWO */ +#define XKB_KEY_threesuperior 0x00b3 /* U+00B3 SUPERSCRIPT THREE */ +#define XKB_KEY_acute 0x00b4 /* U+00B4 ACUTE ACCENT */ +#define XKB_KEY_mu 0x00b5 /* U+00B5 MICRO SIGN */ +#define XKB_KEY_paragraph 0x00b6 /* U+00B6 PILCROW SIGN */ +#define XKB_KEY_periodcentered 0x00b7 /* U+00B7 MIDDLE DOT */ +#define XKB_KEY_cedilla 0x00b8 /* U+00B8 CEDILLA */ +#define XKB_KEY_onesuperior 0x00b9 /* U+00B9 SUPERSCRIPT ONE */ +#define XKB_KEY_masculine 0x00ba /* deprecated alias for ordmasculine (inconsistent name) */ +#define XKB_KEY_ordmasculine 0x00ba /* U+00BA MASCULINE ORDINAL INDICATOR */ +#define XKB_KEY_guillemotright 0x00bb /* deprecated alias for guillemetright (misspelling) */ +#define XKB_KEY_guillemetright 0x00bb /* U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */ +#define XKB_KEY_onequarter 0x00bc /* U+00BC VULGAR FRACTION ONE QUARTER */ +#define XKB_KEY_onehalf 0x00bd /* U+00BD VULGAR FRACTION ONE HALF */ +#define XKB_KEY_threequarters 0x00be /* U+00BE VULGAR FRACTION THREE QUARTERS */ +#define XKB_KEY_questiondown 0x00bf /* U+00BF INVERTED QUESTION MARK */ +#define XKB_KEY_Agrave 0x00c0 /* U+00C0 LATIN CAPITAL LETTER A WITH GRAVE */ +#define XKB_KEY_Aacute 0x00c1 /* U+00C1 LATIN CAPITAL LETTER A WITH ACUTE */ +#define XKB_KEY_Acircumflex 0x00c2 /* U+00C2 LATIN CAPITAL LETTER A WITH CIRCUMFLEX */ +#define XKB_KEY_Atilde 0x00c3 /* U+00C3 LATIN CAPITAL LETTER A WITH TILDE */ +#define XKB_KEY_Adiaeresis 0x00c4 /* U+00C4 LATIN CAPITAL LETTER A WITH DIAERESIS */ +#define XKB_KEY_Aring 0x00c5 /* U+00C5 LATIN CAPITAL LETTER A WITH RING ABOVE */ +#define XKB_KEY_AE 0x00c6 /* U+00C6 LATIN CAPITAL LETTER AE */ +#define XKB_KEY_Ccedilla 0x00c7 /* U+00C7 LATIN CAPITAL LETTER C WITH CEDILLA */ +#define XKB_KEY_Egrave 0x00c8 /* U+00C8 LATIN CAPITAL LETTER E WITH GRAVE */ +#define XKB_KEY_Eacute 0x00c9 /* U+00C9 LATIN CAPITAL LETTER E WITH ACUTE */ +#define XKB_KEY_Ecircumflex 0x00ca /* U+00CA LATIN CAPITAL LETTER E WITH CIRCUMFLEX */ +#define XKB_KEY_Ediaeresis 0x00cb /* U+00CB LATIN CAPITAL LETTER E WITH DIAERESIS */ +#define XKB_KEY_Igrave 0x00cc /* U+00CC LATIN CAPITAL LETTER I WITH GRAVE */ +#define XKB_KEY_Iacute 0x00cd /* U+00CD LATIN CAPITAL LETTER I WITH ACUTE */ +#define XKB_KEY_Icircumflex 0x00ce /* U+00CE LATIN CAPITAL LETTER I WITH CIRCUMFLEX */ +#define XKB_KEY_Idiaeresis 0x00cf /* U+00CF LATIN CAPITAL LETTER I WITH DIAERESIS */ +#define XKB_KEY_ETH 0x00d0 /* U+00D0 LATIN CAPITAL LETTER ETH */ +#define XKB_KEY_Eth 0x00d0 /* deprecated */ +#define XKB_KEY_Ntilde 0x00d1 /* U+00D1 LATIN CAPITAL LETTER N WITH TILDE */ +#define XKB_KEY_Ograve 0x00d2 /* U+00D2 LATIN CAPITAL LETTER O WITH GRAVE */ +#define XKB_KEY_Oacute 0x00d3 /* U+00D3 LATIN CAPITAL LETTER O WITH ACUTE */ +#define XKB_KEY_Ocircumflex 0x00d4 /* U+00D4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX */ +#define XKB_KEY_Otilde 0x00d5 /* U+00D5 LATIN CAPITAL LETTER O WITH TILDE */ +#define XKB_KEY_Odiaeresis 0x00d6 /* U+00D6 LATIN CAPITAL LETTER O WITH DIAERESIS */ +#define XKB_KEY_multiply 0x00d7 /* U+00D7 MULTIPLICATION SIGN */ +#define XKB_KEY_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */ +#define XKB_KEY_Ooblique 0x00d8 /* deprecated alias for Oslash */ +#define XKB_KEY_Ugrave 0x00d9 /* U+00D9 LATIN CAPITAL LETTER U WITH GRAVE */ +#define XKB_KEY_Uacute 0x00da /* U+00DA LATIN CAPITAL LETTER U WITH ACUTE */ +#define XKB_KEY_Ucircumflex 0x00db /* U+00DB LATIN CAPITAL LETTER U WITH CIRCUMFLEX */ +#define XKB_KEY_Udiaeresis 0x00dc /* U+00DC LATIN CAPITAL LETTER U WITH DIAERESIS */ +#define XKB_KEY_Yacute 0x00dd /* U+00DD LATIN CAPITAL LETTER Y WITH ACUTE */ +#define XKB_KEY_THORN 0x00de /* U+00DE LATIN CAPITAL LETTER THORN */ +#define XKB_KEY_Thorn 0x00de /* deprecated */ +#define XKB_KEY_ssharp 0x00df /* U+00DF LATIN SMALL LETTER SHARP S */ +#define XKB_KEY_agrave 0x00e0 /* U+00E0 LATIN SMALL LETTER A WITH GRAVE */ +#define XKB_KEY_aacute 0x00e1 /* U+00E1 LATIN SMALL LETTER A WITH ACUTE */ +#define XKB_KEY_acircumflex 0x00e2 /* U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX */ +#define XKB_KEY_atilde 0x00e3 /* U+00E3 LATIN SMALL LETTER A WITH TILDE */ +#define XKB_KEY_adiaeresis 0x00e4 /* U+00E4 LATIN SMALL LETTER A WITH DIAERESIS */ +#define XKB_KEY_aring 0x00e5 /* U+00E5 LATIN SMALL LETTER A WITH RING ABOVE */ +#define XKB_KEY_ae 0x00e6 /* U+00E6 LATIN SMALL LETTER AE */ +#define XKB_KEY_ccedilla 0x00e7 /* U+00E7 LATIN SMALL LETTER C WITH CEDILLA */ +#define XKB_KEY_egrave 0x00e8 /* U+00E8 LATIN SMALL LETTER E WITH GRAVE */ +#define XKB_KEY_eacute 0x00e9 /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */ +#define XKB_KEY_ecircumflex 0x00ea /* U+00EA LATIN SMALL LETTER E WITH CIRCUMFLEX */ +#define XKB_KEY_ediaeresis 0x00eb /* U+00EB LATIN SMALL LETTER E WITH DIAERESIS */ +#define XKB_KEY_igrave 0x00ec /* U+00EC LATIN SMALL LETTER I WITH GRAVE */ +#define XKB_KEY_iacute 0x00ed /* U+00ED LATIN SMALL LETTER I WITH ACUTE */ +#define XKB_KEY_icircumflex 0x00ee /* U+00EE LATIN SMALL LETTER I WITH CIRCUMFLEX */ +#define XKB_KEY_idiaeresis 0x00ef /* U+00EF LATIN SMALL LETTER I WITH DIAERESIS */ +#define XKB_KEY_eth 0x00f0 /* U+00F0 LATIN SMALL LETTER ETH */ +#define XKB_KEY_ntilde 0x00f1 /* U+00F1 LATIN SMALL LETTER N WITH TILDE */ +#define XKB_KEY_ograve 0x00f2 /* U+00F2 LATIN SMALL LETTER O WITH GRAVE */ +#define XKB_KEY_oacute 0x00f3 /* U+00F3 LATIN SMALL LETTER O WITH ACUTE */ +#define XKB_KEY_ocircumflex 0x00f4 /* U+00F4 LATIN SMALL LETTER O WITH CIRCUMFLEX */ +#define XKB_KEY_otilde 0x00f5 /* U+00F5 LATIN SMALL LETTER O WITH TILDE */ +#define XKB_KEY_odiaeresis 0x00f6 /* U+00F6 LATIN SMALL LETTER O WITH DIAERESIS */ +#define XKB_KEY_division 0x00f7 /* U+00F7 DIVISION SIGN */ +#define XKB_KEY_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */ +#define XKB_KEY_ooblique 0x00f8 /* deprecated alias for oslash */ +#define XKB_KEY_ugrave 0x00f9 /* U+00F9 LATIN SMALL LETTER U WITH GRAVE */ +#define XKB_KEY_uacute 0x00fa /* U+00FA LATIN SMALL LETTER U WITH ACUTE */ +#define XKB_KEY_ucircumflex 0x00fb /* U+00FB LATIN SMALL LETTER U WITH CIRCUMFLEX */ +#define XKB_KEY_udiaeresis 0x00fc /* U+00FC LATIN SMALL LETTER U WITH DIAERESIS */ +#define XKB_KEY_yacute 0x00fd /* U+00FD LATIN SMALL LETTER Y WITH ACUTE */ +#define XKB_KEY_thorn 0x00fe /* U+00FE LATIN SMALL LETTER THORN */ +#define XKB_KEY_ydiaeresis 0x00ff /* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */ + +/* + * Latin 2 + * Byte 3 = 1 + */ + +#define XKB_KEY_Aogonek 0x01a1 /* U+0104 LATIN CAPITAL LETTER A WITH OGONEK */ +#define XKB_KEY_breve 0x01a2 /* U+02D8 BREVE */ +#define XKB_KEY_Lstroke 0x01a3 /* U+0141 LATIN CAPITAL LETTER L WITH STROKE */ +#define XKB_KEY_Lcaron 0x01a5 /* U+013D LATIN CAPITAL LETTER L WITH CARON */ +#define XKB_KEY_Sacute 0x01a6 /* U+015A LATIN CAPITAL LETTER S WITH ACUTE */ +#define XKB_KEY_Scaron 0x01a9 /* U+0160 LATIN CAPITAL LETTER S WITH CARON */ +#define XKB_KEY_Scedilla 0x01aa /* U+015E LATIN CAPITAL LETTER S WITH CEDILLA */ +#define XKB_KEY_Tcaron 0x01ab /* U+0164 LATIN CAPITAL LETTER T WITH CARON */ +#define XKB_KEY_Zacute 0x01ac /* U+0179 LATIN CAPITAL LETTER Z WITH ACUTE */ +#define XKB_KEY_Zcaron 0x01ae /* U+017D LATIN CAPITAL LETTER Z WITH CARON */ +#define XKB_KEY_Zabovedot 0x01af /* U+017B LATIN CAPITAL LETTER Z WITH DOT ABOVE */ +#define XKB_KEY_aogonek 0x01b1 /* U+0105 LATIN SMALL LETTER A WITH OGONEK */ +#define XKB_KEY_ogonek 0x01b2 /* U+02DB OGONEK */ +#define XKB_KEY_lstroke 0x01b3 /* U+0142 LATIN SMALL LETTER L WITH STROKE */ +#define XKB_KEY_lcaron 0x01b5 /* U+013E LATIN SMALL LETTER L WITH CARON */ +#define XKB_KEY_sacute 0x01b6 /* U+015B LATIN SMALL LETTER S WITH ACUTE */ +#define XKB_KEY_caron 0x01b7 /* U+02C7 CARON */ +#define XKB_KEY_scaron 0x01b9 /* U+0161 LATIN SMALL LETTER S WITH CARON */ +#define XKB_KEY_scedilla 0x01ba /* U+015F LATIN SMALL LETTER S WITH CEDILLA */ +#define XKB_KEY_tcaron 0x01bb /* U+0165 LATIN SMALL LETTER T WITH CARON */ +#define XKB_KEY_zacute 0x01bc /* U+017A LATIN SMALL LETTER Z WITH ACUTE */ +#define XKB_KEY_doubleacute 0x01bd /* U+02DD DOUBLE ACUTE ACCENT */ +#define XKB_KEY_zcaron 0x01be /* U+017E LATIN SMALL LETTER Z WITH CARON */ +#define XKB_KEY_zabovedot 0x01bf /* U+017C LATIN SMALL LETTER Z WITH DOT ABOVE */ +#define XKB_KEY_Racute 0x01c0 /* U+0154 LATIN CAPITAL LETTER R WITH ACUTE */ +#define XKB_KEY_Abreve 0x01c3 /* U+0102 LATIN CAPITAL LETTER A WITH BREVE */ +#define XKB_KEY_Lacute 0x01c5 /* U+0139 LATIN CAPITAL LETTER L WITH ACUTE */ +#define XKB_KEY_Cacute 0x01c6 /* U+0106 LATIN CAPITAL LETTER C WITH ACUTE */ +#define XKB_KEY_Ccaron 0x01c8 /* U+010C LATIN CAPITAL LETTER C WITH CARON */ +#define XKB_KEY_Eogonek 0x01ca /* U+0118 LATIN CAPITAL LETTER E WITH OGONEK */ +#define XKB_KEY_Ecaron 0x01cc /* U+011A LATIN CAPITAL LETTER E WITH CARON */ +#define XKB_KEY_Dcaron 0x01cf /* U+010E LATIN CAPITAL LETTER D WITH CARON */ +#define XKB_KEY_Dstroke 0x01d0 /* U+0110 LATIN CAPITAL LETTER D WITH STROKE */ +#define XKB_KEY_Nacute 0x01d1 /* U+0143 LATIN CAPITAL LETTER N WITH ACUTE */ +#define XKB_KEY_Ncaron 0x01d2 /* U+0147 LATIN CAPITAL LETTER N WITH CARON */ +#define XKB_KEY_Odoubleacute 0x01d5 /* U+0150 LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */ +#define XKB_KEY_Rcaron 0x01d8 /* U+0158 LATIN CAPITAL LETTER R WITH CARON */ +#define XKB_KEY_Uring 0x01d9 /* U+016E LATIN CAPITAL LETTER U WITH RING ABOVE */ +#define XKB_KEY_Udoubleacute 0x01db /* U+0170 LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */ +#define XKB_KEY_Tcedilla 0x01de /* U+0162 LATIN CAPITAL LETTER T WITH CEDILLA */ +#define XKB_KEY_racute 0x01e0 /* U+0155 LATIN SMALL LETTER R WITH ACUTE */ +#define XKB_KEY_abreve 0x01e3 /* U+0103 LATIN SMALL LETTER A WITH BREVE */ +#define XKB_KEY_lacute 0x01e5 /* U+013A LATIN SMALL LETTER L WITH ACUTE */ +#define XKB_KEY_cacute 0x01e6 /* U+0107 LATIN SMALL LETTER C WITH ACUTE */ +#define XKB_KEY_ccaron 0x01e8 /* U+010D LATIN SMALL LETTER C WITH CARON */ +#define XKB_KEY_eogonek 0x01ea /* U+0119 LATIN SMALL LETTER E WITH OGONEK */ +#define XKB_KEY_ecaron 0x01ec /* U+011B LATIN SMALL LETTER E WITH CARON */ +#define XKB_KEY_dcaron 0x01ef /* U+010F LATIN SMALL LETTER D WITH CARON */ +#define XKB_KEY_dstroke 0x01f0 /* U+0111 LATIN SMALL LETTER D WITH STROKE */ +#define XKB_KEY_nacute 0x01f1 /* U+0144 LATIN SMALL LETTER N WITH ACUTE */ +#define XKB_KEY_ncaron 0x01f2 /* U+0148 LATIN SMALL LETTER N WITH CARON */ +#define XKB_KEY_odoubleacute 0x01f5 /* U+0151 LATIN SMALL LETTER O WITH DOUBLE ACUTE */ +#define XKB_KEY_rcaron 0x01f8 /* U+0159 LATIN SMALL LETTER R WITH CARON */ +#define XKB_KEY_uring 0x01f9 /* U+016F LATIN SMALL LETTER U WITH RING ABOVE */ +#define XKB_KEY_udoubleacute 0x01fb /* U+0171 LATIN SMALL LETTER U WITH DOUBLE ACUTE */ +#define XKB_KEY_tcedilla 0x01fe /* U+0163 LATIN SMALL LETTER T WITH CEDILLA */ +#define XKB_KEY_abovedot 0x01ff /* U+02D9 DOT ABOVE */ + +/* + * Latin 3 + * Byte 3 = 2 + */ + +#define XKB_KEY_Hstroke 0x02a1 /* U+0126 LATIN CAPITAL LETTER H WITH STROKE */ +#define XKB_KEY_Hcircumflex 0x02a6 /* U+0124 LATIN CAPITAL LETTER H WITH CIRCUMFLEX */ +#define XKB_KEY_Iabovedot 0x02a9 /* U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE */ +#define XKB_KEY_Gbreve 0x02ab /* U+011E LATIN CAPITAL LETTER G WITH BREVE */ +#define XKB_KEY_Jcircumflex 0x02ac /* U+0134 LATIN CAPITAL LETTER J WITH CIRCUMFLEX */ +#define XKB_KEY_hstroke 0x02b1 /* U+0127 LATIN SMALL LETTER H WITH STROKE */ +#define XKB_KEY_hcircumflex 0x02b6 /* U+0125 LATIN SMALL LETTER H WITH CIRCUMFLEX */ +#define XKB_KEY_idotless 0x02b9 /* U+0131 LATIN SMALL LETTER DOTLESS I */ +#define XKB_KEY_gbreve 0x02bb /* U+011F LATIN SMALL LETTER G WITH BREVE */ +#define XKB_KEY_jcircumflex 0x02bc /* U+0135 LATIN SMALL LETTER J WITH CIRCUMFLEX */ +#define XKB_KEY_Cabovedot 0x02c5 /* U+010A LATIN CAPITAL LETTER C WITH DOT ABOVE */ +#define XKB_KEY_Ccircumflex 0x02c6 /* U+0108 LATIN CAPITAL LETTER C WITH CIRCUMFLEX */ +#define XKB_KEY_Gabovedot 0x02d5 /* U+0120 LATIN CAPITAL LETTER G WITH DOT ABOVE */ +#define XKB_KEY_Gcircumflex 0x02d8 /* U+011C LATIN CAPITAL LETTER G WITH CIRCUMFLEX */ +#define XKB_KEY_Ubreve 0x02dd /* U+016C LATIN CAPITAL LETTER U WITH BREVE */ +#define XKB_KEY_Scircumflex 0x02de /* U+015C LATIN CAPITAL LETTER S WITH CIRCUMFLEX */ +#define XKB_KEY_cabovedot 0x02e5 /* U+010B LATIN SMALL LETTER C WITH DOT ABOVE */ +#define XKB_KEY_ccircumflex 0x02e6 /* U+0109 LATIN SMALL LETTER C WITH CIRCUMFLEX */ +#define XKB_KEY_gabovedot 0x02f5 /* U+0121 LATIN SMALL LETTER G WITH DOT ABOVE */ +#define XKB_KEY_gcircumflex 0x02f8 /* U+011D LATIN SMALL LETTER G WITH CIRCUMFLEX */ +#define XKB_KEY_ubreve 0x02fd /* U+016D LATIN SMALL LETTER U WITH BREVE */ +#define XKB_KEY_scircumflex 0x02fe /* U+015D LATIN SMALL LETTER S WITH CIRCUMFLEX */ + + +/* + * Latin 4 + * Byte 3 = 3 + */ + +#define XKB_KEY_kra 0x03a2 /* U+0138 LATIN SMALL LETTER KRA */ +#define XKB_KEY_kappa 0x03a2 /* deprecated */ +#define XKB_KEY_Rcedilla 0x03a3 /* U+0156 LATIN CAPITAL LETTER R WITH CEDILLA */ +#define XKB_KEY_Itilde 0x03a5 /* U+0128 LATIN CAPITAL LETTER I WITH TILDE */ +#define XKB_KEY_Lcedilla 0x03a6 /* U+013B LATIN CAPITAL LETTER L WITH CEDILLA */ +#define XKB_KEY_Emacron 0x03aa /* U+0112 LATIN CAPITAL LETTER E WITH MACRON */ +#define XKB_KEY_Gcedilla 0x03ab /* U+0122 LATIN CAPITAL LETTER G WITH CEDILLA */ +#define XKB_KEY_Tslash 0x03ac /* U+0166 LATIN CAPITAL LETTER T WITH STROKE */ +#define XKB_KEY_rcedilla 0x03b3 /* U+0157 LATIN SMALL LETTER R WITH CEDILLA */ +#define XKB_KEY_itilde 0x03b5 /* U+0129 LATIN SMALL LETTER I WITH TILDE */ +#define XKB_KEY_lcedilla 0x03b6 /* U+013C LATIN SMALL LETTER L WITH CEDILLA */ +#define XKB_KEY_emacron 0x03ba /* U+0113 LATIN SMALL LETTER E WITH MACRON */ +#define XKB_KEY_gcedilla 0x03bb /* U+0123 LATIN SMALL LETTER G WITH CEDILLA */ +#define XKB_KEY_tslash 0x03bc /* U+0167 LATIN SMALL LETTER T WITH STROKE */ +#define XKB_KEY_ENG 0x03bd /* U+014A LATIN CAPITAL LETTER ENG */ +#define XKB_KEY_eng 0x03bf /* U+014B LATIN SMALL LETTER ENG */ +#define XKB_KEY_Amacron 0x03c0 /* U+0100 LATIN CAPITAL LETTER A WITH MACRON */ +#define XKB_KEY_Iogonek 0x03c7 /* U+012E LATIN CAPITAL LETTER I WITH OGONEK */ +#define XKB_KEY_Eabovedot 0x03cc /* U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE */ +#define XKB_KEY_Imacron 0x03cf /* U+012A LATIN CAPITAL LETTER I WITH MACRON */ +#define XKB_KEY_Ncedilla 0x03d1 /* U+0145 LATIN CAPITAL LETTER N WITH CEDILLA */ +#define XKB_KEY_Omacron 0x03d2 /* U+014C LATIN CAPITAL LETTER O WITH MACRON */ +#define XKB_KEY_Kcedilla 0x03d3 /* U+0136 LATIN CAPITAL LETTER K WITH CEDILLA */ +#define XKB_KEY_Uogonek 0x03d9 /* U+0172 LATIN CAPITAL LETTER U WITH OGONEK */ +#define XKB_KEY_Utilde 0x03dd /* U+0168 LATIN CAPITAL LETTER U WITH TILDE */ +#define XKB_KEY_Umacron 0x03de /* U+016A LATIN CAPITAL LETTER U WITH MACRON */ +#define XKB_KEY_amacron 0x03e0 /* U+0101 LATIN SMALL LETTER A WITH MACRON */ +#define XKB_KEY_iogonek 0x03e7 /* U+012F LATIN SMALL LETTER I WITH OGONEK */ +#define XKB_KEY_eabovedot 0x03ec /* U+0117 LATIN SMALL LETTER E WITH DOT ABOVE */ +#define XKB_KEY_imacron 0x03ef /* U+012B LATIN SMALL LETTER I WITH MACRON */ +#define XKB_KEY_ncedilla 0x03f1 /* U+0146 LATIN SMALL LETTER N WITH CEDILLA */ +#define XKB_KEY_omacron 0x03f2 /* U+014D LATIN SMALL LETTER O WITH MACRON */ +#define XKB_KEY_kcedilla 0x03f3 /* U+0137 LATIN SMALL LETTER K WITH CEDILLA */ +#define XKB_KEY_uogonek 0x03f9 /* U+0173 LATIN SMALL LETTER U WITH OGONEK */ +#define XKB_KEY_utilde 0x03fd /* U+0169 LATIN SMALL LETTER U WITH TILDE */ +#define XKB_KEY_umacron 0x03fe /* U+016B LATIN SMALL LETTER U WITH MACRON */ + +/* + * Latin 8 + */ +#define XKB_KEY_Wcircumflex 0x1000174 /* U+0174 LATIN CAPITAL LETTER W WITH CIRCUMFLEX */ +#define XKB_KEY_wcircumflex 0x1000175 /* U+0175 LATIN SMALL LETTER W WITH CIRCUMFLEX */ +#define XKB_KEY_Ycircumflex 0x1000176 /* U+0176 LATIN CAPITAL LETTER Y WITH CIRCUMFLEX */ +#define XKB_KEY_ycircumflex 0x1000177 /* U+0177 LATIN SMALL LETTER Y WITH CIRCUMFLEX */ +#define XKB_KEY_Babovedot 0x1001e02 /* U+1E02 LATIN CAPITAL LETTER B WITH DOT ABOVE */ +#define XKB_KEY_babovedot 0x1001e03 /* U+1E03 LATIN SMALL LETTER B WITH DOT ABOVE */ +#define XKB_KEY_Dabovedot 0x1001e0a /* U+1E0A LATIN CAPITAL LETTER D WITH DOT ABOVE */ +#define XKB_KEY_dabovedot 0x1001e0b /* U+1E0B LATIN SMALL LETTER D WITH DOT ABOVE */ +#define XKB_KEY_Fabovedot 0x1001e1e /* U+1E1E LATIN CAPITAL LETTER F WITH DOT ABOVE */ +#define XKB_KEY_fabovedot 0x1001e1f /* U+1E1F LATIN SMALL LETTER F WITH DOT ABOVE */ +#define XKB_KEY_Mabovedot 0x1001e40 /* U+1E40 LATIN CAPITAL LETTER M WITH DOT ABOVE */ +#define XKB_KEY_mabovedot 0x1001e41 /* U+1E41 LATIN SMALL LETTER M WITH DOT ABOVE */ +#define XKB_KEY_Pabovedot 0x1001e56 /* U+1E56 LATIN CAPITAL LETTER P WITH DOT ABOVE */ +#define XKB_KEY_pabovedot 0x1001e57 /* U+1E57 LATIN SMALL LETTER P WITH DOT ABOVE */ +#define XKB_KEY_Sabovedot 0x1001e60 /* U+1E60 LATIN CAPITAL LETTER S WITH DOT ABOVE */ +#define XKB_KEY_sabovedot 0x1001e61 /* U+1E61 LATIN SMALL LETTER S WITH DOT ABOVE */ +#define XKB_KEY_Tabovedot 0x1001e6a /* U+1E6A LATIN CAPITAL LETTER T WITH DOT ABOVE */ +#define XKB_KEY_tabovedot 0x1001e6b /* U+1E6B LATIN SMALL LETTER T WITH DOT ABOVE */ +#define XKB_KEY_Wgrave 0x1001e80 /* U+1E80 LATIN CAPITAL LETTER W WITH GRAVE */ +#define XKB_KEY_wgrave 0x1001e81 /* U+1E81 LATIN SMALL LETTER W WITH GRAVE */ +#define XKB_KEY_Wacute 0x1001e82 /* U+1E82 LATIN CAPITAL LETTER W WITH ACUTE */ +#define XKB_KEY_wacute 0x1001e83 /* U+1E83 LATIN SMALL LETTER W WITH ACUTE */ +#define XKB_KEY_Wdiaeresis 0x1001e84 /* U+1E84 LATIN CAPITAL LETTER W WITH DIAERESIS */ +#define XKB_KEY_wdiaeresis 0x1001e85 /* U+1E85 LATIN SMALL LETTER W WITH DIAERESIS */ +#define XKB_KEY_Ygrave 0x1001ef2 /* U+1EF2 LATIN CAPITAL LETTER Y WITH GRAVE */ +#define XKB_KEY_ygrave 0x1001ef3 /* U+1EF3 LATIN SMALL LETTER Y WITH GRAVE */ + +/* + * Latin 9 + * Byte 3 = 0x13 + */ + +#define XKB_KEY_OE 0x13bc /* U+0152 LATIN CAPITAL LIGATURE OE */ +#define XKB_KEY_oe 0x13bd /* U+0153 LATIN SMALL LIGATURE OE */ +#define XKB_KEY_Ydiaeresis 0x13be /* U+0178 LATIN CAPITAL LETTER Y WITH DIAERESIS */ + +/* + * Katakana + * Byte 3 = 4 + */ + +#define XKB_KEY_overline 0x047e /* U+203E OVERLINE */ +#define XKB_KEY_kana_fullstop 0x04a1 /* U+3002 IDEOGRAPHIC FULL STOP */ +#define XKB_KEY_kana_openingbracket 0x04a2 /* U+300C LEFT CORNER BRACKET */ +#define XKB_KEY_kana_closingbracket 0x04a3 /* U+300D RIGHT CORNER BRACKET */ +#define XKB_KEY_kana_comma 0x04a4 /* U+3001 IDEOGRAPHIC COMMA */ +#define XKB_KEY_kana_conjunctive 0x04a5 /* U+30FB KATAKANA MIDDLE DOT */ +#define XKB_KEY_kana_middledot 0x04a5 /* deprecated */ +#define XKB_KEY_kana_WO 0x04a6 /* U+30F2 KATAKANA LETTER WO */ +#define XKB_KEY_kana_a 0x04a7 /* U+30A1 KATAKANA LETTER SMALL A */ +#define XKB_KEY_kana_i 0x04a8 /* U+30A3 KATAKANA LETTER SMALL I */ +#define XKB_KEY_kana_u 0x04a9 /* U+30A5 KATAKANA LETTER SMALL U */ +#define XKB_KEY_kana_e 0x04aa /* U+30A7 KATAKANA LETTER SMALL E */ +#define XKB_KEY_kana_o 0x04ab /* U+30A9 KATAKANA LETTER SMALL O */ +#define XKB_KEY_kana_ya 0x04ac /* U+30E3 KATAKANA LETTER SMALL YA */ +#define XKB_KEY_kana_yu 0x04ad /* U+30E5 KATAKANA LETTER SMALL YU */ +#define XKB_KEY_kana_yo 0x04ae /* U+30E7 KATAKANA LETTER SMALL YO */ +#define XKB_KEY_kana_tsu 0x04af /* U+30C3 KATAKANA LETTER SMALL TU */ +#define XKB_KEY_kana_tu 0x04af /* deprecated */ +#define XKB_KEY_prolongedsound 0x04b0 /* U+30FC KATAKANA-HIRAGANA PROLONGED SOUND MARK */ +#define XKB_KEY_kana_A 0x04b1 /* U+30A2 KATAKANA LETTER A */ +#define XKB_KEY_kana_I 0x04b2 /* U+30A4 KATAKANA LETTER I */ +#define XKB_KEY_kana_U 0x04b3 /* U+30A6 KATAKANA LETTER U */ +#define XKB_KEY_kana_E 0x04b4 /* U+30A8 KATAKANA LETTER E */ +#define XKB_KEY_kana_O 0x04b5 /* U+30AA KATAKANA LETTER O */ +#define XKB_KEY_kana_KA 0x04b6 /* U+30AB KATAKANA LETTER KA */ +#define XKB_KEY_kana_KI 0x04b7 /* U+30AD KATAKANA LETTER KI */ +#define XKB_KEY_kana_KU 0x04b8 /* U+30AF KATAKANA LETTER KU */ +#define XKB_KEY_kana_KE 0x04b9 /* U+30B1 KATAKANA LETTER KE */ +#define XKB_KEY_kana_KO 0x04ba /* U+30B3 KATAKANA LETTER KO */ +#define XKB_KEY_kana_SA 0x04bb /* U+30B5 KATAKANA LETTER SA */ +#define XKB_KEY_kana_SHI 0x04bc /* U+30B7 KATAKANA LETTER SI */ +#define XKB_KEY_kana_SU 0x04bd /* U+30B9 KATAKANA LETTER SU */ +#define XKB_KEY_kana_SE 0x04be /* U+30BB KATAKANA LETTER SE */ +#define XKB_KEY_kana_SO 0x04bf /* U+30BD KATAKANA LETTER SO */ +#define XKB_KEY_kana_TA 0x04c0 /* U+30BF KATAKANA LETTER TA */ +#define XKB_KEY_kana_CHI 0x04c1 /* U+30C1 KATAKANA LETTER TI */ +#define XKB_KEY_kana_TI 0x04c1 /* deprecated */ +#define XKB_KEY_kana_TSU 0x04c2 /* U+30C4 KATAKANA LETTER TU */ +#define XKB_KEY_kana_TU 0x04c2 /* deprecated */ +#define XKB_KEY_kana_TE 0x04c3 /* U+30C6 KATAKANA LETTER TE */ +#define XKB_KEY_kana_TO 0x04c4 /* U+30C8 KATAKANA LETTER TO */ +#define XKB_KEY_kana_NA 0x04c5 /* U+30CA KATAKANA LETTER NA */ +#define XKB_KEY_kana_NI 0x04c6 /* U+30CB KATAKANA LETTER NI */ +#define XKB_KEY_kana_NU 0x04c7 /* U+30CC KATAKANA LETTER NU */ +#define XKB_KEY_kana_NE 0x04c8 /* U+30CD KATAKANA LETTER NE */ +#define XKB_KEY_kana_NO 0x04c9 /* U+30CE KATAKANA LETTER NO */ +#define XKB_KEY_kana_HA 0x04ca /* U+30CF KATAKANA LETTER HA */ +#define XKB_KEY_kana_HI 0x04cb /* U+30D2 KATAKANA LETTER HI */ +#define XKB_KEY_kana_FU 0x04cc /* U+30D5 KATAKANA LETTER HU */ +#define XKB_KEY_kana_HU 0x04cc /* deprecated */ +#define XKB_KEY_kana_HE 0x04cd /* U+30D8 KATAKANA LETTER HE */ +#define XKB_KEY_kana_HO 0x04ce /* U+30DB KATAKANA LETTER HO */ +#define XKB_KEY_kana_MA 0x04cf /* U+30DE KATAKANA LETTER MA */ +#define XKB_KEY_kana_MI 0x04d0 /* U+30DF KATAKANA LETTER MI */ +#define XKB_KEY_kana_MU 0x04d1 /* U+30E0 KATAKANA LETTER MU */ +#define XKB_KEY_kana_ME 0x04d2 /* U+30E1 KATAKANA LETTER ME */ +#define XKB_KEY_kana_MO 0x04d3 /* U+30E2 KATAKANA LETTER MO */ +#define XKB_KEY_kana_YA 0x04d4 /* U+30E4 KATAKANA LETTER YA */ +#define XKB_KEY_kana_YU 0x04d5 /* U+30E6 KATAKANA LETTER YU */ +#define XKB_KEY_kana_YO 0x04d6 /* U+30E8 KATAKANA LETTER YO */ +#define XKB_KEY_kana_RA 0x04d7 /* U+30E9 KATAKANA LETTER RA */ +#define XKB_KEY_kana_RI 0x04d8 /* U+30EA KATAKANA LETTER RI */ +#define XKB_KEY_kana_RU 0x04d9 /* U+30EB KATAKANA LETTER RU */ +#define XKB_KEY_kana_RE 0x04da /* U+30EC KATAKANA LETTER RE */ +#define XKB_KEY_kana_RO 0x04db /* U+30ED KATAKANA LETTER RO */ +#define XKB_KEY_kana_WA 0x04dc /* U+30EF KATAKANA LETTER WA */ +#define XKB_KEY_kana_N 0x04dd /* U+30F3 KATAKANA LETTER N */ +#define XKB_KEY_voicedsound 0x04de /* U+309B KATAKANA-HIRAGANA VOICED SOUND MARK */ +#define XKB_KEY_semivoicedsound 0x04df /* U+309C KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK */ +#define XKB_KEY_kana_switch 0xff7e /* non-deprecated alias for Mode_switch */ + +/* + * Arabic + * Byte 3 = 5 + */ + +#define XKB_KEY_Farsi_0 0x10006f0 /* U+06F0 EXTENDED ARABIC-INDIC DIGIT ZERO */ +#define XKB_KEY_Farsi_1 0x10006f1 /* U+06F1 EXTENDED ARABIC-INDIC DIGIT ONE */ +#define XKB_KEY_Farsi_2 0x10006f2 /* U+06F2 EXTENDED ARABIC-INDIC DIGIT TWO */ +#define XKB_KEY_Farsi_3 0x10006f3 /* U+06F3 EXTENDED ARABIC-INDIC DIGIT THREE */ +#define XKB_KEY_Farsi_4 0x10006f4 /* U+06F4 EXTENDED ARABIC-INDIC DIGIT FOUR */ +#define XKB_KEY_Farsi_5 0x10006f5 /* U+06F5 EXTENDED ARABIC-INDIC DIGIT FIVE */ +#define XKB_KEY_Farsi_6 0x10006f6 /* U+06F6 EXTENDED ARABIC-INDIC DIGIT SIX */ +#define XKB_KEY_Farsi_7 0x10006f7 /* U+06F7 EXTENDED ARABIC-INDIC DIGIT SEVEN */ +#define XKB_KEY_Farsi_8 0x10006f8 /* U+06F8 EXTENDED ARABIC-INDIC DIGIT EIGHT */ +#define XKB_KEY_Farsi_9 0x10006f9 /* U+06F9 EXTENDED ARABIC-INDIC DIGIT NINE */ +#define XKB_KEY_Arabic_percent 0x100066a /* U+066A ARABIC PERCENT SIGN */ +#define XKB_KEY_Arabic_superscript_alef 0x1000670 /* U+0670 ARABIC LETTER SUPERSCRIPT ALEF */ +#define XKB_KEY_Arabic_tteh 0x1000679 /* U+0679 ARABIC LETTER TTEH */ +#define XKB_KEY_Arabic_peh 0x100067e /* U+067E ARABIC LETTER PEH */ +#define XKB_KEY_Arabic_tcheh 0x1000686 /* U+0686 ARABIC LETTER TCHEH */ +#define XKB_KEY_Arabic_ddal 0x1000688 /* U+0688 ARABIC LETTER DDAL */ +#define XKB_KEY_Arabic_rreh 0x1000691 /* U+0691 ARABIC LETTER RREH */ +#define XKB_KEY_Arabic_comma 0x05ac /* U+060C ARABIC COMMA */ +#define XKB_KEY_Arabic_fullstop 0x10006d4 /* U+06D4 ARABIC FULL STOP */ +#define XKB_KEY_Arabic_0 0x1000660 /* U+0660 ARABIC-INDIC DIGIT ZERO */ +#define XKB_KEY_Arabic_1 0x1000661 /* U+0661 ARABIC-INDIC DIGIT ONE */ +#define XKB_KEY_Arabic_2 0x1000662 /* U+0662 ARABIC-INDIC DIGIT TWO */ +#define XKB_KEY_Arabic_3 0x1000663 /* U+0663 ARABIC-INDIC DIGIT THREE */ +#define XKB_KEY_Arabic_4 0x1000664 /* U+0664 ARABIC-INDIC DIGIT FOUR */ +#define XKB_KEY_Arabic_5 0x1000665 /* U+0665 ARABIC-INDIC DIGIT FIVE */ +#define XKB_KEY_Arabic_6 0x1000666 /* U+0666 ARABIC-INDIC DIGIT SIX */ +#define XKB_KEY_Arabic_7 0x1000667 /* U+0667 ARABIC-INDIC DIGIT SEVEN */ +#define XKB_KEY_Arabic_8 0x1000668 /* U+0668 ARABIC-INDIC DIGIT EIGHT */ +#define XKB_KEY_Arabic_9 0x1000669 /* U+0669 ARABIC-INDIC DIGIT NINE */ +#define XKB_KEY_Arabic_semicolon 0x05bb /* U+061B ARABIC SEMICOLON */ +#define XKB_KEY_Arabic_question_mark 0x05bf /* U+061F ARABIC QUESTION MARK */ +#define XKB_KEY_Arabic_hamza 0x05c1 /* U+0621 ARABIC LETTER HAMZA */ +#define XKB_KEY_Arabic_maddaonalef 0x05c2 /* U+0622 ARABIC LETTER ALEF WITH MADDA ABOVE */ +#define XKB_KEY_Arabic_hamzaonalef 0x05c3 /* U+0623 ARABIC LETTER ALEF WITH HAMZA ABOVE */ +#define XKB_KEY_Arabic_hamzaonwaw 0x05c4 /* U+0624 ARABIC LETTER WAW WITH HAMZA ABOVE */ +#define XKB_KEY_Arabic_hamzaunderalef 0x05c5 /* U+0625 ARABIC LETTER ALEF WITH HAMZA BELOW */ +#define XKB_KEY_Arabic_hamzaonyeh 0x05c6 /* U+0626 ARABIC LETTER YEH WITH HAMZA ABOVE */ +#define XKB_KEY_Arabic_alef 0x05c7 /* U+0627 ARABIC LETTER ALEF */ +#define XKB_KEY_Arabic_beh 0x05c8 /* U+0628 ARABIC LETTER BEH */ +#define XKB_KEY_Arabic_tehmarbuta 0x05c9 /* U+0629 ARABIC LETTER TEH MARBUTA */ +#define XKB_KEY_Arabic_teh 0x05ca /* U+062A ARABIC LETTER TEH */ +#define XKB_KEY_Arabic_theh 0x05cb /* U+062B ARABIC LETTER THEH */ +#define XKB_KEY_Arabic_jeem 0x05cc /* U+062C ARABIC LETTER JEEM */ +#define XKB_KEY_Arabic_hah 0x05cd /* U+062D ARABIC LETTER HAH */ +#define XKB_KEY_Arabic_khah 0x05ce /* U+062E ARABIC LETTER KHAH */ +#define XKB_KEY_Arabic_dal 0x05cf /* U+062F ARABIC LETTER DAL */ +#define XKB_KEY_Arabic_thal 0x05d0 /* U+0630 ARABIC LETTER THAL */ +#define XKB_KEY_Arabic_ra 0x05d1 /* U+0631 ARABIC LETTER REH */ +#define XKB_KEY_Arabic_zain 0x05d2 /* U+0632 ARABIC LETTER ZAIN */ +#define XKB_KEY_Arabic_seen 0x05d3 /* U+0633 ARABIC LETTER SEEN */ +#define XKB_KEY_Arabic_sheen 0x05d4 /* U+0634 ARABIC LETTER SHEEN */ +#define XKB_KEY_Arabic_sad 0x05d5 /* U+0635 ARABIC LETTER SAD */ +#define XKB_KEY_Arabic_dad 0x05d6 /* U+0636 ARABIC LETTER DAD */ +#define XKB_KEY_Arabic_tah 0x05d7 /* U+0637 ARABIC LETTER TAH */ +#define XKB_KEY_Arabic_zah 0x05d8 /* U+0638 ARABIC LETTER ZAH */ +#define XKB_KEY_Arabic_ain 0x05d9 /* U+0639 ARABIC LETTER AIN */ +#define XKB_KEY_Arabic_ghain 0x05da /* U+063A ARABIC LETTER GHAIN */ +#define XKB_KEY_Arabic_tatweel 0x05e0 /* U+0640 ARABIC TATWEEL */ +#define XKB_KEY_Arabic_feh 0x05e1 /* U+0641 ARABIC LETTER FEH */ +#define XKB_KEY_Arabic_qaf 0x05e2 /* U+0642 ARABIC LETTER QAF */ +#define XKB_KEY_Arabic_kaf 0x05e3 /* U+0643 ARABIC LETTER KAF */ +#define XKB_KEY_Arabic_lam 0x05e4 /* U+0644 ARABIC LETTER LAM */ +#define XKB_KEY_Arabic_meem 0x05e5 /* U+0645 ARABIC LETTER MEEM */ +#define XKB_KEY_Arabic_noon 0x05e6 /* U+0646 ARABIC LETTER NOON */ +#define XKB_KEY_Arabic_ha 0x05e7 /* U+0647 ARABIC LETTER HEH */ +#define XKB_KEY_Arabic_heh 0x05e7 /* deprecated */ +#define XKB_KEY_Arabic_waw 0x05e8 /* U+0648 ARABIC LETTER WAW */ +#define XKB_KEY_Arabic_alefmaksura 0x05e9 /* U+0649 ARABIC LETTER ALEF MAKSURA */ +#define XKB_KEY_Arabic_yeh 0x05ea /* U+064A ARABIC LETTER YEH */ +#define XKB_KEY_Arabic_fathatan 0x05eb /* U+064B ARABIC FATHATAN */ +#define XKB_KEY_Arabic_dammatan 0x05ec /* U+064C ARABIC DAMMATAN */ +#define XKB_KEY_Arabic_kasratan 0x05ed /* U+064D ARABIC KASRATAN */ +#define XKB_KEY_Arabic_fatha 0x05ee /* U+064E ARABIC FATHA */ +#define XKB_KEY_Arabic_damma 0x05ef /* U+064F ARABIC DAMMA */ +#define XKB_KEY_Arabic_kasra 0x05f0 /* U+0650 ARABIC KASRA */ +#define XKB_KEY_Arabic_shadda 0x05f1 /* U+0651 ARABIC SHADDA */ +#define XKB_KEY_Arabic_sukun 0x05f2 /* U+0652 ARABIC SUKUN */ +#define XKB_KEY_Arabic_madda_above 0x1000653 /* U+0653 ARABIC MADDAH ABOVE */ +#define XKB_KEY_Arabic_hamza_above 0x1000654 /* U+0654 ARABIC HAMZA ABOVE */ +#define XKB_KEY_Arabic_hamza_below 0x1000655 /* U+0655 ARABIC HAMZA BELOW */ +#define XKB_KEY_Arabic_jeh 0x1000698 /* U+0698 ARABIC LETTER JEH */ +#define XKB_KEY_Arabic_veh 0x10006a4 /* U+06A4 ARABIC LETTER VEH */ +#define XKB_KEY_Arabic_keheh 0x10006a9 /* U+06A9 ARABIC LETTER KEHEH */ +#define XKB_KEY_Arabic_gaf 0x10006af /* U+06AF ARABIC LETTER GAF */ +#define XKB_KEY_Arabic_noon_ghunna 0x10006ba /* U+06BA ARABIC LETTER NOON GHUNNA */ +#define XKB_KEY_Arabic_heh_doachashmee 0x10006be /* U+06BE ARABIC LETTER HEH DOACHASHMEE */ +#define XKB_KEY_Farsi_yeh 0x10006cc /* U+06CC ARABIC LETTER FARSI YEH */ +#define XKB_KEY_Arabic_farsi_yeh 0x10006cc /* deprecated alias for Farsi_yeh */ +#define XKB_KEY_Arabic_yeh_baree 0x10006d2 /* U+06D2 ARABIC LETTER YEH BARREE */ +#define XKB_KEY_Arabic_heh_goal 0x10006c1 /* U+06C1 ARABIC LETTER HEH GOAL */ +#define XKB_KEY_Arabic_switch 0xff7e /* non-deprecated alias for Mode_switch */ + +/* + * Cyrillic + * Byte 3 = 6 + */ +#define XKB_KEY_Cyrillic_GHE_bar 0x1000492 /* U+0492 CYRILLIC CAPITAL LETTER GHE WITH STROKE */ +#define XKB_KEY_Cyrillic_ghe_bar 0x1000493 /* U+0493 CYRILLIC SMALL LETTER GHE WITH STROKE */ +#define XKB_KEY_Cyrillic_ZHE_descender 0x1000496 /* U+0496 CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER */ +#define XKB_KEY_Cyrillic_zhe_descender 0x1000497 /* U+0497 CYRILLIC SMALL LETTER ZHE WITH DESCENDER */ +#define XKB_KEY_Cyrillic_KA_descender 0x100049a /* U+049A CYRILLIC CAPITAL LETTER KA WITH DESCENDER */ +#define XKB_KEY_Cyrillic_ka_descender 0x100049b /* U+049B CYRILLIC SMALL LETTER KA WITH DESCENDER */ +#define XKB_KEY_Cyrillic_KA_vertstroke 0x100049c /* U+049C CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE */ +#define XKB_KEY_Cyrillic_ka_vertstroke 0x100049d /* U+049D CYRILLIC SMALL LETTER KA WITH VERTICAL STROKE */ +#define XKB_KEY_Cyrillic_EN_descender 0x10004a2 /* U+04A2 CYRILLIC CAPITAL LETTER EN WITH DESCENDER */ +#define XKB_KEY_Cyrillic_en_descender 0x10004a3 /* U+04A3 CYRILLIC SMALL LETTER EN WITH DESCENDER */ +#define XKB_KEY_Cyrillic_U_straight 0x10004ae /* U+04AE CYRILLIC CAPITAL LETTER STRAIGHT U */ +#define XKB_KEY_Cyrillic_u_straight 0x10004af /* U+04AF CYRILLIC SMALL LETTER STRAIGHT U */ +#define XKB_KEY_Cyrillic_U_straight_bar 0x10004b0 /* U+04B0 CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE */ +#define XKB_KEY_Cyrillic_u_straight_bar 0x10004b1 /* U+04B1 CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE */ +#define XKB_KEY_Cyrillic_HA_descender 0x10004b2 /* U+04B2 CYRILLIC CAPITAL LETTER HA WITH DESCENDER */ +#define XKB_KEY_Cyrillic_ha_descender 0x10004b3 /* U+04B3 CYRILLIC SMALL LETTER HA WITH DESCENDER */ +#define XKB_KEY_Cyrillic_CHE_descender 0x10004b6 /* U+04B6 CYRILLIC CAPITAL LETTER CHE WITH DESCENDER */ +#define XKB_KEY_Cyrillic_che_descender 0x10004b7 /* U+04B7 CYRILLIC SMALL LETTER CHE WITH DESCENDER */ +#define XKB_KEY_Cyrillic_CHE_vertstroke 0x10004b8 /* U+04B8 CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE */ +#define XKB_KEY_Cyrillic_che_vertstroke 0x10004b9 /* U+04B9 CYRILLIC SMALL LETTER CHE WITH VERTICAL STROKE */ +#define XKB_KEY_Cyrillic_SHHA 0x10004ba /* U+04BA CYRILLIC CAPITAL LETTER SHHA */ +#define XKB_KEY_Cyrillic_shha 0x10004bb /* U+04BB CYRILLIC SMALL LETTER SHHA */ + +#define XKB_KEY_Cyrillic_SCHWA 0x10004d8 /* U+04D8 CYRILLIC CAPITAL LETTER SCHWA */ +#define XKB_KEY_Cyrillic_schwa 0x10004d9 /* U+04D9 CYRILLIC SMALL LETTER SCHWA */ +#define XKB_KEY_Cyrillic_I_macron 0x10004e2 /* U+04E2 CYRILLIC CAPITAL LETTER I WITH MACRON */ +#define XKB_KEY_Cyrillic_i_macron 0x10004e3 /* U+04E3 CYRILLIC SMALL LETTER I WITH MACRON */ +#define XKB_KEY_Cyrillic_O_bar 0x10004e8 /* U+04E8 CYRILLIC CAPITAL LETTER BARRED O */ +#define XKB_KEY_Cyrillic_o_bar 0x10004e9 /* U+04E9 CYRILLIC SMALL LETTER BARRED O */ +#define XKB_KEY_Cyrillic_U_macron 0x10004ee /* U+04EE CYRILLIC CAPITAL LETTER U WITH MACRON */ +#define XKB_KEY_Cyrillic_u_macron 0x10004ef /* U+04EF CYRILLIC SMALL LETTER U WITH MACRON */ + +#define XKB_KEY_Serbian_dje 0x06a1 /* U+0452 CYRILLIC SMALL LETTER DJE */ +#define XKB_KEY_Macedonia_gje 0x06a2 /* U+0453 CYRILLIC SMALL LETTER GJE */ +#define XKB_KEY_Cyrillic_io 0x06a3 /* U+0451 CYRILLIC SMALL LETTER IO */ +#define XKB_KEY_Ukrainian_ie 0x06a4 /* U+0454 CYRILLIC SMALL LETTER UKRAINIAN IE */ +#define XKB_KEY_Ukranian_je 0x06a4 /* deprecated */ +#define XKB_KEY_Macedonia_dse 0x06a5 /* U+0455 CYRILLIC SMALL LETTER DZE */ +#define XKB_KEY_Ukrainian_i 0x06a6 /* U+0456 CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I */ +#define XKB_KEY_Ukranian_i 0x06a6 /* deprecated */ +#define XKB_KEY_Ukrainian_yi 0x06a7 /* U+0457 CYRILLIC SMALL LETTER YI */ +#define XKB_KEY_Ukranian_yi 0x06a7 /* deprecated */ +#define XKB_KEY_Cyrillic_je 0x06a8 /* U+0458 CYRILLIC SMALL LETTER JE */ +#define XKB_KEY_Serbian_je 0x06a8 /* deprecated */ +#define XKB_KEY_Cyrillic_lje 0x06a9 /* U+0459 CYRILLIC SMALL LETTER LJE */ +#define XKB_KEY_Serbian_lje 0x06a9 /* deprecated */ +#define XKB_KEY_Cyrillic_nje 0x06aa /* U+045A CYRILLIC SMALL LETTER NJE */ +#define XKB_KEY_Serbian_nje 0x06aa /* deprecated */ +#define XKB_KEY_Serbian_tshe 0x06ab /* U+045B CYRILLIC SMALL LETTER TSHE */ +#define XKB_KEY_Macedonia_kje 0x06ac /* U+045C CYRILLIC SMALL LETTER KJE */ +#define XKB_KEY_Ukrainian_ghe_with_upturn 0x06ad /* U+0491 CYRILLIC SMALL LETTER GHE WITH UPTURN */ +#define XKB_KEY_Byelorussian_shortu 0x06ae /* U+045E CYRILLIC SMALL LETTER SHORT U */ +#define XKB_KEY_Cyrillic_dzhe 0x06af /* U+045F CYRILLIC SMALL LETTER DZHE */ +#define XKB_KEY_Serbian_dze 0x06af /* deprecated */ +#define XKB_KEY_numerosign 0x06b0 /* U+2116 NUMERO SIGN */ +#define XKB_KEY_Serbian_DJE 0x06b1 /* U+0402 CYRILLIC CAPITAL LETTER DJE */ +#define XKB_KEY_Macedonia_GJE 0x06b2 /* U+0403 CYRILLIC CAPITAL LETTER GJE */ +#define XKB_KEY_Cyrillic_IO 0x06b3 /* U+0401 CYRILLIC CAPITAL LETTER IO */ +#define XKB_KEY_Ukrainian_IE 0x06b4 /* U+0404 CYRILLIC CAPITAL LETTER UKRAINIAN IE */ +#define XKB_KEY_Ukranian_JE 0x06b4 /* deprecated */ +#define XKB_KEY_Macedonia_DSE 0x06b5 /* U+0405 CYRILLIC CAPITAL LETTER DZE */ +#define XKB_KEY_Ukrainian_I 0x06b6 /* U+0406 CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I */ +#define XKB_KEY_Ukranian_I 0x06b6 /* deprecated */ +#define XKB_KEY_Ukrainian_YI 0x06b7 /* U+0407 CYRILLIC CAPITAL LETTER YI */ +#define XKB_KEY_Ukranian_YI 0x06b7 /* deprecated */ +#define XKB_KEY_Cyrillic_JE 0x06b8 /* U+0408 CYRILLIC CAPITAL LETTER JE */ +#define XKB_KEY_Serbian_JE 0x06b8 /* deprecated */ +#define XKB_KEY_Cyrillic_LJE 0x06b9 /* U+0409 CYRILLIC CAPITAL LETTER LJE */ +#define XKB_KEY_Serbian_LJE 0x06b9 /* deprecated */ +#define XKB_KEY_Cyrillic_NJE 0x06ba /* U+040A CYRILLIC CAPITAL LETTER NJE */ +#define XKB_KEY_Serbian_NJE 0x06ba /* deprecated */ +#define XKB_KEY_Serbian_TSHE 0x06bb /* U+040B CYRILLIC CAPITAL LETTER TSHE */ +#define XKB_KEY_Macedonia_KJE 0x06bc /* U+040C CYRILLIC CAPITAL LETTER KJE */ +#define XKB_KEY_Ukrainian_GHE_WITH_UPTURN 0x06bd /* U+0490 CYRILLIC CAPITAL LETTER GHE WITH UPTURN */ +#define XKB_KEY_Byelorussian_SHORTU 0x06be /* U+040E CYRILLIC CAPITAL LETTER SHORT U */ +#define XKB_KEY_Cyrillic_DZHE 0x06bf /* U+040F CYRILLIC CAPITAL LETTER DZHE */ +#define XKB_KEY_Serbian_DZE 0x06bf /* deprecated */ +#define XKB_KEY_Cyrillic_yu 0x06c0 /* U+044E CYRILLIC SMALL LETTER YU */ +#define XKB_KEY_Cyrillic_a 0x06c1 /* U+0430 CYRILLIC SMALL LETTER A */ +#define XKB_KEY_Cyrillic_be 0x06c2 /* U+0431 CYRILLIC SMALL LETTER BE */ +#define XKB_KEY_Cyrillic_tse 0x06c3 /* U+0446 CYRILLIC SMALL LETTER TSE */ +#define XKB_KEY_Cyrillic_de 0x06c4 /* U+0434 CYRILLIC SMALL LETTER DE */ +#define XKB_KEY_Cyrillic_ie 0x06c5 /* U+0435 CYRILLIC SMALL LETTER IE */ +#define XKB_KEY_Cyrillic_ef 0x06c6 /* U+0444 CYRILLIC SMALL LETTER EF */ +#define XKB_KEY_Cyrillic_ghe 0x06c7 /* U+0433 CYRILLIC SMALL LETTER GHE */ +#define XKB_KEY_Cyrillic_ha 0x06c8 /* U+0445 CYRILLIC SMALL LETTER HA */ +#define XKB_KEY_Cyrillic_i 0x06c9 /* U+0438 CYRILLIC SMALL LETTER I */ +#define XKB_KEY_Cyrillic_shorti 0x06ca /* U+0439 CYRILLIC SMALL LETTER SHORT I */ +#define XKB_KEY_Cyrillic_ka 0x06cb /* U+043A CYRILLIC SMALL LETTER KA */ +#define XKB_KEY_Cyrillic_el 0x06cc /* U+043B CYRILLIC SMALL LETTER EL */ +#define XKB_KEY_Cyrillic_em 0x06cd /* U+043C CYRILLIC SMALL LETTER EM */ +#define XKB_KEY_Cyrillic_en 0x06ce /* U+043D CYRILLIC SMALL LETTER EN */ +#define XKB_KEY_Cyrillic_o 0x06cf /* U+043E CYRILLIC SMALL LETTER O */ +#define XKB_KEY_Cyrillic_pe 0x06d0 /* U+043F CYRILLIC SMALL LETTER PE */ +#define XKB_KEY_Cyrillic_ya 0x06d1 /* U+044F CYRILLIC SMALL LETTER YA */ +#define XKB_KEY_Cyrillic_er 0x06d2 /* U+0440 CYRILLIC SMALL LETTER ER */ +#define XKB_KEY_Cyrillic_es 0x06d3 /* U+0441 CYRILLIC SMALL LETTER ES */ +#define XKB_KEY_Cyrillic_te 0x06d4 /* U+0442 CYRILLIC SMALL LETTER TE */ +#define XKB_KEY_Cyrillic_u 0x06d5 /* U+0443 CYRILLIC SMALL LETTER U */ +#define XKB_KEY_Cyrillic_zhe 0x06d6 /* U+0436 CYRILLIC SMALL LETTER ZHE */ +#define XKB_KEY_Cyrillic_ve 0x06d7 /* U+0432 CYRILLIC SMALL LETTER VE */ +#define XKB_KEY_Cyrillic_softsign 0x06d8 /* U+044C CYRILLIC SMALL LETTER SOFT SIGN */ +#define XKB_KEY_Cyrillic_yeru 0x06d9 /* U+044B CYRILLIC SMALL LETTER YERU */ +#define XKB_KEY_Cyrillic_ze 0x06da /* U+0437 CYRILLIC SMALL LETTER ZE */ +#define XKB_KEY_Cyrillic_sha 0x06db /* U+0448 CYRILLIC SMALL LETTER SHA */ +#define XKB_KEY_Cyrillic_e 0x06dc /* U+044D CYRILLIC SMALL LETTER E */ +#define XKB_KEY_Cyrillic_shcha 0x06dd /* U+0449 CYRILLIC SMALL LETTER SHCHA */ +#define XKB_KEY_Cyrillic_che 0x06de /* U+0447 CYRILLIC SMALL LETTER CHE */ +#define XKB_KEY_Cyrillic_hardsign 0x06df /* U+044A CYRILLIC SMALL LETTER HARD SIGN */ +#define XKB_KEY_Cyrillic_YU 0x06e0 /* U+042E CYRILLIC CAPITAL LETTER YU */ +#define XKB_KEY_Cyrillic_A 0x06e1 /* U+0410 CYRILLIC CAPITAL LETTER A */ +#define XKB_KEY_Cyrillic_BE 0x06e2 /* U+0411 CYRILLIC CAPITAL LETTER BE */ +#define XKB_KEY_Cyrillic_TSE 0x06e3 /* U+0426 CYRILLIC CAPITAL LETTER TSE */ +#define XKB_KEY_Cyrillic_DE 0x06e4 /* U+0414 CYRILLIC CAPITAL LETTER DE */ +#define XKB_KEY_Cyrillic_IE 0x06e5 /* U+0415 CYRILLIC CAPITAL LETTER IE */ +#define XKB_KEY_Cyrillic_EF 0x06e6 /* U+0424 CYRILLIC CAPITAL LETTER EF */ +#define XKB_KEY_Cyrillic_GHE 0x06e7 /* U+0413 CYRILLIC CAPITAL LETTER GHE */ +#define XKB_KEY_Cyrillic_HA 0x06e8 /* U+0425 CYRILLIC CAPITAL LETTER HA */ +#define XKB_KEY_Cyrillic_I 0x06e9 /* U+0418 CYRILLIC CAPITAL LETTER I */ +#define XKB_KEY_Cyrillic_SHORTI 0x06ea /* U+0419 CYRILLIC CAPITAL LETTER SHORT I */ +#define XKB_KEY_Cyrillic_KA 0x06eb /* U+041A CYRILLIC CAPITAL LETTER KA */ +#define XKB_KEY_Cyrillic_EL 0x06ec /* U+041B CYRILLIC CAPITAL LETTER EL */ +#define XKB_KEY_Cyrillic_EM 0x06ed /* U+041C CYRILLIC CAPITAL LETTER EM */ +#define XKB_KEY_Cyrillic_EN 0x06ee /* U+041D CYRILLIC CAPITAL LETTER EN */ +#define XKB_KEY_Cyrillic_O 0x06ef /* U+041E CYRILLIC CAPITAL LETTER O */ +#define XKB_KEY_Cyrillic_PE 0x06f0 /* U+041F CYRILLIC CAPITAL LETTER PE */ +#define XKB_KEY_Cyrillic_YA 0x06f1 /* U+042F CYRILLIC CAPITAL LETTER YA */ +#define XKB_KEY_Cyrillic_ER 0x06f2 /* U+0420 CYRILLIC CAPITAL LETTER ER */ +#define XKB_KEY_Cyrillic_ES 0x06f3 /* U+0421 CYRILLIC CAPITAL LETTER ES */ +#define XKB_KEY_Cyrillic_TE 0x06f4 /* U+0422 CYRILLIC CAPITAL LETTER TE */ +#define XKB_KEY_Cyrillic_U 0x06f5 /* U+0423 CYRILLIC CAPITAL LETTER U */ +#define XKB_KEY_Cyrillic_ZHE 0x06f6 /* U+0416 CYRILLIC CAPITAL LETTER ZHE */ +#define XKB_KEY_Cyrillic_VE 0x06f7 /* U+0412 CYRILLIC CAPITAL LETTER VE */ +#define XKB_KEY_Cyrillic_SOFTSIGN 0x06f8 /* U+042C CYRILLIC CAPITAL LETTER SOFT SIGN */ +#define XKB_KEY_Cyrillic_YERU 0x06f9 /* U+042B CYRILLIC CAPITAL LETTER YERU */ +#define XKB_KEY_Cyrillic_ZE 0x06fa /* U+0417 CYRILLIC CAPITAL LETTER ZE */ +#define XKB_KEY_Cyrillic_SHA 0x06fb /* U+0428 CYRILLIC CAPITAL LETTER SHA */ +#define XKB_KEY_Cyrillic_E 0x06fc /* U+042D CYRILLIC CAPITAL LETTER E */ +#define XKB_KEY_Cyrillic_SHCHA 0x06fd /* U+0429 CYRILLIC CAPITAL LETTER SHCHA */ +#define XKB_KEY_Cyrillic_CHE 0x06fe /* U+0427 CYRILLIC CAPITAL LETTER CHE */ +#define XKB_KEY_Cyrillic_HARDSIGN 0x06ff /* U+042A CYRILLIC CAPITAL LETTER HARD SIGN */ + +/* + * Greek + * (based on an early draft of, and not quite identical to, ISO/IEC 8859-7) + * Byte 3 = 7 + */ + +#define XKB_KEY_Greek_ALPHAaccent 0x07a1 /* U+0386 GREEK CAPITAL LETTER ALPHA WITH TONOS */ +#define XKB_KEY_Greek_EPSILONaccent 0x07a2 /* U+0388 GREEK CAPITAL LETTER EPSILON WITH TONOS */ +#define XKB_KEY_Greek_ETAaccent 0x07a3 /* U+0389 GREEK CAPITAL LETTER ETA WITH TONOS */ +#define XKB_KEY_Greek_IOTAaccent 0x07a4 /* U+038A GREEK CAPITAL LETTER IOTA WITH TONOS */ +#define XKB_KEY_Greek_IOTAdieresis 0x07a5 /* U+03AA GREEK CAPITAL LETTER IOTA WITH DIALYTIKA */ +#define XKB_KEY_Greek_IOTAdiaeresis 0x07a5 /* deprecated (old typo) */ +#define XKB_KEY_Greek_OMICRONaccent 0x07a7 /* U+038C GREEK CAPITAL LETTER OMICRON WITH TONOS */ +#define XKB_KEY_Greek_UPSILONaccent 0x07a8 /* U+038E GREEK CAPITAL LETTER UPSILON WITH TONOS */ +#define XKB_KEY_Greek_UPSILONdieresis 0x07a9 /* U+03AB GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA */ +#define XKB_KEY_Greek_OMEGAaccent 0x07ab /* U+038F GREEK CAPITAL LETTER OMEGA WITH TONOS */ +#define XKB_KEY_Greek_accentdieresis 0x07ae /* U+0385 GREEK DIALYTIKA TONOS */ +#define XKB_KEY_Greek_horizbar 0x07af /* U+2015 HORIZONTAL BAR */ +#define XKB_KEY_Greek_alphaaccent 0x07b1 /* U+03AC GREEK SMALL LETTER ALPHA WITH TONOS */ +#define XKB_KEY_Greek_epsilonaccent 0x07b2 /* U+03AD GREEK SMALL LETTER EPSILON WITH TONOS */ +#define XKB_KEY_Greek_etaaccent 0x07b3 /* U+03AE GREEK SMALL LETTER ETA WITH TONOS */ +#define XKB_KEY_Greek_iotaaccent 0x07b4 /* U+03AF GREEK SMALL LETTER IOTA WITH TONOS */ +#define XKB_KEY_Greek_iotadieresis 0x07b5 /* U+03CA GREEK SMALL LETTER IOTA WITH DIALYTIKA */ +#define XKB_KEY_Greek_iotaaccentdieresis 0x07b6 /* U+0390 GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS */ +#define XKB_KEY_Greek_omicronaccent 0x07b7 /* U+03CC GREEK SMALL LETTER OMICRON WITH TONOS */ +#define XKB_KEY_Greek_upsilonaccent 0x07b8 /* U+03CD GREEK SMALL LETTER UPSILON WITH TONOS */ +#define XKB_KEY_Greek_upsilondieresis 0x07b9 /* U+03CB GREEK SMALL LETTER UPSILON WITH DIALYTIKA */ +#define XKB_KEY_Greek_upsilonaccentdieresis 0x07ba /* U+03B0 GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ +#define XKB_KEY_Greek_omegaaccent 0x07bb /* U+03CE GREEK SMALL LETTER OMEGA WITH TONOS */ +#define XKB_KEY_Greek_ALPHA 0x07c1 /* U+0391 GREEK CAPITAL LETTER ALPHA */ +#define XKB_KEY_Greek_BETA 0x07c2 /* U+0392 GREEK CAPITAL LETTER BETA */ +#define XKB_KEY_Greek_GAMMA 0x07c3 /* U+0393 GREEK CAPITAL LETTER GAMMA */ +#define XKB_KEY_Greek_DELTA 0x07c4 /* U+0394 GREEK CAPITAL LETTER DELTA */ +#define XKB_KEY_Greek_EPSILON 0x07c5 /* U+0395 GREEK CAPITAL LETTER EPSILON */ +#define XKB_KEY_Greek_ZETA 0x07c6 /* U+0396 GREEK CAPITAL LETTER ZETA */ +#define XKB_KEY_Greek_ETA 0x07c7 /* U+0397 GREEK CAPITAL LETTER ETA */ +#define XKB_KEY_Greek_THETA 0x07c8 /* U+0398 GREEK CAPITAL LETTER THETA */ +#define XKB_KEY_Greek_IOTA 0x07c9 /* U+0399 GREEK CAPITAL LETTER IOTA */ +#define XKB_KEY_Greek_KAPPA 0x07ca /* U+039A GREEK CAPITAL LETTER KAPPA */ +#define XKB_KEY_Greek_LAMDA 0x07cb /* U+039B GREEK CAPITAL LETTER LAMDA */ +#define XKB_KEY_Greek_LAMBDA 0x07cb /* non-deprecated alias for Greek_LAMDA */ +#define XKB_KEY_Greek_MU 0x07cc /* U+039C GREEK CAPITAL LETTER MU */ +#define XKB_KEY_Greek_NU 0x07cd /* U+039D GREEK CAPITAL LETTER NU */ +#define XKB_KEY_Greek_XI 0x07ce /* U+039E GREEK CAPITAL LETTER XI */ +#define XKB_KEY_Greek_OMICRON 0x07cf /* U+039F GREEK CAPITAL LETTER OMICRON */ +#define XKB_KEY_Greek_PI 0x07d0 /* U+03A0 GREEK CAPITAL LETTER PI */ +#define XKB_KEY_Greek_RHO 0x07d1 /* U+03A1 GREEK CAPITAL LETTER RHO */ +#define XKB_KEY_Greek_SIGMA 0x07d2 /* U+03A3 GREEK CAPITAL LETTER SIGMA */ +#define XKB_KEY_Greek_TAU 0x07d4 /* U+03A4 GREEK CAPITAL LETTER TAU */ +#define XKB_KEY_Greek_UPSILON 0x07d5 /* U+03A5 GREEK CAPITAL LETTER UPSILON */ +#define XKB_KEY_Greek_PHI 0x07d6 /* U+03A6 GREEK CAPITAL LETTER PHI */ +#define XKB_KEY_Greek_CHI 0x07d7 /* U+03A7 GREEK CAPITAL LETTER CHI */ +#define XKB_KEY_Greek_PSI 0x07d8 /* U+03A8 GREEK CAPITAL LETTER PSI */ +#define XKB_KEY_Greek_OMEGA 0x07d9 /* U+03A9 GREEK CAPITAL LETTER OMEGA */ +#define XKB_KEY_Greek_alpha 0x07e1 /* U+03B1 GREEK SMALL LETTER ALPHA */ +#define XKB_KEY_Greek_beta 0x07e2 /* U+03B2 GREEK SMALL LETTER BETA */ +#define XKB_KEY_Greek_gamma 0x07e3 /* U+03B3 GREEK SMALL LETTER GAMMA */ +#define XKB_KEY_Greek_delta 0x07e4 /* U+03B4 GREEK SMALL LETTER DELTA */ +#define XKB_KEY_Greek_epsilon 0x07e5 /* U+03B5 GREEK SMALL LETTER EPSILON */ +#define XKB_KEY_Greek_zeta 0x07e6 /* U+03B6 GREEK SMALL LETTER ZETA */ +#define XKB_KEY_Greek_eta 0x07e7 /* U+03B7 GREEK SMALL LETTER ETA */ +#define XKB_KEY_Greek_theta 0x07e8 /* U+03B8 GREEK SMALL LETTER THETA */ +#define XKB_KEY_Greek_iota 0x07e9 /* U+03B9 GREEK SMALL LETTER IOTA */ +#define XKB_KEY_Greek_kappa 0x07ea /* U+03BA GREEK SMALL LETTER KAPPA */ +#define XKB_KEY_Greek_lamda 0x07eb /* U+03BB GREEK SMALL LETTER LAMDA */ +#define XKB_KEY_Greek_lambda 0x07eb /* non-deprecated alias for Greek_lamda */ +#define XKB_KEY_Greek_mu 0x07ec /* U+03BC GREEK SMALL LETTER MU */ +#define XKB_KEY_Greek_nu 0x07ed /* U+03BD GREEK SMALL LETTER NU */ +#define XKB_KEY_Greek_xi 0x07ee /* U+03BE GREEK SMALL LETTER XI */ +#define XKB_KEY_Greek_omicron 0x07ef /* U+03BF GREEK SMALL LETTER OMICRON */ +#define XKB_KEY_Greek_pi 0x07f0 /* U+03C0 GREEK SMALL LETTER PI */ +#define XKB_KEY_Greek_rho 0x07f1 /* U+03C1 GREEK SMALL LETTER RHO */ +#define XKB_KEY_Greek_sigma 0x07f2 /* U+03C3 GREEK SMALL LETTER SIGMA */ +#define XKB_KEY_Greek_finalsmallsigma 0x07f3 /* U+03C2 GREEK SMALL LETTER FINAL SIGMA */ +#define XKB_KEY_Greek_tau 0x07f4 /* U+03C4 GREEK SMALL LETTER TAU */ +#define XKB_KEY_Greek_upsilon 0x07f5 /* U+03C5 GREEK SMALL LETTER UPSILON */ +#define XKB_KEY_Greek_phi 0x07f6 /* U+03C6 GREEK SMALL LETTER PHI */ +#define XKB_KEY_Greek_chi 0x07f7 /* U+03C7 GREEK SMALL LETTER CHI */ +#define XKB_KEY_Greek_psi 0x07f8 /* U+03C8 GREEK SMALL LETTER PSI */ +#define XKB_KEY_Greek_omega 0x07f9 /* U+03C9 GREEK SMALL LETTER OMEGA */ +#define XKB_KEY_Greek_switch 0xff7e /* non-deprecated alias for Mode_switch */ + +/* + * Technical + * (from the DEC VT330/VT420 Technical Character Set, http://vt100.net/charsets/technical.html) + * Byte 3 = 8 + */ + +#define XKB_KEY_leftradical 0x08a1 /* U+23B7 RADICAL SYMBOL BOTTOM */ +#define XKB_KEY_topleftradical 0x08a2 /*(U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT)*/ +#define XKB_KEY_horizconnector 0x08a3 /*(U+2500 BOX DRAWINGS LIGHT HORIZONTAL)*/ +#define XKB_KEY_topintegral 0x08a4 /* U+2320 TOP HALF INTEGRAL */ +#define XKB_KEY_botintegral 0x08a5 /* U+2321 BOTTOM HALF INTEGRAL */ +#define XKB_KEY_vertconnector 0x08a6 /*(U+2502 BOX DRAWINGS LIGHT VERTICAL)*/ +#define XKB_KEY_topleftsqbracket 0x08a7 /* U+23A1 LEFT SQUARE BRACKET UPPER CORNER */ +#define XKB_KEY_botleftsqbracket 0x08a8 /* U+23A3 LEFT SQUARE BRACKET LOWER CORNER */ +#define XKB_KEY_toprightsqbracket 0x08a9 /* U+23A4 RIGHT SQUARE BRACKET UPPER CORNER */ +#define XKB_KEY_botrightsqbracket 0x08aa /* U+23A6 RIGHT SQUARE BRACKET LOWER CORNER */ +#define XKB_KEY_topleftparens 0x08ab /* U+239B LEFT PARENTHESIS UPPER HOOK */ +#define XKB_KEY_botleftparens 0x08ac /* U+239D LEFT PARENTHESIS LOWER HOOK */ +#define XKB_KEY_toprightparens 0x08ad /* U+239E RIGHT PARENTHESIS UPPER HOOK */ +#define XKB_KEY_botrightparens 0x08ae /* U+23A0 RIGHT PARENTHESIS LOWER HOOK */ +#define XKB_KEY_leftmiddlecurlybrace 0x08af /* U+23A8 LEFT CURLY BRACKET MIDDLE PIECE */ +#define XKB_KEY_rightmiddlecurlybrace 0x08b0 /* U+23AC RIGHT CURLY BRACKET MIDDLE PIECE */ +#define XKB_KEY_topleftsummation 0x08b1 +#define XKB_KEY_botleftsummation 0x08b2 +#define XKB_KEY_topvertsummationconnector 0x08b3 +#define XKB_KEY_botvertsummationconnector 0x08b4 +#define XKB_KEY_toprightsummation 0x08b5 +#define XKB_KEY_botrightsummation 0x08b6 +#define XKB_KEY_rightmiddlesummation 0x08b7 +#define XKB_KEY_lessthanequal 0x08bc /* U+2264 LESS-THAN OR EQUAL TO */ +#define XKB_KEY_notequal 0x08bd /* U+2260 NOT EQUAL TO */ +#define XKB_KEY_greaterthanequal 0x08be /* U+2265 GREATER-THAN OR EQUAL TO */ +#define XKB_KEY_integral 0x08bf /* U+222B INTEGRAL */ +#define XKB_KEY_therefore 0x08c0 /* U+2234 THEREFORE */ +#define XKB_KEY_variation 0x08c1 /* U+221D PROPORTIONAL TO */ +#define XKB_KEY_infinity 0x08c2 /* U+221E INFINITY */ +#define XKB_KEY_nabla 0x08c5 /* U+2207 NABLA */ +#define XKB_KEY_approximate 0x08c8 /* U+223C TILDE OPERATOR */ +#define XKB_KEY_similarequal 0x08c9 /* U+2243 ASYMPTOTICALLY EQUAL TO */ +#define XKB_KEY_ifonlyif 0x08cd /* U+21D4 LEFT RIGHT DOUBLE ARROW */ +#define XKB_KEY_implies 0x08ce /* U+21D2 RIGHTWARDS DOUBLE ARROW */ +#define XKB_KEY_identical 0x08cf /* U+2261 IDENTICAL TO */ +#define XKB_KEY_radical 0x08d6 /* U+221A SQUARE ROOT */ +#define XKB_KEY_includedin 0x08da /* U+2282 SUBSET OF */ +#define XKB_KEY_includes 0x08db /* U+2283 SUPERSET OF */ +#define XKB_KEY_intersection 0x08dc /* U+2229 INTERSECTION */ +#define XKB_KEY_union 0x08dd /* U+222A UNION */ +#define XKB_KEY_logicaland 0x08de /* U+2227 LOGICAL AND */ +#define XKB_KEY_logicalor 0x08df /* U+2228 LOGICAL OR */ +#define XKB_KEY_partialderivative 0x08ef /* U+2202 PARTIAL DIFFERENTIAL */ +#define XKB_KEY_function 0x08f6 /* U+0192 LATIN SMALL LETTER F WITH HOOK */ +#define XKB_KEY_leftarrow 0x08fb /* U+2190 LEFTWARDS ARROW */ +#define XKB_KEY_uparrow 0x08fc /* U+2191 UPWARDS ARROW */ +#define XKB_KEY_rightarrow 0x08fd /* U+2192 RIGHTWARDS ARROW */ +#define XKB_KEY_downarrow 0x08fe /* U+2193 DOWNWARDS ARROW */ + +/* + * Special + * (from the DEC VT100 Special Graphics Character Set) + * Byte 3 = 9 + */ + +#define XKB_KEY_blank 0x09df +#define XKB_KEY_soliddiamond 0x09e0 /* U+25C6 BLACK DIAMOND */ +#define XKB_KEY_checkerboard 0x09e1 /* U+2592 MEDIUM SHADE */ +#define XKB_KEY_ht 0x09e2 /* U+2409 SYMBOL FOR HORIZONTAL TABULATION */ +#define XKB_KEY_ff 0x09e3 /* U+240C SYMBOL FOR FORM FEED */ +#define XKB_KEY_cr 0x09e4 /* U+240D SYMBOL FOR CARRIAGE RETURN */ +#define XKB_KEY_lf 0x09e5 /* U+240A SYMBOL FOR LINE FEED */ +#define XKB_KEY_nl 0x09e8 /* U+2424 SYMBOL FOR NEWLINE */ +#define XKB_KEY_vt 0x09e9 /* U+240B SYMBOL FOR VERTICAL TABULATION */ +#define XKB_KEY_lowrightcorner 0x09ea /* U+2518 BOX DRAWINGS LIGHT UP AND LEFT */ +#define XKB_KEY_uprightcorner 0x09eb /* U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT */ +#define XKB_KEY_upleftcorner 0x09ec /* U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT */ +#define XKB_KEY_lowleftcorner 0x09ed /* U+2514 BOX DRAWINGS LIGHT UP AND RIGHT */ +#define XKB_KEY_crossinglines 0x09ee /* U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL */ +#define XKB_KEY_horizlinescan1 0x09ef /* U+23BA HORIZONTAL SCAN LINE-1 */ +#define XKB_KEY_horizlinescan3 0x09f0 /* U+23BB HORIZONTAL SCAN LINE-3 */ +#define XKB_KEY_horizlinescan5 0x09f1 /* U+2500 BOX DRAWINGS LIGHT HORIZONTAL */ +#define XKB_KEY_horizlinescan7 0x09f2 /* U+23BC HORIZONTAL SCAN LINE-7 */ +#define XKB_KEY_horizlinescan9 0x09f3 /* U+23BD HORIZONTAL SCAN LINE-9 */ +#define XKB_KEY_leftt 0x09f4 /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */ +#define XKB_KEY_rightt 0x09f5 /* U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT */ +#define XKB_KEY_bott 0x09f6 /* U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL */ +#define XKB_KEY_topt 0x09f7 /* U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL */ +#define XKB_KEY_vertbar 0x09f8 /* U+2502 BOX DRAWINGS LIGHT VERTICAL */ + +/* + * Publishing + * (these are probably from a long forgotten DEC Publishing + * font that once shipped with DECwrite) + * Byte 3 = 0x0a + */ + +#define XKB_KEY_emspace 0x0aa1 /* U+2003 EM SPACE */ +#define XKB_KEY_enspace 0x0aa2 /* U+2002 EN SPACE */ +#define XKB_KEY_em3space 0x0aa3 /* U+2004 THREE-PER-EM SPACE */ +#define XKB_KEY_em4space 0x0aa4 /* U+2005 FOUR-PER-EM SPACE */ +#define XKB_KEY_digitspace 0x0aa5 /* U+2007 FIGURE SPACE */ +#define XKB_KEY_punctspace 0x0aa6 /* U+2008 PUNCTUATION SPACE */ +#define XKB_KEY_thinspace 0x0aa7 /* U+2009 THIN SPACE */ +#define XKB_KEY_hairspace 0x0aa8 /* U+200A HAIR SPACE */ +#define XKB_KEY_emdash 0x0aa9 /* U+2014 EM DASH */ +#define XKB_KEY_endash 0x0aaa /* U+2013 EN DASH */ +#define XKB_KEY_signifblank 0x0aac /*(U+2423 OPEN BOX)*/ +#define XKB_KEY_ellipsis 0x0aae /* U+2026 HORIZONTAL ELLIPSIS */ +#define XKB_KEY_doubbaselinedot 0x0aaf /* U+2025 TWO DOT LEADER */ +#define XKB_KEY_onethird 0x0ab0 /* U+2153 VULGAR FRACTION ONE THIRD */ +#define XKB_KEY_twothirds 0x0ab1 /* U+2154 VULGAR FRACTION TWO THIRDS */ +#define XKB_KEY_onefifth 0x0ab2 /* U+2155 VULGAR FRACTION ONE FIFTH */ +#define XKB_KEY_twofifths 0x0ab3 /* U+2156 VULGAR FRACTION TWO FIFTHS */ +#define XKB_KEY_threefifths 0x0ab4 /* U+2157 VULGAR FRACTION THREE FIFTHS */ +#define XKB_KEY_fourfifths 0x0ab5 /* U+2158 VULGAR FRACTION FOUR FIFTHS */ +#define XKB_KEY_onesixth 0x0ab6 /* U+2159 VULGAR FRACTION ONE SIXTH */ +#define XKB_KEY_fivesixths 0x0ab7 /* U+215A VULGAR FRACTION FIVE SIXTHS */ +#define XKB_KEY_careof 0x0ab8 /* U+2105 CARE OF */ +#define XKB_KEY_figdash 0x0abb /* U+2012 FIGURE DASH */ +#define XKB_KEY_leftanglebracket 0x0abc /*(U+2329 LEFT-POINTING ANGLE BRACKET)*/ +#define XKB_KEY_decimalpoint 0x0abd /*(U+002E FULL STOP)*/ +#define XKB_KEY_rightanglebracket 0x0abe /*(U+232A RIGHT-POINTING ANGLE BRACKET)*/ +#define XKB_KEY_marker 0x0abf +#define XKB_KEY_oneeighth 0x0ac3 /* U+215B VULGAR FRACTION ONE EIGHTH */ +#define XKB_KEY_threeeighths 0x0ac4 /* U+215C VULGAR FRACTION THREE EIGHTHS */ +#define XKB_KEY_fiveeighths 0x0ac5 /* U+215D VULGAR FRACTION FIVE EIGHTHS */ +#define XKB_KEY_seveneighths 0x0ac6 /* U+215E VULGAR FRACTION SEVEN EIGHTHS */ +#define XKB_KEY_trademark 0x0ac9 /* U+2122 TRADE MARK SIGN */ +#define XKB_KEY_signaturemark 0x0aca /*(U+2613 SALTIRE)*/ +#define XKB_KEY_trademarkincircle 0x0acb +#define XKB_KEY_leftopentriangle 0x0acc /*(U+25C1 WHITE LEFT-POINTING TRIANGLE)*/ +#define XKB_KEY_rightopentriangle 0x0acd /*(U+25B7 WHITE RIGHT-POINTING TRIANGLE)*/ +#define XKB_KEY_emopencircle 0x0ace /*(U+25CB WHITE CIRCLE)*/ +#define XKB_KEY_emopenrectangle 0x0acf /*(U+25AF WHITE VERTICAL RECTANGLE)*/ +#define XKB_KEY_leftsinglequotemark 0x0ad0 /* U+2018 LEFT SINGLE QUOTATION MARK */ +#define XKB_KEY_rightsinglequotemark 0x0ad1 /* U+2019 RIGHT SINGLE QUOTATION MARK */ +#define XKB_KEY_leftdoublequotemark 0x0ad2 /* U+201C LEFT DOUBLE QUOTATION MARK */ +#define XKB_KEY_rightdoublequotemark 0x0ad3 /* U+201D RIGHT DOUBLE QUOTATION MARK */ +#define XKB_KEY_prescription 0x0ad4 /* U+211E PRESCRIPTION TAKE */ +#define XKB_KEY_permille 0x0ad5 /* U+2030 PER MILLE SIGN */ +#define XKB_KEY_minutes 0x0ad6 /* U+2032 PRIME */ +#define XKB_KEY_seconds 0x0ad7 /* U+2033 DOUBLE PRIME */ +#define XKB_KEY_latincross 0x0ad9 /* U+271D LATIN CROSS */ +#define XKB_KEY_hexagram 0x0ada +#define XKB_KEY_filledrectbullet 0x0adb /*(U+25AC BLACK RECTANGLE)*/ +#define XKB_KEY_filledlefttribullet 0x0adc /*(U+25C0 BLACK LEFT-POINTING TRIANGLE)*/ +#define XKB_KEY_filledrighttribullet 0x0add /*(U+25B6 BLACK RIGHT-POINTING TRIANGLE)*/ +#define XKB_KEY_emfilledcircle 0x0ade /*(U+25CF BLACK CIRCLE)*/ +#define XKB_KEY_emfilledrect 0x0adf /*(U+25AE BLACK VERTICAL RECTANGLE)*/ +#define XKB_KEY_enopencircbullet 0x0ae0 /*(U+25E6 WHITE BULLET)*/ +#define XKB_KEY_enopensquarebullet 0x0ae1 /*(U+25AB WHITE SMALL SQUARE)*/ +#define XKB_KEY_openrectbullet 0x0ae2 /*(U+25AD WHITE RECTANGLE)*/ +#define XKB_KEY_opentribulletup 0x0ae3 /*(U+25B3 WHITE UP-POINTING TRIANGLE)*/ +#define XKB_KEY_opentribulletdown 0x0ae4 /*(U+25BD WHITE DOWN-POINTING TRIANGLE)*/ +#define XKB_KEY_openstar 0x0ae5 /*(U+2606 WHITE STAR)*/ +#define XKB_KEY_enfilledcircbullet 0x0ae6 /*(U+2022 BULLET)*/ +#define XKB_KEY_enfilledsqbullet 0x0ae7 /*(U+25AA BLACK SMALL SQUARE)*/ +#define XKB_KEY_filledtribulletup 0x0ae8 /*(U+25B2 BLACK UP-POINTING TRIANGLE)*/ +#define XKB_KEY_filledtribulletdown 0x0ae9 /*(U+25BC BLACK DOWN-POINTING TRIANGLE)*/ +#define XKB_KEY_leftpointer 0x0aea /*(U+261C WHITE LEFT POINTING INDEX)*/ +#define XKB_KEY_rightpointer 0x0aeb /*(U+261E WHITE RIGHT POINTING INDEX)*/ +#define XKB_KEY_club 0x0aec /* U+2663 BLACK CLUB SUIT */ +#define XKB_KEY_diamond 0x0aed /* U+2666 BLACK DIAMOND SUIT */ +#define XKB_KEY_heart 0x0aee /* U+2665 BLACK HEART SUIT */ +#define XKB_KEY_maltesecross 0x0af0 /* U+2720 MALTESE CROSS */ +#define XKB_KEY_dagger 0x0af1 /* U+2020 DAGGER */ +#define XKB_KEY_doubledagger 0x0af2 /* U+2021 DOUBLE DAGGER */ +#define XKB_KEY_checkmark 0x0af3 /* U+2713 CHECK MARK */ +#define XKB_KEY_ballotcross 0x0af4 /* U+2717 BALLOT X */ +#define XKB_KEY_musicalsharp 0x0af5 /* U+266F MUSIC SHARP SIGN */ +#define XKB_KEY_musicalflat 0x0af6 /* U+266D MUSIC FLAT SIGN */ +#define XKB_KEY_malesymbol 0x0af7 /* U+2642 MALE SIGN */ +#define XKB_KEY_femalesymbol 0x0af8 /* U+2640 FEMALE SIGN */ +#define XKB_KEY_telephone 0x0af9 /* U+260E BLACK TELEPHONE */ +#define XKB_KEY_telephonerecorder 0x0afa /* U+2315 TELEPHONE RECORDER */ +#define XKB_KEY_phonographcopyright 0x0afb /* U+2117 SOUND RECORDING COPYRIGHT */ +#define XKB_KEY_caret 0x0afc /* U+2038 CARET */ +#define XKB_KEY_singlelowquotemark 0x0afd /* U+201A SINGLE LOW-9 QUOTATION MARK */ +#define XKB_KEY_doublelowquotemark 0x0afe /* U+201E DOUBLE LOW-9 QUOTATION MARK */ +#define XKB_KEY_cursor 0x0aff + +/* + * APL + * Byte 3 = 0x0b + */ + +#define XKB_KEY_leftcaret 0x0ba3 /*(U+003C LESS-THAN SIGN)*/ +#define XKB_KEY_rightcaret 0x0ba6 /*(U+003E GREATER-THAN SIGN)*/ +#define XKB_KEY_downcaret 0x0ba8 /*(U+2228 LOGICAL OR)*/ +#define XKB_KEY_upcaret 0x0ba9 /*(U+2227 LOGICAL AND)*/ +#define XKB_KEY_overbar 0x0bc0 /*(U+00AF MACRON)*/ +#define XKB_KEY_downtack 0x0bc2 /* U+22A4 DOWN TACK */ +#define XKB_KEY_upshoe 0x0bc3 /*(U+2229 INTERSECTION)*/ +#define XKB_KEY_downstile 0x0bc4 /* U+230A LEFT FLOOR */ +#define XKB_KEY_underbar 0x0bc6 /*(U+005F LOW LINE)*/ +#define XKB_KEY_jot 0x0bca /* U+2218 RING OPERATOR */ +#define XKB_KEY_quad 0x0bcc /* U+2395 APL FUNCTIONAL SYMBOL QUAD */ +#define XKB_KEY_uptack 0x0bce /* U+22A5 UP TACK */ +#define XKB_KEY_circle 0x0bcf /* U+25CB WHITE CIRCLE */ +#define XKB_KEY_upstile 0x0bd3 /* U+2308 LEFT CEILING */ +#define XKB_KEY_downshoe 0x0bd6 /*(U+222A UNION)*/ +#define XKB_KEY_rightshoe 0x0bd8 /*(U+2283 SUPERSET OF)*/ +#define XKB_KEY_leftshoe 0x0bda /*(U+2282 SUBSET OF)*/ +#define XKB_KEY_lefttack 0x0bdc /* U+22A3 LEFT TACK */ +#define XKB_KEY_righttack 0x0bfc /* U+22A2 RIGHT TACK */ + +/* + * Hebrew + * Byte 3 = 0x0c + */ + +#define XKB_KEY_hebrew_doublelowline 0x0cdf /* U+2017 DOUBLE LOW LINE */ +#define XKB_KEY_hebrew_aleph 0x0ce0 /* U+05D0 HEBREW LETTER ALEF */ +#define XKB_KEY_hebrew_bet 0x0ce1 /* U+05D1 HEBREW LETTER BET */ +#define XKB_KEY_hebrew_beth 0x0ce1 /* deprecated */ +#define XKB_KEY_hebrew_gimel 0x0ce2 /* U+05D2 HEBREW LETTER GIMEL */ +#define XKB_KEY_hebrew_gimmel 0x0ce2 /* deprecated */ +#define XKB_KEY_hebrew_dalet 0x0ce3 /* U+05D3 HEBREW LETTER DALET */ +#define XKB_KEY_hebrew_daleth 0x0ce3 /* deprecated */ +#define XKB_KEY_hebrew_he 0x0ce4 /* U+05D4 HEBREW LETTER HE */ +#define XKB_KEY_hebrew_waw 0x0ce5 /* U+05D5 HEBREW LETTER VAV */ +#define XKB_KEY_hebrew_zain 0x0ce6 /* U+05D6 HEBREW LETTER ZAYIN */ +#define XKB_KEY_hebrew_zayin 0x0ce6 /* deprecated */ +#define XKB_KEY_hebrew_chet 0x0ce7 /* U+05D7 HEBREW LETTER HET */ +#define XKB_KEY_hebrew_het 0x0ce7 /* deprecated */ +#define XKB_KEY_hebrew_tet 0x0ce8 /* U+05D8 HEBREW LETTER TET */ +#define XKB_KEY_hebrew_teth 0x0ce8 /* deprecated */ +#define XKB_KEY_hebrew_yod 0x0ce9 /* U+05D9 HEBREW LETTER YOD */ +#define XKB_KEY_hebrew_finalkaph 0x0cea /* U+05DA HEBREW LETTER FINAL KAF */ +#define XKB_KEY_hebrew_kaph 0x0ceb /* U+05DB HEBREW LETTER KAF */ +#define XKB_KEY_hebrew_lamed 0x0cec /* U+05DC HEBREW LETTER LAMED */ +#define XKB_KEY_hebrew_finalmem 0x0ced /* U+05DD HEBREW LETTER FINAL MEM */ +#define XKB_KEY_hebrew_mem 0x0cee /* U+05DE HEBREW LETTER MEM */ +#define XKB_KEY_hebrew_finalnun 0x0cef /* U+05DF HEBREW LETTER FINAL NUN */ +#define XKB_KEY_hebrew_nun 0x0cf0 /* U+05E0 HEBREW LETTER NUN */ +#define XKB_KEY_hebrew_samech 0x0cf1 /* U+05E1 HEBREW LETTER SAMEKH */ +#define XKB_KEY_hebrew_samekh 0x0cf1 /* deprecated */ +#define XKB_KEY_hebrew_ayin 0x0cf2 /* U+05E2 HEBREW LETTER AYIN */ +#define XKB_KEY_hebrew_finalpe 0x0cf3 /* U+05E3 HEBREW LETTER FINAL PE */ +#define XKB_KEY_hebrew_pe 0x0cf4 /* U+05E4 HEBREW LETTER PE */ +#define XKB_KEY_hebrew_finalzade 0x0cf5 /* U+05E5 HEBREW LETTER FINAL TSADI */ +#define XKB_KEY_hebrew_finalzadi 0x0cf5 /* deprecated */ +#define XKB_KEY_hebrew_zade 0x0cf6 /* U+05E6 HEBREW LETTER TSADI */ +#define XKB_KEY_hebrew_zadi 0x0cf6 /* deprecated */ +#define XKB_KEY_hebrew_qoph 0x0cf7 /* U+05E7 HEBREW LETTER QOF */ +#define XKB_KEY_hebrew_kuf 0x0cf7 /* deprecated */ +#define XKB_KEY_hebrew_resh 0x0cf8 /* U+05E8 HEBREW LETTER RESH */ +#define XKB_KEY_hebrew_shin 0x0cf9 /* U+05E9 HEBREW LETTER SHIN */ +#define XKB_KEY_hebrew_taw 0x0cfa /* U+05EA HEBREW LETTER TAV */ +#define XKB_KEY_hebrew_taf 0x0cfa /* deprecated */ +#define XKB_KEY_Hebrew_switch 0xff7e /* non-deprecated alias for Mode_switch */ + +/* + * Thai + * Byte 3 = 0x0d + */ + +#define XKB_KEY_Thai_kokai 0x0da1 /* U+0E01 THAI CHARACTER KO KAI */ +#define XKB_KEY_Thai_khokhai 0x0da2 /* U+0E02 THAI CHARACTER KHO KHAI */ +#define XKB_KEY_Thai_khokhuat 0x0da3 /* U+0E03 THAI CHARACTER KHO KHUAT */ +#define XKB_KEY_Thai_khokhwai 0x0da4 /* U+0E04 THAI CHARACTER KHO KHWAI */ +#define XKB_KEY_Thai_khokhon 0x0da5 /* U+0E05 THAI CHARACTER KHO KHON */ +#define XKB_KEY_Thai_khorakhang 0x0da6 /* U+0E06 THAI CHARACTER KHO RAKHANG */ +#define XKB_KEY_Thai_ngongu 0x0da7 /* U+0E07 THAI CHARACTER NGO NGU */ +#define XKB_KEY_Thai_chochan 0x0da8 /* U+0E08 THAI CHARACTER CHO CHAN */ +#define XKB_KEY_Thai_choching 0x0da9 /* U+0E09 THAI CHARACTER CHO CHING */ +#define XKB_KEY_Thai_chochang 0x0daa /* U+0E0A THAI CHARACTER CHO CHANG */ +#define XKB_KEY_Thai_soso 0x0dab /* U+0E0B THAI CHARACTER SO SO */ +#define XKB_KEY_Thai_chochoe 0x0dac /* U+0E0C THAI CHARACTER CHO CHOE */ +#define XKB_KEY_Thai_yoying 0x0dad /* U+0E0D THAI CHARACTER YO YING */ +#define XKB_KEY_Thai_dochada 0x0dae /* U+0E0E THAI CHARACTER DO CHADA */ +#define XKB_KEY_Thai_topatak 0x0daf /* U+0E0F THAI CHARACTER TO PATAK */ +#define XKB_KEY_Thai_thothan 0x0db0 /* U+0E10 THAI CHARACTER THO THAN */ +#define XKB_KEY_Thai_thonangmontho 0x0db1 /* U+0E11 THAI CHARACTER THO NANGMONTHO */ +#define XKB_KEY_Thai_thophuthao 0x0db2 /* U+0E12 THAI CHARACTER THO PHUTHAO */ +#define XKB_KEY_Thai_nonen 0x0db3 /* U+0E13 THAI CHARACTER NO NEN */ +#define XKB_KEY_Thai_dodek 0x0db4 /* U+0E14 THAI CHARACTER DO DEK */ +#define XKB_KEY_Thai_totao 0x0db5 /* U+0E15 THAI CHARACTER TO TAO */ +#define XKB_KEY_Thai_thothung 0x0db6 /* U+0E16 THAI CHARACTER THO THUNG */ +#define XKB_KEY_Thai_thothahan 0x0db7 /* U+0E17 THAI CHARACTER THO THAHAN */ +#define XKB_KEY_Thai_thothong 0x0db8 /* U+0E18 THAI CHARACTER THO THONG */ +#define XKB_KEY_Thai_nonu 0x0db9 /* U+0E19 THAI CHARACTER NO NU */ +#define XKB_KEY_Thai_bobaimai 0x0dba /* U+0E1A THAI CHARACTER BO BAIMAI */ +#define XKB_KEY_Thai_popla 0x0dbb /* U+0E1B THAI CHARACTER PO PLA */ +#define XKB_KEY_Thai_phophung 0x0dbc /* U+0E1C THAI CHARACTER PHO PHUNG */ +#define XKB_KEY_Thai_fofa 0x0dbd /* U+0E1D THAI CHARACTER FO FA */ +#define XKB_KEY_Thai_phophan 0x0dbe /* U+0E1E THAI CHARACTER PHO PHAN */ +#define XKB_KEY_Thai_fofan 0x0dbf /* U+0E1F THAI CHARACTER FO FAN */ +#define XKB_KEY_Thai_phosamphao 0x0dc0 /* U+0E20 THAI CHARACTER PHO SAMPHAO */ +#define XKB_KEY_Thai_moma 0x0dc1 /* U+0E21 THAI CHARACTER MO MA */ +#define XKB_KEY_Thai_yoyak 0x0dc2 /* U+0E22 THAI CHARACTER YO YAK */ +#define XKB_KEY_Thai_rorua 0x0dc3 /* U+0E23 THAI CHARACTER RO RUA */ +#define XKB_KEY_Thai_ru 0x0dc4 /* U+0E24 THAI CHARACTER RU */ +#define XKB_KEY_Thai_loling 0x0dc5 /* U+0E25 THAI CHARACTER LO LING */ +#define XKB_KEY_Thai_lu 0x0dc6 /* U+0E26 THAI CHARACTER LU */ +#define XKB_KEY_Thai_wowaen 0x0dc7 /* U+0E27 THAI CHARACTER WO WAEN */ +#define XKB_KEY_Thai_sosala 0x0dc8 /* U+0E28 THAI CHARACTER SO SALA */ +#define XKB_KEY_Thai_sorusi 0x0dc9 /* U+0E29 THAI CHARACTER SO RUSI */ +#define XKB_KEY_Thai_sosua 0x0dca /* U+0E2A THAI CHARACTER SO SUA */ +#define XKB_KEY_Thai_hohip 0x0dcb /* U+0E2B THAI CHARACTER HO HIP */ +#define XKB_KEY_Thai_lochula 0x0dcc /* U+0E2C THAI CHARACTER LO CHULA */ +#define XKB_KEY_Thai_oang 0x0dcd /* U+0E2D THAI CHARACTER O ANG */ +#define XKB_KEY_Thai_honokhuk 0x0dce /* U+0E2E THAI CHARACTER HO NOKHUK */ +#define XKB_KEY_Thai_paiyannoi 0x0dcf /* U+0E2F THAI CHARACTER PAIYANNOI */ +#define XKB_KEY_Thai_saraa 0x0dd0 /* U+0E30 THAI CHARACTER SARA A */ +#define XKB_KEY_Thai_maihanakat 0x0dd1 /* U+0E31 THAI CHARACTER MAI HAN-AKAT */ +#define XKB_KEY_Thai_saraaa 0x0dd2 /* U+0E32 THAI CHARACTER SARA AA */ +#define XKB_KEY_Thai_saraam 0x0dd3 /* U+0E33 THAI CHARACTER SARA AM */ +#define XKB_KEY_Thai_sarai 0x0dd4 /* U+0E34 THAI CHARACTER SARA I */ +#define XKB_KEY_Thai_saraii 0x0dd5 /* U+0E35 THAI CHARACTER SARA II */ +#define XKB_KEY_Thai_saraue 0x0dd6 /* U+0E36 THAI CHARACTER SARA UE */ +#define XKB_KEY_Thai_sarauee 0x0dd7 /* U+0E37 THAI CHARACTER SARA UEE */ +#define XKB_KEY_Thai_sarau 0x0dd8 /* U+0E38 THAI CHARACTER SARA U */ +#define XKB_KEY_Thai_sarauu 0x0dd9 /* U+0E39 THAI CHARACTER SARA UU */ +#define XKB_KEY_Thai_phinthu 0x0dda /* U+0E3A THAI CHARACTER PHINTHU */ +#define XKB_KEY_Thai_maihanakat_maitho 0x0dde /*(U+0E3E Unassigned code point)*/ +#define XKB_KEY_Thai_baht 0x0ddf /* U+0E3F THAI CURRENCY SYMBOL BAHT */ +#define XKB_KEY_Thai_sarae 0x0de0 /* U+0E40 THAI CHARACTER SARA E */ +#define XKB_KEY_Thai_saraae 0x0de1 /* U+0E41 THAI CHARACTER SARA AE */ +#define XKB_KEY_Thai_sarao 0x0de2 /* U+0E42 THAI CHARACTER SARA O */ +#define XKB_KEY_Thai_saraaimaimuan 0x0de3 /* U+0E43 THAI CHARACTER SARA AI MAIMUAN */ +#define XKB_KEY_Thai_saraaimaimalai 0x0de4 /* U+0E44 THAI CHARACTER SARA AI MAIMALAI */ +#define XKB_KEY_Thai_lakkhangyao 0x0de5 /* U+0E45 THAI CHARACTER LAKKHANGYAO */ +#define XKB_KEY_Thai_maiyamok 0x0de6 /* U+0E46 THAI CHARACTER MAIYAMOK */ +#define XKB_KEY_Thai_maitaikhu 0x0de7 /* U+0E47 THAI CHARACTER MAITAIKHU */ +#define XKB_KEY_Thai_maiek 0x0de8 /* U+0E48 THAI CHARACTER MAI EK */ +#define XKB_KEY_Thai_maitho 0x0de9 /* U+0E49 THAI CHARACTER MAI THO */ +#define XKB_KEY_Thai_maitri 0x0dea /* U+0E4A THAI CHARACTER MAI TRI */ +#define XKB_KEY_Thai_maichattawa 0x0deb /* U+0E4B THAI CHARACTER MAI CHATTAWA */ +#define XKB_KEY_Thai_thanthakhat 0x0dec /* U+0E4C THAI CHARACTER THANTHAKHAT */ +#define XKB_KEY_Thai_nikhahit 0x0ded /* U+0E4D THAI CHARACTER NIKHAHIT */ +#define XKB_KEY_Thai_leksun 0x0df0 /* U+0E50 THAI DIGIT ZERO */ +#define XKB_KEY_Thai_leknung 0x0df1 /* U+0E51 THAI DIGIT ONE */ +#define XKB_KEY_Thai_leksong 0x0df2 /* U+0E52 THAI DIGIT TWO */ +#define XKB_KEY_Thai_leksam 0x0df3 /* U+0E53 THAI DIGIT THREE */ +#define XKB_KEY_Thai_leksi 0x0df4 /* U+0E54 THAI DIGIT FOUR */ +#define XKB_KEY_Thai_lekha 0x0df5 /* U+0E55 THAI DIGIT FIVE */ +#define XKB_KEY_Thai_lekhok 0x0df6 /* U+0E56 THAI DIGIT SIX */ +#define XKB_KEY_Thai_lekchet 0x0df7 /* U+0E57 THAI DIGIT SEVEN */ +#define XKB_KEY_Thai_lekpaet 0x0df8 /* U+0E58 THAI DIGIT EIGHT */ +#define XKB_KEY_Thai_lekkao 0x0df9 /* U+0E59 THAI DIGIT NINE */ + +/* + * Korean + * Byte 3 = 0x0e + */ + + +#define XKB_KEY_Hangul 0xff31 /* Hangul start/stop(toggle) */ +#define XKB_KEY_Hangul_Start 0xff32 /* Hangul start */ +#define XKB_KEY_Hangul_End 0xff33 /* Hangul end, English start */ +#define XKB_KEY_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */ +#define XKB_KEY_Hangul_Jamo 0xff35 /* Hangul Jamo mode */ +#define XKB_KEY_Hangul_Romaja 0xff36 /* Hangul Romaja mode */ +#define XKB_KEY_Hangul_Codeinput 0xff37 /* Hangul code input mode */ +#define XKB_KEY_Hangul_Jeonja 0xff38 /* Jeonja mode */ +#define XKB_KEY_Hangul_Banja 0xff39 /* Banja mode */ +#define XKB_KEY_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */ +#define XKB_KEY_Hangul_PostHanja 0xff3b /* Post Hanja conversion */ +#define XKB_KEY_Hangul_SingleCandidate 0xff3c /* Single candidate */ +#define XKB_KEY_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */ +#define XKB_KEY_Hangul_PreviousCandidate 0xff3e /* Previous candidate */ +#define XKB_KEY_Hangul_Special 0xff3f /* Special symbols */ +#define XKB_KEY_Hangul_switch 0xff7e /* non-deprecated alias for Mode_switch */ + +/* Hangul Consonant Characters */ +#define XKB_KEY_Hangul_Kiyeog 0x0ea1 /* U+3131 HANGUL LETTER KIYEOK */ +#define XKB_KEY_Hangul_SsangKiyeog 0x0ea2 /* U+3132 HANGUL LETTER SSANGKIYEOK */ +#define XKB_KEY_Hangul_KiyeogSios 0x0ea3 /* U+3133 HANGUL LETTER KIYEOK-SIOS */ +#define XKB_KEY_Hangul_Nieun 0x0ea4 /* U+3134 HANGUL LETTER NIEUN */ +#define XKB_KEY_Hangul_NieunJieuj 0x0ea5 /* U+3135 HANGUL LETTER NIEUN-CIEUC */ +#define XKB_KEY_Hangul_NieunHieuh 0x0ea6 /* U+3136 HANGUL LETTER NIEUN-HIEUH */ +#define XKB_KEY_Hangul_Dikeud 0x0ea7 /* U+3137 HANGUL LETTER TIKEUT */ +#define XKB_KEY_Hangul_SsangDikeud 0x0ea8 /* U+3138 HANGUL LETTER SSANGTIKEUT */ +#define XKB_KEY_Hangul_Rieul 0x0ea9 /* U+3139 HANGUL LETTER RIEUL */ +#define XKB_KEY_Hangul_RieulKiyeog 0x0eaa /* U+313A HANGUL LETTER RIEUL-KIYEOK */ +#define XKB_KEY_Hangul_RieulMieum 0x0eab /* U+313B HANGUL LETTER RIEUL-MIEUM */ +#define XKB_KEY_Hangul_RieulPieub 0x0eac /* U+313C HANGUL LETTER RIEUL-PIEUP */ +#define XKB_KEY_Hangul_RieulSios 0x0ead /* U+313D HANGUL LETTER RIEUL-SIOS */ +#define XKB_KEY_Hangul_RieulTieut 0x0eae /* U+313E HANGUL LETTER RIEUL-THIEUTH */ +#define XKB_KEY_Hangul_RieulPhieuf 0x0eaf /* U+313F HANGUL LETTER RIEUL-PHIEUPH */ +#define XKB_KEY_Hangul_RieulHieuh 0x0eb0 /* U+3140 HANGUL LETTER RIEUL-HIEUH */ +#define XKB_KEY_Hangul_Mieum 0x0eb1 /* U+3141 HANGUL LETTER MIEUM */ +#define XKB_KEY_Hangul_Pieub 0x0eb2 /* U+3142 HANGUL LETTER PIEUP */ +#define XKB_KEY_Hangul_SsangPieub 0x0eb3 /* U+3143 HANGUL LETTER SSANGPIEUP */ +#define XKB_KEY_Hangul_PieubSios 0x0eb4 /* U+3144 HANGUL LETTER PIEUP-SIOS */ +#define XKB_KEY_Hangul_Sios 0x0eb5 /* U+3145 HANGUL LETTER SIOS */ +#define XKB_KEY_Hangul_SsangSios 0x0eb6 /* U+3146 HANGUL LETTER SSANGSIOS */ +#define XKB_KEY_Hangul_Ieung 0x0eb7 /* U+3147 HANGUL LETTER IEUNG */ +#define XKB_KEY_Hangul_Jieuj 0x0eb8 /* U+3148 HANGUL LETTER CIEUC */ +#define XKB_KEY_Hangul_SsangJieuj 0x0eb9 /* U+3149 HANGUL LETTER SSANGCIEUC */ +#define XKB_KEY_Hangul_Cieuc 0x0eba /* U+314A HANGUL LETTER CHIEUCH */ +#define XKB_KEY_Hangul_Khieuq 0x0ebb /* U+314B HANGUL LETTER KHIEUKH */ +#define XKB_KEY_Hangul_Tieut 0x0ebc /* U+314C HANGUL LETTER THIEUTH */ +#define XKB_KEY_Hangul_Phieuf 0x0ebd /* U+314D HANGUL LETTER PHIEUPH */ +#define XKB_KEY_Hangul_Hieuh 0x0ebe /* U+314E HANGUL LETTER HIEUH */ + +/* Hangul Vowel Characters */ +#define XKB_KEY_Hangul_A 0x0ebf /* U+314F HANGUL LETTER A */ +#define XKB_KEY_Hangul_AE 0x0ec0 /* U+3150 HANGUL LETTER AE */ +#define XKB_KEY_Hangul_YA 0x0ec1 /* U+3151 HANGUL LETTER YA */ +#define XKB_KEY_Hangul_YAE 0x0ec2 /* U+3152 HANGUL LETTER YAE */ +#define XKB_KEY_Hangul_EO 0x0ec3 /* U+3153 HANGUL LETTER EO */ +#define XKB_KEY_Hangul_E 0x0ec4 /* U+3154 HANGUL LETTER E */ +#define XKB_KEY_Hangul_YEO 0x0ec5 /* U+3155 HANGUL LETTER YEO */ +#define XKB_KEY_Hangul_YE 0x0ec6 /* U+3156 HANGUL LETTER YE */ +#define XKB_KEY_Hangul_O 0x0ec7 /* U+3157 HANGUL LETTER O */ +#define XKB_KEY_Hangul_WA 0x0ec8 /* U+3158 HANGUL LETTER WA */ +#define XKB_KEY_Hangul_WAE 0x0ec9 /* U+3159 HANGUL LETTER WAE */ +#define XKB_KEY_Hangul_OE 0x0eca /* U+315A HANGUL LETTER OE */ +#define XKB_KEY_Hangul_YO 0x0ecb /* U+315B HANGUL LETTER YO */ +#define XKB_KEY_Hangul_U 0x0ecc /* U+315C HANGUL LETTER U */ +#define XKB_KEY_Hangul_WEO 0x0ecd /* U+315D HANGUL LETTER WEO */ +#define XKB_KEY_Hangul_WE 0x0ece /* U+315E HANGUL LETTER WE */ +#define XKB_KEY_Hangul_WI 0x0ecf /* U+315F HANGUL LETTER WI */ +#define XKB_KEY_Hangul_YU 0x0ed0 /* U+3160 HANGUL LETTER YU */ +#define XKB_KEY_Hangul_EU 0x0ed1 /* U+3161 HANGUL LETTER EU */ +#define XKB_KEY_Hangul_YI 0x0ed2 /* U+3162 HANGUL LETTER YI */ +#define XKB_KEY_Hangul_I 0x0ed3 /* U+3163 HANGUL LETTER I */ + +/* Hangul syllable-final (JongSeong) Characters */ +#define XKB_KEY_Hangul_J_Kiyeog 0x0ed4 /* U+11A8 HANGUL JONGSEONG KIYEOK */ +#define XKB_KEY_Hangul_J_SsangKiyeog 0x0ed5 /* U+11A9 HANGUL JONGSEONG SSANGKIYEOK */ +#define XKB_KEY_Hangul_J_KiyeogSios 0x0ed6 /* U+11AA HANGUL JONGSEONG KIYEOK-SIOS */ +#define XKB_KEY_Hangul_J_Nieun 0x0ed7 /* U+11AB HANGUL JONGSEONG NIEUN */ +#define XKB_KEY_Hangul_J_NieunJieuj 0x0ed8 /* U+11AC HANGUL JONGSEONG NIEUN-CIEUC */ +#define XKB_KEY_Hangul_J_NieunHieuh 0x0ed9 /* U+11AD HANGUL JONGSEONG NIEUN-HIEUH */ +#define XKB_KEY_Hangul_J_Dikeud 0x0eda /* U+11AE HANGUL JONGSEONG TIKEUT */ +#define XKB_KEY_Hangul_J_Rieul 0x0edb /* U+11AF HANGUL JONGSEONG RIEUL */ +#define XKB_KEY_Hangul_J_RieulKiyeog 0x0edc /* U+11B0 HANGUL JONGSEONG RIEUL-KIYEOK */ +#define XKB_KEY_Hangul_J_RieulMieum 0x0edd /* U+11B1 HANGUL JONGSEONG RIEUL-MIEUM */ +#define XKB_KEY_Hangul_J_RieulPieub 0x0ede /* U+11B2 HANGUL JONGSEONG RIEUL-PIEUP */ +#define XKB_KEY_Hangul_J_RieulSios 0x0edf /* U+11B3 HANGUL JONGSEONG RIEUL-SIOS */ +#define XKB_KEY_Hangul_J_RieulTieut 0x0ee0 /* U+11B4 HANGUL JONGSEONG RIEUL-THIEUTH */ +#define XKB_KEY_Hangul_J_RieulPhieuf 0x0ee1 /* U+11B5 HANGUL JONGSEONG RIEUL-PHIEUPH */ +#define XKB_KEY_Hangul_J_RieulHieuh 0x0ee2 /* U+11B6 HANGUL JONGSEONG RIEUL-HIEUH */ +#define XKB_KEY_Hangul_J_Mieum 0x0ee3 /* U+11B7 HANGUL JONGSEONG MIEUM */ +#define XKB_KEY_Hangul_J_Pieub 0x0ee4 /* U+11B8 HANGUL JONGSEONG PIEUP */ +#define XKB_KEY_Hangul_J_PieubSios 0x0ee5 /* U+11B9 HANGUL JONGSEONG PIEUP-SIOS */ +#define XKB_KEY_Hangul_J_Sios 0x0ee6 /* U+11BA HANGUL JONGSEONG SIOS */ +#define XKB_KEY_Hangul_J_SsangSios 0x0ee7 /* U+11BB HANGUL JONGSEONG SSANGSIOS */ +#define XKB_KEY_Hangul_J_Ieung 0x0ee8 /* U+11BC HANGUL JONGSEONG IEUNG */ +#define XKB_KEY_Hangul_J_Jieuj 0x0ee9 /* U+11BD HANGUL JONGSEONG CIEUC */ +#define XKB_KEY_Hangul_J_Cieuc 0x0eea /* U+11BE HANGUL JONGSEONG CHIEUCH */ +#define XKB_KEY_Hangul_J_Khieuq 0x0eeb /* U+11BF HANGUL JONGSEONG KHIEUKH */ +#define XKB_KEY_Hangul_J_Tieut 0x0eec /* U+11C0 HANGUL JONGSEONG THIEUTH */ +#define XKB_KEY_Hangul_J_Phieuf 0x0eed /* U+11C1 HANGUL JONGSEONG PHIEUPH */ +#define XKB_KEY_Hangul_J_Hieuh 0x0eee /* U+11C2 HANGUL JONGSEONG HIEUH */ + +/* Ancient Hangul Consonant Characters */ +#define XKB_KEY_Hangul_RieulYeorinHieuh 0x0eef /* U+316D HANGUL LETTER RIEUL-YEORINHIEUH */ +#define XKB_KEY_Hangul_SunkyeongeumMieum 0x0ef0 /* U+3171 HANGUL LETTER KAPYEOUNMIEUM */ +#define XKB_KEY_Hangul_SunkyeongeumPieub 0x0ef1 /* U+3178 HANGUL LETTER KAPYEOUNPIEUP */ +#define XKB_KEY_Hangul_PanSios 0x0ef2 /* U+317F HANGUL LETTER PANSIOS */ +#define XKB_KEY_Hangul_KkogjiDalrinIeung 0x0ef3 /* U+3181 HANGUL LETTER YESIEUNG */ +#define XKB_KEY_Hangul_SunkyeongeumPhieuf 0x0ef4 /* U+3184 HANGUL LETTER KAPYEOUNPHIEUPH */ +#define XKB_KEY_Hangul_YeorinHieuh 0x0ef5 /* U+3186 HANGUL LETTER YEORINHIEUH */ + +/* Ancient Hangul Vowel Characters */ +#define XKB_KEY_Hangul_AraeA 0x0ef6 /* U+318D HANGUL LETTER ARAEA */ +#define XKB_KEY_Hangul_AraeAE 0x0ef7 /* U+318E HANGUL LETTER ARAEAE */ + +/* Ancient Hangul syllable-final (JongSeong) Characters */ +#define XKB_KEY_Hangul_J_PanSios 0x0ef8 /* U+11EB HANGUL JONGSEONG PANSIOS */ +#define XKB_KEY_Hangul_J_KkogjiDalrinIeung 0x0ef9 /* U+11F0 HANGUL JONGSEONG YESIEUNG */ +#define XKB_KEY_Hangul_J_YeorinHieuh 0x0efa /* U+11F9 HANGUL JONGSEONG YEORINHIEUH */ + +/* Korean currency symbol */ +#define XKB_KEY_Korean_Won 0x0eff /*(U+20A9 WON SIGN)*/ + + +/* + * Armenian + */ + +#define XKB_KEY_Armenian_ligature_ew 0x1000587 /* U+0587 ARMENIAN SMALL LIGATURE ECH YIWN */ +#define XKB_KEY_Armenian_full_stop 0x1000589 /* U+0589 ARMENIAN FULL STOP */ +#define XKB_KEY_Armenian_verjaket 0x1000589 /* deprecated alias for Armenian_full_stop */ +#define XKB_KEY_Armenian_separation_mark 0x100055d /* U+055D ARMENIAN COMMA */ +#define XKB_KEY_Armenian_but 0x100055d /* deprecated alias for Armenian_separation_mark */ +#define XKB_KEY_Armenian_hyphen 0x100058a /* U+058A ARMENIAN HYPHEN */ +#define XKB_KEY_Armenian_yentamna 0x100058a /* deprecated alias for Armenian_hyphen */ +#define XKB_KEY_Armenian_exclam 0x100055c /* U+055C ARMENIAN EXCLAMATION MARK */ +#define XKB_KEY_Armenian_amanak 0x100055c /* deprecated alias for Armenian_exclam */ +#define XKB_KEY_Armenian_accent 0x100055b /* U+055B ARMENIAN EMPHASIS MARK */ +#define XKB_KEY_Armenian_shesht 0x100055b /* deprecated alias for Armenian_accent */ +#define XKB_KEY_Armenian_question 0x100055e /* U+055E ARMENIAN QUESTION MARK */ +#define XKB_KEY_Armenian_paruyk 0x100055e /* deprecated alias for Armenian_question */ +#define XKB_KEY_Armenian_AYB 0x1000531 /* U+0531 ARMENIAN CAPITAL LETTER AYB */ +#define XKB_KEY_Armenian_ayb 0x1000561 /* U+0561 ARMENIAN SMALL LETTER AYB */ +#define XKB_KEY_Armenian_BEN 0x1000532 /* U+0532 ARMENIAN CAPITAL LETTER BEN */ +#define XKB_KEY_Armenian_ben 0x1000562 /* U+0562 ARMENIAN SMALL LETTER BEN */ +#define XKB_KEY_Armenian_GIM 0x1000533 /* U+0533 ARMENIAN CAPITAL LETTER GIM */ +#define XKB_KEY_Armenian_gim 0x1000563 /* U+0563 ARMENIAN SMALL LETTER GIM */ +#define XKB_KEY_Armenian_DA 0x1000534 /* U+0534 ARMENIAN CAPITAL LETTER DA */ +#define XKB_KEY_Armenian_da 0x1000564 /* U+0564 ARMENIAN SMALL LETTER DA */ +#define XKB_KEY_Armenian_YECH 0x1000535 /* U+0535 ARMENIAN CAPITAL LETTER ECH */ +#define XKB_KEY_Armenian_yech 0x1000565 /* U+0565 ARMENIAN SMALL LETTER ECH */ +#define XKB_KEY_Armenian_ZA 0x1000536 /* U+0536 ARMENIAN CAPITAL LETTER ZA */ +#define XKB_KEY_Armenian_za 0x1000566 /* U+0566 ARMENIAN SMALL LETTER ZA */ +#define XKB_KEY_Armenian_E 0x1000537 /* U+0537 ARMENIAN CAPITAL LETTER EH */ +#define XKB_KEY_Armenian_e 0x1000567 /* U+0567 ARMENIAN SMALL LETTER EH */ +#define XKB_KEY_Armenian_AT 0x1000538 /* U+0538 ARMENIAN CAPITAL LETTER ET */ +#define XKB_KEY_Armenian_at 0x1000568 /* U+0568 ARMENIAN SMALL LETTER ET */ +#define XKB_KEY_Armenian_TO 0x1000539 /* U+0539 ARMENIAN CAPITAL LETTER TO */ +#define XKB_KEY_Armenian_to 0x1000569 /* U+0569 ARMENIAN SMALL LETTER TO */ +#define XKB_KEY_Armenian_ZHE 0x100053a /* U+053A ARMENIAN CAPITAL LETTER ZHE */ +#define XKB_KEY_Armenian_zhe 0x100056a /* U+056A ARMENIAN SMALL LETTER ZHE */ +#define XKB_KEY_Armenian_INI 0x100053b /* U+053B ARMENIAN CAPITAL LETTER INI */ +#define XKB_KEY_Armenian_ini 0x100056b /* U+056B ARMENIAN SMALL LETTER INI */ +#define XKB_KEY_Armenian_LYUN 0x100053c /* U+053C ARMENIAN CAPITAL LETTER LIWN */ +#define XKB_KEY_Armenian_lyun 0x100056c /* U+056C ARMENIAN SMALL LETTER LIWN */ +#define XKB_KEY_Armenian_KHE 0x100053d /* U+053D ARMENIAN CAPITAL LETTER XEH */ +#define XKB_KEY_Armenian_khe 0x100056d /* U+056D ARMENIAN SMALL LETTER XEH */ +#define XKB_KEY_Armenian_TSA 0x100053e /* U+053E ARMENIAN CAPITAL LETTER CA */ +#define XKB_KEY_Armenian_tsa 0x100056e /* U+056E ARMENIAN SMALL LETTER CA */ +#define XKB_KEY_Armenian_KEN 0x100053f /* U+053F ARMENIAN CAPITAL LETTER KEN */ +#define XKB_KEY_Armenian_ken 0x100056f /* U+056F ARMENIAN SMALL LETTER KEN */ +#define XKB_KEY_Armenian_HO 0x1000540 /* U+0540 ARMENIAN CAPITAL LETTER HO */ +#define XKB_KEY_Armenian_ho 0x1000570 /* U+0570 ARMENIAN SMALL LETTER HO */ +#define XKB_KEY_Armenian_DZA 0x1000541 /* U+0541 ARMENIAN CAPITAL LETTER JA */ +#define XKB_KEY_Armenian_dza 0x1000571 /* U+0571 ARMENIAN SMALL LETTER JA */ +#define XKB_KEY_Armenian_GHAT 0x1000542 /* U+0542 ARMENIAN CAPITAL LETTER GHAD */ +#define XKB_KEY_Armenian_ghat 0x1000572 /* U+0572 ARMENIAN SMALL LETTER GHAD */ +#define XKB_KEY_Armenian_TCHE 0x1000543 /* U+0543 ARMENIAN CAPITAL LETTER CHEH */ +#define XKB_KEY_Armenian_tche 0x1000573 /* U+0573 ARMENIAN SMALL LETTER CHEH */ +#define XKB_KEY_Armenian_MEN 0x1000544 /* U+0544 ARMENIAN CAPITAL LETTER MEN */ +#define XKB_KEY_Armenian_men 0x1000574 /* U+0574 ARMENIAN SMALL LETTER MEN */ +#define XKB_KEY_Armenian_HI 0x1000545 /* U+0545 ARMENIAN CAPITAL LETTER YI */ +#define XKB_KEY_Armenian_hi 0x1000575 /* U+0575 ARMENIAN SMALL LETTER YI */ +#define XKB_KEY_Armenian_NU 0x1000546 /* U+0546 ARMENIAN CAPITAL LETTER NOW */ +#define XKB_KEY_Armenian_nu 0x1000576 /* U+0576 ARMENIAN SMALL LETTER NOW */ +#define XKB_KEY_Armenian_SHA 0x1000547 /* U+0547 ARMENIAN CAPITAL LETTER SHA */ +#define XKB_KEY_Armenian_sha 0x1000577 /* U+0577 ARMENIAN SMALL LETTER SHA */ +#define XKB_KEY_Armenian_VO 0x1000548 /* U+0548 ARMENIAN CAPITAL LETTER VO */ +#define XKB_KEY_Armenian_vo 0x1000578 /* U+0578 ARMENIAN SMALL LETTER VO */ +#define XKB_KEY_Armenian_CHA 0x1000549 /* U+0549 ARMENIAN CAPITAL LETTER CHA */ +#define XKB_KEY_Armenian_cha 0x1000579 /* U+0579 ARMENIAN SMALL LETTER CHA */ +#define XKB_KEY_Armenian_PE 0x100054a /* U+054A ARMENIAN CAPITAL LETTER PEH */ +#define XKB_KEY_Armenian_pe 0x100057a /* U+057A ARMENIAN SMALL LETTER PEH */ +#define XKB_KEY_Armenian_JE 0x100054b /* U+054B ARMENIAN CAPITAL LETTER JHEH */ +#define XKB_KEY_Armenian_je 0x100057b /* U+057B ARMENIAN SMALL LETTER JHEH */ +#define XKB_KEY_Armenian_RA 0x100054c /* U+054C ARMENIAN CAPITAL LETTER RA */ +#define XKB_KEY_Armenian_ra 0x100057c /* U+057C ARMENIAN SMALL LETTER RA */ +#define XKB_KEY_Armenian_SE 0x100054d /* U+054D ARMENIAN CAPITAL LETTER SEH */ +#define XKB_KEY_Armenian_se 0x100057d /* U+057D ARMENIAN SMALL LETTER SEH */ +#define XKB_KEY_Armenian_VEV 0x100054e /* U+054E ARMENIAN CAPITAL LETTER VEW */ +#define XKB_KEY_Armenian_vev 0x100057e /* U+057E ARMENIAN SMALL LETTER VEW */ +#define XKB_KEY_Armenian_TYUN 0x100054f /* U+054F ARMENIAN CAPITAL LETTER TIWN */ +#define XKB_KEY_Armenian_tyun 0x100057f /* U+057F ARMENIAN SMALL LETTER TIWN */ +#define XKB_KEY_Armenian_RE 0x1000550 /* U+0550 ARMENIAN CAPITAL LETTER REH */ +#define XKB_KEY_Armenian_re 0x1000580 /* U+0580 ARMENIAN SMALL LETTER REH */ +#define XKB_KEY_Armenian_TSO 0x1000551 /* U+0551 ARMENIAN CAPITAL LETTER CO */ +#define XKB_KEY_Armenian_tso 0x1000581 /* U+0581 ARMENIAN SMALL LETTER CO */ +#define XKB_KEY_Armenian_VYUN 0x1000552 /* U+0552 ARMENIAN CAPITAL LETTER YIWN */ +#define XKB_KEY_Armenian_vyun 0x1000582 /* U+0582 ARMENIAN SMALL LETTER YIWN */ +#define XKB_KEY_Armenian_PYUR 0x1000553 /* U+0553 ARMENIAN CAPITAL LETTER PIWR */ +#define XKB_KEY_Armenian_pyur 0x1000583 /* U+0583 ARMENIAN SMALL LETTER PIWR */ +#define XKB_KEY_Armenian_KE 0x1000554 /* U+0554 ARMENIAN CAPITAL LETTER KEH */ +#define XKB_KEY_Armenian_ke 0x1000584 /* U+0584 ARMENIAN SMALL LETTER KEH */ +#define XKB_KEY_Armenian_O 0x1000555 /* U+0555 ARMENIAN CAPITAL LETTER OH */ +#define XKB_KEY_Armenian_o 0x1000585 /* U+0585 ARMENIAN SMALL LETTER OH */ +#define XKB_KEY_Armenian_FE 0x1000556 /* U+0556 ARMENIAN CAPITAL LETTER FEH */ +#define XKB_KEY_Armenian_fe 0x1000586 /* U+0586 ARMENIAN SMALL LETTER FEH */ +#define XKB_KEY_Armenian_apostrophe 0x100055a /* U+055A ARMENIAN APOSTROPHE */ + +/* + * Georgian + */ + +#define XKB_KEY_Georgian_an 0x10010d0 /* U+10D0 GEORGIAN LETTER AN */ +#define XKB_KEY_Georgian_ban 0x10010d1 /* U+10D1 GEORGIAN LETTER BAN */ +#define XKB_KEY_Georgian_gan 0x10010d2 /* U+10D2 GEORGIAN LETTER GAN */ +#define XKB_KEY_Georgian_don 0x10010d3 /* U+10D3 GEORGIAN LETTER DON */ +#define XKB_KEY_Georgian_en 0x10010d4 /* U+10D4 GEORGIAN LETTER EN */ +#define XKB_KEY_Georgian_vin 0x10010d5 /* U+10D5 GEORGIAN LETTER VIN */ +#define XKB_KEY_Georgian_zen 0x10010d6 /* U+10D6 GEORGIAN LETTER ZEN */ +#define XKB_KEY_Georgian_tan 0x10010d7 /* U+10D7 GEORGIAN LETTER TAN */ +#define XKB_KEY_Georgian_in 0x10010d8 /* U+10D8 GEORGIAN LETTER IN */ +#define XKB_KEY_Georgian_kan 0x10010d9 /* U+10D9 GEORGIAN LETTER KAN */ +#define XKB_KEY_Georgian_las 0x10010da /* U+10DA GEORGIAN LETTER LAS */ +#define XKB_KEY_Georgian_man 0x10010db /* U+10DB GEORGIAN LETTER MAN */ +#define XKB_KEY_Georgian_nar 0x10010dc /* U+10DC GEORGIAN LETTER NAR */ +#define XKB_KEY_Georgian_on 0x10010dd /* U+10DD GEORGIAN LETTER ON */ +#define XKB_KEY_Georgian_par 0x10010de /* U+10DE GEORGIAN LETTER PAR */ +#define XKB_KEY_Georgian_zhar 0x10010df /* U+10DF GEORGIAN LETTER ZHAR */ +#define XKB_KEY_Georgian_rae 0x10010e0 /* U+10E0 GEORGIAN LETTER RAE */ +#define XKB_KEY_Georgian_san 0x10010e1 /* U+10E1 GEORGIAN LETTER SAN */ +#define XKB_KEY_Georgian_tar 0x10010e2 /* U+10E2 GEORGIAN LETTER TAR */ +#define XKB_KEY_Georgian_un 0x10010e3 /* U+10E3 GEORGIAN LETTER UN */ +#define XKB_KEY_Georgian_phar 0x10010e4 /* U+10E4 GEORGIAN LETTER PHAR */ +#define XKB_KEY_Georgian_khar 0x10010e5 /* U+10E5 GEORGIAN LETTER KHAR */ +#define XKB_KEY_Georgian_ghan 0x10010e6 /* U+10E6 GEORGIAN LETTER GHAN */ +#define XKB_KEY_Georgian_qar 0x10010e7 /* U+10E7 GEORGIAN LETTER QAR */ +#define XKB_KEY_Georgian_shin 0x10010e8 /* U+10E8 GEORGIAN LETTER SHIN */ +#define XKB_KEY_Georgian_chin 0x10010e9 /* U+10E9 GEORGIAN LETTER CHIN */ +#define XKB_KEY_Georgian_can 0x10010ea /* U+10EA GEORGIAN LETTER CAN */ +#define XKB_KEY_Georgian_jil 0x10010eb /* U+10EB GEORGIAN LETTER JIL */ +#define XKB_KEY_Georgian_cil 0x10010ec /* U+10EC GEORGIAN LETTER CIL */ +#define XKB_KEY_Georgian_char 0x10010ed /* U+10ED GEORGIAN LETTER CHAR */ +#define XKB_KEY_Georgian_xan 0x10010ee /* U+10EE GEORGIAN LETTER XAN */ +#define XKB_KEY_Georgian_jhan 0x10010ef /* U+10EF GEORGIAN LETTER JHAN */ +#define XKB_KEY_Georgian_hae 0x10010f0 /* U+10F0 GEORGIAN LETTER HAE */ +#define XKB_KEY_Georgian_he 0x10010f1 /* U+10F1 GEORGIAN LETTER HE */ +#define XKB_KEY_Georgian_hie 0x10010f2 /* U+10F2 GEORGIAN LETTER HIE */ +#define XKB_KEY_Georgian_we 0x10010f3 /* U+10F3 GEORGIAN LETTER WE */ +#define XKB_KEY_Georgian_har 0x10010f4 /* U+10F4 GEORGIAN LETTER HAR */ +#define XKB_KEY_Georgian_hoe 0x10010f5 /* U+10F5 GEORGIAN LETTER HOE */ +#define XKB_KEY_Georgian_fi 0x10010f6 /* U+10F6 GEORGIAN LETTER FI */ + +/* + * Azeri (and other Turkic or Caucasian languages) + */ + +/* latin */ +#define XKB_KEY_Xabovedot 0x1001e8a /* U+1E8A LATIN CAPITAL LETTER X WITH DOT ABOVE */ +#define XKB_KEY_Ibreve 0x100012c /* U+012C LATIN CAPITAL LETTER I WITH BREVE */ +#define XKB_KEY_Zstroke 0x10001b5 /* U+01B5 LATIN CAPITAL LETTER Z WITH STROKE */ +#define XKB_KEY_Gcaron 0x10001e6 /* U+01E6 LATIN CAPITAL LETTER G WITH CARON */ +#define XKB_KEY_Ocaron 0x10001d1 /* U+01D1 LATIN CAPITAL LETTER O WITH CARON */ +#define XKB_KEY_Obarred 0x100019f /* U+019F LATIN CAPITAL LETTER O WITH MIDDLE TILDE */ +#define XKB_KEY_xabovedot 0x1001e8b /* U+1E8B LATIN SMALL LETTER X WITH DOT ABOVE */ +#define XKB_KEY_ibreve 0x100012d /* U+012D LATIN SMALL LETTER I WITH BREVE */ +#define XKB_KEY_zstroke 0x10001b6 /* U+01B6 LATIN SMALL LETTER Z WITH STROKE */ +#define XKB_KEY_gcaron 0x10001e7 /* U+01E7 LATIN SMALL LETTER G WITH CARON */ +#define XKB_KEY_ocaron 0x10001d2 /* U+01D2 LATIN SMALL LETTER O WITH CARON */ +#define XKB_KEY_obarred 0x1000275 /* U+0275 LATIN SMALL LETTER BARRED O */ +#define XKB_KEY_SCHWA 0x100018f /* U+018F LATIN CAPITAL LETTER SCHWA */ +#define XKB_KEY_schwa 0x1000259 /* U+0259 LATIN SMALL LETTER SCHWA */ +#define XKB_KEY_EZH 0x10001b7 /* U+01B7 LATIN CAPITAL LETTER EZH */ +#define XKB_KEY_ezh 0x1000292 /* U+0292 LATIN SMALL LETTER EZH */ +/* those are not really Caucasus */ +/* For Inupiak */ +#define XKB_KEY_Lbelowdot 0x1001e36 /* U+1E36 LATIN CAPITAL LETTER L WITH DOT BELOW */ +#define XKB_KEY_lbelowdot 0x1001e37 /* U+1E37 LATIN SMALL LETTER L WITH DOT BELOW */ + +/* + * Vietnamese + */ + +#define XKB_KEY_Abelowdot 0x1001ea0 /* U+1EA0 LATIN CAPITAL LETTER A WITH DOT BELOW */ +#define XKB_KEY_abelowdot 0x1001ea1 /* U+1EA1 LATIN SMALL LETTER A WITH DOT BELOW */ +#define XKB_KEY_Ahook 0x1001ea2 /* U+1EA2 LATIN CAPITAL LETTER A WITH HOOK ABOVE */ +#define XKB_KEY_ahook 0x1001ea3 /* U+1EA3 LATIN SMALL LETTER A WITH HOOK ABOVE */ +#define XKB_KEY_Acircumflexacute 0x1001ea4 /* U+1EA4 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */ +#define XKB_KEY_acircumflexacute 0x1001ea5 /* U+1EA5 LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */ +#define XKB_KEY_Acircumflexgrave 0x1001ea6 /* U+1EA6 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */ +#define XKB_KEY_acircumflexgrave 0x1001ea7 /* U+1EA7 LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */ +#define XKB_KEY_Acircumflexhook 0x1001ea8 /* U+1EA8 LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ +#define XKB_KEY_acircumflexhook 0x1001ea9 /* U+1EA9 LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */ +#define XKB_KEY_Acircumflextilde 0x1001eaa /* U+1EAA LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */ +#define XKB_KEY_acircumflextilde 0x1001eab /* U+1EAB LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */ +#define XKB_KEY_Acircumflexbelowdot 0x1001eac /* U+1EAC LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ +#define XKB_KEY_acircumflexbelowdot 0x1001ead /* U+1EAD LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */ +#define XKB_KEY_Abreveacute 0x1001eae /* U+1EAE LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */ +#define XKB_KEY_abreveacute 0x1001eaf /* U+1EAF LATIN SMALL LETTER A WITH BREVE AND ACUTE */ +#define XKB_KEY_Abrevegrave 0x1001eb0 /* U+1EB0 LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */ +#define XKB_KEY_abrevegrave 0x1001eb1 /* U+1EB1 LATIN SMALL LETTER A WITH BREVE AND GRAVE */ +#define XKB_KEY_Abrevehook 0x1001eb2 /* U+1EB2 LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */ +#define XKB_KEY_abrevehook 0x1001eb3 /* U+1EB3 LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */ +#define XKB_KEY_Abrevetilde 0x1001eb4 /* U+1EB4 LATIN CAPITAL LETTER A WITH BREVE AND TILDE */ +#define XKB_KEY_abrevetilde 0x1001eb5 /* U+1EB5 LATIN SMALL LETTER A WITH BREVE AND TILDE */ +#define XKB_KEY_Abrevebelowdot 0x1001eb6 /* U+1EB6 LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW */ +#define XKB_KEY_abrevebelowdot 0x1001eb7 /* U+1EB7 LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */ +#define XKB_KEY_Ebelowdot 0x1001eb8 /* U+1EB8 LATIN CAPITAL LETTER E WITH DOT BELOW */ +#define XKB_KEY_ebelowdot 0x1001eb9 /* U+1EB9 LATIN SMALL LETTER E WITH DOT BELOW */ +#define XKB_KEY_Ehook 0x1001eba /* U+1EBA LATIN CAPITAL LETTER E WITH HOOK ABOVE */ +#define XKB_KEY_ehook 0x1001ebb /* U+1EBB LATIN SMALL LETTER E WITH HOOK ABOVE */ +#define XKB_KEY_Etilde 0x1001ebc /* U+1EBC LATIN CAPITAL LETTER E WITH TILDE */ +#define XKB_KEY_etilde 0x1001ebd /* U+1EBD LATIN SMALL LETTER E WITH TILDE */ +#define XKB_KEY_Ecircumflexacute 0x1001ebe /* U+1EBE LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */ +#define XKB_KEY_ecircumflexacute 0x1001ebf /* U+1EBF LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */ +#define XKB_KEY_Ecircumflexgrave 0x1001ec0 /* U+1EC0 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */ +#define XKB_KEY_ecircumflexgrave 0x1001ec1 /* U+1EC1 LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */ +#define XKB_KEY_Ecircumflexhook 0x1001ec2 /* U+1EC2 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ +#define XKB_KEY_ecircumflexhook 0x1001ec3 /* U+1EC3 LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */ +#define XKB_KEY_Ecircumflextilde 0x1001ec4 /* U+1EC4 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */ +#define XKB_KEY_ecircumflextilde 0x1001ec5 /* U+1EC5 LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */ +#define XKB_KEY_Ecircumflexbelowdot 0x1001ec6 /* U+1EC6 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ +#define XKB_KEY_ecircumflexbelowdot 0x1001ec7 /* U+1EC7 LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */ +#define XKB_KEY_Ihook 0x1001ec8 /* U+1EC8 LATIN CAPITAL LETTER I WITH HOOK ABOVE */ +#define XKB_KEY_ihook 0x1001ec9 /* U+1EC9 LATIN SMALL LETTER I WITH HOOK ABOVE */ +#define XKB_KEY_Ibelowdot 0x1001eca /* U+1ECA LATIN CAPITAL LETTER I WITH DOT BELOW */ +#define XKB_KEY_ibelowdot 0x1001ecb /* U+1ECB LATIN SMALL LETTER I WITH DOT BELOW */ +#define XKB_KEY_Obelowdot 0x1001ecc /* U+1ECC LATIN CAPITAL LETTER O WITH DOT BELOW */ +#define XKB_KEY_obelowdot 0x1001ecd /* U+1ECD LATIN SMALL LETTER O WITH DOT BELOW */ +#define XKB_KEY_Ohook 0x1001ece /* U+1ECE LATIN CAPITAL LETTER O WITH HOOK ABOVE */ +#define XKB_KEY_ohook 0x1001ecf /* U+1ECF LATIN SMALL LETTER O WITH HOOK ABOVE */ +#define XKB_KEY_Ocircumflexacute 0x1001ed0 /* U+1ED0 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */ +#define XKB_KEY_ocircumflexacute 0x1001ed1 /* U+1ED1 LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */ +#define XKB_KEY_Ocircumflexgrave 0x1001ed2 /* U+1ED2 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */ +#define XKB_KEY_ocircumflexgrave 0x1001ed3 /* U+1ED3 LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */ +#define XKB_KEY_Ocircumflexhook 0x1001ed4 /* U+1ED4 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ +#define XKB_KEY_ocircumflexhook 0x1001ed5 /* U+1ED5 LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */ +#define XKB_KEY_Ocircumflextilde 0x1001ed6 /* U+1ED6 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */ +#define XKB_KEY_ocircumflextilde 0x1001ed7 /* U+1ED7 LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */ +#define XKB_KEY_Ocircumflexbelowdot 0x1001ed8 /* U+1ED8 LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ +#define XKB_KEY_ocircumflexbelowdot 0x1001ed9 /* U+1ED9 LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */ +#define XKB_KEY_Ohornacute 0x1001eda /* U+1EDA LATIN CAPITAL LETTER O WITH HORN AND ACUTE */ +#define XKB_KEY_ohornacute 0x1001edb /* U+1EDB LATIN SMALL LETTER O WITH HORN AND ACUTE */ +#define XKB_KEY_Ohorngrave 0x1001edc /* U+1EDC LATIN CAPITAL LETTER O WITH HORN AND GRAVE */ +#define XKB_KEY_ohorngrave 0x1001edd /* U+1EDD LATIN SMALL LETTER O WITH HORN AND GRAVE */ +#define XKB_KEY_Ohornhook 0x1001ede /* U+1EDE LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE */ +#define XKB_KEY_ohornhook 0x1001edf /* U+1EDF LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */ +#define XKB_KEY_Ohorntilde 0x1001ee0 /* U+1EE0 LATIN CAPITAL LETTER O WITH HORN AND TILDE */ +#define XKB_KEY_ohorntilde 0x1001ee1 /* U+1EE1 LATIN SMALL LETTER O WITH HORN AND TILDE */ +#define XKB_KEY_Ohornbelowdot 0x1001ee2 /* U+1EE2 LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW */ +#define XKB_KEY_ohornbelowdot 0x1001ee3 /* U+1EE3 LATIN SMALL LETTER O WITH HORN AND DOT BELOW */ +#define XKB_KEY_Ubelowdot 0x1001ee4 /* U+1EE4 LATIN CAPITAL LETTER U WITH DOT BELOW */ +#define XKB_KEY_ubelowdot 0x1001ee5 /* U+1EE5 LATIN SMALL LETTER U WITH DOT BELOW */ +#define XKB_KEY_Uhook 0x1001ee6 /* U+1EE6 LATIN CAPITAL LETTER U WITH HOOK ABOVE */ +#define XKB_KEY_uhook 0x1001ee7 /* U+1EE7 LATIN SMALL LETTER U WITH HOOK ABOVE */ +#define XKB_KEY_Uhornacute 0x1001ee8 /* U+1EE8 LATIN CAPITAL LETTER U WITH HORN AND ACUTE */ +#define XKB_KEY_uhornacute 0x1001ee9 /* U+1EE9 LATIN SMALL LETTER U WITH HORN AND ACUTE */ +#define XKB_KEY_Uhorngrave 0x1001eea /* U+1EEA LATIN CAPITAL LETTER U WITH HORN AND GRAVE */ +#define XKB_KEY_uhorngrave 0x1001eeb /* U+1EEB LATIN SMALL LETTER U WITH HORN AND GRAVE */ +#define XKB_KEY_Uhornhook 0x1001eec /* U+1EEC LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE */ +#define XKB_KEY_uhornhook 0x1001eed /* U+1EED LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */ +#define XKB_KEY_Uhorntilde 0x1001eee /* U+1EEE LATIN CAPITAL LETTER U WITH HORN AND TILDE */ +#define XKB_KEY_uhorntilde 0x1001eef /* U+1EEF LATIN SMALL LETTER U WITH HORN AND TILDE */ +#define XKB_KEY_Uhornbelowdot 0x1001ef0 /* U+1EF0 LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW */ +#define XKB_KEY_uhornbelowdot 0x1001ef1 /* U+1EF1 LATIN SMALL LETTER U WITH HORN AND DOT BELOW */ +#define XKB_KEY_Ybelowdot 0x1001ef4 /* U+1EF4 LATIN CAPITAL LETTER Y WITH DOT BELOW */ +#define XKB_KEY_ybelowdot 0x1001ef5 /* U+1EF5 LATIN SMALL LETTER Y WITH DOT BELOW */ +#define XKB_KEY_Yhook 0x1001ef6 /* U+1EF6 LATIN CAPITAL LETTER Y WITH HOOK ABOVE */ +#define XKB_KEY_yhook 0x1001ef7 /* U+1EF7 LATIN SMALL LETTER Y WITH HOOK ABOVE */ +#define XKB_KEY_Ytilde 0x1001ef8 /* U+1EF8 LATIN CAPITAL LETTER Y WITH TILDE */ +#define XKB_KEY_ytilde 0x1001ef9 /* U+1EF9 LATIN SMALL LETTER Y WITH TILDE */ +#define XKB_KEY_Ohorn 0x10001a0 /* U+01A0 LATIN CAPITAL LETTER O WITH HORN */ +#define XKB_KEY_ohorn 0x10001a1 /* U+01A1 LATIN SMALL LETTER O WITH HORN */ +#define XKB_KEY_Uhorn 0x10001af /* U+01AF LATIN CAPITAL LETTER U WITH HORN */ +#define XKB_KEY_uhorn 0x10001b0 /* U+01B0 LATIN SMALL LETTER U WITH HORN */ +#define XKB_KEY_combining_tilde 0x1000303 /* U+0303 COMBINING TILDE */ +#define XKB_KEY_combining_grave 0x1000300 /* U+0300 COMBINING GRAVE ACCENT */ +#define XKB_KEY_combining_acute 0x1000301 /* U+0301 COMBINING ACUTE ACCENT */ +#define XKB_KEY_combining_hook 0x1000309 /* U+0309 COMBINING HOOK ABOVE */ +#define XKB_KEY_combining_belowdot 0x1000323 /* U+0323 COMBINING DOT BELOW */ + + +#define XKB_KEY_EcuSign 0x10020a0 /* U+20A0 EURO-CURRENCY SIGN */ +#define XKB_KEY_ColonSign 0x10020a1 /* U+20A1 COLON SIGN */ +#define XKB_KEY_CruzeiroSign 0x10020a2 /* U+20A2 CRUZEIRO SIGN */ +#define XKB_KEY_FFrancSign 0x10020a3 /* U+20A3 FRENCH FRANC SIGN */ +#define XKB_KEY_LiraSign 0x10020a4 /* U+20A4 LIRA SIGN */ +#define XKB_KEY_MillSign 0x10020a5 /* U+20A5 MILL SIGN */ +#define XKB_KEY_NairaSign 0x10020a6 /* U+20A6 NAIRA SIGN */ +#define XKB_KEY_PesetaSign 0x10020a7 /* U+20A7 PESETA SIGN */ +#define XKB_KEY_RupeeSign 0x10020a8 /* U+20A8 RUPEE SIGN */ +#define XKB_KEY_WonSign 0x10020a9 /* U+20A9 WON SIGN */ +#define XKB_KEY_NewSheqelSign 0x10020aa /* U+20AA NEW SHEQEL SIGN */ +#define XKB_KEY_DongSign 0x10020ab /* U+20AB DONG SIGN */ +#define XKB_KEY_EuroSign 0x20ac /* U+20AC EURO SIGN */ + +/* one, two and three are defined above. */ +#define XKB_KEY_zerosuperior 0x1002070 /* U+2070 SUPERSCRIPT ZERO */ +#define XKB_KEY_foursuperior 0x1002074 /* U+2074 SUPERSCRIPT FOUR */ +#define XKB_KEY_fivesuperior 0x1002075 /* U+2075 SUPERSCRIPT FIVE */ +#define XKB_KEY_sixsuperior 0x1002076 /* U+2076 SUPERSCRIPT SIX */ +#define XKB_KEY_sevensuperior 0x1002077 /* U+2077 SUPERSCRIPT SEVEN */ +#define XKB_KEY_eightsuperior 0x1002078 /* U+2078 SUPERSCRIPT EIGHT */ +#define XKB_KEY_ninesuperior 0x1002079 /* U+2079 SUPERSCRIPT NINE */ +#define XKB_KEY_zerosubscript 0x1002080 /* U+2080 SUBSCRIPT ZERO */ +#define XKB_KEY_onesubscript 0x1002081 /* U+2081 SUBSCRIPT ONE */ +#define XKB_KEY_twosubscript 0x1002082 /* U+2082 SUBSCRIPT TWO */ +#define XKB_KEY_threesubscript 0x1002083 /* U+2083 SUBSCRIPT THREE */ +#define XKB_KEY_foursubscript 0x1002084 /* U+2084 SUBSCRIPT FOUR */ +#define XKB_KEY_fivesubscript 0x1002085 /* U+2085 SUBSCRIPT FIVE */ +#define XKB_KEY_sixsubscript 0x1002086 /* U+2086 SUBSCRIPT SIX */ +#define XKB_KEY_sevensubscript 0x1002087 /* U+2087 SUBSCRIPT SEVEN */ +#define XKB_KEY_eightsubscript 0x1002088 /* U+2088 SUBSCRIPT EIGHT */ +#define XKB_KEY_ninesubscript 0x1002089 /* U+2089 SUBSCRIPT NINE */ +#define XKB_KEY_partdifferential 0x1002202 /* U+2202 PARTIAL DIFFERENTIAL */ +#define XKB_KEY_emptyset 0x1002205 /* U+2205 EMPTY SET */ +#define XKB_KEY_elementof 0x1002208 /* U+2208 ELEMENT OF */ +#define XKB_KEY_notelementof 0x1002209 /* U+2209 NOT AN ELEMENT OF */ +#define XKB_KEY_containsas 0x100220b /* U+220B CONTAINS AS MEMBER */ +#define XKB_KEY_squareroot 0x100221a /* U+221A SQUARE ROOT */ +#define XKB_KEY_cuberoot 0x100221b /* U+221B CUBE ROOT */ +#define XKB_KEY_fourthroot 0x100221c /* U+221C FOURTH ROOT */ +#define XKB_KEY_dintegral 0x100222c /* U+222C DOUBLE INTEGRAL */ +#define XKB_KEY_tintegral 0x100222d /* U+222D TRIPLE INTEGRAL */ +#define XKB_KEY_because 0x1002235 /* U+2235 BECAUSE */ +#define XKB_KEY_approxeq 0x1002248 /*(U+2248 ALMOST EQUAL TO)*/ +#define XKB_KEY_notapproxeq 0x1002247 /*(U+2247 NEITHER APPROXIMATELY NOR ACTUALLY EQUAL TO)*/ +#define XKB_KEY_notidentical 0x1002262 /* U+2262 NOT IDENTICAL TO */ +#define XKB_KEY_stricteq 0x1002263 /* U+2263 STRICTLY EQUIVALENT TO */ + +#define XKB_KEY_braille_dot_1 0xfff1 +#define XKB_KEY_braille_dot_2 0xfff2 +#define XKB_KEY_braille_dot_3 0xfff3 +#define XKB_KEY_braille_dot_4 0xfff4 +#define XKB_KEY_braille_dot_5 0xfff5 +#define XKB_KEY_braille_dot_6 0xfff6 +#define XKB_KEY_braille_dot_7 0xfff7 +#define XKB_KEY_braille_dot_8 0xfff8 +#define XKB_KEY_braille_dot_9 0xfff9 +#define XKB_KEY_braille_dot_10 0xfffa +#define XKB_KEY_braille_blank 0x1002800 /* U+2800 BRAILLE PATTERN BLANK */ +#define XKB_KEY_braille_dots_1 0x1002801 /* U+2801 BRAILLE PATTERN DOTS-1 */ +#define XKB_KEY_braille_dots_2 0x1002802 /* U+2802 BRAILLE PATTERN DOTS-2 */ +#define XKB_KEY_braille_dots_12 0x1002803 /* U+2803 BRAILLE PATTERN DOTS-12 */ +#define XKB_KEY_braille_dots_3 0x1002804 /* U+2804 BRAILLE PATTERN DOTS-3 */ +#define XKB_KEY_braille_dots_13 0x1002805 /* U+2805 BRAILLE PATTERN DOTS-13 */ +#define XKB_KEY_braille_dots_23 0x1002806 /* U+2806 BRAILLE PATTERN DOTS-23 */ +#define XKB_KEY_braille_dots_123 0x1002807 /* U+2807 BRAILLE PATTERN DOTS-123 */ +#define XKB_KEY_braille_dots_4 0x1002808 /* U+2808 BRAILLE PATTERN DOTS-4 */ +#define XKB_KEY_braille_dots_14 0x1002809 /* U+2809 BRAILLE PATTERN DOTS-14 */ +#define XKB_KEY_braille_dots_24 0x100280a /* U+280A BRAILLE PATTERN DOTS-24 */ +#define XKB_KEY_braille_dots_124 0x100280b /* U+280B BRAILLE PATTERN DOTS-124 */ +#define XKB_KEY_braille_dots_34 0x100280c /* U+280C BRAILLE PATTERN DOTS-34 */ +#define XKB_KEY_braille_dots_134 0x100280d /* U+280D BRAILLE PATTERN DOTS-134 */ +#define XKB_KEY_braille_dots_234 0x100280e /* U+280E BRAILLE PATTERN DOTS-234 */ +#define XKB_KEY_braille_dots_1234 0x100280f /* U+280F BRAILLE PATTERN DOTS-1234 */ +#define XKB_KEY_braille_dots_5 0x1002810 /* U+2810 BRAILLE PATTERN DOTS-5 */ +#define XKB_KEY_braille_dots_15 0x1002811 /* U+2811 BRAILLE PATTERN DOTS-15 */ +#define XKB_KEY_braille_dots_25 0x1002812 /* U+2812 BRAILLE PATTERN DOTS-25 */ +#define XKB_KEY_braille_dots_125 0x1002813 /* U+2813 BRAILLE PATTERN DOTS-125 */ +#define XKB_KEY_braille_dots_35 0x1002814 /* U+2814 BRAILLE PATTERN DOTS-35 */ +#define XKB_KEY_braille_dots_135 0x1002815 /* U+2815 BRAILLE PATTERN DOTS-135 */ +#define XKB_KEY_braille_dots_235 0x1002816 /* U+2816 BRAILLE PATTERN DOTS-235 */ +#define XKB_KEY_braille_dots_1235 0x1002817 /* U+2817 BRAILLE PATTERN DOTS-1235 */ +#define XKB_KEY_braille_dots_45 0x1002818 /* U+2818 BRAILLE PATTERN DOTS-45 */ +#define XKB_KEY_braille_dots_145 0x1002819 /* U+2819 BRAILLE PATTERN DOTS-145 */ +#define XKB_KEY_braille_dots_245 0x100281a /* U+281A BRAILLE PATTERN DOTS-245 */ +#define XKB_KEY_braille_dots_1245 0x100281b /* U+281B BRAILLE PATTERN DOTS-1245 */ +#define XKB_KEY_braille_dots_345 0x100281c /* U+281C BRAILLE PATTERN DOTS-345 */ +#define XKB_KEY_braille_dots_1345 0x100281d /* U+281D BRAILLE PATTERN DOTS-1345 */ +#define XKB_KEY_braille_dots_2345 0x100281e /* U+281E BRAILLE PATTERN DOTS-2345 */ +#define XKB_KEY_braille_dots_12345 0x100281f /* U+281F BRAILLE PATTERN DOTS-12345 */ +#define XKB_KEY_braille_dots_6 0x1002820 /* U+2820 BRAILLE PATTERN DOTS-6 */ +#define XKB_KEY_braille_dots_16 0x1002821 /* U+2821 BRAILLE PATTERN DOTS-16 */ +#define XKB_KEY_braille_dots_26 0x1002822 /* U+2822 BRAILLE PATTERN DOTS-26 */ +#define XKB_KEY_braille_dots_126 0x1002823 /* U+2823 BRAILLE PATTERN DOTS-126 */ +#define XKB_KEY_braille_dots_36 0x1002824 /* U+2824 BRAILLE PATTERN DOTS-36 */ +#define XKB_KEY_braille_dots_136 0x1002825 /* U+2825 BRAILLE PATTERN DOTS-136 */ +#define XKB_KEY_braille_dots_236 0x1002826 /* U+2826 BRAILLE PATTERN DOTS-236 */ +#define XKB_KEY_braille_dots_1236 0x1002827 /* U+2827 BRAILLE PATTERN DOTS-1236 */ +#define XKB_KEY_braille_dots_46 0x1002828 /* U+2828 BRAILLE PATTERN DOTS-46 */ +#define XKB_KEY_braille_dots_146 0x1002829 /* U+2829 BRAILLE PATTERN DOTS-146 */ +#define XKB_KEY_braille_dots_246 0x100282a /* U+282A BRAILLE PATTERN DOTS-246 */ +#define XKB_KEY_braille_dots_1246 0x100282b /* U+282B BRAILLE PATTERN DOTS-1246 */ +#define XKB_KEY_braille_dots_346 0x100282c /* U+282C BRAILLE PATTERN DOTS-346 */ +#define XKB_KEY_braille_dots_1346 0x100282d /* U+282D BRAILLE PATTERN DOTS-1346 */ +#define XKB_KEY_braille_dots_2346 0x100282e /* U+282E BRAILLE PATTERN DOTS-2346 */ +#define XKB_KEY_braille_dots_12346 0x100282f /* U+282F BRAILLE PATTERN DOTS-12346 */ +#define XKB_KEY_braille_dots_56 0x1002830 /* U+2830 BRAILLE PATTERN DOTS-56 */ +#define XKB_KEY_braille_dots_156 0x1002831 /* U+2831 BRAILLE PATTERN DOTS-156 */ +#define XKB_KEY_braille_dots_256 0x1002832 /* U+2832 BRAILLE PATTERN DOTS-256 */ +#define XKB_KEY_braille_dots_1256 0x1002833 /* U+2833 BRAILLE PATTERN DOTS-1256 */ +#define XKB_KEY_braille_dots_356 0x1002834 /* U+2834 BRAILLE PATTERN DOTS-356 */ +#define XKB_KEY_braille_dots_1356 0x1002835 /* U+2835 BRAILLE PATTERN DOTS-1356 */ +#define XKB_KEY_braille_dots_2356 0x1002836 /* U+2836 BRAILLE PATTERN DOTS-2356 */ +#define XKB_KEY_braille_dots_12356 0x1002837 /* U+2837 BRAILLE PATTERN DOTS-12356 */ +#define XKB_KEY_braille_dots_456 0x1002838 /* U+2838 BRAILLE PATTERN DOTS-456 */ +#define XKB_KEY_braille_dots_1456 0x1002839 /* U+2839 BRAILLE PATTERN DOTS-1456 */ +#define XKB_KEY_braille_dots_2456 0x100283a /* U+283A BRAILLE PATTERN DOTS-2456 */ +#define XKB_KEY_braille_dots_12456 0x100283b /* U+283B BRAILLE PATTERN DOTS-12456 */ +#define XKB_KEY_braille_dots_3456 0x100283c /* U+283C BRAILLE PATTERN DOTS-3456 */ +#define XKB_KEY_braille_dots_13456 0x100283d /* U+283D BRAILLE PATTERN DOTS-13456 */ +#define XKB_KEY_braille_dots_23456 0x100283e /* U+283E BRAILLE PATTERN DOTS-23456 */ +#define XKB_KEY_braille_dots_123456 0x100283f /* U+283F BRAILLE PATTERN DOTS-123456 */ +#define XKB_KEY_braille_dots_7 0x1002840 /* U+2840 BRAILLE PATTERN DOTS-7 */ +#define XKB_KEY_braille_dots_17 0x1002841 /* U+2841 BRAILLE PATTERN DOTS-17 */ +#define XKB_KEY_braille_dots_27 0x1002842 /* U+2842 BRAILLE PATTERN DOTS-27 */ +#define XKB_KEY_braille_dots_127 0x1002843 /* U+2843 BRAILLE PATTERN DOTS-127 */ +#define XKB_KEY_braille_dots_37 0x1002844 /* U+2844 BRAILLE PATTERN DOTS-37 */ +#define XKB_KEY_braille_dots_137 0x1002845 /* U+2845 BRAILLE PATTERN DOTS-137 */ +#define XKB_KEY_braille_dots_237 0x1002846 /* U+2846 BRAILLE PATTERN DOTS-237 */ +#define XKB_KEY_braille_dots_1237 0x1002847 /* U+2847 BRAILLE PATTERN DOTS-1237 */ +#define XKB_KEY_braille_dots_47 0x1002848 /* U+2848 BRAILLE PATTERN DOTS-47 */ +#define XKB_KEY_braille_dots_147 0x1002849 /* U+2849 BRAILLE PATTERN DOTS-147 */ +#define XKB_KEY_braille_dots_247 0x100284a /* U+284A BRAILLE PATTERN DOTS-247 */ +#define XKB_KEY_braille_dots_1247 0x100284b /* U+284B BRAILLE PATTERN DOTS-1247 */ +#define XKB_KEY_braille_dots_347 0x100284c /* U+284C BRAILLE PATTERN DOTS-347 */ +#define XKB_KEY_braille_dots_1347 0x100284d /* U+284D BRAILLE PATTERN DOTS-1347 */ +#define XKB_KEY_braille_dots_2347 0x100284e /* U+284E BRAILLE PATTERN DOTS-2347 */ +#define XKB_KEY_braille_dots_12347 0x100284f /* U+284F BRAILLE PATTERN DOTS-12347 */ +#define XKB_KEY_braille_dots_57 0x1002850 /* U+2850 BRAILLE PATTERN DOTS-57 */ +#define XKB_KEY_braille_dots_157 0x1002851 /* U+2851 BRAILLE PATTERN DOTS-157 */ +#define XKB_KEY_braille_dots_257 0x1002852 /* U+2852 BRAILLE PATTERN DOTS-257 */ +#define XKB_KEY_braille_dots_1257 0x1002853 /* U+2853 BRAILLE PATTERN DOTS-1257 */ +#define XKB_KEY_braille_dots_357 0x1002854 /* U+2854 BRAILLE PATTERN DOTS-357 */ +#define XKB_KEY_braille_dots_1357 0x1002855 /* U+2855 BRAILLE PATTERN DOTS-1357 */ +#define XKB_KEY_braille_dots_2357 0x1002856 /* U+2856 BRAILLE PATTERN DOTS-2357 */ +#define XKB_KEY_braille_dots_12357 0x1002857 /* U+2857 BRAILLE PATTERN DOTS-12357 */ +#define XKB_KEY_braille_dots_457 0x1002858 /* U+2858 BRAILLE PATTERN DOTS-457 */ +#define XKB_KEY_braille_dots_1457 0x1002859 /* U+2859 BRAILLE PATTERN DOTS-1457 */ +#define XKB_KEY_braille_dots_2457 0x100285a /* U+285A BRAILLE PATTERN DOTS-2457 */ +#define XKB_KEY_braille_dots_12457 0x100285b /* U+285B BRAILLE PATTERN DOTS-12457 */ +#define XKB_KEY_braille_dots_3457 0x100285c /* U+285C BRAILLE PATTERN DOTS-3457 */ +#define XKB_KEY_braille_dots_13457 0x100285d /* U+285D BRAILLE PATTERN DOTS-13457 */ +#define XKB_KEY_braille_dots_23457 0x100285e /* U+285E BRAILLE PATTERN DOTS-23457 */ +#define XKB_KEY_braille_dots_123457 0x100285f /* U+285F BRAILLE PATTERN DOTS-123457 */ +#define XKB_KEY_braille_dots_67 0x1002860 /* U+2860 BRAILLE PATTERN DOTS-67 */ +#define XKB_KEY_braille_dots_167 0x1002861 /* U+2861 BRAILLE PATTERN DOTS-167 */ +#define XKB_KEY_braille_dots_267 0x1002862 /* U+2862 BRAILLE PATTERN DOTS-267 */ +#define XKB_KEY_braille_dots_1267 0x1002863 /* U+2863 BRAILLE PATTERN DOTS-1267 */ +#define XKB_KEY_braille_dots_367 0x1002864 /* U+2864 BRAILLE PATTERN DOTS-367 */ +#define XKB_KEY_braille_dots_1367 0x1002865 /* U+2865 BRAILLE PATTERN DOTS-1367 */ +#define XKB_KEY_braille_dots_2367 0x1002866 /* U+2866 BRAILLE PATTERN DOTS-2367 */ +#define XKB_KEY_braille_dots_12367 0x1002867 /* U+2867 BRAILLE PATTERN DOTS-12367 */ +#define XKB_KEY_braille_dots_467 0x1002868 /* U+2868 BRAILLE PATTERN DOTS-467 */ +#define XKB_KEY_braille_dots_1467 0x1002869 /* U+2869 BRAILLE PATTERN DOTS-1467 */ +#define XKB_KEY_braille_dots_2467 0x100286a /* U+286A BRAILLE PATTERN DOTS-2467 */ +#define XKB_KEY_braille_dots_12467 0x100286b /* U+286B BRAILLE PATTERN DOTS-12467 */ +#define XKB_KEY_braille_dots_3467 0x100286c /* U+286C BRAILLE PATTERN DOTS-3467 */ +#define XKB_KEY_braille_dots_13467 0x100286d /* U+286D BRAILLE PATTERN DOTS-13467 */ +#define XKB_KEY_braille_dots_23467 0x100286e /* U+286E BRAILLE PATTERN DOTS-23467 */ +#define XKB_KEY_braille_dots_123467 0x100286f /* U+286F BRAILLE PATTERN DOTS-123467 */ +#define XKB_KEY_braille_dots_567 0x1002870 /* U+2870 BRAILLE PATTERN DOTS-567 */ +#define XKB_KEY_braille_dots_1567 0x1002871 /* U+2871 BRAILLE PATTERN DOTS-1567 */ +#define XKB_KEY_braille_dots_2567 0x1002872 /* U+2872 BRAILLE PATTERN DOTS-2567 */ +#define XKB_KEY_braille_dots_12567 0x1002873 /* U+2873 BRAILLE PATTERN DOTS-12567 */ +#define XKB_KEY_braille_dots_3567 0x1002874 /* U+2874 BRAILLE PATTERN DOTS-3567 */ +#define XKB_KEY_braille_dots_13567 0x1002875 /* U+2875 BRAILLE PATTERN DOTS-13567 */ +#define XKB_KEY_braille_dots_23567 0x1002876 /* U+2876 BRAILLE PATTERN DOTS-23567 */ +#define XKB_KEY_braille_dots_123567 0x1002877 /* U+2877 BRAILLE PATTERN DOTS-123567 */ +#define XKB_KEY_braille_dots_4567 0x1002878 /* U+2878 BRAILLE PATTERN DOTS-4567 */ +#define XKB_KEY_braille_dots_14567 0x1002879 /* U+2879 BRAILLE PATTERN DOTS-14567 */ +#define XKB_KEY_braille_dots_24567 0x100287a /* U+287A BRAILLE PATTERN DOTS-24567 */ +#define XKB_KEY_braille_dots_124567 0x100287b /* U+287B BRAILLE PATTERN DOTS-124567 */ +#define XKB_KEY_braille_dots_34567 0x100287c /* U+287C BRAILLE PATTERN DOTS-34567 */ +#define XKB_KEY_braille_dots_134567 0x100287d /* U+287D BRAILLE PATTERN DOTS-134567 */ +#define XKB_KEY_braille_dots_234567 0x100287e /* U+287E BRAILLE PATTERN DOTS-234567 */ +#define XKB_KEY_braille_dots_1234567 0x100287f /* U+287F BRAILLE PATTERN DOTS-1234567 */ +#define XKB_KEY_braille_dots_8 0x1002880 /* U+2880 BRAILLE PATTERN DOTS-8 */ +#define XKB_KEY_braille_dots_18 0x1002881 /* U+2881 BRAILLE PATTERN DOTS-18 */ +#define XKB_KEY_braille_dots_28 0x1002882 /* U+2882 BRAILLE PATTERN DOTS-28 */ +#define XKB_KEY_braille_dots_128 0x1002883 /* U+2883 BRAILLE PATTERN DOTS-128 */ +#define XKB_KEY_braille_dots_38 0x1002884 /* U+2884 BRAILLE PATTERN DOTS-38 */ +#define XKB_KEY_braille_dots_138 0x1002885 /* U+2885 BRAILLE PATTERN DOTS-138 */ +#define XKB_KEY_braille_dots_238 0x1002886 /* U+2886 BRAILLE PATTERN DOTS-238 */ +#define XKB_KEY_braille_dots_1238 0x1002887 /* U+2887 BRAILLE PATTERN DOTS-1238 */ +#define XKB_KEY_braille_dots_48 0x1002888 /* U+2888 BRAILLE PATTERN DOTS-48 */ +#define XKB_KEY_braille_dots_148 0x1002889 /* U+2889 BRAILLE PATTERN DOTS-148 */ +#define XKB_KEY_braille_dots_248 0x100288a /* U+288A BRAILLE PATTERN DOTS-248 */ +#define XKB_KEY_braille_dots_1248 0x100288b /* U+288B BRAILLE PATTERN DOTS-1248 */ +#define XKB_KEY_braille_dots_348 0x100288c /* U+288C BRAILLE PATTERN DOTS-348 */ +#define XKB_KEY_braille_dots_1348 0x100288d /* U+288D BRAILLE PATTERN DOTS-1348 */ +#define XKB_KEY_braille_dots_2348 0x100288e /* U+288E BRAILLE PATTERN DOTS-2348 */ +#define XKB_KEY_braille_dots_12348 0x100288f /* U+288F BRAILLE PATTERN DOTS-12348 */ +#define XKB_KEY_braille_dots_58 0x1002890 /* U+2890 BRAILLE PATTERN DOTS-58 */ +#define XKB_KEY_braille_dots_158 0x1002891 /* U+2891 BRAILLE PATTERN DOTS-158 */ +#define XKB_KEY_braille_dots_258 0x1002892 /* U+2892 BRAILLE PATTERN DOTS-258 */ +#define XKB_KEY_braille_dots_1258 0x1002893 /* U+2893 BRAILLE PATTERN DOTS-1258 */ +#define XKB_KEY_braille_dots_358 0x1002894 /* U+2894 BRAILLE PATTERN DOTS-358 */ +#define XKB_KEY_braille_dots_1358 0x1002895 /* U+2895 BRAILLE PATTERN DOTS-1358 */ +#define XKB_KEY_braille_dots_2358 0x1002896 /* U+2896 BRAILLE PATTERN DOTS-2358 */ +#define XKB_KEY_braille_dots_12358 0x1002897 /* U+2897 BRAILLE PATTERN DOTS-12358 */ +#define XKB_KEY_braille_dots_458 0x1002898 /* U+2898 BRAILLE PATTERN DOTS-458 */ +#define XKB_KEY_braille_dots_1458 0x1002899 /* U+2899 BRAILLE PATTERN DOTS-1458 */ +#define XKB_KEY_braille_dots_2458 0x100289a /* U+289A BRAILLE PATTERN DOTS-2458 */ +#define XKB_KEY_braille_dots_12458 0x100289b /* U+289B BRAILLE PATTERN DOTS-12458 */ +#define XKB_KEY_braille_dots_3458 0x100289c /* U+289C BRAILLE PATTERN DOTS-3458 */ +#define XKB_KEY_braille_dots_13458 0x100289d /* U+289D BRAILLE PATTERN DOTS-13458 */ +#define XKB_KEY_braille_dots_23458 0x100289e /* U+289E BRAILLE PATTERN DOTS-23458 */ +#define XKB_KEY_braille_dots_123458 0x100289f /* U+289F BRAILLE PATTERN DOTS-123458 */ +#define XKB_KEY_braille_dots_68 0x10028a0 /* U+28A0 BRAILLE PATTERN DOTS-68 */ +#define XKB_KEY_braille_dots_168 0x10028a1 /* U+28A1 BRAILLE PATTERN DOTS-168 */ +#define XKB_KEY_braille_dots_268 0x10028a2 /* U+28A2 BRAILLE PATTERN DOTS-268 */ +#define XKB_KEY_braille_dots_1268 0x10028a3 /* U+28A3 BRAILLE PATTERN DOTS-1268 */ +#define XKB_KEY_braille_dots_368 0x10028a4 /* U+28A4 BRAILLE PATTERN DOTS-368 */ +#define XKB_KEY_braille_dots_1368 0x10028a5 /* U+28A5 BRAILLE PATTERN DOTS-1368 */ +#define XKB_KEY_braille_dots_2368 0x10028a6 /* U+28A6 BRAILLE PATTERN DOTS-2368 */ +#define XKB_KEY_braille_dots_12368 0x10028a7 /* U+28A7 BRAILLE PATTERN DOTS-12368 */ +#define XKB_KEY_braille_dots_468 0x10028a8 /* U+28A8 BRAILLE PATTERN DOTS-468 */ +#define XKB_KEY_braille_dots_1468 0x10028a9 /* U+28A9 BRAILLE PATTERN DOTS-1468 */ +#define XKB_KEY_braille_dots_2468 0x10028aa /* U+28AA BRAILLE PATTERN DOTS-2468 */ +#define XKB_KEY_braille_dots_12468 0x10028ab /* U+28AB BRAILLE PATTERN DOTS-12468 */ +#define XKB_KEY_braille_dots_3468 0x10028ac /* U+28AC BRAILLE PATTERN DOTS-3468 */ +#define XKB_KEY_braille_dots_13468 0x10028ad /* U+28AD BRAILLE PATTERN DOTS-13468 */ +#define XKB_KEY_braille_dots_23468 0x10028ae /* U+28AE BRAILLE PATTERN DOTS-23468 */ +#define XKB_KEY_braille_dots_123468 0x10028af /* U+28AF BRAILLE PATTERN DOTS-123468 */ +#define XKB_KEY_braille_dots_568 0x10028b0 /* U+28B0 BRAILLE PATTERN DOTS-568 */ +#define XKB_KEY_braille_dots_1568 0x10028b1 /* U+28B1 BRAILLE PATTERN DOTS-1568 */ +#define XKB_KEY_braille_dots_2568 0x10028b2 /* U+28B2 BRAILLE PATTERN DOTS-2568 */ +#define XKB_KEY_braille_dots_12568 0x10028b3 /* U+28B3 BRAILLE PATTERN DOTS-12568 */ +#define XKB_KEY_braille_dots_3568 0x10028b4 /* U+28B4 BRAILLE PATTERN DOTS-3568 */ +#define XKB_KEY_braille_dots_13568 0x10028b5 /* U+28B5 BRAILLE PATTERN DOTS-13568 */ +#define XKB_KEY_braille_dots_23568 0x10028b6 /* U+28B6 BRAILLE PATTERN DOTS-23568 */ +#define XKB_KEY_braille_dots_123568 0x10028b7 /* U+28B7 BRAILLE PATTERN DOTS-123568 */ +#define XKB_KEY_braille_dots_4568 0x10028b8 /* U+28B8 BRAILLE PATTERN DOTS-4568 */ +#define XKB_KEY_braille_dots_14568 0x10028b9 /* U+28B9 BRAILLE PATTERN DOTS-14568 */ +#define XKB_KEY_braille_dots_24568 0x10028ba /* U+28BA BRAILLE PATTERN DOTS-24568 */ +#define XKB_KEY_braille_dots_124568 0x10028bb /* U+28BB BRAILLE PATTERN DOTS-124568 */ +#define XKB_KEY_braille_dots_34568 0x10028bc /* U+28BC BRAILLE PATTERN DOTS-34568 */ +#define XKB_KEY_braille_dots_134568 0x10028bd /* U+28BD BRAILLE PATTERN DOTS-134568 */ +#define XKB_KEY_braille_dots_234568 0x10028be /* U+28BE BRAILLE PATTERN DOTS-234568 */ +#define XKB_KEY_braille_dots_1234568 0x10028bf /* U+28BF BRAILLE PATTERN DOTS-1234568 */ +#define XKB_KEY_braille_dots_78 0x10028c0 /* U+28C0 BRAILLE PATTERN DOTS-78 */ +#define XKB_KEY_braille_dots_178 0x10028c1 /* U+28C1 BRAILLE PATTERN DOTS-178 */ +#define XKB_KEY_braille_dots_278 0x10028c2 /* U+28C2 BRAILLE PATTERN DOTS-278 */ +#define XKB_KEY_braille_dots_1278 0x10028c3 /* U+28C3 BRAILLE PATTERN DOTS-1278 */ +#define XKB_KEY_braille_dots_378 0x10028c4 /* U+28C4 BRAILLE PATTERN DOTS-378 */ +#define XKB_KEY_braille_dots_1378 0x10028c5 /* U+28C5 BRAILLE PATTERN DOTS-1378 */ +#define XKB_KEY_braille_dots_2378 0x10028c6 /* U+28C6 BRAILLE PATTERN DOTS-2378 */ +#define XKB_KEY_braille_dots_12378 0x10028c7 /* U+28C7 BRAILLE PATTERN DOTS-12378 */ +#define XKB_KEY_braille_dots_478 0x10028c8 /* U+28C8 BRAILLE PATTERN DOTS-478 */ +#define XKB_KEY_braille_dots_1478 0x10028c9 /* U+28C9 BRAILLE PATTERN DOTS-1478 */ +#define XKB_KEY_braille_dots_2478 0x10028ca /* U+28CA BRAILLE PATTERN DOTS-2478 */ +#define XKB_KEY_braille_dots_12478 0x10028cb /* U+28CB BRAILLE PATTERN DOTS-12478 */ +#define XKB_KEY_braille_dots_3478 0x10028cc /* U+28CC BRAILLE PATTERN DOTS-3478 */ +#define XKB_KEY_braille_dots_13478 0x10028cd /* U+28CD BRAILLE PATTERN DOTS-13478 */ +#define XKB_KEY_braille_dots_23478 0x10028ce /* U+28CE BRAILLE PATTERN DOTS-23478 */ +#define XKB_KEY_braille_dots_123478 0x10028cf /* U+28CF BRAILLE PATTERN DOTS-123478 */ +#define XKB_KEY_braille_dots_578 0x10028d0 /* U+28D0 BRAILLE PATTERN DOTS-578 */ +#define XKB_KEY_braille_dots_1578 0x10028d1 /* U+28D1 BRAILLE PATTERN DOTS-1578 */ +#define XKB_KEY_braille_dots_2578 0x10028d2 /* U+28D2 BRAILLE PATTERN DOTS-2578 */ +#define XKB_KEY_braille_dots_12578 0x10028d3 /* U+28D3 BRAILLE PATTERN DOTS-12578 */ +#define XKB_KEY_braille_dots_3578 0x10028d4 /* U+28D4 BRAILLE PATTERN DOTS-3578 */ +#define XKB_KEY_braille_dots_13578 0x10028d5 /* U+28D5 BRAILLE PATTERN DOTS-13578 */ +#define XKB_KEY_braille_dots_23578 0x10028d6 /* U+28D6 BRAILLE PATTERN DOTS-23578 */ +#define XKB_KEY_braille_dots_123578 0x10028d7 /* U+28D7 BRAILLE PATTERN DOTS-123578 */ +#define XKB_KEY_braille_dots_4578 0x10028d8 /* U+28D8 BRAILLE PATTERN DOTS-4578 */ +#define XKB_KEY_braille_dots_14578 0x10028d9 /* U+28D9 BRAILLE PATTERN DOTS-14578 */ +#define XKB_KEY_braille_dots_24578 0x10028da /* U+28DA BRAILLE PATTERN DOTS-24578 */ +#define XKB_KEY_braille_dots_124578 0x10028db /* U+28DB BRAILLE PATTERN DOTS-124578 */ +#define XKB_KEY_braille_dots_34578 0x10028dc /* U+28DC BRAILLE PATTERN DOTS-34578 */ +#define XKB_KEY_braille_dots_134578 0x10028dd /* U+28DD BRAILLE PATTERN DOTS-134578 */ +#define XKB_KEY_braille_dots_234578 0x10028de /* U+28DE BRAILLE PATTERN DOTS-234578 */ +#define XKB_KEY_braille_dots_1234578 0x10028df /* U+28DF BRAILLE PATTERN DOTS-1234578 */ +#define XKB_KEY_braille_dots_678 0x10028e0 /* U+28E0 BRAILLE PATTERN DOTS-678 */ +#define XKB_KEY_braille_dots_1678 0x10028e1 /* U+28E1 BRAILLE PATTERN DOTS-1678 */ +#define XKB_KEY_braille_dots_2678 0x10028e2 /* U+28E2 BRAILLE PATTERN DOTS-2678 */ +#define XKB_KEY_braille_dots_12678 0x10028e3 /* U+28E3 BRAILLE PATTERN DOTS-12678 */ +#define XKB_KEY_braille_dots_3678 0x10028e4 /* U+28E4 BRAILLE PATTERN DOTS-3678 */ +#define XKB_KEY_braille_dots_13678 0x10028e5 /* U+28E5 BRAILLE PATTERN DOTS-13678 */ +#define XKB_KEY_braille_dots_23678 0x10028e6 /* U+28E6 BRAILLE PATTERN DOTS-23678 */ +#define XKB_KEY_braille_dots_123678 0x10028e7 /* U+28E7 BRAILLE PATTERN DOTS-123678 */ +#define XKB_KEY_braille_dots_4678 0x10028e8 /* U+28E8 BRAILLE PATTERN DOTS-4678 */ +#define XKB_KEY_braille_dots_14678 0x10028e9 /* U+28E9 BRAILLE PATTERN DOTS-14678 */ +#define XKB_KEY_braille_dots_24678 0x10028ea /* U+28EA BRAILLE PATTERN DOTS-24678 */ +#define XKB_KEY_braille_dots_124678 0x10028eb /* U+28EB BRAILLE PATTERN DOTS-124678 */ +#define XKB_KEY_braille_dots_34678 0x10028ec /* U+28EC BRAILLE PATTERN DOTS-34678 */ +#define XKB_KEY_braille_dots_134678 0x10028ed /* U+28ED BRAILLE PATTERN DOTS-134678 */ +#define XKB_KEY_braille_dots_234678 0x10028ee /* U+28EE BRAILLE PATTERN DOTS-234678 */ +#define XKB_KEY_braille_dots_1234678 0x10028ef /* U+28EF BRAILLE PATTERN DOTS-1234678 */ +#define XKB_KEY_braille_dots_5678 0x10028f0 /* U+28F0 BRAILLE PATTERN DOTS-5678 */ +#define XKB_KEY_braille_dots_15678 0x10028f1 /* U+28F1 BRAILLE PATTERN DOTS-15678 */ +#define XKB_KEY_braille_dots_25678 0x10028f2 /* U+28F2 BRAILLE PATTERN DOTS-25678 */ +#define XKB_KEY_braille_dots_125678 0x10028f3 /* U+28F3 BRAILLE PATTERN DOTS-125678 */ +#define XKB_KEY_braille_dots_35678 0x10028f4 /* U+28F4 BRAILLE PATTERN DOTS-35678 */ +#define XKB_KEY_braille_dots_135678 0x10028f5 /* U+28F5 BRAILLE PATTERN DOTS-135678 */ +#define XKB_KEY_braille_dots_235678 0x10028f6 /* U+28F6 BRAILLE PATTERN DOTS-235678 */ +#define XKB_KEY_braille_dots_1235678 0x10028f7 /* U+28F7 BRAILLE PATTERN DOTS-1235678 */ +#define XKB_KEY_braille_dots_45678 0x10028f8 /* U+28F8 BRAILLE PATTERN DOTS-45678 */ +#define XKB_KEY_braille_dots_145678 0x10028f9 /* U+28F9 BRAILLE PATTERN DOTS-145678 */ +#define XKB_KEY_braille_dots_245678 0x10028fa /* U+28FA BRAILLE PATTERN DOTS-245678 */ +#define XKB_KEY_braille_dots_1245678 0x10028fb /* U+28FB BRAILLE PATTERN DOTS-1245678 */ +#define XKB_KEY_braille_dots_345678 0x10028fc /* U+28FC BRAILLE PATTERN DOTS-345678 */ +#define XKB_KEY_braille_dots_1345678 0x10028fd /* U+28FD BRAILLE PATTERN DOTS-1345678 */ +#define XKB_KEY_braille_dots_2345678 0x10028fe /* U+28FE BRAILLE PATTERN DOTS-2345678 */ +#define XKB_KEY_braille_dots_12345678 0x10028ff /* U+28FF BRAILLE PATTERN DOTS-12345678 */ + +/* + * Sinhala (http://unicode.org/charts/PDF/U0D80.pdf) + * http://www.nongnu.org/sinhala/doc/transliteration/sinhala-transliteration_6.html + */ + +#define XKB_KEY_Sinh_ng 0x1000d82 /* U+0D82 SINHALA SIGN ANUSVARAYA */ +#define XKB_KEY_Sinh_h2 0x1000d83 /* U+0D83 SINHALA SIGN VISARGAYA */ +#define XKB_KEY_Sinh_a 0x1000d85 /* U+0D85 SINHALA LETTER AYANNA */ +#define XKB_KEY_Sinh_aa 0x1000d86 /* U+0D86 SINHALA LETTER AAYANNA */ +#define XKB_KEY_Sinh_ae 0x1000d87 /* U+0D87 SINHALA LETTER AEYANNA */ +#define XKB_KEY_Sinh_aee 0x1000d88 /* U+0D88 SINHALA LETTER AEEYANNA */ +#define XKB_KEY_Sinh_i 0x1000d89 /* U+0D89 SINHALA LETTER IYANNA */ +#define XKB_KEY_Sinh_ii 0x1000d8a /* U+0D8A SINHALA LETTER IIYANNA */ +#define XKB_KEY_Sinh_u 0x1000d8b /* U+0D8B SINHALA LETTER UYANNA */ +#define XKB_KEY_Sinh_uu 0x1000d8c /* U+0D8C SINHALA LETTER UUYANNA */ +#define XKB_KEY_Sinh_ri 0x1000d8d /* U+0D8D SINHALA LETTER IRUYANNA */ +#define XKB_KEY_Sinh_rii 0x1000d8e /* U+0D8E SINHALA LETTER IRUUYANNA */ +#define XKB_KEY_Sinh_lu 0x1000d8f /* U+0D8F SINHALA LETTER ILUYANNA */ +#define XKB_KEY_Sinh_luu 0x1000d90 /* U+0D90 SINHALA LETTER ILUUYANNA */ +#define XKB_KEY_Sinh_e 0x1000d91 /* U+0D91 SINHALA LETTER EYANNA */ +#define XKB_KEY_Sinh_ee 0x1000d92 /* U+0D92 SINHALA LETTER EEYANNA */ +#define XKB_KEY_Sinh_ai 0x1000d93 /* U+0D93 SINHALA LETTER AIYANNA */ +#define XKB_KEY_Sinh_o 0x1000d94 /* U+0D94 SINHALA LETTER OYANNA */ +#define XKB_KEY_Sinh_oo 0x1000d95 /* U+0D95 SINHALA LETTER OOYANNA */ +#define XKB_KEY_Sinh_au 0x1000d96 /* U+0D96 SINHALA LETTER AUYANNA */ +#define XKB_KEY_Sinh_ka 0x1000d9a /* U+0D9A SINHALA LETTER ALPAPRAANA KAYANNA */ +#define XKB_KEY_Sinh_kha 0x1000d9b /* U+0D9B SINHALA LETTER MAHAAPRAANA KAYANNA */ +#define XKB_KEY_Sinh_ga 0x1000d9c /* U+0D9C SINHALA LETTER ALPAPRAANA GAYANNA */ +#define XKB_KEY_Sinh_gha 0x1000d9d /* U+0D9D SINHALA LETTER MAHAAPRAANA GAYANNA */ +#define XKB_KEY_Sinh_ng2 0x1000d9e /* U+0D9E SINHALA LETTER KANTAJA NAASIKYAYA */ +#define XKB_KEY_Sinh_nga 0x1000d9f /* U+0D9F SINHALA LETTER SANYAKA GAYANNA */ +#define XKB_KEY_Sinh_ca 0x1000da0 /* U+0DA0 SINHALA LETTER ALPAPRAANA CAYANNA */ +#define XKB_KEY_Sinh_cha 0x1000da1 /* U+0DA1 SINHALA LETTER MAHAAPRAANA CAYANNA */ +#define XKB_KEY_Sinh_ja 0x1000da2 /* U+0DA2 SINHALA LETTER ALPAPRAANA JAYANNA */ +#define XKB_KEY_Sinh_jha 0x1000da3 /* U+0DA3 SINHALA LETTER MAHAAPRAANA JAYANNA */ +#define XKB_KEY_Sinh_nya 0x1000da4 /* U+0DA4 SINHALA LETTER TAALUJA NAASIKYAYA */ +#define XKB_KEY_Sinh_jnya 0x1000da5 /* U+0DA5 SINHALA LETTER TAALUJA SANYOOGA NAAKSIKYAYA */ +#define XKB_KEY_Sinh_nja 0x1000da6 /* U+0DA6 SINHALA LETTER SANYAKA JAYANNA */ +#define XKB_KEY_Sinh_tta 0x1000da7 /* U+0DA7 SINHALA LETTER ALPAPRAANA TTAYANNA */ +#define XKB_KEY_Sinh_ttha 0x1000da8 /* U+0DA8 SINHALA LETTER MAHAAPRAANA TTAYANNA */ +#define XKB_KEY_Sinh_dda 0x1000da9 /* U+0DA9 SINHALA LETTER ALPAPRAANA DDAYANNA */ +#define XKB_KEY_Sinh_ddha 0x1000daa /* U+0DAA SINHALA LETTER MAHAAPRAANA DDAYANNA */ +#define XKB_KEY_Sinh_nna 0x1000dab /* U+0DAB SINHALA LETTER MUURDHAJA NAYANNA */ +#define XKB_KEY_Sinh_ndda 0x1000dac /* U+0DAC SINHALA LETTER SANYAKA DDAYANNA */ +#define XKB_KEY_Sinh_tha 0x1000dad /* U+0DAD SINHALA LETTER ALPAPRAANA TAYANNA */ +#define XKB_KEY_Sinh_thha 0x1000dae /* U+0DAE SINHALA LETTER MAHAAPRAANA TAYANNA */ +#define XKB_KEY_Sinh_dha 0x1000daf /* U+0DAF SINHALA LETTER ALPAPRAANA DAYANNA */ +#define XKB_KEY_Sinh_dhha 0x1000db0 /* U+0DB0 SINHALA LETTER MAHAAPRAANA DAYANNA */ +#define XKB_KEY_Sinh_na 0x1000db1 /* U+0DB1 SINHALA LETTER DANTAJA NAYANNA */ +#define XKB_KEY_Sinh_ndha 0x1000db3 /* U+0DB3 SINHALA LETTER SANYAKA DAYANNA */ +#define XKB_KEY_Sinh_pa 0x1000db4 /* U+0DB4 SINHALA LETTER ALPAPRAANA PAYANNA */ +#define XKB_KEY_Sinh_pha 0x1000db5 /* U+0DB5 SINHALA LETTER MAHAAPRAANA PAYANNA */ +#define XKB_KEY_Sinh_ba 0x1000db6 /* U+0DB6 SINHALA LETTER ALPAPRAANA BAYANNA */ +#define XKB_KEY_Sinh_bha 0x1000db7 /* U+0DB7 SINHALA LETTER MAHAAPRAANA BAYANNA */ +#define XKB_KEY_Sinh_ma 0x1000db8 /* U+0DB8 SINHALA LETTER MAYANNA */ +#define XKB_KEY_Sinh_mba 0x1000db9 /* U+0DB9 SINHALA LETTER AMBA BAYANNA */ +#define XKB_KEY_Sinh_ya 0x1000dba /* U+0DBA SINHALA LETTER YAYANNA */ +#define XKB_KEY_Sinh_ra 0x1000dbb /* U+0DBB SINHALA LETTER RAYANNA */ +#define XKB_KEY_Sinh_la 0x1000dbd /* U+0DBD SINHALA LETTER DANTAJA LAYANNA */ +#define XKB_KEY_Sinh_va 0x1000dc0 /* U+0DC0 SINHALA LETTER VAYANNA */ +#define XKB_KEY_Sinh_sha 0x1000dc1 /* U+0DC1 SINHALA LETTER TAALUJA SAYANNA */ +#define XKB_KEY_Sinh_ssha 0x1000dc2 /* U+0DC2 SINHALA LETTER MUURDHAJA SAYANNA */ +#define XKB_KEY_Sinh_sa 0x1000dc3 /* U+0DC3 SINHALA LETTER DANTAJA SAYANNA */ +#define XKB_KEY_Sinh_ha 0x1000dc4 /* U+0DC4 SINHALA LETTER HAYANNA */ +#define XKB_KEY_Sinh_lla 0x1000dc5 /* U+0DC5 SINHALA LETTER MUURDHAJA LAYANNA */ +#define XKB_KEY_Sinh_fa 0x1000dc6 /* U+0DC6 SINHALA LETTER FAYANNA */ +#define XKB_KEY_Sinh_al 0x1000dca /* U+0DCA SINHALA SIGN AL-LAKUNA */ +#define XKB_KEY_Sinh_aa2 0x1000dcf /* U+0DCF SINHALA VOWEL SIGN AELA-PILLA */ +#define XKB_KEY_Sinh_ae2 0x1000dd0 /* U+0DD0 SINHALA VOWEL SIGN KETTI AEDA-PILLA */ +#define XKB_KEY_Sinh_aee2 0x1000dd1 /* U+0DD1 SINHALA VOWEL SIGN DIGA AEDA-PILLA */ +#define XKB_KEY_Sinh_i2 0x1000dd2 /* U+0DD2 SINHALA VOWEL SIGN KETTI IS-PILLA */ +#define XKB_KEY_Sinh_ii2 0x1000dd3 /* U+0DD3 SINHALA VOWEL SIGN DIGA IS-PILLA */ +#define XKB_KEY_Sinh_u2 0x1000dd4 /* U+0DD4 SINHALA VOWEL SIGN KETTI PAA-PILLA */ +#define XKB_KEY_Sinh_uu2 0x1000dd6 /* U+0DD6 SINHALA VOWEL SIGN DIGA PAA-PILLA */ +#define XKB_KEY_Sinh_ru2 0x1000dd8 /* U+0DD8 SINHALA VOWEL SIGN GAETTA-PILLA */ +#define XKB_KEY_Sinh_e2 0x1000dd9 /* U+0DD9 SINHALA VOWEL SIGN KOMBUVA */ +#define XKB_KEY_Sinh_ee2 0x1000dda /* U+0DDA SINHALA VOWEL SIGN DIGA KOMBUVA */ +#define XKB_KEY_Sinh_ai2 0x1000ddb /* U+0DDB SINHALA VOWEL SIGN KOMBU DEKA */ +#define XKB_KEY_Sinh_o2 0x1000ddc /* U+0DDC SINHALA VOWEL SIGN KOMBUVA HAA AELA-PILLA */ +#define XKB_KEY_Sinh_oo2 0x1000ddd /* U+0DDD SINHALA VOWEL SIGN KOMBUVA HAA DIGA AELA-PILLA */ +#define XKB_KEY_Sinh_au2 0x1000dde /* U+0DDE SINHALA VOWEL SIGN KOMBUVA HAA GAYANUKITTA */ +#define XKB_KEY_Sinh_lu2 0x1000ddf /* U+0DDF SINHALA VOWEL SIGN GAYANUKITTA */ +#define XKB_KEY_Sinh_ruu2 0x1000df2 /* U+0DF2 SINHALA VOWEL SIGN DIGA GAETTA-PILLA */ +#define XKB_KEY_Sinh_luu2 0x1000df3 /* U+0DF3 SINHALA VOWEL SIGN DIGA GAYANUKITTA */ +#define XKB_KEY_Sinh_kunddaliya 0x1000df4 /* U+0DF4 SINHALA PUNCTUATION KUNDDALIYA */ +/* + * XFree86 vendor specific keysyms. + * + * The XFree86 keysym range is 0x10080001 - 0x1008ffff. + * + * The XF86 set of keysyms is a catch-all set of defines for keysyms found + * on various multimedia keyboards. Originally specific to XFree86 they have + * been been adopted over time and are considered a "standard" part of X + * keysym definitions. + * XFree86 never properly commented these keysyms, so we have done our + * best to explain the semantic meaning of these keys. + * + * XFree86 has removed their mail archives of the period, that might have + * shed more light on some of these definitions. Until/unless we resurrect + * these archives, these are from memory and usage. + */ + +/* + * ModeLock + * + * This one is old, and not really used any more since XKB offers this + * functionality. + */ + +#define XKB_KEY_XF86ModeLock 0x1008ff01 /* Mode Switch Lock */ + +/* Backlight controls. */ +#define XKB_KEY_XF86MonBrightnessUp 0x1008ff02 /* Monitor/panel brightness */ +#define XKB_KEY_XF86MonBrightnessDown 0x1008ff03 /* Monitor/panel brightness */ +#define XKB_KEY_XF86KbdLightOnOff 0x1008ff04 /* Keyboards may be lit */ +#define XKB_KEY_XF86KbdBrightnessUp 0x1008ff05 /* Keyboards may be lit */ +#define XKB_KEY_XF86KbdBrightnessDown 0x1008ff06 /* Keyboards may be lit */ +#define XKB_KEY_XF86MonBrightnessCycle 0x1008ff07 /* Monitor/panel brightness */ + +/* + * Keys found on some "Internet" keyboards. + */ +#define XKB_KEY_XF86Standby 0x1008ff10 /* System into standby mode */ +#define XKB_KEY_XF86AudioLowerVolume 0x1008ff11 /* Volume control down */ +#define XKB_KEY_XF86AudioMute 0x1008ff12 /* Mute sound from the system */ +#define XKB_KEY_XF86AudioRaiseVolume 0x1008ff13 /* Volume control up */ +#define XKB_KEY_XF86AudioPlay 0x1008ff14 /* Start playing of audio > */ +#define XKB_KEY_XF86AudioStop 0x1008ff15 /* Stop playing audio */ +#define XKB_KEY_XF86AudioPrev 0x1008ff16 /* Previous track */ +#define XKB_KEY_XF86AudioNext 0x1008ff17 /* Next track */ +#define XKB_KEY_XF86HomePage 0x1008ff18 /* Display user's home page */ +#define XKB_KEY_XF86Mail 0x1008ff19 /* Invoke user's mail program */ +#define XKB_KEY_XF86Start 0x1008ff1a /* Start application */ +#define XKB_KEY_XF86Search 0x1008ff1b /* Search */ +#define XKB_KEY_XF86AudioRecord 0x1008ff1c /* Record audio application */ + +/* These are sometimes found on PDA's (e.g. Palm, PocketPC or elsewhere) */ +#define XKB_KEY_XF86Calculator 0x1008ff1d /* Invoke calculator program */ +#define XKB_KEY_XF86Memo 0x1008ff1e /* Invoke Memo taking program */ +#define XKB_KEY_XF86ToDoList 0x1008ff1f /* Invoke To Do List program */ +#define XKB_KEY_XF86Calendar 0x1008ff20 /* Invoke Calendar program */ +#define XKB_KEY_XF86PowerDown 0x1008ff21 /* Deep sleep the system */ +#define XKB_KEY_XF86ContrastAdjust 0x1008ff22 /* Adjust screen contrast */ +#define XKB_KEY_XF86RockerUp 0x1008ff23 /* Rocker switches exist up */ +#define XKB_KEY_XF86RockerDown 0x1008ff24 /* and down */ +#define XKB_KEY_XF86RockerEnter 0x1008ff25 /* and let you press them */ + +/* Some more "Internet" keyboard symbols */ +#define XKB_KEY_XF86Back 0x1008ff26 /* Like back on a browser */ +#define XKB_KEY_XF86Forward 0x1008ff27 /* Like forward on a browser */ +#define XKB_KEY_XF86Stop 0x1008ff28 /* Stop current operation */ +#define XKB_KEY_XF86Refresh 0x1008ff29 /* Refresh the page */ +#define XKB_KEY_XF86PowerOff 0x1008ff2a /* Power off system entirely */ +#define XKB_KEY_XF86WakeUp 0x1008ff2b /* Wake up system from sleep */ +#define XKB_KEY_XF86Eject 0x1008ff2c /* Eject device (e.g. DVD) */ +#define XKB_KEY_XF86ScreenSaver 0x1008ff2d /* Invoke screensaver */ +#define XKB_KEY_XF86WWW 0x1008ff2e /* Invoke web browser */ +#define XKB_KEY_XF86Sleep 0x1008ff2f /* Put system to sleep */ +#define XKB_KEY_XF86Favorites 0x1008ff30 /* Show favorite locations */ +#define XKB_KEY_XF86AudioPause 0x1008ff31 /* Pause audio playing */ +#define XKB_KEY_XF86AudioMedia 0x1008ff32 /* Launch media collection app */ +#define XKB_KEY_XF86MyComputer 0x1008ff33 /* Display "My Computer" window */ +#define XKB_KEY_XF86VendorHome 0x1008ff34 /* Display vendor home web site */ +#define XKB_KEY_XF86LightBulb 0x1008ff35 /* Light bulb keys exist */ +#define XKB_KEY_XF86Shop 0x1008ff36 /* Display shopping web site */ +#define XKB_KEY_XF86History 0x1008ff37 /* Show history of web surfing */ +#define XKB_KEY_XF86OpenURL 0x1008ff38 /* Open selected URL */ +#define XKB_KEY_XF86AddFavorite 0x1008ff39 /* Add URL to favorites list */ +#define XKB_KEY_XF86HotLinks 0x1008ff3a /* Show "hot" links */ +#define XKB_KEY_XF86BrightnessAdjust 0x1008ff3b /* Invoke brightness adj. UI */ +#define XKB_KEY_XF86Finance 0x1008ff3c /* Display financial site */ +#define XKB_KEY_XF86Community 0x1008ff3d /* Display user's community */ +#define XKB_KEY_XF86AudioRewind 0x1008ff3e /* "rewind" audio track */ +#define XKB_KEY_XF86BackForward 0x1008ff3f /* ??? */ +#define XKB_KEY_XF86Launch0 0x1008ff40 /* Launch Application */ +#define XKB_KEY_XF86Launch1 0x1008ff41 /* Launch Application */ +#define XKB_KEY_XF86Launch2 0x1008ff42 /* Launch Application */ +#define XKB_KEY_XF86Launch3 0x1008ff43 /* Launch Application */ +#define XKB_KEY_XF86Launch4 0x1008ff44 /* Launch Application */ +#define XKB_KEY_XF86Launch5 0x1008ff45 /* Launch Application */ +#define XKB_KEY_XF86Launch6 0x1008ff46 /* Launch Application */ +#define XKB_KEY_XF86Launch7 0x1008ff47 /* Launch Application */ +#define XKB_KEY_XF86Launch8 0x1008ff48 /* Launch Application */ +#define XKB_KEY_XF86Launch9 0x1008ff49 /* Launch Application */ +#define XKB_KEY_XF86LaunchA 0x1008ff4a /* Launch Application */ +#define XKB_KEY_XF86LaunchB 0x1008ff4b /* Launch Application */ +#define XKB_KEY_XF86LaunchC 0x1008ff4c /* Launch Application */ +#define XKB_KEY_XF86LaunchD 0x1008ff4d /* Launch Application */ +#define XKB_KEY_XF86LaunchE 0x1008ff4e /* Launch Application */ +#define XKB_KEY_XF86LaunchF 0x1008ff4f /* Launch Application */ + +#define XKB_KEY_XF86ApplicationLeft 0x1008ff50 /* switch to application, left */ +#define XKB_KEY_XF86ApplicationRight 0x1008ff51 /* switch to application, right*/ +#define XKB_KEY_XF86Book 0x1008ff52 /* Launch bookreader */ +#define XKB_KEY_XF86CD 0x1008ff53 /* Launch CD/DVD player */ +#define XKB_KEY_XF86MediaSelectCD 0x1008ff53 /* Alias for XF86CD */ +#define XKB_KEY_XF86Calculater 0x1008ff54 /* Launch Calculater */ +#define XKB_KEY_XF86Clear 0x1008ff55 /* Clear window, screen */ +#define XKB_KEY_XF86Close 0x1008ff56 /* Close window */ +#define XKB_KEY_XF86Copy 0x1008ff57 /* Copy selection */ +#define XKB_KEY_XF86Cut 0x1008ff58 /* Cut selection */ +#define XKB_KEY_XF86Display 0x1008ff59 /* Output switch key */ +#define XKB_KEY_XF86DOS 0x1008ff5a /* Launch DOS (emulation) */ +#define XKB_KEY_XF86Documents 0x1008ff5b /* Open documents window */ +#define XKB_KEY_XF86Excel 0x1008ff5c /* Launch spread sheet */ +#define XKB_KEY_XF86Explorer 0x1008ff5d /* Launch file explorer */ +#define XKB_KEY_XF86Game 0x1008ff5e /* Launch game */ +#define XKB_KEY_XF86Go 0x1008ff5f /* Go to URL */ +#define XKB_KEY_XF86iTouch 0x1008ff60 /* Logitech iTouch- don't use */ +#define XKB_KEY_XF86LogOff 0x1008ff61 /* Log off system */ +#define XKB_KEY_XF86Market 0x1008ff62 /* ?? */ +#define XKB_KEY_XF86Meeting 0x1008ff63 /* enter meeting in calendar */ +#define XKB_KEY_XF86MenuKB 0x1008ff65 /* distinguish keyboard from PB */ +#define XKB_KEY_XF86MenuPB 0x1008ff66 /* distinguish PB from keyboard */ +#define XKB_KEY_XF86MySites 0x1008ff67 /* Favourites */ +#define XKB_KEY_XF86New 0x1008ff68 /* New (folder, document... */ +#define XKB_KEY_XF86News 0x1008ff69 /* News */ +#define XKB_KEY_XF86OfficeHome 0x1008ff6a /* Office home (old Staroffice)*/ +#define XKB_KEY_XF86Open 0x1008ff6b /* Open */ +#define XKB_KEY_XF86Option 0x1008ff6c /* ?? */ +#define XKB_KEY_XF86Paste 0x1008ff6d /* Paste */ +#define XKB_KEY_XF86Phone 0x1008ff6e /* Launch phone; dial number */ +#define XKB_KEY_XF86Q 0x1008ff70 /* Compaq's Q - don't use */ +#define XKB_KEY_XF86Reply 0x1008ff72 /* Reply e.g., mail */ +#define XKB_KEY_XF86Reload 0x1008ff73 /* Reload web page, file, etc. */ +#define XKB_KEY_XF86RotateWindows 0x1008ff74 /* Rotate windows e.g. xrandr */ +#define XKB_KEY_XF86RotationPB 0x1008ff75 /* don't use */ +#define XKB_KEY_XF86RotationKB 0x1008ff76 /* don't use */ +#define XKB_KEY_XF86Save 0x1008ff77 /* Save (file, document, state */ +#define XKB_KEY_XF86ScrollUp 0x1008ff78 /* Scroll window/contents up */ +#define XKB_KEY_XF86ScrollDown 0x1008ff79 /* Scrool window/contentd down */ +#define XKB_KEY_XF86ScrollClick 0x1008ff7a /* Use XKB mousekeys instead */ +#define XKB_KEY_XF86Send 0x1008ff7b /* Send mail, file, object */ +#define XKB_KEY_XF86Spell 0x1008ff7c /* Spell checker */ +#define XKB_KEY_XF86SplitScreen 0x1008ff7d /* Split window or screen */ +#define XKB_KEY_XF86Support 0x1008ff7e /* Get support (??) */ +#define XKB_KEY_XF86TaskPane 0x1008ff7f /* Show tasks */ +#define XKB_KEY_XF86Terminal 0x1008ff80 /* Launch terminal emulator */ +#define XKB_KEY_XF86Tools 0x1008ff81 /* toolbox of desktop/app. */ +#define XKB_KEY_XF86Travel 0x1008ff82 /* ?? */ +#define XKB_KEY_XF86UserPB 0x1008ff84 /* ?? */ +#define XKB_KEY_XF86User1KB 0x1008ff85 /* ?? */ +#define XKB_KEY_XF86User2KB 0x1008ff86 /* ?? */ +#define XKB_KEY_XF86Video 0x1008ff87 /* Launch video player */ +#define XKB_KEY_XF86WheelButton 0x1008ff88 /* button from a mouse wheel */ +#define XKB_KEY_XF86Word 0x1008ff89 /* Launch word processor */ +#define XKB_KEY_XF86Xfer 0x1008ff8a +#define XKB_KEY_XF86ZoomIn 0x1008ff8b /* zoom in view, map, etc. */ +#define XKB_KEY_XF86ZoomOut 0x1008ff8c /* zoom out view, map, etc. */ + +#define XKB_KEY_XF86Away 0x1008ff8d /* mark yourself as away */ +#define XKB_KEY_XF86Messenger 0x1008ff8e /* as in instant messaging */ +#define XKB_KEY_XF86WebCam 0x1008ff8f /* Launch web camera app. */ +#define XKB_KEY_XF86MailForward 0x1008ff90 /* Forward in mail */ +#define XKB_KEY_XF86Pictures 0x1008ff91 /* Show pictures */ +#define XKB_KEY_XF86Music 0x1008ff92 /* Launch music application */ + +#define XKB_KEY_XF86Battery 0x1008ff93 /* Display battery information */ +#define XKB_KEY_XF86Bluetooth 0x1008ff94 /* Enable/disable Bluetooth */ +#define XKB_KEY_XF86WLAN 0x1008ff95 /* Enable/disable WLAN */ +#define XKB_KEY_XF86UWB 0x1008ff96 /* Enable/disable UWB */ + +#define XKB_KEY_XF86AudioForward 0x1008ff97 /* fast-forward audio track */ +#define XKB_KEY_XF86AudioRepeat 0x1008ff98 /* toggle repeat mode */ +#define XKB_KEY_XF86AudioRandomPlay 0x1008ff99 /* toggle shuffle mode */ +#define XKB_KEY_XF86Subtitle 0x1008ff9a /* cycle through subtitle */ +#define XKB_KEY_XF86AudioCycleTrack 0x1008ff9b /* cycle through audio tracks */ +#define XKB_KEY_XF86CycleAngle 0x1008ff9c /* cycle through angles */ +#define XKB_KEY_XF86FrameBack 0x1008ff9d /* video: go one frame back */ +#define XKB_KEY_XF86FrameForward 0x1008ff9e /* video: go one frame forward */ +#define XKB_KEY_XF86Time 0x1008ff9f /* display, or shows an entry for time seeking */ +#define XKB_KEY_XF86Select 0x1008ffa0 /* Select button on joypads and remotes */ +#define XKB_KEY_XF86View 0x1008ffa1 /* Show a view options/properties */ +#define XKB_KEY_XF86TopMenu 0x1008ffa2 /* Go to a top-level menu in a video */ + +#define XKB_KEY_XF86Red 0x1008ffa3 /* Red button */ +#define XKB_KEY_XF86Green 0x1008ffa4 /* Green button */ +#define XKB_KEY_XF86Yellow 0x1008ffa5 /* Yellow button */ +#define XKB_KEY_XF86Blue 0x1008ffa6 /* Blue button */ + +#define XKB_KEY_XF86Suspend 0x1008ffa7 /* Sleep to RAM */ +#define XKB_KEY_XF86Hibernate 0x1008ffa8 /* Sleep to disk */ +#define XKB_KEY_XF86TouchpadToggle 0x1008ffa9 /* Toggle between touchpad/trackstick */ +#define XKB_KEY_XF86TouchpadOn 0x1008ffb0 /* The touchpad got switched on */ +#define XKB_KEY_XF86TouchpadOff 0x1008ffb1 /* The touchpad got switched off */ + +#define XKB_KEY_XF86AudioMicMute 0x1008ffb2 /* Mute the Mic from the system */ + +#define XKB_KEY_XF86Keyboard 0x1008ffb3 /* User defined keyboard related action */ + +#define XKB_KEY_XF86WWAN 0x1008ffb4 /* Toggle WWAN (LTE, UMTS, etc.) radio */ +#define XKB_KEY_XF86RFKill 0x1008ffb5 /* Toggle radios on/off */ + +#define XKB_KEY_XF86AudioPreset 0x1008ffb6 /* Select equalizer preset, e.g. theatre-mode */ + +#define XKB_KEY_XF86RotationLockToggle 0x1008ffb7 /* Toggle screen rotation lock on/off */ + +#define XKB_KEY_XF86FullScreen 0x1008ffb8 /* Toggle fullscreen */ + +/* Keys for special action keys (hot keys) */ +/* Virtual terminals on some operating systems */ +#define XKB_KEY_XF86Switch_VT_1 0x1008fe01 +#define XKB_KEY_XF86Switch_VT_2 0x1008fe02 +#define XKB_KEY_XF86Switch_VT_3 0x1008fe03 +#define XKB_KEY_XF86Switch_VT_4 0x1008fe04 +#define XKB_KEY_XF86Switch_VT_5 0x1008fe05 +#define XKB_KEY_XF86Switch_VT_6 0x1008fe06 +#define XKB_KEY_XF86Switch_VT_7 0x1008fe07 +#define XKB_KEY_XF86Switch_VT_8 0x1008fe08 +#define XKB_KEY_XF86Switch_VT_9 0x1008fe09 +#define XKB_KEY_XF86Switch_VT_10 0x1008fe0a +#define XKB_KEY_XF86Switch_VT_11 0x1008fe0b +#define XKB_KEY_XF86Switch_VT_12 0x1008fe0c + +#define XKB_KEY_XF86Ungrab 0x1008fe20 /* force ungrab */ +#define XKB_KEY_XF86ClearGrab 0x1008fe21 /* kill application with grab */ +#define XKB_KEY_XF86Next_VMode 0x1008fe22 /* next video mode available */ +#define XKB_KEY_XF86Prev_VMode 0x1008fe23 /* prev. video mode available */ +#define XKB_KEY_XF86LogWindowTree 0x1008fe24 /* print window tree to log */ +#define XKB_KEY_XF86LogGrabInfo 0x1008fe25 /* print all active grabs to log */ + + +/* + * Reserved range for evdev symbols: 0x10081000-0x10081FFF + * + * Key symbols within this range are intended for a 1:1 mapping to the + * Linux kernel input-event-codes.h file: + * - Keysym value: `_EVDEVK(kernel value)` + * - Keysym name: it must be prefixed by `XKB_KEY_XF86`. The recommended *default* + * name uses the following pattern: `XKB_KEY_XF86CamelCaseKernelName`. CamelCasing + * is done with a human control as last authority, e.g. see VOD instead of Vod + * for the Video on Demand key. In case that the kernel key name is too + * ambiguous, it is recommended to create a more explicit name with the + * following guidelines: + * 1. Names should be mnemonic. + * 2. Names should avoid acronyms, unless sufficiently common and documented + * in a comment. + * 3. Names should identify a function. + * 4. Keysyms share a common namespace, so keys with a generic name should + * denote a generic function, otherwise it should be renamed to add context. + * E.g. `KEY_OK` has the associated keysym `XKB_KEY_XF86OK`, while `KEY_TITLE` + * (used to open a menu to select a chapter of a media) is associated to + * the keysym `XKB_KEY_XF86MediaTitleMenu` to avoid ambiguity. + * 5. Keysyms should support designing *portable* applications, therefore + * their names should be self-explaining to facilitate finding them and + * to avoid misuse. + * 6. The “HID usage tables for USB” can be used if there is an unambiguous + * mapping. See: + * - Reference document: https://usb.org/document-library/hid-usage-tables-16 + * - Mapping in the Linux source file: `drivers/hid/hid-input.c` as of 2025-07 + * + * For example, the kernel + * #define KEY_MACRO_RECORD_START 0x2b0 + * effectively ends up as: + * #define XKB_KEY_XF86MacroRecordStart 0x100812b0 + * + * For historical reasons, some keysyms within the reserved range will be + * missing, most notably all "normal" keys that are mapped through default + * XKB layouts (e.g. KEY_Q). + * + * The format for #defines is strict: + * + * #define XKB_KEY_XF86Foo_EVDEVK(0xABC) |* kver KEY_FOO *| + * #define XKB_KEY_XF86Foo_EVDEVK(0xABC) |* Alias for XF86Bar *| + * #define XKB_KEY_XF86Foo_EVDEVK(0xABC) |* Deprecated alias for XF86Bar *| + * + * Where + * - alignment by spaces + * - the _EVDEVK macro must be used + * - the hex code must be in uppercase hex + * - the kernel version (kver) is in the form v5.10 + * - kver and key name are within a slash-star comment (a pipe is used in + * this example for technical reasons) + * These #defines are parsed by scripts. Do not stray from the given format. + * + * Where the evdev keycode is mapped to a different symbol, please add a + * comment line starting with Use: but otherwise the same format, e.g. + * Use: XKB_KEY_XF86RotationLockToggle _EVDEVK(0x231) v4.16 KEY_ROTATE_LOCK_TOGGLE + * + */ +/* Use: XKB_KEY_XF86Eject _EVDEVK(0x0a2) KEY_EJECTCLOSECD */ +/* Use: XKB_KEY_XF86New _EVDEVK(0x0b5) v2.6.14 KEY_NEW */ +/* Use: XKB_KEY_Redo _EVDEVK(0x0b6) v2.6.14 KEY_REDO */ +/* KEY_DASHBOARD has been mapped to LaunchB in xkeyboard-config since 2011 */ +/* Use: XKB_KEY_XF86LaunchB _EVDEVK(0x0cc) v2.6.28 KEY_DASHBOARD */ +/* Use: XKB_KEY_XF86Display _EVDEVK(0x0e3) v2.6.12 KEY_SWITCHVIDEOMODE */ +/* Use: XKB_KEY_XF86KbdLightOnOff _EVDEVK(0x0e4) v2.6.12 KEY_KBDILLUMTOGGLE */ +/* Use: XKB_KEY_XF86KbdBrightnessDown _EVDEVK(0x0e5) v2.6.12 KEY_KBDILLUMDOWN */ +/* Use: XKB_KEY_XF86KbdBrightnessUp _EVDEVK(0x0e6) v2.6.12 KEY_KBDILLUMUP */ +/* Use: XKB_KEY_XF86Send _EVDEVK(0x0e7) v2.6.14 KEY_SEND */ +/* Use: XKB_KEY_XF86Reply _EVDEVK(0x0e8) v2.6.14 KEY_REPLY */ +/* Use: XKB_KEY_XF86MailForward _EVDEVK(0x0e9) v2.6.14 KEY_FORWARDMAIL */ +/* Use: XKB_KEY_XF86Save _EVDEVK(0x0ea) v2.6.14 KEY_SAVE */ +/* Use: XKB_KEY_XF86Documents _EVDEVK(0x0eb) v2.6.14 KEY_DOCUMENTS */ +/* Use: XKB_KEY_XF86Battery _EVDEVK(0x0ec) v2.6.17 KEY_BATTERY */ +/* Use: XKB_KEY_XF86Bluetooth _EVDEVK(0x0ed) v2.6.19 KEY_BLUETOOTH */ +/* Use: XKB_KEY_XF86WLAN _EVDEVK(0x0ee) v2.6.19 KEY_WLAN */ +/* Use: XKB_KEY_XF86UWB _EVDEVK(0x0ef) v2.6.24 KEY_UWB */ +/* Use: XKB_KEY_XF86Next_VMode _EVDEVK(0x0f1) v2.6.23 KEY_VIDEO_NEXT */ +/* Use: XKB_KEY_XF86Prev_VMode _EVDEVK(0x0f2) v2.6.23 KEY_VIDEO_PREV */ +/* Use: XKB_KEY_XF86MonBrightnessCycle _EVDEVK(0x0f3) v2.6.23 KEY_BRIGHTNESS_CYCLE */ +#define XKB_KEY_XF86BrightnessAuto 0x100810f4 /* v3.16 KEY_BRIGHTNESS_AUTO */ +#define XKB_KEY_XF86DisplayOff 0x100810f5 /* v2.6.23 KEY_DISPLAY_OFF */ +/* Use: XKB_KEY_XF86WWAN _EVDEVK(0x0f6) v3.13 KEY_WWAN */ +/* Use: XKB_KEY_XF86RFKill _EVDEVK(0x0f7) v2.6.33 KEY_RFKILL */ +/* Use: XKB_KEY_XF86AudioMicMute _EVDEVK(0x0f8) v3.1 KEY_MICMUTE */ +#define XKB_KEY_XF86OK 0x10081160 /* v2.5.26 KEY_OK */ +/* Use: XKB_KEY_XF86Select _EVDEVK(0x161) v2.5.26 KEY_SELECT */ +#define XKB_KEY_XF86GoTo 0x10081162 /* v2.5.26 KEY_GOTO */ +/* Use: XKB_KEY_XF86Clear _EVDEVK(0x163) v2.5.26 KEY_CLEAR */ +/* TODO: Unclear function _EVDEVK(0x164) v2.5.26 KEY_POWER2 */ +/* Use: XKB_KEY_XF86Option _EVDEVK(0x165) v2.5.26 KEY_OPTION */ +#define XKB_KEY_XF86Info 0x10081166 /* v2.5.26 KEY_INFO */ +/* Use: XKB_KEY_XF86Time _EVDEVK(0x167) v2.5.26 KEY_TIME */ +#define XKB_KEY_XF86VendorLogo 0x10081168 /* v2.5.26 KEY_VENDOR */ +/* TODO: unclear function _EVDEVK(0x169) v2.5.26 KEY_ARCHIVE */ +#define XKB_KEY_XF86MediaSelectProgramGuide 0x1008116a /* v2.5.26 KEY_PROGRAM */ +/* Use: XKB_KEY_XF86NextFavorite _EVDEVK(0x16b) v2.5.26 KEY_CHANNEL */ +/* Use: XKB_KEY_XF86Favorites _EVDEVK(0x16c) v2.5.26 KEY_FAVORITES */ +/* Use: XKB_KEY_XF86MediaSelectProgramGuide _EVDEVK(0x16d) v2.5.26 KEY_EPG */ +#define XKB_KEY_XF86MediaSelectHome 0x1008116e /* v2.5.26 KEY_PVR */ +/* TODO: Multimedia Home Platform _EVDEVK(0x16f) v2.5.26 KEY_MHP */ +#define XKB_KEY_XF86MediaLanguageMenu 0x10081170 /* v2.5.26 KEY_LANGUAGE */ +#define XKB_KEY_XF86MediaTitleMenu 0x10081171 /* v2.5.26 KEY_TITLE */ +/* Use: XKB_KEY_XF86Subtitle _EVDEVK(0x172) v2.5.26 KEY_SUBTITLE */ +/* Use: XKB_KEY_XF86CycleAngle _EVDEVK(0x173) v2.5.26 KEY_ANGLE */ +/* Use: XKB_KEY_XF86FullScreen _EVDEVK(0x174) v5.1 KEY_FULL_SCREEN */ +#define XKB_KEY_XF86AudioChannelMode 0x10081175 /* v2.5.26 KEY_MODE */ +/* Use: XKB_KEY_XF86Keyboard _EVDEVK(0x176) v2.5.26 KEY_KEYBOARD */ +#define XKB_KEY_XF86AspectRatio 0x10081177 /* v5.1 KEY_ASPECT_RATIO */ +#define XKB_KEY_XF86MediaSelectPC 0x10081178 /* v2.5.26 KEY_PC */ +#define XKB_KEY_XF86MediaSelectTV 0x10081179 /* v2.5.26 KEY_TV */ +#define XKB_KEY_XF86MediaSelectCable 0x1008117a /* v2.5.26 KEY_TV2 */ +#define XKB_KEY_XF86MediaSelectVCR 0x1008117b /* v2.5.26 KEY_VCR */ +#define XKB_KEY_XF86MediaSelectVCRPlus 0x1008117c /* v2.5.26 KEY_VCR2 */ +#define XKB_KEY_XF86MediaSelectSatellite 0x1008117d /* v2.5.26 KEY_SAT */ +/* TODO: unclear media selector _EVDEVK(0x17e) v2.5.26 KEY_SAT2 */ +/* Use: XKB_KEY_XF86MediaSelectCD _EVDEVK(0x17f) v2.5.26 KEY_CD */ +#define XKB_KEY_XF86MediaSelectTape 0x10081180 /* v2.5.26 KEY_TAPE */ +#define XKB_KEY_XF86MediaSelectRadio 0x10081181 /* v2.5.26 KEY_RADIO */ +#define XKB_KEY_XF86MediaSelectTuner 0x10081182 /* v2.5.26 KEY_TUNER */ +#define XKB_KEY_XF86MediaPlayer 0x10081183 /* v2.5.26 KEY_PLAYER */ +#define XKB_KEY_XF86MediaSelectTeletext 0x10081184 /* v2.5.26 KEY_TEXT */ +#define XKB_KEY_XF86DVD 0x10081185 /* v2.5.26 KEY_DVD */ +#define XKB_KEY_XF86MediaSelectDVD 0x10081185 /* Alias for XF86DVD */ +#define XKB_KEY_XF86MediaSelectAuxiliary 0x10081186 /* v2.5.26 KEY_AUX */ +/* TODO: unclear media selector _EVDEVK(0x187) v2.5.26 KEY_MP3 */ +#define XKB_KEY_XF86Audio 0x10081188 /* v2.5.26 KEY_AUDIO */ +/* Use: XKB_KEY_XF86Video _EVDEVK(0x189) v2.5.26 KEY_VIDEO */ +/* TODO: unclear function _EVDEVK(0x18a) v2.5.26 KEY_DIRECTORY */ +/* TODO: unclear function _EVDEVK(0x18b) v2.5.26 KEY_LIST */ +/* Use: XKB_KEY_XF86Memo _EVDEVK(0x18c) v2.5.26 KEY_MEMO */ +/* Use: XKB_KEY_XF86Calendar _EVDEVK(0x18d) v2.5.26 KEY_CALENDAR */ +/* Use: XKB_KEY_XF86Red _EVDEVK(0x18e) v2.5.26 KEY_RED */ +/* Use: XKB_KEY_XF86Green _EVDEVK(0x18f) v2.5.26 KEY_GREEN */ +/* Use: XKB_KEY_XF86Yellow _EVDEVK(0x190) v2.5.26 KEY_YELLOW */ +/* Use: XKB_KEY_XF86Blue _EVDEVK(0x191) v2.5.26 KEY_BLUE */ +#define XKB_KEY_XF86ChannelUp 0x10081192 /* v2.5.26 KEY_CHANNELUP */ +#define XKB_KEY_XF86ChannelDown 0x10081193 /* v2.5.26 KEY_CHANNELDOWN */ +/* TODO: unclear function _EVDEVK(0x194) v2.5.26 KEY_FIRST */ +/* TODO: unclear function _EVDEVK(0x195) v2.5.26 KEY_LAST */ +/* TODO: unclear function _EVDEVK(0x196) v2.5.26 KEY_AB */ +/* TODO: unclear function _EVDEVK(0x197) v2.5.26 KEY_NEXT */ +/* TODO: unclear function _EVDEVK(0x198) v2.5.26 KEY_RESTART */ +#define XKB_KEY_XF86MediaPlaySlow 0x10081199 /* v2.5.26 KEY_SLOW */ +/* Use: XKB_KEY_XF86AudioRandomPlay _EVDEVK(0x19a) v2.5.26 KEY_SHUFFLE */ +#define XKB_KEY_XF86Break 0x1008119b /* v2.5.26 KEY_BREAK */ +/* TODO: unclear function _EVDEVK(0x19c) v2.5.26 KEY_PREVIOUS */ +#define XKB_KEY_XF86NumberEntryMode 0x1008119d /* v2.5.26 KEY_DIGITS */ +/* TODO: unclear function _EVDEVK(0x19e) v2.5.26 KEY_TEEN */ +/* TODO: unclear function (Twenties?) _EVDEVK(0x19f) v2.5.26 KEY_TWEN */ +#define XKB_KEY_XF86VideoPhone 0x100811a0 /* v2.6.20 KEY_VIDEOPHONE */ +/* Use: XKB_KEY_XF86Game _EVDEVK(0x1a1) v2.6.20 KEY_GAMES */ +/* Use: XKB_KEY_XF86ZoomIn _EVDEVK(0x1a2) v2.6.20 KEY_ZOOMIN */ +/* Use: XKB_KEY_XF86ZoomOut _EVDEVK(0x1a3) v2.6.20 KEY_ZOOMOUT */ +#define XKB_KEY_XF86ZoomReset 0x100811a4 /* v2.6.20 KEY_ZOOMRESET */ +/* Use: XKB_KEY_XF86Word _EVDEVK(0x1a5) v2.6.20 KEY_WORDPROCESSOR */ +#define XKB_KEY_XF86Editor 0x100811a6 /* v2.6.20 KEY_EDITOR */ +/* Use: XKB_KEY_XF86Excel _EVDEVK(0x1a7) v2.6.20 KEY_SPREADSHEET */ +#define XKB_KEY_XF86GraphicsEditor 0x100811a8 /* v2.6.20 KEY_GRAPHICSEDITOR */ +#define XKB_KEY_XF86Presentation 0x100811a9 /* v2.6.20 KEY_PRESENTATION */ +#define XKB_KEY_XF86Database 0x100811aa /* v2.6.20 KEY_DATABASE */ +/* Use: XKB_KEY_XF86News _EVDEVK(0x1ab) v2.6.20 KEY_NEWS */ +#define XKB_KEY_XF86Voicemail 0x100811ac /* v2.6.20 KEY_VOICEMAIL */ +#define XKB_KEY_XF86Addressbook 0x100811ad /* v2.6.20 KEY_ADDRESSBOOK */ +/* Use: XKB_KEY_XF86Messenger _EVDEVK(0x1ae) v2.6.20 KEY_MESSENGER */ +#define XKB_KEY_XF86DisplayToggle 0x100811af /* v2.6.20 KEY_DISPLAYTOGGLE */ +#define XKB_KEY_XF86SpellCheck 0x100811b0 /* v2.6.24 KEY_SPELLCHECK */ +/* Use: XKB_KEY_XF86LogOff _EVDEVK(0x1b1) v2.6.24 KEY_LOGOFF */ +/* Use: XKB_KEY_dollar _EVDEVK(0x1b2) v2.6.24 KEY_DOLLAR */ +/* Use: XKB_KEY_EuroSign _EVDEVK(0x1b3) v2.6.24 KEY_EURO */ +/* Use: XKB_KEY_XF86FrameBack _EVDEVK(0x1b4) v2.6.24 KEY_FRAMEBACK */ +/* Use: XKB_KEY_XF86FrameForward _EVDEVK(0x1b5) v2.6.24 KEY_FRAMEFORWARD */ +#define XKB_KEY_XF86ContextMenu 0x100811b6 /* v2.6.24 KEY_CONTEXT_MENU */ +#define XKB_KEY_XF86MediaRepeat 0x100811b7 /* v2.6.26 KEY_MEDIA_REPEAT */ +#define XKB_KEY_XF8610ChannelsUp 0x100811b8 /* v2.6.38 KEY_10CHANNELSUP */ +#define XKB_KEY_XF8610ChannelsDown 0x100811b9 /* v2.6.38 KEY_10CHANNELSDOWN */ +#define XKB_KEY_XF86Images 0x100811ba /* v2.6.39 KEY_IMAGES */ +#define XKB_KEY_XF86NotificationCenter 0x100811bc /* v5.10 KEY_NOTIFICATION_CENTER */ +#define XKB_KEY_XF86PickupPhone 0x100811bd /* v5.10 KEY_PICKUP_PHONE */ +#define XKB_KEY_XF86HangupPhone 0x100811be /* v5.10 KEY_HANGUP_PHONE */ +#define XKB_KEY_XF86Fn 0x100811d0 /* KEY_FN */ +#define XKB_KEY_XF86Fn_Esc 0x100811d1 /* KEY_FN_ESC */ +#define XKB_KEY_XF86FnRightShift 0x100811e5 /* v5.10 KEY_FN_RIGHT_SHIFT */ +/* Use: XKB_KEY_braille_dot_1 _EVDEVK(0x1f1) v2.6.17 KEY_BRL_DOT1 */ +/* Use: XKB_KEY_braille_dot_2 _EVDEVK(0x1f2) v2.6.17 KEY_BRL_DOT2 */ +/* Use: XKB_KEY_braille_dot_3 _EVDEVK(0x1f3) v2.6.17 KEY_BRL_DOT3 */ +/* Use: XKB_KEY_braille_dot_4 _EVDEVK(0x1f4) v2.6.17 KEY_BRL_DOT4 */ +/* Use: XKB_KEY_braille_dot_5 _EVDEVK(0x1f5) v2.6.17 KEY_BRL_DOT5 */ +/* Use: XKB_KEY_braille_dot_6 _EVDEVK(0x1f6) v2.6.17 KEY_BRL_DOT6 */ +/* Use: XKB_KEY_braille_dot_7 _EVDEVK(0x1f7) v2.6.17 KEY_BRL_DOT7 */ +/* Use: XKB_KEY_braille_dot_8 _EVDEVK(0x1f8) v2.6.17 KEY_BRL_DOT8 */ +/* Use: XKB_KEY_braille_dot_9 _EVDEVK(0x1f9) v2.6.23 KEY_BRL_DOT9 */ +/* Use: XKB_KEY_braille_dot_1 _EVDEVK(0x1fa) v2.6.23 KEY_BRL_DOT10 */ +#define XKB_KEY_XF86Numeric0 0x10081200 /* v2.6.28 KEY_NUMERIC_0 */ +#define XKB_KEY_XF86Numeric1 0x10081201 /* v2.6.28 KEY_NUMERIC_1 */ +#define XKB_KEY_XF86Numeric2 0x10081202 /* v2.6.28 KEY_NUMERIC_2 */ +#define XKB_KEY_XF86Numeric3 0x10081203 /* v2.6.28 KEY_NUMERIC_3 */ +#define XKB_KEY_XF86Numeric4 0x10081204 /* v2.6.28 KEY_NUMERIC_4 */ +#define XKB_KEY_XF86Numeric5 0x10081205 /* v2.6.28 KEY_NUMERIC_5 */ +#define XKB_KEY_XF86Numeric6 0x10081206 /* v2.6.28 KEY_NUMERIC_6 */ +#define XKB_KEY_XF86Numeric7 0x10081207 /* v2.6.28 KEY_NUMERIC_7 */ +#define XKB_KEY_XF86Numeric8 0x10081208 /* v2.6.28 KEY_NUMERIC_8 */ +#define XKB_KEY_XF86Numeric9 0x10081209 /* v2.6.28 KEY_NUMERIC_9 */ +#define XKB_KEY_XF86NumericStar 0x1008120a /* v2.6.28 KEY_NUMERIC_STAR */ +#define XKB_KEY_XF86NumericPound 0x1008120b /* v2.6.28 KEY_NUMERIC_POUND */ +#define XKB_KEY_XF86NumericA 0x1008120c /* v4.1 KEY_NUMERIC_A */ +#define XKB_KEY_XF86NumericB 0x1008120d /* v4.1 KEY_NUMERIC_B */ +#define XKB_KEY_XF86NumericC 0x1008120e /* v4.1 KEY_NUMERIC_C */ +#define XKB_KEY_XF86NumericD 0x1008120f /* v4.1 KEY_NUMERIC_D */ +#define XKB_KEY_XF86CameraFocus 0x10081210 /* v2.6.33 KEY_CAMERA_FOCUS */ +#define XKB_KEY_XF86WPSButton 0x10081211 /* v2.6.34 KEY_WPS_BUTTON */ +/* Use: XKB_KEY_XF86TouchpadToggle _EVDEVK(0x212) v2.6.37 KEY_TOUCHPAD_TOGGLE */ +/* Use: XKB_KEY_XF86TouchpadOn _EVDEVK(0x213) v2.6.37 KEY_TOUCHPAD_ON */ +/* Use: XKB_KEY_XF86TouchpadOff _EVDEVK(0x214) v2.6.37 KEY_TOUCHPAD_OFF */ +#define XKB_KEY_XF86CameraZoomIn 0x10081215 /* v2.6.39 KEY_CAMERA_ZOOMIN */ +#define XKB_KEY_XF86CameraZoomOut 0x10081216 /* v2.6.39 KEY_CAMERA_ZOOMOUT */ +#define XKB_KEY_XF86CameraUp 0x10081217 /* v2.6.39 KEY_CAMERA_UP */ +#define XKB_KEY_XF86CameraDown 0x10081218 /* v2.6.39 KEY_CAMERA_DOWN */ +#define XKB_KEY_XF86CameraLeft 0x10081219 /* v2.6.39 KEY_CAMERA_LEFT */ +#define XKB_KEY_XF86CameraRight 0x1008121a /* v2.6.39 KEY_CAMERA_RIGHT */ +#define XKB_KEY_XF86AttendantOn 0x1008121b /* v3.10 KEY_ATTENDANT_ON */ +#define XKB_KEY_XF86AttendantOff 0x1008121c /* v3.10 KEY_ATTENDANT_OFF */ +#define XKB_KEY_XF86AttendantToggle 0x1008121d /* v3.10 KEY_ATTENDANT_TOGGLE */ +#define XKB_KEY_XF86LightsToggle 0x1008121e /* v3.10 KEY_LIGHTS_TOGGLE */ +#define XKB_KEY_XF86ALSToggle 0x10081230 /* v3.13 KEY_ALS_TOGGLE */ +/* Use: XKB_KEY_XF86RotationLockToggle _EVDEVK(0x231) v4.16 KEY_ROTATE_LOCK_TOGGLE */ +#define XKB_KEY_XF86RefreshRateToggle 0x10081232 /* v6.9 KEY_REFRESH_RATE_TOGGLE */ +#define XKB_KEY_XF86Buttonconfig 0x10081240 /* v3.16 KEY_BUTTONCONFIG */ +#define XKB_KEY_XF86Taskmanager 0x10081241 /* v3.16 KEY_TASKMANAGER */ +#define XKB_KEY_XF86Journal 0x10081242 /* v3.16 KEY_JOURNAL */ +#define XKB_KEY_XF86ControlPanel 0x10081243 /* v3.16 KEY_CONTROLPANEL */ +#define XKB_KEY_XF86AppSelect 0x10081244 /* v3.16 KEY_APPSELECT */ +#define XKB_KEY_XF86Screensaver 0x10081245 /* v3.16 KEY_SCREENSAVER */ +#define XKB_KEY_XF86VoiceCommand 0x10081246 /* v3.16 KEY_VOICECOMMAND */ +#define XKB_KEY_XF86Assistant 0x10081247 /* v4.13 KEY_ASSISTANT */ +/* Use: XKB_KEY_ISO_Next_Group _EVDEVK(0x248) v5.2 KEY_KBD_LAYOUT_NEXT */ +#define XKB_KEY_XF86EmojiPicker 0x10081249 /* v5.13 KEY_EMOJI_PICKER */ +#define XKB_KEY_XF86Dictate 0x1008124a /* v5.17 KEY_DICTATE */ +#define XKB_KEY_XF86CameraAccessEnable 0x1008124b /* v6.2 KEY_CAMERA_ACCESS_ENABLE */ +#define XKB_KEY_XF86CameraAccessDisable 0x1008124c /* v6.2 KEY_CAMERA_ACCESS_DISABLE */ +#define XKB_KEY_XF86CameraAccessToggle 0x1008124d /* v6.2 KEY_CAMERA_ACCESS_TOGGLE */ +#define XKB_KEY_XF86Accessibility 0x1008124e /* v6.10 KEY_ACCESSIBILITY */ +#define XKB_KEY_XF86DoNotDisturb 0x1008124f /* v6.10 KEY_DO_NOT_DISTURB */ +#define XKB_KEY_XF86BrightnessMin 0x10081250 /* v3.16 KEY_BRIGHTNESS_MIN */ +#define XKB_KEY_XF86BrightnessMax 0x10081251 /* v3.16 KEY_BRIGHTNESS_MAX */ +#define XKB_KEY_XF86KbdInputAssistPrev 0x10081260 /* v3.18 KEY_KBDINPUTASSIST_PREV */ +#define XKB_KEY_XF86KbdInputAssistNext 0x10081261 /* v3.18 KEY_KBDINPUTASSIST_NEXT */ +#define XKB_KEY_XF86KbdInputAssistPrevgroup 0x10081262 /* v3.18 KEY_KBDINPUTASSIST_PREVGROUP */ +#define XKB_KEY_XF86KbdInputAssistNextgroup 0x10081263 /* v3.18 KEY_KBDINPUTASSIST_NEXTGROUP */ +#define XKB_KEY_XF86KbdInputAssistAccept 0x10081264 /* v3.18 KEY_KBDINPUTASSIST_ACCEPT */ +#define XKB_KEY_XF86KbdInputAssistCancel 0x10081265 /* v3.18 KEY_KBDINPUTASSIST_CANCEL */ +#define XKB_KEY_XF86RightUp 0x10081266 /* v4.7 KEY_RIGHT_UP */ +#define XKB_KEY_XF86RightDown 0x10081267 /* v4.7 KEY_RIGHT_DOWN */ +#define XKB_KEY_XF86LeftUp 0x10081268 /* v4.7 KEY_LEFT_UP */ +#define XKB_KEY_XF86LeftDown 0x10081269 /* v4.7 KEY_LEFT_DOWN */ +#define XKB_KEY_XF86RootMenu 0x1008126a /* v4.7 KEY_ROOT_MENU */ +#define XKB_KEY_XF86MediaTopMenu 0x1008126b /* v4.7 KEY_MEDIA_TOP_MENU */ +#define XKB_KEY_XF86Numeric11 0x1008126c /* v4.7 KEY_NUMERIC_11 */ +#define XKB_KEY_XF86Numeric12 0x1008126d /* v4.7 KEY_NUMERIC_12 */ +#define XKB_KEY_XF86AudioDesc 0x1008126e /* v4.7 KEY_AUDIO_DESC */ +#define XKB_KEY_XF863DMode 0x1008126f /* v4.7 KEY_3D_MODE */ +#define XKB_KEY_XF86NextFavorite 0x10081270 /* v4.7 KEY_NEXT_FAVORITE */ +#define XKB_KEY_XF86StopRecord 0x10081271 /* v4.7 KEY_STOP_RECORD */ +#define XKB_KEY_XF86PauseRecord 0x10081272 /* v4.7 KEY_PAUSE_RECORD */ +#define XKB_KEY_XF86VOD 0x10081273 /* v4.7 KEY_VOD */ +#define XKB_KEY_XF86Unmute 0x10081274 /* v4.7 KEY_UNMUTE */ +#define XKB_KEY_XF86FastReverse 0x10081275 /* v4.7 KEY_FASTREVERSE */ +#define XKB_KEY_XF86SlowReverse 0x10081276 /* v4.7 KEY_SLOWREVERSE */ +#define XKB_KEY_XF86Data 0x10081277 /* v4.7 KEY_DATA */ +#define XKB_KEY_XF86OnScreenKeyboard 0x10081278 /* v4.12 KEY_ONSCREEN_KEYBOARD */ +#define XKB_KEY_XF86PrivacyScreenToggle 0x10081279 /* v5.5 KEY_PRIVACY_SCREEN_TOGGLE */ +#define XKB_KEY_XF86SelectiveScreenshot 0x1008127a /* v5.6 KEY_SELECTIVE_SCREENSHOT */ +#define XKB_KEY_XF86NextElement 0x1008127b /* v5.18 KEY_NEXT_ELEMENT */ +#define XKB_KEY_XF86PreviousElement 0x1008127c /* v5.18 KEY_PREVIOUS_ELEMENT */ +#define XKB_KEY_XF86AutopilotEngageToggle 0x1008127d /* v5.18 KEY_AUTOPILOT_ENGAGE_TOGGLE */ +#define XKB_KEY_XF86MarkWaypoint 0x1008127e /* v5.18 KEY_MARK_WAYPOINT */ +#define XKB_KEY_XF86Sos 0x1008127f /* v5.18 KEY_SOS */ +#define XKB_KEY_XF86NavChart 0x10081280 /* v5.18 KEY_NAV_CHART */ +#define XKB_KEY_XF86FishingChart 0x10081281 /* v5.18 KEY_FISHING_CHART */ +#define XKB_KEY_XF86SingleRangeRadar 0x10081282 /* v5.18 KEY_SINGLE_RANGE_RADAR */ +#define XKB_KEY_XF86DualRangeRadar 0x10081283 /* v5.18 KEY_DUAL_RANGE_RADAR */ +#define XKB_KEY_XF86RadarOverlay 0x10081284 /* v5.18 KEY_RADAR_OVERLAY */ +#define XKB_KEY_XF86TraditionalSonar 0x10081285 /* v5.18 KEY_TRADITIONAL_SONAR */ +#define XKB_KEY_XF86ClearvuSonar 0x10081286 /* v5.18 KEY_CLEARVU_SONAR */ +#define XKB_KEY_XF86SidevuSonar 0x10081287 /* v5.18 KEY_SIDEVU_SONAR */ +#define XKB_KEY_XF86NavInfo 0x10081288 /* v5.18 KEY_NAV_INFO */ +/* Use: XKB_KEY_XF86BrightnessAdjust _EVDEVK(0x289) v5.18 KEY_BRIGHTNESS_MENU */ +#define XKB_KEY_XF86Macro1 0x10081290 /* v5.5 KEY_MACRO1 */ +#define XKB_KEY_XF86Macro2 0x10081291 /* v5.5 KEY_MACRO2 */ +#define XKB_KEY_XF86Macro3 0x10081292 /* v5.5 KEY_MACRO3 */ +#define XKB_KEY_XF86Macro4 0x10081293 /* v5.5 KEY_MACRO4 */ +#define XKB_KEY_XF86Macro5 0x10081294 /* v5.5 KEY_MACRO5 */ +#define XKB_KEY_XF86Macro6 0x10081295 /* v5.5 KEY_MACRO6 */ +#define XKB_KEY_XF86Macro7 0x10081296 /* v5.5 KEY_MACRO7 */ +#define XKB_KEY_XF86Macro8 0x10081297 /* v5.5 KEY_MACRO8 */ +#define XKB_KEY_XF86Macro9 0x10081298 /* v5.5 KEY_MACRO9 */ +#define XKB_KEY_XF86Macro10 0x10081299 /* v5.5 KEY_MACRO10 */ +#define XKB_KEY_XF86Macro11 0x1008129a /* v5.5 KEY_MACRO11 */ +#define XKB_KEY_XF86Macro12 0x1008129b /* v5.5 KEY_MACRO12 */ +#define XKB_KEY_XF86Macro13 0x1008129c /* v5.5 KEY_MACRO13 */ +#define XKB_KEY_XF86Macro14 0x1008129d /* v5.5 KEY_MACRO14 */ +#define XKB_KEY_XF86Macro15 0x1008129e /* v5.5 KEY_MACRO15 */ +#define XKB_KEY_XF86Macro16 0x1008129f /* v5.5 KEY_MACRO16 */ +#define XKB_KEY_XF86Macro17 0x100812a0 /* v5.5 KEY_MACRO17 */ +#define XKB_KEY_XF86Macro18 0x100812a1 /* v5.5 KEY_MACRO18 */ +#define XKB_KEY_XF86Macro19 0x100812a2 /* v5.5 KEY_MACRO19 */ +#define XKB_KEY_XF86Macro20 0x100812a3 /* v5.5 KEY_MACRO20 */ +#define XKB_KEY_XF86Macro21 0x100812a4 /* v5.5 KEY_MACRO21 */ +#define XKB_KEY_XF86Macro22 0x100812a5 /* v5.5 KEY_MACRO22 */ +#define XKB_KEY_XF86Macro23 0x100812a6 /* v5.5 KEY_MACRO23 */ +#define XKB_KEY_XF86Macro24 0x100812a7 /* v5.5 KEY_MACRO24 */ +#define XKB_KEY_XF86Macro25 0x100812a8 /* v5.5 KEY_MACRO25 */ +#define XKB_KEY_XF86Macro26 0x100812a9 /* v5.5 KEY_MACRO26 */ +#define XKB_KEY_XF86Macro27 0x100812aa /* v5.5 KEY_MACRO27 */ +#define XKB_KEY_XF86Macro28 0x100812ab /* v5.5 KEY_MACRO28 */ +#define XKB_KEY_XF86Macro29 0x100812ac /* v5.5 KEY_MACRO29 */ +#define XKB_KEY_XF86Macro30 0x100812ad /* v5.5 KEY_MACRO30 */ +#define XKB_KEY_XF86MacroRecordStart 0x100812b0 /* v5.5 KEY_MACRO_RECORD_START */ +#define XKB_KEY_XF86MacroRecordStop 0x100812b1 /* v5.5 KEY_MACRO_RECORD_STOP */ +#define XKB_KEY_XF86MacroPresetCycle 0x100812b2 /* v5.5 KEY_MACRO_PRESET_CYCLE */ +#define XKB_KEY_XF86MacroPreset1 0x100812b3 /* v5.5 KEY_MACRO_PRESET1 */ +#define XKB_KEY_XF86MacroPreset2 0x100812b4 /* v5.5 KEY_MACRO_PRESET2 */ +#define XKB_KEY_XF86MacroPreset3 0x100812b5 /* v5.5 KEY_MACRO_PRESET3 */ +#define XKB_KEY_XF86KbdLcdMenu1 0x100812b8 /* v5.5 KEY_KBD_LCD_MENU1 */ +#define XKB_KEY_XF86KbdLcdMenu2 0x100812b9 /* v5.5 KEY_KBD_LCD_MENU2 */ +#define XKB_KEY_XF86KbdLcdMenu3 0x100812ba /* v5.5 KEY_KBD_LCD_MENU3 */ +#define XKB_KEY_XF86KbdLcdMenu4 0x100812bb /* v5.5 KEY_KBD_LCD_MENU4 */ +#define XKB_KEY_XF86KbdLcdMenu5 0x100812bc /* v5.5 KEY_KBD_LCD_MENU5 */ +#undef _EVDEVK +/* + * Copyright (c) 1991, Oracle and/or its affiliates. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/************************************************************ + +Copyright 1991, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +***********************************************************/ + +/* + * Floating Accent + */ + +#define XKB_KEY_SunFA_Grave 0x1005ff00 +#define XKB_KEY_SunFA_Circum 0x1005ff01 +#define XKB_KEY_SunFA_Tilde 0x1005ff02 +#define XKB_KEY_SunFA_Acute 0x1005ff03 +#define XKB_KEY_SunFA_Diaeresis 0x1005ff04 +#define XKB_KEY_SunFA_Cedilla 0x1005ff05 + +/* + * Miscellaneous Functions + */ + +#define XKB_KEY_SunF36 0x1005ff10 /* Labeled F11 */ +#define XKB_KEY_SunF37 0x1005ff11 /* Labeled F12 */ + +#define XKB_KEY_SunSys_Req 0x1005ff60 +#define XKB_KEY_SunPrint_Screen 0x0000ff61 /* Same as XKB_KEY_Print */ + +/* + * International & Multi-Key Character Composition + */ + +#define XKB_KEY_SunCompose 0x0000ff20 /* Same as XKB_KEY_Multi_key */ +#define XKB_KEY_SunAltGraph 0x0000ff7e /* Same as XKB_KEY_Mode_switch */ + +/* + * Cursor Control + */ + +#define XKB_KEY_SunPageUp 0x0000ff55 /* Same as XKB_KEY_Prior */ +#define XKB_KEY_SunPageDown 0x0000ff56 /* Same as XKB_KEY_Next */ + +/* + * Open Look Functions + */ + +#define XKB_KEY_SunUndo 0x0000ff65 /* Same as XKB_KEY_Undo */ +#define XKB_KEY_SunAgain 0x0000ff66 /* Same as XKB_KEY_Redo */ +#define XKB_KEY_SunFind 0x0000ff68 /* Same as XKB_KEY_Find */ +#define XKB_KEY_SunStop 0x0000ff69 /* Same as XKB_KEY_Cancel */ +#define XKB_KEY_SunProps 0x1005ff70 +#define XKB_KEY_SunFront 0x1005ff71 +#define XKB_KEY_SunCopy 0x1005ff72 +#define XKB_KEY_SunOpen 0x1005ff73 +#define XKB_KEY_SunPaste 0x1005ff74 +#define XKB_KEY_SunCut 0x1005ff75 + +#define XKB_KEY_SunPowerSwitch 0x1005ff76 +#define XKB_KEY_SunAudioLowerVolume 0x1005ff77 +#define XKB_KEY_SunAudioMute 0x1005ff78 +#define XKB_KEY_SunAudioRaiseVolume 0x1005ff79 +#define XKB_KEY_SunVideoDegauss 0x1005ff7a +#define XKB_KEY_SunVideoLowerBrightness 0x1005ff7b +#define XKB_KEY_SunVideoRaiseBrightness 0x1005ff7c +#define XKB_KEY_SunPowerSwitchShift 0x1005ff7d +/*********************************************************** + +Copyright 1988, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright 1988 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +/* + * DEC private keysyms + * (29th bit set) + */ + +/* two-key compose sequence initiators, chosen to map to Latin1 characters */ + +#define XKB_KEY_Dring_accent 0x1000feb0 +#define XKB_KEY_Dcircumflex_accent 0x1000fe5e +#define XKB_KEY_Dcedilla_accent 0x1000fe2c +#define XKB_KEY_Dacute_accent 0x1000fe27 +#define XKB_KEY_Dgrave_accent 0x1000fe60 +#define XKB_KEY_Dtilde 0x1000fe7e +#define XKB_KEY_Ddiaeresis 0x1000fe22 + +/* special keysym for LK2** "Remove" key on editing keypad */ + +#define XKB_KEY_DRemove 0x1000ff00 /* Remove */ +/* + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the names of Hewlett Packard +or Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD +TO THIS SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. Hewlett-Packard shall not be liable for errors +contained herein or direct, indirect, special, incidental or +consequential damages in connection with the furnishing, +performance, or use of this material. + +*/ + + + +#define XKB_KEY_hpClearLine 0x1000ff6f +#define XKB_KEY_hpInsertLine 0x1000ff70 +#define XKB_KEY_hpDeleteLine 0x1000ff71 +#define XKB_KEY_hpInsertChar 0x1000ff72 +#define XKB_KEY_hpDeleteChar 0x1000ff73 +#define XKB_KEY_hpBackTab 0x1000ff74 +#define XKB_KEY_hpKP_BackTab 0x1000ff75 +#define XKB_KEY_hpModelock1 0x1000ff48 +#define XKB_KEY_hpModelock2 0x1000ff49 +#define XKB_KEY_hpReset 0x1000ff6c +#define XKB_KEY_hpSystem 0x1000ff6d +#define XKB_KEY_hpUser 0x1000ff6e +#define XKB_KEY_hpmute_acute 0x100000a8 +#define XKB_KEY_hpmute_grave 0x100000a9 +#define XKB_KEY_hpmute_asciicircum 0x100000aa +#define XKB_KEY_hpmute_diaeresis 0x100000ab +#define XKB_KEY_hpmute_asciitilde 0x100000ac +#define XKB_KEY_hplira 0x100000af +#define XKB_KEY_hpguilder 0x100000be +#define XKB_KEY_hpYdiaeresis 0x100000ee +#define XKB_KEY_hpIO 0x100000ee /* deprecated alias for hpYdiaeresis */ +#define XKB_KEY_hplongminus 0x100000f6 +#define XKB_KEY_hpblock 0x100000fc + + + +#define XKB_KEY_osfCopy 0x1004ff02 +#define XKB_KEY_osfCut 0x1004ff03 +#define XKB_KEY_osfPaste 0x1004ff04 +#define XKB_KEY_osfBackTab 0x1004ff07 +#define XKB_KEY_osfBackSpace 0x1004ff08 +#define XKB_KEY_osfClear 0x1004ff0b +#define XKB_KEY_osfEscape 0x1004ff1b +#define XKB_KEY_osfAddMode 0x1004ff31 +#define XKB_KEY_osfPrimaryPaste 0x1004ff32 +#define XKB_KEY_osfQuickPaste 0x1004ff33 +#define XKB_KEY_osfPageLeft 0x1004ff40 +#define XKB_KEY_osfPageUp 0x1004ff41 +#define XKB_KEY_osfPageDown 0x1004ff42 +#define XKB_KEY_osfPageRight 0x1004ff43 +#define XKB_KEY_osfActivate 0x1004ff44 +#define XKB_KEY_osfMenuBar 0x1004ff45 +#define XKB_KEY_osfLeft 0x1004ff51 +#define XKB_KEY_osfUp 0x1004ff52 +#define XKB_KEY_osfRight 0x1004ff53 +#define XKB_KEY_osfDown 0x1004ff54 +#define XKB_KEY_osfEndLine 0x1004ff57 +#define XKB_KEY_osfBeginLine 0x1004ff58 +#define XKB_KEY_osfEndData 0x1004ff59 +#define XKB_KEY_osfBeginData 0x1004ff5a +#define XKB_KEY_osfPrevMenu 0x1004ff5b +#define XKB_KEY_osfNextMenu 0x1004ff5c +#define XKB_KEY_osfPrevField 0x1004ff5d +#define XKB_KEY_osfNextField 0x1004ff5e +#define XKB_KEY_osfSelect 0x1004ff60 +#define XKB_KEY_osfInsert 0x1004ff63 +#define XKB_KEY_osfUndo 0x1004ff65 +#define XKB_KEY_osfMenu 0x1004ff67 +#define XKB_KEY_osfCancel 0x1004ff69 +#define XKB_KEY_osfHelp 0x1004ff6a +#define XKB_KEY_osfSelectAll 0x1004ff71 +#define XKB_KEY_osfDeselectAll 0x1004ff72 +#define XKB_KEY_osfReselect 0x1004ff73 +#define XKB_KEY_osfExtend 0x1004ff74 +#define XKB_KEY_osfRestore 0x1004ff78 +#define XKB_KEY_osfDelete 0x1004ffff + + + +/************************************************************** + * The use of the following macros is deprecated. + * They are listed below only for backwards compatibility. + */ +#define XKB_KEY_Reset 0x1000ff6c /* deprecated alias for hpReset */ +#define XKB_KEY_System 0x1000ff6d /* deprecated alias for hpSystem */ +#define XKB_KEY_User 0x1000ff6e /* deprecated alias for hpUser */ +#define XKB_KEY_ClearLine 0x1000ff6f /* deprecated alias for hpClearLine */ +#define XKB_KEY_InsertLine 0x1000ff70 /* deprecated alias for hpInsertLine */ +#define XKB_KEY_DeleteLine 0x1000ff71 /* deprecated alias for hpDeleteLine */ +#define XKB_KEY_InsertChar 0x1000ff72 /* deprecated alias for hpInsertChar */ +#define XKB_KEY_DeleteChar 0x1000ff73 /* deprecated alias for hpDeleteChar */ +#define XKB_KEY_BackTab 0x1000ff74 /* deprecated alias for hpBackTab */ +#define XKB_KEY_KP_BackTab 0x1000ff75 /* deprecated alias for hpKP_BackTab */ +#define XKB_KEY_Ext16bit_L 0x1000ff76 /* deprecated */ +#define XKB_KEY_Ext16bit_R 0x1000ff77 /* deprecated */ +#define XKB_KEY_mute_acute 0x100000a8 /* deprecated alias for hpmute_acute */ +#define XKB_KEY_mute_grave 0x100000a9 /* deprecated alias for hpmute_grave */ +#define XKB_KEY_mute_asciicircum 0x100000aa /* deprecated alias for hpmute_asciicircum */ +#define XKB_KEY_mute_diaeresis 0x100000ab /* deprecated alias for hpmute_diaeresis */ +#define XKB_KEY_mute_asciitilde 0x100000ac /* deprecated alias for hpmute_asciitilde */ +#define XKB_KEY_lira 0x100000af /* deprecated alias for hplira */ +#define XKB_KEY_guilder 0x100000be /* deprecated alias for hpguilder */ +#define XKB_KEY_IO 0x100000ee /* deprecated alias for hpYdiaeresis */ +#define XKB_KEY_longminus 0x100000f6 /* deprecated alias for hplongminus */ +#define XKB_KEY_block 0x100000fc /* deprecated alias for hpblock */ + + + +#endif diff --git a/src/linux/vendor/xkbcommon/xkbcommon-names.h b/src/linux/vendor/xkbcommon/xkbcommon-names.h new file mode 100644 index 0000000..791e549 --- /dev/null +++ b/src/linux/vendor/xkbcommon/xkbcommon-names.h @@ -0,0 +1,144 @@ +/* + * Copyright © 2012 Intel Corporation + * SPDX-License-Identifier: MIT + * + * Author: Daniel Stone + */ + +#ifndef _XKBCOMMON_NAMES_H +#define _XKBCOMMON_NAMES_H + +/** + * @file + * @brief Predefined names for common modifiers and LEDs. + */ + +/** + * @defgroup modifier-names Predefined names for common modifiers and LEDs + * + * @{ + */ + +/** + * @defgroup real-modifier-names Real modifiers names + * + * [*Real* modifiers][real modifier] names are hardcoded in libxkbcommon. + * + * [real modifier]: @ref real-modifier-def + * + * @{ + */ +#define XKB_MOD_NAME_SHIFT "Shift" +#define XKB_MOD_NAME_CAPS "Lock" +#define XKB_MOD_NAME_CTRL "Control" +#define XKB_MOD_NAME_MOD1 "Mod1" +#define XKB_MOD_NAME_MOD2 "Mod2" +#define XKB_MOD_NAME_MOD3 "Mod3" +#define XKB_MOD_NAME_MOD4 "Mod4" +#define XKB_MOD_NAME_MOD5 "Mod5" +/** @} */ + +/** + * @defgroup virtual-modifier-names Virtual modifiers names + * + * Common [*virtual* modifiers][virtual modifiers], encoded in [xkeyboard-config] + * in the [compat] and [symbols] files. They have been stable since the beginning + * of the project and are unlikely to ever change. + * + * [virtual modifiers]: @ref virtual-modifier-def + * [xkeyboard-config]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config + * [compat]: @ref the-xkb_compat-section + * [symbols]: @ref the-xkb_symbols-section + * + * @{ + */ +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_ALT "Alt" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_HYPER "Hyper" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_LEVEL3 "LevelThree" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_LEVEL5 "LevelFive" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_META "Meta" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_NUM "NumLock" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_SCROLL "ScrollLock" +/** @since 1.8.0 */ +#define XKB_VMOD_NAME_SUPER "Super" +/** @} */ + +/** + * @defgroup legacy-virtual-modifier-names Legacy virtual modifier names + * + * Usual [*virtual* modifiers][virtual modifiers] mappings to + * [*real* modifiers][real modifiers]. + * + * @deprecated Use @ref virtual-modifier-names instead + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + * + * @{ + */ +/** + * Usual [*real* modifier][real modifier] for the + * [*virtual* modifier][virtual modifier] `Alt`. + * + * @deprecated Use `::XKB_VMOD_NAME_ALT` instead. + * @since 1.10: deprecated + * + * [virtual modifier]: @ref virtual-modifier-def + * [real modifier]: @ref real-modifier-def + */ +#define XKB_MOD_NAME_ALT "Mod1" +/** + * Usual [*real* modifier][real modifier] for the + * [*virtual* modifier][virtual modifier] `Super`. + * + * @deprecated Use `::XKB_VMOD_NAME_SUPER` instead. + * @since 1.10: deprecated + * + * [virtual modifier]: @ref virtual-modifier-def + * [real modifier]: @ref real-modifier-def + */ +#define XKB_MOD_NAME_LOGO "Mod4" +/** + * Usual [*real* modifier][real modifier] for the + * [*virtual* modifier][virtual modifier] `NumLock`. + * + * @deprecated Use `::XKB_VMOD_NAME_NUM` instead. + * @since 1.10: deprecated + * + * [virtual modifier]: @ref virtual-modifier-def + * [real modifier]: @ref real-modifier-def + */ +#define XKB_MOD_NAME_NUM "Mod2" +/** @} */ + +/** + * @defgroup led-names LEDs names + * + * LEDs names are encoded in [xkeyboard-config], in the [keycodes] and [compat] + * files. They have been stable since the beginning of the project and are + * unlikely to ever change. + * + * [xkeyboard-config]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config + * [keycodes]: @ref the-xkb_keycodes-section + * [compat]: @ref the-xkb_compat-section + * + * @{ + */ +#define XKB_LED_NAME_NUM "Num Lock" +#define XKB_LED_NAME_CAPS "Caps Lock" +#define XKB_LED_NAME_SCROLL "Scroll Lock" +/** @since 1.8.0 */ +#define XKB_LED_NAME_COMPOSE "Compose" +#define XKB_LED_NAME_KANA "Kana" +/** @} */ + +/** @} */ + +#endif diff --git a/src/linux/vendor/xkbcommon/xkbcommon.h b/src/linux/vendor/xkbcommon/xkbcommon.h new file mode 100644 index 0000000..fbd6f21 --- /dev/null +++ b/src/linux/vendor/xkbcommon/xkbcommon.h @@ -0,0 +1,2514 @@ +/* + * For MIT-open-group: + * Copyright 1985, 1987, 1990, 1998 The Open Group + * Copyright 2008 Dan Nicholson + * + * For HPND: + * Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + * SPDX-License-Identifier: HPND + * + * For MIT: + * Copyright © 2009-2012 Daniel Stone + * Copyright © 2012 Intel Corporation + * Copyright © 2012 Ran Benita + * + * SPDX-License-Identifier: MIT-open-group AND HPND AND MIT + * + * Author: Daniel Stone + */ + +#ifndef _XKBCOMMON_H_ +#define _XKBCOMMON_H_ + +#include +#include +#include +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(__GNUC__) && !defined(__CYGWIN__) +# define XKB_EXPORT __attribute__((visibility("default"))) +#elif defined(_WIN32) +# define XKB_EXPORT __declspec(dllexport) +#else +# define XKB_EXPORT +#endif + +/** + * @file + * Main libxkbcommon API. + */ + +/** + * @struct xkb_context + * Opaque top level library context object. + * + * The context contains various general library data and state, like + * logging level and include paths. + * + * Objects are created in a specific context, and multiple contexts may + * coexist simultaneously. Objects from different contexts are completely + * separated and do not share any memory or state. + */ +struct xkb_context; + +/** + * @struct xkb_keymap + * Opaque compiled keymap object. + * + * The keymap object holds all of the static keyboard information obtained + * from compiling XKB files. + * + * A keymap is immutable after it is created (besides reference counts, etc.); + * if you need to change it, you must create a new one. + */ +struct xkb_keymap; + +/** + * @struct xkb_state + * Opaque keyboard state object. + * + * State objects contain the active state of a keyboard (or keyboards), such + * as the currently effective layout and the active modifiers. It acts as a + * simple state machine, wherein key presses and releases are the input, and + * key symbols (keysyms) are the output. + */ +struct xkb_state; + +/** + * A number used to represent a physical key on a keyboard. + * + * A standard PC-compatible keyboard might have 102 keys. An appropriate + * keymap would assign each of them a keycode, by which the user should + * refer to the key throughout the library. + * + * Historically, the X11 protocol, and consequentially the XKB protocol, + * assign only 8 bits for keycodes. This limits the number of different + * keys that can be used simultaneously in a single keymap to 256 + * (disregarding other limitations). This library does not share this limit; + * keycodes beyond 255 (*extended* keycodes) are not treated specially. + * Keymaps and applications which are compatible with X11 should not use + * these keycodes. + * + * The values of specific keycodes are determined by the keymap and the + * underlying input system. For example, with an X11-compatible keymap + * and Linux evdev scan codes (see `linux/input.h`), a fixed offset is used: + * + * The keymap defines a canonical name for each key, plus possible aliases. + * Historically, the XKB protocol restricts these names to at most 4 (ASCII) + * characters, but this library does not share this limit. + * + * @code + * xkb_keycode_t keycode_A = KEY_A + 8; + * @endcode + * + * @sa xkb_keycode_is_legal_ext() xkb_keycode_is_legal_x11() + */ +typedef uint32_t xkb_keycode_t; + +/** + * A number used to represent the symbols generated from a key on a keyboard. + * + * A key, represented by a keycode, may generate different symbols according + * to keyboard state. For example, on a QWERTY keyboard, pressing the key + * labled \ generates the symbol ‘a’. If the Shift key is held, it + * generates the symbol ‘A’. If a different layout is used, say Greek, + * it generates the symbol ‘α’. And so on. + * + * Each such symbol is represented by a *keysym* (short for “key symbol”). + * Note that keysyms are somewhat more general, in that they can also represent + * some “function”, such as “Left” or “Right” for the arrow keys. For more + * information, see: Appendix A [“KEYSYM Encoding”][encoding] of the X Window + * System Protocol. + * + * Specifically named keysyms can be found in the + * xkbcommon/xkbcommon-keysyms.h header file. Their name does not include + * the `XKB_KEY_` prefix. + * + * Besides those, any Unicode/ISO 10646 character in the range U+0100 to + * U+10FFFF can be represented by a keysym value in the range 0x01000100 to + * 0x0110FFFF. The name of Unicode keysyms is `U`, e.g. `UA1B2`. + * + * The name of other unnamed keysyms is the hexadecimal representation of + * their value, e.g. `0xabcd1234`. + * + * Keysym names are case-sensitive. + * + * @note **Encoding:** Keysyms are 32-bit integers with the 3 most significant + * bits always set to zero. Thus valid keysyms are in the range + * `0 .. 0x1fffffff` = @ref XKB_KEYSYM_MAX. + * See: Appendix A [“KEYSYM Encoding”][encoding] of the X Window System Protocol. + * + * [encoding]: https://www.x.org/releases/current/doc/xproto/x11protocol.html#keysym_encoding + * + * @ingroup keysyms + * @sa `::XKB_KEYSYM_MAX` + */ +typedef uint32_t xkb_keysym_t; + +/** + * Index of a keyboard layout. + * + * The layout index is a state component which determines which keyboard + * layout is active. These may be different alphabets, different key + * arrangements, etc. + * + * Layout indices are consecutive. The first layout has index 0. + * + * Each layout is not required to have a name, and the names are not + * guaranteed to be unique (though they are usually provided and unique). + * Therefore, it is not safe to use the name as a unique identifier for a + * layout. Layout names are case-sensitive. + * + * Layout names are specified in the layout’s definition, for example + * “English (US)”. These are different from the (conventionally) short names + * which are used to locate the layout, for example `us` or `us(intl)`. These + * names are not present in a compiled keymap. + * + * If the user selects layouts from a list generated from the XKB registry + * (using libxkbregistry or directly), and this metadata is needed later on, it + * is recommended to store it along with the keymap. + * + * Layouts are also called *groups* by XKB. + * + * @sa xkb_keymap::xkb_keymap_num_layouts() + * @sa xkb_keymap::xkb_keymap_num_layouts_for_key() + */ +typedef uint32_t xkb_layout_index_t; +/** A mask of layout indices. */ +typedef uint32_t xkb_layout_mask_t; + +/** + * Index of a shift level. + * + * Any key, in any layout, can have several shift levels. Each + * shift level can assign different keysyms to the key. The shift level + * to use is chosen according to the current keyboard state; for example, + * if no keys are pressed, the first level may be used; if the Left Shift + * key is pressed, the second; if Num Lock is pressed, the third; and + * many such combinations are possible (see `xkb_mod_index_t`). + * + * Level indices are consecutive. The first level has index 0. + */ +typedef uint32_t xkb_level_index_t; + +/** + * Index of a modifier. + * + * A @e modifier is a state component which changes the way keys are + * interpreted. A keymap defines a set of modifiers, such as Alt, Shift, + * Num Lock or Meta, and specifies which keys may @e activate which + * modifiers (in a many-to-many relationship, i.e. a key can activate + * several modifiers, and a modifier may be activated by several keys. + * Different keymaps do this differently). + * + * When retrieving the keysyms for a key, the active modifier set is + * consulted; this determines the correct shift level to use within the + * currently active layout (see `xkb_level_index_t`). + * + * Modifier indices are consecutive. The first modifier has index 0. + * + * Each modifier must have a name, and the names are unique. Therefore, it + * is safe to use the name as a unique identifier for a modifier. The names + * of some common modifiers are provided in the `xkbcommon/xkbcommon-names.h` + * header file. Modifier names are case-sensitive. + * + * @sa xkb_keymap_num_mods() + */ +typedef uint32_t xkb_mod_index_t; +/** A mask of modifier indices. */ +typedef uint32_t xkb_mod_mask_t; + +/** + * Index of a keyboard LED. + * + * LEDs are logical objects which may be @e active or @e inactive. They + * typically correspond to the lights on the keyboard. Their state is + * determined by the current keyboard state. + * + * LED indices are non-consecutive. The first LED has index 0. + * + * Each LED must have a name, and the names are unique. Therefore, + * it is safe to use the name as a unique identifier for a LED. The names + * of some common LEDs are provided in the `xkbcommon/xkbcommon-names.h` + * header file. LED names are case-sensitive. + * + * @warning A given keymap may specify an exact index for a given LED. + * Therefore, LED indexing is not necessarily sequential, as opposed to + * modifiers and layouts. This means that when iterating over the LEDs + * in a keymap using e.g. xkb_keymap::xkb_keymap_num_leds(), some indices might + * be invalid. + * Given such an index, functions like xkb_keymap::xkb_keymap_led_get_name() + * will return `NULL`, and `xkb_state::xkb_state_led_index_is_active()` will + * return -1. + * + * LEDs are also called *indicators* by XKB. + * + * @sa `xkb_keymap::xkb_keymap_num_leds()` + */ +typedef uint32_t xkb_led_index_t; +/** A mask of LED indices. */ +typedef uint32_t xkb_led_mask_t; + +/** Invalid keycode */ +#define XKB_KEYCODE_INVALID (0xffffffff) +/** Invalid layout index */ +#define XKB_LAYOUT_INVALID (0xffffffff) +/** Invalid level index */ +#define XKB_LEVEL_INVALID (0xffffffff) +/** Invalid modifier index */ +#define XKB_MOD_INVALID (0xffffffff) +/** Invalid LED index */ +#define XKB_LED_INVALID (0xffffffff) + +/** Maximum legal keycode */ +#define XKB_KEYCODE_MAX (0xffffffff - 1) + +/** + * Maximum keysym value + * + * @since 1.6.0 + * @sa xkb_keysym_t + * @ingroup keysyms + */ +#define XKB_KEYSYM_MAX 0x1fffffff + +/** + * Test whether a value is a valid extended keycode. + * @sa xkb_keycode_t + **/ +#define xkb_keycode_is_legal_ext(key) ((key) <= XKB_KEYCODE_MAX) + +/** + * Test whether a value is a valid X11 keycode. + * @sa xkb_keycode_t + */ +#define xkb_keycode_is_legal_x11(key) ((key) >= 8 && (key) <= 255) + +/** + * @defgroup rules-api Rules + * Utility functions related to *rules*, whose purpose is introduced in: + * @ref xkb-the-config "". + * + * @{ + */ + +/** + * @struct xkb_rmlvo_builder + * Opaque [RMLVO] configuration object. + * + * It denotes the configuration values by which a user picks a keymap. + * + * @see [Introduction to RMLVO][RMLVO] + * @see @ref rules-api "" + * @since 1.11.0 + * + * [RMLVO]: @ref RMLVO-intro + */ +struct xkb_rmlvo_builder; + +enum xkb_rmlvo_builder_flags { + XKB_RMLVO_BUILDER_NO_FLAGS = 0 +}; + +/** + * Create a new [RMLVO] builder. + * + * @param context The context in which to create the builder. + * @param rules The ruleset. + * If `NULL` or the empty string `""`, a default value is used. + * If the `XKB_DEFAULT_RULES` environment variable is set, it is used + * as the default. Otherwise the system default is used. + * @param model The keyboard model. + * If `NULL` or the empty string `""`, a default value is used. + * If the `XKB_DEFAULT_MODEL` environment variable is set, it is used + * as the default. Otherwise the system default is used. + * @param flags Optional flags for the builder, or 0. + * + * @returns A `xkb_rmlvo_builder`, or `NULL` if the compilation failed. + * + * @see `xkb_rule_names` for a detailed description of `rules` and `model`. + * @since 1.11.0 + * @memberof xkb_rmlvo_builder + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT struct xkb_rmlvo_builder* +xkb_rmlvo_builder_new(struct xkb_context *context, + const char *rules, const char *model, + enum xkb_rmlvo_builder_flags flags); + +/** + * Append a layout to the given [RMLVO] builder. + * + * @param rmlvo The builder to modify. + * @param layout The name of the layout. + * @param variant The name of the layout variant, or `NULL` to + * select the default variant. + * @param options An array of options to apply only to this layout, or + * `NULL` if there is no such options. + * @param options_len The length of @p options. + * + * @note The options are only effectual if the corresponding ruleset has the + * proper rules to handle them as *layout-specific* options. + * @note See `rxkb_option_is_layout_specific()` to query whether an option + * supports the layout-specific feature. + * + * @returns `true` if the call succeeded, otherwise `false`. + * + * @since 1.11.0 + * @memberof xkb_rmlvo_builder + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT bool +xkb_rmlvo_builder_append_layout(struct xkb_rmlvo_builder *rmlvo, + const char *layout, const char *variant, + const char* const* options, size_t options_len); + +/** + * Append an option to the given [RMLVO] builder. + * + * @param rmlvo The builder to modify. + * @param option The name of the option. + * + * @returns `true` if the call succeeded, otherwise `false`. + * + * @since 1.11.0 + * @memberof xkb_rmlvo_builder + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT bool +xkb_rmlvo_builder_append_option(struct xkb_rmlvo_builder *rmlvo, + const char *option); + +/** + * Take a new reference on a [RMLVO] builder. + * + * @param rmlvo The builder to reference. + * + * @returns The passed in builder. + * + * @since 1.11.0 + * @memberof xkb_rmlvo_builder + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT struct xkb_rmlvo_builder * +xkb_rmlvo_builder_ref(struct xkb_rmlvo_builder *rmlvo); + +/** + * Release a reference on a [RMLVO] builder, and possibly free it. + * + * @param rmlvo The builder. If it is `NULL`, this function does nothing. + * + * @since 1.11.0 + * @memberof xkb_rmlvo_builder + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT void +xkb_rmlvo_builder_unref(struct xkb_rmlvo_builder *rmlvo); + +/** + * Names to compile a keymap with, also known as [RMLVO]. + * + * The names are the common configuration values by which a user picks + * a keymap. + * + * If the entire struct is `NULL`, then each field is taken to be `NULL`. + * You should prefer passing `NULL` instead of choosing your own defaults. + * + * @see [Introduction to RMLVO][RMLVO] + * @see @ref rules-api "" + * + * [RMLVO]: @ref RMLVO-intro + */ +struct xkb_rule_names { + /** + * The rules file to use. The rules file describes how to interpret + * the values of the model, layout, variant and options fields. + * + * If `NULL` or the empty string `""`, a default value is used. + * If the `XKB_DEFAULT_RULES` environment variable is set, it is used + * as the default. Otherwise the system default is used. + */ + const char *rules; + /** + * The keyboard model by which to interpret keycodes and LEDs. + * + * If `NULL` or the empty string `""`, a default value is used. + * If the `XKB_DEFAULT_MODEL` environment variable is set, it is used + * as the default. Otherwise the system default is used. + */ + const char *model; + /** + * A comma separated list of layouts (languages) to include in the + * keymap. + * + * If `NULL` or the empty string `""`, a default value is used. + * If the `XKB_DEFAULT_LAYOUT` environment variable is set, it is used + * as the default. Otherwise the system default is used. + */ + const char *layout; + /** + * A comma separated list of variants, one per layout, which may + * modify or augment the respective layout in various ways. + * + * Generally, should either be empty or have the same number of values + * as the number of layouts. You may use empty values as in `intl,,neo`. + * + * If `NULL` or the empty string `""`, and a default value is also used + * for the layout, a default value is used. Otherwise no variant is + * used. + * If the `XKB_DEFAULT_VARIANT` environment variable is set, it is used + * as the default. Otherwise the system default is used. + */ + const char *variant; + /** + * A comma separated list of options, through which the user specifies + * non-layout related preferences, like which key combinations are used + * for switching layouts, or which key is the Compose key. + * + * If `NULL`, a default value is used. If the empty string `""`, no + * options are used. + * If the `XKB_DEFAULT_OPTIONS` environment variable is set, it is used + * as the default. Otherwise the system default is used. + * + * Each option can additionally have a *layout index specifier*, so that it + * applies only if matching the given layout. The index is specified by + * appending `!` immediately after the option name, then the 1-indexed + * target layout in decimal format: e.g. `ns:option!2`. When no layout is + * specified, it matches any layout. + * + * @note The layout index specifier is only effectual if the corresponding + * ruleset has the proper rules to handle the option as *layout-specific*. + * @note See `rxkb_option_is_layout_specific()` to query whether an option + * supports the layout-specific feature. + * + * @since 1.11.0: Layout index specifier using `!`. + */ + const char *options; +}; + +/** + * Keymap components, also known as [KcCGST]. + * + * The components are the result of the [RMLVO] resolution. + * + * @see [Introduction to RMLVO][RMLVO] + * @see [Introduction to KcCGST][KcCGST] + * @see @ref rules-api "" + * + * [RMLVO]: @ref RMLVO-intro + * [KcCGST]: @ref KcCGST-intro + */ +struct xkb_component_names { + char *keycodes; + char *compatibility; + char *geometry; + char *symbols; + char *types; +}; + +/** + * Resolve [RMLVO] names to [KcCGST] components. + * + * This function is used primarily for *debugging*. See + * `xkb_keymap::xkb_keymap_new_from_names2()` for creating keymaps from + * [RMLVO] names. + * + * @param[in] context The context in which to resolve the names. + * @param[in] rmlvo_in The [RMLVO] names to use. + * @param[out] rmlvo_out The [RMLVO] names actually used after resolving + * missing values. + * @param[out] components_out The [KcCGST] components resulting of the [RMLVO] + * resolution. + * + * @c rmlvo_out and @c components can be omitted by using `NULL`, but not both. + * + * If @c components is not `NULL`, it is filled with dynamically-allocated + * strings that should be freed by the caller. + * + * @returns `true` if the [RMLVO] names could be resolved, `false` otherwise. + * + * @see [Introduction to RMLVO][RMLVO] + * @see [Introduction to KcCGST][KcCGST] + * @see xkb_rule_names + * @see xkb_component_names + * @see xkb_keymap::xkb_keymap_new_from_names2() + * + * @since 1.9.0 + * @memberof xkb_component_names + * + * [RMLVO]: @ref RMLVO-intro + * [KcCGST]: @ref KcCGST-intro + */ +XKB_EXPORT bool +xkb_components_names_from_rules(struct xkb_context *context, + const struct xkb_rule_names *rmlvo_in, + struct xkb_rule_names *rmlvo_out, + struct xkb_component_names *components_out); + +/** @} */ + +/** + * @defgroup keysyms Keysyms + * Utility functions related to *keysyms* (short for “key symbols”). + * + * @{ + */ + +/** + * @page keysym-transformations Keysym Transformations + * + * Keysym translation is subject to several *keysym transformations*, + * as described in the XKB specification. These are: + * + *
+ *
Capitalization transformation
+ *
+ * If the Caps Lock modifier is + * active and was not consumed by the translation process, keysyms + * are transformed to their upper-case form (if applicable). + * Similarly, the UTF-8/UTF-32 string produced is capitalized. + * + * This is described in: + * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Lock_Modifier + *
+ *
Control transformation
+ *
+ * If the Control modifier is active and + * was not consumed by the translation process, the string produced + * is transformed to its matching ASCII control character (if + * applicable). Keysyms are not affected. + * + * This is described in: + * https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Interpreting_the_Control_Modifier + *
+ *
+ * + * Each relevant function discusses which transformations it performs. + * + * These transformations are not applicable when a key produces multiple + * keysyms. + */ + + +/** + * Get the name of a keysym. + * + * For a description of how keysyms are named, see @ref xkb_keysym_t. + * + * @param[in] keysym The keysym. + * @param[out] buffer A string buffer to write the name into. + * @param[in] size Size of the buffer. + * + * @warning If the buffer passed is too small, the string is truncated + * (though still `NULL`-terminated); a size of at least 64 bytes is recommended. + * + * @returns The number of bytes in the name, excluding the `NULL` byte. If + * the keysym is invalid, returns -1. + * + * You may check if truncation has occurred by comparing the return value + * with the length of buffer, similarly to the `snprintf(3)` function. + * + * @sa `xkb_keysym_t` + */ +XKB_EXPORT int +xkb_keysym_get_name(xkb_keysym_t keysym, char *buffer, size_t size); + +/** Flags for xkb_keysym_from_name(). */ +enum xkb_keysym_flags { + /** Do not apply any flags. */ + XKB_KEYSYM_NO_FLAGS = 0, + /** Find keysym by case-insensitive search. */ + XKB_KEYSYM_CASE_INSENSITIVE = (1 << 0) +}; + +/** + * Get a keysym from its name. + * + * @param name The name of a keysym. See remarks in `xkb_keysym_get_name()`; + * this function will accept any name returned by that function. + * @param flags A set of flags controlling how the search is done. If + * invalid flags are passed, this will fail with `XKB_KEY_NoSymbol`. + * + * If you use the `::XKB_KEYSYM_CASE_INSENSITIVE` flag and two keysym names + * differ only by case, then the lower-case keysym name is returned. For + * instance, for KEY_a and KEY_A, this function would return KEY_a for the + * case-insensitive search. If this functionality is needed, it is + * recommended to first call this function without this flag; and if that + * fails, only then to try with this flag, while possibly warning the user + * he had misspelled the name, and might get wrong results. + * + * Case folding is done according to the C locale; the current locale is not + * consulted. + * + * @returns The keysym. If the name is invalid, returns `XKB_KEY_NoSymbol`. + * + * @sa xkb_keysym_t + * @since 1.9.0: Enable support for C0 and C1 control characters in the Unicode + * notation. + */ +XKB_EXPORT xkb_keysym_t +xkb_keysym_from_name(const char *name, enum xkb_keysym_flags flags); + +/** + * Get the Unicode/UTF-8 representation of a keysym. + * + * @param[in] keysym The keysym. + * @param[out] buffer A buffer to write the UTF-8 string into. + * @param[in] size The size of buffer. Must be at least 5. + * + * @returns The number of bytes written to the buffer (including the + * terminating byte). If the keysym does not have a Unicode + * representation, returns 0. If the buffer is too small, returns -1. + * + * This function does not perform any @ref keysym-transformations. + * Therefore, prefer to use `xkb_state::xkb_state_key_get_utf8()` if possible. + * + * @sa `xkb_state::xkb_state_key_get_utf8()` + */ +XKB_EXPORT int +xkb_keysym_to_utf8(xkb_keysym_t keysym, char *buffer, size_t size); + +/** + * Get the Unicode/UTF-32 representation of a keysym. + * + * @returns The Unicode/UTF-32 representation of keysym, which is also + * compatible with UCS-4. If the keysym does not have a Unicode + * representation, returns 0. + * + * This function does not perform any @ref keysym-transformations. + * Therefore, prefer to use xkb_state_key_get_utf32() if possible. + * + * @sa `xkb_state::xkb_state_key_get_utf32()` + */ +XKB_EXPORT uint32_t +xkb_keysym_to_utf32(xkb_keysym_t keysym); + +/** + * Get the keysym corresponding to a Unicode/UTF-32 codepoint. + * + * @returns The keysym corresponding to the specified Unicode + * codepoint, or XKB_KEY_NoSymbol if there is none. + * + * This function is the inverse of @ref xkb_keysym_to_utf32. In cases + * where a single codepoint corresponds to multiple keysyms, returns + * the keysym with the lowest value. + * + * Unicode codepoints which do not have a special (legacy) keysym + * encoding use a direct encoding scheme. These keysyms don’t usually + * have an associated keysym constant (`XKB_KEY_*`). + * + * @sa `xkb_keysym_to_utf32()` + * @since 1.0.0 + * @since 1.9.0: Enable support for all noncharacters. + */ +XKB_EXPORT xkb_keysym_t +xkb_utf32_to_keysym(uint32_t ucs); + +/** + * Convert a keysym to its uppercase form. + * + * If there is no such form, the keysym is returned unchanged. + * + * The conversion rules are the *simple* (i.e. one-to-one) Unicode case + * mappings (with some exceptions, see hereinafter) and do not depend + * on the locale. If you need the special case mappings (i.e. not + * one-to-one or locale-dependent), prefer to work with the Unicode + * representation instead, when possible. + * + * Exceptions to the Unicode mappings: + * + * | Lower keysym | Lower letter | Upper keysym | Upper letter | Comment | + * | ------------ | ------------ | ------------ | ------------ | ------- | + * | `ssharp` | `U+00DF`: ß | `U1E9E` | `U+1E9E`: ẞ | [Council for German Orthography] | + * + * [Council for German Orthography]: https://www.rechtschreibrat.com/regeln-und-woerterverzeichnis/ + * + * @since 0.8.0: Initial implementation, based on `libX11`. + * @since 1.8.0: Use Unicode 16.0 mappings for complete Unicode coverage. + */ +XKB_EXPORT xkb_keysym_t +xkb_keysym_to_upper(xkb_keysym_t ks); + +/** + * Convert a keysym to its lowercase form. + * + * If there is no such form, the keysym is returned unchanged. + * + * The conversion rules are the *simple* (i.e. one-to-one) Unicode case + * mappings and do not depend on the locale. If you need the special + * case mappings (i.e. not one-to-one or locale-dependent), prefer to + * work with the Unicode representation instead, when possible. + * + * @since 0.8.0: Initial implementation, based on `libX11`. + * @since 1.8.0: Use Unicode 16.0 mappings for complete Unicode coverage. + */ +XKB_EXPORT xkb_keysym_t +xkb_keysym_to_lower(xkb_keysym_t ks); + +/** @} */ + +/** + * @defgroup context Library Context + * Creating, destroying and using library contexts. + * + * Every keymap compilation request must have a context associated with + * it. The context keeps around state such as the include path. + * + * @{ + */ + +/** + * @page envvars Environment Variables + * + * The user may set some environment variables which affect the library: + * + * - `XKB_CONFIG_ROOT`, `XKB_CONFIG_EXTRA_PATH`, `XDG_CONFIG_DIR`, `HOME` - see @ref include-path. + * - `XKB_LOG_LEVEL` - see `xkb_context::xkb_context_set_log_level()`. + * - `XKB_LOG_VERBOSITY` - see `xkb_context::xkb_context_set_log_verbosity()`. + * - `XKB_DEFAULT_RULES`, `XKB_DEFAULT_MODEL`, `XKB_DEFAULT_LAYOUT`, + * `XKB_DEFAULT_VARIANT`, `XKB_DEFAULT_OPTIONS` - see `xkb_rule_names`. + */ + +/** Flags for context creation. */ +enum xkb_context_flags { + /** Do not apply any context flags. */ + XKB_CONTEXT_NO_FLAGS = 0, + /** Create this context with an empty include path. */ + XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0), + /** + * Don’t take RMLVO names from the environment. + * + * @since 0.3.0 + */ + XKB_CONTEXT_NO_ENVIRONMENT_NAMES = (1 << 1), + /** + * Disable the use of secure_getenv for this context, so that privileged + * processes can use environment variables. Client uses at their own risk. + * + * @since 1.5.0 + */ + XKB_CONTEXT_NO_SECURE_GETENV = (1 << 2) +}; + +/** + * Create a new context. + * + * @param flags Optional flags for the context, or 0. + * + * @returns A new context, or `NULL` on failure. + * + * @memberof xkb_context + */ +XKB_EXPORT struct xkb_context * +xkb_context_new(enum xkb_context_flags flags); + +/** + * Take a new reference on a context. + * + * @returns The passed in context. + * + * @memberof xkb_context + */ +XKB_EXPORT struct xkb_context * +xkb_context_ref(struct xkb_context *context); + +/** + * Release a reference on a context, and possibly free it. + * + * @param context The context. If it is `NULL`, this function does nothing. + * + * @memberof xkb_context + */ +XKB_EXPORT void +xkb_context_unref(struct xkb_context *context); + +/** + * Store custom user data in the context. + * + * This may be useful in conjunction with `xkb_context::xkb_context_set_log_fn()` + * or other callbacks. + * + * @memberof xkb_context + */ +XKB_EXPORT void +xkb_context_set_user_data(struct xkb_context *context, void *user_data); + +/** + * Retrieves stored user data from the context. + * + * @returns The stored user data. If the user data wasn’t set, or the + * passed in context is `NULL`, returns `NULL`. + * + * This may be useful to access private user data from callbacks like a + * custom logging function. + * + * @memberof xkb_context + **/ +XKB_EXPORT void * +xkb_context_get_user_data(struct xkb_context *context); + +/** @} */ + +/** + * @defgroup include-path Include Paths + * Manipulating the include paths in a context. + * + * The include paths are the file-system paths that are searched when an + * include statement is encountered during keymap compilation. + * + * The default include paths are, in that lookup order: + * - The path `$XDG_CONFIG_HOME/xkb`, with the usual `XDG_CONFIG_HOME` + * fallback to `$HOME/.config/` if unset. + * - The path `$HOME/.xkb`, where $HOME is the value of the environment + * variable `HOME`. + * - The `XKB_CONFIG_EXTRA_PATH` environment variable, if defined, otherwise the + * system configuration directory, defined at library configuration time + * (usually `/etc/xkb`). + * - The `XKB_CONFIG_ROOT` environment variable, if defined, otherwise + * the system XKB root, defined at library configuration time. + * + * @{ + */ + +/** + * Append a new entry to the context’s include path. + * + * @returns 1 on success, or 0 if the include path could not be added or is + * inaccessible. + * + * @memberof xkb_context + */ +XKB_EXPORT int +xkb_context_include_path_append(struct xkb_context *context, const char *path); + +/** + * Append the default include paths to the context’s include path. + * + * @returns 1 on success, or 0 if the primary include path could not be added. + * + * @memberof xkb_context + */ +XKB_EXPORT int +xkb_context_include_path_append_default(struct xkb_context *context); + +/** + * Reset the context’s include path to the default. + * + * Removes all entries from the context’s include path, and inserts the + * default paths. + * + * @returns 1 on success, or 0 if the primary include path could not be added. + * + * @memberof xkb_context + */ +XKB_EXPORT int +xkb_context_include_path_reset_defaults(struct xkb_context *context); + +/** + * Remove all entries from the context’s include path. + * + * @memberof xkb_context + */ +XKB_EXPORT void +xkb_context_include_path_clear(struct xkb_context *context); + +/** + * Get the number of paths in the context’s include path. + * + * @memberof xkb_context + */ +XKB_EXPORT unsigned int +xkb_context_num_include_paths(struct xkb_context *context); + +/** + * Get a specific include path from the context’s include path. + * + * @returns The include path at the specified index. If the index is + * invalid, returns NULL. + * + * @memberof xkb_context + */ +XKB_EXPORT const char * +xkb_context_include_path_get(struct xkb_context *context, unsigned int index); + +/** @} */ + +/** + * @defgroup logging Logging Handling + * Manipulating how logging from this library is handled. + * + * @{ + */ + +/** Specifies a logging level. */ +enum xkb_log_level { + XKB_LOG_LEVEL_CRITICAL = 10, /**< Log critical internal errors only. */ + XKB_LOG_LEVEL_ERROR = 20, /**< Log all errors. */ + XKB_LOG_LEVEL_WARNING = 30, /**< Log warnings and errors. */ + XKB_LOG_LEVEL_INFO = 40, /**< Log information, warnings, and errors. */ + XKB_LOG_LEVEL_DEBUG = 50 /**< Log everything. */ +}; + +/** + * Set the current logging level. + * + * @param context The context in which to set the logging level. + * @param level The logging level to use. Only messages from this level + * and below will be logged. + * + * The default level is `::XKB_LOG_LEVEL_ERROR`. The environment variable + * `XKB_LOG_LEVEL`, if set in the time the context was created, overrides the + * default value. It may be specified as a level number or name. + * + * @memberof xkb_context + */ +XKB_EXPORT void +xkb_context_set_log_level(struct xkb_context *context, + enum xkb_log_level level); + +/** + * Get the current logging level. + * + * @memberof xkb_context + */ +XKB_EXPORT enum xkb_log_level +xkb_context_get_log_level(struct xkb_context *context); + +/** + * Sets the current logging verbosity. + * + * The library can generate a number of warnings which are not helpful to + * ordinary users of the library. The verbosity may be increased if more + * information is desired (e.g. when developing a new keymap). + * + * The default verbosity is 0. The environment variable `XKB_LOG_VERBOSITY`, + * if set in the time the context was created, overrides the default value. + * + * @param context The context in which to use the set verbosity. + * @param verbosity The verbosity to use. Currently used values are + * 1 to 10, higher values being more verbose. 0 would result in no verbose + * messages being logged. + * + * Most verbose messages are of level `::XKB_LOG_LEVEL_WARNING` or lower. + * + * @memberof xkb_context + */ +XKB_EXPORT void +xkb_context_set_log_verbosity(struct xkb_context *context, int verbosity); + +/** + * Get the current logging verbosity of the context. + * + * @memberof xkb_context + */ +XKB_EXPORT int +xkb_context_get_log_verbosity(struct xkb_context *context); + +/** + * Set a custom function to handle logging messages. + * + * @param context The context in which to use the set logging function. + * @param log_fn The function that will be called for logging messages. + * Passing `NULL` restores the default function, which logs to stderr. + * + * By default, log messages from this library are printed to stderr. This + * function allows you to replace the default behavior with a custom + * handler. The handler is only called with messages which match the + * current logging level and verbosity settings for the context. + * level is the logging level of the message. @a format and @a args are + * the same as in the `vprintf(3)` function. + * + * You may use `xkb_context::xkb_context_set_user_data()` on the context, and + * then call `xkb_context::xkb_context_get_user_data()` from within the logging + * function to provide it with additional private context. + * + * @memberof xkb_context + */ +XKB_EXPORT void +xkb_context_set_log_fn(struct xkb_context *context, + void (*log_fn)(struct xkb_context *context, + enum xkb_log_level level, + const char *format, va_list args)); + +/** @} */ + +/** + * @defgroup keymap Keymap Creation + * Creating and destroying keymaps. + * + * @{ + */ + +/** Flags for keymap compilation. */ +enum xkb_keymap_compile_flags { + /** Do not apply any flags. */ + XKB_KEYMAP_COMPILE_NO_FLAGS = 0 +}; + +/** + * The possible keymap formats. + * + * See @ref keymap-text-format-v1-v2 "" for the complete description of the + * formats and @ref keymap-support "" for detailed differences between the + * formats. + * + * @remark A keymap can be parsed in one format and serialized in another, + * thanks to automatic fallback mechanisms. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
+ * Keymap format to use depending on the target protocol + *
Protocollibxkbcommon keymap format
NameKeymap formatParsingSerialization
X11XKB + * `::XKB_KEYMAP_FORMAT_TEXT_V1` + * + * *Always* use `::XKB_KEYMAP_FORMAT_TEXT_V1`, since the other formats are + * incompatible. + *
Wayland[xkb_v1] + *
+ *
Wayland compositors
+ *
+ * The format depends on the keyboard layout database (usually [xkeyboard-config]). + * Note that since v2 is a superset of v1, compositors are encouraged to use + * `::XKB_KEYMAP_FORMAT_TEXT_V2` whenever possible. + *
+ *
Client apps
+ *
+ * Clients should use `::XKB_KEYMAP_FORMAT_TEXT_V1` to parse the keymap sent + * by a Wayland compositor, at least until `::XKB_KEYMAP_FORMAT_TEXT_V2` + * stabilizes. + *
+ *
+ * At the time of writing (July 2025), the Wayland [xkb_v1] keymap + * format is only defined as “libxkbcommon compatible”. In theory it enables + * flexibility, but the set of supported features varies depending on the + * libxkbcommon version and libxkbcommon keymap format used. Unfortunately there + * is currently no Wayland API for keymap format *negotiation*. + * + * Therefore the **recommended** serialization format is + * `::XKB_KEYMAP_FORMAT_TEXT_V1`, in order to ensure maximum compatibility for + * interchange. + * + * Serializing using `::XKB_KEYMAP_FORMAT_TEXT_V2` should be considered + * **experimental**, as some clients may fail to parse the resulting string. + *
+ * + * [xkb_v1]: https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_keyboard-enum-keymap_format + * [xkeyboard-config]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config + */ +enum xkb_keymap_format { + /** + * The classic XKB text format, as generated by `xkbcomp -xkb`. + * + * @important This format should *always* be used when *serializing* a + * keymap for **X11**. + * + * @important For the **Wayland** [xkb_v1] format, it is + * advised to use this format as well for serializing, in order to ensure + * maximum compatibility for interchange. + * + * [xkb_v1]: https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_keyboard-enum-keymap_format + */ + XKB_KEYMAP_FORMAT_TEXT_V1 = 1, + /** + * Xkbcommon extensions of the classic XKB text format, **incompatible with + * X11**. + * + * @important Do *not* use when *serializing* a keymap for **X11** + * (incompatible). + * + * @important Considered *experimental* when *serializing* for **Wayland**: + * at the time of writing (July 2025), there is only one XKB keymap format + * [xkb_v1] in Wayland and no Wayland API for keymap format + * *negotiation*, so the clients may not be able to parse the keymap if it + * uses v2-specific features. Therefore a compositor may *parse* keymaps + * using `::XKB_KEYMAP_FORMAT_TEXT_V2` but it should serialize them using + * `::XKB_KEYMAP_FORMAT_TEXT_V1` and rely on the automatic *fallback* + * mechanisms. + * + * @since 1.11.0 + * + * [xkb_v1]: https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_keyboard-enum-keymap_format + */ + XKB_KEYMAP_FORMAT_TEXT_V2 = 2 +}; + +/** + * Create a keymap from a [RMLVO] builder. + * + * The primary keymap entry point: creates a new XKB keymap from a set of + * [RMLVO] \(Rules + Model + Layouts + Variants + Options) names. + * + * @param rmlvo The [RMLVO] builder to use. See `xkb_rmlvo_builder`. + * @param format The text format of the keymap file to compile. + * @param flags Optional flags for the keymap, or 0. + * + * @returns A keymap compiled according to the [RMLVO] names, or `NULL` if + * the compilation failed. + * + * @since 1.11.0 + * @sa `xkb_keymap_new_from_names2()` + * @sa `xkb_rmlvo_builder` + * @memberof xkb_keymap + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_new_from_rmlvo(const struct xkb_rmlvo_builder *rmlvo, + enum xkb_keymap_format format, + enum xkb_keymap_compile_flags flags); + +/** + * Create a keymap from [RMLVO] names. + * + * Same as `xkb_keymap_new_from_names2()`, but with the keymap format fixed to: + * `::XKB_KEYMAP_FORMAT_TEXT_V2`. + * + * @deprecated Use `xkb_keymap_new_from_names2()` instead. + * @since 1.11.0: Deprecated + * @since 1.11.0: Use internally `::XKB_KEYMAP_FORMAT_TEXT_V2` instead of + * `::XKB_KEYMAP_FORMAT_TEXT_V1` + * @sa `xkb_keymap_new_from_names2()` + * @sa `xkb_rule_names` + * @sa `xkb_keymap_new_from_rmlvo()` + * @memberof xkb_keymap + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_new_from_names(struct xkb_context *context, + const struct xkb_rule_names *names, + enum xkb_keymap_compile_flags flags); + +/** + * Create a keymap from [RMLVO] names. + * + * The primary keymap entry point: creates a new XKB keymap from a set of + * [RMLVO] \(Rules + Model + Layouts + Variants + Options) names. + * + * @param context The context in which to create the keymap. + * @param names The [RMLVO] names to use. See xkb_rule_names. + * @param format The text format of the keymap file to compile. + * @param flags Optional flags for the keymap, or 0. + * + * @returns A keymap compiled according to the [RMLVO] names, or `NULL` if + * the compilation failed. + * + * @sa `xkb_rule_names` + * @sa `xkb_keymap_new_from_rmlvo()` + * @memberof xkb_keymap + * @since 1.11.0 + * + * [RMLVO]: @ref RMLVO-intro + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_new_from_names2(struct xkb_context *context, + const struct xkb_rule_names *names, + enum xkb_keymap_format format, + enum xkb_keymap_compile_flags flags); + +/** + * Create a keymap from a keymap file. + * + * @param context The context in which to create the keymap. + * @param file The keymap file to compile. + * @param format The text format of the keymap file to compile. + * @param flags Optional flags for the keymap, or 0. + * + * @returns A keymap compiled from the given XKB keymap file, or `NULL` if + * the compilation failed. + * + * The file must contain a complete keymap. For example, in the + * `::XKB_KEYMAP_FORMAT_TEXT_V1` format, this means the file must contain one + * top level `%xkb_keymap` section, which in turn contains other required + * sections. + * + * @memberof xkb_keymap + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_new_from_file(struct xkb_context *context, FILE *file, + enum xkb_keymap_format format, + enum xkb_keymap_compile_flags flags); + +/** + * Create a keymap from a keymap string. + * + * This is just like `xkb_keymap_new_from_file()`, but instead of a file, gets + * the keymap as one enormous string. + * + * @see `xkb_keymap_new_from_file()` + * @memberof xkb_keymap + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_new_from_string(struct xkb_context *context, const char *string, + enum xkb_keymap_format format, + enum xkb_keymap_compile_flags flags); + +/** + * Create a keymap from a memory buffer. + * + * This is just like `xkb_keymap_new_from_string()`, but takes a length argument + * so the input string does not have to be zero-terminated. + * + * @see `xkb_keymap_new_from_string()` + * @memberof xkb_keymap + * @since 0.3.0 + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_new_from_buffer(struct xkb_context *context, const char *buffer, + size_t length, enum xkb_keymap_format format, + enum xkb_keymap_compile_flags flags); + +/** + * Take a new reference on a keymap. + * + * @returns The passed in keymap. + * + * @memberof xkb_keymap + */ +XKB_EXPORT struct xkb_keymap * +xkb_keymap_ref(struct xkb_keymap *keymap); + +/** + * Release a reference on a keymap, and possibly free it. + * + * @param keymap The keymap. If it is `NULL`, this function does nothing. + * + * @memberof xkb_keymap + */ +XKB_EXPORT void +xkb_keymap_unref(struct xkb_keymap *keymap); + +/** + * Get the keymap as a string in the format from which it was created. + * @sa `xkb_keymap::xkb_keymap_get_as_string()` + **/ +#define XKB_KEYMAP_USE_ORIGINAL_FORMAT ((enum xkb_keymap_format) -1) + +/** + * Get the compiled keymap as a string. + * + * @param keymap The keymap to get as a string. + * @param format The keymap format to use for the string. You can pass + * in the special value `::XKB_KEYMAP_USE_ORIGINAL_FORMAT` to use the format + * from which the keymap was originally created. When used as an *interchange* + * format such as Wayland [xkb_v1], the format should be explicit. + * + * @returns The keymap as a `NULL`-terminated string, or `NULL` if unsuccessful. + * + * The returned string may be fed back into `xkb_keymap_new_from_string()` to + * get the exact same keymap (possibly in another process, etc.). + * + * The returned string is *dynamically allocated* and should be freed by the + * caller. + * + * @memberof xkb_keymap + * + * [xkb_v1]: https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_keyboard-enum-keymap_format + */ +XKB_EXPORT char * +xkb_keymap_get_as_string(struct xkb_keymap *keymap, + enum xkb_keymap_format format); + +/** @} */ + +/** + * @defgroup components Keymap Components + * Enumeration of state components in a keymap. + * + * @{ + */ + +/** + * Get the minimum keycode in the keymap. + * + * @sa xkb_keycode_t + * @memberof xkb_keymap + * @since 0.3.1 + */ +XKB_EXPORT xkb_keycode_t +xkb_keymap_min_keycode(struct xkb_keymap *keymap); + +/** + * Get the maximum keycode in the keymap. + * + * @sa xkb_keycode_t + * @memberof xkb_keymap + * @since 0.3.1 + */ +XKB_EXPORT xkb_keycode_t +xkb_keymap_max_keycode(struct xkb_keymap *keymap); + +/** + * The iterator used by `xkb_keymap_key_for_each()`. + * + * @sa xkb_keymap_key_for_each + * @memberof xkb_keymap + * @since 0.3.1 + */ +typedef void +(*xkb_keymap_key_iter_t)(struct xkb_keymap *keymap, xkb_keycode_t key, + void *data); + +/** + * Run a specified function for every valid keycode in the keymap. If a + * keymap is sparse, this function may be called fewer than + * (max_keycode - min_keycode + 1) times. + * + * @sa xkb_keymap_min_keycode() + * @sa xkb_keymap_max_keycode() + * @sa xkb_keycode_t + * @memberof xkb_keymap + * @since 0.3.1 + */ +XKB_EXPORT void +xkb_keymap_key_for_each(struct xkb_keymap *keymap, xkb_keymap_key_iter_t iter, + void *data); + +/** + * Find the name of the key with the given keycode. + * + * This function always returns the canonical name of the key (see + * description in `xkb_keycode_t`). + * + * @returns The key name. If no key with this keycode exists, + * returns `NULL`. + * + * @sa xkb_keycode_t + * @memberof xkb_keymap + * @since 0.6.0 + */ +XKB_EXPORT const char * +xkb_keymap_key_get_name(struct xkb_keymap *keymap, xkb_keycode_t key); + +/** + * Find the keycode of the key with the given name. + * + * The name can be either a canonical name or an alias. + * + * @returns The keycode. If no key with this name exists, + * returns `::XKB_KEYCODE_INVALID`. + * + * @sa xkb_keycode_t + * @memberof xkb_keymap + * @since 0.6.0 + */ +XKB_EXPORT xkb_keycode_t +xkb_keymap_key_by_name(struct xkb_keymap *keymap, const char *name); + +/** + * Get the number of modifiers in the keymap. + * + * @sa xkb_mod_index_t + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_mod_index_t +xkb_keymap_num_mods(struct xkb_keymap *keymap); + +/** + * Get the name of a modifier by index. + * + * @returns The name. If the index is invalid, returns `NULL`. + * + * @sa xkb_mod_index_t + * @memberof xkb_keymap + */ +XKB_EXPORT const char * +xkb_keymap_mod_get_name(struct xkb_keymap *keymap, xkb_mod_index_t idx); + +/** + * Get the index of a modifier by name. + * + * @returns The index. If no modifier with this name exists, returns + * `::XKB_MOD_INVALID`. + * + * @sa xkb_mod_index_t + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_mod_index_t +xkb_keymap_mod_get_index(struct xkb_keymap *keymap, const char *name); + +/** + * Get the encoding of a modifier by name. + * + * In X11 terminology it corresponds to the mapping to the *[real modifiers]*. + * + * @returns The encoding of a modifier. Note that it may be 0 if the name does + * not exist or if the modifier is not mapped. + * + * @since 1.10.0 + * @sa `xkb_keymap_mod_get_mask2()` + * @memberof xkb_keymap + * + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT xkb_mod_mask_t +xkb_keymap_mod_get_mask(struct xkb_keymap *keymap, const char *name); + +/** + * Get the encoding of a modifier by index. + * + * In X11 terminology it corresponds to the mapping to the *[real modifiers]*. + * + * @returns The encoding of a modifier. Note that it may be 0 if the modifier is + * not mapped. + * + * @since 1.11.0 + * @sa `xkb_keymap_mod_get_mask()` + * @memberof xkb_keymap + * + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT xkb_mod_mask_t +xkb_keymap_mod_get_mask2(struct xkb_keymap *keymap, xkb_mod_index_t idx); + +/** + * Get the number of layouts in the keymap. + * + * @sa `xkb_layout_index_t` + * @sa `xkb_rule_names` + * @sa `xkb_keymap_num_layouts_for_key()` + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_layout_index_t +xkb_keymap_num_layouts(struct xkb_keymap *keymap); + +/** + * Get the name of a layout by index. + * + * @returns The name. If the index is invalid, or the layout does not have + * a name, returns `NULL`. + * + * @sa xkb_layout_index_t + * For notes on layout names. + * @memberof xkb_keymap + */ +XKB_EXPORT const char * +xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx); + +/** + * Get the index of a layout by name. + * + * @returns The index. If no layout exists with this name, returns + * `::XKB_LAYOUT_INVALID`. If more than one layout in the keymap has this name, + * returns the lowest index among them. + * + * @sa `xkb_layout_index_t` for notes on layout names. + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_layout_index_t +xkb_keymap_layout_get_index(struct xkb_keymap *keymap, const char *name); + +/** + * Get the number of LEDs in the keymap. + * + * @warning The range [ 0...`xkb_keymap_num_leds()` ) includes all of the LEDs + * in the keymap, but may also contain inactive LEDs. When iterating over + * this range, you need the handle this case when calling functions such as + * `xkb_keymap_led_get_name()` or `xkb_state::xkb_state_led_index_is_active()`. + * + * @sa xkb_led_index_t + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_led_index_t +xkb_keymap_num_leds(struct xkb_keymap *keymap); + +/** + * Get the name of a LED by index. + * + * @returns The name. If the index is invalid, returns `NULL`. + * + * @memberof xkb_keymap + */ +XKB_EXPORT const char * +xkb_keymap_led_get_name(struct xkb_keymap *keymap, xkb_led_index_t idx); + +/** + * Get the index of a LED by name. + * + * @returns The index. If no LED with this name exists, returns + * `::XKB_LED_INVALID`. + * + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_led_index_t +xkb_keymap_led_get_index(struct xkb_keymap *keymap, const char *name); + +/** + * Get the number of layouts for a specific key. + * + * This number can be different from `xkb_keymap_num_layouts()`, but is always + * smaller. It is the appropriate value to use when iterating over the + * layouts of a key. + * + * @sa xkb_layout_index_t + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_layout_index_t +xkb_keymap_num_layouts_for_key(struct xkb_keymap *keymap, xkb_keycode_t key); + +/** + * Get the number of shift levels for a specific key and layout. + * + * If @c layout is out of range for this key (that is, larger or equal to + * the value returned by `xkb_keymap_num_layouts_for_key()`), it is brought + * back into range in a manner consistent with + * `xkb_state::xkb_state_key_get_layout()`. + * + * @sa xkb_level_index_t + * @memberof xkb_keymap + */ +XKB_EXPORT xkb_level_index_t +xkb_keymap_num_levels_for_key(struct xkb_keymap *keymap, xkb_keycode_t key, + xkb_layout_index_t layout); + +/** + * Retrieves every possible modifier mask that produces the specified + * shift level for a specific key and layout. + * + * This API is useful for inverse key transformation; i.e. finding out + * which modifiers need to be active in order to be able to type the + * keysym(s) corresponding to the specific key code, layout and level. + * + * @warning It returns only up to masks_size modifier masks. If the + * buffer passed is too small, some of the possible modifier combinations + * will not be returned. + * + * @param[in] keymap The keymap. + * @param[in] key The keycode of the key. + * @param[in] layout The layout for which to get modifiers. + * @param[in] level The shift level in the layout for which to get the + * modifiers. This should be smaller than: + * @code xkb_keymap_num_levels_for_key(keymap, key) @endcode + * @param[out] masks_out A buffer in which the requested masks should be + * stored. + * @param[out] masks_size The number of elements in the buffer pointed to by + * masks_out. + * + * If @c layout is out of range for this key (that is, larger or equal to + * the value returned by `xkb_keymap_num_layouts_for_key()`), it is brought + * back into range in a manner consistent with + * `xkb_state::xkb_state_key_get_layout()`. + * + * @returns The number of modifier masks stored in the masks_out array. + * If the key is not in the keymap or if the specified shift level cannot + * be reached it returns 0 and does not modify the masks_out buffer. + * + * @sa xkb_level_index_t + * @sa xkb_mod_mask_t + * @memberof xkb_keymap + * @since 1.0.0 + */ +XKB_EXPORT size_t +xkb_keymap_key_get_mods_for_level(struct xkb_keymap *keymap, + xkb_keycode_t key, + xkb_layout_index_t layout, + xkb_level_index_t level, + xkb_mod_mask_t *masks_out, + size_t masks_size); + +/** + * Get the keysyms obtained from pressing a key in a given layout and + * shift level. + * + * This function is like `xkb_state::xkb_state_key_get_syms()`, only the layout + * and shift level are not derived from the keyboard state but are instead + * specified explicitly. + * + * @param[in] keymap The keymap. + * @param[in] key The keycode of the key. + * @param[in] layout The layout for which to get the keysyms. + * @param[in] level The shift level in the layout for which to get the + * keysyms. This should be smaller than: + * @code xkb_keymap_num_levels_for_key(keymap, key) @endcode + * @param[out] syms_out An immutable array of keysyms corresponding to the + * key in the given layout and shift level. + * + * If @c layout is out of range for this key (that is, larger or equal to + * the value returned by `xkb_keymap_num_layouts_for_key()`), it is brought + * back into range in a manner consistent with + * `xkb_state::xkb_state_key_get_layout()`. + * + * @returns The number of keysyms in the syms_out array. If no keysyms + * are produced by the key in the given layout and shift level, returns 0 + * and sets @p syms_out to `NULL`. + * + * @sa `xkb_state::xkb_state_key_get_syms()` + * @memberof xkb_keymap + */ +XKB_EXPORT int +xkb_keymap_key_get_syms_by_level(struct xkb_keymap *keymap, + xkb_keycode_t key, + xkb_layout_index_t layout, + xkb_level_index_t level, + const xkb_keysym_t **syms_out); + +/** + * Determine whether a key should repeat or not. + * + * A keymap may specify different repeat behaviors for different keys. + * Most keys should generally exhibit repeat behavior; for example, holding + * the `a` key down in a text editor should normally insert a single ‘a’ + * character every few milliseconds, until the key is released. However, + * there are keys which should not or do not need to be repeated. For + * example, repeating modifier keys such as Left/Right Shift or Caps Lock + * is not generally useful or desired. + * + * @returns 1 if the key should repeat, 0 otherwise. + * + * @memberof xkb_keymap + */ +XKB_EXPORT int +xkb_keymap_key_repeats(struct xkb_keymap *keymap, xkb_keycode_t key); + +/** @} */ + +/** + * @defgroup state Keyboard State + * Creating, destroying and manipulating keyboard state objects. + * + * @{ + */ + +/** + * Create a new keyboard state object. + * + * @param keymap The keymap which the state will use. + * + * @returns A new keyboard state object, or `NULL` on failure. + * + * @memberof xkb_state + */ +XKB_EXPORT struct xkb_state * +xkb_state_new(struct xkb_keymap *keymap); + +/** + * Take a new reference on a keyboard state object. + * + * @returns The passed in object. + * + * @memberof xkb_state + */ +XKB_EXPORT struct xkb_state * +xkb_state_ref(struct xkb_state *state); + +/** + * Release a reference on a keyboard state object, and possibly free it. + * + * @param state The state. If it is `NULL`, this function does nothing. + * + * @memberof xkb_state + */ +XKB_EXPORT void +xkb_state_unref(struct xkb_state *state); + +/** + * Get the keymap which a keyboard state object is using. + * + * @returns The keymap which was passed to `xkb_state_new()` when creating + * this state object. + * + * This function does not take a new reference on the keymap; you must + * explicitly reference it yourself if you plan to use it beyond the + * lifetime of the state. + * + * @memberof xkb_state + */ +XKB_EXPORT struct xkb_keymap * +xkb_state_get_keymap(struct xkb_state *state); + +/** + * @page server-client-state Server State and Client State + * @parblock + * + * The xkb_state API is used by two distinct actors in most window-system + * architectures: + * + * 1. A *server* - for example, a Wayland compositor, an X11 server, an evdev + * listener. + * + * Servers maintain the XKB state for a device according to input events from + * the device, such as key presses and releases, and out-of-band events from + * the user, like UI layout switchers. + * + * 2. A *client* - for example, a Wayland client, an X11 client. + * + * Clients do not listen to input from the device; instead, whenever the + * server state changes, the server serializes the state and notifies the + * clients that the state has changed; the clients then update the state + * from the serialization. + * + * Some entry points in the xkb_state API are only meant for servers and some + * are only meant for clients, and the two should generally not be mixed. + * + * @endparblock + */ + +/** Specifies the direction of the key (press / release). */ +enum xkb_key_direction { + XKB_KEY_UP, /**< The key was released. */ + XKB_KEY_DOWN /**< The key was pressed. */ +}; + +/** + * Modifier and layout types for state objects. This enum is bitmaskable, + * e.g. (`::XKB_STATE_MODS_DEPRESSED` | `::XKB_STATE_MODS_LATCHED`) is valid to + * exclude locked modifiers. + * + * In XKB, the `DEPRESSED` components are also known as *base*. + */ +enum xkb_state_component { + /** Depressed modifiers, i.e. a key is physically holding them. */ + XKB_STATE_MODS_DEPRESSED = (1 << 0), + /** Latched modifiers, i.e. will be unset after the next non-modifier + * key press. */ + XKB_STATE_MODS_LATCHED = (1 << 1), + /** Locked modifiers, i.e. will be unset after the key provoking the + * lock has been pressed again. */ + XKB_STATE_MODS_LOCKED = (1 << 2), + /** Effective modifiers, i.e. currently active and affect key + * processing (derived from the other state components). + * Use this unless you explicitly care how the state came about. */ + XKB_STATE_MODS_EFFECTIVE = (1 << 3), + /** Depressed layout, i.e. a key is physically holding it. */ + XKB_STATE_LAYOUT_DEPRESSED = (1 << 4), + /** Latched layout, i.e. will be unset after the next non-modifier + * key press. */ + XKB_STATE_LAYOUT_LATCHED = (1 << 5), + /** Locked layout, i.e. will be unset after the key provoking the lock + * has been pressed again. */ + XKB_STATE_LAYOUT_LOCKED = (1 << 6), + /** Effective layout, i.e. currently active and affects key processing + * (derived from the other state components). + * Use this unless you explicitly care how the state came about. */ + XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7), + /** LEDs (derived from the other state components). */ + XKB_STATE_LEDS = (1 << 8) +}; + +/** + * Update the keyboard state to reflect a given key being pressed or + * released. + * + * This entry point is intended for *server* applications and should not be used + * by *client* applications; see @ref server-client-state for details. + * + * A series of calls to this function should be consistent; that is, a call + * with `::XKB_KEY_DOWN` for a key should be matched by an `::XKB_KEY_UP`; if a + * key is pressed twice, it should be released twice; etc. Otherwise (e.g. due + * to missed input events), situations like “stuck modifiers” may occur. + * + * This function is often used in conjunction with the function + * `xkb_state_key_get_syms()` (or `xkb_state_key_get_one_sym()`), for example, + * when handling a key event. In this case, you should prefer to get the + * keysyms *before* updating the key, such that the keysyms reported for + * the key event are not affected by the event itself. This is the + * conventional behavior. + * + * @returns A mask of state components that have changed as a result of + * the update. If nothing in the state has changed, returns 0. + * + * @memberof xkb_state + * + * @sa `xkb_state_update_mask()` + */ +XKB_EXPORT enum xkb_state_component +xkb_state_update_key(struct xkb_state *state, xkb_keycode_t key, + enum xkb_key_direction direction); + +/** + * Update the keyboard state to change the latched and locked state of + * the modifiers and layout. + * + * This entry point is intended for *server* applications and should not be used + * by *client* applications; see @ref server-client-state for details. + * + * Use this function to update the latched and locked state according to + * “out of band” (non-device) inputs, such as UI layout switchers. + * + * @par Layout out of range + * @parblock + * + * If the effective layout, after taking into account the depressed, latched and + * locked layout, is out of range (negative or greater than the maximum layout), + * it is brought into range. Currently, the layout is wrapped using integer + * modulus (with negative values wrapping from the end). The wrapping behavior + * may be made configurable in the future. + * + * @endparblock + * + * @param state The keyboard state object. + * @param affect_latched_mods + * @param latched_mods + * Modifiers to set as latched or unlatched. Only modifiers in + * @p affect_latched_mods are considered. + * @param affect_latched_layout + * @param latched_layout + * Layout to latch. Only considered if @p affect_latched_layout is true. + * Maybe be out of range (including negative) -- see note above. + * @param affect_locked_mods + * @param locked_mods + * Modifiers to set as locked or unlocked. Only modifiers in + * @p affect_locked_mods are considered. + * @param affect_locked_layout + * @param locked_layout + * Layout to lock. Only considered if @p affect_locked_layout is true. + * Maybe be out of range (including negative) -- see note above. + * + * @returns A mask of state components that have changed as a result of + * the update. If nothing in the state has changed, returns 0. + * + * @memberof xkb_state + * + * @sa xkb_state_update_mask() + */ +XKB_EXPORT enum xkb_state_component +xkb_state_update_latched_locked(struct xkb_state *state, + xkb_mod_mask_t affect_latched_mods, + xkb_mod_mask_t latched_mods, + bool affect_latched_layout, + int32_t latched_layout, + xkb_mod_mask_t affect_locked_mods, + xkb_mod_mask_t locked_mods, + bool affect_locked_layout, + int32_t locked_layout); + +/** + * Update a keyboard state from a set of explicit masks. + * + * This entry point is intended for *client* applications; see @ref + * server-client-state for details. *Server* applications should use + * `xkb_state_update_key()` instead. + * + * All parameters must always be passed, or the resulting state may be + * incoherent. + * + * @warning The serialization is lossy and will not survive round trips; it must + * only be used to feed client state objects, and must not be used to update the + * server state. + * + * @returns A mask of state components that have changed as a result of + * the update. If nothing in the state has changed, returns 0. + * + * @memberof xkb_state + * + * @sa `xkb_state_component` + * @sa `xkb_state_update_key()` + */ +XKB_EXPORT enum xkb_state_component +xkb_state_update_mask(struct xkb_state *state, + xkb_mod_mask_t depressed_mods, + xkb_mod_mask_t latched_mods, + xkb_mod_mask_t locked_mods, + xkb_layout_index_t depressed_layout, + xkb_layout_index_t latched_layout, + xkb_layout_index_t locked_layout); + +/** + * Get the keysyms obtained from pressing a particular key in a given + * keyboard state. + * + * Get the keysyms for a key according to the current active layout, + * modifiers and shift level for the key, as determined by a keyboard + * state. + * + * @param[in] state The keyboard state object. + * @param[in] key The keycode of the key. + * @param[out] syms_out An immutable array of keysyms corresponding the + * key in the given keyboard state. + * + * As an extension to XKB, this function can return more than one keysym. + * If you do not want to handle this case, you can use + * `xkb_state_key_get_one_sym()` for a simpler interface. + * + * @returns The number of keysyms in the syms_out array. If no keysyms + * are produced by the key in the given keyboard state, returns 0 and sets + * syms_out to `NULL`. + * + * This function performs Capitalization @ref keysym-transformations. + * + * @memberof xkb_state + * + * @since 1.9.0 This function now performs @ref keysym-transformations. + */ +XKB_EXPORT int +xkb_state_key_get_syms(struct xkb_state *state, xkb_keycode_t key, + const xkb_keysym_t **syms_out); + +/** + * Get the Unicode/UTF-8 string obtained from pressing a particular key + * in a given keyboard state. + * + * @param[in] state The keyboard state object. + * @param[in] key The keycode of the key. + * @param[out] buffer A buffer to write the string into. + * @param[in] size Size of the buffer. + * + * @warning If the buffer passed is too small, the string is truncated + * (though still `NULL`-terminated). + * + * @returns The number of bytes required for the string, excluding the + * `NULL` byte. If there is nothing to write, returns 0. + * + * You may check if truncation has occurred by comparing the return value + * with the size of @p buffer, similarly to the `snprintf(3)` function. + * You may safely pass `NULL` and 0 to @p buffer and @p size to find the + * required size (without the `NULL`-byte). + * + * This function performs Capitalization and Control @ref + * keysym-transformations. + * + * @memberof xkb_state + * @since 0.4.1 + */ +XKB_EXPORT int +xkb_state_key_get_utf8(struct xkb_state *state, xkb_keycode_t key, + char *buffer, size_t size); + +/** + * Get the Unicode/UTF-32 codepoint obtained from pressing a particular + * key in a a given keyboard state. + * + * @returns The UTF-32 representation for the key, if it consists of only + * a single codepoint. Otherwise, returns 0. + * + * This function performs Capitalization and Control @ref + * keysym-transformations. + * + * @memberof xkb_state + * @since 0.4.1 + */ +XKB_EXPORT uint32_t +xkb_state_key_get_utf32(struct xkb_state *state, xkb_keycode_t key); + +/** + * Get the single keysym obtained from pressing a particular key in a + * given keyboard state. + * + * This function is similar to `xkb_state_key_get_syms()`, but intended + * for users which cannot or do not want to handle the case where + * multiple keysyms are returned (in which case this function is + * preferred). + * + * @returns The keysym. If the key does not have exactly one keysym, + * returns `XKB_KEY_NoSymbol`. + * + * This function performs Capitalization @ref keysym-transformations. + * + * @sa xkb_state_key_get_syms() + * @memberof xkb_state + */ +XKB_EXPORT xkb_keysym_t +xkb_state_key_get_one_sym(struct xkb_state *state, xkb_keycode_t key); + +/** + * Get the effective layout index for a key in a given keyboard state. + * + * @returns The layout index for the key in the given keyboard state. If + * the given keycode is invalid, or if the key is not included in any + * layout at all, returns `::XKB_LAYOUT_INVALID`. + * + * @invariant If the returned layout is valid, the following always holds: + * @code + * xkb_state_key_get_layout(state, key) < xkb_keymap_num_layouts_for_key(keymap, key) + * @endcode + * + * @memberof xkb_state + */ +XKB_EXPORT xkb_layout_index_t +xkb_state_key_get_layout(struct xkb_state *state, xkb_keycode_t key); + +/** + * Get the effective shift level for a key in a given keyboard state and + * layout. + * + * @param state The keyboard state. + * @param key The keycode of the key. + * @param layout The layout for which to get the shift level. This must be + * smaller than: + * @code xkb_keymap_num_layouts_for_key(keymap, key) @endcode + * usually it would be: + * @code xkb_state_key_get_layout(state, key) @endcode + * + * @return The shift level index. If the key or layout are invalid, + * returns `::XKB_LEVEL_INVALID`. + * + * @invariant If the returned level is valid, the following always holds: + * @code + * xkb_state_key_get_level(state, key, layout) < xkb_keymap_num_levels_for_key(keymap, key, layout) + * @endcode + * + * @memberof xkb_state + */ +XKB_EXPORT xkb_level_index_t +xkb_state_key_get_level(struct xkb_state *state, xkb_keycode_t key, + xkb_layout_index_t layout); + +/** + * Match flags for `xkb_state::xkb_state_mod_indices_are_active()` and + * `xkb_state::xkb_state_mod_names_are_active()`, specifying the conditions for a + * successful match. `::XKB_STATE_MATCH_NON_EXCLUSIVE` is bitmaskable with + * the other modes. + */ +enum xkb_state_match { + /** Returns true if any of the modifiers are active. */ + XKB_STATE_MATCH_ANY = (1 << 0), + /** Returns true if all of the modifiers are active. */ + XKB_STATE_MATCH_ALL = (1 << 1), + /** Makes matching non-exclusive, i.e. will not return false if a + * modifier not specified in the arguments is active. */ + XKB_STATE_MATCH_NON_EXCLUSIVE = (1 << 16) +}; + +/** + * The counterpart to `xkb_state::xkb_state_update_mask()` for modifiers, to be + * used on the server side of serialization. + * + * This entry point is intended for *server* applications; see @ref + * server-client-state for details. *Client* applications should use the + * `xkb_state_mod_*_is_active` API. + * + * @param state The keyboard state. + * @param components A mask of the modifier state components to serialize. + * State components other than `XKB_STATE_MODS_*` are ignored. + * If `::XKB_STATE_MODS_EFFECTIVE` is included, all other state components are + * ignored. + * + * @returns A `xkb_mod_mask_t` representing the given components of the + * modifier state. + * + * @memberof xkb_state + */ +XKB_EXPORT xkb_mod_mask_t +xkb_state_serialize_mods(struct xkb_state *state, + enum xkb_state_component components); + +/** + * The counterpart to `xkb_state::xkb_state_update_mask()` for layouts, to be + * used on the server side of serialization. + * + * This entry point is intended for *server* applications; see @ref + * server-client-state for details. *Client* applications should use the + * xkb_state_layout_*_is_active API. + * + * @param state The keyboard state. + * @param components A mask of the layout state components to serialize. + * State components other than `XKB_STATE_LAYOUT_*` are ignored. + * If `::XKB_STATE_LAYOUT_EFFECTIVE` is included, all other state components are + * ignored. + * + * @returns A layout index representing the given components of the + * layout state. + * + * @memberof xkb_state + */ +XKB_EXPORT xkb_layout_index_t +xkb_state_serialize_layout(struct xkb_state *state, + enum xkb_state_component components); + +/** + * Test whether a modifier is active in a given keyboard state by name. + * + * @warning For [virtual modifiers], this function may *overmatch* in case + * there are virtual modifiers with overlapping mappings to [real modifiers]. + * + * @returns 1 if the modifier is active, 0 if it is not. If the modifier + * name does not exist in the keymap, returns -1. + * + * @memberof xkb_state + * + * @since 0.1.0: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT int +xkb_state_mod_name_is_active(struct xkb_state *state, const char *name, + enum xkb_state_component type); + +/** + * Test whether a set of modifiers are active in a given keyboard state by + * name. + * + * @warning For [virtual modifiers], this function may *overmatch* in case + * there are virtual modifiers with overlapping mappings to [real modifiers]. + * + * @param state The keyboard state. + * @param type The component of the state against which to match the + * given modifiers. + * @param match The manner by which to match the state against the + * given modifiers. + * @param ... The set of of modifier names to test, terminated by a NULL + * argument (sentinel). + * + * @returns 1 if the modifiers are active, 0 if they are not. If any of + * the modifier names do not exist in the keymap, returns -1. + * + * @memberof xkb_state + * + * @since 0.1.0: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT int +xkb_state_mod_names_are_active(struct xkb_state *state, + enum xkb_state_component type, + enum xkb_state_match match, + ...); + +/** + * Test whether a modifier is active in a given keyboard state by index. + * + * @warning For [virtual modifiers], this function may *overmatch* in case + * there are virtual modifiers with overlapping mappings to [real modifiers]. + * + * @returns 1 if the modifier is active, 0 if it is not. If the modifier + * index is invalid in the keymap, returns -1. + * + * @memberof xkb_state + * + * @since 0.1.0: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT int +xkb_state_mod_index_is_active(struct xkb_state *state, xkb_mod_index_t idx, + enum xkb_state_component type); + +/** + * Test whether a set of modifiers are active in a given keyboard state by + * index. + * + * @warning For [virtual modifiers], this function may *overmatch* in case + * there are virtual modifiers with overlapping mappings to [real modifiers]. + * + * @param state The keyboard state. + * @param type The component of the state against which to match the + * given modifiers. + * @param match The manner by which to match the state against the + * given modifiers. + * @param ... The set of of modifier indices to test, terminated by a + * `::XKB_MOD_INVALID` argument (sentinel). + * + * @returns 1 if the modifiers are active, 0 if they are not. If any of + * the modifier indices are invalid in the keymap, returns -1. + * + * @memberof xkb_state + * + * @since 0.1.0: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT int +xkb_state_mod_indices_are_active(struct xkb_state *state, + enum xkb_state_component type, + enum xkb_state_match match, + ...); + +/** + * @page consumed-modifiers Consumed Modifiers + * @parblock + * + * Some functions, like `xkb_state::xkb_state_key_get_syms()`, look at the state + * of the modifiers in the keymap and derive from it the correct shift level + * to use for the key. For example, in a US layout, pressing the key + * labeled `
` while the Shift modifier is active, generates the keysym + * `A`. In this case, the Shift modifier is said to be *consumed*. + * However, the Num Lock modifier does not affect this translation at all, + * even if it is active, so it is not consumed by this translation. + * + * It may be desirable for some application to not reuse consumed modifiers + * for further processing, e.g. for hotkeys or keyboard shortcuts. To + * understand why, consider some requirements from a standard shortcut + * mechanism, and how they are implemented: + * + * 1. The shortcut’s modifiers must match exactly to the state. For + * example, it is possible to bind separate actions to `` + * and to ``. Further, if only `` is + * bound to an action, pressing `` should not + * trigger the shortcut. + * Effectively, this means that the modifiers are compared using the + * equality operator (`==`). + * + * 2. Only relevant modifiers are considered for the matching. For example, + * Caps Lock and Num Lock should not generally affect the matching, e.g. + * when matching `` against the state, it does not matter + * whether Num Lock is active or not. These relevant, or *significant*, + * modifiers usually include Alt, Control, Shift, Super and similar. + * Effectively, this means that non-significant modifiers are masked out, + * before doing the comparison as described above. + * + * 3. The matching must be independent of the layout/keymap. For example, + * the `` (+) symbol is found on the first level on some layouts, + * but requires holding Shift on others. If you simply bind the action + * to the `` keysym, it would work for the unshifted kind, but + * not for the others, because the match against Shift would fail. If + * you bind the action to ``, only the shifted kind would + * work. So what is needed is to recognize that Shift is used up in the + * translation of the keysym itself, and therefore should not be included + * in the matching. + * Effectively, this means that consumed modifiers (Shift in this example) + * are masked out as well, before doing the comparison. + * + * In summary, this is approximately how the matching would be performed: + * + * ```c + * (keysym == shortcut_keysym) && + * ((state_mods & ~consumed_mods & significant_mods) == shortcut_mods) + * ``` + * + * @c state_mods are the modifiers reported by + * `xkb_state::xkb_state_mod_index_is_active()` and similar functions. + * @c consumed_mods are the modifiers reported by + * `xkb_state::xkb_state_mod_index_is_consumed()` and similar functions. + * @c significant_mods are decided upon by the application/toolkit/user; + * it is up to them to decide whether these are configurable or hard-coded. + * + * @endparblock + */ + +/** + * Consumed modifiers mode. + * + * There are several possible methods for deciding which modifiers are + * consumed and which are not, each applicable for different systems or + * situations. The mode selects the method to use. + * + * Keep in mind that in all methods, the keymap may decide to *preserve* + * a modifier, meaning it is not reported as consumed even if it would + * have otherwise. + */ +enum xkb_consumed_mode { + /** + * This is the mode defined in the XKB specification and used by libX11. + * + * A modifier is consumed if and only if it *may affect* key translation. + * + * For example, if `Control+Alt+` produces some assigned keysym, + * then when pressing just ``, `Control` and `Alt` are consumed, + * even though they are not active, since if they *were* active they would + * have affected key translation. + */ + XKB_CONSUMED_MODE_XKB, + /** + * This is the mode used by the GTK+ toolkit. + * + * The mode consists of the following two independent heuristics: + * + * - The currently active set of modifiers, excluding modifiers which do + * not affect the key (as described for @ref XKB_CONSUMED_MODE_XKB), are + * considered consumed, if the keysyms produced when all of them are + * active are different from the keysyms produced when no modifiers are + * active. + * + * - A single modifier is considered consumed if the keysyms produced for + * the key when it is the only active modifier are different from the + * keysyms produced when no modifiers are active. + */ + XKB_CONSUMED_MODE_GTK +}; + +/** + * Get the mask of modifiers consumed by translating a given key. + * + * @param state The keyboard state. + * @param key The keycode of the key. + * @param mode The consumed modifiers mode to use; see enum description. + * + * @returns a mask of the consumed [real modifiers] modifiers. + * + * @memberof xkb_state + * @since 0.7.0 + * + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT xkb_mod_mask_t +xkb_state_key_get_consumed_mods2(struct xkb_state *state, xkb_keycode_t key, + enum xkb_consumed_mode mode); + +/** + * Same as `xkb_state_key_get_consumed_mods2()` with mode `::XKB_CONSUMED_MODE_XKB`. + * + * @memberof xkb_state + * @since 0.4.1 + */ +XKB_EXPORT xkb_mod_mask_t +xkb_state_key_get_consumed_mods(struct xkb_state *state, xkb_keycode_t key); + +/** + * Test whether a modifier is consumed by keyboard state translation for + * a key. + * + * @warning For [virtual modifiers], this function may *overmatch* in case + * there are virtual modifiers with overlapping mappings to [real modifiers]. + * + * @param state The keyboard state. + * @param key The keycode of the key. + * @param idx The index of the modifier to check. + * @param mode The consumed modifiers mode to use; see enum description. + * + * @returns 1 if the modifier is consumed, 0 if it is not. If the modifier + * index is not valid in the keymap, returns -1. + * + * @sa xkb_state_mod_mask_remove_consumed() + * @sa xkb_state_key_get_consumed_mods() + * @memberof xkb_state + * @since 0.7.0: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT int +xkb_state_mod_index_is_consumed2(struct xkb_state *state, + xkb_keycode_t key, + xkb_mod_index_t idx, + enum xkb_consumed_mode mode); + +/** + * Same as `xkb_state_mod_index_is_consumed2()` with mode `::XKB_CONSUMED_MOD_XKB`. + * + * @warning For [virtual modifiers], this function may *overmatch* in case + * there are virtual modifiers with overlapping mappings to [real modifiers]. + * + * @memberof xkb_state + * @since 0.4.1: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [virtual modifiers]: @ref virtual-modifier-def + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT int +xkb_state_mod_index_is_consumed(struct xkb_state *state, xkb_keycode_t key, + xkb_mod_index_t idx); + +/** + * Remove consumed modifiers from a modifier mask for a key. + * + * @deprecated Use `xkb_state_key_get_consumed_mods2()` instead. + * + * Takes the given modifier mask, and removes all modifiers which are + * consumed for that particular key (as in `xkb_state_mod_index_is_consumed()`). + * + * @returns a mask of [real modifiers] modifiers. + * + * @sa xkb_state_mod_index_is_consumed() + * @memberof xkb_state + * @since 0.5.0: Works only with *real* modifiers + * @since 1.8.0: Works also with *virtual* modifiers + * + * [real modifiers]: @ref real-modifier-def + */ +XKB_EXPORT xkb_mod_mask_t +xkb_state_mod_mask_remove_consumed(struct xkb_state *state, xkb_keycode_t key, + xkb_mod_mask_t mask); + +/** + * Test whether a layout is active in a given keyboard state by name. + * + * @returns 1 if the layout is active, 0 if it is not. If no layout with + * this name exists in the keymap, return -1. + * + * If multiple layouts in the keymap have this name, the one with the lowest + * index is tested. + * + * @sa xkb_layout_index_t + * @memberof xkb_state + */ +XKB_EXPORT int +xkb_state_layout_name_is_active(struct xkb_state *state, const char *name, + enum xkb_state_component type); + +/** + * Test whether a layout is active in a given keyboard state by index. + * + * @returns 1 if the layout is active, 0 if it is not. If the layout index + * is not valid in the keymap, returns -1. + * + * @sa xkb_layout_index_t + * @memberof xkb_state + */ +XKB_EXPORT int +xkb_state_layout_index_is_active(struct xkb_state *state, + xkb_layout_index_t idx, + enum xkb_state_component type); + +/** + * Test whether a LED is active in a given keyboard state by name. + * + * @returns 1 if the LED is active, 0 if it not. If no LED with this name + * exists in the keymap, returns -1. + * + * @sa xkb_led_index_t + * @memberof xkb_state + */ +XKB_EXPORT int +xkb_state_led_name_is_active(struct xkb_state *state, const char *name); + +/** + * Test whether a LED is active in a given keyboard state by index. + * + * @returns 1 if the LED is active, 0 if it not. If the LED index is not + * valid in the keymap, returns -1. + * + * @sa xkb_led_index_t + * @memberof xkb_state + */ +XKB_EXPORT int +xkb_state_led_index_is_active(struct xkb_state *state, xkb_led_index_t idx); + +/** @} */ + +/* Leave this include last, so it can pick up our types, etc. */ +#include + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* _XKBCOMMON_H_ */