aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWonki Kim <wonki_.kim@samsung.com>2018-08-20 13:56:46 +0900
committerHermet Park <hermetpark@gmail.com>2018-08-20 13:56:46 +0900
commit79ec29897f59b768c2b773172af80c0a99916211 (patch)
treee4276810f21911b0e36363dd8bdc835150ff1fcd
parentconfigure: switch to dev mode again (diff)
downloadefl-79ec29897f59b768c2b773172af80c0a99916211.tar.gz
scroller: remove unused ifdef blocks
Summary: there are unused ifdef blocks and also there is a variable that accessed from nowhere. this patch removes both of theme. related with https://phab.enlightenment.org/D6567 Reviewers: Hermet, eagleeye, devilhorns Reviewed By: Hermet Subscribers: cedric, zmike Tags: #efl, #do_not_merge Differential Revision: https://phab.enlightenment.org/D6585
-rw-r--r--src/lib/elementary/efl_ui_scroll_manager.c19
-rw-r--r--src/lib/elementary/efl_ui_widget_scroll_manager.h2
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c19
-rw-r--r--src/lib/elementary/elm_interface_scrollable.h2
4 files changed, 2 insertions, 40 deletions
diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c
index 5b54482ebe..40924807aa 100644
--- a/src/lib/elementary/efl_ui_scroll_manager.c
+++ b/src/lib/elementary/efl_ui_scroll_manager.c
@@ -131,7 +131,6 @@ static void _efl_ui_scroll_manager_wanted_region_set(Evas_Object *obj);
#define RIGHT 1
#define UP 2
#define DOWN 3
-#define EVTIME 1
//#define SCROLLDBG 1
/* smoothness debug calls - for debugging how much smooth your app is */
@@ -1014,11 +1013,7 @@ _efl_ui_scroll_manager_mouse_up_event_momentum_eval(Efl_Ui_Scroll_Manager_Data *
Evas_Coord dx, dy, ax, ay, vel;
char sdx, sdy;
-#ifdef EVTIME
t = ev->timestamp / 1000.0;
-#else
- t = ecore_loop_time_get();
-#endif
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
ax = ev->canvas.x;
@@ -1151,12 +1146,7 @@ _efl_ui_scroll_manager_mouse_down_event_cb(void *data,
sd->down.sy = cur.y;
memset(&(sd->down.history[0]), 0,
sizeof(sd->down.history[0]) * 60);
-#ifdef EVTIME
sd->down.history[0].timestamp = ev->timestamp / 1000.0;
- sd->down.history[0].localtimestamp = ecore_loop_time_get();
-#else
- sd->down.history[0].timestamp = ecore_loop_time_get();
-#endif
sd->down.dragged_began_timestamp = sd->down.history[0].timestamp;
sd->down.history[0].x = ev->canvas.x;
sd->down.history[0].y = ev->canvas.y;
@@ -1660,11 +1650,7 @@ _efl_ui_scroll_manager_post_event_move_hold_eval(Efl_Ui_Scroll_Manager_Data *sd,
{
sd->down.x = ev->cur.canvas.x;
sd->down.y = ev->cur.canvas.y;
-#ifdef EVTIME
sd->down.dragged_began_timestamp = ev->timestamp / 1000.0;
-#else
- sd->down.dragged_began_timestamp = ecore_loop_time_get();
-#endif
}
// TODO 다른조건들도 can_scroll 안쪽으로 넣는다?
if ((((_efl_ui_scroll_manager_can_scroll(sd, sd->down.hdir) || sd->bounce_horiz) && sd->down.dir_x) ||
@@ -1933,12 +1919,7 @@ _efl_ui_scroll_manager_mouse_move_event_cb(void *data,
#endif
memmove(&(sd->down.history[1]), &(sd->down.history[0]),
sizeof(sd->down.history[0]) * (60 - 1));
-#ifdef EVTIME
sd->down.history[0].timestamp = ev->timestamp / 1000.0;
- sd->down.history[0].localtimestamp = ecore_loop_time_get();
-#else
- sd->down.history[0].timestamp = ecore_loop_time_get();
-#endif
sd->down.history[0].x = ev->cur.canvas.x;
sd->down.history[0].y = ev->cur.canvas.y;
sd->event_info = event_info;
diff --git a/src/lib/elementary/efl_ui_widget_scroll_manager.h b/src/lib/elementary/efl_ui_widget_scroll_manager.h
index 2159a37bf2..cfccf39b17 100644
--- a/src/lib/elementary/efl_ui_widget_scroll_manager.h
+++ b/src/lib/elementary/efl_ui_widget_scroll_manager.h
@@ -35,7 +35,7 @@ typedef struct _Efl_Ui_Scroll_Manager_Data
struct
{
Evas_Coord x, y;
- double timestamp, localtimestamp;
+ double timestamp;
} history[60];
struct
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index dfdfefc122..6171c509c3 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -339,7 +339,6 @@ static Evas_Coord _elm_scroll_page_y_get(
#define RIGHT 1
#define UP 2
#define DOWN 3
-#define EVTIME 1
//#define SCROLLDBG 1
/* smoothness debug calls - for debugging how much smooth your app is */
#define SMOOTHDBG 1
@@ -2644,11 +2643,7 @@ _elm_scroll_mouse_up_event_cb(void *data,
double t, at, dt;
Evas_Coord ax, ay, dx, dy, vel;
-#ifdef EVTIME
t = ev->timestamp / 1000.0;
-#else
- t = ecore_loop_time_get();
-#endif
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
ax = ev->canvas.x;
@@ -2970,12 +2965,7 @@ _elm_scroll_mouse_down_event_cb(void *data,
sid->down.locked = EINA_FALSE;
memset(&(sid->down.history[0]), 0,
sizeof(sid->down.history[0]) * 60);
-#ifdef EVTIME
sid->down.history[0].timestamp = ev->timestamp / 1000.0;
- sid->down.history[0].localtimestamp = ecore_loop_time_get();
-#else
- sid->down.history[0].timestamp = ecore_loop_time_get();
-#endif
sid->down.dragged_began_timestamp = sid->down.history[0].timestamp;
sid->down.history[0].x = ev->canvas.x;
sid->down.history[0].y = ev->canvas.y;
@@ -3404,12 +3394,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
#endif
memmove(&(sid->down.history[1]), &(sid->down.history[0]),
sizeof(sid->down.history[0]) * (60 - 1));
-#ifdef EVTIME
sid->down.history[0].timestamp = ev->timestamp / 1000.0;
- sid->down.history[0].localtimestamp = ecore_loop_time_get();
-#else
- sid->down.history[0].timestamp = ecore_loop_time_get();
-#endif
sid->down.history[0].x = ev->cur.canvas.x;
sid->down.history[0].y = ev->cur.canvas.y;
@@ -3525,11 +3510,7 @@ _elm_scroll_mouse_move_event_cb(void *data,
{
sid->down.x = ev->cur.canvas.x;
sid->down.y = ev->cur.canvas.y;
-#ifdef EVTIME
sid->down.dragged_began_timestamp = ev->timestamp / 1000.0;
-#else
- sid->down.dragged_began_timestamp = ecore_loop_time_get();
-#endif
}
if (!sid->down.dragged)
diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h
index db99249c00..93ee9aff5a 100644
--- a/src/lib/elementary/elm_interface_scrollable.h
+++ b/src/lib/elementary/elm_interface_scrollable.h
@@ -99,7 +99,7 @@ struct _Elm_Scrollable_Smart_Interface_Data
struct
{
Evas_Coord x, y;
- double timestamp, localtimestamp;
+ double timestamp;
} history[60];
struct