Add missing function calls for triggering WebIME event handlers 48/139348/1
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Jul 2017 10:58:58 +0000 (19:58 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 18 Jul 2017 11:42:32 +0000 (20:42 +0900)
Change-Id: I78b51ee407a7ba483272dc1ffb399d6c86ff4f6c

src/sclconnection-isf.cpp

index 525a4b3..2247668 100644 (file)
@@ -103,6 +103,9 @@ static void slot_update_cursor_position(const scim::HelperAgent *agent, int ic,
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_update_cursor_position(ic, ic_uuid.c_str(), cursor_pos);
+#ifdef WEBSOCKET
+            g_websocket.on_update_cursor_position(ic, cursor_pos);
+#endif
         }
     }
 }
@@ -113,6 +116,9 @@ static void slot_update_surrounding_text(const scim::HelperAgent *agent, int ic,
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_update_surrounding_text(ic, text.c_str(), cursor);
+#ifdef WEBSOCKET
+            g_websocket.on_update_surrounding_text(ic, text.c_str(), cursor);
+#endif
         }
     }
 }
@@ -133,6 +139,9 @@ static void slot_focus_out(const scim::HelperAgent *agent, int ic, const scim::S
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_focus_out(ic, ic_uuid.c_str());
+#ifdef WEBSOCKET
+            g_websocket.on_focus_out(ic);
+#endif
         }
     }
 }
@@ -143,6 +152,9 @@ static void slot_focus_in(const scim::HelperAgent *agent, int ic, const scim::St
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_focus_in(ic, ic_uuid.c_str());
+#ifdef WEBSOCKET
+            g_websocket.on_focus_in(ic);
+#endif
         }
     }
 }
@@ -183,6 +195,7 @@ static void slot_ise_show(const scim::HelperAgent *agent, int ic, char *buf, siz
             }
 
 #ifdef WEBSOCKET
+            g_websocket.on_set_layout(ise_context.layout);
             g_websocket.on_show(ic);
 #endif
         }
@@ -236,6 +249,9 @@ static void slot_set_language(const scim::HelperAgent *agent, scim::uint32 &lang
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_set_language(language);
+#ifdef WEBSOCKET
+            g_websocket.on_set_language(language);
+#endif
         }
     }
 }
@@ -247,6 +263,9 @@ static void slot_set_imdata(const scim::HelperAgent *agent, char *buf, size_t &l
         if (callback) {
             scl32 _len = static_cast<scl32>(reinterpret_cast<size_t>(len) & 0xffffffff);
             callback->on_set_imdata(buf, _len);
+#ifdef WEBSOCKET
+            g_websocket.on_set_imdata(buf, len);
+#endif
         }
     }
 }
@@ -258,6 +277,9 @@ static void slot_get_imdata(const scim::HelperAgent *, char **buf, size_t &len)
         if (callback) {
             sclu32 _len = 0;
             callback->on_get_imdata(buf, &_len);
+#ifdef WEBSOCKET
+            g_websocket.on_get_imdata(buf, &_len);
+#endif
             len = _len;
         }
     }
@@ -279,6 +301,9 @@ static void slot_set_return_key_type(const scim::HelperAgent *agent, scim::uint3
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_set_return_key_type(type);
+#ifdef WEBSOCKET
+            g_websocket.on_set_return_key_type(type);
+#endif
         }
     }
 }
@@ -289,6 +314,9 @@ static void slot_get_return_key_type(const scim::HelperAgent *agent, scim::uint3
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_get_return_key_type(&type);
+#ifdef WEBSOCKET
+            g_websocket.on_get_return_key_type(&type);
+#endif
         }
     }
 }
@@ -299,6 +327,9 @@ static void slot_set_return_key_disable(const scim::HelperAgent *agent, scim::ui
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_set_return_key_disable(disabled);
+#ifdef WEBSOCKET
+            g_websocket.on_set_return_key_disable(disabled);
+#endif
         }
     }
 }
@@ -309,6 +340,9 @@ static void slot_get_return_key_disable(const scim::HelperAgent *agent, scim::ui
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_get_return_key_disable(&disabled);
+#ifdef WEBSOCKET
+            g_websocket.on_get_return_key_disable(&disabled);
+#endif
         }
     }
 }
@@ -319,6 +353,9 @@ static void slot_set_layout(const scim::HelperAgent *agent, scim::uint32 &layout
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_set_layout(layout);
+#ifdef WEBSOCKET
+            g_websocket.on_set_layout(layout);
+#endif
         }
     }
 }
@@ -329,6 +366,9 @@ static void slot_get_layout(const scim::HelperAgent *agent, scim::uint32 &layout
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_get_layout(&layout);
+#ifdef WEBSOCKET
+            g_websocket.on_get_layout(&layout);
+#endif
         }
     }
 }
@@ -349,6 +389,9 @@ static void slot_reset_input_context(const scim::HelperAgent *agent, int ic, con
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_reset_input_context(ic, uuid.c_str());
+#ifdef WEBSOCKET
+            g_websocket.on_reset_input_context(ic);
+#endif
         }
     }
 }
@@ -555,6 +598,9 @@ static void slot_process_key_event(const scim::HelperAgent *agent, scim::KeyEven
         ISCLCoreEventCallback *callback = impl->get_core_event_callback();
         if (callback) {
             callback->on_process_key_event(key, &ret);
+#ifdef WEBSOCKETweb_ret
+            g_websocket.on_process_key_event(key.code, key.mask, key.layout, &ret);
+#endif
         }
     }
 }