From faf584b560608150b7fc23b92b9e1a64e6ee728d Mon Sep 17 00:00:00 2001 From: zhouyongfei Date: Mon, 10 Jan 2022 17:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=85=A5=E6=8E=A7=E5=88=B6=E5=85=89?= =?UTF-8?q?=E6=A0=87=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhouyongfei --- .../include/input_method_controller.h | 1 + .../inputmethod_controller/include/input_method_utils.h | 9 +++++++++ unitest/src/input_method_controller_test.cpp | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/frameworks/inputmethod_controller/include/input_method_controller.h b/frameworks/inputmethod_controller/include/input_method_controller.h index 6c5c1988..142676d4 100644 --- a/frameworks/inputmethod_controller/include/input_method_controller.h +++ b/frameworks/inputmethod_controller/include/input_method_controller.h @@ -40,6 +40,7 @@ namespace MiscServices { virtual void SendKeyEventFromInputMethod(const KeyEvent& event) = 0; virtual void SendKeyboardInfo(const KeyboardInfo& info) = 0; virtual void SetKeyboardStatus(bool status) = 0; + virtual void MoveCursor(const Direction direction) = 0; }; class ImsaDeathRecipient : public IRemoteObject::DeathRecipient { diff --git a/frameworks/inputmethod_controller/include/input_method_utils.h b/frameworks/inputmethod_controller/include/input_method_utils.h index 99ea82fd..4207759b 100644 --- a/frameworks/inputmethod_controller/include/input_method_utils.h +++ b/frameworks/inputmethod_controller/include/input_method_utils.h @@ -41,6 +41,15 @@ namespace MiscServices { URL, VISIBLE_PASSWORD, }; + + enum class Direction { + NONE = 0, + UP = 1, + DOWN, + LEFT, + RIGHT, + }; + class Configuration { public: EnterKeyType GetEnterKeyType() const diff --git a/unitest/src/input_method_controller_test.cpp b/unitest/src/input_method_controller_test.cpp index b0330889..702f36c7 100644 --- a/unitest/src/input_method_controller_test.cpp +++ b/unitest/src/input_method_controller_test.cpp @@ -64,6 +64,10 @@ namespace MiscServices { { IMSA_HILOGI("IMC TEST TextListener SendKeyboardInfo"); } + void MoveCursor(const Direction direction) + { + IMSA_HILOGI("IMC TEST TextListener Direction"); + } }; class InputMethodControllerTest : public testing::Test { public: