From: Jihoon Kim <jihoon48.kim@samsung.com>

Subject: [E-devel] [PATCH] Add Ecore_IMF API to set the attirbute of
input panel

For supporting virtual keyboard, I'd like to add
ecore_imf_context_input_panel_enabled_set/get APIs. The detail description of
each API is included in the patch file as doxygen format.

If input panel is in 'enabled' status, the immodule will request to
show the input panel automatically When the input widget such as entry is
clicked or has focus. In some case, application programmers want to control
the input panel manually (not automatically), so I implement this API.



SVN revision: 60504
This commit is contained in:
Jihoon Kim 2011-06-20 07:17:24 +00:00 committed by Carsten Haitzler
parent 46cdaea3cb
commit a889ae4997
4 changed files with 54 additions and 0 deletions

View File

@ -234,3 +234,6 @@
* Removed support for evas xrender engine from ecore-evas as
it is not a deprecated engine in evas and no longer needs support.
2011-06-20 Jihoon Kim
* Ecore_IMF: Added ecore_imf_context_input_panel_enabled_set/get API

View File

@ -397,6 +397,8 @@ EAPI void ecore_imf_context_input_panel_layout_set(Ecor
EAPI Ecore_IMF_Input_Panel_Layout ecore_imf_context_input_panel_layout_get(Ecore_IMF_Context *ctx);
EAPI void ecore_imf_context_input_panel_language_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
/* The following entry points must be exported by each input method module
*/

View File

@ -184,6 +184,10 @@ ecore_imf_context_add(const char *id)
* set on the immodule */
ecore_imf_context_autocapital_type_set(ctx, ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE);
/* default input panel enabled status is EINA_TRUE, so let's make sure it's
* set on the immodule */
ecore_imf_context_input_panel_enabled_set(ctx, EINA_TRUE);
/* default input_mode is ECORE_IMF_INPUT_MODE_FULL, so let's make sure it's
* set on the immodule */
ecore_imf_context_input_mode_set(ctx, ECORE_IMF_INPUT_MODE_FULL);
@ -1073,3 +1077,47 @@ ecore_imf_context_input_panel_language_get (Ecore_IMF_Context *ctx)
return ctx->input_panel_lang;
}
/**
* Set whether the Input Method Context should request to show the input panel automatically
* when the widget has focus.
*
* @param ctx An #Ecore_IMF_Context.
* @param enabled If true, the input panel will be shown when the widget is clicked or has focus.
* @ingroup Ecore_IMF_Context_Group
* @since 1.1.0
*/
EAPI void
ecore_imf_context_input_panel_enabled_set (Ecore_IMF_Context *ctx,
Eina_Bool enabled)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
"ecore_imf_context_input_panel_enabled_set");
return;
}
ctx->input_panel_enabled = enabled;
}
/**
* Get whether the Input Method Context requests to show the input panel automatically.
*
* @param ctx An #Ecore_IMF_Context.
* @return Return the attribute to show the input panel automatically
* @ingroup Ecore_IMF_Context_Group
* @since 1.1.0
*/
EAPI Eina_Bool
ecore_imf_context_input_panel_enabled_get (Ecore_IMF_Context *ctx)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
"ecore_imf_context_input_panel_enabled_get");
return EINA_FALSE;
}
return ctx->input_panel_enabled;
}

View File

@ -51,6 +51,7 @@ struct _Ecore_IMF_Context
Ecore_IMF_Input_Panel_Layout input_panel_layout;
Ecore_IMF_Input_Panel_Lang input_panel_lang;
Eina_Bool allow_prediction : 1;
Eina_Bool input_panel_enabled : 1;
};
struct _Ecore_IMF_Module