furrymyad pushed a commit to branch master.

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

commit 2f6bdde1dd25f8ff405bd7469ade1ecf7feaa3cb
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue Apr 26 15:04:46 2016 +0300

    Edje_Edit: API to check if given name of "image set" is exist
    
    edje_edit_image_set_exists
---
 src/lib/edje/Edje_Edit.h | 20 ++++++++++++++++++++
 src/lib/edje/edje_edit.c | 26 ++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index 3de71a2..e8510cb 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -5515,6 +5515,26 @@ EAPI const char *edje_edit_font_path_get(Evas_Object 
*obj, const char *alias);
 
 //@}
 
/******************************************************************************/
+/************************   IMAGE SET API   
***********************************/
+/******************************************************************************/
+/** @name Image Set API
+ *  Functions to deal with image objects (see @ref edcref).
+ */ //@{
+
+/** Check if given image name is set of images or not.
+ *
+ * @param obj Object being edited.
+ * @param image a name to check if it is set or not.
+ *
+ * @return @c EINA_TRUE in case when given name is set, @c EINA_FALSE 
otherwise.
+ *
+ * @since 1.18
+ */
+EAPI Eina_Bool
+edje_edit_image_set_exists(Evas_Object *obj, const char *image);
+
+//@}
+/******************************************************************************/
 /**************************   IMAGES API   
************************************/
 
/******************************************************************************/
 /** @name Images API
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index fff3070..72588cd 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -8403,6 +8403,32 @@ edje_edit_state_proxy_source_get(Evas_Object *obj, const 
char *part, const char
    return eina_stringshare_add(source_name);
 }
 
+/*****************/
+/* IMAGE SET API */
+/*****************/
+
+EAPI Eina_Bool
+edje_edit_image_set_exists(Evas_Object *obj, const char *image)
+{
+   Edje_Image_Directory_Set *de;
+   unsigned int i;
+
+   GET_ED_OR_RETURN(EINA_FALSE);
+
+   if (!ed->file) return EINA_FALSE;
+   if (!ed->file->image_dir) return EINA_FALSE;
+
+   // Gets the Set Entry
+   for (i = 0; i < ed->file->image_dir->sets_count; ++i)
+     {
+        de = ed->file->image_dir->sets + i;
+        if (de->name && !strcmp(de->name, image))
+          return EINA_TRUE;
+     }
+
+   return EINA_FALSE;
+}
+
 /****************/
 /*  IMAGES API  */
 /****************/

-- 


Reply via email to