Add interface to notify the update of input hint 63/250563/3
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 29 Dec 2020 11:39:39 +0000 (20:39 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 31 Dec 2020 02:27:13 +0000 (11:27 +0900)
Change-Id: I5a25ff39181fef2a487f58fbc8a879aef833606d
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/sclconnection-isf.cpp
src/sclcorecallback.h

index 295f08e..667a1e3 100644 (file)
@@ -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;
     }
index 1b76360..08dbe9f 100644 (file)
@@ -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() {