From a0387bdc705058e5d9bcabb245385eff953bdaec Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Thu, 25 Mar 2021 23:07:40 -0600 Subject: [PATCH] experimental/text-input: Add actions Signed-off-by: Tadeo Kondrak --- .../xx-text-input/xx-text-input-v3.xml | 59 +++++++++++++++++-- 1 file changed, 54 insertions(+), 5 deletions(-) diff --git a/experimental/xx-text-input/xx-text-input-v3.xml b/experimental/xx-text-input/xx-text-input-v3.xml index ff2bce9..29cfccf 100644 --- a/experimental/xx-text-input/xx-text-input-v3.xml +++ b/experimental/xx-text-input/xx-text-input-v3.xml @@ -47,7 +47,7 @@ interface version number is reset. - + The xx_text_input_v3 interface represents text input and input methods associated with a seat. It provides enter/leave events to follow the @@ -103,7 +103,8 @@ This request resets all state associated with previous enable, disable, set_surrounding_text, set_text_change_cause, set_content_type, and set_cursor_rectangle requests, as well as the state associated with - preedit_string, commit_string, and delete_surrounding_text events. + preedit_string, commit_string, delete_surrounding_text, and action + events. The set_surrounding_text, set_content_type and set_cursor_rectangle requests must follow if the text input supports the necessary @@ -404,8 +405,9 @@ Instruct the application to apply changes to state requested by the - preedit_string, commit_string and delete_surrounding_text events. The - state relating to these events is double-buffered, and each one + preedit_string, commit_string delete_surrounding_text, and action + events. + The state relating to these events is double-buffered, and each one modifies the pending state. This event replaces the current state with the pending state. @@ -418,6 +420,7 @@ 4. Calculate surrounding text to send. 5. Insert new preedit text in cursor position. 6. Place cursor inside preedit text. + 7. Perform the requested action. The serial number reflects the last state of the xx_text_input_v3 object known to the compositor. The value of the serial argument must @@ -433,9 +436,55 @@ + + + + + + + + A possible action to perform on a text input. + + The backspace and delete actions should be handled in a similar manner + to backpace and delete keys being pressed on a keyboard. + + + + + + + + + + An action was performed on this text input. + + Values set with this event are double-buffered. They must be applied + and reset to initial on the next zwp_text_input_v4.done event. + + The initial value of action is none. + + + + + + + + Set the actions available for this text input. + + Values set with this request are double-buffered. They will get applied + on the next zwp_text_input_v4.commit request. + + If the available_actions array contains the none action, or contains the + same action multiple times, the compositor must raise the invalid_action + protocol error. + + Initially, no actions are available. + + + - + A factory for text-input objects. This object is a global singleton.