Commit Graph

4793 Commits

Author SHA1 Message Date
Marcel Hollerbach c6e338bb9a efl_ui_layout: remove efl.end
someone decided it should be named efl.extra, the previous commits are
ensuring that.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9773
2019-08-29 08:29:57 +02:00
SangHyeon Jade Lee 14f9782a81 efl_ui : add efl.extra part as layout swallow part list.
Summary:
efl.extra part is extra part of the layout swallow,
which can be generally used on overall layout object.
To be supported layout part infrastructures,
add efl.extra on layout_swallow_part[] list.

Depends on D9233

Reviewers: cedric, bu5hm4n, zmike, segfaultxavi

Reviewed By: bu5hm4n

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9316
2019-08-29 10:21:39 +09:00
Marcel Hollerbach 53739890ce efl_ui_position_manager: refactor data access
before data access has been a property on
Efl.Ui.Position_Manager.Entity. However, we are not sure how stable all
this will be, and maybe we have the demand to change that in future, in
order to allow more high-performance item passing here.

Additionally, this patch addresses a few lectures learned from the past,
that includes:
- direct group header filling.
- direct group sizing
- difference between size for caching, and size for displaying
- Have a end_id which is the maximum of id that is filled.

ref T8179

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9754
2019-08-27 17:47:54 +02:00
WooHyun Jung 5636bb8b0b efl_ui_slider: refactor for better data flow and code readability
1. efl_ui_range_value_set only sets value
2. remove internal eo functions (such as xxx_knob, val_fetch, and val_set)
3. make access_value_and_text works correctly

@ref T7893

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9720
2019-08-27 15:35:01 +02:00
Shinwoo Kim cfc0d4866c efl_ui_widget: keep backward compatibility
It was possilbe to add an image with improper parent object before aa2d94f and
56752e0. This patch makes it possible. Sure there are error messages when user
adds an image object using non widget object as below but you can see image.

ERR<28822>:elementary ../src/lib/elementary/efl_ui_widget.c:4801 _efl_ui_widget_efl_object_constructor() You passed a wrong parent parameter (0x400000007ced (null)). Elementary widget's parent should be an elementary widget.
ERR<28822>:elementary ../src/lib/elementary/efl_ui_widget.c:4803 _efl_ui_widget_efl_object_constructor() No widget data for object 0x400000007ced ((null))
ERR<28822>:eina_safety ../src/lib/elementary/efl_ui_win.c:9450 efl_ui_win_shared_data_get() safety check failed: pd == NULL
ERR<28822>:eo ../src/lib/eo/eo.c:579 _efl_object_call_resolve() in src/lib/elementary/efl_ui_widget.eo.c:256: func 'efl_ui_widget_sub_object_add' (698) could not be resolved for class 'Evas.Canvas'.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9747
2019-08-27 15:02:32 +02:00
Shinwoo Kim e22e7481b1 efl_ui_bg: make legacy bg use legacy image
Summary:
The legacy bg object has added a non-legacy image object internally.
The non-legacy image object caused an unexpected inconsistent behavior
and result in common widget logic because it is not true for the line
using elm_widget_is_legacy function in efl_ui_widget.

Reviewers: woohyun, Jaehyun_Cho, SanghyeonLee, YOhoho, Hermet, jsuya, devilhorns, zmike

Reviewed By: zmike

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9746
2019-08-27 07:49:18 -04:00
Yeongjong Lee 9c52484caf efl_pack_table: rename table_position to cell_column, cell_row
Summary:
Rename ambiguous `table_position` property. it is actually related to child
column, row.

ref T7900

Reviewers: segfaultxavi, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7900

Differential Revision: https://phab.enlightenment.org/D9611
2019-08-27 12:57:35 +02:00
Marcel Hollerbach 634ebfeaf1 efl_ui_collection: honor desktop vs. touch setting of elm config
with this commit we do desktop-like selection on desktop systems:
- Multiselect with CTRL pressed
- Normal single selection if no CTRL is pressed
on touch devices this is simple on/off selection:
- click to add it to multiselect
- click to remote it from mutliselect

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9664
2019-08-26 14:42:54 +02:00
Marcel Hollerbach 43edd17f41 efl_ui_single_selectable: add properties and events
this commit adds 2 new features, a new event and a new property

The fallback property is usefull if you want to have a selection that always falls back
to some preconfigured things.
As a usecase, think about a list of languges where you can select the
languages you want to have. When everything is deselected, the list will
simply fallback to the preconfigured element (for example the language
configured before)

The event is annoncing that there was a change to the selection. The
event is allowed to be defered, it will be emitted once for a range of
selection elements that happened during one loop iteration. This is
usefull if you are interested in a general selection where you want to
know that we changed from a specific set of selected element to another
set of elements, without monitoring every selectable in the widget.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9662
2019-08-26 14:42:50 +02:00
Marcel Hollerbach 35f9fc26e3 efl_ui_multi_selectable: add APIs for selecting
this can be used to select / unselect a range or all selectables in a
container. The range selectable APIs do not have a strong ordering on a
and b, b does not have to come after a.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9660
2019-08-26 14:42:48 +02:00
Marcel Hollerbach c467dc6e81 efl_ui_item: add keybindings for selecting changes
This started as a small commit, when pressing enter -> set the item as
selected.
However, it was a bit more complex, it seems that there was never config
update code to copy bindings into the user profile. Which lead to the
fact that you are missing a lot of keyboard related features if you
havnt wiped your config in the last 1-2 years. For me keybindings for
Efl.Ui.Scroller Tab_Bar Image_Zoomable (Item) have been missing and were
never inserted. WHich is a problem for a user just constantly updating.

For now i created a function that copies over the bindings from the
system config, and they are merged into the user config. Intentional
leaving our of keybinding structs for a user-config will result in them
beeing merged again on the next config update. If you want to get rid of
key bindings as a user you can just keep the empty struct, which is the
signal for "i know what i am doing, i do not want to have them". The
problem that the system config is partly invalidated (due to moving the
key bindings struct to the user config), is fixed due to the fact that
the config is reloaded after that.

This function should be called everytime someone updates the config in
regards of the keybindings.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9723
2019-08-26 14:42:47 +02:00
Marcel Hollerbach c947485bd0 efl_ui_item: only fetch multiselection state if this is relevant
there are cases where the container does only implement single
selection, when then just asume implicitly single mode here.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9722
2019-08-26 14:42:46 +02:00
Taehyub Kim d53e46d76f efl_ui_format: add null checking codes for eina_strftime in _do_format_string function
Summary: efl_ui_format: add null checking codes for eina_strftime in _do_format_string function

Reviewers: kimcinoo

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9735
2019-08-26 14:52:28 +09:00
Marcel Hollerbach de183719b3 efl_ui_spin_button: rename editable to direct_text_input
Summary: as suggested in T8097.

Reviewers: cedric, zmike, woohyun

Reviewed By: woohyun

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9707
2019-08-26 14:21:10 +09:00
Lauro Moura e7510f6770 elm: Fix Scrollable_Content namespace
Summary:
Efl.Ui.Widget is already a class.

