Edje_Edit: more API for proxy fields like source_clip and source_visible
authorVitalii Vorobiov <vi.vorobiov@samsung.com>
Tue, 10 May 2016 14:30:03 +0000 (17:30 +0300)
committerVitalii Vorobiov <vi.vorobiov@samsung.com>
Thu, 12 May 2016 16:31:49 +0000 (19:31 +0300)
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
src/lib/edje/edje_edit.c

index 9b29a88..8a6996f 100644 (file)
@@ -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   ************************************/
index 38a26e0..f522758 100644 (file)
@@ -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 */
 /*****************/