Commit Graph

522 Commits

Author SHA1 Message Date
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
Marcel Hollerbach f2ed538d41 elm_dnd: support target setting on none evas_objects
Summary:
before this only worked for elm widgets. This however is the same
behaviour as in efl_ui_selection_manager.c. So this restores the
behaviour prior to selection_manager.

Depends on D11697

Reviewers: zmike, stefan_schmidt, raster

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11698
2020-04-14 11:29:39 -04:00
Hosang Kim 5b8dc56100 win/widget: free array when object is deleted.
It makes a memory leak.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11522
2020-03-17 09:38:16 +01:00
Christopher Michael bcbe56ecdd efl_ui_win: Fix null pointer dereference
Fixes Coverity CID1420321
2020-03-09 09:07:48 -04:00
Christopher Michael 3f49408493 efl_ui_win: Fix null pointer dereference
Fixes Coverity CID1420329 and CID1420328
2020-03-09 09:03:58 -04:00
Christopher Michael f2f170c1b3 efl_ui_win: Fix horrible formatting
NB: No functional changes
2020-03-09 09:02:21 -04:00
Marcel Hollerbach 165f6f0ae2 rewrite efl cnp and dnd handling
the previous commits introduced a abstraction for drag in drop which can
be now used for this here. With this commit all the direct protocol
handling in efl.ui is removed, and only the ecore evas API is used.

Additionally, this lead to a giant refactor of how APIs do work. All
Efl.Ui. interfaces have been removed except Efl.Ui.Selection and
Efl.Ui.Dnd, these two have been restructored.
A small list of what is new:
- In general no function pointers are used anymore. They feel very
  uncompftable in bindings and in C. For us its a lot easier to just
listen to a event when a drop enters or leaves, there is no need to
register custom functions for that.
- Asynchronous data transphere is handled via futures, which proved to
  be more error safe.
- Formats and actions are handled as mime types / strings.
- 0 is the default seat if you do not know what else to take.
- Content is in general passes as a content container from eina, this
  also allows applications to pass custom types

The legacy dnd and cnp API is implemented based on that.
All cnp related things are in elm_cnp.c the dnd parts are in elm_dnd.c

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11190
2020-03-08 10:59:40 +01:00
Christopher Michael 8be14b2e6e efl_ui_win: Fix dereference before NULL check
This patch fixes an issue detected by Coverity in that 'sdp' is
already being dereferenced before we check it. ELM_WIN_DATA_GET can
return NULL, so we should check it's return Before trying to use the
variable.

Fixes CID1419871
2020-03-06 16:12:15 -05:00
Mike Blumenkrantz 151ec0748a efl/config: merge all gesture manager config code into efl.config
this is all just duplicated code, so we can deduplicate it with minimal
effort to clean up the api

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11251
2020-02-14 09:20:30 +01:00
Mike Blumenkrantz 23678b3695 efl/win: change a couple config init sets for gesture manager to use legacy config
these values are deprecated, so stop setting them in efl_config

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11249
2020-02-14 09:20:27 +01:00
Carsten Haitzler 6f209e48be elm win - fix client side move/resize req handling csd in x
we dont keep our window id up to date... it changes somewhere along
the way during init.... (ecore evas does this e.g. go from normal to
alpha window it has tocreate a new window id anyway)... so stay up to
date so we send a req for the right window id...

@fix
2020-01-19 10:54:02 +00:00
Carsten Haitzler de4a698c96 elm win + ecore evas - fix csd stuff like base size and min sizing
this fixes a lot that was broken with csd... but not everything.

@fix
2020-01-18 00:14:58 +00:00
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
Woochanlee 555f456b39 efl_ui_win: Delete useless geometry set for legacy.edje
Summary:
It will be resized on window_resize_job. when the window got specific size.
I don't think this is needed here. It cause doing a calc in vain.

Test Plan: Launching Test applications.

Reviewers: raster, Hermet, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10550
2019-10-29 10:19:43 -04:00
Mike Blumenkrantz 4f947925a1 efl_ui/win: initialize max size hints to -1 during constructor
Summary:
this is just a cosmetic change for ease of debugging since it will already
be clamped to max size during eval if it remains unchanged

for max size hints a value of -1 means that the hint is unset but a value
of 0 is technically valid depending on the implementation
Depends on D10296

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10297
2019-10-07 18:49:19 +02:00
Mike Blumenkrantz eff717eb26 efl_ui/win: fix max size hint eval
Summary:
win objects should never permit the max size on any axis to be 0, otherwise
the window will be clamped to 1px on the given axis

fixes T8304
@fix
Depends on D10272

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8304

Differential Revision: https://phab.enlightenment.org/D10296
2019-10-07 18:40:10 +02:00
WooHyun Jung ddb28ccdf1 efl_ui_win: add validation check to return legacy default value
Summary:
elm_win_type_get needs to return ELM_WIN_UNKNOWN when
invalid object comes.

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10187
2019-09-26 08:59:28 -04:00
Mike Blumenkrantz aab9341766 theme: efl,state,anim,stop -> efl,state,animating,stopped
Summary:
ref T8231
Depends on D10165

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8231

