summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-10 14:11:04 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-25 14:36:09 +0900
commit0e11e0a6dc097dc5c4a53fc6b79f5d4ae10099ad (patch)
tree28b3bb949ff5023040b510dbb3cb62469edd054e /src
parentf57929bf6ed4f9e0d20de2c90be663c48cfadd29 (diff)
Edje/evas filters: Quick renaming of evas filters related stuff
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc_handlers.c20
-rw-r--r--src/lib/edje/edje_data.c4
-rw-r--r--src/lib/edje/edje_load.c4
-rw-r--r--src/lib/edje/edje_private.h14
-rw-r--r--src/lib/edje/edje_text.c12
5 files changed, 29 insertions, 25 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 6a294cb0a8..2268190134 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -6696,13 +6696,13 @@ st_collections_group_parts_part_description_inherit(void)
6696 ted->text.domain = STRDUP(ted->text.domain); 6696 ted->text.domain = STRDUP(ted->text.domain);
6697 ted->text.text_class = STRDUP(ted->text.text_class); 6697 ted->text.text_class = STRDUP(ted->text.text_class);
6698 ted->text.font.str = STRDUP(ted->text.font.str); 6698 ted->text.font.str = STRDUP(ted->text.font.str);
6699 ted->text.filter.str = STRDUP(ted->text.filter.str); 6699 ted->text.filter.code = STRDUP(ted->text.filter.code);
6700 { 6700 {
6701 Eina_List *l; 6701 Eina_List *l;
6702 Eina_Stringshare *name; 6702 Eina_Stringshare *name;
6703 static int part_key = 0; 6703 static int part_key = 0;
6704 6704
6705 EINA_LIST_FOREACH(ted->text.filter_sources, l, name) 6705 EINA_LIST_FOREACH(ted->text.filter.sources, l, name)
6706 data_queue_part_lookup(pc, name, &part_key); 6706 data_queue_part_lookup(pc, name, &part_key);
6707 } 6707 }
6708 6708
@@ -9014,23 +9014,23 @@ st_collections_group_parts_part_description_text_filter(void)
9014 9014
9015 ed = (Edje_Part_Description_Text*) current_desc; 9015 ed = (Edje_Part_Description_Text*) current_desc;
9016 pc = eina_list_data_get(eina_list_last(edje_collections)); 9016 pc = eina_list_data_get(eina_list_last(edje_collections));
9017 if (ed->text.filter.str) 9017 if (ed->text.filter.code)
9018 { 9018 {
9019 EINA_LIST_FREE(ed->text.filter_sources, name) 9019 EINA_LIST_FREE(ed->text.filter.sources, name)
9020 { 9020 {
9021 part_lookup_delete(pc, name, &part_key, NULL); 9021 part_lookup_delete(pc, name, &part_key, NULL);
9022 eina_stringshare_del(name); 9022 eina_stringshare_del(name);
9023 } 9023 }
9024 free((void*)ed->text.filter.str); 9024 free((void*)ed->text.filter.code);
9025 } 9025 }
9026 ed->text.filter_sources = NULL; 9026 ed->text.filter.sources = NULL;
9027 9027
9028 ed->text.filter.str = parse_str(0); 9028 ed->text.filter.code = parse_str(0);
9029 if (!ed->text.filter.str) return; 9029 if (!ed->text.filter.code) return;
9030 9030
9031 // Parse list of buffers that have a source 9031 // Parse list of buffers that have a source
9032 // note: does not support comments 9032 // note: does not support comments
9033 code = strdup(ed->text.filter.str); 9033 code = strdup(ed->text.filter.code);
9034 for (token = strtok(code, ";"); token; token = strtok(NULL, ";")) 9034 for (token = strtok(code, ";"); token; token = strtok(NULL, ";"))
9035 { 9035 {
9036 size_t len; 9036 size_t len;
@@ -9079,7 +9079,7 @@ st_collections_group_parts_part_description_text_filter(void)
9079 } 9079 }
9080 free(code); 9080 free(code);
9081 9081
9082 if (valid) ed->text.filter_sources = sources; 9082 if (valid) ed->text.filter.sources = sources;
9083} 9083}
9084 9084
9085 9085
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 608e80228a..5f3c3c3cb0 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -1013,8 +1013,8 @@ _edje_edd_init(void)
1013 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.id_text_source", text.id_text_source, EET_T_INT); 1013 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.id_text_source", text.id_text_source, EET_T_INT);
1014 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.id_text_source_part", text.id_text_source_part, EET_T_STRING); 1014 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.id_text_source_part", text.id_text_source_part, EET_T_STRING);
1015 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.ellipsis", text.ellipsis, EET_T_DOUBLE); 1015 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.ellipsis", text.ellipsis, EET_T_DOUBLE);
1016 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter", text.filter, EET_T_STRING); 1016 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter", text.filter.code, EET_T_STRING);
1017 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter_sources", text.filter_sources); 1017 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter_sources", text.filter.sources);
1018 1018
1019 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text); 1019 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
1020 eddc.func.mem_free = mem_free_textblock; 1020 eddc.func.mem_free = mem_free_textblock;
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index e9c4f20441..9708dd6592 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -1505,7 +1505,7 @@ _edje_file_del(Edje *ed)
1505 eina_stringshare_del(rp->typedata.text->font); 1505 eina_stringshare_del(rp->typedata.text->font);
1506 eina_stringshare_del(rp->typedata.text->cache.in_str); 1506 eina_stringshare_del(rp->typedata.text->cache.in_str);
1507 eina_stringshare_del(rp->typedata.text->cache.out_str); 1507 eina_stringshare_del(rp->typedata.text->cache.out_str);
1508 eina_stringshare_del(rp->typedata.text->filter); 1508 eina_stringshare_del(rp->typedata.text->filter.code);
1509 free(rp->typedata.text); 1509 free(rp->typedata.text);
1510 } 1510 }
1511 else if ((rp->type == EDJE_RP_TYPE_SWALLOW) && 1511 else if ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
@@ -1929,7 +1929,7 @@ _edje_collection_free_part_description_clean(int type, Edje_Part_Description_Com
1929 eina_stringshare_del(text->text.text_class); 1929 eina_stringshare_del(text->text.text_class);
1930 eina_stringshare_del(text->text.style.str); 1930 eina_stringshare_del(text->text.style.str);
1931 eina_stringshare_del(text->text.font.str); 1931 eina_stringshare_del(text->text.font.str);
1932 eina_stringshare_del(text->text.filter.str); 1932 eina_stringshare_del(text->text.filter.code);
1933 } 1933 }
1934 break; 1934 break;
1935 } 1935 }
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index b5ac256d0c..419350cf65 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -359,6 +359,7 @@ typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_
359typedef struct _Edje_Part_Description_Spec_Mesh_Node Edje_Part_Description_Spec_Mesh_Node; 359typedef struct _Edje_Part_Description_Spec_Mesh_Node Edje_Part_Description_Spec_Mesh_Node;
360typedef struct _Edje_Part_Description_Spec_Light Edje_Part_Description_Spec_Light; 360typedef struct _Edje_Part_Description_Spec_Light Edje_Part_Description_Spec_Light;
361typedef struct _Edje_Part_Description_Spec_Camera Edje_Part_Description_Spec_Camera; 361typedef struct _Edje_Part_Description_Spec_Camera Edje_Part_Description_Spec_Camera;
362typedef struct _Edje_Part_Description_Spec_Filter Edje_Part_Description_Spec_Filter;
362typedef struct _Edje_Physics_Face Edje_Physics_Face; 363typedef struct _Edje_Physics_Face Edje_Physics_Face;
363typedef struct _Edje_Patterns Edje_Patterns; 364typedef struct _Edje_Patterns Edje_Patterns;
364typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation; 365typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
@@ -1277,6 +1278,12 @@ struct _Edje_Part_Description_Spec_Border
1277 FLOAT_T scale_by; /* when border scale above is enabled, border width OUTPUT is scaled by the object or global scale factor. this value adds another multiplier that the global scale is multiplued by first. if <= 0.0 it is not used, and if 1.0 it i s "ineffective" */ 1278 FLOAT_T scale_by; /* when border scale above is enabled, border width OUTPUT is scaled by the object or global scale factor. this value adds another multiplier that the global scale is multiplued by first. if <= 0.0 it is not used, and if 1.0 it i s "ineffective" */
1278}; 1279};
1279 1280
1281struct _Edje_Part_Description_Spec_Filter
1282{
1283 const char *code;
1284 Eina_List *sources;
1285};
1286
1280struct _Edje_Part_Description_Spec_Image 1287struct _Edje_Part_Description_Spec_Image
1281{ 1288{
1282 Edje_Part_Description_Spec_Fill fill; 1289 Edje_Part_Description_Spec_Fill fill;
@@ -1308,8 +1315,7 @@ struct _Edje_Part_Description_Spec_Text
1308 Edje_String style; /* the text style if a textblock */ 1315 Edje_String style; /* the text style if a textblock */
1309 Edje_String font; /* if a specific font is asked for */ 1316 Edje_String font; /* if a specific font is asked for */
1310 Edje_String repch; /* replacement char for password mode entry */ 1317 Edje_String repch; /* replacement char for password mode entry */
1311 Edje_String filter; /* special effects */ 1318 Edje_Part_Description_Spec_Filter filter;
1312 Eina_List *filter_sources; /* proxy sources for special effects */
1313 1319
1314 Edje_Alignment align; /* text alignment within bounds */ 1320 Edje_Alignment align; /* text alignment within bounds */
1315 Edje_Color color3; 1321 Edje_Color color3;
@@ -1452,7 +1458,6 @@ struct _Edje_Part_Description_Spec_Camera
1452 } orientation; 1458 } orientation;
1453}; 1459};
1454 1460
1455
1456struct _Edje_Part_Description_Image 1461struct _Edje_Part_Description_Image
1457{ 1462{
1458 Edje_Part_Description_Common common; 1463 Edje_Part_Description_Common common;
@@ -1784,8 +1789,6 @@ struct _Edje_Real_Part_Text
1784 const char *text; // 4 1789 const char *text; // 4
1785 const char *font; // 4 1790 const char *font; // 4
1786 const char *style; // 4 1791 const char *style; // 4
1787 const char *filter; // 4
1788 Eina_List *filter_sources; // 4
1789 Edje_Position offset; // 8 1792 Edje_Position offset; // 8
1790 short size; // 2 1793 short size; // 2
1791 struct { 1794 struct {
@@ -1799,6 +1802,7 @@ struct _Edje_Real_Part_Text
1799 const char *in_font; // 4 1802 const char *in_font; // 4
1800 FLOAT_T align_x, align_y; // 16 1803 FLOAT_T align_x, align_y; // 16
1801 } cache; 1804 } cache;
1805 Edje_Part_Description_Spec_Filter filter; // 8
1802}; // 88 1806}; // 88
1803// FIXME make text a potiner to struct and alloc at end 1807// FIXME make text a potiner to struct and alloc at end
1804// if part type is TEXT move common members textblock + 1808// if part type is TEXT move common members textblock +
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 2edf614528..cf6c187690 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -228,17 +228,17 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
228 if (!text) 228 if (!text)
229 text = edje_string_get(&chosen_desc->text.text); 229 text = edje_string_get(&chosen_desc->text.text);
230 font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont); 230 font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont);
231 filter = chosen_desc->text.filter.str; 231 filter = chosen_desc->text.filter.code;
232 232
233 if (ep->typedata.text->text) text = ep->typedata.text->text; 233 if (ep->typedata.text->text) text = ep->typedata.text->text;
234 if (ep->typedata.text->font) font = ep->typedata.text->font; 234 if (ep->typedata.text->font) font = ep->typedata.text->font;
235 if (ep->typedata.text->size > 0) size = ep->typedata.text->size; 235 if (ep->typedata.text->size > 0) size = ep->typedata.text->size;
236 if (ep->typedata.text->filter) filter = ep->typedata.text->filter; 236 if (ep->typedata.text->filter.code) filter = ep->typedata.text->filter.code;
237 if (ep->typedata.text->filter_sources != chosen_desc->text.filter_sources) 237 if (ep->typedata.text->filter.sources != chosen_desc->text.filter.sources)
238 { 238 {
239 prev_sources = ep->typedata.text->filter_sources; 239 prev_sources = ep->typedata.text->filter.sources;
240 filter_sources = chosen_desc->text.filter_sources; 240 filter_sources = chosen_desc->text.filter.sources;
241 ep->typedata.text->filter_sources = chosen_desc->text.filter_sources; 241 ep->typedata.text->filter.sources = chosen_desc->text.filter.sources;
242 } 242 }
243 243
244 if (ep->typedata.text->text_source) 244 if (ep->typedata.text->text_source)