protocol: Improve formatting of input method and text protocols
authorJonas Ådahl <jadahl@gmail.com>
Wed, 17 Sep 2014 20:49:04 +0000 (22:49 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Tue, 12 May 2015 04:03:55 +0000 (12:03 +0800)
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>
protocol/input-method.xml
protocol/text.xml

index b45a77e..be1b867 100644 (file)
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <protocol name="input_method">
+
   <copyright>
     Copyright © 2012, 2013 Intel Corporation
 
@@ -25,7 +26,6 @@
     THIS SOFTWARE.
   </copyright>
 
-
   <interface name="wl_input_method_context" version="1">
     <description summary="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
       which are based on an outdated state (for example after a reset).
     </description>
+
     <request name="destroy" type="destructor"/>
+
     <request name="commit_string">
       <description summary="commit string">
         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="text" type="string"/>
     </request>
+
     <request name="preedit_string">
       <description summary="pre-edit string">
         Send the pre-edit string text to the application text input.
@@ -73,6 +76,7 @@
       <arg name="text" type="string"/>
       <arg name="commit" type="string"/>
     </request>
+
     <request name="preedit_styling">
       <description summary="pre-edit styling">
         Sets styling information on composing text. The style is applied for
@@ -86,6 +90,7 @@
       <arg name="length" type="uint"/>
       <arg name="style" type="uint"/>
     </request>
+
     <request name="preedit_cursor">
       <description summary="pre-edit cursor">
         Sets the cursor position inside the composing text (as byte offset)
       </description>
       <arg name="index" type="int"/>
     </request>
+
     <request name="delete_surrounding_text">
       <description summary="delete text">
-
-
         This request will be handled on text_input side as part of a directly
         following commit_string request.
       </description>
       <arg name="index" type="int"/>
       <arg name="length" type="uint"/>
     </request>
+
     <request name="cursor_position">
       <description summary="set cursor to a new position">
         Sets the cursor and anchor to a new position. Index is the new cursor
       <arg name="index" type="int"/>
       <arg name="anchor" type="int"/>
     </request>
+
     <request name="modifiers_map">
       <arg name="map" type="array"/>
     </request>
+
     <request name="keysym">
       <description summary="keysym">
         Notify when a key event was sent. Key events should not be used for
       <arg name="state" type="uint"/>
       <arg name="modifiers" type="uint"/>
     </request>
+
     <request name="grab_keyboard">
       <description summary="grab hardware keyboard">
         Allows an input method to receive hardware keyboard input and process
         allows input methods which compose multiple key events for inputting
         text like it is done for CJK languages.
       </description>
-       <arg name="keyboard" type="new_id" interface="wl_keyboard"/>
+      <arg name="keyboard" type="new_id" interface="wl_keyboard"/>
     </request>
+
     <request name="key">
       <description summary="forward key event">
         Should be used when filtering key events with grab_keyboard.
       <arg name="key" type="uint" summary="key from wl_keyboard::key"/>
       <arg name="state" type="uint" summary="state from wl_keyboard::key"/>
     </request>
+
     <request name="modifiers">
       <description summary="forward modifiers event">
         Should be used when filtering key events with grab_keyboard.
       <arg name="mods_locked" type="uint" summary="mods_locked from wl_keyboard::modifiers"/>
       <arg name="group" type="uint" summary="group from wl_keyboard::modifiers"/>
     </request>
+
     <request name="language">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="language" type="string"/>
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="direction" type="uint"/>
     </request>
+
     <event name="surrounding_text">
       <description summary="surrounding text event">
         The plain surrounding text around the input position. Cursor is the
       <arg name="cursor" type="uint"/>
       <arg name="anchor" type="uint"/>
     </event>
+
     <event name="reset">
     </event>
+
     <event name="content_type">
       <arg name="hint" type="uint"/>
       <arg name="purpose" type="uint"/>
     </event>
+
     <event name="invoke_action">
       <arg name="button" type="uint"/>
       <arg name="index" type="uint"/>
     </event>
+
     <event name="commit_state">
       <arg name="serial" type="uint" summary="serial of text input state"/>
     </event>
+
     <event name="preferred_language">
       <arg name="language" type="string"/>
     </event>
       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.
     </description>
+
     <event name="activate">
       <description summary="activate event">
         A text input was activated. Creates an input method context object
       </description>
       <arg name="id" type="new_id" interface="wl_input_method_context"/>
     </event>
+
     <event name="deactivate">
       <description summary="deactivate event">
         The text input corresponding to the context argument was deactivated.
       </description>
     </request>
   </interface>
+
 </protocol>
index def7c27..6f0c2a5 100644 (file)
@@ -48,6 +48,7 @@
       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).
     </description>
+
     <request name="activate">
       <description summary="request activation">
         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="surface" type="object" interface="wl_surface"/>
     </request>
