m_send_trans.write_to_socket(client_socket);
}
+ void resume_helper_option_window(int client, uint32 context, const String& uuid) {
+ LOGD ("client id:%d\n", client);
+
+ Socket client_socket(client);
+ m_send_trans.clear();
+ m_send_trans.put_command(SCIM_TRANS_CMD_REPLY);
+ m_send_trans.put_data(context);
+ m_send_trans.put_data(uuid);
+ m_send_trans.put_command(ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW);
+ m_send_trans.write_to_socket(client_socket);
+ }
+
bool process_key_event(int client, uint32 context, const String& uuid, KeyEvent& key, uint32 serial) {
LOGD ("client id:%d\n", client);
} else if (cmd == ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW) {
m_info_manager->show_ise_option_window(client_id);
continue;
+ } else if (cmd == ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW) {
+ m_info_manager->resume_ise_option_window(client_id);
+ continue;
}
//FIXME
LOGW ("Access denied to show ise option window\n");
send_fail_reply (client_id);
}
+ } else if (cmd == ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW) {
+ if (m_info_manager->check_privilege_by_sockfd(client_id, IMEMANAGER_PRIVILEGE)) {
+ m_info_manager->resume_ise_option_window(client_id);
+ }
+ else {
+ LOGW ("Access denied to resume ise option window\n");
+ send_fail_reply (client_id);
+ }
} else if (cmd == ISM_TRANS_CMD_SHOW_HELPER_ISE_LIST) {
if (m_info_manager->check_privilege_by_sockfd(client_id, IMEMANAGER_PRIVILEGE)) {
Transaction trans;
return isf_control_show_ise_option_window ();
}
+EXAPI int isf_control_resume_ime_option_window (void)
+{
+ IMControlClient imcontrol_client;
+ int ret = 0;
+ if (!imcontrol_client.open_connection ())
+ return -1;
+
+ imcontrol_client.prepare ();
+ imcontrol_client.resume_ise_option_window ();
+ if (!imcontrol_client.send ())
+ ret = -1;
+
+ imcontrol_client.close_connection ();
+
+ return ret;
+}
+
EXAPI int isf_control_get_active_ime (char **appid)
{
if (appid == NULL)
EXAPI int isf_control_open_ime_option_window (void);
/**
+ * @brief Requests to resume the current IME's option window.
+ *
+ * @remarks IME needs to show its option window if it has an option window that was created before and not destroyed yet.
+ *
+ * @since_tizen 3.0
+ *
+ * @return 0 on success, otherwise return -1
+ *
+ * @pre The availibility of IME option can be found using isf_control_get_all_ime_info() and isf_control_get_active_ime() functions.
+ */
+EXAPI int isf_control_resume_ime_option_window (void);
+
+/**
* @brief Gets active IME's Application ID.
*
* @since_tizen 2.4
m_trans.put_command (ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW);
}
+ void resume_ise_option_window (void) {
+ m_trans.put_command (ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW);
+ }
+
bool get_all_helper_ise_info (HELPER_ISE_INFO &info) {
int cmd;
std::vector<String> appid;
m_impl->show_ise_option_window ();
}
+void IMControlClient::resume_ise_option_window (void)
+{
+ m_impl->resume_ise_option_window ();
+}
+
bool IMControlClient::get_all_helper_ise_info (HELPER_ISE_INFO &info)
{
return m_impl->get_all_helper_ise_info (info);
bool set_initial_ise_by_uuid (const char* uuid);
void show_ise_selector ();
void show_ise_option_window ();
+ void resume_ise_option_window ();
bool get_all_helper_ise_info (HELPER_ISE_INFO &info);
bool set_enable_helper_ise_info (const char *appid, bool is_enabled);
return false;
}
+
+ bool resume_helper_option_window (const String& uuid) {
+ HelperClientIndex::iterator it = m_helper_client_index.find (m_current_helper_uuid);
+
+ if (it != m_helper_client_index.end ()) {
+ int client;
+ uint32 context;
+ uint32 ctx;
+ get_focused_context (client, context);
+ ctx = get_helper_ic (client, context);
+ LOGD ("Send ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW message");
+ m_panel_agent_manager.resume_helper_option_window (it->second.id, ctx, uuid);
+ return true;
+ }
+
+ return false;
+ }
+
//ISM_TRANS_CMD_SHOW_ISF_CONTROL
void show_isf_panel (int client_id) {
LOGD ("");
}
//ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
void show_ise_option_window (int client_id) {
- SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_panel ()\n";
+ SCIM_DEBUG_MAIN (4) << "InfoManager::show_ise_option_window ()\n";
LOGD ("");
String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
}
}
+ //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
+ void resume_ise_option_window (int client_id) {
+ SCIM_DEBUG_MAIN (4) << "InfoManager::resume_ise_option_window ()\n";
+ LOGD ("");
+ String initial_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_INITIAL_ISE_UUID), String (""));
+ String default_uuid = scim_global_config_read (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), String (""));
+ LOGD ("prepare to resime ISE option window %d [%s] [%s]", client_id, initial_uuid.c_str (), default_uuid.c_str ());
+
+ if (TOOLBAR_HELPER_MODE == m_current_toolbar_mode) {
+ resume_helper_option_window (m_current_helper_uuid);
+ }
+ }
+
//ISM_TRANS_CMD_EXPAND_CANDIDATE
void expand_candidate () {
LOGD ("");
m_impl->show_ise_option_window (client_id);
}
+//ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
+void InfoManager::resume_ise_option_window (int client_id)
+{
+ m_impl->resume_ise_option_window (client_id);
+}
+
//ISM_TRANS_CMD_EXPAND_CANDIDATE
void InfoManager::expand_candidate ()
{
//ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW
void show_ise_option_window (int client_id);
+ //ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW
+ void resume_ise_option_window (int client_id);
+
//ISM_TRANS_CMD_EXPAND_CANDIDATE
void expand_candidate ();
{
};
+/* ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW */
+class MessageItemResumeISEOptionWindow : public MessageItemHelper
+{
+};
+
/* ISM_TRANS_CMD_CHECK_OPTION_WINDOW */
class MessageItemCheckOptionWindow : public MessageItemHelper
{
}
break;
}
+ case ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW:
+ {
+ MessageItemResumeISEOptionWindow *message = alloc_message<MessageItemResumeISEOptionWindow>();
+ if (message) {
+ message->get_command_ref() = cmd;
+ message->get_ic_ref() = ic;
+ message->get_ic_uuid_ref() = ic_uuid;
+ m_list_messages.push_back(message);
+ }
+ break;
+ }
case ISM_TRANS_CMD_CHECK_OPTION_WINDOW:
{
MessageItemCheckOptionWindow *message = alloc_message<MessageItemCheckOptionWindow>();
LOGW ("not implemented for %s", m_name.c_str ());
}
+void PanelAgentBase::resume_helper_option_window (int client, uint32 context, const String& uuid)
+{
+ LOGW ("not implemented for %s", m_name.c_str ());
+}
+
bool PanelAgentBase::process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, uint32 serial)
{
LOGW ("not implemented for %s", m_name.c_str ());
virtual void show_helper_option_window (int client, uint32 context, const String& uuid);
/**
+ * @brief resume_helper_option_window.
+ *
+ * @param
+ *
+ * @return none.
+ */
+ virtual void resume_helper_option_window (int client, uint32 context, const String& uuid);
+
+ /**
* @brief process_key_event.
*
* @param
_p->show_helper_option_window (id, context_id, uuid);
}
+void PanelAgentManager::resume_helper_option_window (int id, uint32 context_id, const String& uuid)
+{
+ PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
+
+ if (!_p.null ())
+ _p->resume_helper_option_window (id, context_id, uuid);
+}
+
bool PanelAgentManager::process_key_event (int id, uint32 context_id, const String& uuid, KeyEvent& key, uint32 serial)
{
PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
void set_helper_bidi_direction (int client, uint32 context, const String& uuid, uint32& direction);
void set_helper_caps_mode (int client, uint32 context, const String& uuid, uint32& mode);
void show_helper_option_window (int client, uint32 context, const String& uuid);
+ void resume_helper_option_window (int client, uint32 context, const String& uuid);
bool process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, uint32 serial);
bool get_helper_geometry (int client, uint32 context, String& uuid, _OUT_ struct rectinfo& info);
void get_helper_imdata (int client, uint32 context, String& uuid, _OUT_ char** imdata, _OUT_ size_t& len);
HelperAgentSignalUintVoid signal_set_input_hint;
HelperAgentSignalUintVoid signal_update_bidi_direction;
HelperAgentSignalVoid signal_show_option_window;
+ HelperAgentSignalVoid signal_resume_option_window;
HelperAgentSignalUintVoid signal_check_option_window;
HelperAgentSignalUintCharSizeUint signal_process_input_device_event;
m_impl->signal_show_option_window (this, subclass->get_ic_ref(), subclass->get_ic_uuid_ref());
break;
}
+ case ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW:
+ {
+ MessageItemResumeISEOptionWindow *subclass = static_cast<MessageItemResumeISEOptionWindow*>(message);
+ m_impl->signal_resume_option_window (this, subclass->get_ic_ref(), subclass->get_ic_uuid_ref());
+ break;
+ }
case ISM_TRANS_CMD_CHECK_OPTION_WINDOW:
{
uint32 avail = 0;
}
/**
+ * @brief Connect a slot to Helper resume option window.
+ *
+ * This signal is used to do request the ISE to resume option window.
+ *
+ * The prototype of the slot is:
+ * void resume_option_window (const HelperAgent *agent, int ic, const String &uuid);
+ */
+Connection
+HelperAgent::signal_connect_resume_option_window (HelperAgentSlotVoid *slot)
+{
+ return m_impl->signal_resume_option_window.connect (slot);
+}
+
+/**
* @brief Connect a slot to Helper check if the option is available.
*
* This signal is used to check if the option (setting) is available from Helper ISE.
Connection signal_connect_show_option_window (HelperAgentSlotVoid *slot);
/**
+ * @brief Connect a slot to Helper resume option window.
+ *
+ * This signal is used to do request the ISE to resume option window.
+ *
+ * The prototype of the slot is:
+ * void resume_option_window (const HelperAgent *agent, int ic, const String &uuid);
+ */
+ Connection signal_connect_resume_option_window (HelperAgentSlotVoid *slot);
+
+ /**
* @brief Connect a slot to Helper check if the option is available.
*
* This signal is used to request ISE to reply if the option (setting) is available.
const int ISM_TRANS_CMD_UPDATE_BIDI_DIRECTION = 1124;
const int ISM_TRANS_CMD_SHOW_ISE_OPTION_WINDOW = 1125;
const int ISM_TRANS_CMD_PROCESS_INPUT_DEVICE_EVENT = 1126;
+const int ISM_TRANS_CMD_RESUME_ISE_OPTION_WINDOW = 1127;
/* ISE/Panel to IMControl */
const int ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT = 1151;