/* Generated by wayland-scanner 1.23.0 */ #ifndef TEXT_INPUT_EXTENSION_UNSTABLE_V1_SERVER_PROTOCOL_H #define TEXT_INPUT_EXTENSION_UNSTABLE_V1_SERVER_PROTOCOL_H #include <stdint.h> #include <stddef.h> #include "wayland-server.h" #ifdef __cplusplus extern "C" { #endif struct wl_client; struct wl_resource; /** * @page page_text_input_extension_unstable_v1 The text_input_extension_unstable_v1 protocol * @section page_ifaces_text_input_extension_unstable_v1 Interfaces * - @subpage page_iface_zcr_text_input_extension_v1 - extends text_input to support richer operations * - @subpage page_iface_zcr_extended_text_input_v1 - extension of text_input protocol * @section page_copyright_text_input_extension_unstable_v1 Copyright * <pre> * * Copyright 2021 The Chromium Authors * * 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. * </pre> */ struct zcr_extended_text_input_v1; struct zcr_text_input_extension_v1; struct zwp_text_input_v1; #ifndef ZCR_TEXT_INPUT_EXTENSION_V1_INTERFACE #define ZCR_TEXT_INPUT_EXTENSION_V1_INTERFACE /** * @page page_iface_zcr_text_input_extension_v1 zcr_text_input_extension_v1 * @section page_iface_zcr_text_input_extension_v1_desc Description * * Allows a text_input to sends more variation of operations to support * richer features, such as set_preedit_region. * * 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 uinterface 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_iface_zcr_text_input_extension_v1_api API * See @ref iface_zcr_text_input_extension_v1. */ /** * @defgroup iface_zcr_text_input_extension_v1 The zcr_text_input_extension_v1 interface * * Allows a text_input to sends more variation of operations to support * richer features, such as set_preedit_region. * * 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 uinterface 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. */ extern const struct wl_interface zcr_text_input_extension_v1_interface; #endif #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_INTERFACE #define ZCR_EXTENDED_TEXT_INPUT_V1_INTERFACE /** * @page page_iface_zcr_extended_text_input_v1 zcr_extended_text_input_v1 * @section page_iface_zcr_extended_text_input_v1_desc Description * * The zcr_extended_text_input_v1 interface extends the text_input interface * to support more rich operations on text_input. * @section page_iface_zcr_extended_text_input_v1_api API * See @ref iface_zcr_extended_text_input_v1. */ /** * @defgroup iface_zcr_extended_text_input_v1 The zcr_extended_text_input_v1 interface * * The zcr_extended_text_input_v1 interface extends the text_input interface * to support more rich operations on text_input. */ extern const struct wl_interface zcr_extended_text_input_v1_interface; #endif #ifndef ZCR_TEXT_INPUT_EXTENSION_V1_ERROR_ENUM #define ZCR_TEXT_INPUT_EXTENSION_V1_ERROR_ENUM enum zcr_text_input_extension_v1_error { … }; /** * @ingroup iface_zcr_text_input_extension_v1 * Validate a zcr_text_input_extension_v1 error value. * * @return true on success, false on error. * @ref zcr_text_input_extension_v1_error */ static inline bool zcr_text_input_extension_v1_error_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_TEXT_INPUT_EXTENSION_V1_ERROR_ENUM */ /** * @ingroup iface_zcr_text_input_extension_v1 * @struct zcr_text_input_extension_v1_interface */ struct zcr_text_input_extension_v1_interface { … }; /** * @ingroup iface_zcr_text_input_extension_v1 */ #define ZCR_TEXT_INPUT_EXTENSION_V1_GET_EXTENDED_TEXT_INPUT_SINCE_VERSION … #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_TYPE_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_TYPE_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Chrome's TextInputType * * Wayland has its own input-type support, which is * zwp_text_input::content_purpose. However, it is not rich enough to * represent all Chrome's input types. This enum is introduced to keep * all entries so exo can understand it without any information loss. * See TextInputType's description for details about each entry. */ enum zcr_extended_text_input_v1_input_type { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 input_type value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_input_type */ static inline bool zcr_extended_text_input_v1_input_type_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_TYPE_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_MODE_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_MODE_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Chrome's TextInputMode * * Similar to input_type defined above, this keeps Chrome's TextInputMode. * See TextInputMode's description for details for each entry. */ enum zcr_extended_text_input_v1_input_mode { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 input_mode value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_input_mode */ static inline bool zcr_extended_text_input_v1_input_mode_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_MODE_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_FLAGS_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_FLAGS_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Chrome's TextInputFlags * * Similar to input_type defined above, this keeps Chrome's TextInputFlags, * because content_hint is not enough power to represent what Chrome wants. * See TextInputFlags' description for details for each entry. */ enum zcr_extended_text_input_v1_input_flags { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 input_flags value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_input_flags */ static inline bool zcr_extended_text_input_v1_input_flags_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_INPUT_FLAGS_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_LEARNING_MODE_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_LEARNING_MODE_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Whether IME is allowed to learn */ enum zcr_extended_text_input_v1_learning_mode { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 learning_mode value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_learning_mode */ static inline bool zcr_extended_text_input_v1_learning_mode_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_LEARNING_MODE_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_FOCUS_REASON_TYPE_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_FOCUS_REASON_TYPE_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Chrome's TextInputClient::FocusReason * * This represents the reasons why the text input gets focused. */ enum zcr_extended_text_input_v1_focus_reason_type { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 focus_reason_type value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_focus_reason_type */ static inline bool zcr_extended_text_input_v1_focus_reason_type_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_FOCUS_REASON_TYPE_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_INLINE_COMPOSITION_SUPPORT_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_INLINE_COMPOSITION_SUPPORT_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Whether inline composition is supported * * Inline composition is an IME feature for certain languages (e.g. CJK) * which displays the uncommitted composition inside the input field as it * is being typed. */ enum zcr_extended_text_input_v1_inline_composition_support { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 inline_composition_support value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_inline_composition_support */ static inline bool zcr_extended_text_input_v1_inline_composition_support_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_INLINE_COMPOSITION_SUPPORT_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_SURROUNDING_TEXT_SUPPORT_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_SURROUNDING_TEXT_SUPPORT_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * Whether surrounding text is supported */ enum zcr_extended_text_input_v1_surrounding_text_support { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 surrounding_text_support value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_surrounding_text_support */ static inline bool zcr_extended_text_input_v1_surrounding_text_support_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_SURROUNDING_TEXT_SUPPORT_ENUM */ #ifndef ZCR_EXTENDED_TEXT_INPUT_V1_CONFIRM_PREEDIT_SELECTION_BEHAVIOR_ENUM #define ZCR_EXTENDED_TEXT_INPUT_V1_CONFIRM_PREEDIT_SELECTION_BEHAVIOR_ENUM /** * @ingroup iface_zcr_extended_text_input_v1 * How the selection range is affected by confirm_preedit */ enum zcr_extended_text_input_v1_confirm_preedit_selection_behavior { … }; /** * @ingroup iface_zcr_extended_text_input_v1 * Validate a zcr_extended_text_input_v1 confirm_preedit_selection_behavior value. * * @return true on success, false on error. * @ref zcr_extended_text_input_v1_confirm_preedit_selection_behavior */ static inline bool zcr_extended_text_input_v1_confirm_preedit_selection_behavior_is_valid(uint32_t value, uint32_t version) { … } #endif /* ZCR_EXTENDED_TEXT_INPUT_V1_CONFIRM_PREEDIT_SELECTION_BEHAVIOR_ENUM */ /** * @ingroup iface_zcr_extended_text_input_v1 * @struct zcr_extended_text_input_v1_interface */ struct zcr_extended_text_input_v1_interface { … }; #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_PREEDIT_REGION … #define ZCR_EXTENDED_TEXT_INPUT_V1_CLEAR_GRAMMAR_FRAGMENTS … #define ZCR_EXTENDED_TEXT_INPUT_V1_ADD_GRAMMAR_FRAGMENT … #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_AUTOCORRECT_RANGE … #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_VIRTUAL_KEYBOARD_OCCLUDED_BOUNDS … #define ZCR_EXTENDED_TEXT_INPUT_V1_CONFIRM_PREEDIT … #define ZCR_EXTENDED_TEXT_INPUT_V1_INSERT_IMAGE … #define ZCR_EXTENDED_TEXT_INPUT_V1_INSERT_IMAGE_WITH_LARGE_URL … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_PREEDIT_REGION_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_CLEAR_GRAMMAR_FRAGMENTS_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_ADD_GRAMMAR_FRAGMENT_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_AUTOCORRECT_RANGE_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_VIRTUAL_KEYBOARD_OCCLUDED_BOUNDS_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_CONFIRM_PREEDIT_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_INSERT_IMAGE_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_INSERT_IMAGE_WITH_LARGE_URL_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_DESTROY_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_DEPRECATED_SET_INPUT_TYPE_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_GRAMMAR_FRAGMENT_AT_CURSOR_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_AUTOCORRECT_INFO_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_FINALIZE_VIRTUAL_KEYBOARD_CHANGES_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_FOCUS_REASON_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_INPUT_TYPE_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_SURROUNDING_TEXT_SUPPORT_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_SURROUNDING_TEXT_OFFSET_UTF16_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 */ #define ZCR_EXTENDED_TEXT_INPUT_V1_SET_LARGE_SURROUNDING_TEXT_SINCE_VERSION … /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an set_preedit_region event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_set_preedit_region(struct wl_resource *resource_, int32_t index, uint32_t length) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an clear_grammar_fragments event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_clear_grammar_fragments(struct wl_resource *resource_, uint32_t start, uint32_t end) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an add_grammar_fragment event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_add_grammar_fragment(struct wl_resource *resource_, uint32_t start, uint32_t end, const char *suggestion) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an set_autocorrect_range event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_set_autocorrect_range(struct wl_resource *resource_, uint32_t start, uint32_t end) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an set_virtual_keyboard_occluded_bounds event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_set_virtual_keyboard_occluded_bounds(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an confirm_preedit event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_confirm_preedit(struct wl_resource *resource_, uint32_t selection_behavior) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an insert_image event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_insert_image(struct wl_resource *resource_, const char *src) { … } /** * @ingroup iface_zcr_extended_text_input_v1 * Sends an insert_image_with_large_url event to the client owning the resource. * @param resource_ The client's resource */ static inline void zcr_extended_text_input_v1_send_insert_image_with_large_url(struct wl_resource *resource_, const char *mime_type, const char *charset, int32_t raw_fd, uint32_t size) { … } #ifdef __cplusplus } #endif #endif