Update input-method as latest opensource 78/266078/7
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 5 Nov 2021 10:42:44 +0000 (19:42 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 5 Jan 2022 01:38:04 +0000 (10:38 +0900)
Change-Id: Iebf9a941b302acdd9e7815847034ad0a3121076c
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
protocol/tizen/input-method.xml

index 50ab60c..2e0507b 100644 (file)
@@ -1,35 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<protocol name="input_method">
+<protocol name="input_method_unstable_v1">
+
   <copyright>
     Copyright © 2012, 2013 Intel Corporation
 
-    Permission to use, copy, modify, distribute, and sell this
-    software and its documentation for any purpose is hereby granted
-    without fee, provided that the above copyright notice appear in
-    all copies and that both that copyright notice and this permission
-    notice appear in supporting documentation, and that the name of
-    the copyright holders not be used in advertising or publicity
-    pertaining to distribution of the software without specific,
-    written prior permission.  The copyright holders make no
-    representations about the suitability of this software for any
-    purpose.  It is provided "as is" without express or implied
-    warranty.
-
-    THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
-    SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
-    FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
-    SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
-    AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-    ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
-    THIS SOFTWARE.
+    Permission is hereby granted, free of charge, to any person obtaining a
+    copy of this software and associated documentation files (the "Software"),
+    to deal in the Software without restriction, including without limitation
+    the rights to use, copy, modify, merge, publish, distribute, sublicense,
+    and/or sell copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice (including the next
+    paragraph) shall be included in all copies or substantial portions of the
+    Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+    DEALINGS IN THE SOFTWARE.
   </copyright>
 
-  <interface name="wl_input_method_context" version="1">
+  <interface name="zwp_input_method_context_v1" version="1">
     <description summary="input method context">
-      Corresponds to a text input on input method side. An input method context
-      is created on text input activation on the input method side. It allows to
-      receive information about the text input from the application via events.
+      Corresponds to a text input on the input method side. An input method context
+      is created on text input activation on the input method side. It allows
+      receiving information about the text input from the application via events.
       Input method contexts do not keep state after deactivation and should be
       destroyed after deactivation is handled.
 
       the known text input state in events like preedit_string, commit_string,
       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).
+
+      Warning! The protocol described in this file is experimental and
+      backward incompatible changes may be made. Backward compatible changes
+      may be added together with the corresponding interface version bump.
+      Backward incompatible changes are done by bumping the version number in
+      the protocol and interface names and resetting the interface version.
+      Once the protocol is to be declared stable, the 'z' prefix and the
+      version number in the protocol and interface names are removed and the
+      interface version number is 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.
+       Send the commit string text for insertion to the application.
 
-        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 be also an
-        empty text when some text should be removed (see
-        delete_surrounding_text) or when the input cursor should be moved (see
-        cursor_position).
+       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 be also 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 will be removed.
+       Any previously set composing text will be removed.
       </description>
       <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.
+       Send the pre-edit string text to the application text input.
 
-        The commit text can be used to replace the preedit text on reset (for
-        example on unfocus).
+       The commit text can be used to replace the pre-edit text on reset (for
+       example on unfocus).
 
-        Also previously sent preedit_style and preedit_cursor requests are
-        processed bt the text_input also.
+       Previously sent preedit_style and preedit_cursor requests are also
+       processed by the text_input.
       </description>
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="text" type="string"/>
       <arg name="commit" type="string"/>
     </request>
+
     <request name="preedit_styling">
       <description summary="pre-edit styling">
-        Set styling information on composing text. The style is applied for
-        length in bytes from index relative to the beginning of the composing
-        text (as byte offset). Multiple styles can be applied to a composing
-        text.
+       Set the styling information on composing text. The style is applied for
+       length in bytes from index relative to the beginning of
+       the composing text (as byte offset). Multiple styles can
+       be applied to a composing text.
 
-        This request should be sent before sending preedit_string request.
+       This request should be sent before sending a preedit_string request.
       </description>
       <arg name="index" type="uint"/>
       <arg name="length" type="uint"/>
       <arg name="style" type="uint"/>
     </request>
