Separate process_key_event_with_keycode from process_key_event 23/201623/1
authorInhong Han <inhong1.han@samsung.com>
Mon, 18 Mar 2019 08:09:02 +0000 (17:09 +0900)
committerInhong Han <inhong1.han@samsung.com>
Mon, 18 Mar 2019 08:09:02 +0000 (17:09 +0900)
Change-Id: Id58320be9e83ae01afb748f61481f42ce7cd57e3

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

index dedfb03..b8f4f4f 100644 (file)
@@ -593,12 +593,12 @@ static void slot_check_ise_option_window(const scim::HelperAgent *agent, sclu32
     }
 }
 
-static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret, scim::uint32 keycode) {
+static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret) {
     CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
     if (impl) {
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
-            callback->on_process_key_event(key, &ret, keycode);
+            callback->on_process_key_event(key, &ret);
 #ifdef WEBSOCKETweb_ret
             g_websocket.on_process_key_event(key.code, key.mask, key.layout, &ret);
 #endif
@@ -606,6 +606,16 @@ static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEven
     }
 }
 
+static void slot_process_key_event_with_keycode(const scim::HelperAgent *agent, scim::KeyEvent &key, scim::uint32 &ret, scim::uint32 keycode) {
+    CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
+    if (impl) {
+        ISCLCoreEventCallback *callback = impl->get_core_event_callback();
+        if (callback) {
+            callback->on_process_key_event_with_keycode(key, &ret, keycode);
+        }
+    }
+}
+
 static void slot_candidate_show(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) {
     CSCLCoreImpl *impl = CSCLCoreImpl::get_instance();
     if (impl) {
@@ -769,6 +779,7 @@ sclboolean CSCLConnectionISF::init()
         m_helper_agent.signal_connect_resume_option_window(scim::slot(slot_resume_ise_option_window));
         m_helper_agent.signal_connect_check_option_window(scim::slot(slot_check_ise_option_window));
         m_helper_agent.signal_connect_process_key_event(scim::slot(slot_process_key_event));
+        m_helper_agent.signal_connect_process_key_event_with_keycode(scim::slot(slot_process_key_event_with_keycode));
         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));
@@ -1244,7 +1255,8 @@ void CSCLConnectionISF::send_private_command(const sclchar *command)
             callback->on_associate_table_page_up(0, NULL);
             callback->on_associate_table_page_down(0, NULL);
             callback->on_update_associate_table_page_size(0, NULL, 0);
-            callback->on_process_key_event(key, NULL, 0);
+            callback->on_process_key_event(key, NULL);
+            callback->on_process_key_event_with_keycode(key, NULL, 0);
 
             callback->on_set_display_language(NULL);
             callback->on_set_rotation_degree(0);
index f4f0516..aa6a204 100644 (file)
@@ -73,7 +73,8 @@ struct ISCLCoreEventCallback {
     virtual void on_associate_table_page_up(sclint ic, const sclchar *uuid) {}
     virtual void on_associate_table_page_down(sclint ic, const sclchar *uuid) {}
     virtual void on_update_associate_table_page_size(sclint ic, const sclchar *uuid, sclint page_size) {}
-    virtual void on_process_key_event(scim::KeyEvent &key, sclu32 *ret, sclu32 keycode) {}
+    virtual void on_process_key_event(scim::KeyEvent &key, sclu32 *ret) {}
+    virtual void on_process_key_event_with_keycode(scim::KeyEvent &key, sclu32 *ret, sclu32 keycode) {}
 
     virtual void on_set_display_language(const sclchar *language) {}
     virtual void on_set_rotation_degree(sclint degree) {}