Commit Graph

1775 Commits

Author SHA1 Message Date
Cedric BAIL b5456893ee evas: start working on efl_canvas_output.
This should when done enable the possibility for multi screen in wayland
along with remote display, wireless display and screencasting.
2016-09-12 16:19:10 -07:00
Chris Michael 0f8fb7ef88 evas: Fix jpeg snafu and properly send hold events to children
Commit 405680e836 changed how hold
events were being sent. Previous code was sending the hold events to
child objects, however after mentioned commit, they were being sent to
main objects. This patch fixes that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-08 08:40:16 -04:00
Ji-Youn Park 7ce79be1a1 evas_render: fix clipping the whole area in each rendering.
evas_render should not be going and doing evas_object_clip_set () at all.
The framespace clip should be enforced at RENDER time.
2016-09-08 09:56:30 +08:30
Chris Michael c3d5ccf0f9 Revert "evas: Remove set but not used variable"
This reverts commit 24c5df29b3.

This should not have been pushed. Removed the variable from the wrong
spot :(
2016-09-07 08:35:30 -04:00
Chris Michael 24c5df29b3 evas: Remove set but not used variable
Gcc warns eo_child is set but not used here, so remove it.

NB: This should have been removed in previous evas_events commit. Oopise

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:31:39 -04:00
Chris Michael 6b63d9d6ec evas: Remove set but unused variables
Gcc warns that these variables are 'set but not used'. After reading
the surrounding code, it turns out they are not actually used, so
remove them.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:22:11 -04:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 69132b5c1d evas: Implement plane support for managed buffers 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 8ee431572d evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre d7b8d97fd5 evas events: Add "raw" x,y values for future extensions
For pen tablets, this exposes the values as given by the driver
(quite useless without knowledge of the device itself).

For mice, this exposes x,y as set by the display manager, without
any extra processing in terms of smoothing or prediction. IOW
this returns the same as x,y until a smoothing algorithm is
implemented (todo).
2016-09-06 16:54:53 +09:00
Hermet Park 7f22addf1c evas canvas: add missing brackets. 2016-09-06 16:52:56 +09:00
Hermet Park 51acb259a2 evas canvas: fix a wrong condition check in smart changed.
There were 2 wrong conditions.

1. visible check.
Smart changed can be skipped only if previous/current visibility are false.

2. clipper.
Actually, it needed to check previous/current clippers but previously,
it checked only previous clippers.

@fix
2016-09-06 16:45:23 +09:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +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 e61b7139ff win: Move pointer "xy" and "inside" to input interface
Those two properties aren't related to a "drawing" canvas
but to the current state of input.

Note: both Efl.Input.Pointer (pointer input event data) and
Efl.Input.Interface (common interface for input handling objects)
expose a pointer position API. Not sure what to do about that.
2016-09-01 11:57:43 +09:00
Jean-Philippe Andre b675571bd8 evas events: Fix axis input values
This adds support for distance, pressure, tilt and twist.
Not entirely sure if normalized & raw (x,y) should be exposed
in the eo interface. Also not sure what to do with tilt_x/y
(as used by libinput) or touch/tool width "major/minor" vs.
radius x/y.

Add debug logs in the example, including the distance.
I can't test most of these values due to a lack of compatible
hardware, but the most basic features seem to work :)
2016-09-01 11:57:43 +09:00
Daniel Hirt 2d44738fae Canvas text: fix ellipsis RTL handling
First, fixing ellipsis text positions: ellipsis items should be assigned the
text positions of the omitted text (while maintaining the formatting of the
last visual item). In the case where an entire item was rejected, it
will be assigned that item's text position. If an item was split, it will be
assigned the text position of the split portion.
The BiDi reorder code relies on properly-assigned text positions.

Second, fixing ellipsis handling: the width calc was only considering the
ellipsis item's width. However, if the ellipsis is placed as e.g. the first
visual item (such as in RTL cases), its advance value should've be considered,
instead.

Thanks Youngbok Shin for the test case and information.

@fix
2016-08-31 16:23:32 +03:00
Jean-Philippe Andre f88a4b8308 evas events: Fix repeated calls to mouse callbacks
After my many input events changes, a same object callback
could be called multiple times in a row because both mouse
and multi events were sent. As such, the multi event had no
direct effect (no callback called) but it reset the object's
last event type. This allowed the mouse event callbacks to be
called again.

Note that I haven't tested multi touch yet :(

Very good catch by @bu5hm4n!

