forked from enlightenment/efl
efl/gesture: correct namespacing of all gesture enums in C
these were flattened to all be EFL_GESTURE_$MEMBER, which made them impossible to read and use effectively Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11026
This commit is contained in:
parent
3340243623
commit
227483e079
|
@ -370,13 +370,13 @@ tap_gesture_cb(void *data , const Efl_Event *ev)
|
||||||
Efl_Canvas_Gesture *g = ev->info;
|
Efl_Canvas_Gesture *g = ev->info;
|
||||||
switch(efl_gesture_state_get(g))
|
switch(efl_gesture_state_get(g))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_STARTED:
|
case EFL_GESTURE_STATE_STARTED:
|
||||||
finger_tap_start(data, g);
|
finger_tap_start(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_CANCELED:
|
case EFL_GESTURE_STATE_CANCELED:
|
||||||
finger_tap_abort(data, g);
|
finger_tap_abort(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_FINISHED:
|
case EFL_GESTURE_STATE_FINISHED:
|
||||||
finger_tap_end(data, g);
|
finger_tap_end(data, g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -390,13 +390,13 @@ flick_gesture_cb(void *data , const Efl_Event *ev)
|
||||||
Efl_Canvas_Gesture *g = ev->info;
|
Efl_Canvas_Gesture *g = ev->info;
|
||||||
switch(efl_gesture_state_get(g))
|
switch(efl_gesture_state_get(g))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_STARTED:
|
case EFL_GESTURE_STATE_STARTED:
|
||||||
finger_flick_start(data, g);
|
finger_flick_start(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_CANCELED:
|
case EFL_GESTURE_STATE_CANCELED:
|
||||||
finger_flick_abort(data, g);
|
finger_flick_abort(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_FINISHED:
|
case EFL_GESTURE_STATE_FINISHED:
|
||||||
finger_flick_end(data, g);
|
finger_flick_end(data, g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -410,16 +410,16 @@ momentum_gesture_cb(void *data , const Efl_Event *ev)
|
||||||
Efl_Canvas_Gesture *g = ev->info;
|
Efl_Canvas_Gesture *g = ev->info;
|
||||||
switch(efl_gesture_state_get(g))
|
switch(efl_gesture_state_get(g))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_STARTED:
|
case EFL_GESTURE_STATE_STARTED:
|
||||||
finger_momentum_start(data, g);
|
finger_momentum_start(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_UPDATED:
|
case EFL_GESTURE_STATE_UPDATED:
|
||||||
finger_momentum_update(data, g);
|
finger_momentum_update(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_CANCELED:
|
case EFL_GESTURE_STATE_CANCELED:
|
||||||
finger_momentum_abort(data, g);
|
finger_momentum_abort(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_FINISHED:
|
case EFL_GESTURE_STATE_FINISHED:
|
||||||
finger_momentum_end(data, g);
|
finger_momentum_end(data, g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -433,16 +433,16 @@ triple_tap_gesture_cb(void *data , const Efl_Event *ev)
|
||||||
Efl_Canvas_Gesture *g = ev->info;
|
Efl_Canvas_Gesture *g = ev->info;
|
||||||
switch(efl_gesture_state_get(g))
|
switch(efl_gesture_state_get(g))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_STARTED:
|
case EFL_GESTURE_STATE_STARTED:
|
||||||
finger_triple_tap_start(data, g);
|
finger_triple_tap_start(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_UPDATED:
|
case EFL_GESTURE_STATE_UPDATED:
|
||||||
finger_triple_tap_update(data, g);
|
finger_triple_tap_update(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_CANCELED:
|
case EFL_GESTURE_STATE_CANCELED:
|
||||||
finger_triple_tap_abort(data, g);
|
finger_triple_tap_abort(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_FINISHED:
|
case EFL_GESTURE_STATE_FINISHED:
|
||||||
finger_triple_tap_end(data, g);
|
finger_triple_tap_end(data, g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -456,16 +456,16 @@ double_tap_gesture_cb(void *data , const Efl_Event *ev)
|
||||||
Efl_Canvas_Gesture *g = ev->info;
|
Efl_Canvas_Gesture *g = ev->info;
|
||||||
switch(efl_gesture_state_get(g))
|
switch(efl_gesture_state_get(g))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_STARTED:
|
case EFL_GESTURE_STATE_STARTED:
|
||||||
finger_double_tap_start(data, g);
|
finger_double_tap_start(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_UPDATED:
|
case EFL_GESTURE_STATE_UPDATED:
|
||||||
finger_double_tap_update(data, g);
|
finger_double_tap_update(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_CANCELED:
|
case EFL_GESTURE_STATE_CANCELED:
|
||||||
finger_double_tap_abort(data, g);
|
finger_double_tap_abort(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_FINISHED:
|
case EFL_GESTURE_STATE_FINISHED:
|
||||||
finger_double_tap_end(data, g);
|
finger_double_tap_end(data, g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -479,16 +479,16 @@ long_tap_gesture_cb(void *data , const Efl_Event *ev)
|
||||||
Efl_Canvas_Gesture *g = ev->info;
|
Efl_Canvas_Gesture *g = ev->info;
|
||||||
switch(efl_gesture_state_get(g))
|
switch(efl_gesture_state_get(g))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_STARTED:
|
case EFL_GESTURE_STATE_STARTED:
|
||||||
finger_long_tap_start(data, g);
|
finger_long_tap_start(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_UPDATED:
|
case EFL_GESTURE_STATE_UPDATED:
|
||||||
finger_long_tap_update(data, g);
|
finger_long_tap_update(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_CANCELED:
|
case EFL_GESTURE_STATE_CANCELED:
|
||||||
finger_long_tap_abort(data, g);
|
finger_long_tap_abort(data, g);
|
||||||
break;
|
break;
|
||||||
case EFL_GESTURE_FINISHED:
|
case EFL_GESTURE_STATE_FINISHED:
|
||||||
finger_long_tap_end(data, g);
|
finger_long_tap_end(data, g);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -182,7 +182,7 @@ _efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event)
|
||||||
|
|
||||||
//This is for handling the case that mouse event pairs dont match.
|
//This is for handling the case that mouse event pairs dont match.
|
||||||
//Such as the case of canceling gesture recognition after a mouse down.
|
//Such as the case of canceling gesture recognition after a mouse down.
|
||||||
if (efl_gesture_touch_state_get(touch_event) == EFL_GESTURE_TOUCH_UNKNOWN)
|
if (efl_gesture_touch_state_get(touch_event) == EFL_GESTURE_TOUCH_STATE_UNKNOWN)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
recognizer = eina_hash_find(pd->m_recognizers, &gesture_type);
|
recognizer = eina_hash_find(pd->m_recognizers, &gesture_type);
|
||||||
|
@ -194,30 +194,30 @@ _efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event)
|
||||||
|
|
||||||
//Gesture detecting.
|
//Gesture detecting.
|
||||||
recog_result = efl_gesture_recognizer_recognize(recognizer, gesture, target, touch_event);
|
recog_result = efl_gesture_recognizer_recognize(recognizer, gesture, target, touch_event);
|
||||||
recog_state = recog_result & EFL_GESTURE_RESULT_MASK;
|
recog_state = recog_result & EFL_GESTURE_RECOGNIZER_RESULT_RESULT_MASK;
|
||||||
|
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd =
|
Efl_Canvas_Gesture_Recognizer_Data *rd =
|
||||||
efl_data_scope_get(recognizer, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
efl_data_scope_get(recognizer, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
|
||||||
if (recog_state == EFL_GESTURE_TRIGGER)
|
if (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER)
|
||||||
{
|
{
|
||||||
if (efl_gesture_state_get(gesture) == EFL_GESTURE_NONE)
|
if (efl_gesture_state_get(gesture) == EFL_GESTURE_STATE_NONE)
|
||||||
efl_gesture_state_set(gesture, EFL_GESTURE_STARTED);
|
efl_gesture_state_set(gesture, EFL_GESTURE_STATE_STARTED);
|
||||||
else
|
else
|
||||||
efl_gesture_state_set(gesture, EFL_GESTURE_UPDATED);
|
efl_gesture_state_set(gesture, EFL_GESTURE_STATE_UPDATED);
|
||||||
}
|
}
|
||||||
else if (recog_state == EFL_GESTURE_FINISH)
|
else if (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_FINISH)
|
||||||
{
|
{
|
||||||
efl_gesture_state_set(gesture, EFL_GESTURE_FINISHED);
|
efl_gesture_state_set(gesture, EFL_GESTURE_STATE_FINISHED);
|
||||||
}
|
}
|
||||||
else if (recog_state == EFL_GESTURE_MAYBE)
|
else if (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_MAYBE)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (recog_state == EFL_GESTURE_CANCEL)
|
else if (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_CANCEL)
|
||||||
{
|
{
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE)
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE)
|
||||||
efl_gesture_state_set(gesture, EFL_GESTURE_CANCELED);
|
efl_gesture_state_set(gesture, EFL_GESTURE_STATE_CANCELED);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Need to recognize events that occur consecutively
|
//Need to recognize events that occur consecutively
|
||||||
|
@ -226,7 +226,7 @@ _efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (recog_state == EFL_GESTURE_IGNORE)
|
else if (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_IGNORE)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ _efl_canvas_gesture_manager_filter_event(void *data, Eo *target, void *event)
|
||||||
efl_event_callback_call(target, gesture_type, gesture);
|
efl_event_callback_call(target, gesture_type, gesture);
|
||||||
|
|
||||||
//If the current event recognizes the gesture continuously, dont delete gesture.
|
//If the current event recognizes the gesture continuously, dont delete gesture.
|
||||||
if (((recog_state == EFL_GESTURE_FINISH) || (recog_state == EFL_GESTURE_CANCEL)) &&
|
if (((recog_state == EFL_GESTURE_RECOGNIZER_RESULT_FINISH) || (recog_state == EFL_GESTURE_RECOGNIZER_RESULT_CANCEL)) &&
|
||||||
!rd->continues)
|
!rd->continues)
|
||||||
{
|
{
|
||||||
_cleanup_cached_gestures(pd, target, gesture_type);
|
_cleanup_cached_gestures(pd, target, gesture_type);
|
||||||
|
@ -314,37 +314,37 @@ _find_match_recognizer(Efl_Canvas_Gesture_Manager_Data *pd, Efl_Canvas_Gesture_R
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TAP:
|
case EFL_GESTURE_RECOGNIZER_TYPE_TAP:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_TAP;
|
event_type = EFL_EVENT_GESTURE_TAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_DOUBLETAP:
|
case EFL_GESTURE_RECOGNIZER_TYPE_DOUBLETAP:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_DOUBLE_TAP;
|
event_type = EFL_EVENT_GESTURE_DOUBLE_TAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_TRIPLETAP:
|
case EFL_GESTURE_RECOGNIZER_TYPE_TRIPLETAP:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_TRIPLE_TAP;
|
event_type = EFL_EVENT_GESTURE_TRIPLE_TAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_LONGTAP:
|
case EFL_GESTURE_RECOGNIZER_TYPE_LONGTAP:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_LONG_TAP;
|
event_type = EFL_EVENT_GESTURE_LONG_TAP;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_MOMENTUM:
|
case EFL_GESTURE_RECOGNIZER_TYPE_MOMENTUM:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_MOMENTUM;
|
event_type = EFL_EVENT_GESTURE_MOMENTUM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_FLICK:
|
case EFL_GESTURE_RECOGNIZER_TYPE_FLICK:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_FLICK;
|
event_type = EFL_EVENT_GESTURE_FLICK;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_ZOOM:
|
case EFL_GESTURE_RECOGNIZER_TYPE_ZOOM:
|
||||||
{
|
{
|
||||||
event_type = EFL_EVENT_GESTURE_ZOOM;
|
event_type = EFL_EVENT_GESTURE_ZOOM;
|
||||||
break;
|
break;
|
||||||
|
@ -410,8 +410,8 @@ _get_state(Efl_Canvas_Gesture_Manager_Data *pd,
|
||||||
object_gesture->type == type)
|
object_gesture->type == type)
|
||||||
{
|
{
|
||||||
//The gesture is already processed waiting for cleanup
|
//The gesture is already processed waiting for cleanup
|
||||||
if (((efl_gesture_state_get(object_gesture->gesture) == EFL_GESTURE_FINISHED) ||
|
if (((efl_gesture_state_get(object_gesture->gesture) == EFL_GESTURE_STATE_FINISHED) ||
|
||||||
(efl_gesture_state_get(object_gesture->gesture) == EFL_GESTURE_CANCELED)) &&
|
(efl_gesture_state_get(object_gesture->gesture) == EFL_GESTURE_STATE_CANCELED)) &&
|
||||||
(!rd->continues))
|
(!rd->continues))
|
||||||
{
|
{
|
||||||
_cleanup_cached_gestures(pd, target, type);
|
_cleanup_cached_gestures(pd, target, type);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_CLASS
|
#define MY_CLASS EFL_CANVAS_GESTURE_RECOGNIZER_CLASS
|
||||||
|
|
||||||
#define EFL_GESTURE_TAP_FINGER_SIZE 10
|
#define EFL_GESTURE_RECOGNIZER_TYPE_TAP_FINGER_SIZE 10
|
||||||
EOLIAN static Eina_Value *
|
EOLIAN static Eina_Value *
|
||||||
_efl_canvas_gesture_recognizer_config_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd, const char *name)
|
_efl_canvas_gesture_recognizer_config_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd, const char *name)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ _efl_canvas_gesture_recognizer_efl_object_constructor(Eo *obj, Efl_Canvas_Gestur
|
||||||
{
|
{
|
||||||
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
||||||
|
|
||||||
pd->finger_size = EFL_GESTURE_TAP_FINGER_SIZE;
|
pd->finger_size = EFL_GESTURE_RECOGNIZER_TYPE_TAP_FINGER_SIZE;
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ _tap_timeout_cb(void *data)
|
||||||
rd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
rd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
pd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_DOUBLE_TAP_CLASS);
|
pd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_DOUBLE_TAP_CLASS);
|
||||||
|
|
||||||
efl_gesture_state_set(pd->gesture, EFL_GESTURE_CANCELED);
|
efl_gesture_state_set(pd->gesture, EFL_GESTURE_STATE_CANCELED);
|
||||||
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_DOUBLE_TAP, pd->gesture);
|
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_DOUBLE_TAP, pd->gesture);
|
||||||
|
|
||||||
efl_gesture_manager_gesture_clean_up(rd->manager, pd->target, EFL_EVENT_GESTURE_DOUBLE_TAP);
|
efl_gesture_manager_gesture_clean_up(rd->manager, pd->target, EFL_EVENT_GESTURE_DOUBLE_TAP);
|
||||||
|
@ -50,7 +50,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
double timeout = TAP_TIME_OUT;
|
double timeout = TAP_TIME_OUT;
|
||||||
Eina_Position2D pos;
|
Eina_Position2D pos;
|
||||||
Eina_Vector2 dist;
|
Eina_Vector2 dist;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
|
||||||
pd->target = watched;
|
pd->target = watched;
|
||||||
|
@ -72,7 +72,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
{
|
{
|
||||||
pos = efl_gesture_touch_start_point_get(event);
|
pos = efl_gesture_touch_start_point_get(event);
|
||||||
efl_gesture_hotspot_set(gesture, pos);
|
efl_gesture_hotspot_set(gesture, pos);
|
||||||
|
@ -82,16 +82,16 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
else
|
else
|
||||||
pd->timeout = ecore_timer_add(timeout, _tap_timeout_cb, obj);
|
pd->timeout = ecore_timer_add(timeout, _tap_timeout_cb, obj);
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_IGNORE;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE &&
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
|
||||||
!efl_gesture_touch_multi_touch_get(event))
|
!efl_gesture_touch_multi_touch_get(event))
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
|
@ -105,7 +105,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
|
|
||||||
pd->tap_count = 0;
|
pd->tap_count = 0;
|
||||||
}
|
}
|
||||||
|
@ -113,10 +113,10 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE &&
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
|
||||||
!efl_gesture_touch_multi_touch_get(event))
|
!efl_gesture_touch_multi_touch_get(event))
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
|
@ -130,7 +130,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
if (pd->timeout)
|
if (pd->timeout)
|
||||||
ecore_timer_reset(pd->timeout);
|
ecore_timer_reset(pd->timeout);
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -140,10 +140,10 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_END)
|
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_END)
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
else
|
else
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
pd->tap_count = 0;
|
pd->tap_count = 0;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
|
|
||||||
pd->tap_count = 0;
|
pd->tap_count = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,8 +70,8 @@ _single_line_process(Eo *obj,
|
||||||
{
|
{
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
if (!pd->t_st)
|
if (!pd->t_st)
|
||||||
{
|
{
|
||||||
pd->st_line = efl_gesture_touch_cur_point_get(event);
|
pd->st_line = efl_gesture_touch_cur_point_get(event);
|
||||||
|
@ -84,7 +84,7 @@ _single_line_process(Eo *obj,
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
if (!pd->t_st) return;
|
if (!pd->t_st) return;
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo
|
||||||
double angle;
|
double angle;
|
||||||
Eina_Value *val;
|
Eina_Value *val;
|
||||||
unsigned char glayer_continues_enable;
|
unsigned char glayer_continues_enable;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Eina_Bool touch_up = EINA_FALSE;
|
Eina_Bool touch_up = EINA_FALSE;
|
||||||
Efl_Canvas_Gesture_Flick_Data *fd = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_FLICK_CLASS);
|
Efl_Canvas_Gesture_Flick_Data *fd = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_FLICK_CLASS);
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
@ -190,14 +190,14 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo
|
||||||
//without mouse up.
|
//without mouse up.
|
||||||
//Recognizing the gesture again, even though it was canceled during gesture
|
//Recognizing the gesture again, even though it was canceled during gesture
|
||||||
//recognition.
|
//recognition.
|
||||||
if (efl_gesture_state_get(gesture) == EFL_GESTURE_CANCELED)
|
if (efl_gesture_state_get(gesture) == EFL_GESTURE_STATE_CANCELED)
|
||||||
efl_gesture_state_set(gesture, EFL_GESTURE_NONE);
|
efl_gesture_state_set(gesture, EFL_GESTURE_STATE_NONE);
|
||||||
|
|
||||||
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_END)
|
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_END)
|
||||||
touch_up = EINA_TRUE;
|
touch_up = EINA_TRUE;
|
||||||
|
|
||||||
//This is to handle a case with a mouse click on the target object.
|
//This is to handle a case with a mouse click on the target object.
|
||||||
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_END && !pd->touched)
|
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_END && !pd->touched)
|
||||||
efl_gesture_manager_gesture_clean_up(rd->manager, watched, EFL_EVENT_GESTURE_FLICK);
|
efl_gesture_manager_gesture_clean_up(rd->manager, watched, EFL_EVENT_GESTURE_FLICK);
|
||||||
|
|
||||||
if (glayer_continues_enable && !pd->touched)
|
if (glayer_continues_enable && !pd->touched)
|
||||||
|
@ -206,7 +206,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo
|
||||||
pd->line_angle = -1.0;
|
pd->line_angle = -1.0;
|
||||||
rd->continues = EINA_TRUE;
|
rd->continues = EINA_TRUE;
|
||||||
|
|
||||||
return EFL_GESTURE_IGNORE;
|
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_single_line_process(obj, pd, gesture, fd, event);
|
_single_line_process(obj, pd, gesture, fd, event);
|
||||||
|
@ -238,7 +238,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo
|
||||||
|
|
||||||
if (touch_up) rd->continues = EINA_FALSE;
|
if (touch_up) rd->continues = EINA_FALSE;
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We may finish line if momentum is zero */
|
/* We may finish line if momentum is zero */
|
||||||
|
@ -273,7 +273,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo
|
||||||
|
|
||||||
if (touch_up) rd->continues = EINA_FALSE;
|
if (touch_up) rd->continues = EINA_FALSE;
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -296,42 +296,42 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo
|
||||||
|
|
||||||
if (touch_up) rd->continues = EINA_FALSE;
|
if (touch_up) rd->continues = EINA_FALSE;
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
{
|
{
|
||||||
if (pd->t_st)
|
if (pd->t_st)
|
||||||
{
|
{
|
||||||
if (glayer_continues_enable && pd->t_end)
|
if (glayer_continues_enable && pd->t_end)
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
if (!pd->t_st)
|
if (!pd->t_st)
|
||||||
{
|
{
|
||||||
pd->touched = EINA_FALSE;
|
pd->touched = EINA_FALSE;
|
||||||
rd->continues = EINA_FALSE;
|
rd->continues = EINA_FALSE;
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
if (pd->t_st && pd->t_end)
|
if (pd->t_st && pd->t_end)
|
||||||
{
|
{
|
||||||
rd->continues = EINA_FALSE;
|
rd->continues = EINA_FALSE;
|
||||||
|
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
efl_gesture_hotspot_set(gesture, efl_gesture_touch_cur_point_get(event));
|
efl_gesture_hotspot_set(gesture, efl_gesture_touch_cur_point_get(event));
|
||||||
|
|
|
@ -30,7 +30,7 @@ _long_tap_timeout_cb(void *data)
|
||||||
/* FIXME: Needs to propagate this event back to evas! */
|
/* FIXME: Needs to propagate this event back to evas! */
|
||||||
pd->is_timeout = EINA_TRUE;
|
pd->is_timeout = EINA_TRUE;
|
||||||
|
|
||||||
efl_gesture_state_set(pd->gesture, EFL_GESTURE_UPDATED);
|
efl_gesture_state_set(pd->gesture, EFL_GESTURE_STATE_UPDATED);
|
||||||
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_LONG_TAP, pd->gesture);
|
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_LONG_TAP, pd->gesture);
|
||||||
|
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
|
@ -47,7 +47,7 @@ _efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(
|
||||||
double timeout = EFL_GESTURE_LONG_TAP_TIME_OUT;
|
double timeout = EFL_GESTURE_LONG_TAP_TIME_OUT;
|
||||||
Eina_Position2D pos;
|
Eina_Position2D pos;
|
||||||
Eina_Vector2 dist;
|
Eina_Vector2 dist;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
|
||||||
pd->target = watched;
|
pd->target = watched;
|
||||||
|
@ -70,7 +70,7 @@ _efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
{
|
{
|
||||||
pos = efl_gesture_touch_start_point_get(event);
|
pos = efl_gesture_touch_start_point_get(event);
|
||||||
efl_gesture_hotspot_set(gesture, pos);
|
efl_gesture_hotspot_set(gesture, pos);
|
||||||
|
@ -82,12 +82,12 @@ _efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(
|
||||||
pd->timeout = ecore_timer_add(timeout,
|
pd->timeout = ecore_timer_add(timeout,
|
||||||
_long_tap_timeout_cb, pd);
|
_long_tap_timeout_cb, pd);
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
length = fabs(dist.x) + fabs(dist.y);
|
length = fabs(dist.x) + fabs(dist.y);
|
||||||
|
@ -100,17 +100,17 @@ _efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_MAYBE;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_MAYBE;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
if (pd->timeout)
|
if (pd->timeout)
|
||||||
{
|
{
|
||||||
|
@ -118,18 +118,18 @@ _efl_canvas_gesture_recognizer_long_tap_efl_canvas_gesture_recognizer_recognize(
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE &&
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
|
||||||
!efl_gesture_touch_multi_touch_get(event))
|
!efl_gesture_touch_multi_touch_get(event))
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
length = fabs(dist.x) + fabs(dist.y);
|
length = fabs(dist.x) + fabs(dist.y);
|
||||||
if (length <= rd->finger_size && pd->is_timeout)
|
if (length <= rd->finger_size && pd->is_timeout)
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
|
||||||
{
|
{
|
||||||
Eina_Value *val;
|
Eina_Value *val;
|
||||||
unsigned char glayer_continues_enable;
|
unsigned char glayer_continues_enable;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Efl_Canvas_Gesture_Momentum_Data *md = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_MOMENTUM_CLASS);
|
Efl_Canvas_Gesture_Momentum_Data *md = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_MOMENTUM_CLASS);
|
||||||
|
|
||||||
val = efl_gesture_recognizer_config_get(obj, "glayer_continues_enable");
|
val = efl_gesture_recognizer_config_get(obj, "glayer_continues_enable");
|
||||||
|
@ -89,17 +89,17 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
|
||||||
{
|
{
|
||||||
pd->touched = EINA_TRUE;
|
pd->touched = EINA_TRUE;
|
||||||
|
|
||||||
return EFL_GESTURE_IGNORE;
|
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
{
|
{
|
||||||
if (!pd->t_st)
|
if (!pd->t_st)
|
||||||
{
|
{
|
||||||
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_BEGIN ||
|
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_BEGIN ||
|
||||||
glayer_continues_enable)
|
glayer_continues_enable)
|
||||||
{
|
{
|
||||||
pd->t_st = pd->t_end = efl_gesture_touch_cur_timestamp_get(event);
|
pd->t_st = pd->t_end = efl_gesture_touch_cur_timestamp_get(event);
|
||||||
|
@ -109,7 +109,7 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
|
||||||
|
|
||||||
efl_gesture_hotspot_set(gesture, pd->st_line);
|
efl_gesture_hotspot_set(gesture, pd->st_line);
|
||||||
|
|
||||||
return EFL_GESTURE_TRIGGER;
|
return EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,18 +150,18 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
|
||||||
_momentum_set(obj, md, pd->st_line, efl_gesture_touch_cur_point_get(event),
|
_momentum_set(obj, md, pd->st_line, efl_gesture_touch_cur_point_get(event),
|
||||||
pd->t_st, efl_gesture_touch_cur_timestamp_get(event));
|
pd->t_st, efl_gesture_touch_cur_timestamp_get(event));
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
if (!pd->t_st)
|
if (!pd->t_st)
|
||||||
{
|
{
|
||||||
pd->touched = EINA_FALSE;
|
pd->touched = EINA_FALSE;
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((efl_gesture_touch_cur_timestamp_get(event) - MOMENTUM_TIMEOUT) > pd->t_end)
|
if ((efl_gesture_touch_cur_timestamp_get(event) - MOMENTUM_TIMEOUT) > pd->t_end)
|
||||||
|
@ -177,9 +177,9 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize(
|
||||||
|
|
||||||
if ((fabs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) ||
|
if ((fabs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) ||
|
||||||
(fabs(md->momentum.y) > EFL_GESTURE_MINIMUM_MOMENTUM))
|
(fabs(md->momentum.y) > EFL_GESTURE_MINIMUM_MOMENTUM))
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
else
|
else
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
|
|
||||||
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Momentum_Data));
|
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Momentum_Data));
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
//FIXME: It doesnt have matched config value.
|
//FIXME: It doesnt have matched config value.
|
||||||
// may using dobule tap timeout value?
|
// may using dobule tap timeout value?
|
||||||
#define EFL_GESTURE_TAP_TIME_OUT 0.33
|
#define EFL_GESTURE_RECOGNIZER_TYPE_TAP_TIME_OUT 0.33
|
||||||
|
|
||||||
EOLIAN static Efl_Canvas_Gesture *
|
EOLIAN static Efl_Canvas_Gesture *
|
||||||
_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_add(Eo *obj,
|
_efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_add(Eo *obj,
|
||||||
|
@ -19,7 +19,7 @@ _tap_timeout_cb(void *data)
|
||||||
{
|
{
|
||||||
Efl_Canvas_Gesture_Recognizer_Tap_Data *pd = data;
|
Efl_Canvas_Gesture_Recognizer_Tap_Data *pd = data;
|
||||||
|
|
||||||
efl_gesture_state_set(pd->gesture, EFL_GESTURE_CANCELED);
|
efl_gesture_state_set(pd->gesture, EFL_GESTURE_STATE_CANCELED);
|
||||||
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_TAP, pd->gesture);
|
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_TAP, pd->gesture);
|
||||||
|
|
||||||
return ECORE_CALLBACK_CANCEL;
|
return ECORE_CALLBACK_CANCEL;
|
||||||
|
@ -36,7 +36,7 @@ _efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_recognize(Eo *o
|
||||||
double length;
|
double length;
|
||||||
Eina_Position2D pos;
|
Eina_Position2D pos;
|
||||||
Eina_Vector2 dist;
|
Eina_Vector2 dist;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
|
||||||
pd->target = watched;
|
pd->target = watched;
|
||||||
|
@ -44,22 +44,22 @@ _efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_recognize(Eo *o
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
{
|
{
|
||||||
pos = efl_gesture_touch_start_point_get(event);
|
pos = efl_gesture_touch_start_point_get(event);
|
||||||
efl_gesture_hotspot_set(gesture, pos);
|
efl_gesture_hotspot_set(gesture, pos);
|
||||||
|
|
||||||
if (pd->timeout)
|
if (pd->timeout)
|
||||||
ecore_timer_del(pd->timeout);
|
ecore_timer_del(pd->timeout);
|
||||||
pd->timeout = ecore_timer_add(EFL_GESTURE_TAP_TIME_OUT, _tap_timeout_cb, pd);
|
pd->timeout = ecore_timer_add(EFL_GESTURE_RECOGNIZER_TYPE_TAP_TIME_OUT, _tap_timeout_cb, pd);
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
if (pd->timeout)
|
if (pd->timeout)
|
||||||
{
|
{
|
||||||
|
@ -67,17 +67,17 @@ _efl_canvas_gesture_recognizer_tap_efl_canvas_gesture_recognizer_recognize(Eo *o
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE &&
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
|
||||||
!efl_gesture_touch_multi_touch_get(event))
|
!efl_gesture_touch_multi_touch_get(event))
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
length = fabs(dist.x) + fabs(dist.y);
|
length = fabs(dist.x) + fabs(dist.y);
|
||||||
if (length <= rd->finger_size)
|
if (length <= rd->finger_size)
|
||||||
{
|
{
|
||||||
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_END)
|
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_END)
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
else
|
else
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ _tap_timeout_cb(void *data)
|
||||||
rd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
rd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
pd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_TRIPLE_TAP_CLASS);
|
pd = efl_data_scope_get(data, EFL_CANVAS_GESTURE_RECOGNIZER_TRIPLE_TAP_CLASS);
|
||||||
|
|
||||||
efl_gesture_state_set(pd->gesture, EFL_GESTURE_CANCELED);
|
efl_gesture_state_set(pd->gesture, EFL_GESTURE_STATE_CANCELED);
|
||||||
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_TRIPLE_TAP, pd->gesture);
|
efl_event_callback_call(pd->target, EFL_EVENT_GESTURE_TRIPLE_TAP, pd->gesture);
|
||||||
|
|
||||||
efl_gesture_manager_gesture_clean_up(rd->manager, pd->target, EFL_EVENT_GESTURE_TRIPLE_TAP);
|
efl_gesture_manager_gesture_clean_up(rd->manager, pd->target, EFL_EVENT_GESTURE_TRIPLE_TAP);
|
||||||
|
@ -50,7 +50,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
double timeout = TAP_TIME_OUT;
|
double timeout = TAP_TIME_OUT;
|
||||||
Eina_Position2D pos;
|
Eina_Position2D pos;
|
||||||
Eina_Vector2 dist;
|
Eina_Vector2 dist;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
|
||||||
pd->target = watched;
|
pd->target = watched;
|
||||||
|
@ -72,7 +72,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
{
|
{
|
||||||
pos = efl_gesture_touch_start_point_get(event);
|
pos = efl_gesture_touch_start_point_get(event);
|
||||||
efl_gesture_hotspot_set(gesture, pos);
|
efl_gesture_hotspot_set(gesture, pos);
|
||||||
|
@ -82,16 +82,16 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
else
|
else
|
||||||
pd->timeout = ecore_timer_add(timeout, _tap_timeout_cb, obj);
|
pd->timeout = ecore_timer_add(timeout, _tap_timeout_cb, obj);
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
{
|
{
|
||||||
result = EFL_GESTURE_IGNORE;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE &&
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
|
||||||
!efl_gesture_touch_multi_touch_get(event))
|
!efl_gesture_touch_multi_touch_get(event))
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
|
@ -105,7 +105,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
|
|
||||||
pd->tap_count = 0;
|
pd->tap_count = 0;
|
||||||
}
|
}
|
||||||
|
@ -113,10 +113,10 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE &&
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE &&
|
||||||
!efl_gesture_touch_multi_touch_get(event))
|
!efl_gesture_touch_multi_touch_get(event))
|
||||||
{
|
{
|
||||||
dist = efl_gesture_touch_distance(event, 0);
|
dist = efl_gesture_touch_distance(event, 0);
|
||||||
|
@ -130,7 +130,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
if (pd->timeout)
|
if (pd->timeout)
|
||||||
ecore_timer_reset(pd->timeout);
|
ecore_timer_reset(pd->timeout);
|
||||||
|
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -140,10 +140,10 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_END)
|
if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_END)
|
||||||
result = EFL_GESTURE_FINISH;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
else
|
else
|
||||||
result = EFL_GESTURE_TRIGGER;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
pd->tap_count = 0;
|
pd->tap_count = 0;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz
|
||||||
pd->timeout = NULL;
|
pd->timeout = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = EFL_GESTURE_CANCEL;
|
result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
|
|
||||||
pd->tap_count = 0;
|
pd->tap_count = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
|
||||||
Eina_Value *val;
|
Eina_Value *val;
|
||||||
unsigned char zoom_finger_enable;
|
unsigned char zoom_finger_enable;
|
||||||
unsigned char glayer_continues_enable;
|
unsigned char glayer_continues_enable;
|
||||||
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_CANCEL;
|
Efl_Canvas_Gesture_Recognizer_Result result = EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
Efl_Canvas_Gesture_Zoom_Data *zd = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_ZOOM_CLASS);
|
Efl_Canvas_Gesture_Zoom_Data *zd = efl_data_scope_get(gesture, EFL_CANVAS_GESTURE_ZOOM_CLASS);
|
||||||
Efl_Canvas_Gesture_Touch_Data *td = efl_data_scope_get(event, EFL_CANVAS_GESTURE_TOUCH_CLASS);
|
Efl_Canvas_Gesture_Touch_Data *td = efl_data_scope_get(event, EFL_CANVAS_GESTURE_TOUCH_CLASS);
|
||||||
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
Efl_Canvas_Gesture_Recognizer_Data *rd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_RECOGNIZER_CLASS);
|
||||||
|
@ -164,26 +164,26 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
|
||||||
|
|
||||||
switch (efl_gesture_touch_state_get(event))
|
switch (efl_gesture_touch_state_get(event))
|
||||||
{
|
{
|
||||||
case EFL_GESTURE_TOUCH_UPDATE:
|
case EFL_GESTURE_TOUCH_STATE_UPDATE:
|
||||||
{
|
{
|
||||||
if ((!glayer_continues_enable) && (!pd->zoom_st.cur.timestamp))
|
if ((!glayer_continues_enable) && (!pd->zoom_st.cur.timestamp))
|
||||||
{
|
{
|
||||||
return EFL_GESTURE_IGNORE;
|
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
}
|
}
|
||||||
EINA_FALLTHROUGH;
|
EINA_FALLTHROUGH;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_TOUCH_BEGIN:
|
case EFL_GESTURE_TOUCH_STATE_BEGIN:
|
||||||
{
|
{
|
||||||
if (td->touch_down > 2)
|
if (td->touch_down > 2)
|
||||||
{
|
{
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pd->zoom_st.cur.timestamp) /* Now scan touched-devices list
|
if (!pd->zoom_st.cur.timestamp) /* Now scan touched-devices list
|
||||||
* and find other finger */
|
* and find other finger */
|
||||||
{
|
{
|
||||||
if (!efl_gesture_touch_multi_touch_get(event))
|
if (!efl_gesture_touch_multi_touch_get(event))
|
||||||
return EFL_GESTURE_IGNORE;
|
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
|
|
||||||
Pointer_Data *p1 = eina_hash_find(td->touch_points, &id1);
|
Pointer_Data *p1 = eina_hash_find(td->touch_points, &id1);
|
||||||
Pointer_Data *p2 = eina_hash_find(td->touch_points, &id2);
|
Pointer_Data *p2 = eina_hash_find(td->touch_points, &id2);
|
||||||
|
@ -204,11 +204,11 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
|
||||||
|
|
||||||
zd->radius = pd->zoom_base / 2.0;
|
zd->radius = pd->zoom_base / 2.0;
|
||||||
|
|
||||||
if ((efl_gesture_state_get(gesture) != EFL_GESTURE_STARTED) &&
|
if ((efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_STARTED) &&
|
||||||
(efl_gesture_state_get(gesture) != EFL_GESTURE_UPDATED))
|
(efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_UPDATED))
|
||||||
return EFL_GESTURE_TRIGGER;
|
return EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pointer_Data *p2 = eina_hash_find(td->touch_points, &id2);
|
Pointer_Data *p2 = eina_hash_find(td->touch_points, &id2);
|
||||||
|
@ -232,13 +232,13 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
|
||||||
{
|
{
|
||||||
pd->next_step = zd->zoom;
|
pd->next_step = zd->zoom;
|
||||||
|
|
||||||
return EFL_GESTURE_TRIGGER;
|
return EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFL_GESTURE_IGNORE;
|
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
}
|
}
|
||||||
case EFL_GESTURE_TOUCH_END:
|
case EFL_GESTURE_TOUCH_STATE_END:
|
||||||
{
|
{
|
||||||
if (td->touch_down == 0)
|
if (td->touch_down == 0)
|
||||||
{
|
{
|
||||||
|
@ -247,20 +247,20 @@ _efl_canvas_gesture_recognizer_zoom_efl_canvas_gesture_recognizer_recognize(Eo *
|
||||||
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Zoom_Data));
|
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Zoom_Data));
|
||||||
efl_gesture_manager_gesture_clean_up(rd->manager, watched, EFL_EVENT_GESTURE_ZOOM);
|
efl_gesture_manager_gesture_clean_up(rd->manager, watched, EFL_EVENT_GESTURE_ZOOM);
|
||||||
|
|
||||||
return EFL_GESTURE_IGNORE;
|
return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE;
|
||||||
}
|
}
|
||||||
if ((pd->zoom_base) && (pd->zoom_distance_tolerance == 0))
|
if ((pd->zoom_base) && (pd->zoom_distance_tolerance == 0))
|
||||||
{
|
{
|
||||||
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Zoom_Data));
|
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Zoom_Data));
|
||||||
|
|
||||||
return EFL_GESTURE_FINISH;
|
return EFL_GESTURE_RECOGNIZER_RESULT_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (efl_gesture_state_get(gesture) != EFL_GESTURE_NONE)
|
if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE)
|
||||||
{
|
{
|
||||||
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Zoom_Data));
|
memset(pd, 0, sizeof(Efl_Canvas_Gesture_Recognizer_Zoom_Data));
|
||||||
|
|
||||||
return EFL_GESTURE_CANCEL;
|
return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ _touch_points_reset(Efl_Canvas_Gesture_Touch_Data *pd)
|
||||||
eina_hash_free(pd->touch_points);
|
eina_hash_free(pd->touch_points);
|
||||||
pd->touch_points = eina_hash_int32_new(EINA_FREE_CB(_hash_free_cb));
|
pd->touch_points = eina_hash_int32_new(EINA_FREE_CB(_hash_free_cb));
|
||||||
pd->touch_down = 0;
|
pd->touch_down = 0;
|
||||||
pd->state = EFL_GESTURE_TOUCH_UNKNOWN;
|
pd->state = EFL_GESTURE_TOUCH_STATE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Efl_Object *
|
EOLIAN static Efl_Object *
|
||||||
|
@ -101,15 +101,15 @@ _efl_canvas_gesture_touch_point_record(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_T
|
||||||
|
|
||||||
if (!id && (action == EFL_POINTER_ACTION_DOWN))
|
if (!id && (action == EFL_POINTER_ACTION_DOWN))
|
||||||
{
|
{
|
||||||
pd->state = EFL_GESTURE_TOUCH_BEGIN;
|
pd->state = EFL_GESTURE_TOUCH_STATE_BEGIN;
|
||||||
}
|
}
|
||||||
else if (action == EFL_POINTER_ACTION_UP)
|
else if (action == EFL_POINTER_ACTION_UP)
|
||||||
{
|
{
|
||||||
pd->state = EFL_GESTURE_TOUCH_END;
|
pd->state = EFL_GESTURE_TOUCH_STATE_END;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pd->state = EFL_GESTURE_TOUCH_UPDATE;
|
pd->state = EFL_GESTURE_TOUCH_STATE_UPDATE;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
enum @beta Efl.Canvas.Gesture_Touch_State
|
enum @beta Efl.Canvas.Gesture_Touch_State
|
||||||
{
|
{
|
||||||
[[ This enum type describes the state of a touch event. ]]
|
[[ This enum type describes the state of a touch event. ]]
|
||||||
legacy: efl_gesture_touch;
|
legacy: efl_gesture_touch_state;
|
||||||
unknown = 0, [[Gesture Touch State unknown]]
|
unknown = 0, [[Gesture Touch State unknown]]
|
||||||
begin , [[First fingure touch down]]
|
begin , [[First fingure touch down]]
|
||||||
update, [[fingure touch update]]
|
update, [[fingure touch update]]
|
||||||
|
@ -11,7 +11,7 @@ enum @beta Efl.Canvas.Gesture_Touch_State
|
||||||
enum @beta Efl.Canvas.Gesture_State
|
enum @beta Efl.Canvas.Gesture_State
|
||||||
{
|
{
|
||||||
[[ This enum type describes the state of a gesture. ]]
|
[[ This enum type describes the state of a gesture. ]]
|
||||||
legacy: efl_gesture;
|
legacy: efl_gesture_state;
|
||||||
none = 0, [[No gesture state]]
|
none = 0, [[No gesture state]]
|
||||||
started = 1, [[A continuous gesture has started.]]
|
started = 1, [[A continuous gesture has started.]]
|
||||||
updated, [[A gesture continues.]]
|
updated, [[A gesture continues.]]
|
||||||
|
@ -22,7 +22,7 @@ enum @beta Efl.Canvas.Gesture_State
|
||||||
enum @beta Efl.Canvas.Gesture_Recognizer_Result
|
enum @beta Efl.Canvas.Gesture_Recognizer_Result
|
||||||
{
|
{
|
||||||
[[ This enum type describes the state of a gesture recognizer. ]]
|
[[ This enum type describes the state of a gesture recognizer. ]]
|
||||||
legacy: efl_gesture;
|
legacy: efl_gesture_recognizer_result;
|
||||||
|
|
||||||
ignore = 0x0001, [[The event does not change the state of the recognizer.]]
|
ignore = 0x0001, [[The event does not change the state of the recognizer.]]
|
||||||
maybe = 0x0002, [[The event changed the internal state of the recognizer, but it isn't clear yet if it is a gesture or not. The recognizer needs to filter more events to decide.]]
|
maybe = 0x0002, [[The event changed the internal state of the recognizer, but it isn't clear yet if it is a gesture or not. The recognizer needs to filter more events to decide.]]
|
||||||
|
@ -35,7 +35,7 @@ enum @beta Efl.Canvas.Gesture_Recognizer_Result
|
||||||
enum @beta Efl.Canvas.Gesture_Recognizer_Type
|
enum @beta Efl.Canvas.Gesture_Recognizer_Type
|
||||||
{
|
{
|
||||||
[[ This enum type describes the state of a touch event. ]]
|
[[ This enum type describes the state of a touch event. ]]
|
||||||
legacy: efl_gesture;
|
legacy: efl_gesture_recognizer_type;
|
||||||
tap = 0,
|
tap = 0,
|
||||||
doubleTap,
|
doubleTap,
|
||||||
tripleTap,
|
tripleTap,
|
||||||
|
|
Loading…
Reference in New Issue