chromium/out/Default/gen/third_party/wayland-protocols/unstable/text-input/text-input-extension-unstable-v1-client-protocol.h

/* Generated by wayland-scanner 1.23.0 */

#ifndef TEXT_INPUT_EXTENSION_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define TEXT_INPUT_EXTENSION_UNSTABLE_V1_CLIENT_PROTOCOL_H

#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @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 {};
#endif /* ZCR_TEXT_INPUT_EXTENSION_V1_ERROR_ENUM */

#define ZCR_TEXT_INPUT_EXTENSION_V1_GET_EXTENDED_TEXT_INPUT


/**
 * @ingroup iface_zcr_text_input_extension_v1
 */
#define ZCR_TEXT_INPUT_EXTENSION_V1_GET_EXTENDED_TEXT_INPUT_SINCE_VERSION

/** @ingroup iface_zcr_text_input_extension_v1 */
static inline void
zcr_text_input_extension_v1_set_user_data(struct zcr_text_input_extension_v1 *zcr_text_input_extension_v1, void *user_data)
{}

/** @ingroup iface_zcr_text_input_extension_v1 */
static inline void *
zcr_text_input_extension_v1_get_user_data(struct zcr_text_input_extension_v1 *zcr_text_input_extension_v1)
{}

static inline uint32_t
zcr_text_input_extension_v1_get_version(struct zcr_text_input_extension_v1 *zcr_text_input_extension_v1)
{}

/** @ingroup iface_zcr_text_input_extension_v1 */
static inline void
zcr_text_input_extension_v1_destroy(struct zcr_text_input_extension_v1 *zcr_text_input_extension_v1)
{}

/**
 * @ingroup iface_zcr_text_input_extension_v1
 *
 * Create extended_text_input object.
 * See zcr_extended_text_input interface for details.
 * If the given text_input object already has a extended_text_input object
 * associated, the extended_text_input_exists protocol error is raised.
 */
static inline struct zcr_extended_text_input_v1 *
zcr_text_input_extension_v1_get_extended_text_input(struct zcr_text_input_extension_v1 *zcr_text_input_extension_v1, struct zwp_text_input_v1 *text_input)
{}

#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 {};
#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 {};
#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 {};
#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 {};
#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 {};
#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 {};
#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 {};
#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 {};
#endif /* ZCR_EXTENDED_TEXT_INPUT_V1_CONFIRM_PREEDIT_SELECTION_BEHAVIOR_ENUM */

/**
 * @ingroup iface_zcr_extended_text_input_v1
 * @struct zcr_extended_text_input_v1_listener
 */
struct zcr_extended_text_input_v1_listener {};

/**
 * @ingroup iface_zcr_extended_text_input_v1
 */
static inline int
zcr_extended_text_input_v1_add_listener(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1,
					const struct zcr_extended_text_input_v1_listener *listener, void *data)
{}

#define ZCR_EXTENDED_TEXT_INPUT_V1_DESTROY
#define ZCR_EXTENDED_TEXT_INPUT_V1_DEPRECATED_SET_INPUT_TYPE
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_GRAMMAR_FRAGMENT_AT_CURSOR
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_AUTOCORRECT_INFO
#define ZCR_EXTENDED_TEXT_INPUT_V1_FINALIZE_VIRTUAL_KEYBOARD_CHANGES
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_FOCUS_REASON
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_INPUT_TYPE
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_SURROUNDING_TEXT_SUPPORT
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_SURROUNDING_TEXT_OFFSET_UTF16
#define ZCR_EXTENDED_TEXT_INPUT_V1_SET_LARGE_SURROUNDING_TEXT

/**
 * @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 */
static inline void
zcr_extended_text_input_v1_set_user_data(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, void *user_data)
{}

/** @ingroup iface_zcr_extended_text_input_v1 */
static inline void *
zcr_extended_text_input_v1_get_user_data(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1)
{}

