case EDJE_PART_TYPE_RECTANGLE:
case EDJE_PART_TYPE_SWALLOW:
case EDJE_PART_TYPE_GROUP:
- case EDJE_PART_TYPE_SNAPSHOT:
result = mem_alloc(SZ(Edje_Part_Description_Common));
break;
case EDJE_PART_TYPE_TEXT:
result = &ed->common;
break;
- }
+ }
+ case EDJE_PART_TYPE_SNAPSHOT:
+ {
+ Edje_Part_Description_Snapshot *ed;
+
+ ed = mem_alloc(SZ(Edje_Part_Description_Snapshot));
+
+ result = &ed->common;
+ break;
+ }
case EDJE_PART_TYPE_PROXY:
{
Edje_Part_Description_Proxy *ed;
case EDJE_PART_TYPE_RECTANGLE:
case EDJE_PART_TYPE_SWALLOW:
case EDJE_PART_TYPE_GROUP:
- case EDJE_PART_TYPE_SNAPSHOT:
/* Nothing todo, this part only have a common description. */
break;
case EDJE_PART_TYPE_BOX:
case EDJE_PART_TYPE_TABLE:
case EDJE_PART_TYPE_IMAGE:
+ case EDJE_PART_TYPE_SNAPSHOT:
/* Nothing todo here */
break;
case EDJE_PART_TYPE_TEXT:
case EDJE_PART_TYPE_RECTANGLE:
case EDJE_PART_TYPE_SWALLOW:
case EDJE_PART_TYPE_GROUP:
- case EDJE_PART_TYPE_SNAPSHOT:
/* Nothing todo, this part only have a common description. */
break;
case EDJE_PART_TYPE_TEXT:
}
/* Filters stuff */
- ied->filter.code = STRDUP(ied->filter.code);
+ ied->filter.code = STRDUP(iparent->filter.code);
if (ied->filter.code)
{
Eina_List *list, *l;
const char *name;
- list = ied->filter.sources;
+ list = iparent->filter.sources;
ied->filter.sources = NULL;
EINA_LIST_FOREACH(list, l, name)
ied->filter.sources = eina_list_append(ied->filter.sources, STRDUP(name));
break;
}
+ case EDJE_PART_TYPE_SNAPSHOT:
+ {
+ Edje_Part_Description_Snapshot *sed = (Edje_Part_Description_Snapshot*) ed;
+ Edje_Part_Description_Snapshot *sparent = (Edje_Part_Description_Snapshot*) parent;
+
+ /* Filters stuff */
+ sed->filter.code = STRDUP(sparent->filter.code);
+ if (sed->filter.code)
+ {
+ Eina_List *list, *l;
+ const char *name;
+ list = sparent->filter.sources;
+ sed->filter.sources = NULL;
+ EINA_LIST_FOREACH(list, l, name)
+ sed->filter.sources = eina_list_append(sed->filter.sources, STRDUP(name));
+ }
+
+ break;
+ }
case EDJE_PART_TYPE_PROXY:
{
Edje_Part_Description_Proxy *ped = (Edje_Part_Description_Proxy*) ed;
data_queue_copied_part_lookup(pc, &(pparent->proxy.id), &(ped->proxy.id));
+ /* Filters stuff */
+ ped->filter.code = STRDUP(pparent->filter.code);
+ if (ped->filter.code)
+ {
+ Eina_List *list, *l;
+ const char *name;
+ list = pparent->filter.sources;
+ ped->filter.sources = NULL;
+ EINA_LIST_FOREACH(list, l, name)
+ ped->filter.sources = eina_list_append(ped->filter.sources, STRDUP(name));
+ }
+
break;
}
case EDJE_PART_TYPE_BOX:
filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
else if (current_part->type == EDJE_PART_TYPE_PROXY)
filter = &(((Edje_Part_Description_Proxy *)current_desc)->filter);
+ else if (current_part->type == EDJE_PART_TYPE_SNAPSHOT)
+ filter = &(((Edje_Part_Description_Snapshot *)current_desc)->filter);
else
{
- ERR("parse error %s:%i. filter only supported for: TEXT, IMAGE, PROXY.",
+ ERR("parse error %s:%i. filter only supported for: TEXT, IMAGE, PROXY, SNAPSHOT.",
file_in, line - 1);
exit(-1);
}
filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
else if (current_part->type == EDJE_PART_TYPE_PROXY)
filter = &(((Edje_Part_Description_Proxy *)current_desc)->filter);
+ else if (current_part->type == EDJE_PART_TYPE_SNAPSHOT)
+ filter = &(((Edje_Part_Description_Snapshot *)current_desc)->filter);
else
{
- ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.",
+ ERR("parse error %s:%i. filter only supported for: TEXT, IMAGE, PROXY, SNAPSHOT.",
file_in, line - 1);
exit(-1);
}
filter = &(((Edje_Part_Description_Image *)current_desc)->filter);
else if (current_part->type == EDJE_PART_TYPE_PROXY)
filter = &(((Edje_Part_Description_Proxy *)current_desc)->filter);
+ else if (current_part->type == EDJE_PART_TYPE_SNAPSHOT)
+ filter = &(((Edje_Part_Description_Snapshot *)current_desc)->filter);
else
{
- ERR("parse error %s:%i. filter set for non-TEXT and non-IMAGE part.",
+ ERR("parse error %s:%i. filter only supported for: TEXT, IMAGE, PROXY, SNAPSHOT.",
file_in, line - 1);
exit(-1);
}
EDJE_PART_TYPE_MESH_NODE = 13,
EDJE_PART_TYPE_LIGHT = 14,
EDJE_PART_TYPE_CAMERA = 15,
- EDJE_PART_TYPE_SNAPSHOT = 16,
+ EDJE_PART_TYPE_SNAPSHOT = 16, /**< Snapshot @since 1.16 */
EDJE_PART_TYPE_LAST = 17 /**< Last type value */
} Edje_Part_Type;
/**
INIT_EMP_BOTH(TABLE, Edje_Part_Description_Table, ce);
INIT_EMP_BOTH(EXTERNAL, Edje_Part_Description_External, ce);
INIT_EMP_BOTH(SPACER, Edje_Part_Description_Common, ce);
- INIT_EMP_BOTH(SNAPSHOT, Edje_Part_Description_Common, ce);
+ INIT_EMP_BOTH(SNAPSHOT, Edje_Part_Description_Snapshot, ce);
INIT_EMP(part, Edje_Part, ce);
}
Evas_Object *obj = ep->object;
Eina_List *li1, *li2;
- /* handle TEXT, IMAGE, PROXY part types here */
+ /* handle TEXT, IMAGE, PROXY, SNAPSHOT part types here */
if (ep->part->type == EDJE_PART_TYPE_TEXT)
{
Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc;
prev_sources = edp->filter.sources;
filter_sources = chosen_edp->filter.sources;
}
+ else if (ep->part->type == EDJE_PART_TYPE_SNAPSHOT)
+ {
+ Edje_Part_Description_Snapshot *chosen_eds = (Edje_Part_Description_Snapshot *) chosen_desc;
+ Edje_Part_Description_Snapshot *eds = (Edje_Part_Description_Snapshot *) desc;
+ filter = &chosen_eds->filter;
+ prev_sources = eds->filter.sources;
+ filter_sources = chosen_eds->filter.sources;
+ }
else
{
CRI("Invalid call to filter recalc");
case EDJE_PART_TYPE_MESH_NODE:
case EDJE_PART_TYPE_LIGHT:
case EDJE_PART_TYPE_CAMERA:
+ case EDJE_PART_TYPE_SNAPSHOT:
break;
case EDJE_PART_TYPE_GRADIENT:
{
_edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos);
}
+ else if (ep->part->type == EDJE_PART_TYPE_SNAPSHOT)
+ {
+ _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos);
+ }
/* remember what our size is BEFORE we go limit it */
params->req.x = TO_INT(params->eval.x);
case EDJE_PART_TYPE_BOX:
case EDJE_PART_TYPE_TABLE:
case EDJE_PART_TYPE_PROXY:
+ case EDJE_PART_TYPE_SNAPSHOT:
evas_object_image_source_set(ep->object, pp->object);
break;
eet_data_descriptor_file_new(&eddc);
EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON(_edje_edd_edje_part_description_spacer, Edje_Part_Description_Common);
- EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Common);
+ // SNAPSHOT, since 1.16
+ EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Snapshot);
eddc.func.mem_free = mem_free_snapshot;
eddc.func.mem_alloc = mem_alloc_snapshot;
_edje_edd_edje_part_description_snapshot =
eet_data_descriptor_file_new(&eddc);
- EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON(_edje_edd_edje_part_description_snapshot, Edje_Part_Description_Common);
-
+ EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_snapshot, Edje_Part_Description_Snapshot, common);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_snapshot, Edje_Part_Description_Snapshot, "filter.code", filter.code, EET_T_STRING);
+ EET_DATA_DESCRIPTOR_ADD_LIST_STRING(_edje_edd_edje_part_description_snapshot, Edje_Part_Description_Snapshot, "filter.sources", filter.sources);
+ EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_snapshot, Edje_Part_Description_Snapshot, "filter.data", filter.data, _edje_edd_edje_part_description_filter_data);
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Common);
eddc.func.mem_free = mem_free_swallow;
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_rectangle);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_swallow);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_group);
- EDJE_DEFINE_POINTER_TYPE(Part_Description_Common, part_description_snapshot);
+ EDJE_DEFINE_POINTER_TYPE(Part_Description_Snapshot, part_description_snapshot);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Image, part_description_image);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Proxy, part_description_proxy);
EDJE_DEFINE_POINTER_TYPE(Part_Description_Text, part_description_text);
typedef struct _Edje_Part_Description_Mesh_Node Edje_Part_Description_Mesh_Node;
typedef struct _Edje_Part_Description_Light Edje_Part_Description_Light;
typedef struct _Edje_Part_Description_Camera Edje_Part_Description_Camera;
+typedef struct _Edje_Part_Description_Snapshot Edje_Part_Description_Snapshot;
typedef struct _Edje_Part_Description_Common Edje_Part_Description_Common;
typedef struct _Edje_Part_Description_Spec_Fill Edje_Part_Description_Spec_Fill;
typedef struct _Edje_Part_Description_Spec_Border Edje_Part_Description_Spec_Border;
Edje_Part_Description_Spec_Filter filter;
};
+struct _Edje_Part_Description_Snapshot
+{
+ Edje_Part_Description_Common common;
+ Edje_Part_Description_Spec_Filter filter;
+};
+
struct _Edje_Part_Description_Text
{
Edje_Part_Description_Common common;