From 01895087242339f6cb1b04f45ef949c7b37f9461 Mon Sep 17 00:00:00 2001 From: InHong Han Date: Wed, 9 Nov 2016 14:52:20 +0900 Subject: [PATCH 01/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 02/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 03/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 04/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 05/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 06/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 07/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 08/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 09/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 10/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 From caa961e75bbfc1403183805eba2b0133026c9717 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 19 Jan 2017 16:26:08 +0900 Subject: [PATCH 11/16] Update package version to 0.4.36 Change-Id: Ic93d7848279546a32f3108dfd1c316ec7dfc4120 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 1683729..e23b249 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.35 +Version: 0.4.36 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From bb7c388b4bc7ad8d0d9988d01cc98e3b4d880db2 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 20 Jan 2017 12:58:49 +0900 Subject: [PATCH 12/16] Remove elm_shutdown() in create callback handler After integrating appcore, elm_shutdown() will be called when it's destroyed automatically Change-Id: Ic545d4b6b6c388d987161d6662574d0d84b08d44 Signed-off-by: Jihoon Kim --- src/sclcoreui-efl.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 60e0eb2..8f0147a 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -412,7 +412,6 @@ int CSCLCoreUIEFL::create(void *data) #ifdef WAYLAND if (!check_evas_engine(&wlkb)) { LOGW("_wlkb_check_evas_engine error!\n"); - elm_shutdown(); return -1; } LOGD("Selected engine: '%s'\n", wlkb.ee_engine); -- 2.7.4 From 3e4c1afc0a7661d2c13d1f8cfcf450e69b82ea50 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Sun, 22 Jan 2017 08:56:51 +0900 Subject: [PATCH 13/16] Update package version to 0.4.37 Change-Id: Ie8292af79fea53d054e355e88dc03d333b29ac33 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 e23b249..fec3207 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.36 +Version: 0.4.37 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From e403de032d62871f588ab60dfebd5b45a9a1352e Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 23 Jan 2017 16:47:04 +0900 Subject: [PATCH 14/16] Reduce binary size to use hidden visibility 32bit armv7l size : 101KB -> 61KB Change-Id: I7dfaeea5a7558291e0ad43db33abdf3f0d26b34b Signed-off-by: Jihoon Kim --- packaging/libscl-core.spec | 4 ++-- src/sclcore.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index fec3207..58fb073 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -51,8 +51,8 @@ A devel package of libscl-core library that helps developing S/W Keyboard %build -export CFLAGS+=" -DTIZEN_DEBUG_ENABLE -Werror" -export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -Werror" +export CFLAGS+=" -fvisibility=hidden -DTIZEN_DEBUG_ENABLE -Werror" +export CXXFLAGS+=" -fvisibility=hidden -fvisibility-inlines-hidden -DTIZEN_DEBUG_ENABLE -Werror" export FFLAGS+=" -DTIZEN_DEBUG_ENABLE" rm -rf CMakeFiles diff --git a/src/sclcore.h b/src/sclcore.h index a3fbdd6..b462324 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -39,7 +39,7 @@ class CSCLCoreImpl; * * This class implements all functions for working as a soft-based keyboard */ -class CSCLCore +class EXAPI CSCLCore { public: CSCLCore(ISCLCoreEventCallback *callback); -- 2.7.4 From c3330a1ae19832856b71637bb8c0da78433d29c2 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 24 Jan 2017 10:25:22 +0900 Subject: [PATCH 15/16] Update package version to 0.4.38 Change-Id: Ie804d9038881939d7c3ad1cf27c1eeed5b7ae07b 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 58fb073..2498915 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.37 +Version: 0.4.38 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From a2550ee776c7510b141c74341df979589b592847 Mon Sep 17 00:00:00 2001 From: Ji-hoon Lee Date: Tue, 24 Jan 2017 16:35:49 +0900 Subject: [PATCH 16/16] Use elm_win_add() instead for specifying parent window Change-Id: I231bc395d16cc112b4c80252d642861cb8d17b81 --- src/sclcoreui-efl.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 8f0147a..8f3a315 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -679,7 +679,21 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) } } - Evas_Object *window = elm_win_util_standard_add("Option window", "Option window"); + Evas_Object *window, *bg; + + window = elm_win_add(NATIVE_WINDOW_CAST(m_main_window), "Option window", ELM_WIN_BASIC); + if (!window) return NULL; + + elm_win_title_set(window, "Option window"); + bg = elm_bg_add(window); + if (!bg) { + evas_object_del(window); + return NULL; + } + + evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(window, bg); + evas_object_show(bg); #ifndef WAYLAND Evas_Coord win_w = 0, win_h = 0; -- 2.7.4