Commit Graph

20 Commits

Author SHA1 Message Date
Cedric BAIL fe14abd929 evas: refactor efl_input_event and remove some of the lifecycle hack.
Differential Revision: https://phab.enlightenment.org/D6101
2018-05-24 16:02:18 -07: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 bc18b7e7ad efl: replace efl_del with efl_unref for cases where no parent exists
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:57 -07:00
Amitesh Singh 196b6f1ba4 interface: rename Efl.Dup to Efl.Duplicate.
dup is considered too short and maybe confusing,
hence rename it to duplicate instead.
2017-12-11 15:25:31 +09:00
Jean-Philippe Andre bd5b76508b efl: Introduce interface Efl.Dup
A few classes allow their objects to be duplicated, so they should all
use the same interface.

Also, rename VG's dup to copy_from as it's not conforming to the
definition of dup.
2017-11-30 10:48:24 +09:00
Jean-Philippe Andre f7a7a29cc0 evas: Give a parent to duplicated event objects
This comes back to an earlier situation where the fake event objects
created by efl_input_dup() had a parent (it should be the evas or maybe
the window). But that led to issues as efl_unref() would print error
messages. Using efl_allow_parent_unref_set() we hide the error message,
because in this situation we want the caller to use efl_unref() and not
efl_del() (eg. think of bindings...).

See d3436af616
See 6bed255fc4
See 96d94e0076 <-- main commit
2017-09-28 16:45:45 +09:00
Jean-Philippe Andre 96d94e0076 evas: Fix dangling references with input devices
This solves issues with efl_input_dup() which didn't properly give a
reference to the caller, resulting in dangling eo ids.

Note: This may trigger leaks (instead of invalid refs), but this now
actually reflects the meaning of @owned. This should work with bindings
and C API users should know to call efl_unref().

This patch is the reason for the previous improvements on eo_debug.

@fix
2017-09-28 12:30:36 +09:00
Jean-Philippe Andre 6329111385 evas: Set locks and modifiers for all input events
See also eb27724eb9 which didn't fix
the reported issue. Not quite sure yet how to implement those
lock & modifiers for fake events (i.e. artificially created
by the app itself).

Fixes T5510
2017-06-07 15:25:01 +09:00
Jean-Philippe Andre de4627030a evas: Make Efl.Input.Event.instance_get internal
Same as the previous patch. This removes the definition from
the EO file, implementing the feature in C.
2017-05-19 14:06:59 +09:00
Jean-Philippe Andre 60444d681e evas: Make Efl.Input.Event.legacy_info.get internal
This removes the function from the EO file by using EXTRA_OPS
as introduced in 53fef30db0.
2017-05-19 14:06:59 +09:00
Jean-Philippe Andre 01d4886328 evas: Add seat arg to modifier/lock EO APIs
This now matches the new seat-related set of APIs present as EAPI.
2017-05-16 20:47:49 +09:00
Jean-Philippe Andre 054aa012c4 evas: Use enum instead of string in Efl.Input.State
Ref T5312
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre 4b09ad7d6b evas: Fix event propagation in elm_widget
See the previous commit. efl_provider_find() could not
find a canvas because the event object had no parent.

This restores the slider in E's sound mixer.

Note: Input events may expose the evas canvas object
because of parenting. This will eventually need fixing,
as only efl.ui.win should be exposed.

If 8ff2dffe7c7a21278dis backported to 1.19 then this patch
also needs to be merged as well.
2017-04-12 20:28:20 +09:00
Jean-Philippe Andre 8ff2dffe7c evas/elm: Fix bad propagation of ON_HOLD flag
Test scenario:
  elementary_test -to "ExtScroller"

Try and modify a slider's value with the mouse wheel. Bad things
were happenning, as the flag ON_HOLD was not properly propagated
from the slider to the scroller. This is because the legacy
event_info structure inside the eo event info was not updated
with the new flag value.

By introducing a new EO only API, which is meant to remain
internal, we can use a single legacy info structure, fixing
this issue.

Note: In the future this API needs to be internal, not protected.

@fix
2017-04-12 18:43:15 +09:00
Guilherme Iscaro 345fec2747 Efl.Input: Properly unref the device if a new device is set.
The old device must be unrefed, otherwise it will leak.
2016-12-02 15:12:56 -02:00
Guilherme Iscaro 826cd7cb5e Efl.Input: Reset the Efl.Input object as soon as possible.
By doing this the pd->device reference is unrefed and deleted
if no one else is holding a reference to it.
2016-12-02 15:12:56 -02:00
Guilherme Iscaro c3ed1d3154 Evas: Add support for per seat modifiers and locks.
This patch introduces possibility to enable key locks and modifers by seat.
It's very useful when the user has two keyboards attached to different seats.
2016-12-02 09:57:50 -02:00
Guilherme Iscaro 6d668f011c Efl Input Key: Increment/Decrement the device reference. 2016-11-08 17:54:34 -02:00
Carsten Haitzler 860e0d34b0 obj caching - add a reuse in key event objects too to nuke leaks
new leak since sink was added.
2016-10-28 22:58:36 +09:00
Jean-Philippe Andre d504284dd2 efl: Rename Efl.Event.XX to Efl.Input.XX
This removes:
 Efl.Event interface

And renames:
 Efl.Event.Input -> Efl.Input.Event
 Efl.Event -> Efl.Input.Event (merged)
 Efl.Event.Pointer -> Efl.Input.Pointer
 Efl.Event.Key -> Efl.Input.Key
 Efl.Event.Hold -> Efl.Input.Hold

This also moves some interfaces from efl/ to evas/ where they
belong better.

This allows renaming Eo_Event to Efl_Event.
2016-08-26 10:18:01 +09:00