Required by the C# bindings.

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9733
2019-08-23 15:03:31 -04:00
Mike Blumenkrantz 42d10b84be elm/config: always use default profile with EFL_RUN_IN_TREE
Summary:
if this env var is set, we're probably running unit tests or something
and we should ignore ELM_PROFILE

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9701
2019-08-23 13:38:33 -04:00
Yeongjong Lee b60e949fb6 efl_ui_table: remove inlist items in EINA_INLIST_FREE macro
Summary:
Check the EINA_INLIST_FREE document
```
in eina_inlist.h

NOTE: it is the duty of the body loop to properly remove the item from the
inlist and free it. This function will turn into a infinite loop if you
don't remove all items from the list.
```

This will avoid infinite loop when Efl.Ui.Table is invalidated.

ref T8145

Test Plan: See the test file in T8145

Reviewers: brunobelo, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8145

Differential Revision: https://phab.enlightenment.org/D9699
2019-08-23 13:38:33 -04:00
Mike Blumenkrantz e2b6e18577 efl_ui/scroll_util: block scroll calc tsunamis caused by repeat signal emits
Summary:
the 'efl,action,scroll' signal should only occur (at most) one time during
each signal process loop, so restrict it for this case

furthermore, the bar pos_changed and size_changed callbacks are always
triggered sequentially, so there's no need to emit the signal in both
callbacks

this fixes infinite edje embryo errors and massively improves scroll perf

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9681
2019-08-23 13:38:33 -04:00
Yeongjong Lee 6b3d430f12 efl_ui_scrollbar_direction: replace with efl_ui_layout_orientation
Summary: ref T7924, T7884

Reviewers: segfaultxavi, bu5hm4n

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7924, T7884

Differential Revision: https://phab.enlightenment.org/D9612
2019-08-23 13:38:32 -04:00
Mike Blumenkrantz 4acb83c8d9 efl_ui/image: explicitly mark 'drop' event @beta
this should probably be removed altogether but until dnd exists ensure
that this doesn't accidentally get released

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9705
2019-08-23 07:33:59 +02:00
Mike Blumenkrantz e84ecd9552 efl_ui/image: scalable -> efl.gfx.image::can_up/downscale
this removes the property from the image class to use the properties
from the interface

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9704
2019-08-23 07:33:58 +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
Mike Blumenkrantz 81183e0423 efl_ui/image: implement efl.gfx.arrangement content_align to replace align prop
this is effectively the same thing. no uses of this functionality exist anywhere

ref T7873

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9688
2019-08-23 07:33:55 +02:00
Mike Blumenkrantz 7442ae7092 efl_ui/image: remove geometry from internal struct, clean up geometry methods
these methods exist only to trigger efl_canvas_group_change on geometry
change and apply image sizing policies, there's no need to duplicate existing
functionality as well

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9687
2019-08-23 07:33:54 +02:00
Mike Blumenkrantz 28fff16739 efl_ui/image: add group_calc implementation, use deferred calc for sizing
this changes image internals to use the more standardized group_calc method
of sizing and causes all previous operations on the image which would have
resulted in an immediate recalc to instead defer the calc until the
group_calc function is called

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9686
2019-08-23 07:33:53 +02:00
Mike Blumenkrantz 01fc7eae35 elm: fix macro for group_calc function naming
this should be efl_canvas_group_group_calculate to match eolian function
naming

no functional changes

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9685
2019-08-23 07:33:52 +02:00
Mike Blumenkrantz f64a0966dc efl_ui/popup: remove text_alert class
this can now be done by simply calling
efl_ui_widget_scrollable_content_scrollable_text_set on an alert popup

tests have been adjusted for this

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9677
2019-08-23 07:33:51 +02:00
Mike Blumenkrantz 1d2d15bbf8 efl_ui/scrollable_content: add scrollable_text property
this creates a label with a scroller and manages sizing calcs

note that efl_ui_text cannot be used here because its sizing calc model
is incompatible with efl

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9676
2019-08-23 07:33:50 +02:00
Mike Blumenkrantz 9d8735caf7 efl_ui/popup: remove scroll_alert class
this can now be done by simply calling efl_ui_widget_scrollable_content_set
on an alert popup

tests have been adjusted for this

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9675
2019-08-23 07:33:49 +02:00
Mike Blumenkrantz 1a517b4c2d efl_ui: add scrollable_content mixin
this allows content to be set with a scroller that automatically handles
its own sizing calcs so that widgets/apps don't have to

@feature

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9674
2019-08-23 07:33:48 +02:00
Jaehyun Cho d4d1826b47 efl_ui_spotlight: add null check for manager stack data
Like other functions, null check for manager stack data is added before
referencing manager stack data.
2019-08-23 13:51:44 +09:00
WooHyun Jung ebb685aae1 efl_ui_slider_interval: cut off the dependency with efl_ui_slider
efl_ui_slider_interval is totally different widget from efl_ui_slider.
Now, it extends efl_ui_layout_base and implements all efl_ui_slider's
functionalities by its own.
This class needs to be marked to @beta till reviewing whole class
definitions again.

@ref T7893

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9696
2019-08-22 15:36:38 +02:00
subhransu mohanty 10b2f65e60 elm/config: avoid unnecessary elm cache flush
Summary:
in config_apply() we load the deafult theme and then
elm_recache() just throws it away.

so just move it before config_apply for time being.
We need to revisit to check if we really need that elm_recache() in that
function or not.

Reviewers: Hermet, raster, cedric, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9700
2019-08-22 08:14:14 -04:00
Yeongjong Lee e8a32d72c6 efl_ui_widget: correct the comparison parameter in scroll_freeze_pop
Summary:
It is copy/paste error.
See also, e7986cc646

Reviewers: bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9695
2019-08-22 07:17:03 -04:00
Carsten Haitzler be6555e754 fix e did again after crash from dnd fix 2019-08-22 00:47:10 +01:00
Carsten Haitzler aa21bd3c60 elm - efl ui - dont crash if parent is not an elm widget 2019-08-22 00:22:39 +01:00
Carsten Haitzler e15d9c86df eina file refs in edje/evas - audit them and plug holes where refs stay
in 1 situation at least we delete the eina file (close it) but keep
the ptr around (during destruction) which could cause issues with
callbaks and events on del and so on.... which may lead to multiple
closes where only one should happen ... which would explain my invalid
eina file ref problems i'm seeing. i carefully matched eina file
handle stores/opens/dups to closes in edje/evas and they seemed to all
match up so this audit with comments and fixes seems to have plugged
that now.

@fix
2019-08-21 20:02:24 +01:00
Carsten Haitzler 79228cd723 elm theme - handle error cases and eina file handles properly
@fix
2019-08-21 20:02:23 +01:00
Cedric BAIL 00d58640e5 efl: mark Efl.Ui.Factory.create a protected method.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9606
2019-08-21 11:18:46 -07:00
Cedric BAIL 296eade307 elementary: prefer use of Efl unified API.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D9603
2019-08-21 11:18:40 -07:00
Cedric BAIL a473601ce7 elementary: Efl.Ui.Layout_Factory should not set the theme if there isn't any defined.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9602
2019-08-21 11:18:38 -07:00
Cedric BAIL f6cdbc2d43 elementary: allow Efl.Ui.Factory to have a chance to call constructor function.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9599
2019-08-21 11:18:36 -07:00
Cedric BAIL 0248d504b3 elementary: switch Efl.Ui.Factory API to a batch API and update all class using it.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>>
Differential Revision: https://phab.enlightenment.org/D9579
2019-08-21 11:18:34 -07:00
Marcel Hollerbach b8bf5b31e8 efl_ui_widget: fix model listenting logic
if we are walking this method twice (spoiler we do!) then we subscribe
twice to the event, which leads (depending on the order of executed
deletion) to the accessing of obj after its deleted.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9684
2019-08-21 10:46:37 -07:00
Marcel Hollerbach 4cede693a5 efl_ui_widget: remove self reference
as an example: elm_test uses roughly 500 widgets, this pointer takes 8
bytes, this is wasting quite some time, which can be perfectly safed by
just structuring the code a little bit more. In some callbacks we need
to call one more time efl_data_scope_get but that is not a that big
issue, as most calls after that are also doing a eo call on that object,
so the eo_id is already cached.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9683
2019-08-21 10:46:34 -07:00
Mike Blumenkrantz bedb6df973 efl_ui/popup: remove anchor_popup class
Summary:
all functionality is now merged into the base popup class. this greatly
simplifies the codebase and deduplicates a lot of code

