summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-08-18 21:05:51 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-01 20:10:54 +0900
commitc0f887b42965121a0964d3b8a319cafb8b33d1fb (patch)
tree45ea43ad72828c801adf949226865949624ed272 /src
parentbb9fdad7c20d273d382ffe096aa3630534a54647 (diff)
Edje: Move internal struct filter around (refactor)
Diffstat (limited to 'src')
-rw-r--r--src/bin/edje/edje_cc_handlers.c22
-rw-r--r--src/lib/edje/edje_calc.c12
-rw-r--r--src/lib/edje/edje_data.c12
-rw-r--r--src/lib/edje/edje_private.h5
4 files changed, 26 insertions, 25 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 7b22c6b069..5a56fb29ee 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -7048,15 +7048,15 @@ st_collections_group_parts_part_description_inherit(void)
7048 ted->text.font.str = STRDUP(ted->text.font.str); 7048 ted->text.font.str = STRDUP(ted->text.font.str);
7049 7049
7050 /* Filters stuff */ 7050 /* Filters stuff */
7051 ted->text.filter.code = STRDUP(ted->text.filter.code); 7051 ted->filter.code = STRDUP(ted->filter.code);
7052 if (ted->text.filter.code) 7052 if (ted->filter.code)
7053 { 7053 {
7054 Eina_List *list, *l; 7054 Eina_List *list, *l;
7055 const char *name; 7055 const char *name;
7056 list = ted->text.filter.sources; 7056 list = ted->filter.sources;
7057 ted->text.filter.sources = NULL; 7057 ted->filter.sources = NULL;
7058 EINA_LIST_FOREACH(list, l, name) 7058 EINA_LIST_FOREACH(list, l, name)
7059 ted->text.filter.sources = eina_list_append(ted->text.filter.sources, STRDUP(name)); 7059 ted->filter.sources = eina_list_append(ted->filter.sources, STRDUP(name));
7060 } 7060 }
7061 7061
7062 data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source), &ted->text.id_source_part); 7062 data_queue_copied_part_nest_lookup(pc, &(tparent->text.id_source), &(ted->text.id_source), &ted->text.id_source_part);
@@ -11896,9 +11896,9 @@ st_collections_group_parts_part_description_filter_code(void)
11896 check_arg_count(1); 11896 check_arg_count(1);
11897 11897
11898 if (current_part->type == EDJE_PART_TYPE_TEXT) 11898 if (current_part->type == EDJE_PART_TYPE_TEXT)
11899 filter = &(((Edje_Part_Description_Text *)current_desc)->text.filter); 11899 filter = &(((Edje_Part_Description_Text *)current_desc)->filter);
11900 else if (current_part->type == EDJE_PART_TYPE_IMAGE) 11900 else if (current_part->type == EDJE_PART_TYPE_IMAGE)
11901 filter = &(((Edje_Part_Description_Image *)current_desc)->image.filter); 11901 filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
11902 else 11902 else
11903 { 11903 {
11904 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.", 11904 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.",
@@ -11937,9 +11937,9 @@ st_collections_group_parts_part_description_filter_source(void)
11937 "abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ0123456789_"; 11937 "abcdefghijklmnopqrstuvwxyzABCDEFGHJIKLMNOPQRSTUVWXYZ0123456789_";
11938 11938
11939 if (current_part->type == EDJE_PART_TYPE_TEXT) 11939 if (current_part->type == EDJE_PART_TYPE_TEXT)
11940 filter = &(((Edje_Part_Description_Text *)current_desc)->text.filter); 11940 filter = &(((Edje_Part_Description_Text *)current_desc)->filter);
11941 else if (current_part->type == EDJE_PART_TYPE_IMAGE) 11941 else if (current_part->type == EDJE_PART_TYPE_IMAGE)
11942 filter = &(((Edje_Part_Description_Image *)current_desc)->image.filter); 11942 filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
11943 else 11943 else
11944 { 11944 {
11945 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.", 11945 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.",
@@ -12030,9 +12030,9 @@ st_collections_group_parts_part_description_filter_data(void)
12030 unsigned k; 12030 unsigned k;
12031 12031
12032 if (current_part->type == EDJE_PART_TYPE_TEXT) 12032 if (current_part->type == EDJE_PART_TYPE_TEXT)
12033 filter = &(((Edje_Part_Description_Text *)current_desc)->text.filter); 12033 filter = &(((Edje_Part_Description_Text *)current_desc)->filter);
12034 else if (current_part->type == EDJE_PART_TYPE_IMAGE) 12034 else if (current_part->type == EDJE_PART_TYPE_IMAGE)
12035 filter = &(((Edje_Part_Description_Image *)current_desc)->image.filter); 12035 filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
12036 else 12036 else
12037 { 12037 {
12038 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.", 12038 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.",
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index dcf868a11a..234c8a3295 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2465,17 +2465,17 @@ _edje_part_recalc_single_filter(Edje *ed,
2465 { 2465 {
2466 Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc; 2466 Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc;
2467 Edje_Part_Description_Text *edt = (Edje_Part_Description_Text *) desc; 2467 Edje_Part_Description_Text *edt = (Edje_Part_Description_Text *) desc;
2468 filter = &chosen_edt->text.filter; 2468 filter = &chosen_edt->filter;
2469 prev_sources = edt->text.filter.sources; 2469 prev_sources = edt->filter.sources;
2470 filter_sources = chosen_edt->text.filter.sources; 2470 filter_sources = chosen_edt->filter.sources;
2471 } 2471 }
2472 else if (ep->part->type == EDJE_PART_TYPE_IMAGE) 2472 else if (ep->part->type == EDJE_PART_TYPE_IMAGE)
2473 { 2473 {
2474 Edje_Part_Description_Image *chosen_edi = (Edje_Part_Description_Image *) chosen_desc; 2474 Edje_Part_Description_Image *chosen_edi = (Edje_Part_Description_Image *) chosen_desc;
2475 Edje_Part_Description_Image *edi = (Edje_Part_Description_Image *) desc; 2475 Edje_Part_Description_Image *edi = (Edje_Part_Description_Image *) desc;
2476 filter = &chosen_edi->image.filter; 2476 filter = &chosen_edi->filter;
2477 prev_sources = edi->image.filter.sources; 2477 prev_sources = edi->filter.sources;
2478 filter_sources = chosen_edi->image.filter.sources; 2478 filter_sources = chosen_edi->filter.sources;
2479 } 2479 }
2480 else 2480 else
2481 { 2481 {
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 19176d8c26..ef6ac4791a 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -995,9 +995,9 @@ _edje_edd_init(void)
995 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.angle", image.fill.angle, EET_T_INT); 995 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.angle", image.fill.angle, EET_T_INT);
996 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.spread", image.fill.spread, EET_T_INT); 996 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.spread", image.fill.spread, EET_T_INT);
997 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.type", image.fill.type, EET_T_CHAR); 997 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.type", image.fill.type, EET_T_CHAR);
998 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.code", image.filter.code, EET_T_STRING); 998 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.code", filter.code, EET_T_STRING);
999 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.sources", image.filter.sources); // @since 1.15 999 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.sources", filter.sources); // @since 1.15
1000 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.data", image.filter.data, _edje_edd_edje_part_description_filter_data); // @since 1.15 1000 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.data", filter.data, _edje_edd_edje_part_description_filter_data); // @since 1.15
1001 1001
1002 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Proxy); 1002 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Proxy);
1003 eddc.func.mem_free = mem_free_proxy; 1003 eddc.func.mem_free = mem_free_proxy;
@@ -1054,9 +1054,9 @@ _edje_edd_init(void)
1054 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); 1054 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);
1055 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); 1055 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);
1056 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.ellipsis", text.ellipsis, EET_T_DOUBLE); 1056 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.ellipsis", text.ellipsis, EET_T_DOUBLE);
1057 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter", text.filter.code, EET_T_STRING); 1057 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter", filter.code, EET_T_STRING);
1058 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter_sources", text.filter.sources); 1058 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter_sources", filter.sources);
1059 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter.data", text.filter.data, _edje_edd_edje_part_description_filter_data); // @since 1.15 1059 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter.data", filter.data, _edje_edd_edje_part_description_filter_data); // @since 1.15
1060 1060
1061 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text); 1061 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
1062 eddc.func.mem_free = mem_free_textblock; 1062 eddc.func.mem_free = mem_free_textblock;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 81f9fe293a..28a2141f4a 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1330,7 +1330,6 @@ struct _Edje_Part_Description_Spec_Image
1330 Eina_Bool set; /* if image condition it's content */ 1330 Eina_Bool set; /* if image condition it's content */
1331 1331
1332 Edje_Part_Description_Spec_Border border; 1332 Edje_Part_Description_Spec_Border border;
1333 Edje_Part_Description_Spec_Filter filter;
1334}; 1333};
1335 1334
1336struct _Edje_Part_Description_Spec_Proxy 1335struct _Edje_Part_Description_Spec_Proxy
@@ -1350,7 +1349,6 @@ struct _Edje_Part_Description_Spec_Text
1350 Edje_String style; /* the text style if a textblock */ 1349 Edje_String style; /* the text style if a textblock */
1351 Edje_String font; /* if a specific font is asked for */ 1350 Edje_String font; /* if a specific font is asked for */
1352 Edje_String repch; /* replacement char for password mode entry */ 1351 Edje_String repch; /* replacement char for password mode entry */
1353 Edje_Part_Description_Spec_Filter filter;
1354 1352
1355 Edje_Alignment align; /* text alignment within bounds */ 1353 Edje_Alignment align; /* text alignment within bounds */
1356 Edje_Color color3; 1354 Edje_Color color3;
@@ -1497,18 +1495,21 @@ struct _Edje_Part_Description_Image
1497{ 1495{
1498 Edje_Part_Description_Common common; 1496 Edje_Part_Description_Common common;
1499 Edje_Part_Description_Spec_Image image; 1497 Edje_Part_Description_Spec_Image image;
1498 Edje_Part_Description_Spec_Filter filter;
1500}; 1499};
1501 1500
1502struct _Edje_Part_Description_Proxy 1501struct _Edje_Part_Description_Proxy
1503{ 1502{
1504 Edje_Part_Description_Common common; 1503 Edje_Part_Description_Common common;
1505 Edje_Part_Description_Spec_Proxy proxy; 1504 Edje_Part_Description_Spec_Proxy proxy;
1505 //Edje_Part_Description_Spec_Filter filter;
1506}; 1506};
1507 1507
1508struct _Edje_Part_Description_Text 1508struct _Edje_Part_Description_Text
1509{ 1509{
1510 Edje_Part_Description_Common common; 1510 Edje_Part_Description_Common common;
1511 Edje_Part_Description_Spec_Text text; 1511 Edje_Part_Description_Spec_Text text;
1512 Edje_Part_Description_Spec_Filter filter;
1512}; 1513};
1513 1514
1514struct _Edje_Part_Description_Box 1515struct _Edje_Part_Description_Box