wayland::zwp_input_method_context_v1_t(3) | Wayland++ | wayland::zwp_input_method_context_v1_t(3) |
wayland::zwp_input_method_context_v1_t - input method context
#include <wayland-client-protocol-unstable.hpp>
Inherits wayland::proxy_t.
enum class wrapper_type { standard, display,
foreign, proxy_wrapper }
void commit_string (uint32_t serial, std::string const
&text)
commit string void preedit_string (uint32_t serial, std::string const
&text, std::string const &commit)
pre-edit string void preedit_styling (uint32_t index, uint32_t length,
zwp_text_input_v1_preedit_style const &style)
pre-edit styling void preedit_cursor (int32_t index)
pre-edit cursor void delete_surrounding_text (int32_t index, uint32_t
length)
delete text void cursor_position (int32_t index, int32_t anchor)
set cursor to a new position void modifiers_map (array_t const
&map)
void keysym (uint32_t serial, uint32_t time, uint32_t sym,
keyboard_key_state const &state, uint32_t modifiers)
keysym keyboard_t grab_keyboard ()
grab hardware keyboard void key (uint32_t serial, uint32_t time,
uint32_t key, keyboard_key_state const &state)
forward key event void modifiers (uint32_t serial, uint32_t
mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group)
forward modifiers event void language (uint32_t serial, std::string
const &language)
void text_direction (uint32_t serial, uint32_t direction)
std::function< void(std::string, uint32_t, uint32_t)> &
on_surrounding_text ()
surrounding text event std::function<
void(zwp_text_input_v1_content_hint,
zwp_text_input_v1_content_purpose)> & on_content_type ()
std::function< void(uint32_t, uint32_t)> & on_invoke_action
()
std::function< void(uint32_t)> & on_commit_state ()
std::function< void(std::string)> & on_preferred_language ()
uint32_t get_id () const
Get the id of a proxy object. std::string get_class () const
Get the interface name (class) of a proxy object. uint32_t get_version
() const
Get the protocol object version of a proxy object. wrapper_type
get_wrapper_type () const
Get the type of a proxy object. void set_queue (event_queue_t
queue)
Assign a proxy to an event queue. wl_proxy * c_ptr () const
Get a pointer to the underlying C struct. bool proxy_has_object ()
const
Check whether this wrapper actually wraps an object. operator bool ()
const
Check whether this wrapper actually wraps an object. bool operator==
(const proxy_t &right) const
Check whether two wrappers refer to the same object. bool operator!=
(const proxy_t &right) const
Check whether two wrappers refer to different objects. void
proxy_release ()
Release the wrapped object (if any), making this an empty wrapper.
static constexpr std::uint32_t commit_string_since_version
= 1
Minimum protocol version required for the commit_string function.
static constexpr std::uint32_t preedit_string_since_version = 1
Minimum protocol version required for the preedit_string function.
static constexpr std::uint32_t preedit_styling_since_version = 1
Minimum protocol version required for the preedit_styling function.
static constexpr std::uint32_t preedit_cursor_since_version = 1
Minimum protocol version required for the preedit_cursor function.
static constexpr std::uint32_t delete_surrounding_text_since_version
= 1
Minimum protocol version required for the delete_surrounding_text
function. static constexpr std::uint32_t
cursor_position_since_version = 1
Minimum protocol version required for the cursor_position function.
static constexpr std::uint32_t modifiers_map_since_version = 1
Minimum protocol version required for the modifiers_map function.
static constexpr std::uint32_t keysym_since_version = 1
Minimum protocol version required for the keysym function. static
constexpr std::uint32_t grab_keyboard_since_version = 1
Minimum protocol version required for the grab_keyboard function.
static constexpr std::uint32_t key_since_version = 1
Minimum protocol version required for the key function. static
constexpr std::uint32_t modifiers_since_version = 1
Minimum protocol version required for the modifiers function. static
constexpr std::uint32_t language_since_version = 1
Minimum protocol version required for the language function. static
constexpr std::uint32_t text_direction_since_version = 1
Minimum protocol version required for the text_direction function.
input method context
Corresponds to a text input on the input method side. An input method context is created on text input activation on the input method side. It allows receiving information about the text input from the application via events. Input method contexts do not keep state after deactivation and should be destroyed after deactivation is handled.
Text is generally UTF-8 encoded, indices and lengths are in bytes.
Serials are used to synchronize the state between the text input and an input method. New serials are sent by the text input in the commit_state request and are used by the input method to indicate the known text input state in events like preedit_string, commit_string, and keysym. The text input can then ignore events from the input method which are based on an outdated state (for example after a reset).
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.
Definition at line 704 of file wayland-client-protocol-unstable.hpp.
Underlying wl_proxy type and properties of a proxy_t that affect construction, destruction, and event handling
Enumerator
Definition at line 116 of file wayland-client.hpp.
Get a pointer to the underlying C struct.
Returns
commit string
Parameters
Send the commit string text for insertion to the application.
The text to commit could be either just a single character after a key press or the result of some composing (pre-edit). It could be also an empty text when some text should be removed (see delete_surrounding_text) or when the input cursor should be moved (see cursor_position).
Any previously set composing text will be removed.
Definition at line 4543 of file wayland-client-protocol-unstable.cpp.
set cursor to a new position
Parameters
Set the cursor and anchor to a new position. Index is the new cursor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). Anchor is the new anchor position in bytes (when >= 0 this is relative to the end of the inserted text, otherwise it is relative to the beginning of the inserted text). When there should be no selected text, anchor should be the same as index.
This request will be handled on the text_input side directly following a commit_string request.
Definition at line 4573 of file wayland-client-protocol-unstable.cpp.
delete text
Parameters
Remove the surrounding text.
This request will be handled on the text_input side directly following a commit_string request.
Definition at line 4567 of file wayland-client-protocol-unstable.cpp.
Get the interface name (class) of a proxy object.
Returns
Get the id of a proxy object.
Returns
Get the protocol object version of a proxy object. Gets the protocol object version of a proxy object, or 0 if the proxy was created with unversioned API.
A returned value of 0 means that no version information is available, so the caller must make safe assumptions about the object's real version.
display_t will always return version 0.
Returns
Get the type of a proxy object.
Definition at line 302 of file wayland-client.hpp.
grab hardware keyboard Allow an input method to receive hardware keyboard input and process key events to generate text events (with pre-edit) over the wire. This allows input methods which compose multiple key events for inputting text like it is done for CJK languages.
Definition at line 4591 of file wayland-client-protocol-unstable.cpp.
forward key event
Parameters
Forward a wl_keyboard::key event to the client that was not processed by the input method itself. Should be used when filtering key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::key event.
For generating custom key events use the keysym request instead.
Definition at line 4598 of file wayland-client-protocol-unstable.cpp.
keysym
Parameters
Notify when a key event was sent. Key events should not be used for normal text input operations, which should be done with commit_string, delete_surrounding_text, etc. The key event follows the wl_keyboard key event convention. Sym is an XKB keysym, state is a wl_keyboard key_state.
Definition at line 4585 of file wayland-client-protocol-unstable.cpp.
Parameters
Definition at line 4610 of file wayland-client-protocol-unstable.cpp.
forward modifiers event
Parameters
Forward a wl_keyboard::modifiers event to the client that was not processed by the input method itself. Should be used when filtering key events with grab_keyboard. The arguments should be the ones from the wl_keyboard::modifiers event.
Definition at line 4604 of file wayland-client-protocol-unstable.cpp.
Parameters
Definition at line 4579 of file wayland-client-protocol-unstable.cpp.
Parameters
Definition at line 4642 of file wayland-client-protocol-unstable.cpp.
Parameters
Definition at line 4632 of file wayland-client-protocol-unstable.cpp.
Parameters
Definition at line 4637 of file wayland-client-protocol-unstable.cpp.
Parameters
Definition at line 4647 of file wayland-client-protocol-unstable.cpp.
surrounding text event
Parameters
The plain surrounding text around the input position. Cursor is the position in bytes within the surrounding text relative to the beginning of the text. Anchor is the position in bytes of the selection anchor within the surrounding text relative to the beginning of the text. If there is no selected text then anchor is the same as cursor.
Definition at line 4622 of file wayland-client-protocol-unstable.cpp.
Check whether this wrapper actually wraps an object.
Returns
Check whether two wrappers refer to different objects.
Check whether two wrappers refer to the same object.
pre-edit cursor
Parameters
Set the cursor position inside the composing text (as byte offset) relative to the start of the composing text.
When index is negative no cursor should be displayed.
This request should be sent before sending a preedit_string request.
Definition at line 4561 of file wayland-client-protocol-unstable.cpp.
pre-edit string
Parameters
Send the pre-edit string text to the application text input.
The commit text can be used to replace the pre-edit text on reset (for example on unfocus).
Previously sent preedit_style and preedit_cursor requests are also processed by the text_input.
Definition at line 4549 of file wayland-client-protocol-unstable.cpp.
pre-edit styling
Parameters
Set the styling information on composing text. The style is applied for length in bytes from index relative to the beginning of the composing text (as byte offset). Multiple styles can be applied to a composing text.
This request should be sent before sending a preedit_string request.
Definition at line 4555 of file wayland-client-protocol-unstable.cpp.
Check whether this wrapper actually wraps an object.
Returns
Release the wrapped object (if any), making this an empty wrapper. Note that display_t instances cannot be released this way. Attempts to do so are ignored.
Examples
foreign_display.cpp.
Assign a proxy to an event queue.
Parameters
Assign proxy to event queue. Events coming from proxy will be queued in queue instead of the display's main queue.
See also: display_t::dispatch_queue().
Examples
proxy_wrapper.cpp.
Parameters
Definition at line 4616 of file wayland-client-protocol-unstable.cpp.
Minimum protocol version required for the commit_string function.
Definition at line 751 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the cursor_position function.
Definition at line 845 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the delete_surrounding_text function.
Definition at line 823 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the grab_keyboard function.
Definition at line 888 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the key function.
Definition at line 908 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the keysym function.
Definition at line 874 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the language function.
Definition at line 938 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the modifiers_map function.
Definition at line 855 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the modifiers function.
Definition at line 927 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the preedit_cursor function.
Definition at line 807 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the preedit_string function.
Definition at line 771 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the preedit_styling function.
Definition at line 790 of file wayland-client-protocol-unstable.hpp.
Minimum protocol version required for the text_direction function.
Definition at line 949 of file wayland-client-protocol-unstable.hpp.
Generated automatically by Doxygen for Wayland++ from the source code.
Mon Apr 22 2024 09:52:15 | Version 1.0.0 |