jihoon pushed a commit to branch master.
commit 85b06ba3bd919ea079327c664ca24e570d300844
Author: Jihoon Kim <[email protected]>
Date: Wed Mar 27 17:34:19 2013 +0900
Add APIs - elm_entry_input_panel_layout_variation_set/get
---
ChangeLog | 4 ++++
NEWS | 1 +
src/lib/elm_entry.c | 45 +++++++++++++++++++++++++++++++++++
src/lib/elm_entry.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++
src/lib/elm_widget_entry.h | 1 +
5 files changed, 110 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 583036d..1b7f8d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1178,3 +1178,7 @@
* Add four more focus directions. ELM_FOCUS_UP/DOWN/RIGHT/LEFT.
* Add elm_object_focus_next_object_get/set.
* Add elm_object_focused_object_get.
+
+2013-03-27 Jihoon Kim
+
+ * Add elm_entry_input_panel_layout_variation_set/get API
diff --git a/NEWS b/NEWS
index 2a2fc15..33454ca 100644
--- a/NEWS
+++ b/NEWS
@@ -53,6 +53,7 @@ Additions:
* Add four more focus diretions. ELM_FOCUS_UP, ELM_FOCUS_DOWN,
ELM_FOCUS_RIGHT, ELM_FOCUS_LEFT.
* Add APIs - elm_object_focus_next_object_get,
elm_object_focus_next_object_set.
* Add API - elm_object_focused_object_get.
+ * Add APIs - elm_entry_input_panel_layout_variation_set/get
Improvements:
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c
index c7a9af9..5e5d420 100644
--- a/src/lib/elm_entry.c
+++ b/src/lib/elm_entry.c
@@ -519,6 +519,8 @@ _elm_entry_smart_theme(Eo *obj, void *_pd, va_list *list)
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
@@ -4716,6 +4718,45 @@ _input_panel_layout_get(Eo *obj EINA_UNUSED, void *_pd,
va_list *list)
}
EAPI void
+elm_entry_input_panel_layout_variation_set(Evas_Object *obj,
+ int variation)
+{
+ ELM_ENTRY_CHECK(obj);
+ eo_do(obj, elm_obj_entry_input_panel_layout_variation_set(variation));
+}
+
+static void
+_input_panel_layout_variation_set(Eo *obj EINA_UNUSED, void *_pd, va_list
*list)
+{
+ int variation = va_arg(*list, int);
+ Elm_Entry_Smart_Data *sd = _pd;
+
+ 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;
+ int ret = 0;
+ eo_do((Eo *) obj, elm_obj_entry_input_panel_layout_variation_get(&ret));
+
+ return ret;
+}
+
+static void
+_input_panel_layout_variation_get(Eo *obj EINA_UNUSED, void *_pd, va_list
*list)
+{
+ int *ret = va_arg(*list, int *);
+ Elm_Entry_Smart_Data *sd = _pd;
+
+ *ret = sd->input_panel_layout_variation;
+}
+
+EAPI void
elm_entry_autocapital_type_set(Evas_Object *obj,
Elm_Autocapital_Type autocapital_type)
{
@@ -5314,6 +5355,8 @@ _class_constructor(Eo_Class *klass)
EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_SET),
_anchor_hover_style_set),
EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_GET),
_anchor_hover_style_get),
EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END),
_anchor_hover_end),
+
EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET),
_input_panel_layout_variation_set),
+
EO_OP_FUNC(ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET),
_input_panel_layout_variation_get),
EO_OP_FUNC_SENTINEL
};
eo_class_funcs_set(klass, func_desc);
@@ -5407,6 +5450,8 @@ static const Eo_Op_Description op_desc[] = {
EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_SET, "Set the
style that the hover should use."),
EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_GET, "Get the
style that the hover should use."),
EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END, "Ends the hover
popup in the entry."),
+ EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET,
"Set the input panel layout variation of the entry."),
+ EO_OP_DESCRIPTION(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET,
"Get the input panel layout variation of the entry."),
EO_OP_DESCRIPTION_SENTINEL
};
diff --git a/src/lib/elm_entry.h b/src/lib/elm_entry.h
index 866eefb..eae1fb7 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
*
@@ -1334,6 +1342,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
@@ -1881,6 +1914,8 @@ enum
ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_SET,
ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_STYLE_GET,
ELM_OBJ_ENTRY_SUB_ID_ANCHOR_HOVER_END,
+ ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET,
+ ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET,
ELM_OBJ_ENTRY_SUB_ID_LAST
};
@@ -2627,6 +2662,30 @@ enum
#define elm_obj_entry_input_panel_layout_get(ret)
ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_GET),
EO_TYPECHECK(Elm_Input_Panel_Layout *, ret)
/**
+ * @def elm_obj_entry_input_panel_layout_variation_set
+ * @since 1.8
+ *
+ * Set the input panel layout variation of the entry
+ *
+ * @param[in] layout variation
+ *
+ * @see elm_entry_input_panel_layout_variation_set
+ */
+#define elm_obj_entry_input_panel_layout_variation_set(variation)
ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_SET),
EO_TYPECHECK(int, variation)
+
+/**
+ * @def elm_obj_entry_input_panel_layout_variation_get
+ * @since 1.8
+ *
+ * Get the input panel layout variation of the entry
+ *
+ * @param[out] ret
+ *
+ * @see elm_entry_input_panel_layout_variation_get
+ */
+#define elm_obj_entry_input_panel_layout_variation_get(ret)
ELM_OBJ_ENTRY_ID(ELM_OBJ_ENTRY_SUB_ID_INPUT_PANEL_LAYOUT_VARIATION_GET),
EO_TYPECHECK(int *, ret)
+
+/**
* @def elm_obj_entry_autocapital_type_set
* @since 1.8
*
diff --git a/src/lib/elm_widget_entry.h b/src/lib/elm_widget_entry.h
index 7460111..7d881c7 100644
--- a/src/lib/elm_widget_entry.h
+++ b/src/lib/elm_widget_entry.h
@@ -57,6 +57,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;
--
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d