From a86e7422f0b8481c22e29a3b3976ab34e952c310 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 26 Mar 2013 21:35:10 +0900 Subject: [PATCH] [entry] Add elm_entry_input_panel_layout_variation_{set/get} API Change-Id: I0d456b3b71fbae0ce739629f6010337a28e9e40a --- src/lib/elm_entry.c | 24 ++++++++++++++++++++++++ src/lib/elm_entry.h | 33 +++++++++++++++++++++++++++++++++ src/lib/elm_widget_entry.h | 1 + 3 files changed, 58 insertions(+) diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index 3f22532..bdb2274 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -1097,6 +1097,8 @@ _elm_entry_smart_theme(Evas_Object *obj) edje_object_part_text_input_panel_layout_set (sd->entry_edje, "elm.text", sd->input_panel_layout); + edje_object_part_text_input_panel_layout_variation_set + (sd->entry_edje, "elm.text", sd->input_panel_layout_variation); edje_object_part_text_autocapital_type_set (sd->entry_edje, "elm.text", sd->autocapital_type); edje_object_part_text_prediction_allow_set @@ -5205,6 +5207,28 @@ elm_entry_input_panel_layout_get(const Evas_Object *obj) } EAPI void +elm_entry_input_panel_layout_variation_set(Evas_Object *obj, + int variation) +{ + ELM_ENTRY_CHECK(obj); + ELM_ENTRY_DATA_GET(obj, sd); + + sd->input_panel_layout_variation = variation; + + edje_object_part_text_input_panel_layout_variation_set + (sd->entry_edje, "elm.text", variation); +} + +EAPI int +elm_entry_input_panel_layout_variation_get(const Evas_Object *obj) +{ + ELM_ENTRY_CHECK(obj) 0; + ELM_ENTRY_DATA_GET(obj, sd); + + return sd->input_panel_layout_variation; +} + +EAPI void elm_entry_autocapital_type_set(Evas_Object *obj, Elm_Autocapital_Type autocapital_type) { diff --git a/src/lib/elm_entry.h b/src/lib/elm_entry.h index 4ea9a3e..b72a431 100644 --- a/src/lib/elm_entry.h +++ b/src/lib/elm_entry.h @@ -320,6 +320,14 @@ typedef enum ELM_INPUT_PANEL_LAYOUT_PASSWORD /**< Like normal, but no auto-correct, no auto-capitalization etc. */ } Elm_Input_Panel_Layout; /**< Type of input panel (virtual keyboard) to use - this is a hint and may not provide exactly what is desired. */ +enum +{ + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_NORMAL, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_DECIMAL, + ELM_INPUT_PANEL_LAYOUT_NUMBERONLY_VARIATION_SIGNED_AND_DECIMAL +}; + /** * @typedef Elm_Input_Panel_Lang * @@ -1413,6 +1421,31 @@ EAPI void elm_entry_input_panel_layout_set(Evas_Object *obj, E EAPI Elm_Input_Panel_Layout elm_entry_input_panel_layout_get(const Evas_Object *obj); /** + * Set the input panel layout variation of the entry + * + * @param obj The entry object + * @param variation layout variation type + * + * @ingroup Entry + * @since 1.8 + */ +EAPI void elm_entry_input_panel_layout_variation_set(Evas_Object *obj, int variation); + +/** + * Get the input panel layout variation of the entry + * + * @param obj The entry object + * @return layout variation type + * + * @see elm_entry_input_panel_layout_variation_set + * + * @ingroup Entry + * @since 1.8 + */ +EAPI int elm_entry_input_panel_layout_variation_get(const Evas_Object *obj); + + +/** * Set the autocapitalization type on the immodule. * * @param obj The entry object diff --git a/src/lib/elm_widget_entry.h b/src/lib/elm_widget_entry.h index fb83d56..9daa90c 100644 --- a/src/lib/elm_widget_entry.h +++ b/src/lib/elm_widget_entry.h @@ -166,6 +166,7 @@ struct _Elm_Entry_Smart_Data Elm_Input_Panel_Return_Key_Type input_panel_return_key_type; void *input_panel_imdata; int input_panel_imdata_len; + int input_panel_layout_variation; struct { Evas_Object *hover_parent; -- 2.7.4