mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2025-12-20 05:50:09 +01:00
experimental/text-input: Add actions
Signed-off-by: Tadeo Kondrak <me@tadeo.ca>
This commit is contained in:
parent
88223018d1
commit
a0387bdc70
1 changed files with 54 additions and 5 deletions
|
|
@ -47,7 +47,7 @@
|
||||||
interface version number is reset.
|
interface version number is reset.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<interface name="xx_text_input_v3" version="1">
|
<interface name="xx_text_input_v3" version="2">
|
||||||
<description summary="text input">
|
<description summary="text input">
|
||||||
The xx_text_input_v3 interface represents text input and input methods
|
The xx_text_input_v3 interface represents text input and input methods
|
||||||
associated with a seat. It provides enter/leave events to follow the
|
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,
|
This request resets all state associated with previous enable, disable,
|
||||||
set_surrounding_text, set_text_change_cause, set_content_type, and
|
set_surrounding_text, set_text_change_cause, set_content_type, and
|
||||||
set_cursor_rectangle requests, as well as the state associated with
|
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
|
The set_surrounding_text, set_content_type and set_cursor_rectangle
|
||||||
requests must follow if the text input supports the necessary
|
requests must follow if the text input supports the necessary
|
||||||
|
|
@ -404,8 +405,9 @@
|
||||||
<event name="done">
|
<event name="done">
|
||||||
<description summary="apply changes">
|
<description summary="apply changes">
|
||||||
Instruct the application to apply changes to state requested by the
|
Instruct the application to apply changes to state requested by the
|
||||||
preedit_string, commit_string and delete_surrounding_text events. The
|
preedit_string, commit_string delete_surrounding_text, and action
|
||||||
state relating to these events is double-buffered, and each one
|
events.
|
||||||
|
The state relating to these events is double-buffered, and each one
|
||||||
modifies the pending state. This event replaces the current state with
|
modifies the pending state. This event replaces the current state with
|
||||||
the pending state.
|
the pending state.
|
||||||
|
|
||||||
|
|
@ -418,6 +420,7 @@
|
||||||
4. Calculate surrounding text to send.
|
4. Calculate surrounding text to send.
|
||||||
5. Insert new preedit text in cursor position.
|
5. Insert new preedit text in cursor position.
|
||||||
6. Place cursor inside preedit text.
|
6. Place cursor inside preedit text.
|
||||||
|
7. Perform the requested action.
|
||||||
|
|
||||||
The serial number reflects the last state of the xx_text_input_v3
|
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
|
object known to the compositor. The value of the serial argument must
|
||||||
|
|
@ -433,9 +436,55 @@
|
||||||
</description>
|
</description>
|
||||||
<arg name="serial" type="uint"/>
|
<arg name="serial" type="uint"/>
|
||||||
</event>
|
</event>
|
||||||
|
|
||||||
|
<enum name="error" since="2">
|
||||||
|
<entry name="invalid_action" value="0" summary="an invalid or duplicate action was specified"/>
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
<enum name="action" since="2">
|
||||||
|
<description summary="action">
|
||||||
|
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.
|
||||||
|
</description>
|
||||||
|
<entry name="none" value="0" summary="no action"/>
|
||||||
|
<entry name="submit" value="1" summary="submit"/>
|
||||||
|
<entry name="backspace" value="2" summary="delete one unit before the cursor"/>
|
||||||
|
<entry name="delete" value="3" summary="delete one unit after the cursor"/>
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
<event name="action" since="2">
|
||||||
|
<description summary="action performed">
|
||||||
|
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.
|
||||||
|
</description>
|
||||||
|
<arg name="action" type="uint" enum="action" summary="action performed"/>
|
||||||
|
<arg name="serial" type="uint" summary="serial number of the action event"/>
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
<request name="set_available_actions" since="2">
|
||||||
|
<description summary="set the available actions">
|
||||||
|
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.
|
||||||
|
</description>
|
||||||
|
<arg name="available_actions" type="array" summary="available actions"/>
|
||||||
|
</enum>
|
||||||
</interface>
|
</interface>
|
||||||
|
|
||||||
<interface name="xx_text_input_manager_v3" version="1">
|
<interface name="xx_text_input_manager_v3" version="2">
|
||||||
<description summary="text input manager">
|
<description summary="text input manager">
|
||||||
A factory for text-input objects. This object is a global singleton.
|
A factory for text-input objects. This object is a global singleton.
|
||||||
</description>
|
</description>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue