summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Vorobiov <vi.vorobiov@samsung.com>2016-05-10 17:30:03 +0300
committerVitalii Vorobiov <vi.vorobiov@samsung.com>2016-05-12 19:31:49 +0300
commite80d8d9a7134fdc00fc2ea791205eee5d208e175 (patch)
tree7c9a8e2e6a0dbf64c03ddb5415af00da50887417
parentb5b4ffa07cb37d42c66cc1c8e3106b45a6de5714 (diff)
downloadefl-e80d8d9a7134fdc00fc2ea791205eee5d208e175.tar.gz
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
-rw-r--r--src/lib/edje/Edje_Edit.h66
-rw-r--r--src/lib/edje/edje_edit.c50
2 files changed, 116 insertions, 0 deletions
diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 9b29a88fa2..8a6996f6a3 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 38a26e02dc..f5227582e5 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 */
/*****************/