ref T7902
Depends on D9651

Reviewers: cedric

Reviewed By: cedric

Subscribers: herb, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T7902

Differential Revision: https://phab.enlightenment.org/D9652
2019-08-21 10:42:04 -04:00
Yeongjong Lee bb62f71fe2 efl_ui_widget: ensure that tree_unfocusable is binary number in its getter
since 2dd596084b, tree_unfocusable is changed from
Eina_Bool to int.
Double negation ensure binary return value of `elm_widget_tree_unfocusable_get`

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9673
2019-08-21 14:20:33 +02:00
WooHyun Jung 1cbcbbdfa6 efl_ui_slider : remove all the legacy checking
Summary:
Legacy checking is not needed because elm_slider
was separated from efl_ui_slider.

@ref T7893

Reviewers: Jaehyun_Cho, bu5hm4n, zmike

Reviewed By: Jaehyun_Cho

Subscribers: YOhoho, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7893

Differential Revision: https://phab.enlightenment.org/D9670
2019-08-21 19:14:57 +09:00
Yeongjong Lee 78f5efbd67 efl_ui_animation_view: add document of Efl.Ui.Animation_View_State enum
Summary:
This patch will fix mono compiler error.
```
src/bindings/mono/efl_ui_animation_view.eo.cs(2809,13): error CS1591: Warning as
Error: Missing XML comment for publicly visible type or member `Efl.Ui.AnimationViewState'
```

Test Plan: meson setup -Dbindings=mono,cxx

Reviewers: Jaehyun_Cho, SanghyeonLee

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9672
2019-08-21 19:00:30 +09:00
Marcel Hollerbach b5f458f5b8 efl_ui_widget: fixup field counting
this has to use tree_unfocusable not disabled.

ref D9644

Reviewed-by: YeongJong Lee <yj34.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9671
2019-08-21 11:59:15 +02:00
Yeongjong Lee 1c1382e09b efl_ui_panel: remove dependency with elm_interface_scrollable
`elm_interface_scrollable` is replaced with `efl_ui_scrollable_interative`.

Legacy code related to `SCROLL` event is removed because eo `SCROLL` event have
`void` event info.
```
in lib/efl/inferfaces/efl_ui_scrollable.eo

scroll: void; [[Called when scrolling]]

