forked from enlightenment/efl
faster lookups for programs & parts - saves a lot of list walking
SVN revision: 9552
This commit is contained in:
parent
d9d7b969dd
commit
40f9fc4f31
|
@ -425,6 +425,11 @@ struct _Edje
|
|||
int load_error;
|
||||
int freeze;
|
||||
Edje_Var_Pool *var_pool;
|
||||
/* for faster lookups to avoid nth list walks */
|
||||
int table_parts_size;
|
||||
Edje_Real_Part **table_parts;
|
||||
int table_programs_size;
|
||||
Edje_Program **table_programs;
|
||||
};
|
||||
|
||||
struct _Edje_Real_Part
|
||||
|
|
|
@ -30,6 +30,7 @@ edje_data.c \
|
|||
edje_embryo.c \
|
||||
edje_load.c \
|
||||
edje_main.c \
|
||||
edje_misc.c \
|
||||
edje_program.c \
|
||||
edje_smart.c \
|
||||
edje_text.c \
|
||||
|
|
|
@ -91,13 +91,13 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, char *d1, double v1,
|
|||
if (ep->param1.description)
|
||||
{
|
||||
if (ep->param1.description->rel1.id_x >= 0)
|
||||
ep->param1.rel1_to_x = evas_list_nth(ed->parts, ep->param1.description->rel1.id_x);
|
||||
ep->param1.rel1_to_x = ed->table_parts[ep->param1.description->rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->rel1.id_y >= 0)
|
||||
ep->param1.rel1_to_y = evas_list_nth(ed->parts, ep->param1.description->rel1.id_y);
|
||||
ep->param1.rel1_to_y = ed->table_parts[ep->param1.description->rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param1.description->rel2.id_x >= 0)
|
||||
ep->param1.rel2_to_x = evas_list_nth(ed->parts, ep->param1.description->rel2.id_x);
|
||||
ep->param1.rel2_to_x = ed->table_parts[ep->param1.description->rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->rel2.id_y >= 0)
|
||||
ep->param1.rel2_to_y = evas_list_nth(ed->parts, ep->param1.description->rel2.id_y);
|
||||
ep->param1.rel2_to_y = ed->table_parts[ep->param1.description->rel2.id_y % ed->table_parts_size];
|
||||
}
|
||||
|
||||
if (!strcmp(d2, "default") && (v2 == 0.0))
|
||||
|
@ -150,13 +150,13 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, char *d1, double v1,
|
|||
if (ep->param1.description)
|
||||
{
|
||||
if (ep->param1.description->rel1.id_x >= 0)
|
||||
ep->param1.rel1_to_x = evas_list_nth(ed->parts, ep->param1.description->rel1.id_x);
|
||||
ep->param1.rel1_to_x = ed->table_parts[ep->param1.description->rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->rel1.id_y >= 0)
|
||||
ep->param1.rel1_to_y = evas_list_nth(ed->parts, ep->param1.description->rel1.id_y);
|
||||
ep->param1.rel1_to_y = ed->table_parts[ep->param1.description->rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param1.description->rel2.id_x >= 0)
|
||||
ep->param1.rel2_to_x = evas_list_nth(ed->parts, ep->param1.description->rel2.id_x);
|
||||
ep->param1.rel2_to_x = ed->table_parts[ep->param1.description->rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param1.description->rel2.id_y >= 0)
|
||||
ep->param1.rel2_to_y = evas_list_nth(ed->parts, ep->param1.description->rel2.id_y);
|
||||
ep->param1.rel2_to_y = ed->table_parts[ep->param1.description->rel2.id_y % ed->table_parts_size];
|
||||
}
|
||||
ep->param2.rel1_to_x = NULL;
|
||||
ep->param2.rel1_to_y = NULL;
|
||||
|
@ -165,13 +165,13 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, char *d1, double v1,
|
|||
if (ep->param2.description)
|
||||
{
|
||||
if (ep->param2.description->rel1.id_x >= 0)
|
||||
ep->param2.rel1_to_x = evas_list_nth(ed->parts, ep->param2.description->rel1.id_x);
|
||||
ep->param2.rel1_to_x = ed->table_parts[ep->param2.description->rel1.id_x % ed->table_parts_size];
|
||||
if (ep->param2.description->rel1.id_y >= 0)
|
||||
ep->param2.rel1_to_y = evas_list_nth(ed->parts, ep->param2.description->rel1.id_y);
|
||||
ep->param2.rel1_to_y = ed->table_parts[ep->param2.description->rel1.id_y % ed->table_parts_size];
|
||||
if (ep->param2.description->rel2.id_x >= 0)
|
||||
ep->param2.rel2_to_x = evas_list_nth(ed->parts, ep->param2.description->rel2.id_x);
|
||||
ep->param2.rel2_to_x = ed->table_parts[ep->param2.description->rel2.id_x % ed->table_parts_size];
|
||||
if (ep->param2.description->rel2.id_y >= 0)
|
||||
ep->param2.rel2_to_y = evas_list_nth(ed->parts, ep->param2.description->rel2.id_y);
|
||||
ep->param2.rel2_to_y = ed->table_parts[ep->param2.description->rel2.id_y % ed->table_parts_size];
|
||||
}
|
||||
|
||||
ed->dirty = 1;
|
||||
|
|
|
@ -13,6 +13,7 @@ int
|
|||
edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
||||
{
|
||||
Edje *ed;
|
||||
int n;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
if (!ed) return 0;
|
||||
|
@ -85,7 +86,7 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
|||
hist = NULL;
|
||||
}
|
||||
/* build real parts */
|
||||
for (l = ed->collection->parts; l; l = l->next)
|
||||
for (n = 0, l = ed->collection->parts; l; l = l->next, n++)
|
||||
{
|
||||
Edje_Part *ep;
|
||||
Edje_Real_Part *rp;
|
||||
|
@ -152,36 +153,61 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *part)
|
|||
rp->drag.step.x = ep->dragable.step_x;
|
||||
rp->drag.step.y = ep->dragable.step_y;
|
||||
}
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
if (n > 0)
|
||||
{
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp = l->data;
|
||||
if (rp->param1.description->rel1.id_x >= 0)
|
||||
rp->param1.rel1_to_x = evas_list_nth(ed->parts, rp->param1.description->rel1.id_x);
|
||||
if (rp->param1.description->rel1.id_y >= 0)
|
||||
rp->param1.rel1_to_y = evas_list_nth(ed->parts, rp->param1.description->rel1.id_y);
|
||||
if (rp->param1.description->rel2.id_x >= 0)
|
||||
rp->param1.rel2_to_x = evas_list_nth(ed->parts, rp->param1.description->rel2.id_x);
|
||||
if (rp->param1.description->rel2.id_y >= 0)
|
||||
rp->param1.rel2_to_y = evas_list_nth(ed->parts, rp->param1.description->rel2.id_y);
|
||||
_edje_text_part_on_add_clippers(ed, rp);
|
||||
if (rp->part->clip_to_id >= 0)
|
||||
ed->table_parts = malloc(sizeof(Edje_Real_Part *) * n);
|
||||
ed->table_parts_size = n;
|
||||
/* FIXME: check malloc return */
|
||||
n = 0;
|
||||
for (l = ed->parts; l; l = l->next)
|
||||
{
|
||||
rp->clip_to = evas_list_nth(ed->parts, rp->part->clip_to_id);
|
||||
if (rp->clip_to)
|
||||
{
|
||||
evas_object_pass_events_set(rp->clip_to->object, 1);
|
||||
evas_object_clip_set(rp->object, rp->clip_to->object);
|
||||
}
|
||||
}
|
||||
if (rp->part->dragable.confine_id >= 0)
|
||||
rp->confine_to = evas_list_nth(ed->parts, rp->part->dragable.confine_id);
|
||||
Edje_Real_Part *rp;
|
||||
|
||||
rp->swallow_params.min.w = 0;
|
||||
rp->swallow_params.min.w = 0;
|
||||
rp->swallow_params.max.w = -1;
|
||||
rp->swallow_params.max.h = -1;
|
||||
rp = l->data;
|
||||
ed->table_parts[n] = rp;
|
||||
n++;
|
||||
if (rp->param1.description->rel1.id_x >= 0)
|
||||
rp->param1.rel1_to_x = evas_list_nth(ed->parts, rp->param1.description->rel1.id_x);
|
||||
if (rp->param1.description->rel1.id_y >= 0)
|
||||
rp->param1.rel1_to_y = evas_list_nth(ed->parts, rp->param1.description->rel1.id_y);
|
||||
if (rp->param1.description->rel2.id_x >= 0)
|
||||
rp->param1.rel2_to_x = evas_list_nth(ed->parts, rp->param1.description->rel2.id_x);
|
||||
if (rp->param1.description->rel2.id_y >= 0)
|
||||
rp->param1.rel2_to_y = evas_list_nth(ed->parts, rp->param1.description->rel2.id_y);
|
||||
_edje_text_part_on_add_clippers(ed, rp);
|
||||
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_pass_events_set(rp->clip_to->object, 1);
|
||||
evas_object_clip_set(rp->object, rp->clip_to->object);
|
||||
}
|
||||
}
|
||||
if (rp->part->dragable.confine_id >= 0)
|
||||
rp->confine_to = evas_list_nth(ed->parts, rp->part->dragable.confine_id);
|
||||
|
||||
rp->swallow_params.min.w = 0;
|
||||
rp->swallow_params.min.w = 0;
|
||||
rp->swallow_params.max.w = -1;
|
||||
rp->swallow_params.max.h = -1;
|
||||
}
|
||||
}
|
||||
n = evas_list_count(ed->collection->programs);
|
||||
if (n > 0)
|
||||
{
|
||||
ed->table_programs = malloc(sizeof(Edje_Program *) * n);
|
||||
ed->table_programs_size = n;
|
||||
/* FIXME: check malloc return */
|
||||
n = 0;
|
||||
for (l = ed->collection->programs; l; l = l->next)
|
||||
{
|
||||
Edje_Program *pr;
|
||||
|
||||
pr = l->data;
|
||||
ed->table_programs[n] = pr;
|
||||
n++;
|
||||
}
|
||||
}
|
||||
_edje_ref(ed);
|
||||
_edje_block(ed);
|
||||
|
@ -537,6 +563,12 @@ _edje_file_del(Edje *ed)
|
|||
free(pp);
|
||||
}
|
||||
}
|
||||
if (ed->table_parts) free(ed->table_parts);
|
||||
ed->table_parts = NULL;
|
||||
ed->table_parts_size = 0;
|
||||
if (ed->table_programs) free(ed->table_programs);
|
||||
ed->table_programs = NULL;
|
||||
ed->table_programs_size = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#include "Edje.h"
|
||||
#include "edje_private.h"
|
||||
|
||||
/* nothing in here yet */
|
|
@ -228,9 +228,12 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if (rp) _edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, t);
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (rp) _edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, t);
|
||||
}
|
||||
}
|
||||
if (t >= 1.0)
|
||||
{
|
||||
|
@ -240,17 +243,20 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if (rp)
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
runp->program->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, 0.0);
|
||||
rp->program = NULL;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (rp)
|
||||
{
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
runp->program->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, 0.0);
|
||||
rp->program = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_recalc(ed);
|
||||
|
@ -275,7 +281,7 @@ _edje_program_run_iterate(Edje_Running_Program *runp, double tim)
|
|||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
pr = evas_list_nth(ed->collection->programs, pa->id);
|
||||
pr = ed->table_programs[pa->id % ed->table_programs_size];
|
||||
if (pr) _edje_program_run(ed, pr, 0, "", "");
|
||||
if (_edje_block_break(ed))
|
||||
{
|
||||
|
@ -313,17 +319,20 @@ _edje_program_end(Edje *ed, Edje_Running_Program *runp)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if (rp)
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
runp->program->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, 0.0);
|
||||
rp->program = NULL;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (rp)
|
||||
{
|
||||
_edje_part_description_apply(ed, rp,
|
||||
runp->program->state,
|
||||
runp->program->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp,
|
||||
runp->program->tween.mode, 0.0);
|
||||
rp->program = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_recalc(ed);
|
||||
|
@ -397,18 +406,21 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if (rp)
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
rp->param1.description->state.name,
|
||||
rp->param1.description->state.value,
|
||||
pr->state,
|
||||
pr->value);
|
||||
_edje_part_pos_set(ed, rp, pr->tween.mode, 0.0);
|
||||
rp->program = runp;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (rp)
|
||||
{
|
||||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
rp->param1.description->state.name,
|
||||
rp->param1.description->state.value,
|
||||
pr->state,
|
||||
pr->value);
|
||||
_edje_part_pos_set(ed, rp, pr->tween.mode, 0.0);
|
||||
rp->program = runp;
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_emit(ed, "program,start", pr->name);
|
||||
|
@ -435,17 +447,20 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if (rp)
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
pr->state,
|
||||
pr->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp, pr->tween.mode, 0.0);
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if (rp)
|
||||
{
|
||||
if (rp->program)
|
||||
_edje_program_end(ed, rp->program);
|
||||
_edje_part_description_apply(ed, rp,
|
||||
pr->state,
|
||||
pr->value,
|
||||
NULL,
|
||||
0.0);
|
||||
_edje_part_pos_set(ed, rp, pr->tween.mode, 0.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_emit(ed, "program,start", pr->name);
|
||||
|
@ -460,7 +475,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
pr2 = evas_list_nth(ed->collection->programs, pa->id);
|
||||
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
||||
if (pr2) _edje_program_run(ed, pr2, 0, "", "");
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
|
@ -526,18 +541,21 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if ((rp) && (rp->drag.down.count == 0))
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
rp->drag.val.x = pr->value;
|
||||
rp->drag.val.y = pr->value2;
|
||||
if (rp->drag.val.x < 0.0) rp->drag.val.x = 0.0;
|
||||
else if (rp->drag.val.x > 1.0) rp->drag.val.x = 1.0;
|
||||
if (rp->drag.val.y < 0.0) rp->drag.val.y = 0.0;
|
||||
else if (rp->drag.val.y > 1.0) rp->drag.val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
_edje_emit(ed, "drag,set", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if ((rp) && (rp->drag.down.count == 0))
|
||||
{
|
||||
rp->drag.val.x = pr->value;
|
||||
rp->drag.val.y = pr->value2;
|
||||
if (rp->drag.val.x < 0.0) rp->drag.val.x = 0.0;
|
||||
else if (rp->drag.val.x > 1.0) rp->drag.val.x = 1.0;
|
||||
if (rp->drag.val.y < 0.0) rp->drag.val.y = 0.0;
|
||||
else if (rp->drag.val.y > 1.0) rp->drag.val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
_edje_emit(ed, "drag,set", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_emit(ed, "program,stop", pr->name);
|
||||
|
@ -553,18 +571,21 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if ((rp) && (rp->drag.down.count == 0))
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
rp->drag.val.x += pr->value * rp->drag.step.x * rp->part->dragable.x;
|
||||
rp->drag.val.y += pr->value2 * rp->drag.step.y * rp->part->dragable.y;
|
||||
if (rp->drag.val.x < 0.0) rp->drag.val.x = 0.0;
|
||||
else if (rp->drag.val.x > 1.0) rp->drag.val.x = 1.0;
|
||||
if (rp->drag.val.y < 0.0) rp->drag.val.y = 0.0;
|
||||
else if (rp->drag.val.y > 1.0) rp->drag.val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
_edje_emit(ed, "drag,step", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if ((rp) && (rp->drag.down.count == 0))
|
||||
{
|
||||
rp->drag.val.x += pr->value * rp->drag.step.x * rp->part->dragable.x;
|
||||
rp->drag.val.y += pr->value2 * rp->drag.step.y * rp->part->dragable.y;
|
||||
if (rp->drag.val.x < 0.0) rp->drag.val.x = 0.0;
|
||||
else if (rp->drag.val.x > 1.0) rp->drag.val.x = 1.0;
|
||||
if (rp->drag.val.y < 0.0) rp->drag.val.y = 0.0;
|
||||
else if (rp->drag.val.y > 1.0) rp->drag.val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
_edje_emit(ed, "drag,step", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_emit(ed, "program,stop", pr->name);
|
||||
|
@ -580,18 +601,21 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
Edje_Program_Target *pt;
|
||||
|
||||
pt = l->data;
|
||||
rp = evas_list_nth(ed->parts, pt->id);
|
||||
if ((rp) && (rp->drag.down.count == 0))
|
||||
if (pt->id >= 0)
|
||||
{
|
||||
rp->drag.val.x += pr->value * rp->drag.page.x * rp->part->dragable.x;
|
||||
rp->drag.val.y += pr->value2 * rp->drag.step.y * rp->part->dragable.y;
|
||||
if (rp->drag.val.x < 0.0) rp->drag.val.x = 0.0;
|
||||
else if (rp->drag.val.x > 1.0) rp->drag.val.x = 1.0;
|
||||
if (rp->drag.val.y < 0.0) rp->drag.val.y = 0.0;
|
||||
else if (rp->drag.val.y > 1.0) rp->drag.val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
_edje_emit(ed, "drag,page", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
rp = ed->table_parts[pt->id % ed->table_parts_size];
|
||||
if ((rp) && (rp->drag.down.count == 0))
|
||||
{
|
||||
rp->drag.val.x += pr->value * rp->drag.page.x * rp->part->dragable.x;
|
||||
rp->drag.val.y += pr->value2 * rp->drag.step.y * rp->part->dragable.y;
|
||||
if (rp->drag.val.x < 0.0) rp->drag.val.x = 0.0;
|
||||
else if (rp->drag.val.x > 1.0) rp->drag.val.x = 1.0;
|
||||
if (rp->drag.val.y < 0.0) rp->drag.val.y = 0.0;
|
||||
else if (rp->drag.val.y > 1.0) rp->drag.val.y = 1.0;
|
||||
_edje_dragable_pos_set(ed, rp, rp->drag.val.x, rp->drag.val.y);
|
||||
_edje_emit(ed, "drag,page", rp->part->name);
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
}
|
||||
}
|
||||
_edje_emit(ed, "program,stop", pr->name);
|
||||
|
@ -620,9 +644,9 @@ _edje_program_run(Edje *ed, Edje_Program *pr, int force, char *ssig, char *ssrc)
|
|||
|
||||
if (pa->id >= 0)
|
||||
{
|
||||
pr2 = evas_list_nth(ed->collection->programs, pa->id);
|
||||
if (pr2) _edje_program_run(ed, pr2, 0, "", "");
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
pr2 = ed->table_programs[pa->id % ed->table_programs_size];
|
||||
if (pr2) _edje_program_run(ed, pr2, 0, "", "");
|
||||
if (_edje_block_break(ed)) goto break_prog;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue