move scroll back to event handling - test

SVN revision: 45439
This commit is contained in:
Carsten Haitzler 2010-01-22 12:02:39 +00:00
parent 585b56485d
commit 9427ae2682
2 changed files with 23 additions and 1 deletions

View File

@ -975,6 +975,10 @@ _calc_job(void *data)
Item_Block *chb = NULL; Item_Block *chb = NULL;
int in = 0, minw_change = 0; int in = 0, minw_change = 0;
double t, t_start;
t_start = ecore_time_get();
EINA_INLIST_FOREACH(wd->blocks, itb) EINA_INLIST_FOREACH(wd->blocks, itb)
{ {
int showme = 0; int showme = 0;
@ -1045,6 +1049,9 @@ _calc_job(void *data)
} }
wd->calc_job = NULL; wd->calc_job = NULL;
evas_object_smart_changed(wd->pan_smart); evas_object_smart_changed(wd->pan_smart);
t = ecore_time_get();
printf("calc job %1.5f\n", t - t_start);
} }
static void static void
@ -1596,8 +1603,10 @@ _item_idler(void *data)
{ {
Widget_Data *wd = data; Widget_Data *wd = data;
int n; int n;
double t_start, t;
for (n = 0; (wd->queue) && (n < 8); n++) t_start = ecore_time_get();
for (n = 0; (wd->queue) && (n < 1024); n++)
{ {
Elm_Genlist_Item *it; Elm_Genlist_Item *it;
@ -1605,7 +1614,15 @@ _item_idler(void *data)
wd->queue = eina_list_remove_list(wd->queue, wd->queue); wd->queue = eina_list_remove_list(wd->queue, wd->queue);
it->queued = EINA_FALSE; it->queued = EINA_FALSE;
_item_block_add(wd, it); _item_block_add(wd, it);
t = ecore_time_get();
// FIXME: call calc job now
// if ((t - t_start) > ecore_animator_frametime_get())
// {
// printf("abort idler\n");
// break;
// }
} }
// printf("%1.5f\n", t - t_start);
if (n > 0) if (n > 0)
{ {
if (wd->calc_job) ecore_job_del(wd->calc_job); if (wd->calc_job) ecore_job_del(wd->calc_job);

View File

@ -1466,6 +1466,7 @@ _smart_onhold_animator(void *data)
sd->down.onhold_vxe -= (int)sd->down.onhold_vxe; sd->down.onhold_vxe -= (int)sd->down.onhold_vxe;
sd->down.onhold_vye -= (int)sd->down.onhold_vye; sd->down.onhold_vye -= (int)sd->down.onhold_vye;
elm_smart_scroller_child_pos_set(sd->smart_obj, x, y); elm_smart_scroller_child_pos_set(sd->smart_obj, x, y);
// printf("scroll %i %i\n", sd->down.hold_x, sd->down.hold_y);
} }
sd->down.onhold_tlast = t; sd->down.onhold_tlast = t;
return 1; return 1;
@ -1556,6 +1557,8 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
sd->down.hold_y = y; sd->down.hold_y = y;
if (!sd->down.hold_animator) if (!sd->down.hold_animator)
sd->down.hold_animator = ecore_animator_add(_smart_hold_animator, sd); sd->down.hold_animator = ecore_animator_add(_smart_hold_animator, sd);
// printf("a %i %i\n", sd->down.hold_x, sd->down.hold_y);
_smart_onhold_animator(sd);
// elm_smart_scroller_child_pos_set(sd->smart_obj, x, y); // elm_smart_scroller_child_pos_set(sd->smart_obj, x, y);
} }
} }
@ -1610,6 +1613,8 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info)
sd->down.onhold_tlast = 0.0; sd->down.onhold_tlast = 0.0;
sd->down.onhold_animator = ecore_animator_add(_smart_onhold_animator, sd); sd->down.onhold_animator = ecore_animator_add(_smart_onhold_animator, sd);
} }
// printf("b %i %i\n", sd->down.hold_x, sd->down.hold_y);
_smart_onhold_animator(sd);
} }
else else
{ {