```
I think we need to add new `PANEL_SCROLL` event that have `Efl_Ui_Panel_Scroll_Info`

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9637
2019-08-21 11:59:14 +02:00
Yeongjong Lee e7986cc646 efl_ui_widget: correct the comparison parameter in scroll_freeze_push
I guess it is copy/paste error.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9669
2019-08-21 11:59:12 +02:00
Hermet Park 8900cf0715 efl_ui_animation_view: introduce a new widget for controlling vector animation.
Summary:
This is a new convenient ui control that designed to load vector resources
-svg, json-, and control animations if it supports.

Please turn on evas-loaders-json in meson options,
if you'd like to use Lottie Animation.

Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>

@feature

Reviewers: #committers, jsuya, zmike, bu5hm4n

Reviewed By: #committers, bu5hm4n

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9451
2019-08-21 17:40:15 +09:00
Yeongjong Lee 5f4c9a4458 efl_ui_widget: fix dereference null return value issues
Dereference null return value issues is reported by Coverity.

If `sd` is NULL, it will return zero values.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9668
2019-08-21 09:47:19 +02:00
Yeongjong Lee 38cec03d67 efl_ui_collection: use length value for even parameter of eina_spans_intersect
Parameter of `eina_spans_intersect` are pairs of point and length.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9655
2019-08-21 07:56:54 +02:00
Marcel Hollerbach 9eef883312 efl_ui_position_manager_common: generalize code
move the same code to a common header file.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9630
2019-08-21 07:50:55 +02:00
Marcel Hollerbach 3cb3c1c4b1 efl_ui_position_manager_grid: start to honor group items
This commit introduces the correct placement of group items and normal
items. The gruop items are also floating on the top of there child items
in case they are not visible on theire own. Items without group items
between items with groups are right now a little bit troublesome and
might display the wrong group, we *need* to check later on if this case
is even needed or not.

The whole placement code now uses 2 different caches, one cache is
counting how many groups we have, and how many items each group has.
Additionally, the size of the header + the state of the header is
safes. The second cache does translate that into how much size one full
group needs on the screen to be placed, this makes the calculation of
the correct item placement a lot faster.
The invalidation of the caches is also quite good. The size cache only
depends on the viewport size and the group cache, which means its
*never* recaclulated on a normal scroll operation. Only if items are
added, or the widget is resized (The later case can also be more
optimized). The group cache is only invalidated when new items are
added (Which is normally not happening during rendering)

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9608
2019-08-21 07:50:53 +02:00
Marcel Hollerbach 58c3e676e8 efl_ui_position_manager_common: fix buffer_id
the buffer was accessed with the wrong id, buffer_id should be used.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9607
2019-08-21 07:50:52 +02:00
Marcel Hollerbach 5ad686bc85 efl_ui_position_manager_list: make it handle group items
this makes the group items stick at the top of the viewport, if the
corresponding items in there do have the item available.
For now items between two groups are not really handled, the group
header will still just be displayed.

The code for this feature is explicitly written in a single block, it
was said that we might want to have this able to be enabled / disabled
later on.

This commit also shuffels the code here a bit, one single method just
got too long.

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9587
2019-08-21 07:50:51 +02:00
Marcel Hollerbach e2b859bdae efl_ui_position_manager: pass on information about group ids
every batched call will now contain the id of the first item, if the
conditions in the documentation are met.

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9586
2019-08-21 07:50:50 +02:00
Marcel Hollerbach 3ce3b3d48c introduce group item
this brings a group item in the style of genlist / gengrid group items.

The group item theme does currently not provide the signals in the theme
that would be needed for selecting it. This is kind of intended, but we
might need API to express that.

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9583
2019-08-21 07:50:46 +02:00
Marcel Hollerbach 2dfc69397b efl_ui_default_item: remove item parts
these parts are hard copies of the part implementations given from the
layouts. Replacing them with the layout implementation just works

ref T8115

Differential Revision: https://phab.enlightenment.org/D9582
2019-08-21 07:50:45 +02:00
Marcel Hollerbach 1856596698 introduce default item
default item is used as base class for all "normal style" efl items.

A "normal style" efl item does have a text,content & extra part.

- The text part is usally used to express some text in the item
- Content part is the *main* content part where the user attention is
on.
- Extra can be used to display some elements that are not directly
getting the attention of the user, it can be seen as something more than
the decoration item field.

ref T8115

Differential Revision: https://phab.enlightenment.org/D9629
2019-08-21 07:50:44 +02:00
Mike Blumenkrantz 8c1354aef9 efl_ui/popup: watch for hint change (safely) on popup object
ensure that setting user hints on this object triggers a recalc

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9651
2019-08-20 12:30:11 -07:00
Marcel Hollerbach c323a99037 efl_ui_widget: remove unused field
its not used ...

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9647
2019-08-20 12:30:09 -07:00
Marcel Hollerbach 3c098673ab efl_ui_widget: remove x,y,w,h
this is used for storing the position and size of the widget. However,
just in elm_test this eats 2KB of ram, just for saving them. The cases
where they have been used do not seem like a great performance hotspot,
additionally, in the panel cases the privat data of the widget is
achived anyways, so eo is involved and we are spending some time there
anyways.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9646
2019-08-20 12:30:07 -07:00
Marcel Hollerbach 56752e0b3b efl_ui_widget: do not walk parent chain for none legacy cases
walking here the parent chain can be very costly, esp. if you make a lot
of widgets visible or hide them. With this commit we ensure that we only
walk the parent chain when there is a custom chain, which is only the
case in legacy. This gets us about 2-3 FPS on the rpi with the
item_container benchmark.

With earlier commits, tree_unfocusable and disabled is honoring the
whole parent chain, so checking that alone, without the parent chain, is
fine.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9645
2019-08-20 12:30:05 -07:00
Marcel Hollerbach 2dd596084b efl_ui_widget: make treeunfocusable state easier
Before this patch tree unfocusable set just set a simple flag, getting
this state however forced you to traverse the whole parent chain to get
the real result.
With this patch the setting of the unfocusable flag is heavier as it
walks all the children of the widget, however, the getting of the flag
is way easier now. The next revision will refactor the focus related
APIs for that.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9644
2019-08-20 12:30:03 -07:00
Marcel Hollerbach b4b17993d5 efl_ui_widget: skip custom focus parent logic
asking for a parent provider only makes sense if we are having a custom
focus parent provider, otherwise this will just result in the normal
parent relation. Not doing this safes us a lot of time that we spent for
nothing in the focus evalulation code.

The gengrid change is needed as the parent provider should be applied
after the constructor is called, otherwise there is no garantee that
shared_win_data is not NULL.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9643
2019-08-20 12:30:00 -07: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 bc0bd4eb3f efl_ui/scroller: process edje signals during group calc
Summary:
scrollbars (and other parts) can have min sizes which affect sizing calcs,
so it's necessary to ensure that these signals are processed before trying
to size in order to get the correct size
Depends on D9593

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9594
2019-08-20 09:11:18 -04:00
Mike Blumenkrantz cc6669c0d2 efl_ui/popup: replace legacy image use with efl_ui_image
Summary: new widgets should not use legacy widgets internally

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9590
2019-08-20 09:11:12 -04:00
WooHyun Jung ebae12f06a elm_slider: remove dependency with efl_ui_slider
Summary:
This commit includes follwoing works.

1. change parent class from EFL_UI_SLIDER_INTERVAL
  to EFL_UI_LAYOUT_BASE
2. get all necessary codes from efl_ui_slider and
   efl_ui_slider_interval to elm_slider
3. add callbacks to slider test code

ref T7893

Test Plan:
1. elementary_test
2. slider
3. operate sliders on the window

Reviewers: bu5hm4n, segfaultxavi, eagleeye, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7893

Differential Revision: https://phab.enlightenment.org/D9623
2019-08-20 09:09:14 -04:00
Yeongjong Lee 81a7b79235 efl_ui_scroll_util: set drag_step of parent edje object
Summary: Depends on D9649

Test Plan: elementary_test -to 'efl.ui.scroller'

Reviewers: eagleeye, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9650
2019-08-20 09:07:13 -04:00
Yeongjong Lee 8f32138f1f efl_ui_scroll_util: emit edc signal that fix scroll arrow visibility
Summary:
"efl,action,scroll" signal will update arrow state.

ref T8051

Test Plan: elementary_test -to 'efl.ui.scroller'

Reviewers: eagleeye, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8051

Differential Revision: https://phab.enlightenment.org/D9649
2019-08-20 09:07:13 -04:00
Marcel Hollerbach ead8a28057 efl_ui_widget: optimize size / position setting
calling geometry set here is again calling the API in canvas object that
splits this call to size_set and position_set which means we spent quite
a bit of time in eo, just to call the same APIs we could call directly.
With this commit here, the calls are directly going to the right
objects, with the right API.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9619
2019-08-20 07:42:43 +02:00
Marcel Hollerbach cbf7d71eeb efl_ui_focus_manager_calc: use a mempool instead of calloc / free
if we are heaving a streak of showing / hiding a lot of widgets we free
and calloc the same nodes all the time. This now lowers the amount of
callocs / frees that we are doing

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9618
2019-08-20 07:42:41 +02:00
Marcel Hollerbach ef858e1bfa efl_ui_focus_manager_calc: safe if this is root in a flag
otherwise we would need to get the private data of the focus manager
which is quite a heavy operation. This is slowing down enormously the
visibility setting of widgets.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9617
2019-08-20 07:42:39 +02:00
Marcel Hollerbach c1e6197b21 efl_ui_focus_manager_calc: optimize item deletion
if there is high frequency adding and deleting of items, the deletion
here can be quite heavy, this makes freeing a little bit faster.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9616
2019-08-20 07:42:38 +02:00
Mike Blumenkrantz 409c42e46b efl_ui/text: attempt to size more accurately in non-scroll mode
the internal text object provides a min size based on its current geometry,
so temporarily match the geometry of the overall object in order to provide
a somewhat more accurate calculation sooner for this object

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9598
2019-08-19 16:47:20 -07:00
Mike Blumenkrantz e7cc65bdeb efl_ui/popups: convert from elm_scroller to efl_ui_scroller internally
efl_ui widgets should not use legacy widgets internally

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9596
2019-08-19 16:47:18 -07:00
Mike Blumenkrantz c4e03dcea4 efl_ui/scroller: create scroll manager in constructor
this fixes setting scroller properties during construction

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9593
2019-08-19 16:47:16 -07:00
Mike Blumenkrantz 6e54c58b9c efl_ui/scroller: directly trigger group_calc if pan is resized during canvas calc
this is the time when all calculations need to be handled, so ensure that the
widget directly updates itself here instead of deferring in order to avoid
infinite recalc loops

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9592
2019-08-19 16:47:14 -07:00
Mike Blumenkrantz 617bc90f12 efl_ui/scroll_util: don't trigger group_calc again on size changes
this is already handled elsewhere and can cause infinite recalc loops

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9591
2019-08-19 16:47:12 -07:00
Mike Blumenkrantz 187425e12c elm/hoversel: manually trigger group_calc for internal objects
hoversel doesn't implement group calc or do any sane type of sizing
so just manually call these on demand to ensure the correct size is used

fix T8127

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9632
2019-08-19 16:47:06 -07:00
Mike Blumenkrantz 1948bf0d07 elm/hoversel: avoid calling api functions on null hoversel objects
the hoversel must be created before it can be shown, and its internal
hover object may be destroyed when it is hidden

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9631
2019-08-19 16:47:04 -07:00
Cedric BAIL 945447d1f8 elementary: properly refcount the key of the hash used by Efl.Ui.Layout_Factory property bind.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9578
2019-08-19 15:25:19 -07:00
Lauro Moura ed22ad99a3 elm: avoid clash in Collection.Focus_Manager
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9627
2019-08-19 18:21:01 +02:00
Vincent Torri 01b987df59 make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.

One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()

Test Plan: compilation on Windows

Reviewers: cedric, raster, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9542
2019-08-19 09:55:13 -04:00
Carsten Haitzler ae5fbe49ef elm slider - delete timers on destruction that should be deleted
also use safe free to set to null
2019-08-18 10:28:51 +01:00
Carsten Haitzler 49602f7426 elm hoversel - avoid crash when items modified while popping down
this fixes a crash i saw with asan on pop down if items change at that
time. @fix
2019-08-18 00:25:39 +01:00
Daniel Kolesa 8a8a833837 eolian: rename @class on methods to @static
Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
2019-08-16 16:27:00 +02:00
Carsten Haitzler c3c903b9cc elm - dnd - fix drop target del to not nuke handler all the time
this broke dnd if u have multiple drop targets in a window... keep the
functions there if we still have drop targets... especially in x11.

@fix
2019-08-15 13:27:54 +01:00
Carsten Haitzler 894c1b34b3 elm entry - respect plain text newlines on paste again...
make this work like it used to... fixes T8135
2019-08-15 00:08:57 +01:00
Lauro Moura 252f0c42a0 elementary: Avoid segfault when part is not set.
Check whether we called `efl_part_get` before.

This was happening to C# bindings (maybe a bug there?) but in any case a
failure is safer than a segfault.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9563
2019-08-14 12:08:19 -07:00
Mike Blumenkrantz 11d2202635 efl_ui/text_scroller: remove erroneous max size hint setting
this makes no sense

ref T8122

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9554
2019-08-14 12:08:15 -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 144d086fd7 efl_ui/popup: remove 'expandable' property from popup subclasses
this is more or less just the max size hint, so just set the max size
hint

ref T7902

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9550
2019-08-14 12:08:06 -07:00
Mike Blumenkrantz 0c72d430c3 efl_ui/popup: remove popup_size property
this was more or less just a wrapper around efl_gfx_entity_size_set
and resulted in unpredictable behavior depending on when it was called

instead, simply set the min size hint on the popup object

ref T7902

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9549
2019-08-14 12:08:04 -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 07e810c5cc efl_ui/layout: implement unimplemented methods
Summary:
add redirects to internal layout objects for these methods
Depends on D9561

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9562
2019-08-14 19:25:53 +02:00
Mike Blumenkrantz c48903f7df efl_ui: mark localization methods with @empty for containers
Summary:
these classes cannot be localized
Depends on D9560

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9561
2019-08-14 19:25:27 +02:00
Mike Blumenkrantz 304f4ce9bb efl: remove Efl.Ui.I18n from canvas object inheritance
Summary:
canvas objects do not need localization because they are not directly user-facing

this should only be inherited by objects which need to be localized
Depends on D9559

Reviewers: q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9560
2019-08-14 19:25:09 +02:00
Yeongjong Lee 51a644d966 efl_ui: remove duplicated hint_min_set code
Summary:
evas_object_size_hint_min_set call efl_gfx_hint_size_restricted_min_set
internally.

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9567
2019-08-14 09:56:42 -04:00
Yeongjong Lee c857955a4e efl_ui_layout: remove efl_gfx_hint_size_min_set in _sizing_eval
Summary:
`evas_object_size_hint_min_set` is replaced with `efl_gfx_hint_size_min_set` in
4d79efce6. it is able to have backward compatibility issue because
`evas_object_size_hint_min_set` call `efl_gfx_hint_size_restricted_min_set`
internally.
```
evas_object_main.c:2501
EAPI void
evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
{
   efl_gfx_hint_size_restricted_min_set(obj, EINA_SIZE2D(w, h));
}
```

This patch remove unnecessary min_set call.

Test Plan: elementary_test

Reviewers: zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9566
2019-08-14 17:48:32 +09:00
Jaehyun Cho b8d1747382 efl_ui_layout: fix typo in _sizing_eval 2019-08-14 10:29:49 +09:00
Cedric BAIL a5a7c67bdf elementary: add support for efl_ui_property_bind to all efl_part inheriting from widget using reflection.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D9528
2019-08-12 10:13:35 -07:00
Cedric BAIL 74aff95fca elementary: add support for widget part property bind.
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D9527
2019-08-12 10:13:33 -07:00
Carsten Haitzler b0ad81d927 elm ctxpopup - be consistent with scope data checks
makes coverity happy.

CID 1403898
2019-08-11 12:47:38 +01:00
Mike Blumenkrantz 1334514cfe efl_ui/popup: apply user min size hints during group_calc
if these hints are set, they should be used

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9539
2019-08-09 10:25:28 -07:00
Mike Blumenkrantz 3aee9a96c0 efl_ui/popup: optimize popup sizing calcs slightly
ensure that scroll-based popups don't accidentally trigger a full
recalc and (wrong) size change during group_calc by hitting the base
popup size_set() implementation and setting the needs_calc flag or
by using the base popup calc code when it should not be used

this resolves a corner case sizing issue in the text_alert 2 popup
case in elm_test which seems to have been present for a long time

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9538
2019-08-09 10:25:26 -07:00
Mike Blumenkrantz 219cb6fe9e elm/config: clear env var hash on shutdown
env vars should not be retained when this subsystem is not "active"

fixes unit test running

ref 9149767184

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9537
2019-08-09 10:25:24 -07:00
Hermet Park 21bebe0422 efl_ui_textpath: clear up path data when it's destructed.
This fixes path data memory leak.

@fix
2019-08-09 13:43:50 +09:00
Carsten Haitzler 9149767184 getenv - reduce continually calling getenv for the same vars do once
do it once and remember the result from the first one. drops overhead
for sure by a chunk i actually could see in perf reports like about 1-2%
of cpu...
2019-08-08 23:57:02 +01:00
Boris Faure cdb920ab08 get rid of shadow variables
Summary: gl: add some EINA_FALLTHROUGH

Reviewers: #reviewers, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9525
2019-08-08 17:18:46 -04:00
Marcel Hollerbach 2c0ea5b5e3 efl_ui_focus_layer: we should cleanup on invalidate
Summary:
otherwise there will be errors. Lets pray this did not break anything
else.
Depends on D9518

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9521
2019-08-07 10:24:08 -04:00
Marcel Hollerbach d11551050d efl_ui_item: fix event emission
with this commit events are emitted correctly, even if the container is
already on the way to deletion. Additionally, the codepath that is
triggered when the item is selected via clickable is now also going
through the selected property.

ref 7905

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9517
2019-08-07 14:48:42 +02:00
Marcel Hollerbach 54c524f7f6 introduce efl_ui_multi_selectable and efl_ui_single_selectable
right now they are just thin wrappers from what have been in
efl_ui_collection. This is just a first effort, the interfaces have to
be equipped with more and better API, more events, and tests.

ref T8057

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9515
2019-08-07 14:48:41 +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
Marcel Hollerbach f7035fac67 efl_ui_selectable: this should be beta
sorry, i forgot that ... :(
2019-08-07 10:38:33 +02:00
Marcel Hollerbach 9baa96c352 efl_ui_check: migrate from own property to Efl.Ui.Selectable
this is the basic work for getting radio group as a single_selection
interface, which can be a part of mutli_selection. Which will come both
later on.

ref T8057

Differential Revision: https://phab.enlightenment.org/D9504
2019-08-06 17:09:42 +02:00
Marcel Hollerbach 912dfe270e efl_ui_focus_manager_root_focus: perform focus switch delayed
Summary:
Delaying the unregistering here ensures that there is not focus set call
while a object is beeing registered in the focus manager.

ref T8081

Reviewers: zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8081

Differential Revision: https://phab.enlightenment.org/D9513
2019-08-06 10:52:32 -04:00
Marcel Hollerbach 63d3af3ce9 efl_ui_collection: implement initial focus behaviour
Summary:
the behaviour here is that the next item according to the direction is
getting focused. This sounds easy but is quite complex given the fact
that the items might be hidden. This is the first draft for this, to see
how good it performes.

Reviewers: zmike, stefan_schmidt, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9496
2019-08-06 09:34:42 -04:00
Vincent Torri 5536bcd90e remove useless definition of the macro HAVE_MMAN_H
use HAVE_SYS_MMAN_H when including sys/mman.h and HAVE_MMAP when using mmap()

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9494
2019-08-06 10:01:39 +02:00
Mike Blumenkrantz 15eff40820 efl_ui/popup_backwall: implement efl.file file and key get methods
these need to be proxied to the internal image object to return
correct values

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9508
2019-08-06 09:26:40 +02:00
Mike Blumenkrantz 962a777c10 efl_ui: add popup headers to Efl_Ui.h
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9507
2019-08-06 09:26:39 +02:00
Mike Blumenkrantz 067d65361e efl_ui/text: handle disabled text
no idea what's going on here with new styling but this makes it look
like it should

ref T6649

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9502
2019-08-06 09:26:36 +02:00
Mike Blumenkrantz 8f8e19df20 efl_ui/clock: remove unused functions
these were used for clock module functionality that has since been removed

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9501
2019-08-06 09:26:36 +02:00
Mike Blumenkrantz c9299f0caa efl_ui/clock: remove legacy api/widget use internally
new widgets should use unified api internally

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9500
2019-08-06 09:26:35 +02:00
Mike Blumenkrantz 88910d6a65 efl_ui/clock: remove module interface
this was overly complex and never actually used

ref T7868

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9499
2019-08-06 09:26:34 +02:00
Marcel Hollerbach 1bd9a8f232 introduce a new interface efl_ui_selectable
this is meant to be implemented by entities that *can* be selectabled
(not to be confused with containers that can have selected contents)!

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9503
2019-08-05 19:49:13 +02:00
Marcel Hollerbach fc12e7721f efl_ui_selectable: split this up
i dont know why, but something got badly mixed up, the selection APIs
for text and item ended up in the same interface, which seems ... weird
?
This commit splits that up into container_selectable and
text_selectable, there is no future plan on my list for text_selection.
The rest of this series is working towards removing
container_selectable, replacing it with a new interface. However, the
interface will stay until list_view is replaced.

The changes in the legacy code are removing the efl.ui.selection
interface from it, item emission is not depending on the inherited
interfaces, additionally, this interface does not provide any API, so
this should not be an issue.

ref T7766

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9498
2019-08-05 19:49:12 +02:00
WooHyun Jung 53649030db efl_ui_action_connector: rename clickable_util to action_connector
efl_ui_clickable_util was only for efl_input_clickable interface,
but there can be more cases which want to connect object event
to specific action interfaces (such as scrolling) in the future.
For that extension, efl_ui_action_connector seems better.

ref: T7847

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9486
2019-08-05 17:44:32 +02:00
Carsten Haitzler ce44122f61 elm theme - fix leak in error cse in elm theme mmap set
we don't free the eina file handle on error. coverity found it. fix

fix CID 1402680
2019-08-05 14:28:40 +01:00
Yeongjong Lee f2b1f312a9 efl_input_key: replace key property name with key_sym
Summary:
Sorry to touch stable eo classes. there is name conflict issue between class and
property when binding language is generated from eo. for example in C#, compiler
error occurs.

```
src/bindings/mono/efl_input_key.eo.cs(272,26): error CS0542:
`Efl.Input.Key.Key': member names cannot be the same as their enclosing type
```

