diff options
author | Mike Blumenkrantz <zmike@samsung.com> | 2020-02-07 12:00:39 -0500 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-02-14 09:21:03 +0100 |
commit | f145b538920cb8604b81009d7b4199fda2ab554f (patch) | |
tree | 30d196d968462b237f1f079f8e41f5dab9b7232f | |
parent | 77b6d0efd7d714ccd7139a956b439c973ab2e6dd (diff) | |
download | efl-f145b538920cb8604b81009d7b4199fda2ab554f.tar.gz |
efl/gesture: api renames for Efl.Canvas.Gesture_Touch
ref T8554
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11300
9 files changed, 58 insertions, 58 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c index 1425cce84e..da6d8308b0 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c @@ -341,7 +341,7 @@ _gesture_recognizer_process_internal(Efl_Canvas_Gesture_Manager_Data *pd, Efl_Ca return; } - efl_gesture_timestamp_set(gesture, efl_gesture_touch_cur_timestamp_get(touch_event)); + efl_gesture_timestamp_set(gesture, efl_gesture_touch_current_timestamp_get(touch_event)); efl_event_callback_call(target, gesture_type, gesture); post_event: //If the current event recognizes the gesture continuously, dont delete gesture. diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c index ba6807a645..99eee5c19a 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c @@ -88,10 +88,10 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz case EFL_GESTURE_TOUCH_STATE_UPDATE: { /* multi-touch */ - if (efl_gesture_touch_cur_data_get(event)->action == EFL_POINTER_ACTION_DOWN) + if (efl_gesture_touch_current_data_get(event)->action == EFL_POINTER_ACTION_DOWN) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) { result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; break; @@ -127,14 +127,14 @@ _efl_canvas_gesture_recognizer_double_tap_efl_canvas_gesture_recognizer_recogniz if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE && !_event_multi_touch_get(event)) { - if (efl_gesture_touch_prev_data_get(event)) + if (efl_gesture_touch_previous_data_get(event)) { - Efl_Pointer_Action prev_act = efl_gesture_touch_prev_data_get(event)->action; + Efl_Pointer_Action prev_act = efl_gesture_touch_previous_data_get(event)->action; /* multi-touch */ if ((prev_act == EFL_POINTER_ACTION_UP) || (prev_act == EFL_POINTER_ACTION_CANCEL)) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) { result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; break; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c index 80abac6eb6..2c459482c2 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c @@ -86,8 +86,8 @@ _single_line_process(Eo *obj, case EFL_GESTURE_TOUCH_STATE_UPDATE: if (!pd->t_st) { - pd->st_line = efl_gesture_touch_cur_point_get(event); - pd->t_st = efl_gesture_touch_cur_timestamp_get(event); + pd->st_line = efl_gesture_touch_current_point_get(event); + pd->t_st = efl_gesture_touch_current_timestamp_get(event); efl_gesture_hotspot_set(gesture, pd->st_line); @@ -100,7 +100,7 @@ _single_line_process(Eo *obj, { if (!pd->t_st) return; - pd->t_end = efl_gesture_touch_cur_timestamp_get(event); + pd->t_end = efl_gesture_touch_current_timestamp_get(event); break; } @@ -110,8 +110,8 @@ _single_line_process(Eo *obj, return; } - _momentum_set(obj, fd, pd->st_line, efl_gesture_touch_cur_point_get(event), - pd->t_st, efl_gesture_touch_cur_timestamp_get(event)); + _momentum_set(obj, fd, pd->st_line, efl_gesture_touch_current_point_get(event), + pd->t_st, efl_gesture_touch_current_timestamp_get(event)); } static double @@ -227,16 +227,16 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; } - if (pd->touched && (efl_gesture_touch_cur_data_get(event)->action == EFL_POINTER_ACTION_DOWN)) + if (pd->touched && (efl_gesture_touch_current_data_get(event)->action == EFL_POINTER_ACTION_DOWN)) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; } - if (pd->t_st && (points > 1) && (fd->id != efl_gesture_touch_cur_data_get(event)->id)) + if (pd->t_st && (points > 1) && (fd->id != efl_gesture_touch_current_data_get(event)->id)) { int xdir[2], ydir[2]; - const Efl_Gesture_Touch_Point_Data *data = efl_gesture_touch_cur_data_get(event); + const Efl_Gesture_Touch_Point_Data *data = efl_gesture_touch_current_data_get(event); const Efl_Gesture_Touch_Point_Data *data2; if (fd->id == -1) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; @@ -255,7 +255,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo } _single_line_process(obj, pd, gesture, fd, event); - _vector_get(pd->st_line, efl_gesture_touch_cur_point_get(event), + _vector_get(pd->st_line, efl_gesture_touch_current_point_get(event), &pd->line_length, &angle); line_angle = pd->line_angle; @@ -293,7 +293,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo /* This is for continues-gesture */ /* Finish line on zero momentum for continues gesture */ if ((!fd->momentum.x) && (!fd->momentum.y)) - pd->t_end = efl_gesture_touch_cur_timestamp_get(event); + pd->t_end = efl_gesture_touch_current_timestamp_get(event); } } else @@ -323,7 +323,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo } } - unsigned int tm_end = efl_gesture_touch_cur_timestamp_get(event); + unsigned int tm_end = efl_gesture_touch_current_timestamp_get(event); if (pd->t_end) { if (pd->t_end < tm_end) @@ -348,7 +348,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo { case EFL_GESTURE_TOUCH_STATE_BEGIN: if (!glayer_continues_enable) - fd->id = efl_gesture_touch_cur_data_get(event)->id; + fd->id = efl_gesture_touch_current_data_get(event)->id; EINA_FALLTHROUGH; case EFL_GESTURE_TOUCH_STATE_UPDATE: { @@ -382,7 +382,7 @@ _efl_canvas_gesture_recognizer_flick_efl_canvas_gesture_recognizer_recognize(Eo 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_current_point_get(event)); _reset_recognizer(pd); 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 f6cc9a1ebe..90685d6400 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c @@ -89,21 +89,21 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize( return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; } - if (pd->touched && (efl_gesture_touch_cur_data_get(event)->action == EFL_POINTER_ACTION_DOWN)) + if (pd->touched && (efl_gesture_touch_current_data_get(event)->action == EFL_POINTER_ACTION_DOWN)) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ if (efl_gesture_touch_points_count_get(event) > 1) { - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_touch_prev_data_get(event)->cur.timestamp < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_touch_previous_data_get(event)->cur.timestamp < TAP_TOUCH_TIME_THRESHOLD) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; } - else if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + else if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; } - if (pd->t_st && (md->id != -1) && (md->id != efl_gesture_touch_cur_data_get(event)->id)) + if (pd->t_st && (md->id != -1) && (md->id != efl_gesture_touch_current_data_get(event)->id)) { int xdir, ydir; - const Efl_Gesture_Touch_Point_Data *data = efl_gesture_touch_cur_data_get(event); + const Efl_Gesture_Touch_Point_Data *data = efl_gesture_touch_current_data_get(event); xdir = _direction_get(data->prev.pos.x, data->cur.pos.x); ydir = _direction_get(data->prev.pos.y, data->cur.pos.y); if ((xdir != pd->xdir) || (ydir != pd->ydir)) @@ -124,35 +124,35 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize( if (efl_gesture_touch_state_get(event) == EFL_GESTURE_TOUCH_STATE_BEGIN || glayer_continues_enable) { - if (efl_gesture_touch_prev_data_get(event)) + if (efl_gesture_touch_previous_data_get(event)) { - if (efl_gesture_touch_prev_data_get(event)->action == efl_gesture_touch_cur_data_get(event)->action) + if (efl_gesture_touch_previous_data_get(event)->action == efl_gesture_touch_current_data_get(event)->action) return EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; } - pd->t_st = pd->t_end = efl_gesture_touch_cur_timestamp_get(event); + pd->t_st = pd->t_end = efl_gesture_touch_current_timestamp_get(event); pd->st_line = pd->end_line = efl_gesture_touch_start_point_get(event); efl_gesture_hotspot_set(gesture, pd->st_line); if (!glayer_continues_enable) - md->id = efl_gesture_touch_cur_data_get(event)->id; + md->id = efl_gesture_touch_current_data_get(event)->id; return EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER; } } - if ((efl_gesture_touch_cur_timestamp_get(event) - MOMENTUM_TIMEOUT) > + if ((efl_gesture_touch_current_timestamp_get(event) - MOMENTUM_TIMEOUT) > pd->t_end) { - pd->st_line = efl_gesture_touch_cur_point_get(event); - pd->t_st = efl_gesture_touch_cur_timestamp_get(event); + pd->st_line = efl_gesture_touch_current_point_get(event); + pd->t_st = efl_gesture_touch_current_timestamp_get(event); pd->xdir = pd->ydir = 0; } else { int xdir, ydir; - Eina_Position2D cur_p = efl_gesture_touch_cur_point_get(event); + Eina_Position2D cur_p = efl_gesture_touch_current_point_get(event); xdir = _direction_get(pd->end_line.x, cur_p.x); ydir = _direction_get(pd->end_line.y, cur_p.y); @@ -172,12 +172,12 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize( } } - pd->end_line = efl_gesture_touch_cur_point_get(event); - pd->t_end = efl_gesture_touch_cur_timestamp_get(event); + pd->end_line = efl_gesture_touch_current_point_get(event); + pd->t_end = efl_gesture_touch_current_timestamp_get(event); efl_gesture_hotspot_set(gesture, pd->end_line); - _momentum_set(obj, md, pd->st_line, efl_gesture_touch_cur_point_get(event), - pd->t_st, efl_gesture_touch_cur_timestamp_get(event)); + _momentum_set(obj, md, pd->st_line, efl_gesture_touch_current_point_get(event), + pd->t_st, efl_gesture_touch_current_timestamp_get(event)); result = EFL_GESTURE_RECOGNIZER_RESULT_TRIGGER; @@ -193,15 +193,15 @@ _efl_canvas_gesture_recognizer_momentum_efl_canvas_gesture_recognizer_recognize( return EFL_GESTURE_RECOGNIZER_RESULT_CANCEL; } - if ((efl_gesture_touch_cur_timestamp_get(event) - MOMENTUM_TIMEOUT) > pd->t_end) + if ((efl_gesture_touch_current_timestamp_get(event) - MOMENTUM_TIMEOUT) > pd->t_end) { - pd->st_line = efl_gesture_touch_cur_point_get(event); - pd->t_st = efl_gesture_touch_cur_timestamp_get(event); + pd->st_line = efl_gesture_touch_current_point_get(event); + pd->t_st = efl_gesture_touch_current_timestamp_get(event); pd->xdir = pd->ydir = 0; } - pd->end_line = efl_gesture_touch_cur_point_get(event); - pd->t_end = efl_gesture_touch_cur_timestamp_get(event); + pd->end_line = efl_gesture_touch_current_point_get(event); + pd->t_end = efl_gesture_touch_current_timestamp_get(event); efl_gesture_hotspot_set(gesture, pd->end_line); if ((fabs(md->momentum.x) > EFL_GESTURE_MINIMUM_MOMENTUM) || diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c index fa126450f5..4bbb00f8ce 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c @@ -58,10 +58,10 @@ new_tap: case EFL_GESTURE_TOUCH_STATE_UPDATE: /* multi-touch */ - if (efl_gesture_touch_cur_data_get(event)->action == EFL_POINTER_ACTION_DOWN) + if (efl_gesture_touch_current_data_get(event)->action == EFL_POINTER_ACTION_DOWN) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) { result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; break; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c index f09514750a..1d6df3ed53 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c @@ -87,10 +87,10 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz case EFL_GESTURE_TOUCH_STATE_UPDATE: { /* multi-touch */ - if (efl_gesture_touch_cur_data_get(event)->action == EFL_POINTER_ACTION_DOWN) + if (efl_gesture_touch_current_data_get(event)->action == EFL_POINTER_ACTION_DOWN) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) { result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; break; @@ -126,14 +126,14 @@ _efl_canvas_gesture_recognizer_triple_tap_efl_canvas_gesture_recognizer_recogniz if (efl_gesture_state_get(gesture) != EFL_GESTURE_STATE_NONE && !_event_multi_touch_get(event)) { - if (efl_gesture_touch_prev_data_get(event)) + if (efl_gesture_touch_previous_data_get(event)) { - Efl_Pointer_Action prev_act = efl_gesture_touch_prev_data_get(event)->action; + Efl_Pointer_Action prev_act = efl_gesture_touch_previous_data_get(event)->action; /* multi-touch */ if ((prev_act == EFL_POINTER_ACTION_UP) || (prev_act == EFL_POINTER_ACTION_CANCEL)) { /* a second finger was pressed at the same time-ish as the first: combine into same event */ - if (efl_gesture_touch_cur_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) + if (efl_gesture_touch_current_timestamp_get(event) - efl_gesture_timestamp_get(gesture) < TAP_TOUCH_TIME_THRESHOLD) { result = EFL_GESTURE_RECOGNIZER_RESULT_IGNORE; break; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_touch.c b/src/lib/evas/gesture/efl_canvas_gesture_touch.c index 0d7e00495a..25325d952e 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_touch.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.c @@ -127,13 +127,13 @@ _efl_canvas_gesture_touch_touch_points_count_get(const Eo *obj EINA_UNUSED, Efl_ } EOLIAN static const Efl_Gesture_Touch_Point_Data * -_efl_canvas_gesture_touch_cur_data_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) +_efl_canvas_gesture_touch_current_data_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) { return pd->cur_touch; } EOLIAN static const Efl_Gesture_Touch_Point_Data * -_efl_canvas_gesture_touch_prev_data_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) +_efl_canvas_gesture_touch_previous_data_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) { return pd->prev_touch; } @@ -157,7 +157,7 @@ _efl_canvas_gesture_touch_start_point_get(const Eo *obj EINA_UNUSED, Efl_Canvas_ } EOLIAN static Eina_Position2D -_efl_canvas_gesture_touch_cur_point_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) +_efl_canvas_gesture_touch_current_point_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) { const Efl_Gesture_Touch_Point_Data *point = pd->cur_touch; Eina_Position2D vec = { 0, 0 }; @@ -169,7 +169,7 @@ _efl_canvas_gesture_touch_cur_point_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Ge } EOLIAN static unsigned int -_efl_canvas_gesture_touch_cur_timestamp_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) +_efl_canvas_gesture_touch_current_timestamp_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch_Data *pd) { const Efl_Gesture_Touch_Point_Data *point = pd->cur_touch; diff --git a/src/lib/evas/gesture/efl_canvas_gesture_touch.eo b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo index 9b6471294e..24d12a224c 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_touch.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture_touch.eo @@ -40,14 +40,14 @@ class @beta Efl.Canvas.Gesture_Touch extends Efl.Object pos: Eina.Position2D; [[The start position.]] } } - @property cur_point { + @property current_point { [[Returns the current touch point.]] get {} values { pos: Eina.Position2D; [[The current position.]] } } - @property cur_timestamp { + @property current_timestamp { [[Returns the timestamp.]] get {} values { @@ -68,14 +68,14 @@ class @beta Efl.Canvas.Gesture_Touch extends Efl.Object return : Efl.Canvas.Gesture_Touch_State; [[touch event state]] } } - @property cur_data { + @property current_data { [[This property holds the data struct of the most recent touch point.]] get {} values { data: const(Efl.Canvas.Gesture_Touch_Point_Data) @by_ref; [[The current data.]] } } - @property prev_data { + @property previous_data { [[This property holds the data struct of the second-most recent touch point. If there is only one touch point active, it will return NULL. ]] diff --git a/src/tests/elementary/custom_recognizer2.c b/src/tests/elementary/custom_recognizer2.c index bea860637e..3b8995058a 100644 --- a/src/tests/elementary/custom_recognizer2.c +++ b/src/tests/elementary/custom_recognizer2.c @@ -19,7 +19,7 @@ _custom_recognizer2_efl_canvas_gesture_recognizer_recognize(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Touch *event) { Eina_Position2D start = efl_gesture_touch_start_point_get(event); - Eina_Position2D cur = efl_gesture_touch_cur_point_get(event); + Eina_Position2D cur = efl_gesture_touch_current_point_get(event); switch (efl_gesture_touch_state_get(event)) { case EFL_GESTURE_TOUCH_STATE_BEGIN: |