edje/style: append file prefix to textblock_style api that affects on file level

Summary:
All those api's are working on the Edje_file level so by appending the file prefix
and changing the argument to Edje_File leads to easy maintainability.

Depends on D9776

Reviewers: Hermet, ali.alzyod, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9777
This commit is contained in:
subhransu mohanty 2019-08-29 10:07:25 -04:00 committed by Mike Blumenkrantz
parent f442bdb3ee
commit 35e385a1ec
5 changed files with 15 additions and 15 deletions

View File

@ -562,7 +562,7 @@ _edje_file_open(const Eina_File *f, int *error_ret, time_t mtime, Eina_Bool coll
edf->references = 1;
/* This should be done at edje generation time */
_edje_textblock_style_parse_and_fix(edf);
_edje_file_textblock_style_parse_and_fix(edf);
edf->style_hash = eina_hash_string_small_new(NULL);
EINA_LIST_FOREACH(edf->styles, l, stl)

View File

@ -2280,7 +2280,7 @@ _edje_file_free(Edje_File *edf)
if (edf->free_strings && edf->compiler) eina_stringshare_del(edf->compiler);
if (edf->free_strings) eina_stringshare_del(edf->id);
eina_hash_free(edf->style_hash);
_edje_textblock_style_cleanup(edf);
_edje_file_textblock_style_cleanup(edf);
if (edf->ef) eet_close(edf->ef);
if (edf->f) eina_file_close(edf->f); // close matching open (in _edje_file_open) OK
free(edf);

View File

@ -2793,10 +2793,10 @@ void _edje_textblock_styles_add(Edje *ed, Edje_Real_Part *ep);
void _edje_textblock_styles_del(Edje *ed, Edje_Part *pt);
// Edje File level textblock style api
void _edje_textblock_style_all_update(Edje *ed);
void _edje_textblock_style_all_update_text_class(Edje *ed, const char *text_class);
void _edje_textblock_style_parse_and_fix(Edje_File *edf);
void _edje_textblock_style_cleanup(Edje_File *edf);
void _edje_file_textblock_style_all_update(Edje_File *ed);
void _edje_file_textblock_style_all_update_text_class(Edje_File *edf, const char *text_class);
void _edje_file_textblock_style_parse_and_fix(Edje_File *edf);
void _edje_file_textblock_style_cleanup(Edje_File *edf);
Edje_File *_edje_cache_file_coll_open(const Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed);
void _edje_cache_coll_clean(Edje_File *edf);

View File

@ -504,7 +504,7 @@ _efl_canvas_layout_efl_observer_update(Eo *obj EINA_UNUSED, Edje *ed, Efl_Object
}
else if (obs == _edje_text_class_member)
{
_edje_textblock_style_all_update_text_class(ed, key);
_edje_file_textblock_style_all_update_text_class(ed->file, key);
#ifdef EDJE_CALC_CACHE
ed->text_part_change = EINA_TRUE;
#endif

View File

@ -237,14 +237,14 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl)
* @param ed The edje containing styles which need to be updated
*/
void
_edje_textblock_style_all_update(Edje *ed)
_edje_file_textblock_style_all_update(Edje_File *edf)
{
Eina_List *l;
Edje_Style *stl;
if (!ed->file) return;
if (!edf) return;
EINA_LIST_FOREACH(ed->file->styles, l, stl)
EINA_LIST_FOREACH(edf->styles, l, stl)
if (stl && !stl->readonly) stl->cache = EINA_FALSE;
}
@ -390,15 +390,15 @@ _edje_textblock_style_get(Edje *ed, const char *style)
* updates them.
*/
void
_edje_textblock_style_all_update_text_class(Edje *ed, const char *text_class)
_edje_file_textblock_style_all_update_text_class(Edje_File *edf, const char *text_class)
{
Eina_List *l, *ll;
Edje_Style *stl;
if (!ed->file) return;
if (!edf) return;
if (!text_class) return;
EINA_LIST_FOREACH(ed->file->styles, l, stl)
EINA_LIST_FOREACH(edf->styles, l, stl)
{
Edje_Style_Tag *tag;
@ -426,7 +426,7 @@ _edje_textblock_style_all_update_text_class(Edje *ed, const char *text_class)
* followed by a list of tags.
*/
void
_edje_textblock_style_parse_and_fix(Edje_File *edf)
_edje_file_textblock_style_parse_and_fix(Edje_File *edf)
{
Eina_List *l, *ll;
Edje_Style *stl;
@ -498,7 +498,7 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
}
void
_edje_textblock_style_cleanup(Edje_File *edf)
_edje_file_textblock_style_cleanup(Edje_File *edf)
{
Edje_Style *stl;