Commit Graph

28 Commits

Author SHA1 Message Date
Mike Blumenkrantz 5ffa495a1b efl/gesture: use array instead of list for garbage gesture objects
this is always a full iteration so we don't actually need a list

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11241
2020-02-05 10:10:56 +01:00
Mike Blumenkrantz 02b721078a efl/gesture: fix gesture object cleanup when unregistering a recognizer
these objects need to be cleaned up immediately outside of event
processing to avoid having them automatically deleted later on and
triggering a double delete

Differential Revision: https://phab.enlightenment.org/D11240
2020-02-05 10:10:54 +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 2c8d7aa7c0 efl/gesture: break out gesture processing code into separate function
this will get reused shortly

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11222
2020-02-05 10:10:46 +01:00
Mike Blumenkrantz f9dacb5811 efl/gesture: remove manager's recognizer_get method
this exposes internal objects that we shouldn't be exposing

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11221
2020-02-05 10:10:43 +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 54cb6e04d2 efl/gesture: add an event to notify when a config value has been changed
recognizers should be storing config values internally to avoid overhead
of multiple eo/hash lookups on every event

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11174
2020-02-05 10:10:08 +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 e41434d96d efl/gesture: redo (and make stupider) hash usage in gesture manager
this rewrites the gesture event dispatcher to use a hash of hashes for
tracking which events are being watched on a given object to avoid:
* dispatching n gesture events per object to each callback, where n is the
  number of gesture callbacks for any given type
* removing all gesture callbacks when only one callback is removed

this is not smart code. it should be improved at some time, but that time
is not now.

Differential Revision: https://phab.enlightenment.org/D11144
2020-02-05 10:09:05 +01:00
Mike Blumenkrantz 38641ecd9b efl/gesture: add touch_count property for gesture event info
this allows us to provide the number of touch points active in any gesture
so we can detect e.g., double-tap with two fingers

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11126
2020-02-05 10:09:03 +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 17c6743180 efl/gesture: do not emit events for canceled gestures with no state
for non-continuing gestures which have been canceled at this point, we must
not emit events in order to avoid sending useless events which serve no
purpose other than to waste cpu cycles

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11027
2020-01-30 17:06:24 +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 fc456d2b77 gesture_manager: Changed function param to reduce internal function calls.
The filter_event function calling a lot of times when it runs.

This can help performance by reducing the number of calls to the efl_data_scope_get() function.

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10437
2019-12-03 09:53:37 +01:00
Marcel Hollerbach 3838112294 Revert "gesture_manager: Changed function param to reduce internal function calls."
This has still open review comments, lets solve them, and *then* land
it.

This reverts commit 2f41f867ae.
2019-11-27 15:54:57 +01:00
Woochanlee 2f41f867ae gesture_manager: Changed function param to reduce internal function calls.
Summary:
The filter_event function calling a lot of times when it runs.

This can help performance by reducing the number of calls to the efl_data_scope_get() function.

Reviewers: Hermet, smohanty, bu5hm4n

Reviewed By: Hermet

Subscribers: zmike, bu5hm4n, q66, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10437
2019-11-27 14:28:48 +09:00
Woochanlee 484a482942 gesture_manager: Deleted function and definition that are no more use.
Summary:
D7762

Searching for event what is using in gesture manager.
But the value was wrong.

And now D10437 made it better.

Reviewers: Hermet, smohanty, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10438
2019-10-17 10:41:15 -04:00
Marcel Hollerbach f77bc6957c efl_input_pointer: rename tool to touch_id
tool was not very helpfull, and additionally, the docuemtnation of it
was completly wrong. After searching through the code where tool was
actaully set (efl_ui_win.c) it turned out that it is actaully the "id"
of the pointer when there are multiple touch events.

ref T7963

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9135
2019-06-20 17:14:54 +02:00
Woochanlee 7ecc1815ba efl_gesture_manager: Delete type property.
Summary:
User already know the gesture type.
And the gesture type(Efl.Event.Description) can't using after binding.

T7959

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7959

Differential Revision: https://phab.enlightenment.org/D9033
2019-06-05 20:31:41 +09: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
Derek Foreman d47688ba27 gesture_manager: Filter events we add hooks for
Gesture manager doesn't care about focus manager events, animation events,
and various other things it's currently hooking.

We can save a lot of pointer indirection nonsense by only paying attention
to events it can actually do something with.

Differential Revision: https://phab.enlightenment.org/D7764

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2019-01-25 13:00:43 -06:00
Derek Foreman 41a9e1c873 gesture_manager: Use private data getter to save some lookups
We frequently process an array of several events at once, so we can now
look up the gesture manager private data once for the entire array.

Differential Revision: https://phab.enlightenment.org/D7763

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2019-01-25 13:00:43 -06:00
Derek Foreman 955c4bd4a0 gesture_manager: Add a call to get private data
We end up looking this up multiple times, having a getter will sometimes
allow us to get it and use it multiple times.

Differential Revision: https://phab.enlightenment.org/D7762

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2019-01-25 13:00:43 -06:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Cedric Bail 53378d6a6b evas: the life cycle of an object inside an hash can not rely on the parent destroying, use ref/unref properly. 2018-04-05 11:52:12 -07:00
Carsten Haitzler 2fb5cc3ad0 efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad and
168849e8a0
2018-03-29 13:30:55 +09:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Mike Blumenkrantz bbbdfbecc4 Efl.Gesture: rename to Efl.Canvas.Gesture
most C api remains unchanged

ref T6714
ref T6716
2018-02-21 14:43:37 -05:00