Support prediction_hint_set interface 46/124446/4
authorInHong Han <inhong1.han@samsung.com>
Mon, 10 Apr 2017 01:43:09 +0000 (10:43 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 27 Apr 2017 09:35:55 +0000 (09:35 +0000)
Change-Id: I7bc505d15140358ff17c6a1aabf5d3681c58ed6a

src/sclconnection-isf.cpp
src/sclcorecallback.h

index 3b21fb7..f343346 100644 (file)
@@ -587,6 +587,16 @@ static void slot_process_input_device_event(const scim::HelperAgent *agent, scim
     }
 }
 
+static void slot_set_prediction_hint(const scim::HelperAgent *agent, const scim::String &prediction_hint) {
+    CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+    if (impl) {
+        ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+        if (callback) {
+            callback->on_set_prediction_hint(prediction_hint.c_str());
+        }
+    }
+}
+
 /* Internal input handler function */
 Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler)
 {
@@ -686,6 +696,7 @@ sclboolean CSCLConnectionISF::init()
         m_helper_agent.signal_connect_candidate_show(scim::slot(slot_candidate_show));
         m_helper_agent.signal_connect_candidate_hide(scim::slot(slot_candidate_hide));
         m_helper_agent.signal_connect_process_input_device_event(scim::slot(slot_process_input_device_event));
+        m_helper_agent.signal_connect_set_prediction_hint(scim::slot(slot_set_prediction_hint));
 
         m_initialized = TRUE;
     }
index 5087bb5..054049a 100644 (file)
@@ -89,6 +89,8 @@ struct ISCLCoreEventCallback {
     /* Added in callback interface version 1.1 */
     virtual void on_process_input_device_event(sclu32 &type, sclchar *data, size_t &len, sclu32 *ret) {}
 
+    virtual void on_set_prediction_hint(const sclchar *prediction_hint) {}
+
     ISCLCoreEventCallback() {
         /* Current callback interface version is 1.1 */
         m_version_major = 1;