From: Ji-hoon Lee Date: Tue, 18 Oct 2016 14:50:13 +0000 (+0900) Subject: Added call for on_show callback X-Git-Tag: accepted/tizen/3.0/ivi/20161028.151228~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F00%2F92800%2F1;p=platform%2Fcore%2Fuifw%2Flibscl-core.git Added call for on_show callback Change-Id: Ia97f51e53ec5043072eaed184c890ee4ae3f1c51 --- diff --git a/src/legacy_support/websocket.cpp b/src/legacy_support/websocket.cpp index 59f00c3..aa82219 100644 --- a/src/legacy_support/websocket.cpp +++ b/src/legacy_support/websocket.cpp @@ -960,14 +960,19 @@ void CWebHelperAgentWebSocket::handle_recved_message(ISE_MESSAGE &message) } } else if (message.command.compare(ISE_MESSAGE_COMMAND_STRINGS[ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES]) == 0) { LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES"); - if (message.values.size() == 4) { - int portrait_width, portrait_height; - int landscape_width, landscape_height; + int portrait_width, portrait_height; + int landscape_width, landscape_height; + if (message.values.size() == 4 || message.values.size() == 2) { portrait_width = atoi(message.values.at(0).c_str()); portrait_height = atoi(message.values.at(1).c_str()); - landscape_width = atoi(message.values.at(2).c_str()); - landscape_height = atoi(message.values.at(3).c_str()); + if (message.values.size() == 2) { + landscape_width = portrait_width; + landscape_height = portrait_height; + } else { + landscape_width = atoi(message.values.at(2).c_str()); + landscape_height = atoi(message.values.at(3).c_str()); + } LOGD("ISE_MESSAGE_COMMAND_SET_KEYBOARD_SIZES : %d %d %d %d", portrait_width, portrait_height, landscape_width, landscape_height); diff --git a/src/sclconnection-isf.cpp b/src/sclconnection-isf.cpp index bc7a365..b0c0357 100644 --- a/src/sclconnection-isf.cpp +++ b/src/sclconnection-isf.cpp @@ -20,6 +20,11 @@ #include #include +#ifdef WEBSOCKET +#include "legacy_support/websocket.h" +extern CWebHelperAgentWebSocket g_websocket; +#endif + using namespace scl; static scim::ConfigPointer _scim_config(0); @@ -169,6 +174,10 @@ static void slot_ise_show(const scim::HelperAgent *agent, int ic, char *buf, siz if (ui) { ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_SHOW); } + +#ifdef WEBSOCKET + g_websocket.on_show(ic); +#endif } } } @@ -186,6 +195,10 @@ static void slot_ise_hide(const scim::HelperAgent *agent, int ic, const scim::St if (ui) { ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_HIDE); } + +#ifdef WEBSOCKET + g_websocket.on_hide(ic); +#endif } } } diff --git a/src/sclcoreui-efl.cpp b/src/sclcoreui-efl.cpp index f56834e..99a4728 100644 --- a/src/sclcoreui-efl.cpp +++ b/src/sclcoreui-efl.cpp @@ -33,6 +33,11 @@ #include #endif +#ifdef WEBSOCKET + /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */ +CWebHelperAgentWebSocket g_websocket; +#endif + #ifdef WAYLAND struct WaylandKeyboard { @@ -85,7 +90,7 @@ sclboolean CSCLCoreUIEFL::init() } #ifdef WEBSOCKET - m_websocket.init(); + g_websocket.init(); #endif return TRUE; @@ -96,7 +101,7 @@ void CSCLCoreUIEFL::fini() m_initialized = FALSE; #ifdef WEBSOCKET - m_websocket.exit(); + g_websocket.exit(); #endif } diff --git a/src/sclcoreui-efl.h b/src/sclcoreui-efl.h index 5a383f7..ee0e9f7 100644 --- a/src/sclcoreui-efl.h +++ b/src/sclcoreui-efl.h @@ -62,11 +62,6 @@ private: sclwindow m_main_window; OptionWindowInfo m_option_window_info[OPTION_WINDOW_TYPE_MAX]; - -#ifdef WEBSOCKET - /* This websocket agent is for supporting Tizen 2.X legacy web IMEs that uses websocket */ - CWebHelperAgentWebSocket m_websocket; -#endif }; }