xartigas pushed a commit to branch master.

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

commit 1d27c9d2e4c528cfd7633d74e10d5d1480fb1b6c
Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Oct 2 12:13:10 2019 +0200

    edje/edit: add api for checking 'required' property of parts
    
    Summary: this is useful for verifying api compliance
    
    Reviewers: cedric
    
    Reviewed By: cedric
    
    Subscribers: segfaultxavi, cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D10055
---
 src/lib/edje/Edje_Edit.h | 11 +++++++++++
 src/lib/edje/edje_edit.c |  7 +++++++
 2 files changed, 18 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 3803a64d0d..b08a85246d 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -1878,6 +1878,17 @@ EAPI Eina_Bool 
edje_edit_part_mouse_events_get(Evas_Object *obj, const char *par
  */
 EAPI Eina_Bool edje_edit_part_mouse_events_set(Evas_Object *obj, const char 
*part, Eina_Bool mouse_events);
 
+/**
+ * @brief Gets required value for part.
+ *
+ * @param obj Object being edited.
+ * @param part Part to get if the part is required by API.
+ *
+ * @return @c EINA_TRUE if part is required by the object's implementation, @c 
EINA_FALSE otherwise.
+ * @since 1.23
+ */
+EAPI Eina_Bool edje_edit_part_required_get(Evas_Object *obj, const char *part);
+
 /**
  * @brief Gets anti-aliasing for part.
  *
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index ef58e91511..1aa5eb8633 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -3873,6 +3873,13 @@ edje_edit_part_mouse_events_set(Evas_Object *obj, const 
char *part, Eina_Bool mo
    return EINA_TRUE;
 }
 
+EAPI Eina_Bool
+edje_edit_part_required_get(Evas_Object *obj, const char *part)
+{
+   GET_RP_OR_RETURN(EINA_FALSE);
+   return rp->part->required;
+}
+
 EAPI Eina_Bool
 edje_edit_part_anti_alias_get(Evas_Object *obj, const char *part)
 {

-- 


Reply via email to