From 5ab6c6c1e762b3039bd81207f22cab1fe74afd7c Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 18 Oct 2016 21:26:46 +0900 Subject: [PATCH 01/16] Reduce unnecessary string comparison in Web IME Change-Id: I89fb038df0a6b4d59dd13f3eee1b0b4b1a4ae8ba Signed-off-by: Jihoon Kim --- src/legacy_support/websocket.cpp | 41 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/legacy_support/websocket.cpp b/src/legacy_support/websocket.cpp index 3814e5f..59f00c3 100644 --- a/src/legacy_support/websocket.cpp +++ b/src/legacy_support/websocket.cpp @@ -934,8 +934,7 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) } } log(str.c_str()); - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_COMMIT_STRING]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_COMMIT_STRING]) == 0) { send_key_event(0xff6b, 0); // Temporarily reset keyboard engine std::string str = ""; @@ -946,8 +945,7 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) } } commit_string(str.c_str()); - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_UPDATE_PREEDIT_STRING]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_UPDATE_PREEDIT_STRING]) == 0) { std::string str = ""; for (unsigned int loop = 0;loop < message.values.size();loop++) { str += message.values.at(loop).c_str(); @@ -956,24 +954,27 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) } } update_preedit_string(str.c_str()); - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_KEY_EVENT]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SEND_KEY_EVENT]) == 0) { if (message.values.size() == 1) { send_key_event(atoi(message.values.at(0).c_str()), 0); } - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES]) == 0) { LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES"); if (message.values.size() == 4) { + int portrait_width, portrait_height; + int landscape_width, landscape_height; + + portrait_width = atoi(message.values.at(0).c_str()); + portrait_height = atoi(message.values.at(1).c_str()); + landscape_width = atoi(message.values.at(2).c_str()); + landscape_height = atoi(message.values.at(3).c_str()); + LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES : %d %d %d %d", - atoi(message.values.at(0).c_str()), atoi(message.values.at(1).c_str()), - atoi(message.values.at(2).c_str()), atoi(message.values.at(3).c_str())); + portrait_width, portrait_height, landscape_width, landscape_height); set_keyboard_sizes( - atoi(message.values.at(0).c_str()), atoi(message.values.at(1).c_str()), - atoi(message.values.at(2).c_str()), atoi(message.values.at(3).c_str())); + portrait_width, portrait_height, landscape_width, landscape_height); } - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_SELECTION]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_SELECTION]) == 0) { LOGD("ISE_MESSAGE_COMMAND_SET_SELECTION"); if (message.values.size() == 2) { LOGD("ISE_MESSAGE_COMMAND_SET_SELECTION : %d %d", @@ -981,13 +982,11 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) set_selection( atoi(message.values.at(0).c_str()), atoi(message.values.at(1).c_str())); } - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_GET_SELECTION]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_GET_SELECTION]) == 0) { if (message.values.size() == 0) { get_selection(); } - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_GET_SURROUNDING_TEXT]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_GET_SURROUNDING_TEXT]) == 0) { LOGD("ISE_MESSAGE_COMMAND_GET_SURROUNDING_TEXT"); if (message.values.size() == 2) { LOGD("ISE_MESSAGE_COMMAND_GET_SURROUNDING_TEXT : %d %d", @@ -995,8 +994,7 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) get_surrounding_text( atoi(message.values.at(0).c_str()), atoi(message.values.at(1).c_str())); } - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_DELETE_SURROUNDING_TEXT]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_DELETE_SURROUNDING_TEXT]) == 0) { LOGD("ISE_MESSAGE_COMMAND_DELETE_SURROUNDING_TEXT"); if (message.values.size() == 2) { LOGD("ISE_MESSAGE_COMMAND_DELETE_SURROUNDING_TEXT : %d %d", @@ -1004,8 +1002,7 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) delete_surrounding_text( atoi(message.values.at(0).c_str()), atoi(message.values.at(1).c_str())); } - } - if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_LOGIN]) == 0) { + } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_LOGIN]) == 0) { if (g_ws_server_context) { lws_callback_on_writable_all_protocol(g_ws_server_context, &protocols[PROTOCOL_KEYBOARD]); } else { -- 2.7.4 From a4f6c21592aa18d7528b993fb0e09cca16d54489 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 18 Oct 2016 23:50:13 +0900 Subject: [PATCH 02/16] Added call for on_show callback Change-Id: Ia97f51e53ec5043072eaed184c890ee4ae3f1c51 --- src/legacy_support/websocket.cpp | 15 ++++++++++----- src/sclconnection-isf.cpp | 13 +++++++++++++ src/sclcoreui-efl.cpp | 9 +++++++-- src/sclcoreui-efl.h | 5 ----- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/legacy_support/websocket.cpp b/src/legacy_support/websocket.cpp index 59f00c3..aa82219 100644 --- a/src/legacy_support/websocket.cpp +++ b/src/legacy_support/websocket.cpp @@ -960,14 +960,19 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) } } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES]) == 0) { LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES"); - if (message.values.size() == 4) { - int portrait_width, portrait_height; - int landscape_width, landscape_height; + int portrait_width, portrait_height; + int landscape_width, landscape_height; + if (message.values.size() == 4 || message.values.size() == 2) { portrait_width = atoi(message.values.at(0).c_str()); portrait_height = atoi(message.values.at(1).c_str()); - landscape_width = atoi(message.values.at(2).c_str()); - landscape_height = atoi(message.values.at(3).c_str()); + if (message.values.size() == 2) { + landscape_width = portrait_width; + landscape_height = portrait_height; + } else { + landscape_width = atoi(message.values.at(2).c_str()); + landscape_height = atoi(message.values.at(3).c_str()); + } LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES : %d %d %d %d", portrait_width, portrait_height, landscape_width, landscape_height); diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index bc7a365..b0c0357 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -20,6 +20,11 @@ #include #include +#ifdef WEBSOCKET +#include "legacy_support/websocket.h" +extern CWebHelperAgentWebSocket g_websocket; +#endif + using namespace scl; static scim::ConfigPointer _scim_config(0); @@ -169,6 +174,10 @@ static void slot_ise_show(const scim::HelperAgent *agent, int ic, char *buf, siz if (ui) { ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_SHOW); } + +#ifdef WEBSOCKET + g_websocket.on_show(ic); +#endif } } } @@ -186,6 +195,10 @@ static void slot_ise_hide(const scim::HelperAgent *agent, int ic, const scim::St if (ui) { ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_HIDE); } + +#ifdef WEBSOCKET + g_websocket.on_hide(ic); +#endif } } } diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index f56834e..99a4728 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -33,6 +33,11 @@ #include #endif +#ifdef WEBSOCKET + /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */ +CWebHelperAgentWebSocket g_websocket; +#endif + #ifdef WAYLAND struct WaylandKeyboard { @@ -85,7 +90,7 @@ sclboolean CSCLCoreUIEFL::init() } #ifdef WEBSOCKET - m_websocket.init(); + g_websocket.init(); #endif return TRUE; @@ -96,7 +101,7 @@ void CSCLCoreUIEFL::fini() m_initialized = FALSE; #ifdef WEBSOCKET - m_websocket.exit(); + g_websocket.exit(); #endif } diff --git a/src/sclcoreui-efl.h b/src/sclcoreui-efl.h index 5a383f7..ee0e9f7 100644 --- a/src/sclcoreui-efl.h +++ b/src/sclcoreui-efl.h @@ -62,11 +62,6 @@ private: sclwindow m_main_window; OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX]; - -#ifdef WEBSOCKET - /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */ - CWebHelperAgentWebSocket m_websocket; -#endif }; } -- 2.7.4 From abeadd592d7a736600bb96b5c539dbc8c848640d Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Wed, 19 Oct 2016 00:12:46 +0900 Subject: [PATCH 03/16] Update package version to 0.4.30 Change-Id: I7ed45e9db7ed136e064cb44c420f9dc651839b84 --- packaging/libscl-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 8b9d498..46b8eb6 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -9,7 +9,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.29 +Version: 0.4.30 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From c0a9ff62281dfda5c73a1a12692dcecb1cb5fc41 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 1 Nov 2016 16:34:40 +0900 Subject: [PATCH 04/16] Added API for flushing keyboard ise Change-Id: I25f49f4e7429aea5f36419e2869cac10551a4a3b --- src/sclconnection-isf.cpp | 7 +++++++ src/sclconnection-isf.h | 1 + src/sclconnection.cpp | 7 +++++++ src/sclconnection.h | 1 + src/sclcore.cpp | 9 ++++++++- src/sclcore.h | 5 +++++ src/sclcoreimpl.cpp | 7 ++++++- src/sclcoreimpl.h | 1 + 8 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index b0c0357..1e0daea 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -824,6 +824,13 @@ void CSCLConnectionISF::reset_keyboard_ise() } } +void CSCLConnectionISF::flush_keyboard_ise() +{ + if (m_initialized) { + m_helper_agent.flush_keyboard_ise(); + } +} + void CSCLConnectionISF::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { if (m_initialized) { diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 4768c1a..b0621ab 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -57,6 +57,7 @@ public: void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); void reset_keyboard_ise(); + void flush_keyboard_ise(); void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str); diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index 71398f7..7694114 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -147,6 +147,13 @@ void CSCLConnection::reset_keyboard_ise() } } +void CSCLConnection::flush_keyboard_ise() +{ + if (m_impl) { + m_impl->flush_keyboard_ise(); + } +} + void CSCLConnection::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { if (m_impl) { diff --git a/src/sclconnection.h b/src/sclconnection.h index 78bacfe..302583b 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -57,6 +57,7 @@ public: virtual void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); virtual void reset_keyboard_ise(); + virtual void flush_keyboard_ise(); virtual void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); virtual void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); virtual void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str); diff --git a/src/sclcore.cpp b/src/sclcore.cpp index b36a1c1..c543dcd 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -116,6 +116,13 @@ void CSCLCore::reset_keyboard_ise() } } +void CSCLCore::flush_keyboard_ise() +{ + if (m_impl) { + m_impl->flush_keyboard_ise(); + } +} + void CSCLCore::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { if (m_impl) { @@ -351,4 +358,4 @@ void CSCLCore::request_ise_hide() const if (m_impl) { m_impl->request_ise_hide(); } -} \ No newline at end of file +} diff --git a/src/sclcore.h b/src/sclcore.h index 9971048..a3fbdd6 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -99,6 +99,11 @@ public: void reset_keyboard_ise(); /** + * @brief Send a flush keyboard Event to IMEngine + */ + void flush_keyboard_ise(); + + /** * @brief Send a KeyEvent to ISF * * @param[in] ic The handle of the IMEngineInstance to receive the event. diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 2e113cc..468078e 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -142,6 +142,11 @@ void CSCLCoreImpl::reset_keyboard_ise() m_connection.reset_keyboard_ise(); } +void CSCLCoreImpl::flush_keyboard_ise() +{ + m_connection.flush_keyboard_ise(); +} + void CSCLCoreImpl::send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask) { m_connection.send_key_event(ic, ic_uuid, keycode, keymask); @@ -367,4 +372,4 @@ void CSCLCoreImpl::get_selection_text(sclchar **text) void CSCLCoreImpl::request_ise_hide() { m_connection.request_ise_hide(); -} \ No newline at end of file +} diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 1151b54..6145699 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -62,6 +62,7 @@ public: void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); void reset_keyboard_ise(); + void flush_keyboard_ise(); void send_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void forward_key_event(sclint ic, const sclchar *ic_uuid, sclu32 keycode, sclu16 keymask); void commit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str); -- 2.7.4 From 2058c6ec17b79c353b60ee1d9518dbfdfe9a10ec Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 1 Nov 2016 19:02:38 +0900 Subject: [PATCH 05/16] Update package version to 0.4.31 Change-Id: I27da1a1b0aa131aace9430dd12b3011907e4e11c --- packaging/libscl-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 46b8eb6..1c68319 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -9,7 +9,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.30 +Version: 0.4.31 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 28b51921826e226a3615641f33096908a09cc173 Mon Sep 17 00:00:00 2001 From: Li Zhang Date: Tue, 8 Nov 2016 15:13:28 +0800 Subject: [PATCH 06/16] Using socket config module Change-Id: I7a22cc6e47a5329d1cae60c4df6d8c1f47c53c6a --- src/sclconnection-isf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 1e0daea..676f8d3 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -677,7 +677,7 @@ sclboolean CSCLConnectionISF::init() } if (_scim_config.null()) { - scim::ConfigPointer config_pointer = scim::ConfigBase::get(true, "simple"); + scim::ConfigPointer config_pointer = scim::ConfigBase::get(true, "socket"); if (config_pointer.null()) { config_pointer = new scim::DummyConfig(); } -- 2.7.4 From 01895087242339f6cb1b04f45ef949c7b37f9461 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Wed, 9 Nov 2016 14:52:20 +0900 Subject: [PATCH 07/16] Update package version to 0.4.32 Change-Id: Iae5bc9a6bfb6b6f7b8754b4926076e5e59d0831d --- packaging/libscl-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 1c68319..2f244a8 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -9,7 +9,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.31 +Version: 0.4.32 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From dbd35fd8c3434b4e01f305df705a87c658a2744e Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Mon, 19 Dec 2016 16:57:17 +0900 Subject: [PATCH 08/16] Implemented interface for restoring ISE option window Change-Id: I1fc7b8cbc342feec47db7bbcff787fcfeb41b0ff --- src/sclconnection-isf.cpp | 12 ++++++++++++ src/sclcoreui-efl.cpp | 34 ++++++++++++++++++++++++++++++++-- src/sclcoreui-efl.h | 1 + src/sclcoreui.cpp | 11 ++++++++++- src/sclcoreui.h | 5 +++++ 5 files changed, 60 insertions(+), 3 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 676f8d3..dab23d1 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -521,6 +521,17 @@ static void slot_show_ise_option_window(const scim::HelperAgent *agent, int ic, } } +static void slot_resume_ise_option_window(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + CSCLCoreUI *core_ui = impl->get_core_ui(); + if (core_ui) { + LOGD("slot_resume_ise_option_window() called!!!\n"); + core_ui->show_option_window(OPTION_WINDOW_TYPE_SETTING_APPLICATION); + } + } +} + static void slot_check_ise_option_window(const scim::HelperAgent *agent, sclu32 &avail) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -667,6 +678,7 @@ sclboolean CSCLConnectionISF::init() m_helper_agent.signal_connect_associate_table_page_down(scim::slot(slot_associate_table_page_down)); m_helper_agent.signal_connect_update_associate_table_page_size(scim::slot(slot_update_associate_table_page_size)); m_helper_agent.signal_connect_show_option_window(scim::slot(slot_show_ise_option_window)); + 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_candidate_show(scim::slot(slot_candidate_show)); diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 99a4728..93de8c0 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -612,7 +612,7 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) sclboolean ret = false; callback->on_check_option_window_availability(&ret); if (ret == false) { - LOGW("on_create_option_window() is not available\n"); + LOGW("option_window not available\n"); return SCLWINDOW_INVALID; } } else { @@ -655,7 +655,6 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) set_transient_for_app_window(window); } else if (type == OPTION_WINDOW_TYPE_SETTING_APPLICATION) { set_transient_for_isf_setting_window(window); - evas_object_show(window); } m_option_window_info[type].window = window; @@ -663,6 +662,37 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) return window; } +bool CSCLCoreUIEFL::show_option_window(SCLOptionWindowType type) +{ + if (type < 0 || type >= OPTION_WINDOW_TYPE_MAX) { + return SCLWINDOW_INVALID; + } + + ISCLCoreEventCallback *callback = NULL; + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + callback = impl->get_core_event_callback(); + if (callback) { + sclboolean ret = false; + callback->on_check_option_window_availability(&ret); + if (ret == false) { + LOGW("option_window not available\n"); + return false; + } + } else { + return false; + } + } + + if (m_option_window_info[type].window != SCLWINDOW_INVALID) { + evas_object_show(static_cast(m_option_window_info[type].window)); + elm_win_raise(static_cast(m_option_window_info[type].window)); + return true; + } + + return false; +} + void CSCLCoreUIEFL::destroy_option_window(sclwindow window) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); diff --git a/src/sclcoreui-efl.h b/src/sclcoreui-efl.h index ee0e9f7..30d0331 100644 --- a/src/sclcoreui-efl.h +++ b/src/sclcoreui-efl.h @@ -50,6 +50,7 @@ public: virtual int get_screen_rotation_degree(); virtual sclwindow create_option_window(SCLOptionWindowType type); + virtual bool show_option_window(SCLOptionWindowType type); virtual void destroy_option_window(sclwindow window); void set_screen_rotation_degree(int degree); diff --git a/src/sclcoreui.cpp b/src/sclcoreui.cpp index e7ea1f6..500868c 100644 --- a/src/sclcoreui.cpp +++ b/src/sclcoreui.cpp @@ -101,6 +101,15 @@ sclwindow CSCLCoreUI::create_option_window(SCLOptionWindowType type) return ret; } +bool CSCLCoreUI::show_option_window(SCLOptionWindowType type) +{ + bool ret = false; + if (m_impl) { + ret = m_impl->show_option_window(type); + } + return ret; +} + void CSCLCoreUI::destroy_option_window(sclwindow window) { if (m_impl) { @@ -113,4 +122,4 @@ void CSCLCoreUI::process_keyboard_ui_state_change(KEYBOARD_UI_STATE state) if (m_impl) { m_impl->process_keyboard_ui_state_change(state); } -} \ No newline at end of file +} diff --git a/src/sclcoreui.h b/src/sclcoreui.h index ad15281..12abdf1 100644 --- a/src/sclcoreui.h +++ b/src/sclcoreui.h @@ -74,6 +74,11 @@ public: virtual sclwindow create_option_window(SCLOptionWindowType type); /** + * @brief Requests to show existing option window + */ + virtual bool show_option_window(SCLOptionWindowType type); + + /** * @brief Requests to destroy an option window */ virtual void destroy_option_window(sclwindow window); -- 2.7.4 From ed0c1b3bb7a467e78f9ad0d536a8e2e7db86c969 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 20 Dec 2016 15:07:53 +0900 Subject: [PATCH 09/16] Update package version to 0.4.33 Change-Id: Idc77fcfc130c27a91e890a7e7bb2f85096c1e0c5 Signed-off-by: Jihoon Kim --- packaging/libscl-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 2f244a8..f0f05d2 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -9,7 +9,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.32 +Version: 0.4.33 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From b01876888b78857f34122d0c3e45b8b0e5e69af7 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 22 Dec 2016 18:10:32 +0900 Subject: [PATCH 10/16] Add exit log for debugging Change-Id: I4f9db89b7e78e3a77d1aa632dc2b98d5580883ec Signed-off-by: Jihoon Kim --- src/sclconnection-isf.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index dab23d1..64abd19 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -36,12 +36,14 @@ static void slot_exit(const scim::HelperAgent *agent, int ic, const scim::String ISCLCoreEventCallback *callback = impl->get_core_event_callback(); if (callback) { callback->on_ise_hide(ic, ic_uuid.c_str()); + LOGD("call on_exit"); callback->on_exit(); } if (agent) { agent->update_ise_exit(); } } + LOGD("exit"); elm_exit(); } -- 2.7.4 From c87c29d6063af7fbb3c2f50ff782262877257674 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 12 Jan 2017 16:52:38 +0900 Subject: [PATCH 11/16] Integrate appcore to reduce initialize time IME application did not use appcore, AMD does not detect whether it's launched normally or not. Therefore it was launched after 5 seconds timeout. Change-Id: Idb0785bdbf80a52cf23b086a6b77c5e5bc6d2d58 Signed-off-by: Jihoon Kim --- CMakeLists.txt | 1 + packaging/libscl-core.spec | 1 + src/sclcoreui-efl.cpp | 189 ++++++++++++++++++++++++++++----------------- src/sclcoreui-efl.h | 5 ++ 4 files changed, 126 insertions(+), 70 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3bd64d6..64613c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ SET(PKGS_CHECK_MODULES vconf libscl-common capi-appfw-application + appcore-efl ) IF (with_wayland) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index f0f05d2..2deabe5 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -28,6 +28,7 @@ BuildRequires: pkgconfig(ecore-x) BuildRequires: pkgconfig(x11) %endif BuildRequires: pkgconfig(libscl-common) +BuildRequires: pkgconfig(appcore-efl) BuildRequires: pkgconfig(capi-appfw-application) %if "%{WITH_WEBSOCKET}" == "TRUE" BuildRequires: pkgconfig(libwebsockets) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 93de8c0..da8ae2c 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -19,6 +19,7 @@ #include "sclcoreimpl.h" #include #include +#include #include #include @@ -38,6 +39,8 @@ CWebHelperAgentWebSocket g_websocket; #endif +static struct appcore_ops ops; + #ifdef WAYLAND struct WaylandKeyboard { @@ -74,6 +77,8 @@ CSCLCoreUIEFL::CSCLCoreUIEFL() m_rotation_degree = 0; m_main_window = SCLWINDOW_INVALID; + m_uuid = NULL; + m_display = NULL; } CSCLCoreUIEFL::~CSCLCoreUIEFL() @@ -400,110 +405,154 @@ err: } #endif -void CSCLCoreUIEFL::run(const sclchar *display) +int CSCLCoreUIEFL::create(void *data) { - char *argv[4]; - int argc = 3; - - CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); - if (impl) { - const sclchar *uuid = impl->get_uuid(); - if (!uuid) - uuid = ""; - - argv[0] = const_cast (uuid); - argv[1] = (char *)"--display"; - argv[2] = const_cast (display); - argv[3] = 0; - - elm_init(argc, argv); - #ifdef WAYLAND - if (!check_evas_engine(&wlkb)) { - LOGW("_wlkb_check_evas_engine error!\n"); - elm_shutdown(); - return; - } - LOGD("Selected engine: '%s'\n", wlkb.ee_engine); + if (!check_evas_engine(&wlkb)) { + LOGW("_wlkb_check_evas_engine error!\n"); + elm_shutdown(); + return -1; + } + LOGD("Selected engine: '%s'\n", wlkb.ee_engine); #endif - elm_config_accel_preference_set("3d"); - elm_policy_set(ELM_POLICY_THROTTLE, ELM_POLICY_THROTTLE_NEVER); + elm_config_accel_preference_set("3d"); + elm_policy_set(ELM_POLICY_THROTTLE, ELM_POLICY_THROTTLE_NEVER); - Evas_Object *main_window = elm_win_add(NULL, uuid, ELM_WIN_UTILITY); - if (!main_window) { - LOGE("Failed to create main window\n"); - return; - } + Evas_Object *main_window = elm_win_add(NULL, m_uuid, ELM_WIN_UTILITY); + if (!main_window) { + LOGE("Failed to create main window\n"); + return -1; + } - m_main_window = SCL_WINDOW_CAST(main_window); + m_main_window = SCL_WINDOW_CAST(main_window); #ifdef WAYLAND - if (!_wayland_setup(&wlkb, main_window)) { - LOGW("ERROR: Unable to setup input panel.\n"); - elm_shutdown(); - return; - } + if (!_wayland_setup(&wlkb, main_window)) { + LOGW("ERROR: Unable to setup input panel.\n"); + appcore_efl_fini(); + return -1; + } #endif - elm_win_borderless_set(main_window, EINA_TRUE); - elm_win_keyboard_win_set(main_window, EINA_TRUE); - elm_win_autodel_set(main_window, EINA_TRUE); - elm_win_title_set(main_window, uuid); - elm_win_prop_focus_skip_set(main_window, EINA_TRUE); - int rots[] = { 0, 90, 180, 270 }; - elm_win_wm_rotation_available_rotations_set(main_window, rots, (sizeof(rots) / sizeof(int))); + elm_win_borderless_set(main_window, EINA_TRUE); + elm_win_keyboard_win_set(main_window, EINA_TRUE); + elm_win_autodel_set(main_window, EINA_TRUE); + elm_win_title_set(main_window, m_uuid); + elm_win_prop_focus_skip_set(main_window, EINA_TRUE); + int rots[] = { 0, 90, 180, 270 }; + elm_win_wm_rotation_available_rotations_set(main_window, rots, (sizeof(rots) / sizeof(int))); #ifndef WAYLAND - unsigned int set = 1; - ecore_x_window_prop_card32_set(elm_win_xwindow_get(main_window), - ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED, - &set, 1); + unsigned int set = 1; + ecore_x_window_prop_card32_set(elm_win_xwindow_get(main_window), + ECORE_X_ATOM_E_WINDOW_ROTATION_SUPPORTED, + &set, 1); - ecore_x_icccm_name_class_set(elm_win_xwindow_get(main_window), "Virtual Keyboard", "ISF"); + ecore_x_icccm_name_class_set(elm_win_xwindow_get(main_window), "Virtual Keyboard", "ISF"); #endif - vconf_notify_key_changed(VCONFKEY_LANGSET, language_changed_cb, NULL); - vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb, NULL); + vconf_notify_key_changed(VCONFKEY_LANGSET, language_changed_cb, NULL); + vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb, NULL); - /* Should we call these callback functions here? */ - language_changed_cb(NULL, NULL); - accessibility_changed_cb(NULL, NULL); + /* Should we call these callback functions here? */ + language_changed_cb(NULL, NULL); + accessibility_changed_cb(NULL, NULL); - impl->init(display); + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) + impl->init(m_display); #ifdef WAYLAND - evas_object_smart_callback_add(main_window, "wm,rotation,changed", win_rotation_changed_cb, this); + evas_object_smart_callback_add(main_window, "wm,rotation,changed", win_rotation_changed_cb, NULL); #else - Ecore_Event_Handler *XClientMsgHandler = - ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _client_message_cb, this); + Ecore_Event_Handler *XClientMsgHandler = + ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _client_message_cb, this); #endif - signal(SIGQUIT, signal_handler); - signal(SIGTERM, signal_handler); - signal(SIGINT, signal_handler); - signal(SIGHUP, signal_handler); + signal(SIGQUIT, signal_handler); + signal(SIGTERM, signal_handler); + signal(SIGINT, signal_handler); + signal(SIGHUP, signal_handler); #ifdef WAYLAND - evas_object_show(main_window); + evas_object_show(main_window); #endif - elm_run(); + return 0; +} +int CSCLCoreUIEFL::terminate(void *data) +{ + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) impl->fini(); - vconf_ignore_key_changed(VCONFKEY_LANGSET, language_changed_cb); - vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb); + vconf_ignore_key_changed(VCONFKEY_LANGSET, language_changed_cb); + vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb); #ifndef WAYLAND - if (XClientMsgHandler) { - ecore_event_handler_del(XClientMsgHandler); - XClientMsgHandler = NULL; - } + if (XClientMsgHandler) { + ecore_event_handler_del(XClientMsgHandler); + XClientMsgHandler = NULL; + } #endif - elm_shutdown(); + return 0; +} + +static int app_create_cb(void *data) +{ + CSCLCoreUIEFL *sclui = static_cast(data); + if (sclui) + return sclui->create(data); + + return -1; +} + +static int app_terminate_cb(void *data) +{ + CSCLCoreUIEFL *sclui = static_cast(data); + if (sclui) + return sclui->terminate(data); + + return -1; +} + +void CSCLCoreUIEFL::run(const sclchar *display) +{ + char **argv = new char*[4]; + int argc = 3; + const sclchar *uuid = NULL; + + ops.create = app_create_cb; + ops.terminate = app_terminate_cb; + ops.resume = NULL; + ops.pause = NULL; + ops.reset = NULL; + ops.data = this; + + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + uuid = impl->get_uuid(); } + + if (!uuid) + uuid = ""; + + m_uuid = uuid; + m_display = display; + + argv[0] = const_cast (uuid); + argv[1] = (char *)"--display"; + argv[2] = const_cast (display); + argv[3] = 0; + + LOGD("name : %s\n", uuid); + + int ret = appcore_efl_main(uuid, &argc, (char ***)&argv, &ops); + + delete [] argv; } static void focus_out_cb(void *data, Evas *e, void *event) diff --git a/src/sclcoreui-efl.h b/src/sclcoreui-efl.h index 30d0331..3cd50c6 100644 --- a/src/sclcoreui-efl.h +++ b/src/sclcoreui-efl.h @@ -41,6 +41,9 @@ public: CSCLCoreUIEFL(); ~CSCLCoreUIEFL(); + int create(void *data); + int terminate(void *data); + virtual sclboolean init(); virtual void fini(); @@ -61,6 +64,8 @@ private: sclint m_rotation_degree; sclwindow m_main_window; + const sclchar *m_uuid; + const sclchar *m_display; OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX]; }; -- 2.7.4 From 9947fb375b9d21a6dbda98452f0b7e33c8a55b92 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 12 Jan 2017 18:13:41 +0900 Subject: [PATCH 12/16] Update package version to 0.4.34 Change-Id: I504f48008eae64efb7cac49006fe8d37d1df1fd9 Signed-off-by: Jihoon Kim --- packaging/libscl-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 2deabe5..4834b4c 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -9,7 +9,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.33 +Version: 0.4.34 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From b5aab53ba8f1244bde86fe25305c4a46164811c0 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 12 Jan 2017 19:23:59 +0900 Subject: [PATCH 13/16] Remove unused variable Change-Id: Ie7fcf090d2c28a5a09c5b122f50d079c9f345174 --- src/sclcoreui-efl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index da8ae2c..9d6a2bb 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -550,7 +550,7 @@ void CSCLCoreUIEFL::run(const sclchar *display) LOGD("name : %s\n", uuid); - int ret = appcore_efl_main(uuid, &argc, (char ***)&argv, &ops); + appcore_efl_main(uuid, &argc, (char ***)&argv, &ops); delete [] argv; } -- 2.7.4 From a20bb21a5b7c8fd03ddabc8a0d915ea704bb8c56 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 12 Jan 2017 19:24:24 +0900 Subject: [PATCH 14/16] Update package version to 0.4.35 Change-Id: I47327428ef9d65143aea7a1ca4ea9c5d4619b8fb Signed-off-by: Jihoon Kim --- packaging/libscl-core.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 4834b4c..1683729 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -9,7 +9,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.34 +Version: 0.4.35 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From f78b43c34a3d203f924f5431f8d74324b25f4b35 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 13 Jan 2017 19:52:04 +0900 Subject: [PATCH 15/16] Replace uuid with appid Change-Id: I1c7052b854eda3843d36967825e933d5e6206e0b Signed-off-by: Jihoon Kim --- src/sclcoreui-efl.cpp | 22 +++++++++++----------- src/sclcoreui-efl.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 9d6a2bb..be6a4db 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -77,7 +77,7 @@ CSCLCoreUIEFL::CSCLCoreUIEFL() m_rotation_degree = 0; m_main_window = SCLWINDOW_INVALID; - m_uuid = NULL; + m_appid = NULL; m_display = NULL; } @@ -419,7 +419,7 @@ int CSCLCoreUIEFL::create(void *data) elm_config_accel_preference_set("3d"); elm_policy_set(ELM_POLICY_THROTTLE, ELM_POLICY_THROTTLE_NEVER); - Evas_Object *main_window = elm_win_add(NULL, m_uuid, ELM_WIN_UTILITY); + Evas_Object *main_window = elm_win_add(NULL, m_appid, ELM_WIN_UTILITY); if (!main_window) { LOGE("Failed to create main window\n"); return -1; @@ -438,7 +438,7 @@ int CSCLCoreUIEFL::create(void *data) elm_win_borderless_set(main_window, EINA_TRUE); elm_win_keyboard_win_set(main_window, EINA_TRUE); elm_win_autodel_set(main_window, EINA_TRUE); - elm_win_title_set(main_window, m_uuid); + elm_win_title_set(main_window, m_appid); elm_win_prop_focus_skip_set(main_window, EINA_TRUE); int rots[] = { 0, 90, 180, 270 }; elm_win_wm_rotation_available_rotations_set(main_window, rots, (sizeof(rots) / sizeof(int))); @@ -523,7 +523,7 @@ void CSCLCoreUIEFL::run(const sclchar *display) { char **argv = new char*[4]; int argc = 3; - const sclchar *uuid = NULL; + const sclchar *appid = NULL; ops.create = app_create_cb; ops.terminate = app_terminate_cb; @@ -534,23 +534,23 @@ void CSCLCoreUIEFL::run(const sclchar *display) CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { - uuid = impl->get_uuid(); + appid = impl->get_uuid(); } - if (!uuid) - uuid = ""; + if (!appid) + appid = ""; - m_uuid = uuid; + m_appid = appid; m_display = display; - argv[0] = const_cast (uuid); + argv[0] = const_cast (appid); argv[1] = (char *)"--display"; argv[2] = const_cast (display); argv[3] = 0; - LOGD("name : %s\n", uuid); + LOGD("name : %s\n", appid); - appcore_efl_main(uuid, &argc, (char ***)&argv, &ops); + appcore_efl_main(appid, &argc, (char ***)&argv, &ops); delete [] argv; } diff --git a/src/sclcoreui-efl.h b/src/sclcoreui-efl.h index 3cd50c6..d12477b 100644 --- a/src/sclcoreui-efl.h +++ b/src/sclcoreui-efl.h @@ -64,7 +64,7 @@ private: sclint m_rotation_degree; sclwindow m_main_window; - const sclchar *m_uuid; + const sclchar *m_appid; const sclchar *m_display; OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX]; -- 2.7.4 From 98fe36447c994dfef2234ab9faaa204111e6047d Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 19 Jan 2017 16:17:40 +0900 Subject: [PATCH 16/16] Fix IME string translation issue Change-Id: I220872172c16c7e7591fcf344f347a39a1ce1220 Signed-off-by: Jihoon Kim --- src/sclcoreui-efl.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index be6a4db..60e0eb2 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -138,7 +138,7 @@ void CSCLCoreUIEFL::set_keyboard_size_hints(SclSize portrait, SclSize landscape) #endif } -static void language_changed_cb(keynode_t *key, void* data) +static int language_changed_cb(void *event_info, void* data) { char clang[_POSIX_PATH_MAX] = {0}; char *vconf_str = vconf_get_str(VCONFKEY_LANGSET); @@ -155,6 +155,8 @@ static void language_changed_cb(keynode_t *key, void* data) callback->on_set_display_language(clang); } } + + return 0; } static void accessibility_changed_cb(keynode_t *key, void* data) @@ -452,7 +454,8 @@ int CSCLCoreUIEFL::create(void *data) ecore_x_icccm_name_class_set(elm_win_xwindow_get(main_window), "Virtual Keyboard", "ISF"); #endif - vconf_notify_key_changed(VCONFKEY_LANGSET, language_changed_cb, NULL); + appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, language_changed_cb, NULL); + vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb, NULL); /* Should we call these callback functions here? */ @@ -488,7 +491,8 @@ int CSCLCoreUIEFL::terminate(void *data) if (impl) impl->fini(); - vconf_ignore_key_changed(VCONFKEY_LANGSET, language_changed_cb); + appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, NULL, NULL); + vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, accessibility_changed_cb); #ifndef WAYLAND -- 2.7.4