From 0652c9da66f82fa52464ef1c383629c841b8d72a Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 24 Sep 2015 15:08:33 +0900 Subject: [PATCH 01/16] Add send_private_command() interface Change-Id: I1c4a3d975f99feb471cfca37b711288409a22432 --- src/sclconnection-isf.cpp | 7 +++++++ src/sclconnection-isf.h | 2 +- src/sclconnection.cpp | 7 +++++++ src/sclconnection.h | 2 +- src/sclcore.cpp | 7 +++++++ src/sclcore.h | 2 ++ src/sclcoreimpl.cpp | 5 +++++ src/sclcoreimpl.h | 1 + 8 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index d78ab42..b2eb1bc 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -973,6 +973,13 @@ void CSCLConnectionISF::set_selection(sclint start, sclint end) } } +void CSCLConnectionISF::send_private_command(const sclchar *command) +{ + if (m_initialized) { + m_helper_agent.send_private_command(command); + } +} + extern "C" { void scim_module_init (void) { diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 9a647fe..2000913 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -82,7 +82,7 @@ public: void set_keyboard_ise_by_uuid(const sclchar *uuid); void get_keyboard_ise(const sclchar *uuid); void set_selection(sclint start, sclint end); - + void send_private_command(const char *command); private: sclboolean m_initialized; diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index 1607355..835375b 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -321,3 +321,10 @@ void CSCLConnection::set_selection(sclint start, sclint end) m_impl->set_selection(start, end); } } + +void CSCLConnection::send_private_command(const sclchar *command) +{ + if (m_impl) { + m_impl->send_private_command(command); + } +} diff --git a/src/sclconnection.h b/src/sclconnection.h index a313607..0a27be0 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -82,7 +82,7 @@ public: virtual void set_keyboard_ise_by_uuid(const sclchar *uuid); virtual void get_keyboard_ise(const sclchar *uuid); virtual void set_selection(sclint start, sclint end); - + virtual void send_private_command(const sclchar *command); protected: std::string m_backend_identifier; diff --git a/src/sclcore.cpp b/src/sclcore.cpp index 8ebda48..b8db862 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -322,3 +322,10 @@ void CSCLCore::set_selection(sclint start, sclint end) m_impl->set_selection(start, end); } } + +void CSCLCore::send_private_command(const sclchar *command) +{ + if (m_impl) { + m_impl->send_private_command(command); + } +} diff --git a/src/sclcore.h b/src/sclcore.h index d6fe3d7..9025a99 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -341,6 +341,8 @@ public: */ void set_selection(sclint start, sclint end); + void send_private_command(const sclchar *command); + private: CSCLCoreImpl *m_impl; }; diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 4d19821..8c2deb3 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -319,3 +319,8 @@ void CSCLCoreImpl::set_selection(sclint start, sclint end) { m_connection.set_selection(start, end); } + +void CSCLCoreImpl::send_private_command(const sclchar *command) +{ + m_connection.send_private_command(command); +} diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 8ba540d..094994b 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -100,6 +100,7 @@ public: void destroy_option_window(sclwindow window); void set_selection(sclint start, sclint end); + void send_private_command(const sclchar *command); private: ISCLCoreEventCallback *m_event_callback; -- 2.7.4 From b741cbddaf7399499fc235ffda90d641ec65566b Mon Sep 17 00:00:00 2001 From: "shoum.chen@samsung.com" Date: Fri, 25 Sep 2015 12:02:00 +0800 Subject: [PATCH 02/16] Add candidate string. Change-Id: Ic5d22a369b4e5f983f212bebda57a14db2532dff Signed-off-by: shoum.chen@samsung.com --- src/sclconnection-isf.cpp | 6 ++++++ src/sclcoretypes.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index b2eb1bc..74f7e0a 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -426,6 +426,12 @@ static void slot_update_lookup_table (const scim::HelperAgent *, scim::LookupTab lookup_table.candidate_labels.push_back(scim::utf8_wcstombs(label).c_str()); } + int nCandidateSize = table.get_current_page_size(); + for(int index=0; indexon_update_lookup_table(lookup_table); std::vector labels; diff --git a/src/sclcoretypes.h b/src/sclcoretypes.h index 5243fdc..1ed41e0 100644 --- a/src/sclcoretypes.h +++ b/src/sclcoretypes.h @@ -49,6 +49,7 @@ typedef struct _SclCandidateTable{ sclboolean page_size_fixed; std::vector candidate_labels; + std::vector candidate; } SclCandidateTable; } -- 2.7.4 From 57f011e934303575ee700e6172f5454e2ef763dc Mon Sep 17 00:00:00 2001 From: Sungmin Kwak Date: Tue, 29 Sep 2015 10:52:50 +0900 Subject: [PATCH 03/16] Update package version to 0.4.6 Change-Id: If94e9450b03074fd4100a11f003017a134595fb8 --- 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 d5d972f..3b860d2 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.5 +Version: 0.4.6 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 650298587284b5e5ea59e3d97d29097d2d74da29 Mon Sep 17 00:00:00 2001 From: Haifeng Deng Date: Tue, 29 Sep 2015 10:08:41 +0800 Subject: [PATCH 04/16] Add candidate show/hide interface Change-Id: I6cbc742431416e60016d7b20d6005c40368f450c Signed-off-by: Haifeng Deng --- src/sclconnection-isf.cpp | 22 ++++++++++++++++++++++ src/sclcorecallback.h | 3 +++ 2 files changed, 25 insertions(+) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 74f7e0a..f5857d4 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -514,6 +514,26 @@ static void slot_process_key_event (const scim::HelperAgent *agent, scim::KeyEve } } +static void slot_candidate_show (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + ISCLCoreEventCallback *callback = impl->get_core_event_callback(); + if (callback) { + callback->on_candidate_show(ic, ic_uuid.c_str()); + } + } +} + +static void slot_candidate_hide (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + ISCLCoreEventCallback *callback = impl->get_core_event_callback(); + if (callback) { + callback->on_candidate_hide(ic, ic_uuid.c_str()); + } + } +} + /* Internal input handler function */ Eina_Bool input_handler (void *data, Ecore_Fd_Handler *fd_handler) { @@ -609,6 +629,8 @@ sclboolean CSCLConnectionISF::init() m_helper_agent.signal_connect_show_option_window (scim::slot (slot_show_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)); + m_helper_agent.signal_connect_candidate_hide (scim::slot (slot_candidate_hide)); m_initialized = TRUE; } diff --git a/src/sclcorecallback.h b/src/sclcorecallback.h index b6e2ea6..bf5f35c 100644 --- a/src/sclcorecallback.h +++ b/src/sclcorecallback.h @@ -82,6 +82,9 @@ struct ISCLCoreEventCallback { virtual void on_create_option_window(sclwindow window, SCLOptionWindowType type) {} virtual void on_destroy_option_window(sclwindow window) {} virtual void on_check_option_window_availability(sclboolean *avail) { if (avail) *avail = false;} + + virtual void on_candidate_show(sclint ic, const sclchar *ic_uuid) {} + virtual void on_candidate_hide(sclint ic, const sclchar *ic_uuid) {} }; } -- 2.7.4 From d4c431e562e880439733f0e1726b4f3e1e805729 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 30 Sep 2015 10:43:17 +0900 Subject: [PATCH 05/16] Update package version to 0.4.7 Change-Id: I523b4a6c66c5ae30c5ae787077713abbe27698bc --- 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 3b860d2..2cc587e 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.6 +Version: 0.4.7 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 6d6e6e7ae506030b61cc27d8ef1c505b47e482e5 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 29 Sep 2015 17:04:05 +0900 Subject: [PATCH 06/16] Modify the year of copyright Change-Id: I1f39e5fef558ee3cc4eec747bd9a81a3419167c0 --- NOTICE | 2 +- src/sclconnection-isf.cpp | 2 +- src/sclconnection-isf.h | 2 +- src/sclconnection.cpp | 2 +- src/sclconnection.h | 2 +- src/sclcore.cpp | 2 +- src/sclcore.h | 2 +- src/sclcorecallback.h | 2 +- src/sclcoreimpl.cpp | 2 +- src/sclcoreimpl.h | 2 +- src/sclcoretypes.h | 2 +- src/sclcoreui-efl.cpp | 2 +- src/sclcoreui-efl.h | 2 +- src/sclcoreui.cpp | 2 +- src/sclcoreui.h | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/NOTICE b/NOTICE index fa3678d..6e32ab7 100644 --- a/NOTICE +++ b/NOTICE @@ -1,3 +1,3 @@ -Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved. +Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved. Except as noted, this software is licensed under Apache License, Version 2. Please, see the LICENSE file for Apache License terms and conditions. diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index f5857d4..4d4b0c7 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 2000913..26781a5 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index 835375b..f12daca 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclconnection.h b/src/sclconnection.h index 0a27be0..c6cb71e 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcore.cpp b/src/sclcore.cpp index b8db862..7fa21c2 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcore.h b/src/sclcore.h index 9025a99..6119381 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcorecallback.h b/src/sclcorecallback.h index bf5f35c..5a4771a 100644 --- a/src/sclcorecallback.h +++ b/src/sclcorecallback.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 8c2deb3..028e279 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 094994b..40d774a 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoretypes.h b/src/sclcoretypes.h index 1ed41e0..7478159 100644 --- a/src/sclcoretypes.h +++ b/src/sclcoretypes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index cd75b88..bd1b0d2 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoreui-efl.h b/src/sclcoreui-efl.h index 5787230..a2e5c4b 100644 --- a/src/sclcoreui-efl.h +++ b/src/sclcoreui-efl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoreui.cpp b/src/sclcoreui.cpp index e856f1b..bea68f1 100644 --- a/src/sclcoreui.cpp +++ b/src/sclcoreui.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. diff --git a/src/sclcoreui.h b/src/sclcoreui.h index 76d7998..d836417 100644 --- a/src/sclcoreui.h +++ b/src/sclcoreui.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 - 2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2014 - 2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. -- 2.7.4 From e8d8d0eacceb6ea39d2a5df661f4af7a623f12e5 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 6 Oct 2015 20:04:56 +0900 Subject: [PATCH 07/16] Support rotation in wayland environment Change-Id: I7cb29e28c7631cf8178147fa45037ab6137e8266 --- src/sclcoreui-efl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index bd1b0d2..81538d8 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -96,7 +96,10 @@ void CSCLCoreUIEFL::set_keyboard_size_hints(SclSize portrait, SclSize landscape) Evas_Object *main_window = NATIVE_WINDOW_CAST(m_main_window); #ifdef WAYLAND - evas_object_resize(main_window, portrait.width, portrait.height); + ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 0, 0, 0, portrait.width, portrait.height); + ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 90, 0, 0, landscape.height, landscape.width); + ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 180, 0, 0, portrait.width, portrait.height); + ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 270, 0, 0, landscape.height, landscape.width); #else ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 0, 0, 0, portrait.width, portrait.height); ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 90, 0, 0, landscape.height, landscape.width); -- 2.7.4 From 8c9a39c9e6c76ac796c246618f9bffb2d51943e6 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Wed, 7 Oct 2015 15:25:09 +0900 Subject: [PATCH 08/16] Update package version to 0.4.8 Change-Id: I940ebcb289e29f2173b9fca3291afb387e6c8586 --- 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 2cc587e..b78d96d 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.7 +Version: 0.4.8 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 7925ee28698a9215d2f76fa9448b0451afb01997 Mon Sep 17 00:00:00 2001 From: Wonkeun Oh Date: Thu, 12 Nov 2015 17:19:16 +0900 Subject: [PATCH 09/16] Fixed the tts error Added static keyword to prevent wrong access by callback Change-Id: I138935b0edc4935511bad9b908d2b0cc6c10f436 --- 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 81538d8..756ba02 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -157,7 +157,7 @@ void language_changed_cb(keynode_t *key, void* data) } } -void accessibility_changed_cb(keynode_t *key, void* data) +static void accessibility_changed_cb(keynode_t *key, void* data) { int vconf_value = 0; if (vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, &vconf_value) == 0) { -- 2.7.4 From a71b27e89df949972ff65bd164bf145d98a9f8e3 Mon Sep 17 00:00:00 2001 From: Wonkeun Oh Date: Fri, 13 Nov 2015 10:41:52 +0900 Subject: [PATCH 10/16] Update package version to 0.4.9 Change-Id: I9ac8deb17015512fc532311d08e74e0b0278c63a --- 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 b78d96d..5c1afc2 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.8 +Version: 0.4.9 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 3b897aa33448cab19bcb8cd6374b80a0c4467b7f Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 19 Nov 2015 18:41:09 +0900 Subject: [PATCH 11/16] Fix build error in X11 environment temporarily Change-Id: I3e8ba8f1f50538f19a6166fe53836fc4477868ba --- src/sclcoreui-efl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 756ba02..7166206 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -101,10 +101,12 @@ void CSCLCoreUIEFL::set_keyboard_size_hints(SclSize portrait, SclSize landscape) ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 180, 0, 0, portrait.width, portrait.height); ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 270, 0, 0, landscape.height, landscape.width); #else + /* ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 0, 0, 0, portrait.width, portrait.height); ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 90, 0, 0, landscape.height, landscape.width); ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 180, 0, 0, portrait.width, portrait.height); ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 270, 0, 0, landscape.height, landscape.width); + */ #endif } -- 2.7.4 From 9ccabba201de75c08d85b509cc53c6ad0e08450a Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 19 Nov 2015 18:42:18 +0900 Subject: [PATCH 12/16] Update package version to 0.4.10 Change-Id: Ieb5c57ec1af11a2bdeed92351809c6d359b3f173 --- 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 5c1afc2..ca9a999 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.9 +Version: 0.4.10 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 76eab1f38dfd12af42d9230981c77522db77d5d3 Mon Sep 17 00:00:00 2001 From: inhonghan Date: Tue, 29 Dec 2015 17:18:31 +0900 Subject: [PATCH 13/16] Fix Indentation Change-Id: If8011bfcb0a0e5e305daf500a462afb71d1f33c8 --- src/sclconnection-isf.cpp | 204 +++++++++++++++++++++++----------------------- src/sclcoreimpl.cpp | 4 +- src/sclcoretypes.h | 2 +- src/sclcoreui-efl.cpp | 46 +++++------ 4 files changed, 128 insertions(+), 128 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 4d4b0c7..ce77fa8 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -22,10 +22,10 @@ using namespace scl; -static scim::ConfigPointer _scim_config (0); +static scim::ConfigPointer _scim_config(0); /* Slot functions for calling appropriate callback functions */ -static void slot_exit (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_exit(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -37,10 +37,10 @@ static void slot_exit (const scim::HelperAgent *agent, int ic, const scim::Strin agent->update_ise_exit(); } } - elm_exit (); + elm_exit(); } -static void slot_attach_input_context (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_attach_input_context(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -50,7 +50,7 @@ static void slot_attach_input_context (const scim::HelperAgent *agent, int ic, c } } -static void slot_detach_input_context (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_detach_input_context(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -60,7 +60,7 @@ static void slot_detach_input_context (const scim::HelperAgent *agent, int ic, c } } -static void slot_reload_config (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_reload_config(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -70,7 +70,7 @@ static void slot_reload_config (const scim::HelperAgent *agent, int ic, const sc } } -static void slot_update_screen (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int screen_number) { +static void slot_update_screen(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int screen_number) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -80,7 +80,7 @@ static void slot_update_screen (const scim::HelperAgent *agent, int ic, const sc } } -static void slot_update_spot_location (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int x, int y) { +static void slot_update_spot_location(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int x, int y) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -90,7 +90,7 @@ static void slot_update_spot_location (const scim::HelperAgent *agent, int ic, c } } -static void slot_update_cursor_position (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int cursor_pos) { +static void slot_update_cursor_position(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, int cursor_pos) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -100,7 +100,7 @@ static void slot_update_cursor_position (const scim::HelperAgent *agent, int ic, } } -static void slot_update_surrounding_text (const scim::HelperAgent *agent, int ic, const scim::String &text, int cursor) { +static void slot_update_surrounding_text(const scim::HelperAgent *agent, int ic, const scim::String &text, int cursor) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -110,7 +110,7 @@ static void slot_update_surrounding_text (const scim::HelperAgent *agent, int ic } } -static void slot_trigger_property (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, const scim::String &property) { +static void slot_trigger_property(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid, const scim::String &property) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -120,7 +120,7 @@ static void slot_trigger_property (const scim::HelperAgent *agent, int ic, const } } -static void slot_focus_out (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_focus_out(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -130,7 +130,7 @@ static void slot_focus_out (const scim::HelperAgent *agent, int ic, const scim:: } } -static void slot_focus_in (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_focus_in(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -140,7 +140,7 @@ static void slot_focus_in (const scim::HelperAgent *agent, int ic, const scim::S } } -static void slot_ise_show (const scim::HelperAgent *agent, int ic, char *buf, size_t &len) { +static void slot_ise_show(const scim::HelperAgent *agent, int ic, char *buf, size_t &len) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { /* Make sure the appropriate keyboard ise was selected -> is this really necessary? */ @@ -166,7 +166,7 @@ static void slot_ise_show (const scim::HelperAgent *agent, int ic, char *buf, si } } -static void slot_ise_hide (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_ise_hide(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -176,7 +176,7 @@ static void slot_ise_hide (const scim::HelperAgent *agent, int ic, const scim::S } } -static void slot_get_geometry (const scim::HelperAgent *agent, struct scim::rectinfo &info) { +static void slot_get_geometry(const scim::HelperAgent *agent, struct scim::rectinfo &info) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -186,7 +186,7 @@ static void slot_get_geometry (const scim::HelperAgent *agent, struct scim::rect } } -static void slot_set_mode (const scim::HelperAgent *agent, scim::uint32 &mode) { +static void slot_set_mode(const scim::HelperAgent *agent, scim::uint32 &mode) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -196,7 +196,7 @@ static void slot_set_mode (const scim::HelperAgent *agent, scim::uint32 &mode) { } } -static void slot_set_language (const scim::HelperAgent *agent, scim::uint32 &language) { +static void slot_set_language(const scim::HelperAgent *agent, scim::uint32 &language) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -206,7 +206,7 @@ static void slot_set_language (const scim::HelperAgent *agent, scim::uint32 &lan } } -static void slot_set_imdata (const scim::HelperAgent *agent, char *buf, size_t &len) { +static void slot_set_imdata(const scim::HelperAgent *agent, char *buf, size_t &len) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -217,7 +217,7 @@ static void slot_set_imdata (const scim::HelperAgent *agent, char *buf, size_t & } } -static void slot_get_imdata (const scim::HelperAgent *, char **buf, size_t &len) { +static void slot_get_imdata(const scim::HelperAgent *, char **buf, size_t &len) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -229,7 +229,7 @@ static void slot_get_imdata (const scim::HelperAgent *, char **buf, size_t &len) } } -static void slot_get_language_locale (const scim::HelperAgent *, int ic, char **locale) { +static void slot_get_language_locale(const scim::HelperAgent *, int ic, char **locale) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -239,7 +239,7 @@ static void slot_get_language_locale (const scim::HelperAgent *, int ic, char ** } } -static void slot_set_return_key_type (const scim::HelperAgent *agent, scim::uint32 &type) { +static void slot_set_return_key_type(const scim::HelperAgent *agent, scim::uint32 &type) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -249,7 +249,7 @@ static void slot_set_return_key_type (const scim::HelperAgent *agent, scim::uint } } -static void slot_get_return_key_type (const scim::HelperAgent *agent, scim::uint32 &type) { +static void slot_get_return_key_type(const scim::HelperAgent *agent, scim::uint32 &type) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -259,7 +259,7 @@ static void slot_get_return_key_type (const scim::HelperAgent *agent, scim::uint } } -static void slot_set_return_key_disable (const scim::HelperAgent *agent, scim::uint32 &disabled) { +static void slot_set_return_key_disable(const scim::HelperAgent *agent, scim::uint32 &disabled) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -269,7 +269,7 @@ static void slot_set_return_key_disable (const scim::HelperAgent *agent, scim::u } } -static void slot_get_return_key_disable (const scim::HelperAgent *agent, scim::uint32 &disabled) { +static void slot_get_return_key_disable(const scim::HelperAgent *agent, scim::uint32 &disabled) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -279,7 +279,7 @@ static void slot_get_return_key_disable (const scim::HelperAgent *agent, scim::u } } -static void slot_set_layout (const scim::HelperAgent *agent, scim::uint32 &layout) { +static void slot_set_layout(const scim::HelperAgent *agent, scim::uint32 &layout) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -289,7 +289,7 @@ static void slot_set_layout (const scim::HelperAgent *agent, scim::uint32 &layou } } -static void slot_get_layout (const scim::HelperAgent *agent, scim::uint32 &layout) { +static void slot_get_layout(const scim::HelperAgent *agent, scim::uint32 &layout) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -299,7 +299,7 @@ static void slot_get_layout (const scim::HelperAgent *agent, scim::uint32 &layou } } -static void slot_set_caps_mode (const scim::HelperAgent *agent, scim::uint32 &mode) { +static void slot_set_caps_mode(const scim::HelperAgent *agent, scim::uint32 &mode) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -309,7 +309,7 @@ static void slot_set_caps_mode (const scim::HelperAgent *agent, scim::uint32 &mo } } -static void slot_reset_input_context (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_reset_input_context(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -319,7 +319,7 @@ static void slot_reset_input_context (const scim::HelperAgent *agent, int ic, co } } -static void slot_update_candidate_geometry (const scim::HelperAgent *agent, int ic, const scim::String &uuid, const scim::rectinfo &info) { +static void slot_update_candidate_geometry(const scim::HelperAgent *agent, int ic, const scim::String &uuid, const scim::rectinfo &info) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -328,7 +328,7 @@ static void slot_update_candidate_geometry (const scim::HelperAgent *agent, int } } } -static void slot_update_keyboard_ise (const scim::HelperAgent *agent, int ic, const scim::String &uuid, +static void slot_update_keyboard_ise(const scim::HelperAgent *agent, int ic, const scim::String &uuid, const scim::String &ise_name, const scim::String &ise_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -339,7 +339,7 @@ static void slot_update_keyboard_ise (const scim::HelperAgent *agent, int ic, co } } -static void slot_candidate_more_window_show (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_candidate_more_window_show(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -349,7 +349,7 @@ static void slot_candidate_more_window_show (const scim::HelperAgent *agent, int } } -static void slot_candidate_more_window_hide (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_candidate_more_window_hide(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -359,7 +359,7 @@ static void slot_candidate_more_window_hide (const scim::HelperAgent *agent, int } } -static void slot_select_aux (const scim::HelperAgent *agent, int ic, const scim::String &uuid, int index) { +static void slot_select_aux(const scim::HelperAgent *agent, int ic, const scim::String &uuid, int index) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -369,7 +369,7 @@ static void slot_select_aux (const scim::HelperAgent *agent, int ic, const scim: } } -static void slot_select_candidate (const scim::HelperAgent *agent, int ic, const scim::String &uuid, int index) { +static void slot_select_candidate(const scim::HelperAgent *agent, int ic, const scim::String &uuid, int index) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -379,7 +379,7 @@ static void slot_select_candidate (const scim::HelperAgent *agent, int ic, const } } -static void slot_candidate_table_page_up (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_candidate_table_page_up(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -389,7 +389,7 @@ static void slot_candidate_table_page_up (const scim::HelperAgent *agent, int ic } } -static void slot_candidate_table_page_down (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_candidate_table_page_down(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -399,7 +399,7 @@ static void slot_candidate_table_page_down (const scim::HelperAgent *agent, int } } -static void slot_update_candidate_table_page_size (const scim::HelperAgent *, int ic, const scim::String &uuid, int page_size) { +static void slot_update_candidate_table_page_size(const scim::HelperAgent *, int ic, const scim::String &uuid, int page_size) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -409,7 +409,7 @@ static void slot_update_candidate_table_page_size (const scim::HelperAgent *, in } } -static void slot_update_lookup_table (const scim::HelperAgent *, scim::LookupTable &table) { +static void slot_update_lookup_table(const scim::HelperAgent *, scim::LookupTable &table) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -427,7 +427,7 @@ static void slot_update_lookup_table (const scim::HelperAgent *, scim::LookupTab } int nCandidateSize = table.get_current_page_size(); - for(int index=0; indexget_core_event_callback(); @@ -453,7 +453,7 @@ static void slot_select_associate (const scim::HelperAgent *agent, int ic, const } } -static void slot_associate_table_page_up (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_associate_table_page_up(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -463,7 +463,7 @@ static void slot_associate_table_page_up (const scim::HelperAgent *agent, int ic } } -static void slot_associate_table_page_down (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_associate_table_page_down(const scim::HelperAgent *agent, int ic, const scim::String &uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -473,7 +473,7 @@ static void slot_associate_table_page_down (const scim::HelperAgent *agent, int } } -static void slot_update_associate_table_page_size (const scim::HelperAgent *, int ic, const scim::String &uuid, int page_size) { +static void slot_update_associate_table_page_size(const scim::HelperAgent *, int ic, const scim::String &uuid, int page_size) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -483,7 +483,7 @@ static void slot_update_associate_table_page_size (const scim::HelperAgent *, in } } -static void slot_show_ise_option_window (const scim::HelperAgent *agent, int ic, const scim::String &uuid) { +static void slot_show_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(); @@ -494,7 +494,7 @@ static void slot_show_ise_option_window (const scim::HelperAgent *agent, int ic, } } -static void slot_check_ise_option_window (const scim::HelperAgent *agent, sclu32 &avail) { +static void slot_check_ise_option_window(const scim::HelperAgent *agent, sclu32 &avail) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -504,17 +504,17 @@ 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) { +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); + callback->on_process_key_event(key, &ret); } } } -static void slot_candidate_show (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_candidate_show(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -524,7 +524,7 @@ static void slot_candidate_show (const scim::HelperAgent *agent, int ic, const s } } -static void slot_candidate_hide (const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { +static void slot_candidate_hide(const scim::HelperAgent *agent, int ic, const scim::String &ic_uuid) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { ISCLCoreEventCallback *callback = impl->get_core_event_callback(); @@ -535,7 +535,7 @@ static void slot_candidate_hide (const scim::HelperAgent *agent, int ic, const s } /* Internal input handler function */ -Eina_Bool input_handler (void *data, Ecore_Fd_Handler *fd_handler) +Eina_Bool input_handler(void *data, Ecore_Fd_Handler *fd_handler) { CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -572,7 +572,7 @@ CSCLConnectionISF::~CSCLConnectionISF() sclboolean CSCLConnectionISF::init() { - LOGD ("Enter"); + LOGD("Enter"); CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -583,54 +583,54 @@ sclboolean CSCLConnectionISF::init() } if (!m_initialized) { - m_helper_agent.signal_connect_exit (scim::slot (slot_exit)); - m_helper_agent.signal_connect_attach_input_context (scim::slot (slot_attach_input_context)); - m_helper_agent.signal_connect_detach_input_context (scim::slot (slot_detach_input_context)); - m_helper_agent.signal_connect_reload_config (scim::slot (slot_reload_config)); - m_helper_agent.signal_connect_update_screen (scim::slot (slot_update_screen)); - m_helper_agent.signal_connect_update_spot_location (scim::slot (slot_update_spot_location)); - m_helper_agent.signal_connect_update_cursor_position (scim::slot (slot_update_cursor_position)); - m_helper_agent.signal_connect_update_surrounding_text (scim::slot (slot_update_surrounding_text)); - m_helper_agent.signal_connect_trigger_property (scim::slot (slot_trigger_property)); + m_helper_agent.signal_connect_exit(scim::slot(slot_exit)); + m_helper_agent.signal_connect_attach_input_context(scim::slot(slot_attach_input_context)); + m_helper_agent.signal_connect_detach_input_context(scim::slot(slot_detach_input_context)); + m_helper_agent.signal_connect_reload_config(scim::slot(slot_reload_config)); + m_helper_agent.signal_connect_update_screen(scim::slot(slot_update_screen)); + m_helper_agent.signal_connect_update_spot_location(scim::slot(slot_update_spot_location)); + m_helper_agent.signal_connect_update_cursor_position(scim::slot(slot_update_cursor_position)); + m_helper_agent.signal_connect_update_surrounding_text(scim::slot(slot_update_surrounding_text)); + m_helper_agent.signal_connect_trigger_property(scim::slot(slot_trigger_property)); //m_helper_agent.signal_connect_process_imengine_event (slot (slot_process_imengine_event)); - m_helper_agent.signal_connect_focus_out (scim::slot (slot_focus_out)); - m_helper_agent.signal_connect_focus_in (scim::slot (slot_focus_in)); - m_helper_agent.signal_connect_ise_show (scim::slot (slot_ise_show)); - m_helper_agent.signal_connect_ise_hide (scim::slot (slot_ise_hide)); - m_helper_agent.signal_connect_get_geometry (scim::slot (slot_get_geometry)); - m_helper_agent.signal_connect_set_mode (scim::slot (slot_set_mode)); - m_helper_agent.signal_connect_set_language (scim::slot (slot_set_language)); - m_helper_agent.signal_connect_set_imdata (scim::slot (slot_set_imdata)); - m_helper_agent.signal_connect_get_imdata (scim::slot (slot_get_imdata)); - m_helper_agent.signal_connect_get_language_locale (scim::slot (slot_get_language_locale)); - m_helper_agent.signal_connect_set_return_key_type (scim::slot (slot_set_return_key_type)); - m_helper_agent.signal_connect_get_return_key_type (scim::slot (slot_get_return_key_type)); - m_helper_agent.signal_connect_set_return_key_disable (scim::slot (slot_set_return_key_disable)); - m_helper_agent.signal_connect_get_return_key_disable (scim::slot (slot_get_return_key_disable)); - m_helper_agent.signal_connect_get_layout (scim::slot (slot_get_layout)); - m_helper_agent.signal_connect_set_layout (scim::slot (slot_set_layout)); - m_helper_agent.signal_connect_set_caps_mode (scim::slot (slot_set_caps_mode)); - m_helper_agent.signal_connect_reset_input_context (scim::slot (slot_reset_input_context)); - m_helper_agent.signal_connect_update_candidate_geometry (scim::slot (slot_update_candidate_geometry)); - m_helper_agent.signal_connect_update_keyboard_ise (scim::slot (slot_update_keyboard_ise)); + m_helper_agent.signal_connect_focus_out(scim::slot(slot_focus_out)); + m_helper_agent.signal_connect_focus_in(scim::slot(slot_focus_in)); + m_helper_agent.signal_connect_ise_show(scim::slot(slot_ise_show)); + m_helper_agent.signal_connect_ise_hide(scim::slot(slot_ise_hide)); + m_helper_agent.signal_connect_get_geometry(scim::slot(slot_get_geometry)); + m_helper_agent.signal_connect_set_mode(scim::slot(slot_set_mode)); + m_helper_agent.signal_connect_set_language(scim::slot(slot_set_language)); + m_helper_agent.signal_connect_set_imdata(scim::slot(slot_set_imdata)); + m_helper_agent.signal_connect_get_imdata(scim::slot(slot_get_imdata)); + m_helper_agent.signal_connect_get_language_locale(scim::slot(slot_get_language_locale)); + m_helper_agent.signal_connect_set_return_key_type(scim::slot(slot_set_return_key_type)); + m_helper_agent.signal_connect_get_return_key_type(scim::slot(slot_get_return_key_type)); + m_helper_agent.signal_connect_set_return_key_disable(scim::slot(slot_set_return_key_disable)); + m_helper_agent.signal_connect_get_return_key_disable(scim::slot(slot_get_return_key_disable)); + m_helper_agent.signal_connect_get_layout(scim::slot(slot_get_layout)); + m_helper_agent.signal_connect_set_layout(scim::slot(slot_set_layout)); + m_helper_agent.signal_connect_set_caps_mode(scim::slot(slot_set_caps_mode)); + m_helper_agent.signal_connect_reset_input_context(scim::slot(slot_reset_input_context)); + m_helper_agent.signal_connect_update_candidate_geometry(scim::slot(slot_update_candidate_geometry)); + m_helper_agent.signal_connect_update_keyboard_ise(scim::slot(slot_update_keyboard_ise)); //m_helper_agent.signal_connect_update_keyboard_ise_list (slot (slot_update_keyboard_ise_list)); - m_helper_agent.signal_connect_candidate_more_window_show (scim::slot (slot_candidate_more_window_show)); - m_helper_agent.signal_connect_candidate_more_window_hide (scim::slot (slot_candidate_more_window_hide)); - m_helper_agent.signal_connect_select_aux (scim::slot (slot_select_aux)); - m_helper_agent.signal_connect_select_candidate (scim::slot (slot_select_candidate)); - m_helper_agent.signal_connect_candidate_table_page_up (scim::slot (slot_candidate_table_page_up)); - m_helper_agent.signal_connect_candidate_table_page_down (scim::slot (slot_candidate_table_page_down)); - m_helper_agent.signal_connect_update_candidate_table_page_size (scim::slot (slot_update_candidate_table_page_size)); - m_helper_agent.signal_connect_update_lookup_table (scim::slot (slot_update_lookup_table)); - m_helper_agent.signal_connect_select_associate (scim::slot (slot_select_associate)); - m_helper_agent.signal_connect_associate_table_page_up (scim::slot (slot_associate_table_page_up)); - 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_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)); - m_helper_agent.signal_connect_candidate_hide (scim::slot (slot_candidate_hide)); + m_helper_agent.signal_connect_candidate_more_window_show(scim::slot(slot_candidate_more_window_show)); + m_helper_agent.signal_connect_candidate_more_window_hide(scim::slot(slot_candidate_more_window_hide)); + m_helper_agent.signal_connect_select_aux(scim::slot(slot_select_aux)); + m_helper_agent.signal_connect_select_candidate(scim::slot(slot_select_candidate)); + m_helper_agent.signal_connect_candidate_table_page_up(scim::slot(slot_candidate_table_page_up)); + m_helper_agent.signal_connect_candidate_table_page_down(scim::slot(slot_candidate_table_page_down)); + m_helper_agent.signal_connect_update_candidate_table_page_size(scim::slot(slot_update_candidate_table_page_size)); + m_helper_agent.signal_connect_update_lookup_table(scim::slot(slot_update_lookup_table)); + m_helper_agent.signal_connect_select_associate(scim::slot(slot_select_associate)); + m_helper_agent.signal_connect_associate_table_page_up(scim::slot(slot_associate_table_page_up)); + 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_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)); + m_helper_agent.signal_connect_candidate_hide(scim::slot(slot_candidate_hide)); m_initialized = TRUE; } @@ -759,7 +759,7 @@ void CSCLConnectionISF::send_imengine_event(sclint ic, const sclchar *ic_uuid, c } scim::Transaction trans; trans.put_command(command); - trans.put_data (value); + trans.put_data(value); m_helper_agent.send_imengine_event(ic, uuid, trans); } } @@ -1010,13 +1010,13 @@ void CSCLConnectionISF::send_private_command(const sclchar *command) extern "C" { - void scim_module_init (void) { + void scim_module_init(void) { } - void scim_module_exit (void) { + void scim_module_exit(void) { } - void scim_helper_module_run_helper (const scim::String &uuid, const scim::ConfigPointer &config, const scim::String &display) { + void scim_helper_module_run_helper(const scim::String &uuid, const scim::ConfigPointer &config, const scim::String &display) { _scim_config = config; CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index 028e279..66b20a3 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -266,13 +266,13 @@ void CSCLCoreImpl::on_run(const sclchar *uuid, const sclchar *display) m_connection.init(); if (m_uuid) { - free (m_uuid); + free(m_uuid); } m_uuid = strdup(uuid); if (m_display) { - free (m_display); + free(m_display); } m_display = strdup(display); diff --git a/src/sclcoretypes.h b/src/sclcoretypes.h index 7478159..35fc5ae 100644 --- a/src/sclcoretypes.h +++ b/src/sclcoretypes.h @@ -41,7 +41,7 @@ typedef enum _SCLOptionWindowType OPTION_WINDOW_TYPE_MAX, } SCLOptionWindowType; -typedef struct _SclCandidateTable{ +typedef struct _SclCandidateTable { sclint page_size; sclint current_page_start; sclint cursor_pos; diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index 7166206..cff0c88 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -118,7 +118,7 @@ const char * extract_themename_from_theme_file_path(const char *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++) { + 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'; @@ -145,10 +145,10 @@ void language_changed_cb(keynode_t *key, void* data) char clang[_POSIX_PATH_MAX] = {0}; char *vconf_str = vconf_get_str(VCONFKEY_LANGSET); if (vconf_str) { - snprintf(clang, sizeof(clang), "%s",vconf_str); + snprintf(clang, sizeof(clang), "%s", vconf_str); free(vconf_str); } - LOGD("current language is %s\n",clang); + LOGD("current language is %s\n", clang); CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); if (impl) { @@ -317,39 +317,39 @@ _wayland_setup(struct WaylandKeyboard *wlkb, Evas_Object *main_window) } if (!wlkb->ip) { - LOGW ("Can't get wayland input panel interface\n"); + LOGW("Can't get wayland input panel interface\n"); return false; } if (!wlkb->output) { - LOGW ("Can't get wayland output interface\n"); + LOGW("Can't get wayland output interface\n"); return false; } 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"); return false; } /* Set input panel surface */ - LOGD ("Setting up input panel\n"); + LOGD("Setting up input panel\n"); wlkb->wl_win = ecore_evas_wayland_window_get(wlkb->ee); if (!wlkb->wl_win) { - LOGW ("Couldn't get wayland window\n"); + LOGW("Couldn't get wayland window\n"); return false; } ecore_wl_window_type_set(wlkb->wl_win, ECORE_WL_WINDOW_TYPE_NONE); wlkb->surface = ecore_wl_window_surface_create(wlkb->wl_win); if (!wlkb->surface) { - LOGW ("Couldn't create surface\n"); + LOGW("Couldn't create surface\n"); return false; } ips = wl_input_panel_get_input_panel_surface(wlkb->ip, wlkb->surface); if (!ips) { - LOGW ("Couldn't get input panel surface\n"); + LOGW("Couldn't get input panel surface\n"); return false; } @@ -370,12 +370,12 @@ check_evas_engine(struct WaylandKeyboard *wlkb) else if (ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_WAYLAND_EGL)) env = "wayland_egl"; else { - LOGW ("ERROR: Ecore_Evas does must be compiled with support for Wayland engines\n"); + LOGW("ERROR: Ecore_Evas does must be compiled with support for Wayland engines\n"); goto err; } } else if (strcmp(env, "wayland_shm") != 0 && strcmp(env, "wayland_egl") != 0) { - LOGW ("ERROR: ECORE_EVAS_ENGINE must be set to either 'wayland_shm' or 'wayland_egl'\n"); + LOGW("ERROR: ECORE_EVAS_ENGINE must be set to either 'wayland_shm' or 'wayland_egl'\n"); goto err; } @@ -398,20 +398,20 @@ void CSCLCoreUIEFL::run(const sclchar *display) if (!uuid) uuid = ""; - argv [0] = const_cast (uuid); - argv [1] = (char *)"--display"; - argv [2] = const_cast (display); - argv [3] = 0; + 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 (); + LOGW("_wlkb_check_evas_engine error!\n"); + elm_shutdown(); return; } - LOGD ("Selected engine: '%s'\n", wlkb.ee_engine); + LOGD("Selected engine: '%s'\n", wlkb.ee_engine); #endif elm_config_accel_preference_set("3d"); @@ -427,7 +427,7 @@ void CSCLCoreUIEFL::run(const sclchar *display) #ifdef WAYLAND if (!_wayland_setup(&wlkb, main_window)) { - LOGW ("ERROR: Unable to setup input panel.\n"); + LOGW("ERROR: Unable to setup input panel.\n"); elm_shutdown(); return; } @@ -623,11 +623,11 @@ sclwindow CSCLCoreUIEFL::create_option_window(SCLOptionWindowType type) elm_win_borderless_set(window, EINA_TRUE); Evas_Coord win_w = 0, win_h = 0; - elm_win_screen_size_get (window, NULL, NULL, &win_w, &win_h); + elm_win_screen_size_get(window, NULL, NULL, &win_w, &win_h); int degree = get_screen_rotation_degree(); - if(degree == 90 || degree == 270){ + if (degree == 90 || degree == 270) { evas_object_resize(window, win_h, win_w); - }else{ + } else { evas_object_resize(window, win_w, win_h); } -- 2.7.4 From 4ab62edd3511aca5a4ad0781507c045f66f1d134 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 5 Jan 2016 10:42:06 +0900 Subject: [PATCH 14/16] Support IME rotation in wayland environment Change-Id: Ie529c0356458bb50e103de075337ae9ad6908931 --- src/sclcoreui-efl.cpp | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index cff0c88..e8574c8 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -140,7 +140,7 @@ const char * extract_themename_from_theme_file_path(const char *filepath) { return themename; } -void language_changed_cb(keynode_t *key, void* data) +static void language_changed_cb(keynode_t *key, void* data) { char clang[_POSIX_PATH_MAX] = {0}; char *vconf_str = vconf_get_str(VCONFKEY_LANGSET); @@ -175,7 +175,27 @@ static void accessibility_changed_cb(keynode_t *key, void* data) } } -#ifndef WAYLAND +#ifdef WAYLAND +static void win_rotation_changed_cb(void *data, Evas_Object *obj, void *event) +{ + int degree = elm_win_rotation_get(obj); + LOGD("rotation angle : %d\n", degree); + + ISCLCoreEventCallback *callback = NULL; + CSCLCoreImpl *impl = CSCLCoreImpl::get_instance(); + if (impl) { + callback = impl->get_core_event_callback(); + } + + CSCLCoreUIEFL *coreui = static_cast(data); + if (coreui) { + coreui->set_screen_rotation_degree(degree); + } + if (callback) { + callback->on_set_rotation_degree(degree); + } +} +#else static Eina_Bool _client_message_cb(void *data, int type, void *event) { Ecore_X_Event_Client_Message *ev = (Ecore_X_Event_Client_Message *)event; @@ -234,7 +254,9 @@ int CSCLCoreUIEFL::get_screen_rotation_degree() { int angle = 0; -#ifndef WAYLAND +#ifdef WAYLAND + angle = elm_win_rotation_get(NATIVE_WINDOW_CAST(m_main_window)); +#else if (m_rotation_degree == -1) { int ret = 0; Atom type_return; @@ -459,7 +481,9 @@ void CSCLCoreUIEFL::run(const sclchar *display) impl->init(display); -#ifndef WAYLAND +#ifdef WAYLAND + evas_object_smart_callback_add(main_window, "wm,rotation,changed", win_rotation_changed_cb, this); +#else Ecore_Event_Handler *XClientMsgHandler = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _client_message_cb, this); #endif -- 2.7.4 From 190044e078ce1236eb0ead000c3f93772b682fb2 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 5 Jan 2016 11:08:20 +0900 Subject: [PATCH 15/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 16/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