Add optimization_hint for ISEs 12/180812/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 4 Jun 2018 10:45:43 +0000 (19:45 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 4 Jun 2018 10:45:43 +0000 (19:45 +0900)
Change-Id: I246170372e1d54dc410c233e4297e6da8cf21461

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

index 8b4bd6345fe3417097125c9d2d41db0c9c10eeb1..c115b22ca4ec677e4037edef16a8e87a4045f28b 100644 (file)
@@ -670,6 +670,17 @@ static void slot_set_prediction_hint_data(const scim::HelperAgent *agent, int ic
     }
 }
 
+static void slot_set_optimization_hint(const scim::HelperAgent *agent, scim::uint32 &hint) {
+    CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+    if (impl) {
+        ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+        if (callback) {
+            SECURE_LOGD("hint : %d\n", hint);
+            callback->on_set_optimization_hint(hint);
+        }
+    }
+}
+
 /* Internal input handler function */
 Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler)
 {
@@ -764,6 +775,7 @@ sclboolean CSCLConnectionISF::init()
         m_helper_agent.signal_connect_set_prediction_hint(scim::slot(slot_set_prediction_hint));
         m_helper_agent.signal_connect_set_mime_type(scim::slot(slot_set_mime_type));
         m_helper_agent.signal_connect_set_prediction_hint_data(scim::slot(slot_set_prediction_hint_data));
+        m_helper_agent.signal_connect_set_optimization_hint(scim::slot(slot_set_optimization_hint));
 
         m_initialized = TRUE;
     }
index 118e841adee5f3dbcb8aba5602b1e411dbda4edc..c34e83e73896a6b5cfa8281f0bdc14ed5709a4bf 100644 (file)
@@ -92,6 +92,7 @@ struct ISCLCoreEventCallback {
     virtual void on_set_prediction_hint(const sclchar *prediction_hint) {}
     virtual void on_set_mime_type(const sclchar *mime_type) {}
     virtual void on_set_prediction_hint_data(const sclchar *key, const sclchar *value) {}
+    virtual void on_set_optimization_hint(sclu32 hint) {}
 
     ISCLCoreEventCallback() {
         /* Current callback interface version is 1.1 */
index 9511c3051c60f062e21669c9123703a928305ce5..57cc030634bd84543b2c3da5a2a635f7f910354f 100644 (file)
@@ -35,6 +35,12 @@ enum KEYBOARD_UI_STATE
     KEYBOARD_UI_STATE_WILL_SHOW,
 };
 
+enum KEYBOARD_OPTMIZATION_HINT
+{
+    KEYBOARD_OPTIMIZATION_HINT_NONE = 0,
+    KEYBOARD_OPTIMIZATION_HINT_SHOW_PREPARE,
+};
+
 /**
  * @brief The base class that provides features for a soft-keyboard
  *