From: Jihoon Kim Date: Sun, 12 Sep 2010 06:17:10 +0000 (+0900) Subject: [scrolled_entry] add elm_scrolled_entry_autocapitalization_set X-Git-Tag: origin~228^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e316275cd16c38515a805935ab75d9e18952f082;p=framework%2Fuifw%2Felementary.git [scrolled_entry] add elm_scrolled_entry_autocapitalization_set --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index bbdcec0..7e801c4 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -1734,6 +1734,7 @@ extern "C" { EAPI void elm_scrolled_entry_input_panel_enabled_set(Evas_Object *obj, Eina_Bool enabled); EAPI void elm_scrolled_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layout layout); EAPI Ecore_IMF_Context *elm_scrolled_entry_imf_context_get(Evas_Object *obj); + EAPI void elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on); EAPI Evas_Object *elm_conformant_add(Evas_Object *parent); EAPI void elm_conformant_content_set(Evas_Object *obj, Evas_Object *content); diff --git a/src/lib/elc_scrolled_entry.c b/src/lib/elc_scrolled_entry.c index a2c5307..ce0fa4e 100644 --- a/src/lib/elc_scrolled_entry.c +++ b/src/lib/elc_scrolled_entry.c @@ -1054,3 +1054,21 @@ elm_scrolled_entry_input_panel_layout_set(Evas_Object *obj, Elm_Input_Panel_Layo elm_entry_input_panel_layout_set(wd->entry, layout); } +/** + * Set whether scrolled entry should support auto capitalization + * + * @param obj The entry object + * @param on If true, scrolled entry suports auto capitalization. + * + * @ingroup Scrolled_Entry + */ +EAPI void +elm_scrolled_entry_autocapitalization_set(Evas_Object *obj, Eina_Bool on) +{ + ELM_CHECK_WIDTYPE(obj, widtype); + Widget_Data *wd = elm_widget_data_get(obj); + if (!wd || !wd->entry) return; + + elm_entry_autocapitalization_set(wd->entry, on); +} + diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index e936faf..13b6280 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -1929,6 +1929,7 @@ elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); const char *t; + Ecore_IMF_Context *ic; if (!wd) return; if (wd->single_line == single_line) return; wd->single_line = single_line; @@ -1937,6 +1938,12 @@ elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line) t = eina_stringshare_add(elm_entry_entry_get(obj)); _elm_theme_object_set(obj, wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj)); elm_entry_entry_set(obj, t); + ic = elm_entry_imf_context_get(obj); + if (ic) + { + ecore_imf_context_input_panel_layout_set(ic, wd->input_panel_layout); + } + eina_stringshare_del(t); _sizing_eval(obj); } @@ -1993,6 +2000,7 @@ elm_entry_password_set(Evas_Object *obj, Eina_Bool password) { ELM_CHECK_WIDTYPE(obj, widtype); Widget_Data *wd = elm_widget_data_get(obj); + Ecore_IMF_Context *ic; const char *t; if (!wd) return; if (wd->password == password) return; @@ -2004,6 +2012,13 @@ elm_entry_password_set(Evas_Object *obj, Eina_Bool password) t = eina_stringshare_add(elm_entry_entry_get(obj)); _elm_theme_object_set(obj, wd->ent, "entry", _getbase(obj), elm_widget_style_get(obj)); elm_entry_entry_set(obj, t); + + ic = elm_entry_imf_context_get(obj); + if (ic) + { + ecore_imf_context_input_panel_layout_set(ic, wd->input_panel_layout); + } + eina_stringshare_del(t); _sizing_eval(obj); }