Commit Graph

75 Commits

Author SHA1 Message Date
Daniel Kolesa fdd27cadf8 eo: make more freefuncs implicit 2017-09-22 16:17:19 +02:00
Jean-Philippe Andre f3eff6eb3e efl: Introduce Eina.Rect and switch EO APIs to it
It's a complex struct but defined in EO as a simple struct. ABI-wise
it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle
also work on Eina_Rect out of the box, most of the code dealing with
x,y,w,h will require no modifications either.

But Eina_Rect provides direct access to a size or position 2d component,
as well as the usual x,y,w,h. The field "rect" is provided as a
convenience for code dealing with both Eina_Rectangle and Eina_Rect. We
may or may not require it.

Note: Size2D could use unsigned values but I have spotted a few places
in the code that actually use -1 to indicate invalid size (as opposed to
0x0).

@feature
2017-09-18 13:22:52 +09:00
Daniel Kolesa a8b8b7efde eo files: first batch of @owned conversions 2017-09-15 16:44:26 +02:00
Jean-Philippe Andre 4299905996 evas: Rename calculate property to calculating
Recently introduced by @cedric
I think the name is not very clear, and is clashing with the
actual method of the same name.
2017-08-02 19:12:13 +09:00
Cedric BAIL ea5675a6a0 evas: add a way to know if we are already computing smart object calc. 2017-08-01 13:17:10 -07: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 2cdc02b03c evas: Make beta events from Evas.Canvas internal
This includes 4 events:
 - render,flush,pre
 - render,flush,post
 - axis,update
 - viewport,resize

Those were not accessible from the EO API since Evas.Canvas
isn't part of the public EO API.
2017-05-19 14:07:00 +09:00
Jean-Philippe Andre d974e708c2 evas: Remove unnecessary imports of evas_types
Ref T5312
2017-05-16 20:47:49 +09:00
Jean-Philippe Andre 4c81e0c5b9 evas: Remove Evas.Modifier from EO
Similar to the previous patch with Evas.Lock

Ref T5312
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre 83d1162171 evas: Remove Evas.Lock from EO
This is a step towards the removal of the modifier & lock API
as it is and use enums exclusively.

Ref T5312
2017-05-16 20:47:48 +09:00
Jean-Philippe Andre fd35532d9e evas: Remove evas_key_modifier_mask_get from EO
Such an ugly API. This is an API to match a string to a number,
build a bitmask from it, and then use that. The supported
strings are well known (should be enum) and would need a
recompilation (ABI update) to support anything new anyway.
2017-05-16 20:47:47 +09:00
Jean-Philippe Andre af3cb10185 evas: Remove Evas.Coord from EO
This may be a bit more controversial...
But Evas_Coord really is just an int and all the internals
of EFL assume that the base coordinate type is a 32-bit int.
So this type is a bit redondant and can't easily be changed
to, say, a float or int64.

Ref T5312
2017-05-15 17:26:42 +09:00
Jean-Philippe Andre a1abc129ec evas: Remove font_hinting from EO
We only need it in elm_config.
This removes the type Evas_Font_Hinting_Flags from EO,
as well as the functions font_hinting_set/get and
font_hinting_can_hint.

Ref T5312
2017-05-15 17:12:15 +09:00
Jean-Philippe Andre da229e34aa evas: Remove evas touch_point from EO
Note: it seems the EAPI evas_touch_point_list_xy_get() was
lst at some point, as it doesn't appear in the headers anymore.
It looks like we fail to catch an ABI break! abi_checker didn't
catch this!?

