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

Yichao Yu yyc1992 at gmail.com
Fri Feb 1 04:46:03 PST 2013

On Fri, Feb 1, 2013 at 3:18 AM, Jan Arne Petersen
<jpetersen at openismus.com> wrote:
> On 31.01.2013 23:39, Weng Xuetian wrote:
>> On Thursday 31 January 2013 17:44:02,Jan Arne Petersen :
>>> From: Jan Arne Petersen <jpetersen at openismus.com>
>>> The proposed API allows to send the language and text-direction for
>>> inserted text from an input-method to an application.
>>> It also allows an application to specify a preferred language for
>>> the input. This could be used by an application to set a language
>>> by context or to request the last used language after an input
>>> entry regains focus.
>> It's good to have such api, but why text-direction is useful?
>> I mean, the text-direction is really hard to get the correct one if you are
>> typing in a multi line text box.
>> Say, one line English, and one line Arabic, or mix Arabic and English in the
>> same line, are both possible cases that could happen, which make this property
>> hardly be useful since the knowledge is so limited.
>> Or, it's just a preferred way, to indicate input method, like, RTL is the only
>> choice here?
> No it is used by the input-method to indicate to the application what
> kind of input it should expect. When you have an empty input field and
> you switch a virtual keyboard from English to Arabian the cursor should
> move from left side to right side.
>> And, IMHO, those hint should be set in a key-value map, instead of everytime
>> we add some new API, hence the API would be much more flexible and easier to
>> be backward compatible. And maybe also reduce IPC round trip between input
>> method and application.
> No a key-value map is not really helpful, we would need to add a key
> specification so that not every toolkit and every input method uses
> different keys, different types of values etc.

It will be useful as long as you define some keys you need, language
and text-direction in this case, just like wl_display::global event,
although the event may not necessarily sent out directly by the

> --
> Jan Arne Petersen
> Openismus GmbH
> http://www.openismus.com
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

More information about the wayland-devel mailing list