From 50963d76e7abbba19aa2eaa95b5d41b188a77661 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 29 Dec 2020 20:39:39 +0900 Subject: [PATCH] Add interface to notify the update of input hint Change-Id: I5a25ff39181fef2a487f58fbc8a879aef833606d Signed-off-by: Jihoon Kim --- src/sclconnection-isf.cpp | 11 +++++++++++ src/sclcorecallback.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 295f08e..667a1e3 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -765,6 +765,16 @@ static void slot_set_prediction_allow(const scim::HelperAgent *agent, scim::uint } } +static void slot_set_input_hint(const scim::HelperAgent *agent, scim::uint32 &input_hint) { + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + ISCLCoreEventCallback *callback = impl->get_core_event_callback(); + if (callback) { + callback->on_set_input_hint(input_hint); + } + } +} + /* Internal input handler function */ Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler) { @@ -867,6 +877,7 @@ sclboolean CSCLConnectionISF::init() m_helper_agent.signal_connect_process_key_event_with_imengine(scim::slot(slot_process_key_event_with_imengine)); m_helper_agent.signal_connect_set_autocapital_type(scim::slot(slot_set_autocapital_type)); m_helper_agent.signal_connect_set_prediction_allow(scim::slot(slot_set_prediction_allow)); + m_helper_agent.signal_connect_set_input_hint(scim::slot(slot_set_input_hint)); m_initialized = TRUE; } diff --git a/src/sclcorecallback.h b/src/sclcorecallback.h index 1b76360..08dbe9f 100644 --- a/src/sclcorecallback.h +++ b/src/sclcorecallback.h @@ -100,6 +100,7 @@ struct ISCLCoreEventCallback { virtual void on_set_optimization_hint(sclu32 hint) {} virtual void on_set_autocapital_type(sclu32 type) {} virtual void on_set_prediction_allow(sclu32 prediction_allow) {} + virtual void on_set_input_hint(sclu32 input_hint) {} virtual void on_trigger_property(const sclchar *property) {} ISCLCoreEventCallback() { -- 2.34.1