Commit Graph

74 Commits

Author SHA1 Message Date
Marcel Hollerbach af6134aa6c ecore_evas: add API to offset drag position relative to cursor
The values are stored in the ee itself. And it is the responsibility of
the engine to use that value correctly.
2022-05-31 21:15:03 +02:00
Marcel Hollerbach 7b68960d3a ecore_evas: only define these eina errors once
Summary:
they are not needed multiple times, infact this is creating multiple
definition errors.

@fix

Reviewers: stefan_schmidt, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11766
2020-04-30 09:22:01 -04:00
Christopher Michael 590d5745a9 ecore-evas: Fix formatting
NB: No functional changes
2020-04-28 12:39:24 -04:00
Marcel Hollerbach 0a2db329c8 ecore_evas: add API for finding out if event is used
Summary:
ecore_x_dnd_send_status can be used to indicate if a item can be dropped
on a client or not. However, we should only indicate that this can be
dropped, if there is a object we signaled that a drop is in.

Long story short: there is no assertion that after indicating that
things can be dropped, that a notify for the data is sent. A drag
implementation should always listen to a mouse up event, and abort the
drag if no further operations are sent.
Depends on D11698

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11699
2020-04-14 11:29:43 -04:00
Xavi Artigas 7a79e15ea3 ecore_evas: Use EFL naming convention in cnp & dnd methods
Some methods were missing the "Drag" or "Selection" namespaces or the _Cb suffix.
Depends on D11219

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11426
2020-03-08 11:01:24 +01:00
Marcel Hollerbach 39f3ce42dc ecore_evas: Introduce cnp / dnd API for ecore evas
The idea of copy and paste here is:
- The user specifies the content he wants to have in the selection
  buffer with a Eina_Content, these content pointer ownerships are
  passed to the called. Internally ecore_evas code will memorieze the
  pointer, and pass on function callbacks to the modules, which then do
  not have to deal with the ownership.

- In case the module does not specify these APIs, the callback
  implementation will be called, which only works for cnp *not* dnd.

- Action and mime types are handled as strings, which allows way better
  custom organisations.

(The docs needs improvement)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11192
2020-03-08 10:59:25 +01:00
Carsten Haitzler d9dbd2fbea ecore evas x and e sync rendering - disable as it's unused
this has been optional and unused by e for a very long time ot try
sync front-buffered software rendering with the wm/compositor. we may
as well remove the bloat that is here that is unused... it's been
inactive for many years anyway.
2019-08-02 16:41:12 +01:00
Cedric BAIL 5847886a3f ecore_evas: on internal Evas canvas uncontrolled death, properly clean up Ecore_Evas.
This allow evas test to work with an Ecore_Evas directly. It prevent leaking of memory
in the case of half destroying Ecore_Evas.

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9104
2019-07-12 09:54:21 -07:00
Hermet Park 53599a8d39 ecore wayland: expand internal interface to pass engine option list.
This is a prepartion patch to support msaa in wayland.
ui window needs to deliver engine options (stencil, depth, msaa bits)
to evas engine side, ecore_evas_wayland_egl should have the argument to pass.
2019-04-25 16:56:40 +09:00
Derek Foreman 4dc1e8273d ecore: Add new way to register animators
Summary:
We have back-ends that can generate their own tick sources, but
ecore_animator_add()/ecore_animator_timeline_add() gives no indication
which backend the animator is running on.  This means that all animators
have to cause all currently in use backends to tick.

For example, if under wayland 4 application windows are open, all 4
windows will create ticks when any animator is present.

These new animator APIs that take an evas object allow us to figure out
out the backend and only cause the appropriate one to tick.

Depends on D7040

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7041
2018-09-18 09:42:38 -05:00
Derek Foreman e382bac1a0 wayland: Fix elementary setting window parents at creation time
Summary:
We need to pass the entire pointer, not just 32-bits of it.

