more fixme's fixed. more fixme's added. edje is moving.
SVN revision: 7078
This commit is contained in:
parent
969629dfb2
commit
fbcf7fc180
|
@ -147,6 +147,25 @@ collections {
|
||||||
border, 12 12 12 12;
|
border, 12 12 12 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
part {
|
||||||
|
name, "clip";
|
||||||
|
mouse_events, 0;
|
||||||
|
type, RECT;
|
||||||
|
description {
|
||||||
|
state, "default" 0.0;
|
||||||
|
rel1 {
|
||||||
|
relative, 0.5 0.5;
|
||||||
|
offset, -20 -20;
|
||||||
|
}
|
||||||
|
rel2 {
|
||||||
|
relative, 0.5 0.5;
|
||||||
|
offset, 19 19;
|
||||||
|
}
|
||||||
|
color, 100 200 255 128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
part {
|
part {
|
||||||
name, "logo";
|
name, "logo";
|
||||||
description {
|
description {
|
||||||
|
@ -186,6 +205,7 @@ collections {
|
||||||
}
|
}
|
||||||
part {
|
part {
|
||||||
name, "logo_anim";
|
name, "logo_anim";
|
||||||
|
// clip_to, "clip";
|
||||||
description {
|
description {
|
||||||
state, "default" 0.0;
|
state, "default" 0.0;
|
||||||
max, 160 120;
|
max, 160 120;
|
||||||
|
|
|
@ -23,7 +23,9 @@ collections
|
||||||
// IMAGE, RECTANGLE, TEXT
|
// IMAGE, RECTANGLE, TEXT
|
||||||
// type, IMAGE;
|
// type, IMAGE;
|
||||||
mouse_events, 0;
|
mouse_events, 0;
|
||||||
|
// clip_to "p1";
|
||||||
// color_class, "default";
|
// color_class, "default";
|
||||||
|
// text_class, "default";
|
||||||
description
|
description
|
||||||
{
|
{
|
||||||
// state, "name" (float value 0.0 - 1.0)
|
// state, "name" (float value 0.0 - 1.0)
|
||||||
|
|
|
@ -16,7 +16,9 @@ static void ob_collections_group_parts_part(void);
|
||||||
static void st_collections_group_parts_part_name(void);
|
static void st_collections_group_parts_part_name(void);
|
||||||
static void st_collections_group_parts_part_type(void);
|
static void st_collections_group_parts_part_type(void);
|
||||||
static void st_collections_group_parts_part_mouse_events(void);
|
static void st_collections_group_parts_part_mouse_events(void);
|
||||||
|
static void st_collections_group_parts_part_clip_to_id(void);
|
||||||
static void st_collections_group_parts_part_color_class(void);
|
static void st_collections_group_parts_part_color_class(void);
|
||||||
|
static void st_collections_group_parts_part_text_class(void);
|
||||||
|
|
||||||
static void ob_collections_group_parts_part_description(void);
|
static void ob_collections_group_parts_part_description(void);
|
||||||
static void st_collections_group_parts_part_description_state(void);
|
static void st_collections_group_parts_part_description_state(void);
|
||||||
|
@ -73,7 +75,9 @@ New_Statement_Handler statement_handlers[] =
|
||||||
{"collections.group.parts.part.name", st_collections_group_parts_part_name},
|
{"collections.group.parts.part.name", st_collections_group_parts_part_name},
|
||||||
{"collections.group.parts.part.type", st_collections_group_parts_part_type},
|
{"collections.group.parts.part.type", st_collections_group_parts_part_type},
|
||||||
{"collections.group.parts.part.mouse_events", st_collections_group_parts_part_mouse_events},
|
{"collections.group.parts.part.mouse_events", st_collections_group_parts_part_mouse_events},
|
||||||
|
{"collections.group.parts.part.clip_to", st_collections_group_parts_part_clip_to_id},
|
||||||
{"collections.group.parts.part.color_class", st_collections_group_parts_part_color_class},
|
{"collections.group.parts.part.color_class", st_collections_group_parts_part_color_class},
|
||||||
|
{"collections.group.parts.part.text_class", st_collections_group_parts_part_text_class},
|
||||||
{"collections.group.parts.part.description.state", st_collections_group_parts_part_description_state},
|
{"collections.group.parts.part.description.state", st_collections_group_parts_part_description_state},
|
||||||
{"collections.group.parts.part.description.visible", st_collections_group_parts_part_description_visible},
|
{"collections.group.parts.part.description.visible", st_collections_group_parts_part_description_visible},
|
||||||
{"collections.group.parts.part.description.dragable.x", st_collections_group_parts_part_description_dragable_x},
|
{"collections.group.parts.part.description.dragable.x", st_collections_group_parts_part_description_dragable_x},
|
||||||
|
@ -128,7 +132,9 @@ New_Object_Handler object_handlers[] =
|
||||||
{"collections.group.parts.part.name", NULL},
|
{"collections.group.parts.part.name", NULL},
|
||||||
{"collections.group.parts.part.type", NULL},
|
{"collections.group.parts.part.type", NULL},
|
||||||
{"collections.group.parts.part.mouse_events", NULL},
|
{"collections.group.parts.part.mouse_events", NULL},
|
||||||
|
{"collections.group.parts.part.clip_to", NULL},
|
||||||
{"collections.group.parts.part.color_class", NULL},
|
{"collections.group.parts.part.color_class", NULL},
|
||||||
|
{"collections.group.parts.part.text_class", NULL},
|
||||||
{"collections.group.parts.part.description", ob_collections_group_parts_part_description},
|
{"collections.group.parts.part.description", ob_collections_group_parts_part_description},
|
||||||
{"collections.group.parts.part.description.state", NULL},
|
{"collections.group.parts.part.description.state", NULL},
|
||||||
{"collections.group.parts.part.description.visible", NULL},
|
{"collections.group.parts.part.description.visible", NULL},
|
||||||
|
@ -299,6 +305,7 @@ ob_collections_group_parts_part(void)
|
||||||
ep->id = evas_list_count(pc->parts) - 1;
|
ep->id = evas_list_count(pc->parts) - 1;
|
||||||
ep->type = EDJE_PART_TYPE_IMAGE;
|
ep->type = EDJE_PART_TYPE_IMAGE;
|
||||||
ep->mouse_events = 1;
|
ep->mouse_events = 1;
|
||||||
|
ep->clip_to_id = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -339,6 +346,23 @@ st_collections_group_parts_part_mouse_events(void)
|
||||||
ep->mouse_events = parse_int_range(0, 0, 1);
|
ep->mouse_events = parse_int_range(0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
st_collections_group_parts_part_clip_to_id(void)
|
||||||
|
{
|
||||||
|
Edje_Part_Collection *pc;
|
||||||
|
Edje_Part *ep;
|
||||||
|
|
||||||
|
pc = evas_list_data(evas_list_last(edje_collections));
|
||||||
|
ep = evas_list_data(evas_list_last(pc->parts));
|
||||||
|
{
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
name = parse_str(0);
|
||||||
|
data_queue_part_lookup(pc, name, &(ep->clip_to_id));
|
||||||
|
free(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
st_collections_group_parts_part_color_class(void)
|
st_collections_group_parts_part_color_class(void)
|
||||||
{
|
{
|
||||||
|
@ -350,6 +374,17 @@ st_collections_group_parts_part_color_class(void)
|
||||||
ep->color_class = parse_str(0);
|
ep->color_class = parse_str(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
st_collections_group_parts_part_text_class(void)
|
||||||
|
{
|
||||||
|
Edje_Part_Collection *pc;
|
||||||
|
Edje_Part *ep;
|
||||||
|
|
||||||
|
pc = evas_list_data(evas_list_last(edje_collections));
|
||||||
|
ep = evas_list_data(evas_list_last(pc->parts));
|
||||||
|
ep->text_class = parse_str(0);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ob_collections_group_parts_part_description(void)
|
ob_collections_group_parts_part_description(void)
|
||||||
{
|
{
|
||||||
|
@ -366,7 +401,6 @@ ob_collections_group_parts_part_description(void)
|
||||||
ep->other_desc = evas_list_append(ep->other_desc, ed);
|
ep->other_desc = evas_list_append(ep->other_desc, ed);
|
||||||
ed->visible = 1;
|
ed->visible = 1;
|
||||||
ed->dragable.confine_id = -1;
|
ed->dragable.confine_id = -1;
|
||||||
ed->clip_to_id = -1;
|
|
||||||
ed->align.x = 0.5;
|
ed->align.x = 0.5;
|
||||||
ed->align.y = 0.5;
|
ed->align.y = 0.5;
|
||||||
ed->min.w = 0;
|
ed->min.w = 0;
|
||||||
|
|
|
@ -134,7 +134,6 @@ _edje_edd_setup(void)
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "dragable.step_y", dragable.step_y, EET_T_INT);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "dragable.step_y", dragable.step_y, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "dragable.count_y", dragable.count_y, EET_T_INT);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "dragable.count_y", dragable.count_y, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "dragable.counfine_id", dragable.confine_id, EET_T_INT);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "dragable.counfine_id", dragable.confine_id, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "clip_to_id", clip_to_id, EET_T_INT);
|
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "align.x", align.x, EET_T_DOUBLE);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "align.x", align.x, EET_T_DOUBLE);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "align.y", align.y, EET_T_DOUBLE);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "align.y", align.y, EET_T_DOUBLE);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "min.w", min.w, EET_T_INT);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description, Edje_Part_Description, "min.w", min.w, EET_T_INT);
|
||||||
|
@ -204,6 +203,7 @@ _edje_edd_setup(void)
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "id", id, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "type", type, EET_T_CHAR);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "type", type, EET_T_CHAR);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mouse_events", mouse_events, EET_T_CHAR);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mouse_events", mouse_events, EET_T_CHAR);
|
||||||
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "clip_to_id", clip_to_id, EET_T_INT);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "color_class", color_class, EET_T_STRING);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "color_class", color_class, EET_T_STRING);
|
||||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "text_class", text_class, EET_T_STRING);
|
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "text_class", text_class, EET_T_STRING);
|
||||||
EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_part, Edje_Part, "default_desc", default_desc, _edje_edd_edje_part_description);
|
EET_DATA_DESCRIPTOR_ADD_SUB(_edje_edd_edje_part, Edje_Part, "default_desc", default_desc, _edje_edd_edje_part_description);
|
||||||
|
|
|
@ -85,6 +85,12 @@ edje_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
rp->param1.rel1_to = evas_list_nth(ed->parts, rp->param1.description->rel1.id);
|
rp->param1.rel1_to = evas_list_nth(ed->parts, rp->param1.description->rel1.id);
|
||||||
if (rp->param1.description->rel2.id >= 0)
|
if (rp->param1.description->rel2.id >= 0)
|
||||||
rp->param1.rel2_to = evas_list_nth(ed->parts, rp->param1.description->rel2.id);
|
rp->param1.rel2_to = evas_list_nth(ed->parts, rp->param1.description->rel2.id);
|
||||||
|
if (rp->part->clip_to_id >= 0)
|
||||||
|
{
|
||||||
|
rp->clip_to = evas_list_nth(ed->parts, rp->part->clip_to_id);
|
||||||
|
if (rp->clip_to)
|
||||||
|
evas_object_clip_set(rp->object, rp->clip_to->object);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_freeze(ed);
|
_edje_freeze(ed);
|
||||||
|
|
|
@ -10,23 +10,39 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
|
|
||||||
/* FIXME: need "random" signals and events to hook to */
|
/* FIXME:
|
||||||
/* FIXME: clip_to needs to work */
|
* reference count programs since the tmp lists can be screwed if a program is ended by another
|
||||||
/* FIXME: free stuff - no more leaks */
|
* need "random" signals and events for hooking to, and "random" durations
|
||||||
/* FIXME: dragables have to work */
|
* free stuff - no more leaks
|
||||||
/* FIXME: drag start/top signals etc. */
|
* dragables have to work
|
||||||
/* FIXME: drag needs to have signals with relative pos */
|
* drag start/top signals etc.
|
||||||
/* FIXME: drag vals 0.0 -> 1.0. "rest" pos == 0.0 */
|
* drag needs to have signals with relative pos as arg.
|
||||||
/* FIXME: text parts need to work */
|
* drag vals should be 0.0 -> 1.0 if drag is confined. "rest" pos = 0.0.
|
||||||
/* FIXME: reduce linked list walking and list_nth calls */
|
* query dragable for its relative pos value
|
||||||
/* FIXME: named parts need to be able to be "replaced" with new evas objects */
|
* text parts need to work
|
||||||
/* FIXME: need to be able to calculate min & max size of a whole edje */
|
* text and color classes need to work
|
||||||
/* FIXME: add code to list collections in an eet */
|
* reduce linked list walking and list_nth calls
|
||||||
/* FIXME: part replacement with objec t+callbacks */
|
* named parts need to be able to be "replaced" with new evas objects
|
||||||
/* FIXME: part queries for geometry etc. */
|
* real part size and "before min/max limit" sizes need to be stored per part
|
||||||
|
* need to be able to calculate min & max size of a whole edje
|
||||||
/* FIXME: ? somehow handle double click? */
|
* add code to list collections in an eet file
|
||||||
/* FIXME: ? add numeric params to conditions for progs (ranges etc.) */
|
* externally sourced images need to be supported in edje_cc and edje
|
||||||
|
* part replacement with object callbacks should be possible
|
||||||
|
* part queries for geometry etc.
|
||||||
|
* need to be able to "pause" edjes from API
|
||||||
|
* need to be able to force anim times to 0.0 from API to turn off animation
|
||||||
|
* need to detect relative loops
|
||||||
|
* need to detect clip_to loops
|
||||||
|
* need to detect anim time 0.0 loops
|
||||||
|
* need to check frametime 0.0 works
|
||||||
|
* need to check mouse_events flag works
|
||||||
|
* edje_cc should be able to force lossy, lossless, min and max quality and compression of encoded images
|
||||||
|
* edje_cc needs to prune out unused images
|
||||||
|
* edje_cc might need an option for limiting number of tween images
|
||||||
|
* audit edje for corrupt/bad input files
|
||||||
|
* ? somehow handle double click?
|
||||||
|
* ? add numeric params to conditions for progs (ranges etc.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* HOW THIS ALL WORKS:
|
/* HOW THIS ALL WORKS:
|
||||||
|
@ -198,9 +214,10 @@ struct _Edje_Part_Collection
|
||||||
struct _Edje_Part
|
struct _Edje_Part
|
||||||
{
|
{
|
||||||
char *name; /* the name if any of the part */
|
char *name; /* the name if any of the part */
|
||||||
|
int id; /* its id number */
|
||||||
unsigned char type; /* what type (image, rect, text) */
|
unsigned char type; /* what type (image, rect, text) */
|
||||||
unsigned char mouse_events; /* it will affect/respond to mouse events */
|
unsigned char mouse_events; /* it will affect/respond to mouse events */
|
||||||
int id; /* its id number */
|
int clip_to_id; /* the part id to clip this one to */
|
||||||
char *color_class; /* how to modify the color */
|
char *color_class; /* how to modify the color */
|
||||||
char *text_class; /* how to apply/modify the font */
|
char *text_class; /* how to apply/modify the font */
|
||||||
Edje_Part_Description *default_desc; /* the part descriptor for default */
|
Edje_Part_Description *default_desc; /* the part descriptor for default */
|
||||||
|
@ -233,8 +250,6 @@ struct _Edje_Part_Description
|
||||||
int confine_id; /* dragging within this bit, -1 = no */
|
int confine_id; /* dragging within this bit, -1 = no */
|
||||||
} dragable;
|
} dragable;
|
||||||
|
|
||||||
int clip_to_id; /* the part id to clip this one to */
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
double x, y; /* 0 <-> 1.0 alignment within allocated space */
|
double x, y; /* 0 <-> 1.0 alignment within allocated space */
|
||||||
} align;
|
} align;
|
||||||
|
@ -360,6 +375,8 @@ struct _Edje_Real_Part
|
||||||
Edje_Real_Part *rel2_to;
|
Edje_Real_Part *rel2_to;
|
||||||
Edje_Real_Part *confine_to;
|
Edje_Real_Part *confine_to;
|
||||||
} param1, param2;
|
} param1, param2;
|
||||||
|
|
||||||
|
Edje_Real_Part *clip_to;
|
||||||
|
|
||||||
Edje_Running_Program *program;
|
Edje_Running_Program *program;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue