From: Enlightenment S. <no-...@en...> - 2011-10-25 09:51:40
|
Log: Elm glayer: Added momentum to continues-gestures. Womentum is now aborted and resarted as the number of fingers changes. Signed-off-by: Aharon Hillel <a.h...@pa...> Author: tasn Date: 2011-10-25 02:51:34 -0700 (Tue, 25 Oct 2011) New Revision: 64380 Trac: http://trac.enlightenment.org/e/changeset/64380 Modified: trunk/elementary/src/lib/elm_gesture_layer.c Modified: trunk/elementary/src/lib/elm_gesture_layer.c =================================================================== --- trunk/elementary/src/lib/elm_gesture_layer.c 2011-10-25 09:51:30 UTC (rev 64379) +++ trunk/elementary/src/lib/elm_gesture_layer.c 2011-10-25 09:51:34 UTC (rev 64380) @@ -3011,8 +3011,18 @@ /* Run through events to restart gestures */ Gesture_Info *g; - Eina_Bool n_lines, n_flicks, zoom, rotate; + Eina_Bool n_momentum, n_lines, n_flicks, zoom, rotate; /* We turn-on flag for finished, aborted, not-started gestures */ + g = wd->gesture[ELM_GESTURE_MOMENTUM]; + n_momentum = (g) ? ((states_reset) | ((g->state != ELM_GESTURE_STATE_START) + && (g->state != ELM_GESTURE_STATE_MOVE))) : EINA_FALSE; + if (n_momentum) + { + _momentum_test_reset(wd->gesture[ELM_GESTURE_MOMENTUM]); + _set_state(g, ELM_GESTURE_STATE_UNDEFINED, NULL, EINA_FALSE); + SET_TEST_BIT(g); + } + g = wd->gesture[ELM_GESTURE_N_LINES]; n_lines = (g) ? ((states_reset) | ((g->state != ELM_GESTURE_STATE_START) && (g->state != ELM_GESTURE_STATE_MOVE))) : EINA_FALSE; |