Commit Graph

43 Commits

Author SHA1 Message Date
Cedric Bail 7dc98ab3d0 evas: move efl_input_device into evas/Efl_Canvas.h
Summary:
The internal and the API we would like is mostly a canvas API. A lot of the code
in evas is working around the fact that efl_input_device is not defined inside Evas.
This patch is the first step to try to clean this up.

Depends on D10487

Reviewers: zmike, raster, bu5hm4n, Hermet

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8321

Differential Revision: https://phab.enlightenment.org/D10488
2019-10-31 13:29:56 -04:00
Marcel Hollerbach 3b2a5a429b efl_input: remove the API of efl_input_instance_get
there is basically no reason for this API. You can only use the API when
you know the class, when you know the class you can also just know the
function to call to get this API.
The reason this API needs to go is that we don't want to use
polymorphism on class-functions.

ref T7675

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7900
2019-02-13 16:59:57 +01:00
Marcel Hollerbach 70ab165a6d evas_focus: adjust to recent EFL_EVENT_DEL changes
Summary:
when focus events have been emitted the smart parent was persistent, now
its not anymore, lets restore this behaviour

Depends on D6227

Reviewers: cedric, zmike, stefan_schmidt

Subscribers: #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6228
2018-05-29 12:24:53 -04:00
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
Marcel Hollerbach cfc66c08a1 evas: error out when there appeared a object while a new one is focused
Summary:
this is on the one side error prone and race, as reacting to a focus out
with a new focused object leads to weird cases. On the other side we are
then using eina hash wrong which leads to later weirdness as the element
that is assosiated with &key is broken.

Reviewers: raster, zmike, stefan_schmidt, cedric

Reviewed By: zmike

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6158
2018-05-15 09:32:20 -04:00
Marcel Hollerbach dda350e3b4 evas: introduce a log domain to monitor which object gets focus 2018-05-10 13:34:32 +02: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
Marcel Hollerbach 935722aac1 evas_focus: skip focus set if the focus state is the same 2017-09-30 20:29:07 +02: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
Carsten Haitzler 3826f21a29 evas seat focus add - handle other case where layer may be null
fix CID 1377522
2017-07-23 19:30:31 +09:00
Jean-Philippe Andre bbfdf8909b evas focus: Fix crash when shutting down with errors
Example test: add many evas_object_ref() to a window and click
on its X to close it.
2017-07-20 14:46:49 +09:00
Mike Blumenkrantz 4921d26fc8 evas: add seat-based focus interceptor
@feature
2017-06-16 12:23:07 -04:00
Cedric BAIL cbfad5760d Revert "Revert "evas: put events related pointer into a cow to reduce evas_object fat.""
This reverts commit f9d3219c17.
2017-06-14 09:36:22 -07:00
Carsten Haitzler f9d3219c17 Revert "evas: put events related pointer into a cow to reduce evas_object fat."
This reverts commit f69686ba40.

this causes major crashes in e every time you move and resize a
window. i cant even debug it properly because i cant move or resize
windows to get terminals up to debug it... this is bad... so until a
fix is found better to go back to working...
2017-06-13 11:08:55 +09:00
Cedric Bail f69686ba40 evas: put events related pointer into a cow to reduce evas_object fat. 2017-06-12 11:41:25 -07:00
Jean-Philippe Andre e8f9f109a6 evas: Rename device Class to Type, remove Sub_Class
1. The word "class" is a pain point with many languages where
   it's a keyword. Type is a little better. Also, the property
   was already named "device_type" and not "device_class".

2. Remove Efl.Input.Device.Sub_Class
   It's not used inside EFL upstream codebase, and unlikely to
   be used anywhere else (even in Tizen).

Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.

Ref T5540
2017-06-12 15:21:55 +09:00
Mike Blumenkrantz 839e45e49b evas: handle focus setting with async input init
@fix
2017-06-09 19:14:59 -04: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 05cc5ab940 evas: Avoid useless calls to eo_data_scope_get
Use an internal variant of the function for evas when we already
have the protected data pointer.
2017-02-21 10:52:39 +09:00
Jean-Philippe Andre 54e5841b2f evas: Re-fix post-event cb by supporting recursion
The previous patch (b184874fa5) was preventing
post-event callbacks from triggering any form of input event,
including side-effects due to mouse,in. In fact by tracking
which exact events we want to post-process we can support
proper recursion. This fixes crashes in Bryce.

I'm not changing the documentation as this is still a dubious
code design.

Fixes T3144
Fixes T5157
2017-02-16 19:51:06 +09:00
Guilherme Iscaro 194d6b2f9b Evas Canvas: Remove focused_objects property.
Summary:
This property is not needed and it will only increase the API size.
One can simple achieve the same behaviour by simple doing:

//C code...

Eina_List *l;
Evas_Device *dev;

devices = evas_device_list(evas, NULL);

