Add edje_object_part_text_input_panel_show/hide.

These APIs can be used in input panel manual control mode.


SVN revision: 67873
This commit is contained in:
Jihoon Kim 2012-02-13 06:34:47 +00:00
parent 839b56769a
commit f7ac08317c
5 changed files with 83 additions and 0 deletions

View File

@ -333,3 +333,7 @@
* Prevent propagation of signal, when there is a matching target with edje GROUP.
2012-02-13 Jihoon Kim
* add edje_object_part_text_input_panel_show/hide.
These APIs can be used in input panel manual control mode

View File

@ -2909,6 +2909,31 @@ EAPI void edje_object_part_text_input_panel_enabled_set (const Evas_
*/
EAPI Eina_Bool edje_object_part_text_input_panel_enabled_get (const Evas_Object *obj, const char *part);
/**
* @brief Show the input panel (virtual keyboard) based on the input panel property such as layout, autocapital types, and so on.
*
* Note that input panel is shown or hidden automatically according to the focus state.
* This API can be used in the case of manually controling by using edje_object_part_text_input_panel_enabled_set.
*
* @param obj A valid Evas_Object handle
* @param part The part name
* @since 1.2.0
*/
EAPI void edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part);
/**
* @brief Hide the input panel (virtual keyboard).
* @see edje_object_part_text_input_panel_show
*
* Note that input panel is shown or hidden automatically according to the focus state.
* This API can be used in the case of manually controling by using edje_object_part_text_input_panel_enabled_set.
*
* @param obj A valid Evas_Object handle
* @param part The part name
* @since 1.2.0
*/
EAPI void edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part);
/**
* Add a filter function for newly inserted text.
*

View File

@ -2600,6 +2600,30 @@ _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp)
return en->input_panel_enable;
}
void
_edje_entry_input_panel_show(Edje_Real_Part *rp)
{
Entry *en = rp->entry_data;
if (!en) return;
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
ecore_imf_context_input_panel_show(en->imf_context);
#endif
}
void
_edje_entry_input_panel_hide(Edje_Real_Part *rp)
{
Entry *en = rp->entry_data;
if (!en) return;
#ifdef HAVE_ECORE_IMF
if (en->imf_context)
ecore_imf_context_input_panel_hide(en->imf_context);
#endif
}
static Evas_Textblock_Cursor *
_cursor_get(Edje_Real_Part *rp, Edje_Cursor cur)
{

View File

@ -1945,6 +1945,8 @@ void _edje_entry_autocapital_type_set(Edje_Real_Part *rp, Edje_Text_Autocapital_
Edje_Text_Autocapital_Type _edje_entry_autocapital_type_get(Edje_Real_Part *rp);
void _edje_entry_input_panel_enabled_set(Edje_Real_Part *rp, Eina_Bool enabled);
Eina_Bool _edje_entry_input_panel_enabled_get(Edje_Real_Part *rp);
void _edje_entry_input_panel_show(Edje_Real_Part *rp);
void _edje_entry_input_panel_hide(Edje_Real_Part *rp);
void _edje_external_init();
void _edje_external_shutdown();

View File

@ -1876,6 +1876,34 @@ edje_object_part_text_input_panel_enabled_get(const Evas_Object *obj, const char
return EINA_FALSE;
}
EAPI void
edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part)
{
Edje *ed;
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(ed, part);
if (!rp) return;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_input_panel_show(rp);
}
EAPI void
edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part)
{
Edje *ed;
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(ed, part);
if (!rp) return;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_input_panel_hide(rp);
}
EAPI void
edje_object_text_insert_filter_callback_add(Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data)
{