summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_text.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-05 19:40:24 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-07 17:33:18 +0900
commita25b212baca1afc0e2a5e0e85061493967bba4ff (patch)
tree03caa156a08b0d33aeac68ec3049462a73fb437a /src/lib/edje/edje_text.c
parent08f2624e6a0421962fbd2e05cb37beb7b23befd7 (diff)
Evas filters: Add support for proxies in Edje
They will be defined with the following syntax: buffer:buf(src=part);
Diffstat (limited to 'src/lib/edje/edje_text.c')
-rw-r--r--src/lib/edje/edje_text.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index dd9f80b..2d3a38d 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -169,7 +169,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
169 char *font2 = NULL; 169 char *font2 = NULL;
170 char *sfont = NULL; 170 char *sfont = NULL;
171 int size; 171 int size;
172 const char *filter; 172 const char *filter, *source_name;
173 Eina_List *filter_sources = NULL, *prev_sources = NULL, *li;
173 Evas_Coord tw, th; 174 Evas_Coord tw, th;
174 Evas_Coord sw, sh; 175 Evas_Coord sw, sh;
175 int inlined_font = 0, free_text = 0; 176 int inlined_font = 0, free_text = 0;
@@ -188,6 +189,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
188 if (ep->typedata.text->font) font = ep->typedata.text->font; 189 if (ep->typedata.text->font) font = ep->typedata.text->font;
189 if (ep->typedata.text->size > 0) size = ep->typedata.text->size; 190 if (ep->typedata.text->size > 0) size = ep->typedata.text->size;
190 if (ep->typedata.text->filter) filter = ep->typedata.text->filter; 191 if (ep->typedata.text->filter) filter = ep->typedata.text->filter;
192 if (ep->typedata.text->filter_sources != chosen_desc->text.filter_sources)
193 {
194 prev_sources = ep->typedata.text->filter_sources;
195 filter_sources = chosen_desc->text.filter_sources;
196 ep->typedata.text->filter_sources = chosen_desc->text.filter_sources;
197 }
191 198
192 if (ep->typedata.text->text_source) 199 if (ep->typedata.text->text_source)
193 { 200 {
@@ -421,9 +428,19 @@ arrange_text:
421 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 428 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
422 eo_do(ep->object, 429 eo_do(ep->object,
423 evas_obj_text_font_set(font, size), 430 evas_obj_text_font_set(font, size),
424 evas_obj_text_filter_program_set(filter),
425 evas_obj_text_text_set(text)); 431 evas_obj_text_text_set(text));
426 part_get_geometry(ep, &tw, &th); 432 part_get_geometry(ep, &tw, &th);
433
434 /* filters */
435 EINA_LIST_FOREACH(prev_sources, li, source_name)
436 eo_do(ep->object, evas_obj_text_filter_source_set(source_name, NULL));
437 EINA_LIST_FOREACH(filter_sources, li, source_name)
438 {
439 Edje_Real_Part *rp = _edje_real_part_get(ed, source_name);
440 eo_do(ep->object, evas_obj_text_filter_source_set(source_name, rp ? rp->object : NULL));
441 }
442 eo_do(ep->object, evas_obj_text_filter_program_set(filter));
443
427 /* Handle alignment */ 444 /* Handle alignment */
428 { 445 {
429 FLOAT_T align_x; 446 FLOAT_T align_x;