Commit Graph

57 Commits

Author SHA1 Message Date
Marcel Hollerbach 42f56d0a0a efl_ui_popup: do not leak the backwall part
freeing it in the destructor is not enough. This has to be done at the
invalidator stage, otherwise bindings might have a blocking element on
the screen for the time the object is not gargabe collected.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10837
2019-12-11 11:11:05 -08:00
Mike Blumenkrantz edab064de9 theme: efl,action,clicked -> efl,action,click
Summary:
action signals should infinitives

ref T8231
Depends on D10160

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8231

Differential Revision: https://phab.enlightenment.org/D10161
2019-09-25 17:55:50 -04:00
Mike Blumenkrantz 1ca07b72da efl_ui/popup: timeout -> closing_timeout
simple property rename

ref T7902

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9801
2019-08-30 19:15:10 +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 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
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
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
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 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 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 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 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 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
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 f9143ec634 efl_ui_popup: fix widget_parent inheritance
when you inherit from widget_parent, you MUST call the super function.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8680
2019-04-23 12:40:49 -07:00
Yeongjong Lee 41136db8e8 ui.widget: remove elm_widget_sub_object_parent_add from each of widgets
since commit a1addad60e, To add myself as a sub object of parent object will be
done in Efl.Ui.Widget constructor.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8280
2019-04-18 11:01:19 +02:00
Mike Blumenkrantz 644b771fe4 efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_Error
Summary:
this swaps the values of "no error" and "error" in order to maintain
consistency with the rest of efl where the zero value means "no error"
Depends on D8060

Reviewers: cedric

Reviewed By: cedric

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8063
2019-03-04 13:36:41 -05:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

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

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

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

ref T7558

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7987
2019-02-22 10:09:46 +01:00
Mike Blumenkrantz f886941b11 api: efl.gfx.size_hints -> efl.gfx.hints
Summary:
these hints are not strictly size-related, so renaming them is more consistent
with their actual function

ref T7563

Depends on D7968

Reviewers: segfaultxavi, cedric, bu5hm4n

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7977
2019-02-21 18:43:12 +01:00
Jaehyun Cho 31be3af62d efl_ui_popup: Remove inheritance from Efl.Canvas.Object
Summary:
Class Efl.Ui.Popup_Part_Backwall inherits from multiple classes,
class Efl.Ui.Layout.Part and abstract Efl.Canvas.Object.

To remove multiple class inheritance, Efl.Canvas.Object is not
derived and its property, repeat_events, is newly defined in
Efl.Ui.Popup_Part_Backwall.

Test Plan:
1. Execute elementary_test.
2. Select Efl.Ui.Popup.
3. Select "Show Dummy Button".
4. Select "Repeat Event Set".
5. Test if repeat event works.

Reviewers: woohyun, felipealmeida, Hermet, segfaultxavi

Reviewed By: Hermet, segfaultxavi

Subscribers: bu5hm4n, q66, cedric, segfaultxavi, lauromoura, #reviewers, herb, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6984
2018-09-10 13:29:54 +09:00
Jaehyun Cho 743e0468e9 efl_ui_popup: Replace class Efl.Ui.Popup_Part with Efl.Ui.Popup_Part_Backwall
Class Efl.Ui.Popup_Part is used only for part "backwall".
Therefore, class Efl.Ui.Popup_Part is replaced with class
Efl.Ui.Popup_Part_Backwall.
2018-09-05 15:16:11 +09:00
YeongJong Lee 55cd0f4970 efl_part: remove unnecessary default_xxx_part_get
Summary:
They can call default_xxx_part_get of layout.

ref 6e49db0739

Test Plan:
elementary_test -to button
elementary_test -to 'efl.ui.button'
elementary_test -to 'efl.ui.popup'
elementary_test -to 'progressbar'
elementary_test -to 'slider'

Reviewers: Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #committers, herb, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6218
2018-05-28 17:32:46 +09:00
Cedric BAIL 8a513a522e efl: major rewrite of efl_part.
The interface efl_part_get should not be directly called from C, but the efl_part
wrapper should. It rely on efl_noref to properly destroy the object. Binding can
control the lifecycle of the reference the way they want by either calling the
wrapper or efl_part_get directly. It also means that the ugly ___efl_auto_unref_set
doesn't need to be exposed outside of EFL anymore.

Differential Revision: https://phab.enlightenment.org/D6098
2018-05-24 16:02:18 -07:00
Jaehyun Cho 08a11dcbf9 efl theme: Replace legacy signal names with efl ui signal names
Replace legacy signal/source names with efl ui signal/source names.
e.g. From "elm,state,content,set" "elm" to "efl,state,content,set" "efl"
2018-04-26 22:45:59 +09:00
Taehyub Kim 6e49db0739 efl theme: remove the elm legacy name of efl ui theme
Summary: remove the elm legacy name of efl ui theme

Test Plan: run elementary_test and test efl ui widget cases

Reviewers: Jaehyun_Cho, woohyun, cedric, raster, jpeg

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5934
2018-04-26 19:41:03 +09:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Sungtaek Hong 08d86d3941 efl_part: use efl_ui_widget's default_part_get
Summary:
efl_part macros are using each widget's internally defined
default_part_get() functions to get default part name.
This might potentially cause errors when future widgets
inherits the widget but not overriding Efl.Text.text and
Efl.Content.content.

