From 4bcc4a3cb85b0e4eac4cef461ae6d7c756e95d43 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 13 Feb 2012 11:43:58 +0000 Subject: [PATCH] Add elm_entry_imf_context_reset. Reset the input method context of the entry if needed. This can be necessary in the case where modifying the buffer would confuse on-going input method behavior. SVN revision: 67882 --- legacy/elementary/src/lib/elm_entry.c | 12 ++++++++++++ legacy/elementary/src/lib/elm_entry.h | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/legacy/elementary/src/lib/elm_entry.c b/legacy/elementary/src/lib/elm_entry.c index a913a833fc..4da0bddbbe 100644 --- a/legacy/elementary/src/lib/elm_entry.c +++ b/legacy/elementary/src/lib/elm_entry.c @@ -3554,6 +3554,16 @@ elm_entry_autocapital_type_get(Evas_Object *obj) return wd->autocapital_type; } +EAPI void +elm_entry_imf_context_reset(Evas_Object *obj) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return; + + edje_object_part_text_imf_context_reset(wd->ent, "elm.text"); +} + EAPI void elm_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled) { @@ -3595,3 +3605,5 @@ elm_entry_input_panel_hide(Evas_Object *obj) edje_object_part_text_input_panel_hide(wd->ent, "elm.text"); } + + diff --git a/legacy/elementary/src/lib/elm_entry.h b/legacy/elementary/src/lib/elm_entry.h index e59deecd44..422585918e 100644 --- a/legacy/elementary/src/lib/elm_entry.h +++ b/legacy/elementary/src/lib/elm_entry.h @@ -1132,6 +1132,14 @@ EAPI void elm_entry_input_panel_show(Evas_Object *obj); */ EAPI void elm_entry_input_panel_hide(Evas_Object *obj); +/** + * Reset the input method context of the entry if needed. + * + * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior + * @param obj The entry object + */ +EAPI void elm_entry_imf_context_reset(Evas_Object *obj); + /* pre-made filters for entries */ /**