Fixes T4462
Fixes T4467
2016-08-31 11:41:58 +09: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
Jean-Philippe Andre 2edf50cb10 evas events: Properly signal to clients which values are set
Since pointer events are all the same thing, users may not know
what values are valid for what kind of event. Eventually we
want to expose more information, but we also need a way to inform
the caller about the validity of the values we get.
2016-08-30 15:13:40 +09:00
Jean-Philippe Andre 68be4f49ed evas events: Fix mistake in multi_move
I guess (can't test) that multi touch was broken, as the
position of the event was set to the position of the pointer
on the canvas. Which means all fingers would be in the same
spot, no matter what the real input. Copy & paste error.
2016-08-30 15:13:40 +09:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Jean-Philippe Andre 9123e5add2 evas events: Add efl_isa safety checks in legacy EAPI
This removes useless magic checks (only check whether the
arg is not null) that were not even present in every function.
The cost should be similar or lower than an eo function call.
2016-08-26 11:28:34 +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
Jean-Philippe Andre 60526528a6 evas: Add normalized and window coordinates to axis events
This is for Wacom graphics tablets (with a pen).

The raw data sent by ecore to evas (and then to apps) is pretty
useless as it's not normalized, and apps have no way of knowing the
dimensions of the tablet, without themselves opening the device
(we don't know nor expose the path to the device).

This is for Xi2 only for now, as Wayland support hasn't been done
yet.

The intent is to deprecate LABEL_X and LABEL_Y. I'm not sure yet
if the normalized value is useful or not (it would seem we may not
be able to provide this info in Wayland).

The new WINDOW_X, WINDOW_Y labels will be used in the new event
type (Efl.Event.Pointer). Normalized values are not exposed yet,
let's decide if we want them or not first (based on what can be
done in Wayland space).

@feature
2016-08-26 10:18:01 +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 925878e931 evas events: Switch axis events to the new eo type
This converts Evas_Axis or Ecore_Axis info arrays into basic
pointer data. Also marks those fields as set. All events need
to properly implement the value_has property (mark all bits
whenever a value is known).
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 8938d8d557 evas events: Rename properties and introduce generic value
This paves the way to a merge of pointer and axis events into
the class Efl.Event.Pointer.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre ef4859d5bd evas: Optimize out most callback call events
This sets a bit whenever a callback listener is added.
I couldn't get any profiling data easily (too small for
valgrind).

Note: This removes the proper refcounting on the "move"
event listeners. I believe this is not a problem as most times
the move_ref goes to 0, it is because the object is deleted.
Worst case, we just trigger a callback_call with no listeners.

This adds 32 bits to each evas object private data.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 57f0c850ec evas: Move event catcher to evas_callbacks.c
No functional change.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 4746627fcf evas: Remove deprecated events from public EO class
del and free eo events don't need to be exposed, even as beta
API. They are still required for legacy callbacks.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre b325097e71 elm,evas: Remove use of EFL_CANVAS_OBJECT_EVENT_DEL
This event should not be exposed at all, it's not necessary
anymore, EFL_EVENT_DEL already exists and should be good enough.

This does move the callback call a little bit ealier in the del
process, but at first glance, this shouldn't have any impact.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 834794ed84 evas events: Add new "finger,move/down/up" events for multi touch
This moves MULTI events to those new finger event types,
and also sends a finger event for finger 0 (aka the pointer).

NOTE: This may require a separation between a mouse input and
      an actual finger touch. To be defined, ie: do we let the app
      check the input device info to decide whether the event is
      actually the first finger of a multi touch device, or do
      we want to send only actual finger events from multi touch
      devices only?

@feature
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 049a5ddb44 evas events: Remove now unused code 2016-08-26 10:18:01 +09:00
Jean-Philippe Andre ab7f281c34 evas events: Fix crash when translating legacy events
An obvious crash happened when reusing a legacy struct
from another type.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre ac26c7d4f3 evas events: Switch mouse move events to the new type
This is the last commit for this crazy input transformation
series. The following commits will be cleaning up now
unused code, and fixing bugs.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 46c85b87fd evas events: Switch multi move to new event type
Now only the single move remains. Almost done!
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 2857d7c2cf evas events: Switch multi up/down to the new event type 2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 328151f999 evas events: Switch mouse in/out events to the new event type 2016-08-26 10:18:01 +09:00
Jean-Philippe Andre edd88292a4 evas events: Switch mouse move event to the new event type (1)
This only modifies the proxy source handling code.
2016-08-26 10:18:01 +09:00
Jean-Philippe Andre 56c682452c evas events: Switch mouse up/down to the new event type
This is getting trickier, as those events have a lot more
side effects and complexity than a simple wheel event...

Some code has been added that should be fixed in the following
commits.
2016-08-26 10:18:00 +09:00
Jean-Philippe Andre c1e7589c14 evas events: Switch key up/down event to new eo type 2016-08-26 10:18:00 +09:00
Jean-Philippe Andre 405680e836 evas events: Switch hold event to new eo type
Evas_Event_Hold is now barely used anywhere.
This also adds support for event_flags to this type.
2016-08-26 10:18:00 +09:00
Jean-Philippe Andre 290413543d evas events: Switch wheel event to the new type
For now this covers only the wheel event.

Note: This patch also modifies evas map to use double in an
internal function, rather than ints.
2016-08-26 10:18:00 +09:00
Youngbok Shin 36d086ec42 Evas text: fix RTL text ellipsis issues
Summary:
Visual position of ellipsis item should be set according to
its bidi direction. But, by setting visual position in same way
as logical position, the end ellipsis could be put opposite side.
Also, start ellipsis must placed on left side of RTL text.
@fix T3187

Test Plan: Test an sample on T3187

Reviewers: tasn, woohyun, herdsman

Subscribers: raster, Blackmole, z-wony, cedric, jpeg, minudf

Maniphest Tasks: T3187

Differential Revision: https://phab.enlightenment.org/D3769
2016-08-18 14:39:41 +03:00
Youngbok Shin 167d41e7b2 Evas Text: parse font string everytime for updating lang properly
Summary:
We can't assume the given font is same with current fdesc by comparing string.
Since Evas starts to supporting "auto" for language,
the given font string should be parsed once before comparing it.
@fix

Test Plan: N/A

Reviewers: tasn, raster, cedric, herdsman

Subscribers: jpeg, minudf, z-wony, Blackmole, woohyun

Differential Revision: https://phab.enlightenment.org/D4227
2016-08-18 13:33:08 +03:00
Stefan Schmidt dc0416fade evas: mark unused function parameter as such 2016-08-17 09:57:08 +02:00