Notify engines of the content-type of input context
authorDaiki Ueno <ueno@unixuser.org>
Wed, 14 Aug 2013 11:29:45 +0000 (13:29 +0200)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 14 Aug 2013 11:29:45 +0000 (13:29 +0200)
commit3b3a7ceccbf75f36dee0df45589d79f7e96131f4
tree7e230ec8fde7008482dbd30f12497da11d31bc48
parent5136dbc59fd3048445826c534fd6b5f3f8ca6b1e
Notify engines of the content-type of input context

Add a new D-Bus method SetContentType to InputContext and Engine, to
notify engines of the content-type (primary purpose and hints) of
input context.  This is useful to implement intelligent features in
engines, such as automatic input-mode switch and text prediction.

The "purpose" and "hints" arguments are compatible with
GtkInputPurpose and GtkInputHints:
https://developer.gnome.org/gtk3/unstable/GtkEntry.html#GtkInputPurpose
https://developer.gnome.org/gtk3/unstable/GtkEntry.html#GtkInputHints

and the API is similar to the content_type event in the Wayland Input
Method Framework:
http://cgit.freedesktop.org/wayland/weston/tree/protocol/input-method.xml#n202

BUG=

Review URL: https://codereview.appspot.com/11422043
bus/engineproxy.c
bus/engineproxy.h
bus/inputcontext.c
client/gtk2/ibusimcontext.c
src/ibusengine.c
src/ibusengine.h
src/ibusinputcontext.c
src/ibusinputcontext.h
src/ibustypes.h