From 4e6adad8ce02021e87f583acf5e5eeea8c8a8868 Mon Sep 17 00:00:00 2001 From: Haifeng Deng Date: Fri, 7 Aug 2015 15:56:38 +0800 Subject: [PATCH 01/16] Add config_flush () Change-Id: Iba55c303b1e459ac2c374fb20d06c69b32409b6e Signed-off-by: Haifeng Deng --- src/sclconnection-isf.cpp | 15 +++++++++++++++ src/sclconnection-isf.h | 1 + src/sclconnection.cpp | 9 +++++++++ src/sclconnection.h | 1 + src/sclcore.cpp | 9 +++++++++ src/sclcore.h | 5 +++++ src/sclcoreimpl.cpp | 5 +++++ src/sclcoreimpl.h | 1 + 8 files changed, 46 insertions(+) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index a35abb2..96514eb 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -667,6 +667,7 @@ sclboolean CSCLConnectionISF::config_read_int(const sclchar *name, sclint &value sclboolean ret = FALSE; if (m_initialized && _scim_config) { value = _scim_config->read(name, value); + ret = TRUE; } return ret; } @@ -676,6 +677,7 @@ sclboolean CSCLConnectionISF::config_read_string(const sclchar *name, std::strin sclboolean ret = FALSE; if (m_initialized && _scim_config) { value = _scim_config->read(name, value); + ret = TRUE; } return ret; } @@ -685,6 +687,7 @@ sclboolean CSCLConnectionISF::config_write_int(const sclchar *name, sclint value sclboolean ret = FALSE; if (m_initialized && _scim_config) { _scim_config->write(name, value); + ret = TRUE; } return ret; } @@ -694,6 +697,7 @@ sclboolean CSCLConnectionISF::config_write_string(const sclchar *name, const std sclboolean ret = FALSE; if (m_initialized && _scim_config) { _scim_config->write(name, value); + ret = TRUE; } return ret; } @@ -703,6 +707,17 @@ sclboolean CSCLConnectionISF::config_erase(const sclchar *name) sclboolean ret = FALSE; if (m_initialized && _scim_config) { _scim_config->erase(name); + ret = TRUE; + } + return ret; +} + +sclboolean CSCLConnectionISF::config_flush(void) +{ + sclboolean ret = FALSE; + if (m_initialized && _scim_config) { + _scim_config->flush(); + ret = TRUE; } return ret; } diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 2ef0605..a31098f 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -53,6 +53,7 @@ public: sclboolean config_write_int(const sclchar *name, sclint value); sclboolean config_write_string(const sclchar *name, const std::string value); sclboolean config_erase(const sclchar *name); + sclboolean config_flush(void); void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); void reset_keyboard_ise(); diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index b1ddef3..77dd424 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -124,6 +124,15 @@ sclboolean CSCLConnection::config_erase(const sclchar *name) return ret; } +sclboolean CSCLConnection::config_flush(void) +{ + sclboolean ret = FALSE; + if (m_impl) { + ret = m_impl->config_flush(); + } + return ret; +} + void CSCLConnection::send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value) { if (m_impl) { diff --git a/src/sclconnection.h b/src/sclconnection.h index 24905d1..bf9df23 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -53,6 +53,7 @@ public: virtual sclboolean config_write_int(const sclchar *name, sclint value); virtual sclboolean config_write_string(const sclchar *name, const std::string value); virtual sclboolean config_erase(const sclchar *name); + virtual sclboolean config_flush(void); virtual void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); virtual void reset_keyboard_ise(); diff --git a/src/sclcore.cpp b/src/sclcore.cpp index 64f7c1b..aa17f15 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -93,6 +93,15 @@ sclboolean CSCLCore::config_erase(const sclchar *name) return ret; } +sclboolean CSCLCore::config_flush(void) +{ + sclboolean ret = FALSE; + if (m_impl) { + ret = m_impl->config_flush(); + } + return ret; +} + void CSCLCore::send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value) { if (m_impl) { diff --git a/src/sclcore.h b/src/sclcore.h index bc5be66..521b165 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -78,6 +78,11 @@ public: sclboolean config_erase(const sclchar *name); /** + * @brief Request ISF to permanently writes all changes. + */ + sclboolean config_flush(void); + + /** * @brief Send an Event to IMEngine * * @param[in] ic The handle of the IMEngineInstance to receive the event. diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index d705522..de45bab 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -125,6 +125,11 @@ sclboolean CSCLCoreImpl::config_erase(const sclchar *name) return m_connection.config_erase(name); } +sclboolean CSCLCoreImpl::config_flush(void) +{ + return m_connection.config_flush(); +} + void CSCLCoreImpl::send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value) { m_connection.send_imengine_event(ic, ic_uuid, command, value); diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 933b84d..2a7d61f 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -58,6 +58,7 @@ public: sclboolean config_write_int(const sclchar *name, sclint value); sclboolean config_write_string(const sclchar *name, const std::string value); sclboolean config_erase(const sclchar *name); + sclboolean config_flush(void); void send_imengine_event(sclint ic, const sclchar *ic_uuid, const sclint command, const sclu32 value); void reset_keyboard_ise(); -- 2.7.4 From 6a346790c2580f295f9c4cf8a114f2f0d88695b5 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Fri, 7 Aug 2015 17:23:06 +0900 Subject: [PATCH 02/16] Update package version to 0.4.4 Change-Id: I9d334e7ee8102a308202915973fbf7b35a233cf0 --- 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 280363c..5ff8d4b 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.3 +Version: 0.4.4 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 24a4a53f687aee6b19f5ca88c1c1b86379ac2740 Mon Sep 17 00:00:00 2001 From: Haifeng Deng Date: Fri, 28 Aug 2015 10:45:45 +0800 Subject: [PATCH 03/16] Add enable_soft_candidate () Change-Id: I98b5d2d6b2236243ad333da52803dbfc945428b2 Signed-off-by: Haifeng Deng --- src/sclconnection-isf.cpp | 10 ++++++++++ src/sclconnection-isf.h | 1 + src/sclconnection.cpp | 7 +++++++ src/sclconnection.h | 1 + src/sclcore.cpp | 7 +++++++ src/sclcore.h | 7 +++++++ src/sclcoreimpl.cpp | 5 +++++ src/sclcoreimpl.h | 1 + 8 files changed, 39 insertions(+) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 96514eb..199c6a2 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -928,6 +928,16 @@ void CSCLConnectionISF::set_candidate_position(sclint left, sclint top) } } +void CSCLConnectionISF::enable_soft_candidate(sclboolean enable) +{ + if (m_initialized) { + if (enable) + m_helper_agent.set_candidate_style(scim::ONE_LINE_CANDIDATE, scim::SOFT_CANDIDATE_WINDOW); + else + m_helper_agent.set_candidate_style(scim::ONE_LINE_CANDIDATE, scim::FIXED_CANDIDATE_WINDOW); + } +} + void CSCLConnectionISF::candidate_hide(void) { if (m_initialized) { diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index a31098f..2432933 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -76,6 +76,7 @@ public: void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const; void delete_surrounding_text(sclint offset, sclint len) const; void set_candidate_position(sclint left, sclint top); + void enable_soft_candidate(sclboolean enable); void candidate_hide(void); void set_keyboard_ise_by_uuid(const sclchar *uuid); void get_keyboard_ise(const sclchar *uuid); diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index 77dd424..83226a5 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -280,6 +280,13 @@ void CSCLConnection::set_candidate_position(sclint left, sclint top) } } +void CSCLConnection::enable_soft_candidate(sclboolean enable) +{ + if (m_impl) { + m_impl->enable_soft_candidate(enable); + } +} + void CSCLConnection::candidate_hide(void) { if (m_impl) { diff --git a/src/sclconnection.h b/src/sclconnection.h index bf9df23..c493078 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -76,6 +76,7 @@ public: virtual void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const; virtual void delete_surrounding_text(sclint offset, sclint len) const; virtual void set_candidate_position(sclint left, sclint top); + virtual void enable_soft_candidate(sclboolean enable); virtual void candidate_hide(void); virtual void set_keyboard_ise_by_uuid(const sclchar *uuid); virtual void get_keyboard_ise(const sclchar *uuid); diff --git a/src/sclcore.cpp b/src/sclcore.cpp index aa17f15..839c7e3 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -249,6 +249,13 @@ void CSCLCore::set_candidate_position(sclint left, sclint top) } } +void CSCLCore::enable_soft_candidate(sclboolean enable) +{ + if (m_impl) { + m_impl->enable_soft_candidate(enable); + } +} + void CSCLCore::candidate_hide(void) { if (m_impl) { diff --git a/src/sclcore.h b/src/sclcore.h index 521b165..38ace4b 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -263,6 +263,13 @@ public: void set_candidate_position(sclint left, sclint top); /** + * @ brief Set soft candidate style. + * + * @param[in] enable The flag for soft candidate style. + */ + void enable_soft_candidate(sclboolean enable); + + /** * @ brief Request to hide candidate window. */ void candidate_hide(void); diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index de45bab..d6e4586 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -235,6 +235,11 @@ void CSCLCoreImpl::set_candidate_position(sclint left, sclint top) m_connection.set_candidate_position(left, top); } +void CSCLCoreImpl::enable_soft_candidate(sclboolean enable) +{ + m_connection.enable_soft_candidate(enable); +} + void CSCLCoreImpl::candidate_hide(void) { m_connection.candidate_hide(); diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 2a7d61f..447c553 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -84,6 +84,7 @@ public: void get_surrounding_text(const sclchar* ic_uuid, sclint maxlen_before, sclint maxlen_after) const; void delete_surrounding_text(sclint offset, sclint len) const; void set_candidate_position(sclint left, sclint top); + void enable_soft_candidate(sclboolean enable); void candidate_hide(void); //void get_candidate_window_geometry (const String &uuid) const; void set_keyboard_ise_by_uuid(const sclchar *uuid); -- 2.7.4 From f3df440d0ba06b947bed5c6cd78ac4c4a8029dee Mon Sep 17 00:00:00 2001 From: Sungmin Kwak Date: Mon, 7 Sep 2015 13:36:01 +0900 Subject: [PATCH 04/16] Update package version to 0.4.5 Change-Id: Ibd23bc9f9fca8e45af1b128efcc42d398bf20cbf --- 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 5ff8d4b..d5d972f 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.4 +Version: 0.4.5 Release: 1 Group: Graphics & UI Framework/Input License: Apache-2.0 -- 2.7.4 From 410c4b0953866e1ff75c17b5516b555801862f3e Mon Sep 17 00:00:00 2001 From: Haifeng Deng Date: Mon, 7 Sep 2015 13:48:32 +0800 Subject: [PATCH 05/16] Add update_geometry () Change-Id: I6f8c98e43865107ab5f1f28cf5b78b920b593579 Signed-off-by: Haifeng Deng --- src/sclconnection-isf.cpp | 14 +++++++------- src/sclconnection-isf.h | 2 +- src/sclconnection.cpp | 15 +++++++-------- src/sclconnection.h | 2 +- src/sclcore.cpp | 7 +++++++ src/sclcore.h | 11 +++++++++++ src/sclcoreimpl.cpp | 10 +++++----- src/sclcoreimpl.h | 1 + 8 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index 199c6a2..d78ab42 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -903,6 +903,13 @@ void CSCLConnectionISF::update_input_context(sclu32 type, sclu32 value) } } +void CSCLConnectionISF::update_geometry(sclint x, sclint y, sclint width, sclint height) +{ + if (m_initialized) { + m_helper_agent.update_geometry(x, y, width, height); + } +} + void CSCLConnectionISF::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const { if (m_initialized) { @@ -966,13 +973,6 @@ void CSCLConnectionISF::set_selection(sclint start, sclint end) } } -void CSCLConnectionISF::update_geometry(int x, int y, int width, int height) -{ - if (m_initialized) { - m_helper_agent.update_geometry(x, y, width, height); - } -} - extern "C" { void scim_module_init (void) { diff --git a/src/sclconnection-isf.h b/src/sclconnection-isf.h index 2432933..9a647fe 100644 --- a/src/sclconnection-isf.h +++ b/src/sclconnection-isf.h @@ -73,6 +73,7 @@ public: void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs); void update_aux_string(const sclchar *str); void update_input_context(sclu32 type, sclu32 value); + void update_geometry(sclint x, sclint y, sclint width, sclint height); void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const; void delete_surrounding_text(sclint offset, sclint len) const; void set_candidate_position(sclint left, sclint top); @@ -81,7 +82,6 @@ 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 update_geometry(int x, int y, int width, int height); private: sclboolean m_initialized; diff --git a/src/sclconnection.cpp b/src/sclconnection.cpp index 83226a5..1607355 100644 --- a/src/sclconnection.cpp +++ b/src/sclconnection.cpp @@ -259,6 +259,13 @@ void CSCLConnection::update_input_context(sclu32 type, sclu32 value) } } +void CSCLConnection::update_geometry(sclint x, sclint y, sclint width, sclint height) +{ + if (m_impl) { + m_impl->update_geometry(x, y, width, height); + } +} + void CSCLConnection::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const { if (m_impl) { @@ -314,11 +321,3 @@ void CSCLConnection::set_selection(sclint start, sclint end) m_impl->set_selection(start, end); } } - -void CSCLConnection::update_geometry(int x, int y, int width, int height) -{ - if (m_impl) { - m_impl->update_geometry(x, y, width, height); - } -} - diff --git a/src/sclconnection.h b/src/sclconnection.h index c493078..a313607 100644 --- a/src/sclconnection.h +++ b/src/sclconnection.h @@ -73,6 +73,7 @@ public: virtual void update_preedit_string(sclint ic, const sclchar *ic_uuid, const sclchar *str, const scim::AttributeList &attrs); virtual void update_aux_string(const sclchar *str); virtual void update_input_context(sclu32 type, sclu32 value); + virtual void update_geometry(sclint x, sclint y, sclint width, sclint height); virtual void get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const; virtual void delete_surrounding_text(sclint offset, sclint len) const; virtual void set_candidate_position(sclint left, sclint top); @@ -81,7 +82,6 @@ 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 update_geometry(int x, int y, int width, int height); protected: std::string m_backend_identifier; diff --git a/src/sclcore.cpp b/src/sclcore.cpp index 839c7e3..8ebda48 100644 --- a/src/sclcore.cpp +++ b/src/sclcore.cpp @@ -228,6 +228,13 @@ void CSCLCore::update_input_context(sclu32 type, sclu32 value) } } +void CSCLCore::update_geometry(sclint x, sclint y, sclint width, sclint height) +{ + if (m_impl) { + m_impl->update_geometry(x, y, width, height); + } +} + void CSCLCore::get_surrounding_text(const sclchar *ic_uuid, sclint maxlen_before, sclint maxlen_after) const { if (m_impl) { diff --git a/src/sclcore.h b/src/sclcore.h index 38ace4b..d6fe3d7 100644 --- a/src/sclcore.h +++ b/src/sclcore.h @@ -238,6 +238,17 @@ public: void update_input_context(sclu32 type, sclu32 value); /** + * @ brief When the geometry of ISE is changed, + * ISE can call this function to notify application + * + * @param[in] x x position of ISE geometry. + * @param[in] y y position of ISE geometry. + * @param[in] width the width of ISE geometry. + * @param[in] height the height of ISE geometry. + */ + void update_geometry(sclint x, sclint y, sclint width, sclint height); + + /** * @ brief Request to get surrounding text. * * @param[in] ic_uuid The helper ISE UUID. diff --git a/src/sclcoreimpl.cpp b/src/sclcoreimpl.cpp index d6e4586..4d19821 100644 --- a/src/sclcoreimpl.cpp +++ b/src/sclcoreimpl.cpp @@ -220,6 +220,11 @@ void CSCLCoreImpl::update_input_context(sclu32 type, sclu32 value) m_connection.update_input_context(type, value); } +void CSCLCoreImpl::update_geometry(sclint x, sclint y, sclint width, sclint height) +{ + m_connection.update_geometry(x, y, width, height); +} + void CSCLCoreImpl::get_surrounding_text(const sclchar* ic_uuid, sclint maxlen_before, sclint maxlen_after) const { m_connection.get_surrounding_text(ic_uuid, maxlen_before, maxlen_after); @@ -297,11 +302,6 @@ int CSCLCoreImpl::get_screen_rotation_degree() void CSCLCoreImpl::set_keyboard_size_hints(SclSize portrait, SclSize landscape) { - int degree = m_core_ui.get_screen_rotation_degree(); - if (degree == 90 || degree == 270) - m_connection.update_geometry(0, 0, landscape.width, landscape.height); - else - m_connection.update_geometry(0, 0, portrait.width, portrait.height); m_core_ui.set_keyboard_size_hints(portrait, landscape); } diff --git a/src/sclcoreimpl.h b/src/sclcoreimpl.h index 447c553..8ba540d 100644 --- a/src/sclcoreimpl.h +++ b/src/sclcoreimpl.h @@ -81,6 +81,7 @@ public: //void update_candidate_string (const LookupTable &table) const; //void update_associate_string (const LookupTable &table) const; void update_input_context(sclu32 type, sclu32 value); + void update_geometry(sclint x, sclint y, sclint width, sclint height); void get_surrounding_text(const sclchar* ic_uuid, sclint maxlen_before, sclint maxlen_after) const; void delete_surrounding_text(sclint offset, sclint len) const; void set_candidate_position(sclint left, sclint top); -- 2.7.4 From 0652c9da66f82fa52464ef1c383629c841b8d72a Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 24 Sep 2015 15:08:33 +0900 Subject: [PATCH 06/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 07/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 08/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 09/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 10/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 11/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 12/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 13/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 14/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 15/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 16/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