Ref T5312
2017-05-15 16:21:20 +09:00
Cedric BAIL b04f584346 evas: engine_info set/get should never show up in Eo API.
Eo API are for something we want to expose to third party application
and bindings. engine_info is exactly what we don't want to expose.
2017-04-12 15:13:19 -07: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
Daniel Kolesa 18a0183c37 evas: use new property impl syntax 2016-12-27 16:37:41 +01:00
Jean-Philippe Andre bcb251e6ab evas: Make evas object loop users
This makes efl_loop_get() work on evas objects, returning the
main loop as expected. Also make the loop a property of the
Loop_User class (shouldn't it be called Efl.Loop.User instead?)
2016-12-13 16:12:27 +09: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 1d0c0d5024 Evas: Change evas_canvas_seat_focus_get to property. 2016-11-28 13:57:55 -02:00
Guilherme Iscaro be609118c6 Ecore_Evas: Add support for per-seat focus. 2016-11-28 13:57:55 -02:00
Guilherme Iscaro c5f14a61e3 Evas: Add per seat Evas focus state. 2016-11-28 13:57:55 -02:00
Stefan Schmidt b768a365e6 docs: evas_canvas: fill gaps in evas canvas primitives eo file documentation 2016-11-15 12:00:21 +01:00
Guilherme Iscaro 17af933ae7 Evas: Change evas_canvas_default_device_get() to property.
Reviewers: barbieri, jpeg, bdilly

Reviewed By: bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4387
2016-11-09 11:24:07 -02: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
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
Daniel Kolesa 06e0473a79 evas_canvas: remove pointers 2016-11-03 17:06:28 +01:00
Jean-Philippe Andre b3993b684e win: Add EO API to query state of multi touch points
This combines evas canvas functions to list and query
touch points into a single iterator:
 - evas_touch_point_list_count
 - evas_touch_point_list_nth_xy_get
 - evas_touch_point_list_nth_id_get
 - evas_touch_point_list_nth_state_get

This also fixes a number of issues related to feeding fake
input events.

Note: I wanted to add delta x,y information as well but it's
in fact not really possible outside the event callback itself,
as the previous x,y position will not be updated unless there's
an event.

@feature
2016-09-01 14:57:11 +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
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 269fc4f7a6 evas: Remove common interface and use provider_find
Evas.Common_Interface not only had a bad name, it also
wasn't in line with how we can get a loop object, for
instance.

Use eo_provider_find in each implementing class.
2016-06-21 16:13:04 +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 8a0e74afa8 evas: Move canvas events to a common interface
This merges window and evas events into a single name.
Some events are marked as @beta as they shouldn't really be
part of our EO API.
2016-06-14 16:27:42 +09:00
Ji-Youn Park a75fb5763a evas_canvas: move evas_output_XXX API from eo to legach.
evas canvas will be removed from eo.
evas_output_XXX APIs are usually used by widget or e17.
I decided not open these kind of APIs to eo.
app can use the size of elm win instead of evas output apis.
2016-06-13 18:53:06 +08:30
Benjamin Jacobs 32fd16dfc0 evas: button_mask as unsigned, UB fixes.
Summary:
* pointer.button is DATA32 which is unsigned, so this changes the
  definition of pointer_button_down_mask accordingly.

* Avoids UB in mask generation:
lib/evas/canvas/evas_events.c:1348:37: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:34:05 -07:00
Daniel Kolesa b1946ca5d6 eolian: utilize the new void_ptr builtin across eo files
This lets me narrow down the remaining cases of pointers across the EFL.
The void pointers will later need to be reevaluated on per-case basis and
replaced appropriately where possible/feasible.
2016-06-02 13:00:26 +01:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Jean-Philippe Andre b0a32b0bd0 Efl: Rename Efl.Pointer.Event into Efl.Event.Pointer
Also renames two types: Efl.Pointer.Flags and Efl.Event.Flags
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 0a27c78a33 Evas events: Split pointer events
This is going back to the same idea as legacy. We will have
events such as:
- move
- down
- up
- in
- out
- wheel
- cancel ("new" - very rare)

Now the question is whether/how we should divide "multi" events
which start from the 2nd finger from standard mouse events. The first
multitouch finger should by default look like a mouse event.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 37d894abb1 evas: send eo pointer events on mouse move
This is still VERY experimental and not fully done yet.
All other pointer events need to be sent as well.

The legacy event system is used as a transportation mechanism,
as it is too hard to change the logic. This only adds an extra
eo event in case of move. Obviously for performance we might
want to listen to callback_add,del but that's an optimization
for later.

The whole point of sending those pointer events is to carry more
information than can be sent over legacy evas events, and unify
the events in a common format.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre f119327495 evas: Move event feed and input to legacy 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre ea8c6e5632 Evas: Extend pointer events and add legacy conversion routines
To be honest, this commit is a bit of a mess since it's a
rebased version of some temporary work patches.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre c06cdadca2 Evas: Fix compilation warnings (enum implicit cast)
Moving enums to Efl renames them but keeps the value the same.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre fb35171186 Evas.Canvas: Move some event_feed to legacy
Paving the way to Efl.Pointer.Event...
2016-05-31 19:03:04 +09:00
Daniel Kolesa e984e5a11a eolian: remove pointers from complex and class types
Complex types (i.e. list, array, hash, accessor etc.) now do not require
pointers with them anymore (the pointer is implied) and the same goes for
class handles. Eolian now explicitly disallows creating pointers to these
as well. This is the first part of the work to remove pointers from Eolian
completely, with the goal of simplifying the DSL (higher level) and therefore
making it easier for bindings (as well as easier API usage).

@feature
2016-05-23 15:58:33 +01:00
Cedric BAIL 685681c864 efl: rename efl.core.animator to efl.animator.
It has been decided that we would not use any namespace for interface
and they will sit in efl main namespace.

This patch doesn't correct the naming of the event has we don't have a
prefix for event. We do still have EFL_ANIMATOR_EVENT_ANIMATOR_TICK,
instead of a nicer EFL_EVENT_ANIMATOR_TICK.
2016-03-10 13:14:13 -08:00
Cedric BAIL 62030c1003 evas: make evas a provider of animator. 2016-02-02 10:45:42 -08:00
Cedric BAIL bf26946ba1 evas: move canvas event to be declared inside proper eolian file. 2016-02-02 10:45:42 -08:00