Commit Graph

4580 Commits

Author SHA1 Message Date
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