forked from enlightenment/efl
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
This commit is contained in:
parent
12a064874e
commit
72bba1d837
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
const Efl_Event_Description * _efl_gesture_type_get(const Eo *obj);
|
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);
|
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_Manager_Data Efl_Canvas_Gesture_Manager_Data;
|
||||||
typedef struct _Efl_Canvas_Gesture_Recognizer_Data Efl_Canvas_Gesture_Recognizer_Data;
|
typedef struct _Efl_Canvas_Gesture_Recognizer_Data Efl_Canvas_Gesture_Recognizer_Data;
|
||||||
|
|
|
@ -24,4 +24,14 @@ _efl_canvas_gesture_recognizer_efl_object_constructor(Eo *obj, Efl_Canvas_Gestur
|
||||||
|
|
||||||
return obj;
|
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"
|
#include "efl_canvas_gesture_recognizer.eo.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
|
EOLIAN static Efl_Canvas_Gesture_Recognizer_Result
|
||||||
_efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(Eo *obj,
|
_efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(Eo *obj,
|
||||||
Efl_Canvas_Gesture_Recognizer_Momentum_Data *pd,
|
Efl_Canvas_Gesture_Recognizer_Momentum_Data *pd,
|
||||||
|
|
Loading…
Reference in New Issue