}
trans.write_to_socket(client_socket);
+ } else if (cmd == ISM_TRANS_CMD_HIDE_ISE_PANEL) {
+ 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);
+ m_info_manager->hide_helper_ise ();
} else {
LOGW ("unknow cmd: %d\n", cmd);
}
reload_config_callback (_config);
}
+ void
+ hide_helper_ise (int id, uint32 context_id)
+ {
+ LOGD ("client id:%d", id);
+ WSCContextISF* ic = find_ic (context_id);
+
+ if (ic && ic->impl) {
+ wl_input_method_context_hide_input_panel (ic->im_ctx, ic->serial);
+ }
+ }
+
};
static scim::PanelAgentPointer instance;
return ret;
}
+EXAPI int isf_control_hide_ime (void)
+{
+ IMControlClient imcontrol_client;
+ int ret = 0;
+
+ if (!imcontrol_client.open_connection ())
+ return -1;
+
+ imcontrol_client.prepare ();
+ if (!imcontrol_client.hide_helper_ise ()) {
+ LOGW ("hide_helper_ise failed");
+ ret = -1;
+ }
+
+ imcontrol_client.close_connection ();
+
+ return ret;
+}
+
+
/*
vi:ts=4:nowrap:ai:expandtab
*/
* @return 0 if successfully, otherwise return -1;
*/
EXAPI int isf_control_get_recent_ime_geometry_with_rotation_angle (int angle, int *x, int *y, int *w, int *h);
+
+/**
+ * @brief Requests to hide the input panel.
+ *
+ * @since_tizen 2.4
+ *
+ * @return 0 on success, otherwise return -1
+ */
+EXAPI int isf_control_hide_ime (void);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
return false;
}
}
+
+ bool hide_helper_ise (void) {
+ int cmd;
+ m_trans.put_command (ISM_TRANS_CMD_HIDE_ISE_PANEL);
+ 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->get_recent_ime_geometry (x, y, w, h, angle);
}
+
+bool IMControlClient::hide_helper_ise (void)
+{
+ return m_impl->hide_helper_ise ();
+}
};
/*
bool show_helper_ise_selector (void);
bool is_helper_ise_enabled (const char* appid, int &enabled);
bool get_recent_ime_geometry (int *x, int *y, int *w, int *h, int angle = -1);
+ bool hide_helper_ise (void);
};
}
delete_ise_context_buffer ();
}
+ void hide_helper_ise (void) {
+#ifdef WAYLAND
+ int focused_client;
+ uint32 focused_context;
+ get_focused_context (focused_client, focused_context);
+ m_panel_agent_manager.hide_helper_ise (focused_client, focused_context);
+#else
+ m_signal_hide_ise ();
+#endif
+ }
+
void set_default_ise (const DEFAULT_ISE_T& ise) {
LOGD ("");
scim_global_config_write (String (SCIM_GLOBAL_CONFIG_DEFAULT_ISE_UUID), ise.uuid);
m_impl->hide_ise_panel (client_id, client, context);
}
+//ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
+void InfoManager::hide_helper_ise (void)
+{
+ m_impl->hide_helper_ise ();
+}
+
//SCIM_TRANS_CMD_PROCESS_KEY_EVENT
bool InfoManager::process_key_event (KeyEvent& key, _OUT_ uint32& result)
{
//ISM_TRANS_CMD_HIDE_ISE_PANEL
void hide_ise_panel (int client_id, uint32 client, uint32 context);
+ //ISM_TRANS_CMD_HIDE_ISE_PANEL from ISF control
+ void hide_helper_ise (void);
+
//SCIM_TRANS_CMD_PROCESS_KEY_EVENT
bool process_key_event (KeyEvent& key, _OUT_ uint32& result);
LOGW ("not implemented for %s", m_name.c_str ());
}
+void PanelAgentBase::hide_helper_ise (int client, uint32 context)
+{
+ LOGW ("not implemented for %s", m_name.c_str ());
+}
+
} /* namespace scim */
*/
virtual void helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index, uint32 current_screen);
+ /**
+ * @brief hide_helper_ise.
+ *
+ * @param
+ *
+ * @return none.
+ */
+ virtual void hide_helper_ise (int client, uint32 context);
};
/** @} */
_p->helper_attach_input_context_and_update_screen (id, helper_ic_index, current_screen);
}
+void PanelAgentManager::hide_helper_ise (int id, uint32 context)
+{
+ PanelAgentPointer _p = m_impl->get_panel_agent_by_id (id);
+
+ if (!_p.null ())
+ _p->hide_helper_ise (id, context);
+}
+
} /* namespace scim */
void update_preedit_string (int target_client, uint32 target_context, WideString wstr, AttributeList& attrs, uint32 caret);
void update_preedit_caret (int focused_client, uint32 focused_context, uint32 caret);
void helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index, uint32 current_screen);
+ void hide_helper_ise (int id, uint32 context);
};
/** @} */