On Tue, Mar 31, 2015 at 11:27 PM, Davide Andreoli <[email protected]> wrote: > 2015-03-31 21:58 GMT+02:00 Cedric BAIL <[email protected]>: >> cedric pushed a commit to branch master. >> >> http://git.enlightenment.org/core/efl.git/commit/?id=11a4e1ae83e74b55aef0fe42e93d7d0651085dfd >> >> commit 11a4e1ae83e74b55aef0fe42e93d7d0651085dfd >> Author: Cedric BAIL <[email protected]> >> Date: Tue Mar 31 21:57:23 2015 +0200 >> >> edje: add edje_mmap_color_class_iterator_new(). >> >> This function make it possible to list the Color class of a specific >> Edje file. >> --- >> src/lib/edje/Edje_Common.h | 10 ++++++++- >> src/lib/edje/edje_util.c | 56 >> ++++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 65 insertions(+), 1 deletion(-) >> >> diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h >> index 850a9f8..db91730 100644 >> --- a/src/lib/edje/Edje_Common.h >> +++ b/src/lib/edje/Edje_Common.h >> @@ -1263,7 +1263,7 @@ EAPI Eina_List *edje_color_class_list >> (void); >> /** >> * @brief Iterate over all the active class of an application. >> * >> - * @return Return an iterator of Edje_Color_Class of the currently active >> color class >> + * @return an iterator of Edje_Color_Class of the currently active color >> class >> * >> * This function only iterate over the Edje_Color_Class in use by >> * an application. >> @@ -1271,6 +1271,14 @@ EAPI Eina_List *edje_color_class_list >> (void); >> EAPI Eina_Iterator *edje_color_class_active_iterator_new(void); >> >> /** >> + * @brief Iterate over all the color class provided by an Edje file. >> + * >> + * @return an iterator of Edje_Color_Class provided by the Edje file. >> + */ >> +EAPI Eina_Iterator *edje_mmap_color_class_iterator_new(Eina_File *f) > > This new API seems quite "alien" to me... > 2 questions: > * do we really need the _mmap_ part in the name?
Not sure, but it is to make a difference with the file version who are taking a const char *. > * why the param is an Eina_File? I cannot remember of other edje api like > this, all the other funcs that access the whole edj use the a char* Passing an Eina_File make it possible to avoid any race condition and you are sure to get the result associated with the file you are manipulating from the start. Elementary, Edje and Evas just pass Eina_File down to be sure that everyone is talking about the same content. A side benefit is to reduce the number of syscall at initialization time as you can open the file once and just recycle that around. -- Cedric BAIL ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
