Commit Graph

18 Commits

Author SHA1 Message Date
Mike Blumenkrantz e1b7020633 efl/gesture: correctly filter tap events based on the processing touch point
if the recognizer is processing using a touch point other than the first finger,
e.g., in the case where multiple fingers are pressed simultaneously, then
the recognizer needs to also detect distance based on that finger

more fixes for triggering tap events while fingers are moving

Differential Revision: https://phab.enlightenment.org/D11385
2020-03-03 10:54:31 +01:00
Mike Blumenkrantz 93abc9cbeb efl/gesture: rework custom gesture recognizer methodology
this needs to return the actual gesture class type so that custom gesture
events can implement their own properties if necessary

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11322
2020-02-14 09:21:15 +01:00
Mike Blumenkrantz f5273decbb efl/gesture: remove bespoke recognizer properties for tap timeout
this should all be managed by efl.config

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11320
2020-02-14 09:21:09 +01:00
Mike Blumenkrantz f145b53892 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
2020-02-14 09:21:03 +01:00
Mike Blumenkrantz 3d858f3948 efl/gesture: fix tap gesture type naming
we use c_enum_naming_style in our enums, not cSharpEnumNamingStyle

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11275
2020-02-14 09:20:48 +01:00
Mike Blumenkrantz a136ab2e00 efl/gesture: remove gesture_touch::multi_touch
this is redundant now that touch_count exists

ref T8554

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11274
2020-02-14 09:20:45 +01:00
Mike Blumenkrantz 28b7ea6f0c efl/gesture: rework gesture_recognizer::add to be a 'type' property
this simplifies (and optimizes) a bunch of code by letting gesture recognizers
return directly the type of gesture they recognize for use internally

ref T8503

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11267
2020-02-14 09:20:42 +01:00
Mike Blumenkrantz 0f2a61b5f2 efl/gesture: move manager's recognizer cleanup function to eo
this is needed by recognizers which use timers in order to do timeouts
on gestures

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11245
2020-02-14 09:20:18 +01:00
Mike Blumenkrantz ca2cc5915d efl/gesture: implement custom gesture recognizer framework
this adds support for creating custom (out of tree) gesture recognizers by
adding an abstract recognizer class that can be inherited and reused

docs TBA

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11223
2020-02-05 10:10:49 +01:00
Mike Blumenkrantz 3612467c4f efl/gesture: avoid direct double access in structs
this is functionally wrong (the comparison fails) and also causes SIGBUS on
arm

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11198
2020-02-05 10:10:27 +01:00
Mike Blumenkrantz 9691299c34 efl/gesture: remove 'manager' member from recognizer data struct
this can be fetched using efl_provider_find from the recognizer

ref T8503

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11177
2020-02-05 10:10:18 +01:00
Mike Blumenkrantz 7444007fe7 efl/gesture: remove 'config' property from recognizers
this is a manager functionality, and recognizers are always child objects of
managers

ref T8503

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11176
2020-02-05 10:10:14 +01:00
Mike Blumenkrantz 89e8cb912c efl/gesture: move finger_size into private structs of recognizers
we must write these recognizers using publicly available apis to ensure
that we don't accidentally start using private struct data

this requires a lot of changes to properly manage the config value for finger
size and update the recognizer data when changed (which external recognizers
will need to monitor an event to achieve) and then also to change some
recognizers so they don't use memset and unset the finger_size value

ref TT8503

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11173
2020-02-05 10:10:05 +01:00
Mike Blumenkrantz a1222c7d60 efl/gesture: correct config value name for glayer_double_tap_timeout
typo--

Reviewed-by: Hermet Park <<hermetpark@gmail.com>>
Differential Revision: https://phab.enlightenment.org/D11155
2020-02-05 10:09:42 +01:00
Mike Blumenkrantz 15527dbecb efl/gesture: handle multi-touch press for tap gestures
any time multiple fingers are pressed down at the same time, we should
treat this as a single gesture like if only one finger was pressed

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11086
2020-02-05 10:08:51 +01:00
Mike Blumenkrantz f1bbd2bcab efl/gesture: formatting
some parts of this were entirely unreadable due to mixed tabs/spaces and other
bizarre formatting issues which somehow made it into the tree

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11053
2020-01-30 17:06:33 +01:00
Mike Blumenkrantz 227483e079 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
2020-01-07 16:08:23 +01:00
Woochanlee 54175998d5 Gesture Manager: Add gestures and fix gesture managing, recognizer logic.
Summary:
https://phab.enlightenment.org/T7544

Provides a way for a user to get a gesture manager, recognizer instance.

Supports different recognizer properties for each target(Eo).

Gesture, Touch Class Life-cycle re-implementation. for supporting multiple touches.

Add below gestures.
efl_canvas_gesture_tap
efl_canvas_gesture_double_tap
efl_canvas_gesture_triple_tap
efl_canvas_gesture_long_tap
efl_canvas_gesture_momentum
efl_canvas_gesture_zoom
efl_canvas_gesture_flick

Test Plan:
Simple test -> test_gesture_framework.c
More test cases will upload.

Reviewers: woohyun, smohanty, segfaultxavi, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: Jaehyun_Cho, segfaultxavi, cedric

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D7579
2019-05-14 16:37:20 +09:00