static void slot_hide_ise (void);
static void slot_will_hide_ack (void);
-static void slot_candidate_will_hide_ack (void);
+static void slot_candidate_will_hide_ack (void);
+
+static void slot_get_ise_state (int &state);
static Eina_Bool panel_agent_handler (void *data, Ecore_Fd_Handler *fd_handler);
*/
static Eina_Bool efl_create_control_window (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
/* WMSYNC, #1 Creating and registering control window */
if (ecore_x_display_get () == NULL)
return EINA_FALSE;
*/
static Eina_Bool efl_get_default_zone_geometry_info (Ecore_X_Window root, uint *x, uint *y, uint *w, uint *h)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
Ecore_X_Atom zone_geometry_atom;
Ecore_X_Window *zone_lists;
int num_zone_lists;
*/
static void efl_get_screen_resolution (int &width, int &height)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
static Evas_Coord scr_w = 0, scr_h = 0;
if (scr_w == 0 || scr_h == 0) {
_panel_agent->signal_connect_will_hide_ack (slot (slot_will_hide_ack));
_panel_agent->signal_connect_candidate_will_hide_ack (slot (slot_candidate_will_hide_ack));
+ _panel_agent->signal_connect_get_ise_state (slot (slot_get_ise_state));
std::vector<String> load_ise_list;
_panel_agent->get_active_ise_list (load_ise_list);
*/
static void slot_set_keyboard_ise (const String &uuid)
{
- SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << " uuid = " << uuid << "\n";
if (uuid.length () <= 0 || std::find (_uuids.begin (), _uuids.end (), uuid) == _uuids.end ())
return;
*/
static void slot_get_keyboard_ise (String &ise_name, String &ise_uuid)
{
- SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
-
uint32 ise_option = 0;
isf_get_keyboard_ise (_config, ise_uuid, ise_name, ise_option);
+
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << " uuid = " << ise_uuid << "\n";
}
/**
static void slot_register_helper_properties (int id, const PropertyList &props)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
/* WMSYNC, #2 Receiving X window ID from ISE */
/* FIXME : We should add an API to set window id of ISE */
Property prop = props[0];
static void slot_show_ise (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
/* WMSYNC, #3 Clear the existing application's conformant area and set transient_for */
// Unset conformant area
Ecore_X_Window current_app_window = efl_get_app_window ();
static void slot_hide_ise (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
// From this point, slot_get_input_panel_geometry should return hidden state geometry
_ise_show = false;
_window_angle = -1;
static void slot_will_hide_ack (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
/* WMSYNC, #8 Let the Window Manager to actually hide keyboard window */
// WILL_HIDE_REQUEST_DONE Ack to WM
Ecore_X_Window root_window = ecore_x_window_root_get (_control_window);
}
}
+static void slot_get_ise_state (int &state)
+{
+ if (_ise_show || evas_object_visible_get (_candidate_window))
+ state = ECORE_IMF_INPUT_PANEL_STATE_SHOW;
+ else
+ state = ECORE_IMF_INPUT_PANEL_STATE_HIDE;
+ LOGD ("state = %d", state);
+}
+
//////////////////////////////////////////////////////////////////////
// End of PanelAgent-Functions
//////////////////////////////////////////////////////////////////////
*/
static bool check_wm_ready (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
#ifdef WAIT_WM
int try_count = 0;
while (check_file (ISF_SYSTEM_WM_READY_FILE) == false) {
*/
static bool check_system_ready (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
int ret = 0;
int val = 0;
ret = vconf_get_int (ISF_SYSTEM_APPSERVICE_READY_VCONF, &val);
static void _launch_default_soft_keyboard (void)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
if (_appsvc_callback_regist)
vconf_ignore_key_changed (ISF_SYSTEM_APPSERVICE_READY_VCONF, launch_default_soft_keyboard);
*/
static void launch_default_soft_keyboard (keynode_t *key, void* data)
{
+ SCIM_DEBUG_MAIN (3) << __FUNCTION__ << "...\n";
+
/* Soft keyboard will be started when all system service are ready */
if (check_system_ready ()) {
_launch_default_soft_keyboard ();
typedef Signal1<void, int>
PanelAgentSignalInt;
+typedef Signal1<void, int &>
+ PanelAgentSignalInt2;
+
typedef Signal1<void, const String &>
PanelAgentSignalString;
PanelAgentSignalVoid m_signal_set_hardware_keyboard_mode;
PanelAgentSignalVoid m_signal_candidate_will_hide_ack;
+ PanelAgentSignalInt2 m_signal_get_ise_state;
public:
PanelAgentImpl ()
: m_should_exit (false),
trans.write_to_socket (client_socket);
}
+ void get_ise_state (int client_id)
+ {
+ SCIM_DEBUG_MAIN(4) << __func__ << "\n";
+ int state = 0;
+ m_signal_get_ise_state (state);
+
+ Transaction trans;
+ Socket client_socket (client_id);
+
+ trans.clear ();
+ trans.put_command (SCIM_TRANS_CMD_REPLY);
+ trans.put_command (SCIM_TRANS_CMD_OK);
+ trans.put_data (state);
+ trans.write_to_socket (client_socket);
+ }
+
void get_active_ise (int client_id)
{
SCIM_DEBUG_MAIN(4) << __func__ << "\n";
return m_signal_candidate_will_hide_ack.connect (slot);
}
+ Connection signal_connect_get_ise_state (PanelAgentSlotInt2 *slot)
+ {
+ return m_signal_get_ise_state.connect (slot);
+ }
+
private:
bool socket_check_client_connection (const Socket &client)
{
} else if (cmd == ISM_TRANS_CMD_SEND_CANDIDATE_WILL_HIDE_ACK) {
candidate_will_hide_ack (client_id);
continue;
+ } else if (cmd == ISM_TRANS_CMD_GET_ISE_STATE) {
+ get_ise_state (client_id);
+ continue;
}
current = last = false;
return m_impl->signal_connect_candidate_will_hide_ack (slot);
}
+Connection
+PanelAgent::signal_connect_get_ise_state (PanelAgentSlotInt2 *slot)
+{
+ return m_impl->signal_connect_get_ise_state (slot);
+}
+
} /* namespace scim */
/*
}
}
+ void get_ise_state (int &ise_state) {
+ if (m_send_refcount > 0) {
+ int cmd;
+ uint32 temp;
+
+ m_send_trans.put_command (ISM_TRANS_CMD_GET_ISE_STATE);
+ instant_send ();
+ if (!m_send_trans.read_from_socket (m_socket_active, m_socket_timeout))
+ std::cerr << __func__ << " read_from_socket() may be timeout \n";
+
+ if (m_send_trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_REPLY &&
+ m_send_trans.get_command (cmd) && cmd == SCIM_TRANS_CMD_OK &&
+ m_send_trans.get_data (temp)) {
+ ise_state = temp;
+ } else {
+ std::cerr << __func__ << " get_command() or get_data() may fail!!!\n";
+ }
+ post_prepare ();
+ }
+ }
+
void set_ise_language (int language) {
if (m_send_refcount > 0) {
m_send_trans.put_command (ISM_TRANS_CMD_SET_ISE_LANGUAGE);
}
void
+PanelClient::get_ise_state (int &ise_state)
+{
+ m_impl->get_ise_state (ise_state);
+}
+
+void
PanelClient::reset_signal_handler (void)
{
m_impl->reset_signal_handler ();