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

Yichao Yu yyc1992 at gmail.com
Thu Jan 31 14:50:26 PST 2013


On Thu, Jan 31, 2013 at 5:39 PM, Weng Xuetian <wengxt at gmail.com> 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.
>>
>> Comments welcome.
>>
>> Jan Arne Petersen (1):
>>   text: Add language and text-direction to protocol
>>
>>  clients/editor.c           | 20 ++++++++++++++++-
>>  clients/keyboard.c         | 54
>> ++++++++++++++++++++++++++-------------------- clients/weston-simple-im.c |
>> 54 ++++++++++++++++++++++++++-------------------- protocol/input-method.xml
>>  | 11 ++++++++++
>>  protocol/text.xml          | 28 ++++++++++++++++++++++++
>>  src/text-backend.c         | 46 +++++++++++++++++++++++++++++++++++++--
>>  6 files changed, 164 insertions(+), 49 deletions(-)
> 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?
>
> 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.

(Taking into account adding new request/event to the protocol will be
a abi breaking of the library.)

> And maybe also reduce IPC round trip between input
> method and application.

It would be nice to have a ::info(key, value) request and event on the
both side (input_method_context and text_model). Along with some
general info directly sent by the compositor.

>
> Regards
> Xuetian
> _______________________________________________
> 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