Commit Graph

130 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 0363fd8238 evas: Rename EAPI macro to EVAS_API in Evas library
Summary:
Patch from a series of patches to rename EAPI symbols to specific
library DSOs.

=  The Rationale =

This patch is from a series of patches to rename EAPI symbols to
specific library DSOs.

EAPI was designed to be able to pass
`__attribute__ ((visibility ("default")))` for symbols with
GCC, which would mean that even if -fvisibility=hidden was used
when compiling the library, the needed symbols would get exported.

MSVC __almost__ works like GCC (or mingw) in which you can
declare everything as export and it will just work (slower, but
it will work). But there's a caveat: global variables will not
work the same way for MSVC, but works for mingw and GCC.

For global variables (as opposed to functions), MSVC requires
correct DSO visibility for MSVC: instead of declaring a symbol as
export for everything, you need to declare it as import when
importing from another DSO and export when defining it locally.

With current EAPI definitions, we get the following example
working in mingw and MSVC (observe it doesn't define any global
variables as exported symbols).

Example 1:
dll1:
```
EAPI void foo(void);

EAPI void bar()
{
  foo();
}
```
dll2:
```
EAPI void foo()
{
  printf ("foo\n");
}
```

This works fine with API defined as __declspec(dllexport) in both
cases and for gcc defining as
`__atttribute__((visibility("default")))`.

However, the following:
Example 2:

dll1:

```
EAPI extern int foo;
EAPI void foobar(void);

EAPI void bar()
{
  foo = 5;
  foobar();
}
```

dll2:

```
EAPI int foo = 0;
EAPI void foobar()
{
  printf ("foo %d\n", foo);
}
```

This will work on mingw but will not work for MSVC. And that's why
LIBAPI is the only solution that works for MSVC.

Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com>
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev>

Reviewers: vtorri, woohyun, jptiz, lucas

Reviewed By: vtorri, lucas

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12214
2020-12-15 23:06:12 -03:00
Vincent Torri 86f1e6a00c evas: gesture_manager: fix usage of long on Windows
On Windows 64bits, long is a 4 bytes type. Declare count as being a intptr_t instead of long

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11836
2020-05-19 13:58:59 +02:00
Mike Blumenkrantz 235ba0e407 evas: resolve float compare warnings
Summary: Depends on D11792

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11793
2020-05-12 16:10:02 +02:00
Daniel Kolesa 7791d9fac6 remove unused imports in eo/eot files 2020-04-19 01:44:50 +02:00
Mike Blumenkrantz 907a2fb640 efl/gesture: remove duplicated line
Summary: this was somehow duplicated

Reviewers: CHAN, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11503
2020-03-13 09:08:25 -04:00
Mike Blumenkrantz 35727d29c3 efl/gesture: add fallback for glayer_tap_finger_size not being found
just in case

Differential Revision: https://phab.enlightenment.org/D11494
2020-03-12 18:05:02 +01:00
Woochanlee b319f15c99 efl_gesture_manager: Fix incorrect override system config value.
Summary:
The glayer_tap_finger_size can get diffrent value on each profile.
Need to get system config value and will set it for gesture manager.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11485
2020-03-12 09:09:35 -04:00
Mike Blumenkrantz 710c05ed5a efl/gesture: deduplicate some code
also remove a misleading comment

no functional changes

Differential Revision: https://phab.enlightenment.org/D11395
2020-03-03 10:54:39 +01:00
Mike Blumenkrantz 613cd9f812 efl/gesture: fix flick internal touch id tracking
need to always make sure we set this when a gesture is being tracked so
we know which touch point we're watching

Differential Revision: https://phab.enlightenment.org/D11387
2020-03-03 10:54:33 +01:00
Mike Blumenkrantz 322fdba5f0 efl/gesture: fix momentum gesture recognizer to properly continue its gestures
it's not enough to just check the value for this in the recognizer; we need to
always modify the recognizer property here to correctly manage object lifetimes
and generate the correct events (e.g., not emitting momentum gestures while
multiple fingers are moving simultaneously)

also update a couple existing unit test checks which were wrong

Differential Revision: https://phab.enlightenment.org/D11386
2020-03-03 10:54:32 +01:00
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 3603884e51 efl/gesture: fix internal gesture object management
when a gesture ends and is not set to continue, the gesture object must
be preserved until the entire touch sequence ends in order to ensure that
all the touch point states are accurately detected and updated and so
additional instances of that gesture are not accidentally triggered

this fixes weird corner cases where you could tap with two fingers and
then get a long press event while dragging the second finger around as
long as you did it quickly enough

