furrymyad pushed a commit to branch master.

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

commit e80d8d9a7134fdc00fc2ea791205eee5d208e175
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue May 10 17:30:03 2016 +0300

    Edje_Edit: more API for proxy fields like source_clip and source_visible
    
    Setters and getters like
    edje_edit_state_proxy_source_clip_set
    edje_edit_state_proxy_source_clip_get
    edje_edit_state_proxy_source_visible_set
    edje_edit_state_proxy_source_visible_get
---
 src/lib/edje/Edje_Edit.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/lib/edje/edje_edit.c | 50 ++++++++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 9b29a88..8a6996f 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -5008,6 +5008,72 @@ EAPI Eina_Bool 
edje_edit_state_proxy_source_set(Evas_Object *obj, const char *pa
  */
 EAPI Eina_Stringshare * edje_edit_state_proxy_source_get(Evas_Object *obj, 
const char *part, const char *state, double value);
 
+/** Set the source clip for given PROXY part state.
+ *
+ * The source clipper is ignored or used when rendering the proxy part.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state.
+ * @param value The state value.
+ * @param clip Value to set if ignore or use source cliper.
+ *
+ * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
+ * @since 1.18
+ */
+EAPI Eina_Bool
+edje_edit_state_proxy_source_clip_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool clip);
+
+/** Get the source clip for given PROXY part state.
+ *
+ * The source clipper is ignored or used when rendering the proxy part.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state.
+ * @param value The state value.
+ *
+ * @return @c EINA_TRUE in case if source clipper is used, @c EINA_FALSE 
otherwise.
+ * @since 1.18
+ */
+EAPI Eina_Bool
+edje_edit_state_proxy_source_clip_get(Evas_Object *obj, const char *part, 
const char *state, double value);
+
+/** Set the source visibility for given PROXY part state.
+ *
+ * Defines if both the proxy and its source object will be visible or not.
+ * In case of false flag, the source object will not be visible at all while
+ * proxy will still show source object.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state.
+ * @param value The state value.
+ * @param visibility Value to set if source object is visible or not.
+ *
+ * @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
+ * @since 1.18
+ */
+EAPI Eina_Bool
+edje_edit_state_proxy_source_visible_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool visibility);
+
+/** Get the source visibility for given PROXY part state.
+ *
+ * Defines if both the proxy and its source object will be visible or not.
+ * In case of false flag, the source object will not be visible at all while
+ * proxy will still show source object.
+ *
+ * @param obj Object being edited.
+ * @param part Part that contain state.
+ * @param state The name of the state.
+ * @param value The state value.
+ *
+ * @return @c EINA_TRUE in case when source object visibility is set to true, 
@c EINA_FALSE otherwise.
+ * @since 1.18
+ */
+EAPI Eina_Bool
+edje_edit_state_proxy_source_visible_get(Evas_Object *obj, const char *part, 
const char *state, double value);
+
 //@}
 
/******************************************************************************/
 /**************************   TEXT API   ************************************/
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 38a26e0..f522758 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -8436,6 +8436,56 @@ edje_edit_state_proxy_source_get(Evas_Object *obj, const 
char *part, const char
    return eina_stringshare_add(source_name);
 }
 
+EAPI Eina_Bool
+edje_edit_state_proxy_source_clip_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool clip)
+{
+   GET_PD_OR_RETURN(EINA_FALSE);
+   if (rp->part->type != EDJE_PART_TYPE_PROXY)
+     return EINA_FALSE;
+
+   Edje_Part_Description_Proxy *proxy_part = (Edje_Part_Description_Proxy *)pd;
+   proxy_part->proxy.source_clip = clip;
+
+   return EINA_TRUE;
+}
+
+EAPI Eina_Bool
+edje_edit_state_proxy_source_clip_get(Evas_Object *obj, const char *part, 
const char *state, double value)
+{
+   GET_PD_OR_RETURN(EINA_FALSE);
+   if (rp->part->type != EDJE_PART_TYPE_PROXY)
+     return EINA_FALSE;
+
+   Edje_Part_Description_Proxy *proxy_part = (Edje_Part_Description_Proxy *)pd;
+
+   return proxy_part->proxy.source_clip;
+}
+
+EAPI Eina_Bool
+edje_edit_state_proxy_source_visible_set(Evas_Object *obj, const char *part, 
const char *state, double value, Eina_Bool visibility)
+{
+   GET_PD_OR_RETURN(EINA_FALSE);
+   if (rp->part->type != EDJE_PART_TYPE_PROXY)
+     return EINA_FALSE;
+
+   Edje_Part_Description_Proxy *proxy_part = (Edje_Part_Description_Proxy *)pd;
+   proxy_part->proxy.source_visible = visibility;
+
+   return EINA_TRUE;
+}
+
+EAPI Eina_Bool
+edje_edit_state_proxy_source_visible_get(Evas_Object *obj, const char *part, 
const char *state, double value)
+{
+   GET_PD_OR_RETURN(EINA_FALSE);
+   if (rp->part->type != EDJE_PART_TYPE_PROXY)
+     return EINA_FALSE;
+
+   Edje_Part_Description_Proxy *proxy_part = (Edje_Part_Description_Proxy *)pd;
+
+   return proxy_part->proxy.source_visible;
+}
+
 /*****************/
 /* IMAGE SET API */
 /*****************/

-- 


Reply via email to