summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_data.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-06-26 10:40:27 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-06-30 10:12:13 +0900
commitb676dcf9982292c08227f7133fb97d4bf31b7ebe (patch)
tree6bca88d7c478a9cfb597dd3ab5907c56342b0109 /src/lib/edje/edje_data.c
parent508da27bb161aa93c80ee9b252cae9b07c49f6d2 (diff)
downloadefl-b676dcf9982292c08227f7133fb97d4bf31b7ebe.tar.gz
Edje: Use array instead of hash for filters data
Yeah that was totally overkill and pure laziness on my side. Despite having the EO API for the filters still in beta, I want to the EDC API and EDJ binary formats to stay compatible, so let's get it right before the release :)
Diffstat (limited to 'src/lib/edje/edje_data.c')
-rw-r--r--src/lib/edje/edje_data.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 55f06ba65c..d4671a93d8 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -67,6 +67,7 @@ Eet_Data_Descriptor *_edje_edd_edje_part_description_external_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_mesh_node_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_light_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_description_camera_pointer = NULL;
+Eet_Data_Descriptor *_edje_edd_edje_part_description_filter_data = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_image_id = NULL;
Eet_Data_Descriptor *_edje_edd_edje_part_image_id_pointer = NULL;
Eet_Data_Descriptor *_edje_edd_edje_external_param = NULL;
@@ -280,6 +281,7 @@ _edje_edd_shutdown(void)
FREED(_edje_edd_edje_part_description_mesh_node_pointer);
FREED(_edje_edd_edje_part_description_light_pointer);
FREED(_edje_edd_edje_part_description_camera_pointer);
+ FREED(_edje_edd_edje_part_description_filter_data);
FREED(_edje_edd_edje_part_image_id);
FREED(_edje_edd_edje_part_image_id_pointer);
FREED(_edje_edd_edje_external_param);
@@ -511,6 +513,12 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_color_class, Edje_Color_Class, "a3", a3, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_color_class, Edje_Color_Class, "desc", desc, EET_T_STRING);
+ /* evas filters */
+ EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Spec_Filter_Data);
+ _edje_edd_edje_part_description_filter_data = eet_data_descriptor_file_new(&eddc);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_filter_data, Edje_Part_Description_Spec_Filter_Data, "name", name, EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_filter_data, Edje_Part_Description_Spec_Filter_Data, "value", value, EET_T_STRING);
+
/* the main file directory */
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_File);
eddc.func.hash_add = (void * (*)(void *, const char *, void *))_edje_eina_hash_add_alloc;
@@ -958,8 +966,8 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.spread", image.fill.spread, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.type", image.fill.type, EET_T_CHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.code", image.filter.code, EET_T_STRING);
- EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.sources", image.filter.sources);
- EET_DATA_DESCRIPTOR_ADD_HASH_STRING(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.filter.data", image.filter.data);
+ 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
+ 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
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Proxy);
eddc.func.mem_free = mem_free_proxy;
@@ -1018,7 +1026,7 @@ _edje_edd_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.ellipsis", text.ellipsis, EET_T_DOUBLE);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter", text.filter.code, EET_T_STRING);
EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter_sources", text.filter.sources);
- EET_DATA_DESCRIPTOR_ADD_HASH_STRING(_edje_edd_edje_part_description_text, Edje_Part_Description_Text, "text.filter.data", text.filter.data); // @since 1.15
+ 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
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
eddc.func.mem_free = mem_free_textblock;