This patch changes Efl.Input.Key.GetKey/SetKey method to
Efl.Input.Key.GetKeySym/SetKeySym and generates Efl.Input.Key.KeySym
property.

Note that CAPI is not changed.

ref T8093

Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true

Reviewers: lauromoura, woohyun, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8093

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

zmike note: this class was not released at the point of this patch, the class
was only recently marked as stable
2019-08-05 08:51:22 -04:00
Marcel Hollerbach 94b05f15e6 efl_ui_spin/button: move from elm_ to efl_ prefixed functions
Summary:
this moves a bunch of api calls from elm_ to efl_. Those calls that are
called on the entry object are still elm, as well as access APIs, they
will have to be moved once efl_ui_text is usable.
Depends on D9475

Reviewers: segfaultxavi, cedric, zmike

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9488
2019-08-05 08:47:00 -04:00
Marcel Hollerbach 7869778d02 efl_ui_spin: move the step implementation to spin_button
having efl_ui_spin implementing efl.ui.range_interactive does not make
sense. Efl.Ui.Spin is a not interactive widget, so it should not
implement that interface.

ref T7897

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9475
2019-08-03 20:40:11 +02:00
Marcel Hollerbach 42bbe0e58f efl_ui_spin_button: fix initial displaying of formatting string
spin_button should also implement formatted_apply, the label has a
different part name then spin.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9474
2019-08-03 20:40:10 +02:00
Marcel Hollerbach 7558620957 efl_ui_spin_button: stop calling only the parent
if the spin button is skipped the spin is called directly, the label
will display the wrong value.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9473
2019-08-03 20:40:09 +02:00
Carsten Haitzler db18d67af9 elm toolbar - fix toolbar item separators and refactor aling/fill of item
only set this is one place and thus get it consistent/right for
separators vs other items.

