Edje/evas filters: Quick renaming of evas filters related stuff

This commit is contained in:
Jean-Philippe Andre 2015-06-10 14:11:04 +09:00
parent f57929bf6e
commit 0e11e0a6dc
5 changed files with 29 additions and 25 deletions

View File

@ -6696,13 +6696,13 @@ st_collections_group_parts_part_description_inherit(void)
ted->text.domain = STRDUP(ted->text.domain);
ted->text.text_class = STRDUP(ted->text.text_class);
ted->text.font.str = STRDUP(ted->text.font.str);
ted->text.filter.str = STRDUP(ted->text.filter.str);
ted->text.filter.code = STRDUP(ted->text.filter.code);
{
Eina_List *l;
Eina_Stringshare *name;
static int part_key = 0;
EINA_LIST_FOREACH(ted->text.filter_sources, l, name)
EINA_LIST_FOREACH(ted->text.filter.sources, l, name)
data_queue_part_lookup(pc, name, &part_key);
}
@ -9014,23 +9014,23 @@ st_collections_group_parts_part_description_text_filter(void)
ed = (Edje_Part_Description_Text*) current_desc;
pc = eina_list_data_get(eina_list_last(edje_collections));
if (ed->text.filter.str)
if (ed->text.filter.code)
{
EINA_LIST_FREE(ed->text.filter_sources, name)
EINA_LIST_FREE(ed->text.filter.sources, name)
{
part_lookup_delete(pc, name, &part_key, NULL);
eina_stringshare_del(name);
}
free((void*)ed->text.filter.str);
free((void*)ed->text.filter.code);
}
ed->text.filter_sources = NULL;
ed->text.filter.sources = NULL;
ed->text.filter.str = parse_str(0);
if (!ed->text.filter.str) return;
ed->text.filter.code = parse_str(0);
if (!ed->text.filter.code) return;
// Parse list of buffers that have a source
// note: does not support comments
code = strdup(ed->text.filter.str);
code = strdup(ed->text.filter.code);
for (token = strtok(code, ";"); token; token = strtok(NULL, ";"))
{
size_t len;
@ -9079,7 +9079,7 @@ st_collections_group_parts_part_description_text_filter(void)
}
free(code);
if (valid) ed->text.filter_sources = sources;
if (valid) ed->text.filter.sources = sources;
}

View File

@ -1013,8 +1013,8 @@ _edje_edd_init(void)
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);
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);
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, 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_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_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Text);
eddc.func.mem_free = mem_free_textblock;

View File

@ -1505,7 +1505,7 @@ _edje_file_del(Edje *ed)
eina_stringshare_del(rp->typedata.text->font);
eina_stringshare_del(rp->typedata.text->cache.in_str);
eina_stringshare_del(rp->typedata.text->cache.out_str);
eina_stringshare_del(rp->typedata.text->filter);
eina_stringshare_del(rp->typedata.text->filter.code);
free(rp->typedata.text);
}
else if ((rp->type == EDJE_RP_TYPE_SWALLOW) &&
@ -1929,7 +1929,7 @@ _edje_collection_free_part_description_clean(int type, Edje_Part_Description_Com
eina_stringshare_del(text->text.text_class);
eina_stringshare_del(text->text.style.str);
eina_stringshare_del(text->text.font.str);
eina_stringshare_del(text->text.filter.str);
eina_stringshare_del(text->text.filter.code);
}
break;
}

View File

@ -359,6 +359,7 @@ typedef struct _Edje_Part_Description_Spec_Table Edje_Part_Description_Spec_
typedef struct _Edje_Part_Description_Spec_Mesh_Node Edje_Part_Description_Spec_Mesh_Node;
typedef struct _Edje_Part_Description_Spec_Light Edje_Part_Description_Spec_Light;
typedef struct _Edje_Part_Description_Spec_Camera Edje_Part_Description_Spec_Camera;
typedef struct _Edje_Part_Description_Spec_Filter Edje_Part_Description_Spec_Filter;
typedef struct _Edje_Physics_Face Edje_Physics_Face;
typedef struct _Edje_Patterns Edje_Patterns;
typedef struct _Edje_Part_Box_Animation Edje_Part_Box_Animation;
@ -1277,6 +1278,12 @@ struct _Edje_Part_Description_Spec_Border
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" */
};
struct _Edje_Part_Description_Spec_Filter
{
const char *code;
Eina_List *sources;
};
struct _Edje_Part_Description_Spec_Image
{
Edje_Part_Description_Spec_Fill fill;
@ -1308,8 +1315,7 @@ struct _Edje_Part_Description_Spec_Text
Edje_String style; /* the text style if a textblock */
Edje_String font; /* if a specific font is asked for */
Edje_String repch; /* replacement char for password mode entry */
Edje_String filter; /* special effects */
Eina_List *filter_sources; /* proxy sources for special effects */
Edje_Part_Description_Spec_Filter filter;
Edje_Alignment align; /* text alignment within bounds */
Edje_Color color3;
@ -1452,7 +1458,6 @@ struct _Edje_Part_Description_Spec_Camera
} orientation;
};
struct _Edje_Part_Description_Image
{
Edje_Part_Description_Common common;
@ -1784,8 +1789,6 @@ struct _Edje_Real_Part_Text
const char *text; // 4
const char *font; // 4
const char *style; // 4
const char *filter; // 4
Eina_List *filter_sources; // 4
Edje_Position offset; // 8
short size; // 2
struct {
@ -1799,6 +1802,7 @@ struct _Edje_Real_Part_Text
const char *in_font; // 4
FLOAT_T align_x, align_y; // 16
} cache;
Edje_Part_Description_Spec_Filter filter; // 8
}; // 88
// FIXME make text a potiner to struct and alloc at end
// if part type is TEXT move common members textblock +

View File

@ -228,17 +228,17 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
if (!text)
text = edje_string_get(&chosen_desc->text.text);
font = _edje_text_class_font_get(ed, chosen_desc, &size, &sfont);
filter = chosen_desc->text.filter.str;
filter = chosen_desc->text.filter.code;
if (ep->typedata.text->text) text = ep->typedata.text->text;
if (ep->typedata.text->font) font = ep->typedata.text->font;
if (ep->typedata.text->size > 0) size = ep->typedata.text->size;
if (ep->typedata.text->filter) filter = ep->typedata.text->filter;
if (ep->typedata.text->filter_sources != chosen_desc->text.filter_sources)
if (ep->typedata.text->filter.code) filter = ep->typedata.text->filter.code;
if (ep->typedata.text->filter.sources != chosen_desc->text.filter.sources)
{
prev_sources = ep->typedata.text->filter_sources;
filter_sources = chosen_desc->text.filter_sources;
ep->typedata.text->filter_sources = chosen_desc->text.filter_sources;
prev_sources = ep->typedata.text->filter.sources;
filter_sources = chosen_desc->text.filter.sources;
ep->typedata.text->filter.sources = chosen_desc->text.filter.sources;
}
if (ep->typedata.text->text_source)