Differential Revision: https://phab.enlightenment.org/D11384
2020-03-03 10:54:29 +01:00
Mike Blumenkrantz d300e90d39 efl/gesture: port 'rotate' gesture from elm to new gesture framework
this is a 1:1 port with minimal changes other than what's necessary to
integrate into the new framework

Differential Revision: https://phab.enlightenment.org/D11383
2020-03-03 10:54:28 +01:00
Mike Blumenkrantz 830cdcf7ea efl/gesture: move some internal recognizer functions to be reusable
no functional changes

Differential Revision: https://phab.enlightenment.org/D11382
2020-03-03 10:54:27 +01:00
Mike Blumenkrantz 641c9427ef efl/gesture: rename long_tap -> long_press
this is consistent with the rest of efl naming

ref T8503

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11376
2020-03-03 10:54:26 +01:00
Mike Blumenkrantz e54454b986 efl/gesture: remove empty efl.object implementations from gesture objects
these are no longer needed

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11354
2020-03-03 10:54:23 +01:00
Mike Blumenkrantz 25d96317c0 efl/gesture: remove 'type' member from Efl_Canvas_Gesture_Data
this is no longer used

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11353
2020-03-03 10:54:20 +01:00
Marcel Hollerbach 0c313f89b0 efl_canvas_gesture: replace parse with import
we probebly want to use import here, as we want to rebuild this file
when efl_canvas_gesture_events is changed.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11273
2020-02-14 09:44:27 +01:00
Mike Blumenkrantz f5c4c4ee15 efl/gesture: remove Efl.Canvas.Gesture_Recognizer_Type
this serves no purpose and isn't used anywhere

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11323
2020-02-14 09:21:19 +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 f917f75c56 efl/gesture: improve docs
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11321
2020-02-14 09:21:12 +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 61b5131393 efl/gesture: un-@protected efl.canvas.gesture_recognizer::continues
recognizers need to be able to get and set this appropriately

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11319
2020-02-14 09:21:06 +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 77b6d0efd7 efl/gesture: fix long tap timeout errors
this is the timer pointer, and we need to be able to delete the timer when
the gesture ends

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11299
2020-02-14 09:21:00 +01:00
Mike Blumenkrantz 9e53d9c017 efl/gesture: fix touch state tracking
correctly set 'pressed' member of touch data only on press events and
don't change it on move events in order to avoid having mismatched states

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11291
2020-02-14 09:20:54 +01:00
Mike Blumenkrantz edcc16238b efl/gesture: remove recognizer::reset method
this wasn't used and doesn't seem necessary

ref T8503

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11279
2020-02-14 09:20:51 +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 23f772b434 efl/gesture: use new config value for thumbscroll friction
the old one used here is marked deprecated

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11263
2020-02-14 09:20:39 +01:00
Mike Blumenkrantz 151ec0748a efl/config: merge all gesture manager config code into efl.config
this is all just duplicated code, so we can deduplicate it with minimal
effort to clean up the api

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11251
2020-02-14 09:20:30 +01:00
Mike Blumenkrantz 7da4ab3633 efl/gesture: remove manager config
we can just use efl.config here instead of duplicating it

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11248
2020-02-14 09:20:24 +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 27a7924ec6 efl/gesture: remove unused manager function
no functional changes

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D11244
2020-02-05 10:11:05 +01:00
Mike Blumenkrantz e002305e4b efl/gesture: free object gesture list in destructor
leak--

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11242
2020-02-05 10:10:59 +01:00
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 1320156e03 efl/gesture: conditionally ignore multi-touch unpress events in zoom recognizer
if we have not begun to process a zoom gesture by this point, then we should
not be emitting a cancel result

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11208
2020-02-05 10:10:37 +01:00
Mike Blumenkrantz d62e3f97ad efl/gesture: ignore successive press events in zoom recognizer when canceled
cancel is used to indicate that a gesture which has begun to trigger has been
canceled, so if we have already canceled then we should not re-cancel here

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11207
2020-02-05 10:10:34 +01:00
Mike Blumenkrantz c8ff8b1706 efl/gesture: ignore multi-touch end events in tap gesture recognizer
we only care about the last touch unpress event, so we should be ignoring
every other event instead of canceling, as we are also ignoring the
multi-touch press events

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11206
2020-02-05 10:10:31 +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 17995ee710 efl/gesture: reorder gesture private structs
order based on descending member size

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11197
2020-02-05 10:10:24 +01:00
Mike Blumenkrantz a29a59fa64 efl/gesture: remove 'gesture' member from recognizer data struct
this was never used

ref T8503

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11178
2020-02-05 10:10:21 +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 159b73c0d8 efl/gesture: expose 'continues' as a public property for recognizers
we still access this using private data in the in-tree recognizers, but
now it's also accessible normally to custom recognizers

ref T8503

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11175
2020-02-05 10:10:11 +01:00