diff options
author | InHong Han <inhong1.han@samsung.com> | 2016-03-16 20:02:27 +0900 |
---|---|---|
committer | InHong Han <inhong1.han@samsung.com> | 2016-08-10 22:06:51 -0700 |
commit | 1f022f021adf2f39c91d0af067410184dd15aa63 (patch) | |
tree | d8c5808a776785cc7732c35e3aa629dc51d2fc1c | |
parent | e47451ecb27f0d3c211b92e41b1670d847a07e6d (diff) | |
download | isf-1f022f021adf2f39c91d0af067410184dd15aa63.tar.gz isf-1f022f021adf2f39c91d0af067410184dd15aa63.tar.bz2 isf-1f022f021adf2f39c91d0af067410184dd15aa63.zip |
Fix build error related to new panel architecture
Change-Id: Ic8578170fb22884235532cb6e636d53b51d25629
-rw-r--r-- | ism/extras/efl_panel/remote_input.cpp | 1 | ||||
-rwxr-xr-x | ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp | 48 | ||||
-rw-r--r-- | ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp | 7 | ||||
-rw-r--r-- | ism/src/isf_info_manager.cpp | 24 | ||||
-rw-r--r-- | ism/src/isf_info_manager.h | 4 | ||||
-rw-r--r-- | ism/src/isf_panel_agent_base.cpp | 14 | ||||
-rw-r--r-- | ism/src/isf_panel_agent_base.h | 27 | ||||
-rw-r--r-- | ism/src/isf_panel_agent_manager.cpp | 24 | ||||
-rw-r--r-- | ism/src/isf_panel_agent_manager.h | 3 |
9 files changed, 134 insertions, 18 deletions
diff --git a/ism/extras/efl_panel/remote_input.cpp b/ism/extras/efl_panel/remote_input.cpp index dc1c2519..dfc0ccf7 100644 --- a/ism/extras/efl_panel/remote_input.cpp +++ b/ism/extras/efl_panel/remote_input.cpp @@ -482,6 +482,7 @@ void Remote_Input::handle_websocket_message(ISE_MESSAGE &message) case 124://TV_KEY_POWER LOGD ("TV_KEY_POWER"); panel_send_uinput_event_for_key(UINPUT_KEYBOARD, KEY_POWER); + g_web_socket_server->on_init(); break; case 235://TV_KEY_SWITCHMODE diff --git a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp index 97945373..7579f70f 100755 --- a/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp +++ b/ism/modules/panelagent/ecoresocket/ecore_socket_panel_agent_module.cpp @@ -1435,6 +1435,50 @@ private: Socket client_socket(client); m_send_trans.write_to_socket(client_socket); } + + void update_preedit_string (int client, uint32 target_context, const WideString &str, const AttributeList &attrs) { + LOGD("client id:%d\n", client); + + Socket client_socket(client); + lock(); + m_send_trans.clear(); + m_send_trans.put_command(SCIM_TRANS_CMD_REPLY); + m_send_trans.put_data(target_context); + m_send_trans.put_command(SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING); + m_send_trans.put_data(str); + m_send_trans.put_data(attrs); + m_send_trans.put_data(-1); + m_send_trans.write_to_socket(client_socket); + unlock(); + } + + void send_key_event (int client, uint32 target_context, const KeyEvent &key) { + LOGD("client id:%d\n", client); + + Socket client_socket(client); + lock(); + m_send_trans.clear (); + m_send_trans.put_command (SCIM_TRANS_CMD_REPLY); + m_send_trans.put_data (target_context); + m_send_trans.put_command (SCIM_TRANS_CMD_PROCESS_KEY_EVENT); + m_send_trans.put_data (key); + m_send_trans.write_to_socket (client_socket); + unlock(); + } + + void forward_key_event (int client, uint32 target_context, const KeyEvent &key) { + LOGD("client id:%d\n", client); + + Socket client_socket(client); + lock(); + m_send_trans.clear (); + m_send_trans.put_command (SCIM_TRANS_CMD_REPLY); + m_send_trans.put_data (target_context); + m_send_trans.put_command (SCIM_TRANS_CMD_FORWARD_KEY_EVENT); + m_send_trans.put_data (key); + m_send_trans.write_to_socket (client_socket); + unlock(); + } private: static void send_fail_reply (int client_id) @@ -2878,9 +2922,9 @@ private: trans.write_to_socket(client_socket); m_info_manager->hide_helper_ise (); } else if (cmd == ISM_TRANS_CMD_ENABLE_REMOTE_INPUT) { - m_info_manager->enable_remote_input (); + m_info_manager->enable_remote_input (client_id); } else if (cmd == ISM_TRANS_CMD_DISABLE_REMOTE_INPUT) { - m_info_manager->disable_remote_input (); + m_info_manager->disable_remote_input (client_id); } else { LOGW ("unknow cmd: %d\n", cmd); } diff --git a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp index 9b514d4f..960c6646 100644 --- a/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp +++ b/ism/modules/panelagent/wayland/wayland_panel_agent_module.cpp @@ -2774,6 +2774,13 @@ public: LOGD ("client id:%d", id); panel_slot_commit_string (context_id, wstr); } + + void + forward_key_event (int id, uint32 context_id, const KeyEvent &key) { + LOGD ("client id:%d", id); + panel_slot_forward_key_event (context_id, key); + } + #if 0 void request_help (int id, uint32 context_id) { diff --git a/ism/src/isf_info_manager.cpp b/ism/src/isf_info_manager.cpp index 546a32d2..632f4f48 100644 --- a/ism/src/isf_info_manager.cpp +++ b/ism/src/isf_info_manager.cpp @@ -1259,13 +1259,13 @@ public: m_signal_show_panel (); } - void enable_remote_input (void) + void enable_remote_input (int client_id) { SCIM_DEBUG_MAIN(4) << "PanelAgent::enable_remote_input ()\n"; m_signal_enable_remote_input (); } - void disable_remote_input (void) + void disable_remote_input (int client_id) { SCIM_DEBUG_MAIN(4) << "PanelAgent::disable_remote_input ()\n"; m_signal_disable_remote_input (); @@ -1933,6 +1933,7 @@ public: get_focused_context (client, context); if (client >= 0) { + m_panel_agent_manager.update_preedit_string (client, context, str, attrs); } unlock (); @@ -1950,6 +1951,7 @@ public: get_focused_context (client, context); if (client >= 0) { + m_panel_agent_manager.commit_string (client, context, str); } unlock (); @@ -1963,14 +1965,11 @@ public: int client = -1; uint32 context = 0; - lock (); - get_focused_context (client, context); if (client >= 0) { + m_panel_agent_manager.send_key_event (client, context, key); } - unlock (); - return client >= 0; } @@ -1980,14 +1979,11 @@ public: int client = -1; uint32 context = 0; - lock (); - get_focused_context (client, context); if (client >= 0) { + m_panel_agent_manager.forward_key_event (client, context, key); } - unlock (); - return client >= 0; } @@ -4440,15 +4436,15 @@ void InfoManager::get_recent_ise_geometry (int client_id, uint32 angle, _OUT_ st } //ISM_TRANS_CMD_ENABLE_REMOTE_INPUT -void InfoManager::enable_remote_input () +void InfoManager::enable_remote_input (int client_id) { - m_impl->enable_remote_input (); + m_impl->enable_remote_input (client_id); } //ISM_TRANS_CMD_DISABLE_REMOTE_INPUT -void InfoManager::disable_remote_input () +void InfoManager::disable_remote_input (int client_id) { - m_impl->disable_remote_input (); + m_impl->disable_remote_input (client_id); } //ISM_TRANS_CMD_REGISTER_PANEL_CLIENT diff --git a/ism/src/isf_info_manager.h b/ism/src/isf_info_manager.h index 137307bc..d93d633c 100644 --- a/ism/src/isf_info_manager.h +++ b/ism/src/isf_info_manager.h @@ -572,14 +572,14 @@ public: * * @return none. */ - void enable_remote_input (void); + void enable_remote_input (int client_id); /** * @brief Disable remote input. * * @return none. */ - void disable_remote_input (void); + void disable_remote_input (int client_id); /////////////////////////////////Message function begin///////////////////////////////////////// diff --git a/ism/src/isf_panel_agent_base.cpp b/ism/src/isf_panel_agent_base.cpp index e08a46a6..81fbeb2e 100644 --- a/ism/src/isf_panel_agent_base.cpp +++ b/ism/src/isf_panel_agent_base.cpp @@ -510,6 +510,20 @@ void PanelAgentBase::set_autocapital_type(int client, uint32 context, String uui LOGW("not implemented for %s", m_name.c_str()); } +void PanelAgentBase::update_preedit_string (int client, uint32 context,const WideString &str, const AttributeList &attrs) +{ + LOGW ("not implemented for %s", m_name.c_str ()); +} + +void PanelAgentBase::send_key_event (int client, uint32 context,const KeyEvent &key) +{ + LOGW ("not implemented for %s", m_name.c_str ()); +} + +void PanelAgentBase::forward_key_event (int client, uint32 context,const KeyEvent &key) +{ + LOGW ("not implemented for %s", m_name.c_str ()); +} } /* namespace scim */ diff --git a/ism/src/isf_panel_agent_base.h b/ism/src/isf_panel_agent_base.h index fd8223f6..debaaa71 100644 --- a/ism/src/isf_panel_agent_base.h +++ b/ism/src/isf_panel_agent_base.h @@ -807,6 +807,33 @@ public: * @return none. */ virtual void set_autocapital_type(int client, uint32 context, String uuid, int mode); + + /** + * @brief update_preedit_string. + * + * @param + * + * @return none. + */ + virtual void update_preedit_string (int client, uint32 context,const WideString &str, const AttributeList &attrs); + + /** + * @brief send_key_event. + * + * @param + * + * @return none. + */ + virtual void send_key_event (int client, uint32 context,const KeyEvent &key); + + /** + * @brief forward_key_event. + * + * @param + * + * @return none. + */ + virtual void forward_key_event (int client, uint32 context,const KeyEvent &key); }; /** @} */ diff --git a/ism/src/isf_panel_agent_manager.cpp b/ism/src/isf_panel_agent_manager.cpp index a68076d7..dc152acd 100644 --- a/ism/src/isf_panel_agent_manager.cpp +++ b/ism/src/isf_panel_agent_manager.cpp @@ -798,6 +798,30 @@ void PanelAgentManager::set_autocapital_type(int id, uint32 context_id, String u _p->set_autocapital_type (id, context_id, uuid, mode); } +void PanelAgentManager::update_preedit_string (int id, uint32 context_id, const WideString &str, const AttributeList &attrs) +{ + PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id); + + if (!_p.null ()) + _p->update_preedit_string (id, context_id, str, attrs); +} + +void PanelAgentManager::send_key_event (int id, uint32 context_id, const KeyEvent &key) +{ + PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id); + + if (!_p.null ()) + _p->send_key_event (id, context_id, key); +} + +void PanelAgentManager::forward_key_event (int id, uint32 context_id, const KeyEvent &key) +{ + PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id); + + if (!_p.null ()) + _p->forward_key_event (id, context_id, key); +} + } /* namespace scim */ diff --git a/ism/src/isf_panel_agent_manager.h b/ism/src/isf_panel_agent_manager.h index e34eda68..6bb44312 100644 --- a/ism/src/isf_panel_agent_manager.h +++ b/ism/src/isf_panel_agent_manager.h @@ -344,6 +344,9 @@ public: bool process_input_device_event(int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result); void process_key_event_done(int client, uint32 context, KeyEvent &key, uint32 ret, uint32 serial); void set_autocapital_type(int id, uint32 context_id, String uuid, int mode); + void update_preedit_string (int target_client, uint32 target_context, const WideString &str, const AttributeList &attrs); + void send_key_event (int target_client, uint32 target_context, const KeyEvent &key); + void forward_key_event (int target_client, uint32 target_context, const KeyEvent &key); }; /** @} */ |