const Efl_Event_Description * _efl_gesture_type_get(const Eo *obj);
int _direction_get(Evas_Coord xx1, Evas_Coord xx2);
Eina_Value *_recognizer_config_get(const Eo *obj, const char *name);
+Eina_Bool _event_multi_touch_get(const Efl_Canvas_Gesture_Touch *event);
typedef struct _Efl_Canvas_Gesture_Manager_Data Efl_Canvas_Gesture_Manager_Data;
typedef struct _Efl_Canvas_Gesture_Recognizer_Data Efl_Canvas_Gesture_Recognizer_Data;
Eina_Array *touch_points;
Efl_Gesture_Touch_Point_Data *cur_touch;
Efl_Gesture_Touch_Point_Data *prev_touch;
- Eina_Bool multi_touch;
Eo *target;
int touch_down;
} Efl_Canvas_Gesture_Touch_Data;
return 0;
}
+Eina_Bool
+_event_multi_touch_get(const Efl_Canvas_Gesture_Touch *event)
+{
+ return efl_gesture_touch_points_count_get(event) > 1;
+}
+
#include "efl_canvas_gesture_recognizer.eo.c"
result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
- !efl_gesture_touch_multi_touch_get(event))
+ !_event_multi_touch_get(event))
{
dist = efl_gesture_touch_distance(event, 0);
length = fabs(dist.x) + fabs(dist.y);
case EFL_GESTURE_TOUCH_STATE_END:
{
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
- !efl_gesture_touch_multi_touch_get(event))
+ !_event_multi_touch_get(event))
{
if (efl_gesture_touch_prev_data_get(event))
{
dist = efl_gesture_touch_distance(event, 0);
length = fabs(dist.x) + fabs(dist.y);
- if ((efl_gesture_touch_multi_touch_get(event)) || (length > pd->finger_size))
+ if ((_event_multi_touch_get(event)) || (length > pd->finger_size))
{
if (pd->timeout)
{
}
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
- !efl_gesture_touch_multi_touch_get(event))
+ !_event_multi_touch_get(event))
{
dist = efl_gesture_touch_distance(event, 0);
length = fabs(dist.x) + fabs(dist.y);
ecore_timer_del(pd->timeout);
pd->timeout = NULL;
}
- if (efl_gesture_touch_multi_touch_get(event)) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
+ if (_event_multi_touch_get(event)) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE)
{
dist = efl_gesture_touch_distance(event, 0);
result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
- !efl_gesture_touch_multi_touch_get(event))
+ !_event_multi_touch_get(event))
{
dist = efl_gesture_touch_distance(event, 0);
length = fabs(dist.x) + fabs(dist.y);
case EFL_GESTURE_TOUCH_STATE_END:
{
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
- !efl_gesture_touch_multi_touch_get(event))
+ !_event_multi_touch_get(event))
{
if (efl_gesture_touch_prev_data_get(event))
{
if (!pd->zoom_st.cur.timestamp) /* Now scan touched-devices list
* and find other finger */
{
- if (!efl_gesture_touch_multi_touch_get(event))
+ if (!_event_multi_touch_get(event))
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
const Efl_Gesture_Touch_Point_Data *p1 = efl_gesture_touch_data_get(event, 0);
{
if ((!point) || (!point->cur.pressed))
pd->touch_down++;
- if (pd->touch_down >= 2)
- pd->multi_touch = EINA_TRUE;
}
else if ((action == EFL_POINTER_ACTION_UP) ||
(action == EFL_POINTER_ACTION_CANCEL))
{
if (point && point->cur.pressed)
pd->touch_down--;
- if (pd->multi_touch && pd->touch_down == 1)
- pd->multi_touch = EINA_FALSE;
}
if (pd->touch_down < 0) goto finished_touch;
_touch_points_reset(pd);
}
-EOLIAN static Eina_Bool
-_efl_canvas_gesture_touch_multi_touch_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
-{
- return pd->multi_touch;
-}
-
EOLIAN static unsigned int
_efl_canvas_gesture_touch_touch_points_count_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd)
{
time: uint; [[The timestamp.]]
}
}
- @property multi_touch {
- [[This property tells if the event is multi touch.]]
- get {
- return: bool; [[returns $true if its a multi touch]]
- }
- }
@property touch_points_count {
[[This provides the number of touch points active.]]
get {