summaryrefslogtreecommitdiffstats
path: root/lib/gtk2
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-09-20 09:37:56 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-09-20 09:37:56 +0800
commitbac2b876fe4d18448b0491babb0d5ed3bdf56102 (patch)
treed3c66e89f05d1d685dfd34214ff670d3da9ad69a /lib/gtk2
parent92a40e0b50c24a97d1da46c1de41e4409f7508cb (diff)
downloadibus-bac2b876fe4d18448b0491babb0d5ed3bdf56102.tar.gz
ibus-bac2b876fe4d18448b0491babb0d5ed3bdf56102.tar.xz
ibus-bac2b876fe4d18448b0491babb0d5ed3bdf56102.zip
Add new IBUS_CAP_FOCUS capability for input context.
Diffstat (limited to 'lib/gtk2')
-rw-r--r--lib/gtk2/ibusimclient.c4
-rw-r--r--lib/gtk2/ibusimclient.h11
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/gtk2/ibusimclient.c b/lib/gtk2/ibusimclient.c
index b05df0f..808db90 100644
--- a/lib/gtk2/ibusimclient.c
+++ b/lib/gtk2/ibusimclient.c
@@ -821,7 +821,7 @@ ibus_im_client_set_cursor_location (IBusIMClient *client, const gchar *ic, GdkRe
}
void
-ibus_im_client_set_use_preedit (IBusIMClient *client, const gchar *ic, gboolean use_preedit)
+ibus_im_client_set_capabilities (IBusIMClient *client, const gchar *ic, gint caps)
{
g_return_if_fail (IBUS_IS_IM_CLIENT (client));
g_return_if_fail (ic != NULL);
@@ -829,7 +829,7 @@ ibus_im_client_set_use_preedit (IBusIMClient *client, const gchar *ic, gboolean
_ibus_call_with_reply_and_block (client->priv->ibus,
"SetCapabilities",
DBUS_TYPE_STRING, &ic,
- DBUS_TYPE_INT32, &use_preedit,
+ DBUS_TYPE_INT32, &caps,
DBUS_TYPE_INVALID,
DBUS_TYPE_INVALID);
}
diff --git a/lib/gtk2/ibusimclient.h b/lib/gtk2/ibusimclient.h
index 9d1bce2..9a42332 100644
--- a/lib/gtk2/ibusimclient.h
+++ b/lib/gtk2/ibusimclient.h
@@ -56,6 +56,13 @@
#define IBUS_DBUS_PATH "/org/freedesktop/ibus/Manager"
G_BEGIN_DECLS
+enum IBusCap {
+ IBUS_CAP_PREEDIT = (1),
+ IBUS_CAP_AUX_STRING = (1 << 1),
+ IBUS_CAP_LOOKUP_TABLE = (1 << 2),
+ IBUS_CAP_FOCUS = (1 << 3),
+};
+
typedef struct _IBusIMClient IBusIMClient;
typedef struct _IBusIMClientClass IBusIMClientClass;
typedef struct _IBusIMClientPrivate IBusIMClientPrivate;
@@ -110,9 +117,9 @@ void ibus_im_client_set_cursor_location
(IBusIMClient *client,
const gchar *ic,
GdkRectangle *area);
-void ibus_im_client_set_use_preedit (IBusIMClient *client,
+void ibus_im_client_set_capabilities (IBusIMClient *client,
const gchar *ic,
- gboolean use_preedit);
+ gint caps);
gboolean ibus_im_client_is_enabled (IBusIMClient *client);
void ibus_im_client_release_input_context
(IBusIMClient *client,