wayland::serve...d_context_v1_t(3)
Hiii bestie π welcome to the Wayland++ manual page for wayland::serve...d_context_v1_t(3). This one is giving input-method-context energy, and we are keeping every single detail, fr fr. π«Ά
πΈ NAME πΈ
wayland::server::zwp_input_method_context_v1_t β input method context. That's the whole name, bestie, and yes, it's a whole vibe. π
β¨ SYNOPSIS β¨
#include <wayland-server-protocol-unstable.hpp>
π Public Member Functions π
std::function< void(uint32_t, std::string)> & on_commit_string ()β commit string. Slay. πstd::function< void(uint32_t, std::string, std::string)> & on_preedit_string ()β pre-edit string. β¨std::function< void(uint32_t, uint32_t, zwp_text_input_v1_preedit_style)> & on_preedit_styling ()β pre-edit styling. πstd::function< void(int32_t)> & on_preedit_cursor ()β pre-edit cursor. π¦std::function< void(int32_t, uint32_t)> & on_delete_surrounding_text ()β delete text. πstd::function< void(int32_t, int32_t)> & on_cursor_position ()β set cursor to a new position. πstd::function< void(array_t)> & on_modifiers_map ()β no little description line here in the original, just the function itself. πstd::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state, uint32_t)> & on_keysym ()β keysym. π₯std::function< void(keyboard_t)> & on_grab_keyboard ()β grab hardware keyboard. β¨οΈstd::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> & on_key ()β forward key event. πstd::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> & on_modifiers ()β forward modifiers event. βstd::function< void(uint32_t, std::string)> & on_language ()β no description line in the original. πstd::function< void(uint32_t, uint32_t)> & on_text_direction ()β no description line in the original. π§void surrounding_text (std::string const &text, uint32_t cursor, uint32_t anchor, bool post=true)β surrounding text event. πΈvoid content_type (zwp_text_input_v1_content_hint const &hint, zwp_text_input_v1_content_purpose const &purpose, bool post=true)β no description line in the original. πvoid invoke_action (uint32_t button, uint32_t index, bool post=true)β no description line in the original. πvoid commit_state (uint32_t serial, bool post=true)β no description line in the original. β¨void preferred_language (std::string const &language, bool post=true)β no description line in the original. π¦bool proxy_has_object () constβ Check whether this wrapper actually wraps an object. πvoid post_no_memory () constβ no description line in the original. πuint32_t get_id () constβ no description line in the original. πclient_t get_client () constβ no description line in the original. π«Άunsigned int get_version () constβ no description line in the original. πstd::string get_class ()β no description line in the original. π
π Static Public Attributes π
static constexpr std::uint32_t surrounding_text_since_version = 1β Minimum protocol version required for the surrounding_text function.static constexpr std::uint32_t reset_since_version = 1β Minimum protocol version required for the reset function.static constexpr std::uint32_t content_type_since_version = 1β Minimum protocol version required for the content_type function.static constexpr std::uint32_t invoke_action_since_version = 1β Minimum protocol version required for the invoke_action function.static constexpr std::uint32_t commit_state_since_version = 1β Minimum protocol version required for the commit_state function.static constexpr std::uint32_t preferred_language_since_version = 1β Minimum protocol version required for the preferred_language function.
π Detailed Description π
input method context. That's the short vibe. β¨
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. No cap, that part matters. π«Ά
Text is generally UTF-8 encoded, indices and lengths are in bytes. Bytes, bestie β not vibes. π
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 753 of file wayland-server-protocol-unstable.hpp. π
π Member Function Documentation π
okay bestie, this is the member-function era of the page β¨ every signature is copied exactly, every param is named, every Definition at line ... is here. no skips, no cap. π«Ά
π zwp_input_method_context_v1_t::commit_state
void zwp_input_method_context_v1_t::commit_state (uint32_t serial, bool post
= true)
- Parameters
serialβ serial of text input state
Definition at line 4523 of file wayland-server-protocol-unstable.cpp.
π zwp_input_method_context_v1_t::content_type
void zwp_input_method_context_v1_t::content_type
(zwp_text_input_v1_content_hint const & hint,
zwp_text_input_v1_content_purpose const & purpose, bool post = true)
- Parameters
hintpurpose
Definition at line 4513 of file wayland-server-protocol-unstable.cpp.
π¦ wayland::server::resource_t::get_class [inherited]
std::string wayland::server::resource_t::get_class () [inherited]
Retrieve the interface name (class) of a resource object.
- Returns β Interface name of the resource object.
π¦ wayland::server::resource_t::get_client [inherited]
client_t wayland::server::resource_t::get_client () const [inherited]
Get the associated client.
- Returns β the client that owns the resource.
π¦ wayland::server::resource_t::get_id [inherited]
uint32_t wayland::server::resource_t::get_id () const [inherited]
Get the internal ID of the resource.
- Returns β the internal ID of the resource.
π¦ wayland::server::resource_t::get_version [inherited]
unsigned int wayland::server::resource_t::get_version () const [inherited]
Get interface version.
- Returns β Interface version this resource has been constructed with.
π zwp_input_method_context_v1_t::invoke_action
void zwp_input_method_context_v1_t::invoke_action (uint32_t button, uint32_t
index, bool post = true)
- Parameters
buttonindex
Definition at line 4518 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_commit_string
std::function< void(uint32_t, std::string)> &
zwp_input_method_context_v1_t::on_commit_string ()
commit string
- Parameters
serialβ serial of the latest known text input statetext
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 4425 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_cursor_position
std::function< void(int32_t, int32_t)> &
zwp_input_method_context_v1_t::on_cursor_position ()
set cursor to a new position
- Parameters
indexanchor
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 4455 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_delete_surrounding_text
std::function< void(int32_t, uint32_t)> &
zwp_input_method_context_v1_t::on_delete_surrounding_text ()
delete text
- Parameters
indexlength
Remove the surrounding text.
This request will be handled on the text_input side directly following a commit_string request.
Definition at line 4449 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_grab_keyboard
std::function< void(keyboard_t)> &
zwp_input_method_context_v1_t::on_grab_keyboard ()
grab hardware keyboard
- Parameters
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 4473 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_key
std::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state)> &
zwp_input_method_context_v1_t::on_key ()
forward key event
- Parameters
serialβ serial fromwl_keyboard::keytimeβ time fromwl_keyboard::keykeyβ key fromwl_keyboard::keystateβ state fromwl_keyboard::key
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 4479 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_keysym
std::function< void(uint32_t, uint32_t, uint32_t, keyboard_key_state,
uint32_t)> & zwp_input_method_context_v1_t::on_keysym ()
keysym
- Parameters
serialβ serial of the latest known text input statetimesymstatemodifiers
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 4467 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_language
std::function< void(uint32_t, std::string)> &
zwp_input_method_context_v1_t::on_language ()
- Parameters
serialβ serial of the latest known text input statelanguage
Definition at line 4491 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_modifiers
std::function< void(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)> &
zwp_input_method_context_v1_t::on_modifiers ()
forward modifiers event
- Parameters
serialβ serial fromwl_keyboard::modifiersmods_depressedβ mods_depressed fromwl_keyboard::modifiersmods_latchedβ mods_latched fromwl_keyboard::modifiersmods_lockedβ mods_locked fromwl_keyboard::modifiersgroupβ group fromwl_keyboard::modifiers
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 4485 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_modifiers_map
std::function< void(array_t)> &
zwp_input_method_context_v1_t::on_modifiers_map ()
- Parameters
map
Definition at line 4461 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_preedit_cursor
std::function< void(int32_t)> &
zwp_input_method_context_v1_t::on_preedit_cursor ()
pre-edit cursor
- Parameters
index
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 4443 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_preedit_string
std::function< void(uint32_t, std::string, std::string)> &
zwp_input_method_context_v1_t::on_preedit_string ()
pre-edit string
- Parameters
serialβ serial of the latest known text input statetextcommit
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 4431 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_preedit_styling
std::function< void(uint32_t, uint32_t, zwp_text_input_v1_preedit_style)> &
zwp_input_method_context_v1_t::on_preedit_styling ()
pre-edit styling
- Parameters
indexlengthstyle
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 4437 of file wayland-server-protocol-unstable.cpp.
πΈ zwp_input_method_context_v1_t::on_text_direction
std::function< void(uint32_t, uint32_t)> &
zwp_input_method_context_v1_t::on_text_direction ()
- Parameters
serialβ serial of the latest known text input statedirection
Definition at line 4497 of file wayland-server-protocol-unstable.cpp.
π¦ wayland::server::resource_t::post_no_memory [inherited]
void wayland::server::resource_t::post_no_memory () const [inherited]
Post "not enough memory" error to the client.
If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance.
π zwp_input_method_context_v1_t::preferred_language
void zwp_input_method_context_v1_t::preferred_language (std::string const &
language, bool post = true)
- Parameters
language
Definition at line 4528 of file wayland-server-protocol-unstable.cpp.
π¦ wayland::server::resource_t::proxy_has_object [inherited]
bool wayland::server::resource_t::proxy_has_object () const [inherited]
Check whether this wrapper actually wraps an object.
- Returns β
trueif there is an underlying object,falseif this wrapper is empty
π zwp_input_method_context_v1_t::surrounding_text
void zwp_input_method_context_v1_t::surrounding_text (std::string const &
text, uint32_t cursor, uint32_t anchor, bool post = true)
surrounding text event
- Parameters
textcursoranchor
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 4503 of file wayland-server-protocol-unstable.cpp.
π Member Data Documentation π
okay so these are the version-gate girlies π
β all static, all constexpr, all std::uint32_t, and every single one is sitting at = 1. They tell you the minimum protocol version needed before each function is allowed to slay. no cap, very demure, very protocol.
std::uint32_t wayland::server::zwp_input_method_context_v1_t::commit_state_since_version=1[static], [constexpr] β Minimum protocol version required for thecommit_statefunction.
Definition at line 1022 of wayland-server-protocol-unstable.hpp.
std::uint32_t wayland::server::zwp_input_method_context_v1_t::content_type_since_version=1[static], [constexpr] β Minimum protocol version required for thecontent_typefunction.
Definition at line 1001 of wayland-server-protocol-unstable.hpp.
std::uint32_t wayland::server::zwp_input_method_context_v1_t::invoke_action_since_version=1[static], [constexpr] β Minimum protocol version required for theinvoke_actionfunction.
Definition at line 1012 of wayland-server-protocol-unstable.hpp.
std::uint32_t wayland::server::zwp_input_method_context_v1_t::preferred_language_since_version=1[static], [constexpr] β Minimum protocol version required for thepreferred_languagefunction.
Definition at line 1032 of wayland-server-protocol-unstable.hpp.
std::uint32_t wayland::server::zwp_input_method_context_v1_t::reset_since_version=1[static], [constexpr] β Minimum protocol version required for theresetfunction.
Definition at line 990 of wayland-server-protocol-unstable.hpp.
std::uint32_t wayland::server::zwp_input_method_context_v1_t::surrounding_text_since_version=1[static], [constexpr] β Minimum protocol version required for thesurrounding_textfunction.
Definition at line 981 of wayland-server-protocol-unstable.hpp.
π Author π
Generated automatically by Doxygen for Wayland++ from the source code.
and that's the whole page, bestie π«Άβ¨ source says Wayland++ version 1.0.1, dated Fri Mar 27 2026 β footer info delivered cutely, as promised π bye bye ππ
π¦ where this page comes from
- ubuntu stonking: waylandpp-dev 1.0.1-2 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms