| Index: chromeos/dbus/ibus/ibus_input_context_client.h
|
| diff --git a/chromeos/dbus/ibus/ibus_input_context_client.h b/chromeos/dbus/ibus/ibus_input_context_client.h
|
| index a55064e6be26ddeee7c7487042f70b7f1f292953..ca3d13a1f62afade682067d0083552f9406c60ef 100644
|
| --- a/chromeos/dbus/ibus/ibus_input_context_client.h
|
| +++ b/chromeos/dbus/ibus/ibus_input_context_client.h
|
| @@ -43,7 +43,6 @@ class CHROMEOS_EXPORT IBusInputContextHandlerInterface {
|
|
|
| // Called when the engine request hiding preedit string.
|
| virtual void HidePreeditText() = 0;
|
| -
|
| };
|
|
|
| // A class to make the actual DBus calls for IBusInputContext service.
|
| @@ -54,6 +53,9 @@ class CHROMEOS_EXPORT IBusInputContextHandlerInterface {
|
| // one input context but it is enough for ChromeOS.
|
| class CHROMEOS_EXPORT IBusInputContextClient {
|
| public:
|
| + typedef base::Callback<void(const ibus::Rect& cursor_location,
|
| + const ibus::Rect& composition_head)>
|
| + SetCursorLocationHandler;
|
| typedef base::Callback<void(bool is_keyevent_used)> ProcessKeyEventCallback;
|
| typedef base::Callback<void()> ErrorCallback;
|
|
|
| @@ -68,6 +70,13 @@ class CHROMEOS_EXPORT IBusInputContextClient {
|
| virtual void SetInputContextHandler(
|
| IBusInputContextHandlerInterface* handler) = 0;
|
|
|
| + // Sets SetCursorLocation handler.
|
| + virtual void SetSetCursorLocationHandler(
|
| + const SetCursorLocationHandler& set_cursor_location_handler) = 0;
|
| +
|
| + // Unset SetCursorLocation handler.
|
| + virtual void UnsetSetCursorLocationHandler() = 0;
|
| +
|
| // Resets object proxy. If you want to use InputContext again, should call
|
| // Initialize function again.
|
| virtual void ResetObjectProxy() = 0;
|
| @@ -85,8 +94,8 @@ class CHROMEOS_EXPORT IBusInputContextClient {
|
| // Invokes Reset method call.
|
| virtual void Reset() = 0;
|
| // Invokes SetCursorLocation method call.
|
| - virtual void SetCursorLocation(int32 x, int32 y, int32 width,
|
| - int32 height) = 0;
|
| + virtual void SetCursorLocation(const ibus::Rect& cursor_location,
|
| + const ibus::Rect& composition_head) = 0;
|
| // Invokes ProcessKeyEvent method call. |callback| should not be null.
|
| virtual void ProcessKeyEvent(uint32 keyval,
|
| uint32 keycode,
|
| @@ -105,6 +114,12 @@ class CHROMEOS_EXPORT IBusInputContextClient {
|
| virtual void PropertyActivate(const std::string& key,
|
| ibus::IBusPropertyState state) = 0;
|
|
|
| + // Returns true if the current input method is XKB layout.
|
| + virtual bool IsXKBLayout() = 0;
|
| +
|
| + // Sets current input method is XKB layout or not.
|
| + virtual void SetIsXKBLayout(bool is_xkb_layout) = 0;
|
| +
|
| // Factory function, creates a new instance and returns ownership.
|
| // For normal usage, access the singleton via DBusThreadManager::Get().
|
| static CHROMEOS_EXPORT IBusInputContextClient* Create(
|
|
|