Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : libs/edje

Dir     : e17/libs/edje/src/lib


Modified Files:
        Edje.h edje_load.c 


Log Message:
convenience function for testing if groups are in an edje

===================================================================
RCS file: /cvs/e/e17/libs/edje/src/lib/Edje.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- Edje.h      19 Aug 2006 18:22:01 -0000      1.47
+++ Edje.h      2 Sep 2006 05:10:17 -0000       1.48
@@ -169,6 +169,7 @@
    /* edje_load.c */
    EAPI Evas_List   *edje_file_collection_list       (const char *file);
    EAPI void         edje_file_collection_list_free  (Evas_List *lst);
+   EAPI int          edje_file_group_exists          (const char *file, const 
char *glob);
    EAPI char        *edje_file_data_get              (const char *file, const 
char *key);
    EAPI void         edje_file_cache_set             (int count);
    EAPI int          edje_file_cache_get             (void);
===================================================================
RCS file: /cvs/e/e17/libs/edje/src/lib/edje_load.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -3 -r1.91 -r1.92
--- edje_load.c 27 Aug 2006 12:38:09 -0000      1.91
+++ edje_load.c 2 Sep 2006 05:10:17 -0000       1.92
@@ -433,6 +433,41 @@
      }
 }
 
+/** Determine whether a group matching glob exists in an edje file.
+ * @param file The file path
+ * @param glob A glob to match on 
+ *
+ * @return 1 if a match is found, 0 otherwise
+ */   
+EAPI int
+edje_file_group_exists(const char *file, const char *glob)
+{
+   Evas_List *lst = NULL;
+   Edje_File *edf;
+   int error_ret = 0;
+
+   if ((!file) || (!*file)) return NULL;
+   edf = _edje_cache_file_coll_open(file, NULL, &error_ret, NULL);
+   if (edf != NULL)
+     {
+       if (edf->collection_dir)
+         {
+            Evas_List *l;
+       
+            for (l = edf->collection_dir->entries; l; l = l->next)
+              {
+                 Edje_Part_Collection_Directory_Entry *ce;
+            
+                 ce = l->data;
+                 if (_edje_glob_match(ce->entry, glob)) return 1;
+              }
+         }
+       _edje_cache_file_unref(edf);   
+     }
+   return 0;
+}
+
+
 /* FIXDOC: Verify/Expand */
 /** Get edje file data
  * @param file The file



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to