Fixes a crash with enlightenment sandbox gadgets where
ecore_wl2_window_alpha_get() is called with an invalid pointer while
trying to display a pop-up.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6775
2018-08-08 09:37:30 -04:00
Derek Foreman 380a58a9d9 ee_x: Rename draw_ok to draw_block and invert logic
I want to use this in other engines, but no other engine initializes this
properly, so draw_ok would be EINA_FALSE everywhere.  This way draw_block
is EINA_FALSE after calloc in all engines that don't know about it.

ref T6834
2018-04-12 15:59:39 -05:00
Cedric Bail a44697c37a ecore_evas: refactor logic for creating Ecore_Evas. 2018-04-02 15:12:31 -07:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Jean Guyomarc'h 34d9f20706 eina: remove usless newline
Summary:
ecore_evas: remove debug

eina: unregister log level when done with

Fixes a constant memory leak.

eina: introduce EINA_HOT and EINA_COLD

These attributes respectivelly expand to __attribute__ ((hot)) and
__attribute__ ((cold)) when available. They allow to mark functions are
being hot/cold (frequently used or not) as well as to qualify labels
within a function (likely/unlikely branches).

eo: speed-up generated calls by removing call cache

The call cache needed to by thread-local, to avoid concurrency issues.
Problem with TLS is that is adds an extra overhead, which appears to be
greater than the optimization the cache provides.

Op is naturally atomic, because it is an unsigned integer. As such, it
cannot be tempered with while another thread is reading it. When
entering the generated function, the first operation done is reading
'op'. If we have concurrency, we will have access sequences returning
either EFL_NOOP or a VALID op, because 'op' is not set until the very
end of the function, when everything has been computed. As such, we now
use the 'op' atomic integer to instore a lock-free/wait-free mechanism,
which allows to drop the TLS nature of the cache, speeding up the access
to the cache, and therefore making functions execute faster.

We don't test anymore the generation count. This can be put as a
limitation. If means that if you call efl_object_shutdown() and
re-initialize it later with different data, opcodes will be invalid.
I am not sure there is any usecase for this to ever happen.
We could move all the caches in a dedicated section, that can be
overwritten after a call to efl_object_shutdown(), but I am not sure it
will be very portable.

Benchmark: mean over 3 executions of
   ELM_TEST_AUTOBOUNCE=100 time elementary_test -to genlist

```
                     BEFORE               AFTER
------------------------------------------------------------
time (ns)            11114111647.0        9147676220.0
frames               2872.3333333333335   2904.6666666666665
time per frame (ns)  3869364.6666666665   3149535.3333333335
user time (s)        11.096666666666666   9.22
cpu (%)              22.666666666666668   18.333333333333332
```

Ref T6580

Reviewers: raster, cedric

Subscribers: cedric, jpeg

Maniphest Tasks: T6580

Differential Revision: https://phab.enlightenment.org/D5738
2018-01-16 17:50:46 +09:00
Cedric Bail e5d1cc731a ecore_evas: always find a source for ticking legacy animator.
As we do not know when a window won't be able to tick, and we do
not know which window a legacy animator is attached to, we require
all windows to tick as often as they can and only generate one tick
per loop run.

This might need more adjustement especially with multi output.
2017-11-02 15:26:08 -07:00
Derek Foreman aa8d9c1829 ecore_evas: Add a function pointer for last_tick_get
Engines that provide their own tickers may need to be able to provide the
time of the last tick even if they weren't sending ticks to EFL at the
time.

This is a feature added during freeze as it's necessary to resolve a bug.

ref T5462
2017-07-13 18:07:42 -05:00
Jean-Philippe Andre 76a668f022 ecore_evas_x: Track changes in framespace size
If the framespace size has changed and by accident (or in fact, by
design) the evas size + framespace size is equal to the size sent
by the X server, ecore_evas_x was skipping the resize event. This
patch adds a tracking of the framespace size so that we redraw the
canvas if it changed.

This will fix issues with the main menu (since it's in the framespace,
23 pixels tall with the default theme & scale).

Note that all this is partly because the ecore evas size is the size
without the framespace, so weird calculations are made during resize...

