Data Fields | |
void(* | enter )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, struct wl_surface *surface) |
enter event More... | |
void(* | leave )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1) |
leave event More... | |
void(* | modifiers_map )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, struct wl_array *map) |
modifiers map More... | |
void(* | input_panel_state )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t state) |
state of the input panel More... | |
void(* | preedit_string )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, const char *text, const char *commit) |
pre-edit More... | |
void(* | preedit_styling )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t index, uint32_t length, uint32_t style) |
pre-edit styling More... | |
void(* | preedit_cursor )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, int32_t index) |
pre-edit cursor More... | |
void(* | commit_string )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, const char *text) |
commit More... | |
void(* | cursor_position )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, int32_t index, int32_t anchor) |
set cursor to new position More... | |
void(* | delete_surrounding_text )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, int32_t index, uint32_t length) |
delete surrounding text More... | |
void(* | keysym )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) |
keysym More... | |
void(* | language )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, const char *language) |
language More... | |
void(* | text_direction )(void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, uint32_t direction) |
text direction More... | |
void(* zwp_text_input_v1_listener::enter) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, struct wl_surface *surface) |
enter event
Notify the text_input object when it received focus. Typically in response to an activate request.
void(* zwp_text_input_v1_listener::leave) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1) |
leave event
Notify the text_input object when it lost focus. Either in response to a deactivate request or when the assigned surface lost focus or was destroyed.
void(* zwp_text_input_v1_listener::modifiers_map) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, struct wl_array *map) |
modifiers map
Transfer an array of 0-terminated modifier names. The position in the array is the index of the modifier as used in the modifiers bitmask in the keysym event.
void(* zwp_text_input_v1_listener::input_panel_state) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t state) |
state of the input panel
Notify when the visibility state of the input panel changed.
void(* zwp_text_input_v1_listener::preedit_string) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, const char *text, const char *commit) |
pre-edit
Notify when a new composing text (pre-edit) should be set around the current cursor position. Any previously set composing text should be removed.
The commit text can be used to replace the preedit text on reset (for example on unfocus).
The text input should also handle all preedit_style and preedit_cursor events occurring directly before preedit_string.
serial | serial of the latest known text input state |
void(* zwp_text_input_v1_listener::preedit_styling) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t index, uint32_t length, uint32_t style) |
pre-edit styling
Sets styling information on composing text. The style is applied for length bytes from index relative to the beginning of the composing text (as byte offset). Multiple styles can be applied to a composing text by sending multiple preedit_styling events.
This event is handled as part of a following preedit_string event.
void(* zwp_text_input_v1_listener::preedit_cursor) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, int32_t index) |
pre-edit cursor
Sets the cursor position inside the composing text (as byte offset) relative to the start of the composing text. When index is a negative number no cursor is shown.
This event is handled as part of a following preedit_string event.
void(* zwp_text_input_v1_listener::commit_string) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, const char *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). It could also be 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 should be removed.
serial | serial of the latest known text input state |
void(* zwp_text_input_v1_listener::cursor_position) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, int32_t index, int32_t anchor) |
set cursor to new position
Notify when the cursor or anchor position should be modified.
This event should be handled as part of a following commit_string event.
void(* zwp_text_input_v1_listener::delete_surrounding_text) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, int32_t index, uint32_t length) |
delete surrounding text
Notify when the text around the current cursor position should be deleted.
Index is relative to the current cursor (in bytes). Length is the length of deleted text (in bytes).
This event should be handled as part of a following commit_string event.
void(* zwp_text_input_v1_listener::keysym) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) |
keysym
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 a wl_keyboard key_state. Modifiers are a mask for effective modifiers (where the modifier indices are set by the modifiers_map event)
serial | serial of the latest known text input state |
void(* zwp_text_input_v1_listener::language) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, const char *language) |
language
Sets the language of the input text. The "language" argument is an RFC-3066 format language tag.
serial | serial of the latest known text input state |
void(* zwp_text_input_v1_listener::text_direction) (void *data, struct zwp_text_input_v1 *zwp_text_input_v1, uint32_t serial, uint32_t direction) |
text direction
Sets the text direction of input text.
It is mainly needed for showing an input cursor on the correct side of the editor when there is no input done yet and making sure neutral direction text is laid out properly.
serial | serial of the latest known text input state |