diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2013-04-18 16:47:15 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-05-02 16:21:18 -0400 |
commit | ece6b5af51460c21f5bdd1fae4e7c2ea9f707e2f (patch) | |
tree | d388a5dc9db1f50c5dab8457b43d8988af8d3ba2 /protocol | |
parent | f91871980e095caa827f4f39e6c178fc0a2bd396 (diff) |
text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Diffstat (limited to 'protocol')
-rw-r--r-- | protocol/input-method.xml | 11 | ||||
-rw-r--r-- | protocol/text.xml | 36 |
2 files changed, 47 insertions, 0 deletions
diff --git a/protocol/input-method.xml b/protocol/input-method.xml index a59201b6..59ac2448 100644 --- a/protocol/input-method.xml +++ b/protocol/input-method.xml @@ -113,6 +113,14 @@ <arg name="mods_locked" type="uint"/> <arg name="group" type="uint"/> </request> + <request name="language"> + <arg name="serial" type="uint"/> + <arg name="language" type="string"/> + </request> + <request name="text_direction"> + <arg name="serial" type="uint"/> + <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 @@ -136,6 +144,9 @@ <arg name="index" type="uint"/> </event> <event name="commit"/> + <event name="preferred_language"> + <arg name="language" type="string"/> + </event> </interface> <interface name="input_method" version="1"> diff --git a/protocol/text.xml b/protocol/text.xml index 28d12eda..3334769e 100644 --- a/protocol/text.xml +++ b/protocol/text.xml @@ -150,6 +150,18 @@ Requests input panels (virtual keyboard) to hide. </description> </request> + <request name="set_preferred_language"> + <description summary="sets preferred language"> + Sets a specific language. This allows for example a virtual keyboard to + show a language specific layout. The "language" argument is a RFC-3066 + format language tag. + + It could be used for example in a word processor to indicate language of + currently edited document or in an instant message application which tracks + languages of contacts. + </description> + <arg name="language" type="string"/> + </request> <event name="commit_string"> <description summary="commit"> Notify when text should be inserted into the editor widget. The text @@ -272,6 +284,30 @@ </description> <arg name="state" type="uint"/> </event> + <event name="language"> + <description summary="language"> + Sets the language of the input text. The "language" argument is a RFC-3066 + format language tag. + </description> + <arg name="serial" type="uint"/> + <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. + + It is mainly needed for showing input cursor on correct side of the + editor when there is no input yet done and making sure neutral + direction text is laid out properly. + </description> + <arg name="serial" type="uint"/> + <arg name="direction" type="uint"/> + </event> </interface> <interface name="text_model_factory" version="1"> |