From c0a9ff62281dfda5c73a1a12692dcecb1cb5fc41 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 1 Nov 2016 16:34:40 +0900 Subject: [PATCH] Added API for flushing keyboard ise Change-Id: I25f49f4e7429aea5f36419e2869cac10551a4a3b --- src/sclconnection-isf.cpp | 7 +++++++ src/sclconnection-isf.h | 1 + src/sclconnection.cpp | 7 +++++++ src/sclconnection.h | 1 + src/sclcore.cpp | 9 ++++++++- src/sclcore.h | 5 +++++ src/sclcoreimpl.cpp | 7 ++++++- src/sclcoreimpl.h | 1 + 8 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index b0c0357..1e0daea 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -824,6 +824,13 @@ void CSCLConnectionISF::reset_keyboard_ise() } } +void CSCLConnectionISF::flush_keyboard_ise() +{ + if (m_initialized) { + m_helper_agent.flush_keyboard_ise(); + } +} + void CSCLConnectionISF::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { if (m_initialized) { diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 4768c1a..b0621ab 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -57,6 +57,7 @@ public: void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); void reset_keyboard_ise(); + void flush_keyboard_ise(); void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str); diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index 71398f7..7694114 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -147,6 +147,13 @@ void CSCLConnection::reset_keyboard_ise() } } +void CSCLConnection::flush_keyboard_ise() +{ + if (m_impl) { + m_impl->flush_keyboard_ise(); + } +} + void CSCLConnection::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { if (m_impl) { diff --git a/src/sclconnection.h b/src/sclconnection.h index 78bacfe..302583b 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -57,6 +57,7 @@ public: virtual void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); virtual void reset_keyboard_ise(); + virtual void flush_keyboard_ise(); virtual void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); virtual void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); virtual void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str); diff --git a/src/sclcore.cpp b/src/sclcore.cpp index b36a1c1..c543dcd 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -116,6 +116,13 @@ void CSCLCore::reset_keyboard_ise() } } +void CSCLCore::flush_keyboard_ise() +{ + if (m_impl) { + m_impl->flush_keyboard_ise(); + } +} + void CSCLCore::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { if (m_impl) { @@ -351,4 +358,4 @@ void CSCLCore::request_ise_hide() const if (m_impl) { m_impl->request_ise_hide(); } -} \ No newline at end of file +} diff --git a/src/sclcore.h b/src/sclcore.h index 9971048..a3fbdd6 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -99,6 +99,11 @@ public: void reset_keyboard_ise(); /** + * @brief Send a flush keyboard Event to IMEngine + */ + void flush_keyboard_ise(); + + /** * @brief Send a KeyEvent to ISF * * @param[in] ic The handle of the IMEngineInstance to receive the event. diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 2e113cc..468078e 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -142,6 +142,11 @@ void CSCLCoreImpl::reset_keyboard_ise() m_connection.reset_keyboard_ise(); } +void CSCLCoreImpl::flush_keyboard_ise() +{ + m_connection.flush_keyboard_ise(); +} + void CSCLCoreImpl::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { m_connection.send_key_event(ic, ic_uuid, keycode, keymask); @@ -367,4 +372,4 @@ void CSCLCoreImpl::get_selection_text(sclchar **text) void CSCLCoreImpl::request_ise_hide() { m_connection.request_ise_hide(); -} \ No newline at end of file +} diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 1151b54..6145699 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -62,6 +62,7 @@ public: void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); void reset_keyboard_ise(); + void flush_keyboard_ise(); void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str); -- 2.7.4