summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-08-18 21:14:11 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-10-01 20:10:54 +0900
commit31edfbb817d24dc11224e6f68e6dcd12282ca5f8 (patch)
tree8bc0c86a8f1091e4fdc3f498a56ed2b8b87d1523
parent99b1c7622ba3ee0358d491d048f115eed3031d34 (diff)
Edje: Add support for filters to PROXY parts
Same syntax as for IMAGE and TEXT: description.filter
-rw-r--r--src/bin/edje/edje_cc_handlers.c8
-rw-r--r--src/lib/edje/edje_calc.c14
-rw-r--r--src/lib/edje/edje_data.c3
-rw-r--r--src/lib/edje/edje_private.h2
4 files changed, 24 insertions, 3 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 18adacb1ae..b4530c96b3 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -11911,9 +11911,11 @@ st_collections_group_parts_part_description_filter_code(void)
11911 filter = &(((Edje_Part_Description_Text *)current_desc)->filter); 11911 filter = &(((Edje_Part_Description_Text *)current_desc)->filter);
11912 else if (current_part->type == EDJE_PART_TYPE_IMAGE) 11912 else if (current_part->type == EDJE_PART_TYPE_IMAGE)
11913 filter = &(((Edje_Part_Description_Image *)current_desc)->filter); 11913 filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
11914 else if (current_part->type == EDJE_PART_TYPE_PROXY)
11915 filter = &(((Edje_Part_Description_Proxy *)current_desc)->filter);
11914 else 11916 else
11915 { 11917 {
11916 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.", 11918 ERR("parse error %s:%i. filter only supported for: TEXT, IMAGE, PROXY.",
11917 file_in, line - 1); 11919 file_in, line - 1);
11918 exit(-1); 11920 exit(-1);
11919 } 11921 }
@@ -11952,6 +11954,8 @@ st_collections_group_parts_part_description_filter_source(void)
11952 filter = &(((Edje_Part_Description_Text *)current_desc)->filter); 11954 filter = &(((Edje_Part_Description_Text *)current_desc)->filter);
11953 else if (current_part->type == EDJE_PART_TYPE_IMAGE) 11955 else if (current_part->type == EDJE_PART_TYPE_IMAGE)
11954 filter = &(((Edje_Part_Description_Image *)current_desc)->filter); 11956 filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
11957 else if (current_part->type == EDJE_PART_TYPE_PROXY)
11958 filter = &(((Edje_Part_Description_Proxy *)current_desc)->filter);
11955 else 11959 else
11956 { 11960 {
11957 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.", 11961 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.",
@@ -12045,6 +12049,8 @@ st_collections_group_parts_part_description_filter_data(void)
12045 filter = &(((Edje_Part_Description_Text *)current_desc)->filter); 12049 filter = &(((Edje_Part_Description_Text *)current_desc)->filter);
12046 else if (current_part->type == EDJE_PART_TYPE_IMAGE) 12050 else if (current_part->type == EDJE_PART_TYPE_IMAGE)
12047 filter = &(((Edje_Part_Description_Image *)current_desc)->filter); 12051 filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
12052 else if (current_part->type == EDJE_PART_TYPE_PROXY)
12053 filter = &(((Edje_Part_Description_Proxy *)current_desc)->filter);
12048 else 12054 else
12049 { 12055 {
12050 ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.", 12056 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 234c8a3295..3312007b2a 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2460,7 +2460,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2460 Evas_Object *obj = ep->object; 2460 Evas_Object *obj = ep->object;
2461 Eina_List *li1, *li2; 2461 Eina_List *li1, *li2;
2462 2462
2463 /* handle TEXT and IMAGE part types here */ 2463 /* handle TEXT, IMAGE, PROXY part types here */
2464 if (ep->part->type == EDJE_PART_TYPE_TEXT) 2464 if (ep->part->type == EDJE_PART_TYPE_TEXT)
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;
@@ -2477,6 +2477,14 @@ _edje_part_recalc_single_filter(Edje *ed,
2477 prev_sources = edi->filter.sources; 2477 prev_sources = edi->filter.sources;
2478 filter_sources = chosen_edi->filter.sources; 2478 filter_sources = chosen_edi->filter.sources;
2479 } 2479 }
2480 else if (ep->part->type == EDJE_PART_TYPE_PROXY)
2481 {
2482 Edje_Part_Description_Proxy *chosen_edp = (Edje_Part_Description_Proxy *) chosen_desc;
2483 Edje_Part_Description_Proxy *edp = (Edje_Part_Description_Proxy *) desc;
2484 filter = &chosen_edp->filter;
2485 prev_sources = edp->filter.sources;
2486 filter_sources = chosen_edp->filter.sources;
2487 }
2480 else 2488 else
2481 { 2489 {
2482 CRI("Invalid call to filter recalc"); 2490 CRI("Invalid call to filter recalc");
@@ -2851,6 +2859,10 @@ _edje_part_recalc_single(Edje *ed,
2851 2859
2852 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos); 2860 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos);
2853 } 2861 }
2862 else if (ep->part->type == EDJE_PART_TYPE_PROXY)
2863 {
2864 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos);
2865 }
2854 2866
2855 /* remember what our size is BEFORE we go limit it */ 2867 /* remember what our size is BEFORE we go limit it */
2856 params->req.x = TO_INT(params->eval.x); 2868 params->req.x = TO_INT(params->eval.x);
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index ef6ac4791a..acad419b58 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -1021,6 +1021,9 @@ _edje_edd_init(void)
1021 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.type", proxy.fill.type, EET_T_CHAR); 1021 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.fill.type", proxy.fill.type, EET_T_CHAR);
1022 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.source_visible", proxy.source_visible, EET_T_CHAR); 1022 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.source_visible", proxy.source_visible, EET_T_CHAR);
1023 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.source_clip", proxy.source_clip, EET_T_CHAR); 1023 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.source_clip", proxy.source_clip, EET_T_CHAR);
1024 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.filter.code", filter.code, EET_T_STRING); // @since 1.16
1025 EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.filter.sources", filter.sources); // @since 1.16
1026 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_proxy, Edje_Part_Description_Proxy, "proxy.filter.data", filter.data, _edje_edd_edje_part_description_filter_data); // @since 1.16
1024 1027
1025 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text); 1028 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
1026 eddc.func.mem_free = mem_free_text; 1029 eddc.func.mem_free = mem_free_text;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 28a2141f4a..a2b0582d1b 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1502,7 +1502,7 @@ struct _Edje_Part_Description_Proxy
1502{ 1502{
1503 Edje_Part_Description_Common common; 1503 Edje_Part_Description_Common common;
1504 Edje_Part_Description_Spec_Proxy proxy; 1504 Edje_Part_Description_Spec_Proxy proxy;
1505 //Edje_Part_Description_Spec_Filter filter; 1505 Edje_Part_Description_Spec_Filter filter;
1506}; 1506};
1507 1507
1508struct _Edje_Part_Description_Text 1508struct _Edje_Part_Description_Text