Ref T5482
2017-07-05 17:43:59 +09:00
Mike Blumenkrantz a777fcb679 ecore-evas: make focus-setting work with async device init
@fix
2017-06-09 19:14:58 -04:00
Jean Guyomarc'h d340d85a1f ecore_evas: fix link issue on macOS
696ed3e2e8 introduced a build failure on
macOS. _ecore_evas_subregister is being used in a foreign code module,
but it was not exported. Enforcing EAPI gives this symbol enough
visibility to be used outside of ecore_evas.
2017-05-09 21:29:11 +02:00
Cedric Bail 696ed3e2e8 ecore_evas: add infrastructure to properly track sub ecore_evas. 2017-05-05 17:55:06 -07:00
Cedric Bail 7b4b7b6696 ecore_evas: add logic to allow partial refactoring of backends. 2017-05-05 17:55:06 -07:00
Cedric Bail 385acef7f9 ecore_evas: introduce a generic rendering function. 2017-05-05 17:55:06 -07:00
Cedric BAIL e0bb9d6134 ecore_evas: change VNC API and use snapshot internally. 2017-04-12 15:13:19 -07:00
Cedric BAIL 0cd43b45d9 ecore_evas: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Guilherme Iscaro 044219226c Ecore Evas: Add support for multiple mouse positions.
Since it's possible to have more than one mouse, Ecore Evas
must take into account the position of all mouses and update them
correctly.
2016-12-20 18:34:39 -02:00
Guilherme Iscaro e5acc5604a Ecore Evas: Add support to set cursor icon per mouse device.
Since Ecore Evas now supports multiple mouses new APIs were added
in order to be able to set the cursor image to any device.
2016-12-20 18:34:39 -02:00
Guilherme Iscaro 64986bccac Ecore Evas: Add API to set/get the pointer position per device.
Since Ecore Evas now support multiple mouse devices new APIs were
added in order to fetch the mouse position.
2016-12-20 18:34:39 -02:00
Guilherme Iscaro 75619fc290 Ecore Evas: Add multi seat support for mouse in/out. 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
Jean-Philippe Andre b2dbf9d9dd win: Fix maximized geometry with CSD in X
There is still a geometry issue after un-maximizing.
2016-11-23 13:04:12 +09:00
Jean-Philippe Andre 4722b685cf ecore_evas/x: Inform WM about borders and shadows
This exploits the existing X Atom "GTK_FRAME_EXTENTS"
2016-11-23 13:04:12 +09:00
Cedric BAIL 8215d9832c ecore: introduce adjusting main loop time on animator. 2016-11-14 11:53:01 -08:00
Cedric BAIL 8ee79d0e21 ecore_evas: first frame and animator are defined per canvas 2016-11-10 16:26:34 -08:00
Jean-Philippe Andre eb8d9387c1 wayland: Remove support for "draw_frame"
draw_frame is a legacy feature that draws a very ugly window border
with a white rect and a black text as title bar. This could be
used in wayland when using only the ecore_evas APIs, rather than
elm_win.

Note that the API ecore_evas_draw_frame_set() can not possibly work
as the flag is checked when the ecore_evas is created, so changing
the flag has no effect on existing windows.
2016-11-03 17:22:14 +09:00
Guilherme Iscaro 4bffa7bfa7 ecore_evas: refactor VNC as an Eina Module.
Summary:
This change removes the necessity to link EFL against the libvncserver

Please ignore the first three commits, they're being reviewed here:

https://phab.enlightenment.org/D4323

Reviewers: bdilly, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-28 09:56:47 -07:00
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Jean-Philippe Andre 58c3808231 ecore_evas: Register animators for inline image ee
In ecore_evas_object_image_new, register animator tick del/add
catchers, so that animators can work. This fixes mouse scroll
in an inline window.
2016-08-01 10:29:24 +09:00
Jean-Philippe Andre bd70604ee8 ecore_evas: Add private direct callback for ecore
All ecore_input_evas events should be passed through ecore_evas
in order to avoid any information loss between ecore and evas.

