trans.put_command(SCIM_TRANS_CMD_OK);
trans.write_to_socket(client_socket);
m_info_manager->hide_helper_ise ();
+ } else if (cmd == ISM_TRANS_CMD_LAUNCH_ISE) {
+ m_info_manager->launch_helper_ise();
+
+ Transaction trans;
+ Socket client_socket(client_id);
+
+ trans.clear();
+ trans.put_command(SCIM_TRANS_CMD_REPLY);
+ trans.put_command(SCIM_TRANS_CMD_OK);
+ trans.write_to_socket(client_socket);
} else {
LOGW ("unknown cmd: %d", cmd);
}
return ret;
}
+EXAPI int isf_control_prelaunch_ise (void)
+{
+ IMControlClient imcontrol_client;
+ int ret = 0;
+
+ if (!imcontrol_client.open_connection ())
+ return -1;
+
+ imcontrol_client.prepare ();
+ if (!imcontrol_client.launch_helper_ise ()) {
+ LOGW ("launch_helper_ise failed");
+ ret = -1;
+ }
+
+ imcontrol_client.close_connection ();
+
+ return ret;
+}
+
/*
vi:ts=4:nowrap:ai:expandtab
*/
int isf_control_hide_ime (void);
+/**
+ * @brief Requests to pre-launch the ISE.
+ *
+ * @since_tizen 5.0
+ *
+ * @return 0 on success, otherwise return -1
+ */
+int isf_control_prelaunch_ise (void);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
return false;
}
}
+
+ bool launch_helper_ise (void) {
+ int cmd;
+ m_trans.put_command (ISM_TRANS_CMD_LAUNCH_ISE);
+ m_trans.write_to_socket (m_socket_imclient2panel);
+ if (!m_trans.read_from_socket (m_socket_imclient2panel, m_socket_timeout)) {
+ std::cerr << __func__ << " read_from_socket() may be timeout \n";
+ return false;
+ }
+
+ if (m_trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
+ m_trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK) {
+ return true;
+ } else {
+ std::cerr << __func__ << " get_command() or get_data() may fail!!!\n";
+ return false;
+ }
+ }
};
IMControlClient::IMControlClient ()
{
return m_impl->hide_helper_ise ();
}
+
+bool IMControlClient::launch_helper_ise (void)
+{
+ return m_impl->launch_helper_ise ();
+}
};
/*
bool hide_helper_ise (void);
void enable_remote_input (void);
void disable_remote_input (void);
+ bool launch_helper_ise (void);
};
}
#endif
}
+ void launch_helper_ise (void) {
+ SCIM_DEBUG_MAIN (4) << "InfoManager::launch_helper_ise ()\n";
+ m_signal_start_default_ise ();
+ }
+
void set_default_ise (const DEFAULT_ISE_T& ise) {
LOGD ("set default ise : %s", ise.uuid.c_str());
scim_global_config_write (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), ise.uuid);
m_impl->hide_helper_ise ();
}
+//ISM_TRANS_CMD_LAUNCH_ISE from ISF control
+void InfoManager::launch_helper_ise (void)
+{
+ m_impl->launch_helper_ise ();
+}
+
//SCIM_TRANS_CMD_PROCESS_KEY_EVENT
bool InfoManager::process_key_event (KeyEvent& key, uint32 serial)
{
//ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
void hide_helper_ise (void);
+ //ISM_TRANS_CMD_LAUNCH_ISE
+ void launch_helper_ise (void);
+
//SCIM_TRANS_CMD_PROCESS_KEY_EVENT
bool process_key_event (KeyEvent& key, uint32 serial);
const int ISM_REMOTE_TRANS_CMD_RECV_INPUT_RESOURCE = 1030;
const int ISM_REMOTE_TRANS_CMD_CHECK_PRIVILEGE = 1031;
const int ISM_REMOTE_TRANS_CMD_DELETE_SURROUNDING_TEXT = 1032;
+const int ISM_TRANS_CMD_LAUNCH_ISE = 1033;
/* IMControl to ISE */
const int ISM_TRANS_CMD_SET_ISE_MODE = 1108;