protocol: Improve formatting of input method and text protocols

To make it more readable, add an empty line between each request and
event.

Also comes with a bonus indentation fix.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
dev
Jonas Ådahl 10 years ago
parent 4a787f805e
commit e4df9eea26
  1. 28
      protocol/input-method.xml
  2. 30
      protocol/text.xml

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<protocol name="input_method"> <protocol name="input_method">
<copyright> <copyright>
Copyright © 2012, 2013 Intel Corporation Copyright © 2012, 2013 Intel Corporation
@ -25,7 +26,6 @@
THIS SOFTWARE. THIS SOFTWARE.
</copyright> </copyright>
<interface name="wl_input_method_context" version="1"> <interface name="wl_input_method_context" version="1">
<description summary="input method context"> <description summary="input method context">
Corresponds to a text input on input method side. An input method context Corresponds to a text input on input method side. An input method context
@ -43,7 +43,9 @@
and keysym. The text input can then ignore events from the input method 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). which are based on an outdated state (for example after a reset).
</description> </description>
<request name="destroy" type="destructor"/> <request name="destroy" type="destructor"/>
<request name="commit_string"> <request name="commit_string">
<description summary="commit string"> <description summary="commit string">
Send the commit string text for insertion to the application. Send the commit string text for insertion to the application.
@ -59,6 +61,7 @@
<arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
<arg name="text" type="string"/> <arg name="text" type="string"/>
</request> </request>
<request name="preedit_string"> <request name="preedit_string">
<description summary="pre-edit string"> <description summary="pre-edit string">
Send the pre-edit string text to the application text input. Send the pre-edit string text to the application text input.
@ -73,6 +76,7 @@
<arg name="text" type="string"/> <arg name="text" type="string"/>
<arg name="commit" type="string"/> <arg name="commit" type="string"/>
</request> </request>
<request name="preedit_styling"> <request name="preedit_styling">
<description summary="pre-edit styling"> <description summary="pre-edit styling">
Sets styling information on composing text. The style is applied for Sets styling information on composing text. The style is applied for
@ -86,6 +90,7 @@
<arg name="length" type="uint"/> <arg name="length" type="uint"/>
<arg name="style" type="uint"/> <arg name="style" type="uint"/>
</request> </request>
<request name="preedit_cursor"> <request name="preedit_cursor">
<description summary="pre-edit cursor"> <description summary="pre-edit cursor">
Sets the cursor position inside the composing text (as byte offset) Sets the cursor position inside the composing text (as byte offset)
@ -97,16 +102,16 @@
</description> </description>
<arg name="index" type="int"/> <arg name="index" type="int"/>
</request> </request>
<request name="delete_surrounding_text"> <request name="delete_surrounding_text">
<description summary="delete text"> <description summary="delete text">
This request will be handled on text_input side as part of a directly This request will be handled on text_input side as part of a directly
following commit_string request. following commit_string request.
</description> </description>
<arg name="index" type="int"/> <arg name="index" type="int"/>
<arg name="length" type="uint"/> <arg name="length" type="uint"/>
</request> </request>
<request name="cursor_position"> <request name="cursor_position">
<description summary="set cursor to a new position"> <description summary="set cursor to a new position">
Sets the cursor and anchor to a new position. Index is the new cursor Sets the cursor and anchor to a new position. Index is the new cursor
@ -122,9 +127,11 @@
<arg name="index" type="int"/> <arg name="index" type="int"/>
<arg name="anchor" type="int"/> <arg name="anchor" type="int"/>
</request> </request>
<request name="modifiers_map"> <request name="modifiers_map">
<arg name="map" type="array"/> <arg name="map" type="array"/>
</request> </request>
<request name="keysym"> <request name="keysym">
<description summary="keysym"> <description summary="keysym">
Notify when a key event was sent. Key events should not be used for Notify when a key event was sent. Key events should not be used for
@ -138,6 +145,7 @@
<arg name="state" type="uint"/> <arg name="state" type="uint"/>
<arg name="modifiers" type="uint"/> <arg name="modifiers" type="uint"/>
</request> </request>
<request name="grab_keyboard"> <request name="grab_keyboard">
<description summary="grab hardware keyboard"> <description summary="grab hardware keyboard">
Allows an input method to receive hardware keyboard input and process Allows an input method to receive hardware keyboard input and process
@ -145,8 +153,9 @@
allows input methods which compose multiple key events for inputting allows input methods which compose multiple key events for inputting
text like it is done for CJK languages. text like it is done for CJK languages.
</description> </description>
<arg name="keyboard" type="new_id" interface="wl_keyboard"/> <arg name="keyboard" type="new_id" interface="wl_keyboard"/>
</request> </request>
<request name="key"> <request name="key">
<description summary="forward key event"> <description summary="forward key event">
Should be used when filtering key events with grab_keyboard. Should be used when filtering key events with grab_keyboard.
@ -163,6 +172,7 @@
<arg name="key" type="uint" summary="key from wl_keyboard::key"/> <arg name="key" type="uint" summary="key from wl_keyboard::key"/>
<arg name="state" type="uint" summary="state from wl_keyboard::key"/> <arg name="state" type="uint" summary="state from wl_keyboard::key"/>
</request> </request>
<request name="modifiers"> <request name="modifiers">
<description summary="forward modifiers event"> <description summary="forward modifiers event">
Should be used when filtering key events with grab_keyboard. Should be used when filtering key events with grab_keyboard.
@ -177,6 +187,7 @@
<arg name="mods_locked" type="uint" summary="mods_locked from wl_keyboard::modifiers"/> <arg name="mods_locked" type="uint" summary="mods_locked from wl_keyboard::modifiers"/>
<arg name="group" type="uint" summary="group from wl_keyboard::modifiers"/> <arg name="group" type="uint" summary="group from wl_keyboard::modifiers"/>
</request> </request>
<request name="language"> <request name="language">
<arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
<arg name="language" type="string"/> <arg name="language" type="string"/>
@ -185,6 +196,7 @@
<arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
<arg name="direction" type="uint"/> <arg name="direction" type="uint"/>
</request> </request>
<event name="surrounding_text"> <event name="surrounding_text">
<description summary="surrounding text event"> <description summary="surrounding text event">
The plain surrounding text around the input position. Cursor is the The plain surrounding text around the input position. Cursor is the
@ -197,19 +209,24 @@
<arg name="cursor" type="uint"/> <arg name="cursor" type="uint"/>
<arg name="anchor" type="uint"/> <arg name="anchor" type="uint"/>
</event> </event>
<event name="reset"> <event name="reset">
</event> </event>
<event name="content_type"> <event name="content_type">
<arg name="hint" type="uint"/> <arg name="hint" type="uint"/>
<arg name="purpose" type="uint"/> <arg name="purpose" type="uint"/>
</event> </event>
<event name="invoke_action"> <event name="invoke_action">
<arg name="button" type="uint"/> <arg name="button" type="uint"/>
<arg name="index" type="uint"/> <arg name="index" type="uint"/>
</event> </event>
<event name="commit_state"> <event name="commit_state">
<arg name="serial" type="uint" summary="serial of text input state"/> <arg name="serial" type="uint" summary="serial of text input state"/>
</event> </event>
<event name="preferred_language"> <event name="preferred_language">
<arg name="language" type="string"/> <arg name="language" type="string"/>
</event> </event>
@ -222,6 +239,7 @@
object per seat. On activate there is a new input method context object object per seat. On activate there is a new input method context object
created which allows the input method to communicate with the text input. created which allows the input method to communicate with the text input.
</description> </description>
<event name="activate"> <event name="activate">
<description summary="activate event"> <description summary="activate event">
A text input was activated. Creates an input method context object A text input was activated. Creates an input method context object
@ -229,6 +247,7 @@
</description> </description>
<arg name="id" type="new_id" interface="wl_input_method_context"/> <arg name="id" type="new_id" interface="wl_input_method_context"/>
</event> </event>
<event name="deactivate"> <event name="deactivate">
<description summary="deactivate event"> <description summary="deactivate event">
The text input corresponding to the context argument was deactivated. The text input corresponding to the context argument was deactivated.
@ -270,4 +289,5 @@
</description> </description>
</request> </request>
</interface> </interface>
</protocol> </protocol>