EINA_LIST_FOREACH(devices, l, dev)
{
   Evas_Object *obj;

   if (evas_device_class_get(dev) != EVAS_DEVICE_CLASS_SEAT)
      continue;
   obj = evas_canvas_seat_focus_get(dev);
   //Do something with the focused object.....
}
//More C code...

Reviewers: bdilly, barbieri, conr2d, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4547
2017-01-04 15:30:21 +09:00
Guilherme Iscaro 9609dd7e0f Evas: Objects must not be focused with the seat is not allowed to emit events.
Seats that are not allowed to emit events must not be able to focus objects.
2016-12-12 14:59:22 -02:00
Guilherme Iscaro 6572ad9e02 Efl.Canvas.Object: Remove focus,in/out events.
Since this object already inherist Efl.Input.Interface there's no need
to have those events reimplemented.
2016-11-24 19:18:47 -02:00
Guilherme Iscaro b77f0086f5 Efl.Canvas: Use Efl.Input.Focus as event info for object,focus.in/out. 2016-11-24 19:18:47 -02:00
Guilherme Iscaro 883d41f006 evas focus: Do not allow two objects focused by the same seat.
Summary:
Before focusing an object, the intercept focus callback
is called. This callback may ask Evas to focus another object
instead, so it's necessary to check if the seat in question still
have a focused object event after a efl_canvas_object_seat_focus_del() call.

Reviewers: cedric, bdilly, barbieri, ProhtMeyhet, netstar

Subscribers: cedric, jpeg

Maniphest Tasks: T4864, T4886

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-14 10:24:57 -08:00
Cedric Bail 99b327598e evas: protect against wrong request to default seat.
Enlightenment kept crashing without this patch.
2016-11-12 13:56:24 -08:00
Guilherme Iscaro 0e53b9a8ac Evas: Add support for multiple focused objects.
Using the multi-seat support, Evas is able to handle multiple focused objects.
This implementation allows one focused object per seat.
This patch introduces new APIs and events to handle this new scenario,
while keeping compatible with the old focus APIs.
2016-11-08 17:54:34 -02:00
Jean-Philippe Andre 39949b022d evas: Add pseudo-internal API to intercept basic calls
This is a poor man's solution to get rid of group functions such
as clip_set, clip_unset, color_set, etc... See the following
commits.

This API needs to be EAPI for elementary but shouldn't be used
outside EFL. This is required purely for legacy compatibility.

Here's the call flow, inside show(obj):
1. if (intercept_show(obj)) return;
2. show(super(obj));
3. do other stuff
2016-10-12 11:25:55 +09:00
Jean-Philippe Andre 443aa91d53 evas: Simplify internal evas_object_event_callback_call
This removes the distinction between legacy and new eo style
event info, since all those types have now been ported to eo.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 608da26634 evas events: Simplify event counter
Simplify code:
 _evas_object_event_new()
 event_id = _evas_event_counter

Into:
  event_id = _evas_object_event_new()
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Jean-Philippe Andre e2eebc1221 Evas: Rename object focus to key_focus
The evas focus concept is valid and applies only to the
keyboard inputs.
2016-06-17 11:37:39 +09:00
Jean-Philippe Andre 0505a729e2 Evas: Simplify eo event mechanism
So, I was stupid. I was relying on legacy callbacks to
trigger eo events, which means that only when a legacy
callback was registered would my new eo events be triggered.

Instead, I can pass the eo event desc & info whenever
calling evas_object_event_callback_call().
2016-06-02 14:19:18 +09:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
Daniel Zaoui 103e89a04a Eolian: Integration of Evas 2014-03-12 10:57:28 +02:00
Daniel Zaoui f22bd9e6ee Eolian: Integration of Evas Object.
const have been added in object parameter of two legacy APIs to fit
Eolian generated files.
Since these functions retrieve information from object, it is logic that
the object would be const.
2014-03-12 10:57:28 +02:00
Cedric Bail 7396dc2d89 evas: simplify logic and API signature, thanks k-s. 2013-09-03 11:08:12 +09:00
Cedric Bail a007a3af13 evas: focus_set can fail... internally handle that case properly now. 2013-09-02 20:28:51 +09:00
Cedric Bail 1ac1db596f evas: add interceptor for focus_set. 2013-08-29 11:21:20 +09:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Daniel Juyung Seo ae08c6e721 evas evas_focus.c: simplified the source. 2013-03-10 00:40:33 +09:00
Vincent Torri c15e9c6575 merge: and now Evas
I've tested make -j 3 install and it works nicely

I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.

TODO: examples and tests, I'll add them later

ISSUE: Eina_Unicode size check. It indirectly depends on
       eina_config.h, which is created at the end of the
       configure script. So its size is always 0. I don't
       know how that size is used, so I can't do a lot,
       for now.


SVN revision: 78895
2012-11-04 11:51:42 +00:00