+
     <request name="deactivate">
       <description summary="request deactivation">
         Requests the text-input object to be deactivated (typically when the
       </description>
       <arg name="seat" type="object" interface="wl_seat"/>
     </request>
+
     <request name="show_input_panel">
       <description summary="show input panels">
         Requests input panels (virtual keyboard) to show.
       </description>
     </request>
+
     <request name="hide_input_panel">
       <description summary="hide input panels">
         Requests input panels (virtual keyboard) to hide.
       </description>
     </request>
+
     <request name="reset">
       <description summary="reset">
         Should be called by an editor widget when the input state should be
@@ -85,6 +90,7 @@
         input method flow.
       </description>
     </request>
+
     <request name="set_surrounding_text">
       <description summary="sets the surrounding text">
         Sets the plain surrounding text around the input position. Text is
       <arg name="cursor" type="uint"/>
       <arg name="anchor" type="uint"/>
     </request>
+
     <enum name="content_hint">
       <description summary="content hint">
         Content hint is a bitmask to allow to modify the behavior of the text
       <entry name="latin" value="0x100" summary="just latin characters should be entered"/>
       <entry name="multiline" value="0x200" summary="the text input is multiline"/>
     </enum>
+
     <enum name="content_purpose">
       <description summary="content purpose">
         The content purpose allows to specify the primary purpose of a text
       <entry name="datetime" value="11" summary="input a date and time"/>
       <entry name="terminal" value="12" summary="input for a terminal"/>
     </enum>
+
     <request name="set_content_type">
       <description summary="set content purpose and hint">
         Sets the content purpose and content hint. While the purpose is the
       <arg name="hint" type="uint"/>
       <arg name="purpose" type="uint"/>
     </request>
+
     <request name="set_cursor_rectangle">
       <arg name="x" type="int"/>
       <arg name="y" type="int"/>
       <arg name="width" type="int"/>
       <arg name="height" type="int"/>
     </request>
+
     <request name="set_preferred_language">
       <description summary="sets preferred language">
         Sets a specific language. This allows for example a virtual keyboard to
       </description>
       <arg name="language" type="string"/>
     </request>
+
     <request name="commit_state">
       <arg name="serial" type="uint" summary="used to identify the known state"/>
     </request>
+
     <request name="invoke_action">
       <arg name="button" type="uint"/>
       <arg name="index" type="uint"/>
     </request>
+
     <event name="enter">
       <description summary="enter event">
         Notify the text-input object when it received focus. Typically in
       </description>
       <arg name="surface" type="object" interface="wl_surface"/>
     </event>
+
     <event name="leave">
       <description summary="leave event">
         Notify the text-input object when it lost focus. Either in response
         destroyed.
       </description>
     </event>
+
     <event name="modifiers_map">
       <description summary="modifiers map">
         Transfer an array of 0-terminated modifiers names. The position in
       </description>
       <arg name="map" type="array"/>
     </event>
+
     <event name="input_panel_state">
       <description summary="state of the input panel">
         Notify when the visibility state of the input panel changed.
       </description>
       <arg name="state" type="uint"/>
     </event>
+
     <event name="preedit_string">
       <description summary="pre-edit">
         Notify when a new composing text (pre-edit) should be set around the
       <arg name="text" type="string"/>
       <arg name="commit" type="string"/>
     </event>
+
     <enum name="preedit_style">
       <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="selection" value="6"/>
       <entry name="incorrect" value="7"/>
     </enum>
+
     <event name="preedit_styling">
       <description summary="pre-edit styling">
         Sets styling information on composing text. The style is applied for
       <arg name="length" type="uint"/>
       <arg name="style" type="uint"/>
     </event>
+
     <event name="preedit_cursor">
       <description summary="pre-edit cursor">
         Sets the cursor position inside the composing text (as byte
       </description>
       <arg name="index" type="int"/>
     </event>
+
     <event name="commit_string">
       <description summary="commit">
         Notify when text should be inserted into the editor widget. The text to
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="text" type="string"/>
     </event>
+
     <event name="cursor_position">
       <description summary="set cursor to new position">
         Notify when the cursor or anchor position should be modified.
       <arg name="index" type="int"/>
       <arg name="anchor" type="int"/>
     </event>
+
     <event name="delete_surrounding_text">
       <description summary="delete surrounding text">
         Notify when the text around the current cursor position should be
       <arg name="index" type="int"/>
       <arg name="length" type="uint"/>
     </event>
+
     <event name="keysym">
       <description summary="keysym">
         Notify when a key event was sent. Key events should not be used
       <arg name="state" type="uint"/>
       <arg name="modifiers" type="uint"/>
     </event>
+
     <event name="language">
       <description summary="language">
         Sets the language of the input text. The "language" argument is a RFC-3066 
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="language" type="string"/>
     </event>
+
     <enum name="text_direction">
       <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="rtl" value="2" summary="right-to-left"/>
     </enum>
+
     <event name="text_direction">
       <description summary="text direction">
         Sets the text direction of input text.
     <description summary="text input manager">
       A factory for text-input objects. This object is a global singleton.
     </description>
+
     <request name="create_text_input">
       <description summary="create text input">
         Creates a new text-input object.
       <arg name="id" type="new_id" interface="wl_text_input"/>
     </request>
   </interface>
+
 </protocol>