From a71b27e89df949972ff65bd164bf145d98a9f8e3 Mon Sep 17 00:00:00 2001 From: Wonkeun Oh Date: Fri, 13 Nov 2015 10:41:52 +0900 Subject: [PATCH 01/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 02/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 03/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 04/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 05/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 06/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 07/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 08/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 09/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 10/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 11/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 12/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 13/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 14/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 15/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 16/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