@fix
2019-08-02 17:17:48 +01:00
Carsten Haitzler efd45df1c4 elm toolbar - fix packing options at start to avoid visual layout bugs
i spoetted open moving around and shrinking when it shouldnt -
packging options (fill/align) not always set right. this fixes that.

@fix
2019-08-02 16:41:12 +01:00
Mike Blumenkrantz ded6dc9017 efl_ui/tags: set entry to fill vertically
forgot this in previous patch

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9479
2019-08-01 14:37:10 -07:00
Mike Blumenkrantz b89e7b3500 efl_ui/tags: use user size hints for internal objects
restricted min size hint should only be set by an object's own group_calc
function. all other cases should use regular min size hint

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9477
2019-08-01 14:37:07 -07:00
Mike Blumenkrantz fe849c9666 efl_ui/flow.box: fix item calc with mixed weights
if a box contains an entire row of items with weight(0), and the next
row contains items with weights set, the item count must be correctly
incremented so that the box uses the right items in its calculations

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9480
2019-08-01 14:37:05 -07:00
Marcel Hollerbach 4f45749b14 efl_ui_position_manager: add event for updating the range
the new event can be used to message back the currently visible range
from the position to the collection / collection_view.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9462
2019-08-01 14:36:59 -07:00
Marcel Hollerbach fd860eb6e8 efl_ui_spin_button: rename circulate to wraparound
ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9461
2019-08-01 14:36:53 -07:00
Marcel Hollerbach 45b763a2dc efl_ui_spin_button: use the newly emitted event from range_interactive
this event is not also in range_interactive, so better use this.

