Commit Graph

40 Commits

Author SHA1 Message Date
Carsten Haitzler c5a5302e06 evas - handle devices that on deletion delete other devices on shutdown
this fixes a whole bunch of warnings that just recently turned up...
2017-07-31 15:07:28 +09:00
Mike Blumenkrantz 6dc937d26c Revert "evas: Fix use of invalid EO object"
This reverts commit 9b1e785f8e.

this breaks devices with vt switching under drm
2017-07-28 15:40:47 -04:00
Mike Blumenkrantz cad9d8fb55 evas: store current pointer state to dummy seat data if seat detaches
ensure the pointer state is maintained when devices are removed and added
2017-06-16 12:23:08 -04:00
Mike Blumenkrantz e3126bd23f evas: create dummy seat data for wl/drm outputs, store some pointer data
with async device init, it's possible for mouse in/out/move events to be added
by an application before the pointer devices are created. these are independent
of devices, so store the state and apply when pointer devices are added

fix T5531
2017-06-16 12:23:08 -04:00
Mike Blumenkrantz abe4c8d772 evas: only feed canvas out/in when changing default pointer if pointer is in
ref 6775b23212
2017-06-16 12:23:07 -04:00
Jean-Philippe Andre 4eb13031ee evas: Disable calls to evas_device_class_set
After finalize, the type of an input device can not be changed.
So, deprecate the function and prevent anything from happening
unless we're inside efl_add().

Ref T5515
2017-06-15 09:58:40 +09:00
Jean-Philippe Andre 9b1e785f8e evas: Fix use of invalid EO object
During a window destruction, the input devices are deleted and
removed from the internal devices list. Since 83d18617b4
basic devices are children of a seat, which means that the seat
deletion was triggering the devices deletion as well. As a
consequence, we were walking an invalid list of devices.

I'm not sure we should have a list of children in the device
data and I'm also not sure we should have a list of devices in
evas, instead of just the list of seats. It's a bit messy right
now.

Ref T5540
2017-06-12 17:41:45 +09:00
Jean-Philippe Andre e8b69bed83 efl.canvas: Add "seat" (by id) and "device" (by name) properties
See d47197e65b

@feature
2017-06-12 15:21:57 +09: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
Jean-Philippe Andre 83d18617b4 evas: Remove device "parent", "name" and "description" properties
Those are now merged with Efl.Object parent, name and comment.
The reasoning is that only seats can be parent devices; And name
and description are not only name clashes but also not extremely
useful anyway.

Tested with VNC.

Fixes T5540
2017-06-12 15:17:50 +09:00
Mike Blumenkrantz 839e45e49b evas: handle focus setting with async input init
@fix
2017-06-09 19:14:59 -04:00
Mike Blumenkrantz 2a0b6ddebd evas_device: remove unused code
ref 6775b23212
2017-06-02 18:23:42 -04:00
Mike Blumenkrantz 6775b23212 evas: better handle async device creation of default mouse
instead of yolo setting the first pointer-ish device which is created,
check to see if a better match for "default mouse" can be applied

@fix
2017-05-26 16:27:43 -04:00
Mike Blumenkrantz d47197e65b evas: add evas_device_get_by_seat_id()
sometimes it may be more useful to find a device by its hw id

@feature
2017-05-19 13:17:31 -04:00
Mike Blumenkrantz 589773055a evas_device: add seat_id property, set seat id for default fallback seat
@feature
2017-05-19 12:41:16 -04:00
Jean-Philippe Andre 4fdd30bce5 evas: Silence useless WRN message on canvas del 2017-02-16 21:56:11 +09:00
Bruno Dilly 2958aba23a evas: add getter for devices by name
Make it possible to get the evas device given
its name. It sounds useful for Edje since
programs will reference seats by name.
2016-12-19 14:58:35 -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 484dae76e6 Evas: Add support for per mouse pointer mode/properties.
This patch introduces the possibility to set the pointer mode and
query other properties like current position per pointer device.
The old API will still works, however it will only act on the default seat.
2016-12-02 09:57:50 -02:00
Guilherme Iscaro 453770137f Evas: Add the default input devices for Evas.
This will be useful when Ecore_Evas is setting up the
EFL_POINTER/KEY_EVENT struct.
2016-11-08 17:54:34 -02:00
Guilherme Iscaro 402abcaefc Evas Device: Avoid invalid ptr indirection.
Summary:
When Evas is deleted the function _evas_device_cleanup() goes thru all
devices and unref them. Since Evas_Devices are Efl_Input_Device, the user
may still hold a reference to the device (efl_ref()),
thus causing the device to do not be deleted *yet*.
This causes a problem, because when the user calls efl_unref()
and the device itself is deleted the Evas _del_cb
callback will be called and will try to access the Evas_Public_Data from
a deleted object.
In order to avoid this problem all devices will be kept in the devices
list and Evas will unregister the EFL_EVENT_DEL from those devices that
were not deleted.

Reviewers: jpeg, bdilly, barbieri, cedric

Reviewed By: bdilly, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4369
2016-11-01 16:03:52 -02:00
Guilherme Iscaro 50f5704cc6 Evas_Device: Fix API name.
Summary:
It should be evas_device_add_full() in order to follow the EFL
name pattern.

Reviewers: DaveMDS, bdilly

Reviewed By: DaveMDS, bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4325
2016-09-29 17:51:15 -03:00
Guilherme Iscaro e99900bcd7 Evas_Device: Use efl_del() in evas_device_del().
The Evas_Input_Device should be have its parent set to NULL, otherwise
Eo might complain.

@fix
2016-09-26 22:06:59 -03:00
Guilherme Iscaro 72c80ca947 Evas_Device: Add a new event for added and removed devices.
This commits adds two event types for EFL_CANVAS. Every time
a device is added or removed the matching event will be emitted.
2016-09-26 22:06:59 -03:00
Guilherme Iscaro 8acb509fba Evas_Device: Add evas_device_full_add() API.
This will make it simpler to add a Evas_Device with its fields already set.
2016-09-26 22:06:59 -03:00
Guilherme Iscaro cdc5ecec1e Efl_Input_Device: Implement efl_input_device_parent_set().
This commits moves the parent_set implementation where it should be.
2016-09-26 22:06:59 -03:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Jean-Philippe Andre ce5688a388 Evas: EO-ify Evas_Device and partly move to Efl
So, this is not a very clean solution, but this mostly
makes Evas_Device an Eo object of class Efl.Input.Device.
Since evas_device relies on some Evas knowledge (evas
callbacks, canvas private data), it can't be fully moved
to lib/efl/.

Making the input device an interface rather than a class
was also not a great solution, as the goal is to share
the data structure around EFL internals (Ecore and Evas).
2016-05-31 19:03:04 +09:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01: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
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00
Daniel Zaoui 654a3f5f94 Efl: replace eo_data_get for objects data referencing. 2013-05-01 10:37:08 +03:00
Tom Hacohen 882b7a72eb Evas dev: Fixed usage of uninitialized variable. 2013-04-12 15:17:19 +01:00
Carsten Haitzler 9b0e7626f4 Add subclasses for evas device api (new in 1.8) and document the evas
device api... :)
2013-04-12 20:05:16 +09:00
Carsten Haitzler 2364f4514b evas device new/free -> add/del (new 1.8 api so no log). 2013-04-08 20:10:06 +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