summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2019-08-29 10:07:25 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-29 13:21:11 -0400
commit35e385a1ec8d5193922ff478eb8fbf6f0cb6332e (patch)
tree4fd2442b52bb760b003c8366986e3108667ae412
parentf442bdb3ee3c935aababd798c5b22b9a8064191e (diff)
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
-rw-r--r--src/lib/edje/edje_cache.c2
-rw-r--r--src/lib/edje/edje_load.c2
-rw-r--r--src/lib/edje/edje_private.h8
-rw-r--r--src/lib/edje/edje_smart.c2
-rw-r--r--src/lib/edje/edje_textblock_styles.c16
5 files changed, 15 insertions, 15 deletions
diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c
index a48ee85..20ae174 100644
--- a/src/lib/edje/edje_cache.c
+++ b/src/lib/edje/edje_cache.c
@@ -562,7 +562,7 @@ _edje_file_open(const Eina_File *f, int *error_ret, time_t mtime, Eina_Bool coll
562 edf->references = 1; 562 edf->references = 1;
563 563
564 /* This should be done at edje generation time */ 564 /* This should be done at edje generation time */
565 _edje_textblock_style_parse_and_fix(edf); 565 _edje_file_textblock_style_parse_and_fix(edf);
566 566
567 edf->style_hash = eina_hash_string_small_new(NULL); 567 edf->style_hash = eina_hash_string_small_new(NULL);
568 EINA_LIST_FOREACH(edf->styles, l, stl) 568 EINA_LIST_FOREACH(edf->styles, l, stl)
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 176cc3b..d719b10 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -2280,7 +2280,7 @@ _edje_file_free(Edje_File *edf)
2280 if (edf->free_strings && edf->compiler) eina_stringshare_del(edf->compiler); 2280 if (edf->free_strings && edf->compiler) eina_stringshare_del(edf->compiler);
2281 if (edf->free_strings) eina_stringshare_del(edf->id); 2281 if (edf->free_strings) eina_stringshare_del(edf->id);
2282 eina_hash_free(edf->style_hash); 2282 eina_hash_free(edf->style_hash);
2283 _edje_textblock_style_cleanup(edf); 2283 _edje_file_textblock_style_cleanup(edf);
2284 if (edf->ef) eet_close(edf->ef); 2284 if (edf->ef) eet_close(edf->ef);
2285 if (edf->f) eina_file_close(edf->f); // close matching open (in _edje_file_open) OK 2285 if (edf->f) eina_file_close(edf->f); // close matching open (in _edje_file_open) OK
2286 free(edf); 2286 free(edf);
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 55ccd4d..eeee348 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2793,10 +2793,10 @@ void _edje_textblock_styles_add(Edje *ed, Edje_Real_Part *ep);
2793void _edje_textblock_styles_del(Edje *ed, Edje_Part *pt); 2793void _edje_textblock_styles_del(Edje *ed, Edje_Part *pt);
2794 2794
2795// Edje File level textblock style api 2795// Edje File level textblock style api
2796void _edje_textblock_style_all_update(Edje *ed); 2796void _edje_file_textblock_style_all_update(Edje_File *ed);
2797void _edje_textblock_style_all_update_text_class(Edje *ed, const char *text_class); 2797void _edje_file_textblock_style_all_update_text_class(Edje_File *edf, const char *text_class);
2798void _edje_textblock_style_parse_and_fix(Edje_File *edf); 2798void _edje_file_textblock_style_parse_and_fix(Edje_File *edf);
2799void _edje_textblock_style_cleanup(Edje_File *edf); 2799void _edje_file_textblock_style_cleanup(Edje_File *edf);
2800 2800
2801Edje_File *_edje_cache_file_coll_open(const Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed); 2801Edje_File *_edje_cache_file_coll_open(const Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed);
2802void _edje_cache_coll_clean(Edje_File *edf); 2802void _edje_cache_coll_clean(Edje_File *edf);
diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c
index 3a25b75..16e4dbd 100644
--- a/src/lib/edje/edje_smart.c
+++ b/src/lib/edje/edje_smart.c
@@ -504,7 +504,7 @@ _efl_canvas_layout_efl_observer_update(Eo *obj EINA_UNUSED, Edje *ed, Efl_Object
504 } 504 }
505 else if (obs == _edje_text_class_member) 505 else if (obs == _edje_text_class_member)
506 { 506 {
507 _edje_textblock_style_all_update_text_class(ed, key); 507 _edje_file_textblock_style_all_update_text_class(ed->file, key);
508#ifdef EDJE_CALC_CACHE 508#ifdef EDJE_CALC_CACHE
509 ed->text_part_change = EINA_TRUE; 509 ed->text_part_change = EINA_TRUE;
510#endif 510#endif
diff --git a/src/lib/edje/edje_textblock_styles.c b/src/lib/edje/edje_textblock_styles.c
index 09a0339..22bc7ae 100644
--- a/src/lib/edje/edje_textblock_styles.c
+++ b/src/lib/edje/edje_textblock_styles.c
@@ -237,14 +237,14 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl)
237 * @param ed The edje containing styles which need to be updated 237 * @param ed The edje containing styles which need to be updated
238 */ 238 */
239void 239void
240_edje_textblock_style_all_update(Edje *ed) 240_edje_file_textblock_style_all_update(Edje_File *edf)
241{ 241{
242 Eina_List *l; 242 Eina_List *l;
243 Edje_Style *stl; 243 Edje_Style *stl;
244 244
245 if (!ed->file) return; 245 if (!edf) return;
246 246
247 EINA_LIST_FOREACH(ed->file->styles, l, stl) 247 EINA_LIST_FOREACH(edf->styles, l, stl)
248 if (stl && !stl->readonly) stl->cache = EINA_FALSE; 248 if (stl && !stl->readonly) stl->cache = EINA_FALSE;
249} 249}
250 250
@@ -390,15 +390,15 @@ _edje_textblock_style_get(Edje *ed, const char *style)
390 * updates them. 390 * updates them.
391 */ 391 */
392void 392void
393_edje_textblock_style_all_update_text_class(Edje *ed, const char *text_class) 393_edje_file_textblock_style_all_update_text_class(Edje_File *edf, const char *text_class)
394{ 394{
395 Eina_List *l, *ll; 395 Eina_List *l, *ll;
396 Edje_Style *stl; 396 Edje_Style *stl;
397 397
398 if (!ed->file) return; 398 if (!edf) return;
399 if (!text_class) return; 399 if (!text_class) return;
400 400
401 EINA_LIST_FOREACH(ed->file->styles, l, stl) 401 EINA_LIST_FOREACH(edf->styles, l, stl)
402 { 402 {
403 Edje_Style_Tag *tag; 403 Edje_Style_Tag *tag;
404 404
@@ -426,7 +426,7 @@ _edje_textblock_style_all_update_text_class(Edje *ed, const char *text_class)
426 * followed by a list of tags. 426 * followed by a list of tags.
427 */ 427 */
428void 428void
429_edje_textblock_style_parse_and_fix(Edje_File *edf) 429_edje_file_textblock_style_parse_and_fix(Edje_File *edf)
430{ 430{
431 Eina_List *l, *ll; 431 Eina_List *l, *ll;
432 Edje_Style *stl; 432 Edje_Style *stl;
@@ -498,7 +498,7 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
498} 498}
499 499
500void 500void
501_edje_textblock_style_cleanup(Edje_File *edf) 501_edje_file_textblock_style_cleanup(Edje_File *edf)
502{ 502{
503 Edje_Style *stl; 503 Edje_Style *stl;
504 504