Support ecore_imf_context_input_panel_show/hide in SCIM module

SVN revision: 67728
This commit is contained in:
Jihoon Kim 2012-02-07 10:30:57 +00:00
parent cf42822ea5
commit 15ea121e01
4 changed files with 37 additions and 3 deletions

View File

@ -476,4 +476,4 @@
2012-02-07 Jihoon Kim (jihoon)
* Support ecore_imf_context_input_panel_show/hide in XIM module.
* Support ecore_imf_context_input_panel_show/hide in XIM and SCIM module.

View File

@ -926,6 +926,9 @@ isf_imf_context_focus_in(Ecore_IMF_Context *ctx)
_panel_client.send();
}
if (ecore_imf_context_input_panel_enabled_get(ctx))
ecore_imf_context_input_panel_show(ctx);
}
/**
@ -968,6 +971,9 @@ isf_imf_context_focus_out(Ecore_IMF_Context *ctx)
_panel_client.send();
_focused_ic = 0;
}
if (ecore_imf_context_input_panel_enabled_get(ctx))
ecore_imf_context_input_panel_hide(ctx);
}
/**
@ -1391,6 +1397,32 @@ isf_imf_context_filter_event(Ecore_IMF_Context *ctx, Ecore_IMF_Event_Type type,
return ret;
}
EAPI void
isf_imf_context_input_panel_show(Ecore_IMF_Context *ctx)
{
SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
EcoreIMFContextISF *ic = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx);
if (ic == NULL || ic->impl == NULL)
return;
ecore_x_e_virtual_keyboard_state_set
(ic->impl->client_window, ECORE_X_VIRTUAL_KEYBOARD_STATE_ON);
}
EAPI void
isf_imf_context_input_panel_hide(Ecore_IMF_Context *ctx)
{
SCIM_DEBUG_FRONTEND(1) << __FUNCTION__ << "...\n";
EcoreIMFContextISF *ic = (EcoreIMFContextISF*)ecore_imf_context_data_get(ctx);
if (ic == NULL || ic->impl == NULL)
return;
ecore_x_e_virtual_keyboard_state_set
(ic->impl->client_window, ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF);
}
/* Panel Slot functions */
static void
panel_slot_reload_config(int context __UNUSED__)

View File

@ -32,6 +32,8 @@ Eina_Bool isf_imf_context_filter_event (Ecore_IMF_Context *ctx, Ecore_IMF_Event
void isf_imf_context_prediction_allow_set (Ecore_IMF_Context* ctx, Eina_Bool prediction);
void isf_imf_context_autocapital_type_set (Ecore_IMF_Context* ctx, Ecore_IMF_Autocapital_Type autocapital_type);
void isf_imf_context_input_panel_layout_set (Ecore_IMF_Context* ctx, Ecore_IMF_Input_Panel_Layout layout);
void isf_imf_context_input_panel_show(Ecore_IMF_Context *ctx);
void isf_imf_context_input_panel_hide(Ecore_IMF_Context *ctx);
EcoreIMFContextISF* isf_imf_context_new (void);
void isf_imf_context_shutdown (void);

View File

@ -19,8 +19,8 @@ extern "C"
isf_imf_context_del, /* del */
isf_imf_context_client_window_set, /* client_window_set */
isf_imf_context_client_canvas_set, /* client_canvas_set */
NULL, /* isf_imf_context_input_panel_show, - show */
NULL, /* isf_imf_context_input_panel_hide, - hide */
isf_imf_context_input_panel_show, /* input_panel_show, - show */
isf_imf_context_input_panel_hide, /* input_panel_hide, - hide */
isf_imf_context_preedit_string_get, /* get_preedit_string */
isf_imf_context_focus_in, /* focus_in */
isf_imf_context_focus_out, /* focus_out */