forked from enlightenment/efl
emissions now for the part collection soruce is now "". fixed a tinsy parser
bug for parsing "". emissions now wont recurse - but they may loop. hmm need to limit that - easy to do this way though. SVN revision: 7046
This commit is contained in:
parent
66bcb0fb57
commit
27d69a4698
|
@ -340,8 +340,8 @@ collections {
|
||||||
}
|
}
|
||||||
program {
|
program {
|
||||||
name, "logo_animate";
|
name, "logo_animate";
|
||||||
signal, "load";
|
signal, "show";
|
||||||
source, "test";
|
source, "";
|
||||||
action, STATE_SET "default" 0.0;
|
action, STATE_SET "default" 0.0;
|
||||||
transition, LINEAR, 4.0;
|
transition, LINEAR, 4.0;
|
||||||
target, "logo_anim";
|
target, "logo_anim";
|
||||||
|
|
|
@ -193,6 +193,7 @@ next_token(char *p, char *end, char **new_p, int *delim)
|
||||||
strcpy(p, p + 1);
|
strcpy(p, p + 1);
|
||||||
else if ((*p == '\\') && (*(p + 1) == '\\'))
|
else if ((*p == '\\') && (*(p + 1) == '\\'))
|
||||||
strcpy(p, p + 1);
|
strcpy(p, p + 1);
|
||||||
|
else
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,8 @@ static int _edje_anim_count = 0;
|
||||||
static double _edje_frametime = 1.0 / 60.0;
|
static double _edje_frametime = 1.0 / 60.0;
|
||||||
static Ecore_Timer *_edje_timer = NULL;
|
static Ecore_Timer *_edje_timer = NULL;
|
||||||
static Evas_List *_edje_animators = NULL;
|
static Evas_List *_edje_animators = NULL;
|
||||||
|
static Evas_Hash *_edje_file_hash = NULL;
|
||||||
|
|
||||||
|
|
||||||
static Evas_Smart *_edje_smart = NULL;
|
static Evas_Smart *_edje_smart = NULL;
|
||||||
|
|
||||||
|
@ -198,7 +200,7 @@ edje_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||||
}
|
}
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
_edje_emit(ed, "load", ed->part);
|
_edje_emit(ed, "load", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,8 +247,6 @@ _edje_del(Edje *ed)
|
||||||
free(ed);
|
free(ed);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Hash *_edje_file_hash = NULL;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_edje_file_add(Edje *ed)
|
_edje_file_add(Edje *ed)
|
||||||
{
|
{
|
||||||
|
@ -619,17 +619,39 @@ static void
|
||||||
_edje_emit(Edje *ed, char *sig, char *src)
|
_edje_emit(Edje *ed, char *sig, char *src)
|
||||||
{
|
{
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
static Evas_List *emissions = NULL;
|
||||||
|
Edje_Emission *ee;
|
||||||
|
|
||||||
printf("EMIT %s %s\n", sig, src);
|
printf("EMIT \"%s\" \"%s\"\n", sig, src);
|
||||||
|
ee = calloc(1, sizeof(Edje_Emission));
|
||||||
|
if (!ee) return;
|
||||||
|
ee->signal = strdup(sig);
|
||||||
|
ee->source = strdup(src);
|
||||||
|
if (emissions)
|
||||||
|
{
|
||||||
|
emissions = evas_list_append(emissions, ee);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
emissions = evas_list_append(emissions, ee);
|
||||||
|
while (emissions)
|
||||||
|
{
|
||||||
|
ee = emissions->data;
|
||||||
|
printf(" emission \"%s\" \"%s\"\n", ee->signal, ee->source);
|
||||||
|
emissions = evas_list_remove(emissions, ee);
|
||||||
for (l = ed->collection->programs; l; l = l->next)
|
for (l = ed->collection->programs; l; l = l->next)
|
||||||
{
|
{
|
||||||
Edje_Program *pr;
|
Edje_Program *pr;
|
||||||
|
|
||||||
pr = l->data;
|
pr = l->data;
|
||||||
if ((_edje_glob_match(sig, pr->signal)) &&
|
if ((_edje_glob_match(ee->signal, pr->signal)) &&
|
||||||
(_edje_glob_match(src, pr->source)))
|
(_edje_glob_match(ee->source, pr->source)))
|
||||||
_edje_program_run(ed, pr);
|
_edje_program_run(ed, pr);
|
||||||
}
|
}
|
||||||
|
free(ee->signal);
|
||||||
|
free(ee->source);
|
||||||
|
free(ee);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1468,6 +1490,7 @@ _edje_smart_layer_set(Evas_Object * obj, int layer)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
char buf[256];
|
||||||
|
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
|
@ -1480,6 +1503,8 @@ _edje_smart_layer_set(Evas_Object * obj, int layer)
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
evas_object_layer_set(ep->object, ed->layer);
|
evas_object_layer_set(ep->object, ed->layer);
|
||||||
}
|
}
|
||||||
|
snprintf(buf, sizeof(buf), "layer,set,%i", layer);
|
||||||
|
_edje_emit(ed, buf, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1497,6 +1522,7 @@ _edje_smart_raise(Evas_Object * obj)
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
evas_object_raise(ep->object);
|
evas_object_raise(ep->object);
|
||||||
}
|
}
|
||||||
|
_edje_emit(ed, "raise", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1514,6 +1540,7 @@ _edje_smart_lower(Evas_Object * obj)
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
evas_object_lower(ep->object);
|
evas_object_lower(ep->object);
|
||||||
}
|
}
|
||||||
|
_edje_emit(ed, "lower", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1531,6 +1558,7 @@ _edje_smart_stack_above(Evas_Object * obj, Evas_Object * above)
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
evas_object_stack_above(ep->object, above);
|
evas_object_stack_above(ep->object, above);
|
||||||
}
|
}
|
||||||
|
_edje_emit(ed, "stack_above", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1548,6 +1576,7 @@ _edje_smart_stack_below(Evas_Object * obj, Evas_Object * below)
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
evas_object_stack_below(ep->object, below);
|
evas_object_stack_below(ep->object, below);
|
||||||
}
|
}
|
||||||
|
_edje_emit(ed, "stack_below", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1555,12 +1584,13 @@ _edje_smart_move(Evas_Object * obj, double x, double y)
|
||||||
{
|
{
|
||||||
Edje *ed;
|
Edje *ed;
|
||||||
Evas_List *l;
|
Evas_List *l;
|
||||||
|
double xx, yy;
|
||||||
|
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
|
if ((ed->x == x) && (ed->y == y)) return;
|
||||||
ed->x = x;
|
ed->x = x;
|
||||||
ed->y = y;
|
ed->y = y;
|
||||||
|
|
||||||
evas_object_move(ed->clipper, ed->x, ed->y);
|
evas_object_move(ed->clipper, ed->x, ed->y);
|
||||||
|
|
||||||
for (l = ed->parts; l; l = l->next)
|
for (l = ed->parts; l; l = l->next)
|
||||||
|
@ -1570,6 +1600,7 @@ _edje_smart_move(Evas_Object * obj, double x, double y)
|
||||||
ep = l->data;
|
ep = l->data;
|
||||||
evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y);
|
evas_object_move(ep->object, ed->x + ep->x, ed->y + ep->y);
|
||||||
}
|
}
|
||||||
|
_edje_emit(ed, "move", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1588,6 +1619,7 @@ _edje_smart_resize(Evas_Object * obj, double w, double h)
|
||||||
evas_object_resize(ed->clipper, ed->w, ed->h);
|
evas_object_resize(ed->clipper, ed->w, ed->h);
|
||||||
ed->dirty = 1;
|
ed->dirty = 1;
|
||||||
_edje_recalc(ed);
|
_edje_recalc(ed);
|
||||||
|
_edje_emit(ed, "resize", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1598,6 +1630,7 @@ _edje_smart_show(Evas_Object * obj)
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
evas_object_show(ed->clipper);
|
evas_object_show(ed->clipper);
|
||||||
|
_edje_emit(ed, "show", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1608,6 +1641,7 @@ _edje_smart_hide(Evas_Object * obj)
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
evas_object_hide(ed->clipper);
|
evas_object_hide(ed->clipper);
|
||||||
|
_edje_emit(ed, "hide", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1618,6 +1652,7 @@ _edje_smart_color_set(Evas_Object * obj, int r, int g, int b, int a)
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
evas_object_color_set(ed->clipper, r, g, b, a);
|
evas_object_color_set(ed->clipper, r, g, b, a);
|
||||||
|
_edje_emit(ed, "color_set", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1627,7 +1662,9 @@ _edje_smart_clip_set(Evas_Object * obj, Evas_Object * clip)
|
||||||
|
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
|
if (evas_object_clip_get(obj) == clip) return;
|
||||||
evas_object_clip_set(ed->clipper, clip);
|
evas_object_clip_set(ed->clipper, clip);
|
||||||
|
_edje_emit(ed, "clip_set", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1637,5 +1674,7 @@ _edje_smart_clip_unset(Evas_Object * obj)
|
||||||
|
|
||||||
ed = evas_object_smart_data_get(obj);
|
ed = evas_object_smart_data_get(obj);
|
||||||
if (!ed) return;
|
if (!ed) return;
|
||||||
|
if (!evas_object_clip_get(obj)) return;
|
||||||
evas_object_clip_unset(ed->clipper);
|
evas_object_clip_unset(ed->clipper);
|
||||||
|
_edje_emit(ed, "clip_unset", "");
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,6 +292,8 @@ struct _Edje_Part_Description
|
||||||
typedef struct _Edje Edje;
|
typedef struct _Edje Edje;
|
||||||
typedef struct _Edje_Real_Part Edje_Real_Part;
|
typedef struct _Edje_Real_Part Edje_Real_Part;
|
||||||
typedef struct _Edje_Running_Program Edje_Running_Program;
|
typedef struct _Edje_Running_Program Edje_Running_Program;
|
||||||
|
typedef struct _Edje_Calc_Params Edje_Calc_Params;
|
||||||
|
typedef struct _Edje_Emission Edje_Emission;
|
||||||
|
|
||||||
struct _Edje
|
struct _Edje
|
||||||
{
|
{
|
||||||
|
@ -340,8 +342,6 @@ struct _Edje_Running_Program
|
||||||
double start_time;
|
double start_time;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _Edje_Calc_Params Edje_Calc_Params;
|
|
||||||
|
|
||||||
struct _Edje_Calc_Params
|
struct _Edje_Calc_Params
|
||||||
{
|
{
|
||||||
double x, y, w, h;
|
double x, y, w, h;
|
||||||
|
@ -357,6 +357,12 @@ struct _Edje_Calc_Params
|
||||||
} border;
|
} border;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct _Edje_Emission
|
||||||
|
{
|
||||||
|
char *signal;
|
||||||
|
char *source;
|
||||||
|
};
|
||||||
|
|
||||||
extern Eet_Data_Descriptor *_edje_edd_edje_file;
|
extern Eet_Data_Descriptor *_edje_edd_edje_file;
|
||||||
extern Eet_Data_Descriptor *_edje_edd_edje_image_directory;
|
extern Eet_Data_Descriptor *_edje_edd_edje_image_directory;
|
||||||
extern Eet_Data_Descriptor *_edje_edd_edje_image_directory_entry;
|
extern Eet_Data_Descriptor *_edje_edd_edje_image_directory_entry;
|
||||||
|
|
Loading…
Reference in New Issue