+
     <request name="preedit_cursor">
       <description summary="pre-edit cursor">
-        Set the cursor position inside the composing text (as byte offset)
-        relative to the start of the composing text.
+       Set the cursor position inside the composing text (as byte offset)
+       relative to the start of the composing text.
 
-        When index is negative no cursor should be displayed.
+       When index is negative no cursor should be displayed.
 
-        This request should be sent before sending preedit_string request.
+       This request should be sent before sending a preedit_string request.
       </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.
+       Remove the surrounding text.
+
+       This request will be handled on the text_input side directly following
+       a 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">
-        Set the cursor and anchor to a new position. Index is the new cursor
-        position in bytes (when >= 0 relative to the end of inserted text
-        else relative to beginning of inserted text). Anchor is the new anchor
-        position in bytes (when >= 0 relative to the end of inserted text, else
-        relative to beginning of inserted text). When there should be no
-        selected text anchor should be the same as index.
-
-        This request will be handled on text_input side as part of a directly
-        following commit_string request.
+       Set the cursor and anchor to a new position. Index is the new cursor
+       position in bytes (when >= 0 this is relative to the end of the inserted text,
+       otherwise it is relative to the beginning of the inserted text). Anchor is
+       the new anchor position in bytes (when >= 0 this is relative to the end of the
+       inserted text, otherwise it is relative to the beginning of the inserted
+       text). When there should be no selected text, anchor should be the same
+       as index.
+
+       This request will be handled on the text_input side directly following
+       a commit_string request.
       </description>
       <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
-        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 is a wl_keyboard key_state.
+       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 is a wl_keyboard key_state.
       </description>
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="time" type="uint"/>
       <arg name="state" type="uint"/>
       <arg name="modifiers" type="uint"/>
     </request>
+
     <request name="grab_keyboard">
       <description summary="grab hardware keyboard">
-        Allow an input method to receive hardware keyboard input and process
-        key events to generate text events (with pre-edit) over the wire. This
-        allows input methods which compose multiple key events for inputting
-        text like it is done for CJK languages.
+       Allow an input method to receive hardware keyboard input and process
+       key events to generate text events (with pre-edit) over the wire. This
+       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.
+       Forward a wl_keyboard::key event to the client that was not processed
+       by the input method itself. Should be used when filtering key events
+       with grab_keyboard.  The arguments should be the ones from the
+       wl_keyboard::key event.
 
-        When the wl_keyboard::key event is not processed by the input
-        method itself and should be sent to the client instead, forward it
-        with this request. The arguments should be the ones from the
-        wl_keyboard::key event.
-
-        For generating custom key events use the keysym request instead.
+       For generating custom key events use the keysym request instead.
       </description>
       <arg name="serial" type="uint" summary="serial from wl_keyboard::key"/>
       <arg name="time" type="uint" summary="time 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"/>
     </request>
+
     <request name="modifiers">
       <description summary="forward modifiers event">
-        Should be used when filtering key events with grab_keyboard.
-
-        When the wl_keyboard::modifiers event should be also send to the
-        client, forward it with this request. The arguments should be the ones
-        from the wl_keyboard::modifiers event.
+       Forward a wl_keyboard::modifiers event to the client that was not
+       processed by the input method itself.  Should be used when filtering
+       key events with grab_keyboard. The arguments should be the ones
+       from the wl_keyboard::modifiers event.
       </description>
       <arg name="serial" type="uint" summary="serial from wl_keyboard::modifiers"/>
       <arg name="mods_depressed" type="uint" summary="mods_depressed 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"/>
     </request>
+
     <request name="language">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="language" type="string"/>
     </request>
+
     <request name="text_direction">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="direction" type="uint"/>
     </request>
+
     <request name="selection_region">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="start" type="int"/>
       <arg name="end" type="int"/>
     </request>
+
     <request name="private_command">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="command" type="string"/>
     </request>
+
     <request name="update_input_panel_data">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="input_panel_data" type="string"/>
       <arg name="input_panel_data_length" type="uint"/>
     </request>
+
     <request name="hide_input_panel">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
     </request>
+
     <request name="get_selection_text">
       <arg name="fd" type="fd"/>
     </request>
+
     <request name="get_surrounding_text">
       <arg name="maxlen_before" type="uint"/>
       <arg name="maxlen_after" type="uint"/>
       <arg name="fd" type="fd"/>
     </request>
+
     <request name="filter_key_event_done">
       <arg name="serial" type="uint"/>
       <arg name="state" type="uint"/>
     </request>
+
     <request name="update_ise_geometry">
       <arg name="serial" type="uint"/>
       <arg name="x" type="uint"/>
       <arg name="width" type="uint"/>
       <arg name="height" type="uint"/>
     </request>
+
     <request name="recapture_string">
       <description summary="recapture string">
         Send the recapture string text to the application text input.
       <arg name="preedit_commit" type="string"/>
       <arg name="commit" type="string"/>
     </request>
+
     <request name="input_panel_event">
       <description summary="input panel event">
         Send the input panel event.
       <arg name="event_type" type="uint"/>
       <arg name="value" type="uint"/>
     </request>
+
     <request name="commit_content">
       <arg name="serial" type="uint" summary="serial of the latest known text input state"/>
       <arg name="content" type="string"/>
       <arg name="description" type="string"/>
       <arg name="mime_types" type="string"/>
     </request>
+
     <request name="update_candidate_state">
       <arg name="state" type="uint"/>
     </request>
+
     <request name="reshow_input_panel">
       <description summary="reshow_input_panel">
         This is a request to send show event after IME is restarted.
       </description>
     </request>
+
     <request name="set_floating_panel">
       <description summary="set the panel type as a floating panel">
         A Keyboard surface is shown as a floating panel type.
       </description>
       <arg name="state" type="uint"/>
     </request>
+
     <request name="set_floating_drag_enabled">
       <description summary="set floating drag enabled">
         Set the permission to move floating panel.
       </description>
       <arg name="enabled" type="uint"/>
     </request>
+
+    <event name="surrounding_text">
+      <description summary="surrounding text event">
+       The plain surrounding text around the input position. Cursor is the
+       position in bytes within the surrounding text relative to the beginning
+       of the text. Anchor is the position in bytes of the selection anchor
+       within the surrounding text relative to the beginning of the text. If
+       there is no selected text then anchor is the same as cursor.
+      </description>
+      <arg name="text" type="string"/>
+      <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>
+
     <event name="return_key_type">
       <arg name="return_key_type" type="uint"/>
     </event>
+
     <event name="return_key_disabled">
       <arg name="return_key_disabled" type="uint"/>
     </event>
+
     <event name="input_panel_data">
       <arg name="input_panel_data" type="string"/>
       <arg name="input_panel_data_length" type="uint"/>
     </event>
+
     <event name="bidi_direction">
       <arg name="direction" type="uint"/>
     </event>
+
     <event name="cursor_position">
       <arg name="cursor_position" type="uint"/>
     </event>
+
     <event name="process_input_device_event">
       <description summary="request to process unconventional input device event">
         Deliver unconventional input device events that need to be processed by input panel
       <arg name="event_data" type="string"/>
       <arg name="event_length" type="uint"/>
     </event>
+
     <event name="filter_key_event">
       <description summary="input panel data">
         Request to filter key event via input method
       <arg name="dev_subclass" type="uint"/>
       <arg name="keycode" type="uint"/>
     </event>
+
     <event name="capital_mode">
       <arg name="mode" type="uint"/>
     </event>
+
     <event name="prediction_hint">
       <arg name="text" type="string"/>
     </event>
+
     <event name="mime_type">
       <arg name="type" type="string"/>
     </event>
+
     <event name="finalized_content">
       <arg name="text" type="string"/>
       <arg name="cursor_position" type="uint"/>
     </event>
