[PATCH RFC] text: Add language and text-direction to protocol

Pekka Vuorela pvuorela at iki.fi
Sat Feb 2 03:06:04 PST 2013


I think this generally looks good. Few notes below.


On 31.01.2013 18:44, Jan Arne Petersen wrote:

> diff --git a/protocol/text.xml b/protocol/text.xml
> index 28d12ed..640f4eb 100644
> --- a/protocol/text.xml
> +++ b/protocol/text.xml
> @@ -150,6 +150,14 @@
>           Requests input panels (virtual keyboard) to hide.
>         </description>
>       </request>
> +    <request name="set_language">
> +      <description summary="sets 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.
> +      </description>
> +      <arg name="language" type="string"/>
> +    </request>

Some specific use case in mind for requesting input language from editor 
side?

>       <event name="commit_string">
>         <description summary="commit">
>           Notify when text should be inserted into the editor widget. The text
> @@ -272,6 +280,26 @@
>         </description>
>         <arg name="state" type="uint"/>
>       </event>
> +    <event name="language">
> +      <description summary="language">
> +        Sets the language of the commited 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 commited text.
> +      </description>
> +      <arg name="serial" type="uint"/>
> +      <arg name="direction" type="uint"/>
> +    </event>
>     </interface>

These seem to be easily misunderstood. Could adjust the comments a bit.

Maybe "commited text" -> "text input", this should apply as well for 
preedit and especially on situations when nothing is yet committed.

Could also mention that it's 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.




More information about the wayland-devel mailing list