static inline uint32_t
zcr_extended_text_input_v1_get_version(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 */
static inline void
zcr_extended_text_input_v1_destroy(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Deprecated. Use the new set_input_type.
 */
static inline void
zcr_extended_text_input_v1_deprecated_set_input_type(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t input_type, uint32_t input_mode, uint32_t input_flags, uint32_t learning_mode)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Informs the IME of the grammar fragment containing the current cursor.
 * If not existing, both start and end are set to 0. This is called
 * whenever the cursor position or surrounding text have changed.
 *
 * start and end are relative to the beginning of the input field in
 * utf-8 byte length. suggestion is the correct replacement text encoded
 * in utf-8 and suggested by ML model.
 */
static inline void
zcr_extended_text_input_v1_set_grammar_fragment_at_cursor(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t start, uint32_t end, const char *suggestion)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Informs the IME the range and bounds of the current autocorrect change.
 * This is called whenever the range or bounds have changed.
 *
 * start and end are relative to the beginning of the input field in utf-8
 * byte length.
 *
 * x, y, width, and height are the bounds of the autocorrect text, relative
 * to the window.
 *
 * This request only changes a pending state that will be effective on the
 * next 'set_surrounding_text' request.
 */
static inline void
zcr_extended_text_input_v1_set_autocorrect_info(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t start, uint32_t end, uint32_t x, uint32_t y, uint32_t width, uint32_t height)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * This request notifies the server that the client has finished making
 * requested changes to the virtual keyboard, and the server should update
 * the client with the latest virtual keyboard state. This avoids spurious
 * intermediate requests from causing the virtual keyboard to change state
 * unnecessarily.
 *
 * Clients that connect to the server at this or higher versions must send
 * this request after it finishes sending the applicable requests. The
 * server is free to decide how it handles or honors this request.
 *
 * As of version 6, the applicable requests are:
 * - zwp_text_input_v1.show_input_panel
 * - zwp_text_input_v1.hide_input_panel
 */
static inline void
zcr_extended_text_input_v1_finalize_virtual_keyboard_changes(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Updates the reason why the following focus event is triggered.
 * This should be called just before text_input::activate,
 * and is in effect when it is called together (i.e. it is not in effect
 * until text_input::activate is called).
 *
 * `reason` is an extended parameter providing the mode for the next
 * `text_input::active request`.
 */
static inline void
zcr_extended_text_input_v1_set_focus_reason(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t reason)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Used in place of zwp_text_input::set_content_type.
 *
 * Instead of hint and purpose, this API uses concepts that more closely
 * align with those used by Chrome.
 */
static inline void
zcr_extended_text_input_v1_set_input_type(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t input_type, uint32_t input_mode, uint32_t input_flags, uint32_t learning_mode, uint32_t inline_composition_support)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Some clients are not able to provide surrounding text or selection.
 * When the server receives this request with the unsupproted enum, it
 * will disable functionality relying on surrounding text and avoid
 * sending events that depend on it like delete_surrounding_text,
 * set_preedit_region and cursor_position.
 *
 * This request will take effect on the next 'set_content_type' or
 * 'set_input_type' request.
 *
 * By default, the server will assume surrounding text is supported.
 */
static inline void
zcr_extended_text_input_v1_set_surrounding_text_support(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t support)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * This updates UTF-16 offset of the immediately following
 * text_input::set_surrounding_text.
 *
 * The value will be invalidated when the next set_surrounding_text
 * comes (i.e., if two consecutive set_surrounding_text is called,
 * the second set_surrounding_text's offset should be reset to 0).
 *
 * Note: unlike other APIs, this is in "UTF-16" unit for Chrome's purpose,
 * because there's no way to convert UTF-8 offset to UTF-16 without
 * the original text, while sending whole text would cause performance
 * concerns.
 */
static inline void
zcr_extended_text_input_v1_set_surrounding_text_offset_utf16(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, uint32_t offset_utf16)
{}

/**
 * @ingroup iface_zcr_extended_text_input_v1
 *
 * Almost as same as text_input::set_surrounding_text. However, this takes handle
 * instead of string in order to avoid the limit of the size.
 *
 * |size| is the size of surrounding text in Utf-8, i.e. bytes to be read from fd.
 */
static inline void
zcr_extended_text_input_v1_set_large_surrounding_text(struct zcr_extended_text_input_v1 *zcr_extended_text_input_v1, int32_t text, uint32_t size, uint32_t cursor, uint32_t anchor)
{}

#ifdef  __cplusplus
}
#endif

#endif