ref T8097

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9459
2019-08-01 14:36:48 -07:00
Marcel Hollerbach 010f813572 efl_ui_range_interactive: add a new event
the steady event from slider now moved here. A spec test suite and the
corresponding implementations will follow.

ref T7894

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D9458
2019-08-01 14:36:45 -07:00
Christopher Michael a7971f409d efl_ui_collection: Mark unused parameter
double align is actually unused in this function, so mark it as such
2019-08-01 08:32:42 -04:00
WooHyun Jung d02a3ecb66 efl_input_clickable: add longpress_abort
Now, a specific class which uses efl_input_clickable_util is able
to cancel ongoing longpress event by calling longpress_abort.

This commit shows how efl_ui_text uses longpress_abort to satisfy
its own longpress use case

ref T7847

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9455
2019-08-01 11:33:03 +02:00
WooHyun Jung d2f7bacc2c efl_ui_clickable_util: remove efl_input_processed_set
Summary:
efl_input_processed_set needs to be used only when specific
event marks that it is monopolizing current user interaction.
(such as scrolling).
But, press event or unpress event looks not that proper.

Reviewers: bu5hm4n, Jaehyun_Cho

Reviewed By: bu5hm4n, Jaehyun_Cho

Subscribers: AbdullehGhujeh, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9454
2019-08-01 17:19:16 +09:00
Marcel Hollerbach d98d434e56 efl_ui_position_manager: move from accessor to function callback
this commit enables access to the item structure of the collection via a
function callback. The function callback now enables batching for items,
which does not pay off right now. However, a few more optimizations can
be done in order to get the whole payoff.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9445
2019-07-31 15:51:48 -07: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
Mike Blumenkrantz 02f1ce8d54 elm/colorselector: go back to using elm_box internally
legacy widgets should not use efl_ui widgets internally and vice versa

reverts b11f371703

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9465
2019-07-31 14:00:15 -07:00
Mike Blumenkrantz 407a0aa367 elm/colorselector: directly use smart callback api here
this is not a mixed legacy+unified widget, so we don't need to use
efl api here

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9464
2019-07-31 14:00:13 -07:00
Mike Blumenkrantz dd11dadfef efl_ui/tags: use flow box internally
the existing layout code here is basically just a flow box, so use that
instead to avoid mixing legacy widgets in unified ones

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9463
2019-07-31 14:00:11 -07:00
Marcel Hollerbach 6d0f514126 efl_ui_check/radio: use clickable
Summary:
with this commit the state of the check / radio buttons are changes when
the Widget is clicked. The Widget is now using clickable and emits all
the events.

ref T7865

Reviewers: segfaultxavi, zmike, Jaehyun_Cho, woohyun

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7865

Differential Revision: https://phab.enlightenment.org/D9456
2019-07-31 09:12:07 -04:00
Xavi Artigas 359a118cda Efl.Ui.Spin: Remove mouse wheel interaction
This widget is now meant as a base class for other widgets, with very limited
user interaction. Efl.Ui.Spin_Button already takes care of mouse wheel events.

Ref T7897

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9453
2019-07-31 12:44:31 +02:00
Jaehyun Cho b218dcbc3f efl_ui_spotlight: pop() unpacks content although there is one content
Previously, pop() does not unpack content if there is one content.

Now, pop() unpacks content without transition if there is one content.
Since there is no transition, NULL future is returned.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9450
2019-07-31 12:21:06 +02:00
Marcel Hollerbach f00e24de29 efl_pan: improve docs
Summary: documentation now reflects what is happening in the functions

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8863
2019-07-31 10:50:14 +02:00
Marcel Hollerbach 8f7fa82244 efl_ui_*: add the new events to the widgets
previous commit introduced new events to range_display. This commit
ensures correct emittation of those events.

ref T7895

Differential Revision: https://phab.enlightenment.org/D9372
2019-07-31 10:18:20 +02:00
Marcel Hollerbach c0082b1c71 efl_ui_range_display: move events from spin
we concluded min,reached and max,reached should be on every widget that
implements range_display. This here is the start of that work, the
events are moved, next commit fixes all widgets, the last commits
enables tests in the spec unit test.

ref T7897
ref T7895

Differential Revision: https://phab.enlightenment.org/D9371
2019-07-31 10:18:20 +02:00
Marcel Hollerbach 911eab3420 efl_ui_item: remove sizing eval code
i do not know why this code is there. But the same code is called in
layout itself, additionally this results in way less calls for
calculating the minsize (Not sure why).

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9425
2019-07-31 08:42:09 +02:00
Jaehyun Cho 959c68ca2e efl_ui_spotlight: add scroll_block to Manager_Scroll
To support blocking of scrolling movement, @property scroll_block has
been added to Manager_Scroll.
If scroll_block is set to be true, then scrolling movement by mouse
input is blocked.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9444
2019-07-31 08:42:08 +02:00
Mike Blumenkrantz c594c83a02 efl_ui/layout: use MAX macro for min size clamping in group calc
Summary: Depends on D9442

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9447
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz d17ec12faf efl_ui: always set restricted_min size hints internally
Summary:
regular min size hint is for users, internal calcs should use restricted

@fix

Depends on D9441

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9442
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 872d43f0a0 elm_layout: move elm_layout_sizing_restricted_eval to layout mixin
Summary:
this function should never need to be called on new widgets

Depends on D9440

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9441
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 4d79efce64 elm_layout: create a mixin to provide elm_layout_sizing_eval
Summary:
this removes elm_layout_sizing_eval entirely from the implementation
hierarchy of any efl_ui-based widgets, ensuring that future code will
correctly use efl_canvas_group functionality

Depends on D9439

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9440
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 7e517e2a11 elm/efl_ui: remove elm_layout_sizing_eval implementations
Summary:
historically there have been two methods of calculating sizes in elm:
* elm_layout_sizing_eval
* evas_object_smart_calculate (now efl_canvas_group_calculate)

the former was used to set size hints on widgets, while the latter was
used to perform internal size calcs for the widget. for things to
work correctly, these functions had to be triggered in just the right
order at just the right time. many hard-to-fix bugs related to widget
sizing over the years have been the result of this split

this patch removes elm_layout_sizing_eval implementations so that all
widgets perform both internal size calcs and size hint setting all
in the same function, ensuring that these are always in sync

the result is that in the vast majority of cases, far fewer recalcs
happen for widgets, and they are quicker to achieve their final size

Depends on D9438

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9439
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 586f41f927 efl_ui/layout_base: add subobjs_calc internal functionality
Summary:
this functionality forces group_calc on a layout's subobjects during
layout group_calc so that the layout's own group_calc will yield consistent
and correct results

currently this is only used in panel widgets

Depends on D9437

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9438
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz e583eba56b efl_ui/layout_base: add "finger_size_multiplier" property
Summary:
this feature is set on objects which inherit from layout_base in order to
allow automatically application of variable finger sizes based on a
widget's needs

an example of this would be a calendar, which is 7:8 fingers

this functionality is disabled by passing 0,0 as the property

@feature

Depends on D9436

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9437
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 46cf288d32 efl_ui/layout: implement group_calc, add finger size for inherited layouts
Summary:
this adds a group_calc implementation for the layout object (not layout_base)
to allow differentiation between inherited layout calcs and layout object
calcs