Differential Revision: https://phab.enlightenment.org/D10166
2019-09-25 17:56:11 -04:00
WooHyun Jung 1c93663156 efl_ui_win: default window type change should not be applied to legacy one
If my understanding is correct, below referenced commit needs to be applied to
efl_ui_win only.

@ref D10049

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10143
2019-09-25 11:05:44 +02:00
Mike Blumenkrantz 9f7417ddde efl_ui/focus: rename focus visibility signals
Summary:
this is consistent with efl api 'visible' property

ref T8231

Depends on D10096

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8231

Differential Revision: https://phab.enlightenment.org/D10097
2019-09-24 17:12:01 -04:00
Marcel Hollerbach 594fc08442 efl_ui_win: default the window type to basic
normally when you create a window, you just want to have it beeing a
basic window. If not you still can set the window type.

ref T8229

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10049
2019-09-24 16:00:44 +02:00
Mike Blumenkrantz ffac7f076f efl_ui/win: fix prototype decls for eo api versions of autodel
this is still pretty broken, but at least the headers aren't

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9972
2019-09-18 18:04:46 +02:00
Xavi Artigas 944d5f37c7 efl/image: Efl.Gfx.Image_Scale_Type -> Efl.Gfx.Image_Scale_Method
ref T7927, T7875
Depends on D9931
2019-09-16 11:06:02 +02:00
Mike Blumenkrantz 9e0a285eea efl: implement efl.file::unload for classes that implement load
unload is a crucial method for classes that implement load, as this is
the method which is called during e.g., efl_file_simple_load() when
a new file is specified in order to destroy the previous object data

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9786
2019-08-29 17:17:08 +02:00
Mike Blumenkrantz ad0c805545 efl/gfx: redo image scale_type enum
this is ideally a bit more clear and flexible than the previous enum names

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9691
2019-08-23 07:33:56 +02:00
Marcel Hollerbach aa2d94f901 efl_ui_widget: add a place to share data
this introduces a shared place to all widgets. The shared pointer is
allocated in the window, as the window outlifes every widget that is
part of it.

This struct will be later used for further optimizations like:

1. There are really heavy focus operations which are only needed for
gengrid/genlst, there is no point in executing them if there is no
gen**** added to the window object. So we can skip the custom
parent_provider logic that is only introduced for gengrid / genlist.

2. Legacy focus APIs must do list walks, which means, on every focus
operation we always have to walk the full list up to the parent, which
is annoying and slow, as we *most of the time* do not use legacy focus
API.

This list can be continued, the above two cases are fixed in the next
revisions.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9642
2019-08-20 12:29:58 -07:00
Mike Blumenkrantz e1fda2cbdb efl/hints: add restricted and combined max size hints
these function the same as the min size hint versions and enable
distinction between internally-set max size hints and user-set max size
hints

@feature

ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9553
2019-08-14 12:08:13 -07:00
Mike Blumenkrantz d99186c039 efl_ui/win: implement unimplemented methods
Summary:
pass through methods from inherited classes to the correct internal
object
Depends on D9562

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9572
2019-08-14 19:26:14 +02:00
Mike Blumenkrantz f34f92bb29 efl_ui: use unified size hints api and be explicit about which hint is changed
unified widgets should use unified api internally and also be more explicit
about which min size hint (restricted or user) is being set in order to improve
readability of code

when unified widgets also implement legacy wrappers, legacy api should be used
for the legacy objects

no functional changes

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9495
2019-08-07 14:48:39 +02:00
Mike Blumenkrantz eb938f8a88 efl_ui/win: use efl_ui_image internally for non-legacy widgets
switch to using a fully non-legacy widget when this is not being created
with elm_win_add

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9466
2019-07-31 14:00:18 -07:00
Marcel Hollerbach f97df4212a efl_ui_win: optimize shutdown
in case we are having a scroller with a lot of elements on it, we are
spending a lot of time in stuff like recalculating clips, even if they
will never be used again.

With this freeze here, we are saving 9s shutdown time in item_container.
Which brings the overall closing time from 10s down to 1s, which is a
win IMO.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9325
2019-07-17 10:17:48 -07:00
Marcel Hollerbach 0c4c74b5f7 efl_ui_win: fix emitting of object focus events
Summary: the event type was wrong. This is now fixed and works correctly.

Reviewers: stefan_schmidt, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9144
2019-06-21 09:40:23 -04:00
Marcel Hollerbach 1e86c2bf93 efl_ui_win: repair scene event emission
It appears that EVAS_CALLBACK_FOCUS_IN / OUT is wrong here, as this is
for when a object gets focus but not the scene.

However, the inital event emission still does not work correctly, this
needs some further investigation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9138
2019-06-20 17:14:57 +02:00
Marcel Hollerbach f77bc6957c efl_input_pointer: rename tool to touch_id
tool was not very helpfull, and additionally, the docuemtnation of it
was completly wrong. After searching through the code where tool was
actaully set (efl_ui_win.c) it turned out that it is actaully the "id"
of the pointer when there are multiple touch events.