@ -48,6 +48,7 @@
and keysym. The text input can then ignore events from the input method 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). which are based on an outdated state (for example after a reset).
</description> </description>
<request name="activate"> <request name="activate">
<description summary="request activation"> <description summary="request activation">
Requests the text-input object to be activated (typically when the Requests the text-input object to be activated (typically when the
@ -60,6 +61,7 @@
<arg name="seat" type="object" interface="wl_seat"/> <arg name="seat" type="object" interface="wl_seat"/>
<arg name="surface" type="object" interface="wl_surface"/> <arg name="surface" type="object" interface="wl_surface"/>
</request> </request>
<request name="deactivate"> <request name="deactivate">
<description summary="request deactivation"> <description summary="request deactivation">
Requests the text-input object to be deactivated (typically when the Requests the text-input object to be deactivated (typically when the
@ -68,16 +70,19 @@
</description> </description>
<arg name="seat" type="object" interface="wl_seat"/> <arg name="seat" type="object" interface="wl_seat"/>
</request> </request>
<request name="show_input_panel"> <request name="show_input_panel">
<description summary="show input panels"> <description summary="show input panels">
Requests input panels (virtual keyboard) to show. Requests input panels (virtual keyboard) to show.
</description> </description>
</request> </request>
<request name="hide_input_panel"> <request name="hide_input_panel">
<description summary="hide input panels"> <description summary="hide input panels">
Requests input panels (virtual keyboard) to hide. Requests input panels (virtual keyboard) to hide.
</description> </description>
</request> </request>
<request name="reset"> <request name="reset">
<description summary="reset"> <description summary="reset">
Should be called by an editor widget when the input state should be Should be called by an editor widget when the input state should be
@ -85,6 +90,7 @@
input method flow. input method flow.
</description> </description>
</request> </request>
<request name="set_surrounding_text"> <request name="set_surrounding_text">
<description summary="sets the surrounding text"> <description summary="sets the surrounding text">
Sets the plain surrounding text around the input position. Text is Sets the plain surrounding text around the input position. Text is
@ -97,6 +103,7 @@
<arg name="cursor" type="uint"/> <arg name="cursor" type="uint"/>
<arg name="anchor" type="uint"/> <arg name="anchor" type="uint"/>
</request> </request>
<enum name="content_hint"> <enum name="content_hint">
<description summary="content hint"> <description summary="content hint">
Content hint is a bitmask to allow to modify the behavior of the text Content hint is a bitmask to allow to modify the behavior of the text
@ -116,6 +123,7 @@
<entry name="latin" value="0x100" summary="just latin characters should be entered"/> <entry name="latin" value="0x100" summary="just latin characters should be entered"/>
<entry name="multiline" value="0x200" summary="the text input is multiline"/> <entry name="multiline" value="0x200" summary="the text input is multiline"/>
</enum> </enum>
<enum name="content_purpose"> <enum name="content_purpose">
<description summary="content purpose"> <description summary="content purpose">
The content purpose allows to specify the primary purpose of a text The content purpose allows to specify the primary purpose of a text
@ -138,6 +146,7 @@
<entry name="datetime" value="11" summary="input a date and time"/> <entry name="datetime" value="11" summary="input a date and time"/>
<entry name="terminal" value="12" summary="input for a terminal"/> <entry name="terminal" value="12" summary="input for a terminal"/>
</enum> </enum>
<request name="set_content_type"> <request name="set_content_type">
<description summary="set content purpose and hint"> <description summary="set content purpose and hint">
Sets the content purpose and content hint. While the purpose is the Sets the content purpose and content hint. While the purpose is the
@ -151,12 +160,14 @@
<arg name="hint" type="uint"/> <arg name="hint" type="uint"/>
<arg name="purpose" type="uint"/> <arg name="purpose" type="uint"/>
</request> </request>
<request name="set_cursor_rectangle"> <request name="set_cursor_rectangle">
<arg name="x" type="int"/> <arg name="x" type="int"/>
<arg name="y" type="int"/> <arg name="y" type="int"/>
<arg name="width" type="int"/> <arg name="width" type="int"/>
<arg name="height" type="int"/> <arg name="height" type="int"/>
</request> </request>
<request name="set_preferred_language"> <request name="set_preferred_language">
<description summary="sets preferred language"> <description summary="sets preferred language">
Sets a specific language. This allows for example a virtual keyboard to Sets a specific language. This allows for example a virtual keyboard to
@ -169,13 +180,16 @@
</description> </description>
<arg name="language" type="string"/> <arg name="language" type="string"/>
</request> </request>
<request name="commit_state"> <request name="commit_state">
<arg name="serial" type="uint" summary="used to identify the known state"/> <arg name="serial" type="uint" summary="used to identify the known state"/>
</request> </request>
<request name="invoke_action"> <request name="invoke_action">
<arg name="button" type="uint"/> <arg name="button" type="uint"/>
<arg name="index" type="uint"/> <arg name="index" type="uint"/>
</request> </request>
<event name="enter"> <event name="enter">
<description summary="enter event"> <description summary="enter event">
Notify the text-input object when it received focus. Typically in Notify the text-input object when it received focus. Typically in
@ -183,6 +197,7 @@
</description> </description>
<arg name="surface" type="object" interface="wl_surface"/> <arg name="surface" type="object" interface="wl_surface"/>
</event> </event>
<event name="leave"> <event name="leave">
<description summary="leave event"> <description summary="leave event">
Notify the text-input object when it lost focus. Either in response Notify the text-input object when it lost focus. Either in response
@ -190,6 +205,7 @@
destroyed. destroyed.
</description> </description>
</event> </event>
<event name="modifiers_map"> <event name="modifiers_map">
<description summary="modifiers map"> <description summary="modifiers map">
Transfer an array of 0-terminated modifiers names. The position in Transfer an array of 0-terminated modifiers names. The position in
@ -198,12 +214,14 @@
</description> </description>
<arg name="map" type="array"/> <arg name="map" type="array"/>
</event> </event>
<event name="input_panel_state"> <event name="input_panel_state">
<description summary="state of the input panel"> <description summary="state of the input panel">
Notify when the visibility state of the input panel changed. Notify when the visibility state of the input panel changed.
</description> </description>
<arg name="state" type="uint"/> <arg name="state" type="uint"/>
</event> </event>
<event name="preedit_string"> <event name="preedit_string">
<description summary="pre-edit"> <description summary="pre-edit">
Notify when a new composing text (pre-edit) should be set around the Notify when a new composing text (pre-edit) should be set around the
@ -220,6 +238,7 @@
<arg name="text" type="string"/> <arg name="text" type="string"/>
<arg name="commit" type="string"/> <arg name="commit" type="string"/>
</event> </event>
<enum name="preedit_style"> <enum name="preedit_style">
<entry name="default" value="0" summary="default style for composing text"/> <entry name="default" value="0" summary="default style for composing text"/>
<entry name="none" value="1" summary="style should be the same as in non-composing text"/> <entry name="none" value="1" summary="style should be the same as in non-composing text"/>
@ -230,6 +249,7 @@
<entry name="selection" value="6"/> <entry name="selection" value="6"/>
<entry name="incorrect" value="7"/> <entry name="incorrect" value="7"/>
</enum> </enum>
<event name="preedit_styling"> <event name="preedit_styling">
<description summary="pre-edit styling"> <description summary="pre-edit styling">
Sets styling information on composing text. The style is applied for Sets styling information on composing text. The style is applied for
@ -244,6 +264,7 @@
<arg name="length" type="uint"/> <arg name="length" type="uint"/>
<arg name="style" type="uint"/> <arg name="style" type="uint"/>
</event> </event>
<event name="preedit_cursor"> <event name="preedit_cursor">
<description summary="pre-edit cursor"> <description summary="pre-edit cursor">
Sets the cursor position inside the composing text (as byte Sets the cursor position inside the composing text (as byte
@ -254,6 +275,7 @@
</description> </description>
<arg name="index" type="int"/> <arg name="index" type="int"/>
</event> </event>
<event name="commit_string"> <event name="commit_string">
<description summary="commit"> <description summary="commit">
Notify when text should be inserted into the editor widget. The text to Notify when text should be inserted into the editor widget. The text to
@ -267,6 +289,7 @@
<arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
<arg name="text" type="string"/> <arg name="text" type="string"/>
</event> </event>
<event name="cursor_position"> <event name="cursor_position">
<description summary="set cursor to new position"> <description summary="set cursor to new position">
Notify when the cursor or anchor position should be modified. Notify when the cursor or anchor position should be modified.
@ -277,6 +300,7 @@
<arg name="index" type="int"/> <arg name="index" type="int"/>
<arg name="anchor" type="int"/> <arg name="anchor" type="int"/>
</event> </event>
<event name="delete_surrounding_text"> <event name="delete_surrounding_text">
<description summary="delete surrounding text"> <description summary="delete surrounding text">
Notify when the text around the current cursor position should be Notify when the text around the current cursor position should be
@ -291,6 +315,7 @@
<arg name="index" type="int"/> <arg name="index" type="int"/>
<arg name="length" type="uint"/> <arg name="length" type="uint"/>
</event> </event>
<event name="keysym"> <event name="keysym">
<description summary="keysym"> <description summary="keysym">
Notify when a key event was sent. Key events should not be used Notify when a key event was sent. Key events should not be used
@ -306,6 +331,7 @@
<arg name="state" type="uint"/> <arg name="state" type="uint"/>
<arg name="modifiers" type="uint"/> <arg name="modifiers" type="uint"/>
</event> </event>
<event name="language"> <event name="language">
<description summary="language"> <description summary="language">
Sets the language of the input text. The "language" argument is a RFC-3066 Sets the language of the input text. The "language" argument is a RFC-3066
@ -314,11 +340,13 @@
<arg name="serial" type="uint" summary="serial of the latest known text input state"/> <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
<arg name="language" type="string"/> <arg name="language" type="string"/>
</event> </event>
<enum name="text_direction"> <enum name="text_direction">
<entry name="auto" value="0" summary="automatic text direction based on text and language"/> <entry name="auto" value="0" summary="automatic text direction based on text and language"/>
<entry name="ltr" value="1" summary="left-to-right"/> <entry name="ltr" value="1" summary="left-to-right"/>
<entry name="rtl" value="2" summary="right-to-left"/> <entry name="rtl" value="2" summary="right-to-left"/>
</enum> </enum>
<event name="text_direction"> <event name="text_direction">
<description summary="text direction"> <description summary="text direction">
Sets the text direction of input text. Sets the text direction of input text.
@ -336,6 +364,7 @@
<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>
<request name="create_text_input"> <request name="create_text_input">
<description summary="create text input"> <description summary="create text input">
Creates a new text-input object. Creates a new text-input object.
@ -343,4 +372,5 @@
<arg name="id" type="new_id" interface="wl_text_input"/> <arg name="id" type="new_id" interface="wl_text_input"/>
</request> </request>
</interface> </interface>
</protocol> </protocol>

Loading…
Cancel
Save