Reviewers: jpeg, cedric, woohyun, Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5797
2018-02-08 14:53:59 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
JinYong Park ccfa9ae220 Efl.Ui.Popup.Anchor: apply group calculate with size problem fix
Summary:
Size and align calculation in Efl.Ui.Popup was advanced using group calculate,
so Efl.Ui.Popup.Anchor apply it also.

Test Plan: elementary_test -to efl.ui.popup.anchor

Reviewers: Jaehyun_Cho, herb, jpeg, woohyun, cedric

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5655
2017-12-15 13:56:25 +09:00
Jaehyun Cho 0722992790 efl_ui_popup: Code refactorying for elm_layout_sizing_eval
Use flags for group calculation, size calculation and align calculation.

If the flag for size calculation is set to be false, then size is not
calculated in the efl_canvas_group_calcualte().
(The flag for align calculation works the same way.)

Efl.Ui.Popup's sub classes can set the above flags false before they
call efl_canvas_group_calculate() with its super class not to calculate
size or align by its super class.
2017-12-14 13:58:06 +09:00
Jaehyun Cho 10761cf2f5 efl_ui_popup: Update size calculation logic
Instead of doing size calculation whenever elm_layout_sizing_eval() is
called, do size calculation when the object is rendered like
efl_ui_layout.
2017-12-11 13:33:12 +09:00
Taehyub Kim 0096a8aa3c Efl.Ui.Popup: add popup_size property
Summary: add popup_size property

Test Plan:
1. run elementary_test -to efl.ui.popup
2. check the popup

Reviewers: Jaehyun_Cho, jpeg, thiepha, cedric, woohyun, Blackmole

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5600
2017-12-11 13:32:49 +09:00
Taehyub Kim adddeabda2 Efl.Ui.Popup: calculate the alignment when the size is changed
Summary: calcuate the alignment when the size is changed

Reviewers: Jaehyun_Cho, jpeg, thiepha, cedric, woohyun, Blackmole

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5554
2017-12-11 13:32:11 +09:00
Sungtaek Hong c12d947484 efl_ui_popup: remove unnecessary overides
Summary:
efl_ui_popup parts overrides efl_content and efl_text
         which are sometimes not needed.

Test Plan: Run elementary_test -> efl_ui_popup tests

Reviewers: jpeg, cedric, woohyun, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: Jaehyun_Cho, Blackmole, herb

Differential Revision: https://phab.enlightenment.org/D5556
2017-12-08 16:02:23 +09:00
Sungtaek Hong 22c5f771be efl_ui_popup: apply new theme logic for efl_ui_popup 2017-12-08 16:02:22 +09:00
Jaehyun Cho 4b18e754de elm_part_helper: Change macro name for default content part 2017-11-29 13:43:21 +09:00
Jaehyun Cho a3ad64dcd0 efl_ui_popup: Replace Efl.Container to Efl.Content to rebase 2017-11-28 17:15:42 +09:00
Jaehyun Cho c752d8fe6b efl_ui_popup: Make backwall efl part object of Efl.Ui.Popup 2017-11-28 17:15:42 +09:00
Jaehyun Cho 91df6723c9 efl_ui_popup: Rename bg_set with backwall_set
Since "background" is used as a basic part property, "backwall" is used
to indicate the area behind efl_ui_popup.
2017-11-28 17:15:42 +09:00
Taehyub Kim e65731b755 efl_ui_popup: add _calc_align function in sizing eval function
Summary: add _calc_align function in sizing eval function to show popup correctly.

Reviewers: Jaehyun_Cho, jpeg, cedric, thiepha, Blackmole, woohyun

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5373
2017-11-28 17:15:42 +09:00
Taehyub Kim 8301e66d87 efl_ui_popup: add timeout signal
Summary: add the timeout signal for user notification

Reviewers: Jaehyun_Cho, jpeg, cedric, Blackmole, thiepha, woohyun

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5372
2017-11-28 17:15:42 +09:00
Jaehyun Cho a44e8cec39 efl_ui_popup: Replace group_add/del with constructor/destructor 2017-11-28 17:15:42 +09:00
Jaehyun Cho b85cebdb96 efl_ui_popup: Code refactoring to replace legacy APIs 2017-11-28 17:15:42 +09:00
JinYong Park 0928335fbc efl_ui_popup: remove parent_window_get method
Summary: remove Efl.Ui.Popup's internal method "parent_window_get"

Test Plan: elementary_test -to efluipopup

Reviewers: jpeg, Jaehyun_Cho, woohyun, herb

Reviewed By: Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5363
2017-11-28 17:15:42 +09:00
Taehyub Kim 8d315ce7aa efl_ui_popup: add timeout property
Summary: add timeout property

Test Plan:
1. run elementary_test -to efluipopup
2. after 3 seconds, popup will be delete

Reviewers: Jaehyun_Cho, jpeg, woohyun, thiepha, Blackmole, cedric

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5205
2017-11-28 17:15:42 +09:00
JinYong Park a7082df12b efl_ui_popup: remove unnecessary function call
Summary:
In _calc_align function, it could get align property through Efl_Ui_Popup_Data *pd directly,
but call align_get function previously.

Reviewers: Jaehyun_Cho, herb, thiepha, jpeg, cedric, woohyun

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5207
2017-11-28 17:15:42 +09:00