summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-20 11:06:13 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-20 11:21:50 +0900
commit28661cb650cbe340959b3a60eff78207e2afa606 (patch)
tree8f0c973f1bab5862e8be81c6466abca69a633527 /src
parent8f14f1610eb28ae961d453b8efdb91035c8d4777 (diff)
scroller: Fix compilation on Windows
Thanks @vtorri for the report. Fixes T6528
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.c14
-rw-r--r--src/lib/elementary/efl_ui_widget_scroll_manager.h6
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c
index 9065c8230e..7f5df18dfe 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.c
+++ b/src/lib/elementary/efl_ui_scroll_manager.c
@@ -42,9 +42,9 @@ _scroll_manager_decel_interp(void *data EINA_UNUSED, double progress)
42static Interpolator 42static Interpolator
43_scroll_manager_interp_get(InterpType interp) 43_scroll_manager_interp_get(InterpType interp)
44{ 44{
45 if (interp == ACCEL) 45 if (interp == INTERP_ACCEL)
46 return _scroll_manager_accel_interp; 46 return _scroll_manager_accel_interp;
47 else if (interp == DECEL) 47 else if (interp == INTERP_DECEL)
48 return _scroll_manager_decel_interp; 48 return _scroll_manager_decel_interp;
49 return _scroll_manager_linear_interp; 49 return _scroll_manager_linear_interp;
50} 50}
@@ -745,7 +745,7 @@ _scroll_wheel_post_event_go(Efl_Ui_Scroll_Manager_Data *sd, int x, int y)
745 else 745 else
746 { 746 {
747 cur = efl_ui_pan_position_get(sd->pan_obj); 747 cur = efl_ui_pan_position_get(sd->pan_obj);
748 _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, x, y, 0.5, 0.5, LINEAR); 748 _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, x, y, 0.5, 0.5, INTERP_LINEAR);
749 } 749 }
750} 750}
751 751
@@ -912,7 +912,7 @@ _efl_ui_scroll_manager_scroll_to_x_animator(void *data, const Efl_Event *event E
912 else progx = dt / sd->scrollto.x.dur; 912 else progx = dt / sd->scrollto.x.dur;
913 913
914 if (sd->scrollto.x.interp) interp = sd->scrollto.x.interp; 914 if (sd->scrollto.x.interp) interp = sd->scrollto.x.interp;
915 else interp = _scroll_manager_interp_get(LINEAR); 915 else interp = _scroll_manager_interp_get(INTERP_LINEAR);
916 916
917 rx = interp(NULL, progx); 917 rx = interp(NULL, progx);
918 nx = sd->scrollto.x.start + (sd->scrollto.x.end - sd->scrollto.x.start) * rx; 918 nx = sd->scrollto.x.start + (sd->scrollto.x.end - sd->scrollto.x.start) * rx;
@@ -955,7 +955,7 @@ _efl_ui_scroll_manager_scroll_to_y_animator(void *data, const Efl_Event *event E
955 else progy = dt / sd->scrollto.y.dur; 955 else progy = dt / sd->scrollto.y.dur;
956 956
957 if (sd->scrollto.y.interp) interp = sd->scrollto.y.interp; 957 if (sd->scrollto.y.interp) interp = sd->scrollto.y.interp;
958 else interp = _scroll_manager_interp_get(LINEAR); 958 else interp = _scroll_manager_interp_get(INTERP_LINEAR);
959 959
960 ry = interp(NULL, progy); 960 ry = interp(NULL, progy);
961 ny = sd->scrollto.y.start + (sd->scrollto.y.end - sd->scrollto.y.start) * ry; 961 ny = sd->scrollto.y.start + (sd->scrollto.y.end - sd->scrollto.y.start) * ry;
@@ -1320,7 +1320,7 @@ static void _scroll_manager_momentum_animator_add(Efl_Ui_Scroll_Manager_Data *sd
1320 vel = sqrt(vx*vx + vy*vy); 1320 vel = sqrt(vx*vx + vy*vy);
1321 dur = vel / accel; 1321 dur = vel / accel;
1322 1322
1323 _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, dstx, dsty, dur, dur, DECEL); 1323 _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, dstx, dsty, dur, dur, INTERP_DECEL);
1324} 1324}
1325 1325
1326static void 1326static void
@@ -1586,7 +1586,7 @@ _scroll_manager_scrollto(Efl_Ui_Scroll_Manager_Data *sd, Evas_Coord x, Evas_Coor
1586 double dur = 0.0; 1586 double dur = 0.0;
1587 Eina_Position2D cur = efl_ui_scrollable_content_pos_get(sd->obj); 1587 Eina_Position2D cur = efl_ui_scrollable_content_pos_get(sd->obj);
1588 dur = _scroll_manager_animation_duration_get(x - cur.x, y - cur.y); 1588 dur = _scroll_manager_animation_duration_get(x - cur.x, y - cur.y);
1589 _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, x, y, dur, dur, LINEAR); 1589 _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, x, y, dur, dur, INTERP_LINEAR);
1590} 1590}
1591 1591
1592static void 1592static void
diff --git a/src/lib/elementary/efl_ui_widget_scroll_manager.h b/src/lib/elementary/efl_ui_widget_scroll_manager.h
index 07311910e0..2159a37bf2 100644
--- a/src/lib/elementary/efl_ui_widget_scroll_manager.h
+++ b/src/lib/elementary/efl_ui_widget_scroll_manager.h
@@ -6,9 +6,9 @@
6typedef double (*Interpolator)(void *data, double progress); 6typedef double (*Interpolator)(void *data, double progress);
7 7
8typedef enum { 8typedef enum {
9 LINEAR, 9 INTERP_LINEAR,
10 ACCEL, 10 INTERP_ACCEL,
11 DECEL, 11 INTERP_DECEL,
12} InterpType; 12} InterpType;
13 13
14typedef struct _Efl_Ui_Scroll_Manager_Data 14typedef struct _Efl_Ui_Scroll_Manager_Data