+
     <event name="prediction_hint_data">
       <arg name="key" type="string"/>
       <arg name="value" type="string"/>
     </event>
+
     <event name="input_panel_enabled">
       <arg name="enabled" type="uint"/>
     </event>
   </interface>
 
-  <interface name="wl_input_method" version="1">
+  <interface name="zwp_input_method_v1" version="1">
     <description summary="input method">
       An input method object is responsible for composing text in response to
       input from hardware or virtual keyboards. There is one input method
       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
-        which allows communication with the text input.
+       A text input was activated. Creates an input method context object
+       which allows communication with the text input.
       </description>
-      <arg name="id" type="new_id" interface="wl_input_method_context"/>
+      <arg name="id" type="new_id" interface="zwp_input_method_context_v1"/>
       <arg name="text_input_id" type="uint"/>
       <arg name="focus_in_event" type="uint"/>
     </event>
+
     <event name="deactivate">
       <description summary="deactivate event">
-        The text input corresponding to the context argument was deactivated.
+       The text input corresponding to the context argument was deactivated.
+       The input method context should be destroyed after deactivation is
+       handled.
       </description>
-      <arg name="context" type="object" interface="wl_input_method_context"/>
+      <arg name="context" type="object" interface="zwp_input_method_context_v1"/>
       <arg name="focus_out_event" type="uint"/>
     </event>
+
     <event name="destroy" type="destructor">
       <description summary="destroy event">
         The text input corresponding to the context argument was destroyed.
         The input method context should be destroyed after deactivation is
         handled.
       </description>
-      <arg name="context" type="object" interface="wl_input_method_context"/>
+      <arg name="context" type="object" interface="zwp_input_method_context_v1"/>
     </event>
+
     <event name="show_input_panel">
       <description summary="show input panel event">
         Input panel (virtual keyboard) was requested to show.
       </description>
-      <arg name="context" type="object" interface="wl_input_method_context"/>
+      <arg name="context" type="object" interface="zwp_input_method_context_v1"/>
       <arg name="degree" type="uint"/>
     </event>
+
     <event name="hide_input_panel">
       <description summary="hide input panel event">
         Input panel (virtual keyboard) was requested to hide.
       </description>
-      <arg name="context" type="object" interface="wl_input_method_context"/>
+      <arg name="context" type="object" interface="zwp_input_method_context_v1"/>
     </event>
   </interface>
 
-  <interface name="wl_input_panel" version="1">
+  <interface name="zwp_input_panel_v1" version="1">
     <description summary="interface for implementing keyboards">
       Only one client can bind this interface at a time.
     </description>
 
     <request name="get_input_panel_surface">
-      <arg name="id" type="new_id" interface="wl_input_panel_surface"/>
+      <arg name="id" type="new_id" interface="zwp_input_panel_surface_v1"/>
       <arg name="surface" type="object" interface="wl_surface"/>
     </request>
   </interface>
 
-  <interface name="wl_input_panel_surface" version="1">
+  <interface name="zwp_input_panel_surface_v1" version="1">
     <enum name="position">
       <entry name="center_bottom" value="0"/>
     </enum>
 
     <request name="set_toplevel">
       <description summary="set the surface type as a keyboard">
-        A keyboard surface is only shown, when a text input is active.
+       Set the input_panel_surface type to keyboard.
+
+       A keyboard surface is only shown when a text input is active.
       </description>
       <arg name="output" type="object" interface="wl_output"/>
       <arg name="position" type="uint"/>
 
     <request name="set_overlay_panel">
       <description summary="set the surface type as an overlay panel">
-        An overlay panel is shown near the input cursor above the application
-        window when a text input is active.
+       Set the input_panel_surface to be an overlay panel.
+
+       This is shown near the input cursor above the application window when
+       a text input is active.
       </description>
     </request>
 
     </request>
   </interface>
 
-  <interface name="wl_input_method_manager" version="1">
+  <interface name="zwp_input_method_manager_v1" version="1">
     <request name="set_transient_for">
       <description summary="set transient for">
         Set transient for between caller window and IME option window.