by using this, we can automatically apply finger size to inherited layout
calcs if the implementation ever reaches this point

Depends on D9435

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9436
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 268d06d381 efl_ui/layout: use min size hints when calculating layout size
Summary:
for legacy layouts, all min size hints should be considered when performing
size calculations

for non-legacy layouts, only "user" min size hints should be considered, as we
are calculating the restricted min size hint in this function

Depends on D9434

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9435
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz adc510f9ee efl_ui: change calls to elm_layout_sizing_eval to efl_canvas_group_change
Summary:
elm_layout_sizing_eval is a legacy function which should not need to be called
on new widgets

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Maniphest Tasks: T8059

Differential Revision: https://phab.enlightenment.org/D9434
2019-07-30 13:12:52 -04:00
Mike Blumenkrantz 36ff0a012c elm/config: fix config usage with EFL_RUN_IN_TREE set
when running in tree, elm_config should not attempt to access files
outside the tree, nor should it attempt to overwrite any existing config
files

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9433
2019-07-29 11:17:49 -07:00
Mike Blumenkrantz b561e9632e elm/config: monitor MODIFIED events on config files
eio/inotify now receives these events when the config file is modified,
even though the file is copied onto that location. this fixes config
updating at runtime

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9432
2019-07-29 11:17:46 -07:00
Marcel Hollerbach 2057957d21 efl_ui_pan: emit position changed when content is resized
even if the position is not really changed here, the min / max relation
has changed. If we do not emit this event here, every user (that
calculates a relative position) would have to monitor the pan position
and the size of the content. This simplifies the given usecase, and
fixes the scroller position when new items are added to the collection.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9411
2019-07-29 11:17:44 -07:00
Marcel Hollerbach 764f35b7a3 elm_test: add a example that shows efl_ui_item instances
this is just a little showcase to show the possible items

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9430
2019-07-29 11:17:42 -07:00
Mike Blumenkrantz 44ff1e73bb efl_ui/popup: unset callbacks on win object when parent is removed
these callbacks must be removed if there is no parent, otherwise they
may trigger once the widget is deleted and trigger invalid object access

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9429
2019-07-29 11:17:37 -07:00
Marcel Hollerbach 0ab05a8271 efl_ui_item: try to improve docs
its everything but perfect, but a start ...

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9424
2019-07-29 16:32:06 +02:00
Marcel Hollerbach 44a45e3aca efl_ui_item: migrate to Efl.Ui.Clickable
this adds the mixin to the item. With this commit every class inheriting
from Efl.Ui.Item will automatically emit all the clickable events.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8830
2019-07-29 16:32:05 +02:00
Mike Blumenkrantz a61cef3fb2 efl_ui/popup: implement efl.file.unload for popup backwall part
this fixes unsetting images for popup backwall

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9415
2019-07-29 16:21:12 +02:00
Mike Blumenkrantz a247bd0f56 efl_ui/popup: use correct class when setting popup backwall file
MY_CLASS failure strikes again

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9416
2019-07-29 16:21:11 +02:00
Marcel Hollerbach b4f5b78550 efl_ui_item: remove self field
Summary:
there is no reason to have this field, pd of a item is always passed
with the object.

Reviewers: segfaultxavi, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9423
2019-07-29 16:09:14 +02:00
Mike Blumenkrantz e0ae3a9a76 efl_ui/widget: check legacy type on correct object for scroll_hold push/pop
too much copy/paste

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9399
2019-07-29 16:06:20 +02:00
Mike Blumenkrantz 62d4d4c5b8 elm/ctxpopup: check list existence before trying to delete list items
this is kinda gross, but if the list is already deleted then the list
items are also gone and this is an invalid object access

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9402
2019-07-29 16:06:19 +02:00
WooHyun Jung 77e268e6ab efl_input_clickable: rename efl_ui_clickable to efl_input_clickable
Summary:
Renamed all efl_ui_clickable_XXX to efl_input_clickable_XXX based on
the discussion in T7847

ref T7847 T7976

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7976, T7847

Differential Revision: https://phab.enlightenment.org/D9427
2019-07-29 11:43:01 +02:00
Vincent Torri a6ade14c5e Evil: remove pwd code in Evil and fix compilation failures after the removal
Summary: remove pwd code in Evil

Test Plan: compilation

Reviewers: zmike, cedric, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9420
2019-07-28 09:27:27 +01:00
Mike Blumenkrantz 44dbf5c22a efl_ui/datepicker: adjust datepicker minimum limits
Summary:
this whole thing seems pretty busted but at least now it won't error and
break elm_test

t.tm_mday is 0 when the function in the macro returns, so this value needs
to be clamped like the others

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9398
2019-07-26 17:00:06 +02:00
Daniel Kolesa d964a04da1 eo: remove Efl_Event definition (replace with builtin) 2019-07-26 13:21:14 +02:00
Xavi Artigas e40f666807 Efl.Ui.Text: Minor tweaks on the documentation. 2019-07-26 09:48:16 +02:00
Cedric BAIL f66844ebbf elementary: use data:null to remove unecessary structure declaration.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9389
2019-07-25 21:03:11 +02:00
Mike Blumenkrantz 485d2e37d8 elm/glview: fix glview to (again) return null if context creation fails
Summary:
engine internals have changed, so it's necessary to actually check whether
the glview api is available now to determine whether the glview is viable

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9397
2019-07-25 14:46:58 -04:00
Mike Blumenkrantz 6c93461324 efl_ui/timepicker: fix range clamping on 12 hour timepickers
Summary: this errors all the time otherwise

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9396
2019-07-25 14:46:58 -04:00
Marcel Hollerbach e3557ec944 efl_ui_spotlight_manager_*: cleanup canvas state on invalidate
this is needed so we can support a empty object which is not freed.
Sounds useless, but required by bindings, this fixes the issue described
in D9300.

Differential Revision: https://phab.enlightenment.org/D9306
2019-07-25 20:42:39 +02:00
Marcel Hollerbach 2a970046bc efl_ui_spotlight_container: mirror the behavior of view_manager
setting the parent here is usefull, as we can forgot about this object
then, and do not have to free the object by hand.

Differential Revision: https://phab.enlightenment.org/D9305
2019-07-25 20:42:39 +02:00
Marcel Hollerbach 6d0b0baf9b efl_ui_spotlight_container: fix ownership behavior of view_manager
view_manager is a property that takes ownership of the view_manager
object. We are setting the parent in the setter which means, we should
actaully have one ref to the parent, and one from the caller, so we need
to unref one.

Differential Revision: https://phab.enlightenment.org/D9304
2019-07-25 20:42:38 +02:00
SangHyeon Jade Lee 670b7b4a83 efl_ui : apply item part visible signal properly.
efl_layout_signal is being overrided by efl_ui_layout,
so do not call the signal emit on resize object directly,
call the signal emit on the item widget.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9233
2019-07-25 20:27:42 +02:00
Marcel Hollerbach a4f7baa911 rename efl_ui_item_container -> efl_ui_collection
this is the first rename of the main widget, the renames of the test
suites will follow

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9408
2019-07-25 20:27:39 +02:00
Marcel Hollerbach 167d2475e8 efl_ui_grid_item: remove this
this is not needed anymore, the grid items can also just inherit
directly from the items.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9395
2019-07-25 20:27:38 +02:00