diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2010-03-16 16:33:26 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2010-03-16 16:33:26 +0900 |
commit | 8ee38642d8e0b861cf03d60374a3462de201d16a (patch) | |
tree | 8a56936add05c94969b753e0b50ceb55e7611d96 /ibus | |
parent | 701265d6db597388b7ad7dfa697aa55de29ebd08 (diff) | |
download | ibus-8ee38642d8e0b861cf03d60374a3462de201d16a.tar.gz |
Add ibus_engine_update_preedit_text_with_mode
Diffstat (limited to 'ibus')
-rw-r--r-- | ibus/common.py | 4 | ||||
-rw-r--r-- | ibus/engine.py | 5 | ||||
-rw-r--r-- | ibus/interface/iengine.py | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/ibus/common.py b/ibus/common.py index f16b654d..b2cdc3d3 100644 --- a/ibus/common.py +++ b/ibus/common.py @@ -124,6 +124,10 @@ IBUS_IFACE_ENGINE_FACTORY = "org.freedesktop.IBus.EngineFactory" IBUS_IFACE_INPUT_CONTEXT = "org.freedesktop.IBus.InputContext" IBUS_IFACE_NOTIFICATIONS = "org.freedesktop.IBus.Notifications" +# define pre-edit commit mode when the focus is lost +IBUS_ENGINE_PREEDIT_CLEAR = 0 +IBUS_ENGINE_PREEDIT_COMMIT = 1 + # define orientation ORIENTATION_HORIZONTAL = 0 ORIENTATION_VERTICAL = 1 diff --git a/ibus/engine.py b/ibus/engine.py index 54cffeae..b1df2fe5 100644 --- a/ibus/engine.py +++ b/ibus/engine.py @@ -24,6 +24,7 @@ __all__ = ( "EngineBase", ) +import common import object import serializable import interface @@ -85,9 +86,9 @@ class EngineBase(object.Object): def forward_key_event(self, keyval, state): return self.__proxy.ForwardKeyEvent(keyval, state) - def update_preedit_text(self, text, cursor_pos, visible): + def update_preedit_text(self, text, cursor_pos, visible, mode=common.IBUS_ENGINE_PREEDIT_CLEAR): text = serializable.serialize_object(text) - return self.__proxy.UpdatePreeditText(text, cursor_pos, visible) + return self.__proxy.UpdatePreeditText(text, cursor_pos, visible, mode) def show_preedit_text(self): return self.__proxy.ShowPreeditText() diff --git a/ibus/interface/iengine.py b/ibus/interface/iengine.py index ef75224f..4d42c2d5 100644 --- a/ibus/interface/iengine.py +++ b/ibus/interface/iengine.py @@ -104,8 +104,8 @@ class IEngine(dbus.service.Object): @signal(signature="uu") def ForwardKeyEvent(self, keyval, state): pass - @signal(signature="vub") - def UpdatePreeditText(self, text, cursor_pos, visible): pass + @signal(signature="vubu") + def UpdatePreeditText(self, text, cursor_pos, visible, mode): pass @signal() def ShowPreeditText(self): pass |