Commit Graph

499 Commits

Author SHA1 Message Date
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
Mike Blumenkrantz f7670ff5fd efl.ui.win: add event info to 'rotation,changed' event and rename
be consistent with property name and '*,changed' event info convention

ref T7511

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8293
2019-03-11 21:35:01 +01:00
Marcel Hollerbach a007badbed efl_canvas_scene: rename event from focus,* to scene_focus,*
Summary:
This event can just be renamed, no need to handle legacy. The reason for
this, that this event is used to map to EVAS_CALLBACK_ enum fields,
which means, the legacy names of the event does not matter.

ref T7476

Reviewers: cedric, segfaultxavi, zmike, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7476

Differential Revision: https://phab.enlightenment.org/D8242
2019-03-08 09:02:30 -05:00
Mike Blumenkrantz d8b46509c7 efl_ui_win: do not use Efl.Orient
windows are not restricted to 90 degree rotations. also this type
shouldn't be stable yet

ref T7511
ref T7726

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8239
2019-03-07 14:44:06 -08:00
Mike Blumenkrantz 192bbfa502 elm_plug: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8192
2019-03-07 14:16:05 -08:00
Mike Blumenkrantz 76c67957b0 efl_ui_win variants: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8149
2019-03-06 15:22:10 -08:00
Mike Blumenkrantz 9a361ac917 efl_access_object: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8131
2019-03-06 13:03:02 -08:00
Mike Blumenkrantz 5bfe2e89d2 evas: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8107
2019-03-06 19:05:48 +01:00
Mike Blumenkrantz 9e8a565bb6 efl_ui_win: fix compile when HAVE_ELEMENTARY_X is not defined
Reviewers: vtorri

Reviewed By: vtorri

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8101
2019-03-05 07:21:02 -05:00
Mike Blumenkrantz 7b6878bb28 efl_ui_win: fix position,changed eventing
Summary:
the eo event needs to send position data and manually call the old
smart callback
Depends on D8086

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8087
2019-03-04 13:37:42 -05:00
Mike Blumenkrantz cd3cad0ff1 efl.ui.win: remove 'noblank' property from eo api
Summary:
this is not supportable outside xorg usage

ref T7511
Depends on D8084

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7511

Differential Revision: https://phab.enlightenment.org/D8085
2019-03-04 13:37:35 -05:00
Mike Blumenkrantz faf6d4f425 efl.ui.win: remove keygrab set/unset from eo api
Summary:
this is fundamentally incompatible with many display servers and will
not ever be supported outside of legacy

ref T7511
Depends on D8083

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7511

Differential Revision: https://phab.enlightenment.org/D8084
2019-03-04 13:37:30 -05:00
Mike Blumenkrantz e3fa213d10 efl.ui.win: remove all legacy types and functions from eo file
Summary:
most of the eo methods here will be marked beta, preventing them from
generating legacy code

ref T7511
Depends on D8082

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7511

Differential Revision: https://phab.enlightenment.org/D8083
2019-03-04 13:37:24 -05:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
Summary:
now that the error codes have been change to be compatible with eina_error,
this can be removed and will work through eina_error naturally

fix T7718

Depends on D8067

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04 13:37:07 -05:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Mike Blumenkrantz 3984f58fd9 efl.ui.win: iconified -> minimized
Summary:
minimize is a commonly used term in the current year. iconify is not.

ref T7511

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7511

Differential Revision: https://phab.enlightenment.org/D8044
2019-02-28 16:49:57 +01:00
Marcel Hollerbach b704db8f07 efl_ui_widget: move focus_highlight to the window
summary_:
the widget implementation just redirected calls from efl_ui_widget to
efl_ui_win. Which makes the properties unncessesary on the widget. This
commit moves them now to the window.

The legacy implementation of the window can now go away, as this is
taken care of by eolian directly.

ref T7553

Depends on D8017

Reviewers: woohyun

Reviewed By: woohyun

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8025
2019-02-27 20:19:25 +01:00
Mike Blumenkrantz 0b152734ba efl_ui_widget: redo disable handling
before the disable property was a bit weird. Setting something to
disabled=true will disable all children of the widget that is changed.
However, only the update function of the children will get the false flag,
not the flag itself. Which means, to query the real disabled state, we
need to walk up the parent relations.

With this patch, every change to disabled will go through the disabled
property, which mean, a implementor can just overwrite the disabled
property, and adjust its internal state there. Just be carefull, a set
to disabled=true still might result in disabled=false. This makes the
function on_disable_update unneccesary. Which also cleans up the
Efl.Ui.Widget class.

ref T7553

Depends on D8016

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8017
2019-02-27 20:19:23 +01:00
Mike Blumenkrantz b3327c761e efl_ui_widget: move orientation to the specific users of this widget
The new api is moved into either Efl.Ui.Win or Efl.Ui.Layout.
Only Efl.Ui.Layout is interested in the rotation, as this is the only
widget that can actaully apply it to the theme. The value itself however
is unique to the window, which means, the window is the only point where
the rotation is stored, and this is the point, where rotation changes
are brought to the layouts.

ref T7553

Depends on D8014

Differential Revision: https://phab.enlightenment.org/D8015
2019-02-27 20:19:07 +01:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Mike Blumenkrantz d16adf8d82 efl.canvas.scene: rename "smart" methods to "group" methods
Summary:
"group" is the name used for interfaces api, so be consistent by using
that naming here too

ref T7584
Depends on D8019

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7584

Differential Revision: https://phab.enlightenment.org/D8021
2019-02-25 14:00:14 -05:00
Mike Blumenkrantz a08570fdae api: rename efl.gfx.entity geometry events and add geometry data to those events
the convention for event naming is to use $property,changed where possible
and to always emit related data with the event to reduce function calls

ref T7558

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7987
2019-02-22 10:09:46 +01:00
Mike Blumenkrantz 99c3d42efd efl.canvas.scene: clean up pointer_position property
this needed to take a seat param (to handle multiseat) and also have a
bool return to indicate whether a pointer device exists for the specified
seat

ref T7584

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7957
2019-02-21 20:24:34 +01:00
Mike Blumenkrantz 2df6e1103d efl.canvas.scene: add 'seat_default' property
there seems to be no other way to directly return the default seat object?

ref T7584

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7956
2019-02-21 20:24:33 +01:00