cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e69929321fae799b136b3749f0952604ab9a0baa

commit e69929321fae799b136b3749f0952604ab9a0baa
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Thu Dec 19 22:48:03 2013 +0900

    edje: edje_edit - adding getter and setter for smooth parameter
    
    This commit will add API for working with smooth for image
    and proxy part type.
    There are two functions will be added:
    
    1. edje_edit_state_fill_smooth_get
    2. edje_edit_state_fill_smooth_set
    
    Reviewers: cedric, raster, seoz
    
    Reviewed By: cedric
    
    CC: cedric
    
    Differential Revision: https://phab.enlightenment.org/D394
    
    Signed-off-by: Cedric BAIL <cedric.b...@samsung.com>
---
 src/lib/edje/Edje_Edit.h | 26 +++++++++++++++++++++++++
 src/lib/edje/edje_edit.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 72d96f1..0d07211 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -1978,6 +1978,32 @@ EAPI unsigned char 
edje_edit_state_aspect_pref_get(Evas_Object *obj, const char
  */
 EAPI Eina_Bool edje_edit_state_aspect_pref_set(Evas_Object *obj, const char 
*part, const char *state, double value, unsigned char pref);
 
+/** Get the smooth property for given part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to get the fill horizontal origin 
relative to area (not including the state value).
+ * @param value The state value.
+ *
+ * @return The smooth value.
+ */
+EAPI Eina_Bool
+edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char 
*state, double value);
+
+
+/** Set the smooth property for given part state.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state to set fill horizontal origin relative 
to area (not including the state value).
+ * @param value The state value.
+ * @param smooth The smooth value.
+ *
+ * @return EINA_TRUE if the parameter was found, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool
+edje_edit_state_fill_smooth_set(Evas_Object *obj, const char *part, const char 
*state, double value, Eina_Bool smooth);
+
 /** Get the fill horizontal origin relative value of a part state.
  *
  * @param obj Object being edited.
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 07a684a..1f7cddb 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3770,6 +3770,56 @@ FUNC_STATE_BOOL(fixed, h);
 FUNC_STATE_DOUBLE(aspect, min);
 FUNC_STATE_DOUBLE(aspect, max);
 
+EAPI Eina_Bool
+edje_edit_state_fill_smooth_get(Evas_Object *obj, const char *part, const char 
*state, double value)
+{
+   GET_PD_OR_RETURN(EINA_FALSE)
+
+   switch (rp->part->type)
+     {
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *img;
+           img = (Edje_Part_Description_Image*) pd;
+           return img->image.fill.smooth;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *pro;
+           pro = (Edje_Part_Description_Proxy*) pd;
+           return pro->proxy.fill.smooth;
+        }
+     }
+
+   return EINA_FALSE;
+}
+
+EAPI Eina_Bool
+edje_edit_state_fill_smooth_set(Evas_Object *obj, const char *part, const char 
*state, double value, Eina_Bool smooth)
+{
+   GET_PD_OR_RETURN(EINA_FALSE)
+
+   switch (rp->part->type)
+     {
+      case EDJE_PART_TYPE_IMAGE:
+        {
+           Edje_Part_Description_Image *img;
+           img = (Edje_Part_Description_Image*) pd;
+           img->image.fill.smooth = smooth;
+           return EINA_TRUE;
+        }
+      case EDJE_PART_TYPE_PROXY:
+        {
+           Edje_Part_Description_Proxy *pro;
+           pro = (Edje_Part_Description_Proxy*) pd;
+           pro->proxy.fill.smooth = smooth;
+           return EINA_TRUE;
+        }
+     }
+
+   return EINA_FALSE;
+}
+
 #define FUNC_STATE_DOUBLE_FILL(Class, Type, Value)                     \
   EAPI double                                                          \
   edje_edit_state_fill_##Type##_relative_##Value##_get(Evas_Object *obj, const 
char *part, const char *state, double value) \

-- 


Reply via email to