[PATCH RFC] Add language and text-direction to text protocol
Weng Xuetian
wengxt at gmail.com
Thu Jan 31 14:39:23 PST 2013
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. And maybe also reduce IPC round trip between input
method and application.
Regards
Xuetian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130131/6d351cf2/attachment-0001.pgp>
More information about the wayland-devel
mailing list