This is a private API.
2016-05-31 19:03:04 +09:00
Cedric BAIL 0812fc8f6c ecore_evas: optimize triggering of animator to happen only when someone is listening. 2016-02-02 10:47:25 -08:00
Cedric BAIL bb1a1eef65 ecore_evas: introduce support for per window animator trigger.
This code is currently only using the older fallback code and not any
new event source, so all animator on all window are still triggered
whatever the case are.
2016-02-02 10:47:25 -08:00
Dongyeon Kim dc1476ee09 ecore_evas_x: make gl_sync_draw_done an explicit signed char type
Summary:
char type is interpreted as unsigned char in some implementations,
so setting -1 will be read as 255.
So we should explicitly make this a signed char type.
@fix

Test Plan: Local tests

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D2895
2015-07-30 10:14:15 +09:00
Shinwoo Kim f372eb4b92 [ecore_evas_extn] add function to block mouse event.
Summary: add ecore_evas_extn_socket_events_block_set/get

Test Plan: add mouse event callback, and check whether it could get event or not

Reviewers: raster, woohyun, jaehwan, Sergeant_Whitespace

Reviewed By: Sergeant_Whitespace

Subscribers: Sergeant_Whitespace, seoz, cedric

Differential Revision: https://phab.enlightenment.org/D2268
2015-05-15 16:46:22 +09:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Mike Blumenkrantz 7171135792 ecore evas should not crash when unsetting pointer
ref D812

disappointed.jpg
2015-02-06 17:54:08 -05:00
Gwanglim Lee a9a7ed6c52 ecore_evas: Ecore_Evas_X - Fix broken rendering during rotation with resize
Summary:
When ee is trying to do rotation, ee should check whether given rotation value
is portrait or not. Then it sets output size of evas canvas according to rotation value.
But, ECORE_EVAS_PORTRAIT macro used in ee x engine only checks ee's rotation value, even
if ee's rotation value is not updated yet. Thus we should change the logic to compare with
given rotation value, not ee's rotation, before setting output size of evas.

This fixes T1371 problem.
@fix

Test Plan:
1. run elementary_test -to "window states"
2. check resize
3. rotation 0 ~ 270

Reviewers: jpeg, raster, cedric, zmike, devilhorns, Hermet

Reviewed By: Hermet

Subscribers: cedric

Maniphest Tasks: T1371

Differential Revision: https://phab.enlightenment.org/D1351
2014-08-27 19:35:27 +09:00
Gwanglim Lee cbf6f94c80 ecore_evas: Added support for window auxiliary hint
Summary:
The window auxiliary hint is the value which is used to decide
which actions should be made available to the user by the WM. If you
want to set specific hint to your window, then you should check whether
it exists in the supported auxiliary hints that are registered in the
root window by the window manager.

Once you've added an auxiliary hint, you can get a new ID which is used
to change value and delete hint. The window manager sends the response
message to the application on receiving auxiliary hint change event.

A list of auxiliary hint within the Ecore_Evas has this format:

  ID:HINT:VALUE,ID:HINT:VALUE,...

Reviewers: raster, cedric, seoz, Hermet

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D543
2014-02-28 07:20:01 +09:00
Gwanglim Lee 77092d94d4 ecore_evas: added window manager rotation to manage the rotation of windows by the WM.
Summary: The window manager rotation allows the WM to controls the rotation of application windows. It is designed to support synchronized rotation for the multiple application windows at same time.

Reviewers: raster, seoz, cedric, Hermet

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D529
2014-02-09 09:46:51 +09:00
ChunEon Park 892b1c5be3 ecore_evas - applied macro to check rotation state.
also, let the potrait compare on the higher priority.

if you can suggest better macro name, then please modify it.
2014-01-18 22:26:10 +09:00
ChunEon Park 8cd92c17e0 Revert "ecore_evas - use the macro orthogonal check."
This reverts commit 43acf1e82f.

some partial changes are incorrectly applied.
2014-01-18 22:04:25 +09:00