summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-25 03:59:55 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-10-25 17:00:10 +0900
commit135d7272468ded8e87e981bc3f1aff23c20d7647 (patch)
treefa55547f38c4e91a2d26229c651d35b4abfd77dd
parent6f0739780b2640d507b1379f6f1a0c18aec57865 (diff)
Revert "elm scroller - also allow animator still to ALSO drive scroll for smoothing"
This reverts commit e52ddca9b0d424c5e1dfeeec501f4a95544e3dbb. This reverts commit 7a7ea7d61e8a321dcd2046d07a0473e57a87d8b2.
-rw-r--r--src/lib/elm_interface_scrollable.c41
-rw-r--r--src/lib/elm_interface_scrollable.h2
2 files changed, 8 insertions, 35 deletions
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 0a21041fd..5441bdbce 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -1446,11 +1446,9 @@ _elm_scroll_bounce_eval(Elm_Scrollable_Smart_Interface_Data *sid)
1446 if (sid->content_info.resized) 1446 if (sid->content_info.resized)
1447 _elm_scroll_wanted_region_set(sid->obj); 1447 _elm_scroll_wanted_region_set(sid->obj);
1448 } 1448 }
1449 if (sid->down.hold_active) 1449 if (sid->down.hold_animator)
1450 { 1450 {
1451 sid->down.hold_active = EINA_FALSE;
1452 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del); 1451 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del);
1453 ELM_SAFE_FREE(sid->down.hold_job, ecore_job_del);
1454 if (sid->content_info.resized) 1452 if (sid->content_info.resized)
1455 _elm_scroll_wanted_region_set(sid->obj); 1453 _elm_scroll_wanted_region_set(sid->obj);
1456 } 1454 }
@@ -1770,11 +1768,9 @@ _elm_scroll_content_region_show_internal(Evas_Object *obj,
1770 if (sid->content_info.resized) 1768 if (sid->content_info.resized)
1771 _elm_scroll_wanted_region_set(sid->obj); 1769 _elm_scroll_wanted_region_set(sid->obj);
1772 } 1770 }
1773 if (sid->down.hold_active) 1771 if (sid->down.hold_animator)
1774 { 1772 {
1775 sid->down.hold_active = EINA_FALSE;
1776 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del); 1773 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del);
1777 ELM_SAFE_FREE(sid->down.hold_job, ecore_job_del);
1778 _elm_scroll_drag_stop(sid); 1774 _elm_scroll_drag_stop(sid);
1779 if (sid->content_info.resized) 1775 if (sid->content_info.resized)
1780 _elm_scroll_wanted_region_set(sid->obj); 1776 _elm_scroll_wanted_region_set(sid->obj);
@@ -1883,7 +1879,7 @@ _elm_scroll_wanted_region_set(Evas_Object *obj)
1883 1879
1884 if (sid->down.now || sid->down.momentum_animator || 1880 if (sid->down.now || sid->down.momentum_animator ||
1885 sid->down.bounce_x_animator || sid->down.bounce_y_animator || 1881 sid->down.bounce_x_animator || sid->down.bounce_y_animator ||
1886 sid->down.hold_active || sid->down.onhold_animator || 1882 sid->down.hold_animator || sid->down.onhold_animator ||
1887 sid->scrollto.x.animator || sid->scrollto.y.animator) 1883 sid->scrollto.x.animator || sid->scrollto.y.animator)
1888 return; 1884 return;
1889 1885
@@ -2586,11 +2582,9 @@ _elm_scroll_mouse_up_event_cb(void *data,
2586 } 2582 }
2587 } 2583 }
2588 } 2584 }
2589 if (sid->down.hold_active) 2585 if (sid->down.hold_animator)
2590 { 2586 {
2591 sid->down.hold_active = EINA_FALSE;
2592 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del); 2587 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del);
2593 ELM_SAFE_FREE(sid->down.hold_job, ecore_job_del);
2594 if (sid->content_info.resized) 2588 if (sid->content_info.resized)
2595 _elm_scroll_wanted_region_set(sid->obj); 2589 _elm_scroll_wanted_region_set(sid->obj);
2596 } 2590 }
@@ -2673,10 +2667,9 @@ _elm_scroll_mouse_down_event_cb(void *data,
2673 if (sid->content_info.resized) 2667 if (sid->content_info.resized)
2674 _elm_scroll_wanted_region_set(sid->obj); 2668 _elm_scroll_wanted_region_set(sid->obj);
2675 } 2669 }
2676 if (sid->down.hold_active) 2670 if (sid->down.hold_animator)
2677 { 2671 {
2678 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del); 2672 ELM_SAFE_FREE(sid->down.hold_animator, ecore_animator_del);
2679 ELM_SAFE_FREE(sid->down.hold_job, ecore_job_del);
2680 _elm_scroll_drag_stop(sid); 2673 _elm_scroll_drag_stop(sid);
2681 if (sid->content_info.resized) 2674 if (sid->content_info.resized)
2682 _elm_scroll_wanted_region_set(sid->obj); 2675 _elm_scroll_wanted_region_set(sid->obj);
@@ -2872,14 +2865,12 @@ _elm_scroll_down_coord_eval(Elm_Scrollable_Smart_Interface_Data *sid,
2872 _elm_config->thumbscroll_border_friction; 2865 _elm_config->thumbscroll_border_friction;
2873} 2866}
2874 2867
2875static void 2868static Eina_Bool
2876_elm_scroll_hold_job(void *data) 2869_elm_scroll_hold_animator(void *data)
2877{ 2870{
2878 Elm_Scrollable_Smart_Interface_Data *sid = data; 2871 Elm_Scrollable_Smart_Interface_Data *sid = data;
2879 Evas_Coord ox = 0, oy = 0, fx = 0, fy = 0; 2872 Evas_Coord ox = 0, oy = 0, fx = 0, fy = 0;
2880 2873
2881 sid->down.hold_active = EINA_FALSE;
2882
2883 fx = sid->down.hold_x; 2874 fx = sid->down.hold_x;
2884 fy = sid->down.hold_y; 2875 fy = sid->down.hold_y;
2885 2876
@@ -2986,17 +2977,7 @@ _elm_scroll_hold_job(void *data)
2986#endif 2977#endif
2987 2978
2988 eo_do(sid->obj, elm_scrollable_interface_content_pos_set(ox, oy, EINA_TRUE)); 2979 eo_do(sid->obj, elm_scrollable_interface_content_pos_set(ox, oy, EINA_TRUE));
2989}
2990 2980
2991static Eina_Bool
2992_elm_scroll_hold_animator(void *data)
2993{
2994 Elm_Scrollable_Smart_Interface_Data *sid = data;
2995
2996 if (!sid->down.hold_job)
2997 ecore_job_del(sid->down.hold_job);
2998 sid->down.hold_job =
2999 ecore_job_add(_elm_scroll_hold_job, sid);
3000 return ECORE_CALLBACK_RENEW; 2981 return ECORE_CALLBACK_RENEW;
3001} 2982}
3002 2983
@@ -3297,12 +3278,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
3297 sid->down.hold_y = y; 3278 sid->down.hold_y = y;
3298 if (!sid->down.hold_animator) 3279 if (!sid->down.hold_animator)
3299 sid->down.hold_animator = 3280 sid->down.hold_animator =
3300 ecore_animator_add(_elm_scroll_hold_animator, sid); 3281 ecore_animator_add(_elm_scroll_hold_animator, sid);
3301 if (!sid->down.hold_job)
3302 ecore_job_del(sid->down.hold_job);
3303 sid->down.hold_job =
3304 ecore_job_add(_elm_scroll_hold_job, sid);
3305 sid->down.hold_active = EINA_TRUE;
3306 } 3282 }
3307 else 3283 else
3308 { 3284 {
@@ -4597,7 +4573,6 @@ _elm_scroll_interface_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
4597 eo_do(obj, elm_scrollable_interface_content_set(NULL)); 4573 eo_do(obj, elm_scrollable_interface_content_set(NULL));
4598 if (!sid->extern_pan) evas_object_del(sid->pan_obj); 4574 if (!sid->extern_pan) evas_object_del(sid->pan_obj);
4599 4575
4600 if (sid->down.hold_job) ecore_job_del(sid->down.hold_job);
4601 if (sid->down.hold_animator) ecore_animator_del(sid->down.hold_animator); 4576 if (sid->down.hold_animator) ecore_animator_del(sid->down.hold_animator);
4602 if (sid->down.onhold_animator) ecore_animator_del(sid->down.onhold_animator); 4577 if (sid->down.onhold_animator) ecore_animator_del(sid->down.onhold_animator);
4603 if (sid->down.momentum_animator) ecore_animator_del(sid->down.momentum_animator); 4578 if (sid->down.momentum_animator) ecore_animator_del(sid->down.momentum_animator);
diff --git a/src/lib/elm_interface_scrollable.h b/src/lib/elm_interface_scrollable.h
index 49865c103..98fa9b565 100644
--- a/src/lib/elm_interface_scrollable.h
+++ b/src/lib/elm_interface_scrollable.h
@@ -1119,7 +1119,6 @@ struct _Elm_Scrollable_Smart_Interface_Data
1119 Evas_Coord locked_x, locked_y; 1119 Evas_Coord locked_x, locked_y;
1120 int hdir, vdir; 1120 int hdir, vdir;
1121 1121
1122 Ecore_Job *hold_job;
1123 Ecore_Animator *hold_animator; 1122 Ecore_Animator *hold_animator;
1124 Ecore_Animator *onhold_animator; 1123 Ecore_Animator *onhold_animator;
1125 Ecore_Animator *momentum_animator; 1124 Ecore_Animator *momentum_animator;
@@ -1140,7 +1139,6 @@ struct _Elm_Scrollable_Smart_Interface_Data
1140 Eina_Bool dir_y : 1; 1139 Eina_Bool dir_y : 1;
1141 Eina_Bool hold : 1; 1140 Eina_Bool hold : 1;
1142 Eina_Bool now : 1; 1141 Eina_Bool now : 1;
1143 Eina_Bool hold_active : 1;
1144 } down; 1142 } down;
1145 1143
1146 struct 1144 struct