summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-01-22 13:51:02 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-05 10:09:48 +0100
commit72bba1d8378c38fdb9066ccccec7fb026001fab2 (patch)
tree9e2b12bc7b9b433d414f68e8d81fc10aefe889dc
parent12a064874efea0553a2fc350456fc9d23cca97e6 (diff)
downloadefl-72bba1d8378c38fdb9066ccccec7fb026001fab2.tar.gz
efl/gesture: break out _direction_get() into helper function
this is useful in multiple places, no functional changes Reviewed-by: woochan lee <wc0917.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D11164
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_private.h1
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.c10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c10
3 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_private.h b/src/lib/evas/gesture/efl_canvas_gesture_private.h
index f77530ff98..8ca02535c0 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_private.h
+++ b/src/lib/evas/gesture/efl_canvas_gesture_private.h
@@ -13,6 +13,7 @@
const Efl_Event_Description * _efl_gesture_type_get(const Eo *obj);
void efl_gesture_manager_gesture_clean_up(Eo *obj, Eo *target, const Efl_Event_Description *type);
+int _direction_get(Evas_Coord xx1, Evas_Coord xx2);
typedef struct _Efl_Canvas_Gesture_Manager_Data Efl_Canvas_Gesture_Manager_Data;
typedef struct _Efl_Canvas_Gesture_Recognizer_Data Efl_Canvas_Gesture_Recognizer_Data;
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c
index c3dfc61476..698e8146e1 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer.c
@@ -24,4 +24,14 @@ _efl_canvas_gesture_recognizer_efl_object_constructor(Eo *obj, Efl_Canvas_Gestur
return obj;
}
+
+int
+_direction_get(Evas_Coord xx1, Evas_Coord xx2)
+{
+ if (xx2 < xx1) return -1;
+ if (xx2 > xx1) return 1;
+
+ return 0;
+}
+
#include "efl_canvas_gesture_recognizer.eo.c"
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
index f2041df8f2..a23959aead 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c
@@ -58,16 +58,6 @@ _momentum_set(Eo *obj,
}
}
-static int
-_direction_get(Evas_Coord xx1,
- Evas_Coord xx2)
-{
- if (xx2 < xx1) return -1;
- if (xx2 > xx1) return 1;
-
- return 0;
-}
-
EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
_efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(Eo *obj,
Efl_Canvas_Gesture_Recognizer_Momentum_Data *pd,