From 190044e078ce1236eb0ead000c3f93772b682fb2 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 5 Jan 2016 11:08:20 +0900 Subject: [PATCH 01/16] Update package version to 0.4.11 Change-Id: If8f49f12ee42f7ac0569d44a88954a97f9944345 --- 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 ca9a999..54cf1dd 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -6,7 +6,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.10 +Version: 0.4.11 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 701236a603b97d9e628d69b1233add257b216806 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 12 Jan 2016 15:45:05 +0900 Subject: [PATCH 02/16] Fix build warning Change-Id: I1c5e0591f7d50230bf316fb300e6aff3bb8f3a38 --- src/sclcoreui-efl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index e8574c8..bde2368 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -384,7 +384,7 @@ static Eina_Bool check_evas_engine(struct WaylandKeyboard *wlkb) { Eina_Bool ret = EINA_FALSE; - char *env = getenv("ECORE_EVAS_ENGINE"); + const char *env = getenv("ECORE_EVAS_ENGINE"); if (!env) { if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_SHM)) @@ -416,7 +416,7 @@ void CSCLCoreUIEFL::run(const sclchar *display) CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { - sclchar *uuid = impl->get_uuid(); + const sclchar *uuid = impl->get_uuid(); if (!uuid) uuid = ""; -- 2.7.4 From fad1e01e4892203d8d3134d7a2d4242317cbdd4c Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 12 Jan 2016 15:46:49 +0900 Subject: [PATCH 03/16] Fix return value of CSCLCoreUIEFL::init() Change-Id: I46a1d4a0ce41c39c82e59e16eb763df080425af1 --- src/sclcoreui-efl.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index bde2368..a200b5c 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -64,8 +64,6 @@ CSCLCoreUIEFL::~CSCLCoreUIEFL() sclboolean CSCLCoreUIEFL::init() { - sclboolean ret = FALSE; - m_initialized = TRUE; m_rotation_degree = -1; @@ -74,7 +72,7 @@ sclboolean CSCLCoreUIEFL::init() m_option_window_info[loop].handler = NULL; } - return ret; + return TRUE; } void CSCLCoreUIEFL::fini() -- 2.7.4 From 95deae137287d802ea6bbd49eee60bf05d29d0f5 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 22 Jan 2016 16:42:14 +0900 Subject: [PATCH 04/16] Initialize member variables in class Change-Id: I8b53e872f2e8735e30c68c3cb92c50f52a1c4f4c --- src/sclcoreui-efl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index a200b5c..9617a3f 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -56,6 +56,9 @@ CSCLCoreUIEFL::CSCLCoreUIEFL() m_initialized = FALSE; m_backend_identifier = "EFL"; + + m_rotation_degree = 0; + m_main_window = SCLWINDOW_INVALID; } CSCLCoreUIEFL::~CSCLCoreUIEFL() -- 2.7.4 From 5befc6e554b7cf3d1b9b4daf503dbfdeebaa0124 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 25 Jan 2016 10:49:47 +0900 Subject: [PATCH 05/16] Update package version to 0.4.12 Change-Id: I10272a88e80e01afbaab182813831dbdc5413e5c --- 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 54cf1dd..b5d38ea 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -6,7 +6,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.11 +Version: 0.4.12 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 5a3813cbe8d7ee4608cde3fe4da07fd506dd3859 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 12 Feb 2016 17:48:43 +0900 Subject: [PATCH 06/16] Constrain the scope of signal handler function Change-Id: I852bd47f807a01d8a438be7c98d85319717d0e99 --- 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 9617a3f..996b741 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -312,7 +312,7 @@ int CSCLCoreUIEFL::get_screen_rotation_degree() return angle; } -void signal_handler(int sig) { +static void signal_handler(int sig) { elm_exit(); } -- 2.7.4 From 4f8747e78328995f1aea7566c30a8c2b551e6181 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 17 Feb 2016 09:49:42 +0900 Subject: [PATCH 07/16] Fix the option window's position issue in rotate mode Change-Id: I90732f5532a5af61eb64869ec78f3b5ca527ebb0 --- src/sclcoreui-efl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 996b741..d303585 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -645,8 +645,7 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) Evas_Object *window = elm_win_util_standard_add("Option window", "Option window"); - elm_win_borderless_set(window, EINA_TRUE); - +#ifndef WAYLAND Evas_Coord win_w = 0, win_h = 0; elm_win_screen_size_get(window, NULL, NULL, &win_w, &win_h); int degree = get_screen_rotation_degree(); @@ -655,6 +654,7 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) } else { evas_object_resize(window, win_w, win_h); } +#endif int rots[] = { 0, 90, 180, 270 }; elm_win_wm_rotation_available_rotations_set(window, rots, (sizeof(rots) / sizeof(int))); -- 2.7.4 From a0246d8d3c030f43d74e99c2430c6b09f53f7182 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 17 Feb 2016 14:25:25 +0900 Subject: [PATCH 08/16] Fix trailing character issue in log Change-Id: I4364afe8f8ace494033c02c4fa597e895109b5d0 --- src/sclconnection-isf.cpp | 3 +-- src/sclcoreui-efl.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index ce77fa8..5d2f74c 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -572,7 +572,7 @@ CSCLConnectionISF::~CSCLConnectionISF() sclboolean CSCLConnectionISF::init() { - LOGD("Enter"); + LOGD("Enter\n"); CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -1024,4 +1024,3 @@ extern "C" } } } - diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index d303585..39a50c3 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -351,7 +351,7 @@ _wayland_setup(struct WaylandKeyboard *wlkb, Evas_Object *main_window) wlkb->ee = ecore_evas_ecore_evas_get(evas_object_evas_get(main_window)); if (!wlkb->ee) { - LOGW("ERROR: Unable to create Ecore_Evas object"); + LOGW("ERROR: Unable to create Ecore_Evas object\n"); return false; } @@ -567,7 +567,7 @@ set_transient_for_app_window(Evas_Object *window) if (data) { if (type_return == XA_WINDOW) { xAppWindow = *(Window *)data; - LOGD("TRANSIENT_FOR SET : %x , %x", xAppWindow, xWindow); + LOGD("TRANSIENT_FOR SET : %x , %x\n", xAppWindow, xWindow); ecore_x_icccm_transient_for_set(xWindow, xAppWindow); } XFree(data); @@ -605,7 +605,7 @@ set_transient_for_isf_setting_window(Evas_Object *window) ecore_x_window_prop_xid_get(xControlWindow, ecore_x_atom_get("ISF Setting window"), ECORE_X_ATOM_WINDOW, &xSettingWindow, 1); - LOGD("TRANSIENT_FOR SET : %x , %x", xSettingWindow, xWindow); + LOGD("TRANSIENT_FOR SET : %x , %x\n", xSettingWindow, xWindow); ecore_x_icccm_transient_for_set(xWindow, xSettingWindow); } XFree(data); @@ -628,7 +628,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"); + LOGW("on_create_option_window() is not available\n"); return SCLWINDOW_INVALID; } } -- 2.7.4 From 7d32fbdebcb8b60e9e2b70f76055bda748f3a3f6 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 17 Feb 2016 16:46:01 +0900 Subject: [PATCH 09/16] Update package version to 0.4.13 Change-Id: Ie673f91ff0ebffce731d4aa4c727f5d9098bd54f --- 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 b5d38ea..45ae01d 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -6,7 +6,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.12 +Version: 0.4.13 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From bf7e174824d517126b8159e26eec09baab82ff10 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 8 Mar 2016 20:54:20 +0900 Subject: [PATCH 10/16] Support executable type of IME Change-Id: Ia7e8a69324e457e11bfd9bf49ece7f86811cc46f --- CMakeLists.txt | 1 + packaging/libscl-core.spec | 1 + src/sclcoreimpl.cpp | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e065ab3..18d7cea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,7 @@ SET(PKGS_CHECK_MODULES isf vconf libscl-common + capi-appfw-application ) IF (with_wayland) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 45ae01d..8f50dde 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -26,6 +26,7 @@ BuildRequires: pkgconfig(ecore-x) BuildRequires: pkgconfig(x11) %endif BuildRequires: pkgconfig(libscl-common) +BuildRequires: pkgconfig(capi-appfw-application) %description diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 66b20a3..84a6935 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -16,6 +16,8 @@ */ #include "sclcoreimpl.h" +#include +#include using namespace scl; @@ -284,6 +286,27 @@ void CSCLCoreImpl::on_run(const sclchar *uuid, const sclchar *display) void CSCLCoreImpl::run() { + m_core_ui.init(); + m_connection.init(); + + if (!m_uuid) { + char *appid = NULL; + app_get_id(&appid); + + LOGD("appid : '%s'\n", appid); + + if (appid) { + m_uuid = strdup(appid); + free(appid); + } + } + + if (!m_display) { + const char *display = getenv("DISPLAY"); + LOGD("display env : '%s'\n", display); + m_display = display ? strdup(display) : strdup(":0"); + } + m_core_ui.run(m_display); m_connection.fini(); -- 2.7.4 From 9987fd786a84130026bdaff935bf670a17b9d2de Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 10 Mar 2016 10:39:10 +0900 Subject: [PATCH 11/16] Remove unused code Change-Id: I9ae56b2f1288d0ec5ea27bdf1e7dc2734fc59ef7 --- src/sclcoreui-efl.cpp | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 39a50c3..c2ea36b 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -50,7 +50,6 @@ struct WaylandKeyboard wlkb = {0}; using namespace scl; - CSCLCoreUIEFL::CSCLCoreUIEFL() { m_initialized = FALSE; @@ -111,36 +110,6 @@ void CSCLCoreUIEFL::set_keyboard_size_hints(SclSize portrait, SclSize landscape) #endif } -const char * extract_themename_from_theme_file_path(const char *filepath) { - static char themename[_POSIX_PATH_MAX] = {0}; - memset(themename, 0x00, sizeof(themename)); - - if (filepath) { - /* There could be more than 1 theme filepath, separated by : */ - char pathstr[_POSIX_PATH_MAX] = {0}; - strncpy(pathstr, filepath, _POSIX_PATH_MAX - 1); - for (int loop = 0;loop < _POSIX_PATH_MAX;loop++) { - if (pathstr[loop] == ':') { - /* FIXME : Let's consider the 1st theme filepath only for now */ - pathstr[loop] = '\0'; - } - } - - if (pathstr[0]) { - const char *filename = ecore_file_file_get(pathstr); - if (filename) { - char *stripname = ecore_file_strip_ext(filename); - if (stripname) { - strncpy(themename, stripname, _POSIX_PATH_MAX - 1); - free(stripname); - } - } - } - } - - return themename; -} - static void language_changed_cb(keynode_t *key, void* data) { char clang[_POSIX_PATH_MAX] = {0}; -- 2.7.4 From e7a366f088fee89c53b9a6110915506931e43d67 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 14 Mar 2016 07:43:33 +0900 Subject: [PATCH 12/16] Add -Werror build option Change-Id: Idc3e06fe2211c79fbc3f84de8df39978a98cb20f --- packaging/libscl-core.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 8f50dde..a6f470c 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -45,8 +45,8 @@ A devel package of libscl-core library that helps developing S/W Keyboard %build -export CFLAGS+=" -DTIZEN_DEBUG_ENABLE" -export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE" +export CFLAGS+=" -DTIZEN_DEBUG_ENABLE -Werror" +export CXXFLAGS+=" -DTIZEN_DEBUG_ENABLE -Werror" export FFLAGS+=" -DTIZEN_DEBUG_ENABLE" rm -rf CMakeFiles -- 2.7.4 From 6559f718bbca9da5588d5880596ab79d07aa4996 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 15 Mar 2016 17:34:03 +0900 Subject: [PATCH 13/16] Update package version to 0.4.14 Change-Id: I9720a3fc5a90193e5f0fa131806121fb5c341455 --- 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 a6f470c..dc29117 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -6,7 +6,7 @@ Name: libscl-core Summary: A library for developing software keyboards -Version: 0.4.13 +Version: 0.4.14 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From e9baabf32b4612127381beba73c9c316a11813c3 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 8 Apr 2016 09:27:52 +0900 Subject: [PATCH 14/16] Use %license to create license file Change-Id: I79271d76be50155c2619a19915f876bc4b8268de --- packaging/libscl-core.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index dc29117..3b02946 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -61,8 +61,6 @@ make %{?jobs:-j%jobs} %install rm -rf %{buildroot} -mkdir -p %{buildroot}/usr/share/license -cp LICENSE %{buildroot}/usr/share/license/%{name} %make_install @@ -76,7 +74,7 @@ cp LICENSE %{buildroot}/usr/share/license/%{name} %manifest %{name}.manifest %defattr(-,root,root,-) %{_libdir}/libscl-core.so -/usr/share/license/%{name} +%license LICENSE %files devel %defattr(-,root,root,-) -- 2.7.4 From 31858d998a762c1985478c2cb4ad345d9b10fc22 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 20 Apr 2016 08:46:12 +0900 Subject: [PATCH 15/16] Add ldconfig in %post and %postun Share library package should call ldconfig in %post and %postun. https://wiki.tizen.org/wiki/Packaging/Guidelines Change-Id: I1f296215ca3fbb7e90ad28a4b340050e63a499ce --- packaging/libscl-core.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/libscl-core.spec b/packaging/libscl-core.spec index 3b02946..f6674d2 100644 --- a/packaging/libscl-core.spec +++ b/packaging/libscl-core.spec @@ -57,7 +57,7 @@ cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -Dwi %else cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} %endif -make %{?jobs:-j%jobs} +make %{?_smp_mflags} %install rm -rf %{buildroot} @@ -66,9 +66,9 @@ rm -rf %{buildroot} -%post +%post -p /sbin/ldconfig -%postun +%postun -p /sbin/ldconfig %files %manifest %{name}.manifest -- 2.7.4 From 4f07df27e4b079bd04b803fdf216747a853e528f Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 25 Apr 2016 16:36:36 +0900 Subject: [PATCH 16/16] Fix indentation Change-Id: I964306dedd066528cbb0f20ea0a4ffd24c083930 --- src/sclconnection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index f12daca..fba5e8f 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -269,15 +269,15 @@ void CSCLConnection::update_geometry(sclint x, sclint y, sclint width, sclint he void CSCLConnection::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const { if (m_impl) { - m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after); - } + m_impl->get_surrounding_text(ic_uuid, maxlen_before, maxlen_after); + } } void CSCLConnection::delete_surrounding_text(sclint offset, sclint len) const { if (m_impl) { - m_impl->delete_surrounding_text(offset, len); - } + m_impl->delete_surrounding_text(offset, len); + } } void CSCLConnection::set_candidate_position(sclint left, sclint top) -- 2.7.4