ref T7963

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9135
2019-06-20 17:14:54 +02:00
Woochanlee e67c1f28d1 efl_ui_win: Added more gesture config values for gesture manager.
Summary:
https://phab.enlightenment.org/T7544

This is for set config values for gesture manager.

C# will use gesture manager instead of elm_gesture_layer.

Those config values should import to gesture manager to recognize and handle gestures.

Reviewers: segfaultxavi, stefan_schmidt, bu5hm4n, zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: Jaehyun_Cho, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7962
2019-06-11 16:17:48 +09:00
Hermet Park b37e6a4df6 elementry win: support msaa, stencil and depth bits for wayland. 2019-04-25 17:25:52 +09: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
Marcel Hollerbach 6c9b020a0f efl_ui_win: do not error when NULL is setted as content
NULL is valid, and the sub_object code does refuse to allow NULL, hence
we need this check here.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8638
2019-04-21 10:51:44 +02:00
Yeongjong Lee 2e545ee34e elm_win: fix correct return value on elm_win_rotation_get
Summary:
Before b3327c761e, -1 was returned on`elm_win_rotation_get`, if `obj` is NULL.
This fixes backward compatibility.

Test Plan: make check

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8474
2019-03-26 19:48:30 +09:00
Yeongjong Lee 476010b018 elm_win: fix correct rot variable in elm_win_rotation_get
Remove duplicated rotation variable

Also, it fixes wrong layout class comparing.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8464
2019-03-25 11:36:14 +01:00
Mike Blumenkrantz 5930c5f86e efl_ui_win: avoid triggering legacy forbidden path during window finalize
this (unintentionally) revealed some bugs where apps/examples were mixing
eo and legacy code for elm_win which breaks things pretty badly. I'm only
here so I don't get fined.

ref T7713

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8401
2019-03-20 12:36:59 -07:00
Mike Blumenkrantz fcf2eb2205 efl_ui_win: mark legacy forbidden during bg part load always
calling this function indicates legacy is forbidden, not successfully
loading a file. this is functionally meaningless, as the only way to
trigger the previous codepath would be to have previously set legacy
as forbidden, but perhaps it will be slightly easier to read now

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8400
2019-03-20 12:36:57 -07:00
Mike Blumenkrantz b8ff87fc1d efl_ui_win: fix hw accel detection
the ordering of priority here is supposed to be:

1. env vars
2. global override config
3. window config
4. global config

in the case where 1 and 3 were not set, however, this would end up
mangling the global config values and not using the gl options

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8389
2019-03-20 12:36:50 -07:00
Marcel Hollerbach f5fb68e1cd efl_ui_win: apply new event calling convention
Summary:
ref T7758
Depends on D8405

Reviewers: cedric, zmike, segfaultxavi

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7758

Differential Revision: https://phab.enlightenment.org/D8406
2019-03-19 16:31:39 -04:00
Christopher Michael eeb6d626ea efl_ui_win: Fix dereference null return value
Summary:
Coverity reports efl_data_scope_safe_get returns NULL here (checked
273 out of 285 times). Add an EINA_SAFETY check here before trying to
use 'sd'.

Fixes Coverity CID1399425

@fix

Depends on D8348

Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8349
2019-03-15 08:58:04 -04:00
Christopher Michael 94405eca3b efl_ui_win: Fix dereference null return
Summary:
Coverity reports that efl_data_scope_safe_get returns NULL here
(checked 273 out of 285 times). Add an EINA_SAFETY check before trying
to use 'sd'.

Fixes Coverity CID1399426

@fix

Depends on D8347

Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8348
2019-03-15 08:57:54 -04:00
Christopher Michael 0f1f5dabf3 efl_ui_win: Fix dereference null return
Summary:
Coverity reports that efl_data_scope_safe_get returns NULL here
(checked 273 out of 285 times). Add an EINA_SAFETY check here before
trying to use 'sd'.

Fixes Coverity CID1399427

@fix

Depends on D8346

Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8347
2019-03-15 08:57:44 -04:00
Christopher Michael 384d960852 efl_ui_win: Fix dereference null return value
Summary:
Coverity reports efl_data_scope_safe_get returns NULL here (checked
273 out of 285 times). Add an EINA_SAFETY check here for a null return.

Fixes Coverity CID1399428

@fix

Depends on D8345

Reviewers: raster, cedric, zmike, bu5hm4n, stefan_schmidt

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8346
2019-03-15 08:57:34 -04:00
Cedric BAIL 8d5fc26837 elementary: none of this call should have propagated any legacy call.
Summary:
Triggering legacy event call for non legacy event on a an object that is
also non legacy made little sense.

Reviewers: zmike, stefan_schmidt, segfaultxavi, bu5hm4n

Reviewed By: zmike, bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7729

Differential Revision: https://phab.enlightenment.org/D8249
2019-03-11 17:52:39 -04:00
Mike Blumenkrantz ca8e0d6eb7 efl.ui.win: merge fullscreen+maximize events to use *,changed naming
ref T7511

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8294
2019-03-11 21:35:02 +01:00