[entry] Add 3 APIs of User Style (svn 71557)
authorThiep Ha <thiep.ha@samsung.com>
Thu, 31 May 2012 05:46:46 +0000 (14:46 +0900)
committerThiep Ha <thiep.ha@samsung.com>
Thu, 31 May 2012 05:46:46 +0000 (14:46 +0900)
Change-Id: I9e9603f979b100d764d43042a436f6d163995038

AUTHORS
src/lib/elm_entry.c
src/lib/elm_entry.h

diff --git a/AUTHORS b/AUTHORS
index 9bad23e..f923a26 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -54,3 +54,4 @@ Goun Lee <gouni.lee@samsung.com>
 Mikael Sans <sans.mikael@gmail.com>
 Doyoun Kang <doyoun.kang@samsung.com>
 M.V.K. Sumanth <sumanth.m@samsung.com> <mvksumanth@gmail.com>
+Thiep Ha <thiep.ha@samsung.com>
index 0f5d22c..1974a67 100644 (file)
@@ -3143,6 +3143,35 @@ void elm_entry_extension_module_data_get(Evas_Object *obj,Elm_Entry_Extension_da
 }
 
 EAPI void
+elm_entry_text_style_user_push(Evas_Object *obj, const char *style)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   edje_object_part_text_style_user_push(wd->ent, "elm.text", style);
+   _theme_hook(obj);
+}
+
+EAPI void
+elm_entry_text_style_user_pop(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   edje_object_part_text_style_user_pop(wd->ent, "elm.text");
+   _theme_hook(obj);
+}
+
+EAPI const char*
+elm_entry_text_style_user_peek(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return edje_object_part_text_style_user_peek(wd->ent, "elm.text");
+}
+
+EAPI void
 elm_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
index 1ab29a7..c730592 100644 (file)
@@ -459,6 +459,36 @@ typedef Edje_Entry_Change_Info Elm_Entry_Change_Info;
 EAPI Evas_Object       *elm_entry_add(Evas_Object *parent);
 
 /**
+ * Push the style to the top of user style stack.
+ * If there is styles in the user style stack, the properties in the top style
+ * of user style stack will replace the properties in current theme.
+ * The input style is specified in format tag='property=value' (i.e. DEFAULT='font=Sans font_size=60'hilight=' + font_weight=Bold').
+ *
+ * @param obj The entry object
+ * @param style The style user to push
+ */
+EAPI void      elm_entry_text_style_user_push(Evas_Object *obj, const char *style);
+
+/**
+ * Remove the style in the top of user style stack.
+ *
+ * @param  obj The entry object
+ *
+ * @see elm_entry_text_style_user_push()
+ */
+EAPI void     elm_entry_text_style_user_pop(Evas_Object *obj);
+
+/**
+ * Retrieve the style on the top of user style stack.
+ *
+ * @param obj The entry object
+ * @return style on the top of user style stack if exist, otherwise NULL.
+ *
+ * @see elm_entry_text_style_user_push()
+ */
+EAPI const char*      elm_entry_text_style_user_peek(const Evas_Object *obj);
+
+/**
  * Sets the entry to single line mode.
  *
  * In single line mode, entries don't ever wrap when the text reaches the