summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_panel.c (unfollow)
AgeCommit message (Collapse)Author
2019-12-19efl_ui_panel: fix Efl.Content implementationMarcel Hollerbach
It appears that content has been deleted, even if it has been unset before. This also fixes event emission on content_unset. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10919
2019-09-16efl.ui.scrollable: fix event name for scrollableHosang Kim
Summary: Event name is applied in the past tense. Meaning of 'stop' is 'stop it early', so I changed it to 'finish' Test Plan: elementary_test -> efl.ui.scroller Reviewers: segfaultxavi, woohyun Reviewed By: segfaultxavi Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9859
2019-09-03api: remove Efl.Ui.Scroll_BlockMike Blumenkrantz
Summary: this now uses layout orient enum everywhere fix T7921 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7921 Differential Revision: https://phab.enlightenment.org/D9804
2019-08-21efl_ui_panel: remove dependency with elm_interface_scrollableYeongjong Lee
`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-20efl_ui_widget: remove x,y,w,hMarcel Hollerbach
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-07efl_ui: use unified size hints api and be explicit about which hint is changedMike Blumenkrantz
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-07-30elm/efl_ui: remove elm_layout_sizing_eval implementationsMike Blumenkrantz
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-30efl_ui: change calls to elm_layout_sizing_eval to efl_canvas_group_changeMike Blumenkrantz
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-04-21efl_ui_panel: redo content handlingMarcel Hollerbach
before the events where not emitted correctly. Additionally input values like 0x1 have been accepted as valid. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D8636
2019-04-18ui.widget: remove elm_widget_sub_object_parent_add from each of widgetsYeongjong Lee
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-08elm_panel/efl_ui_panel: disable scrolling when obj is disabledJaeun Choi
panels were still scrollable while disabled. this patch fixes it.
2019-03-04efl.ui.widget: widget_event -> widget_input_event_handlerMike Blumenkrantz
Summary: ref T7553 Depends on D8081 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7553 Differential Revision: https://phab.enlightenment.org/D8082
2019-03-04efl.ui: remove Efl.Ui.Theme_Apply_ErrorMike Blumenkrantz
Summary: now that the error codes have been change to be compatible with eina_error, this can be removed and will work through eina_error naturally fix T7718 Depends on D8067 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7718 Differential Revision: https://phab.enlightenment.org/D8068
2019-03-04efl.ui: Efl.Ui.Theme_Apply_Result -> Efl.Ui.Theme_Apply_ErrorMike Blumenkrantz
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-02-27efl_ui_widget: redo disable handlingMike Blumenkrantz
before the disable property was a bit weird. Setting something to disabled=true will disable all children of the widget that is changed. However, only the update function of the children will get the false flag, not the flag itself. Which means, to query the real disabled state, we need to walk up the parent relations. With this patch, every change to disabled will go through the disabled property, which mean, a implementor can just overwrite the disabled property, and adjust its internal state there. Just be carefull, a set to disabled=true still might result in disabled=false. This makes the function on_disable_update unneccesary. Which also cleans up the Efl.Ui.Widget class. ref T7553 Depends on D8016 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D8017
2019-02-25efl.content: add event for when content is changed containing content as dataMike Blumenkrantz
Summary: ref T7588 Reviewers: cedric, segfaultxavi Reviewed By: cedric, segfaultxavi Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7588 Differential Revision: https://phab.enlightenment.org/D7907
2019-01-02efl: rename Efl.Ui.Base -> Efl.Ui.I18n as that is really what it does.Cedric BAIL
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7506
2018-12-20Intruduce Efl.Ui.Panel (Create Efl Ui Widget from elm widget(elm_panel))Woochanlee
Summary: Create Efl Ui Widget from elm widget(elm_panel) Test Plan: elementary_test -> efl_ui_panel Reviewers: woohyun, Jaehyun_Cho, segfaultxavi Reviewed By: Jaehyun_Cho, segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7238
2018-11-20efl_ui_theme: Introduce Efl.Ui.Theme classJaehyun Cho
Summary: Efl.Ui.Theme class is required to support language bindings. Efl.Ui.Theme works based on current elm_theme features. This patch fixes T7357. Reviewers: segfaultxavi, cedric, lauromoura, woohyun, zmike, SanghyeonLee Reviewed By: segfaultxavi, SanghyeonLee Subscribers: SanghyeonLee, herdsman, #reviewers, #committers Tags: #efl Maniphest Tasks: T7357 Differential Revision: https://phab.enlightenment.org/D7244
2018-08-30elm_panel: fix mirrored_set work correctlyYeongjong Lee
Summary: When elm_panel isn't scrollable, It can't pass `if (!sid->edje_obj) return;` in _elm_interface_scrollable_efl_ui_base_mirrored_set. so elm_panel's mirrored_set didn't work. we neet to consider non-scrollable panel. Test Plan: 1. elementary_test 2. Open 'Panel' and 'Panel Scrollable' 3. Turn on UI-Mirroring on Elementary Tests window. 4. Check that mirror mode works correctly. Reviewers: Hermet, Jaehyun_Cho Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6944
2018-08-14elm_panel: return instead of EINA_SAFETY_ON_FALSE_RETURNAlastair Poole
Summary: As with other checks in ELM return if object is not yet finalized. This stops lots of console noise. @fix T7265 Test Plan: elementary_test: use panel test from console and view the noise from EINA. Apply then do the same. Reviewers: #committers, zmike Reviewed By: #committers, zmike Subscribers: cedric, #reviewers, zmike Tags: #efl Maniphest Tasks: T7265 Differential Revision: https://phab.enlightenment.org/D6826
2018-07-31elementary: Check for valid object before calling smart calculateChris Michael
Summary: Small patch fixes an issue where evas_object_smart_calculate was being called with a NULL box. ref T7030 Depends on D6704 Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #committers, zmike Tags: #efl Maniphest Tasks: T7030 Differential Revision: https://phab.enlightenment.org/D6710
2018-06-29default theme: fix part names in elm/scrollable/panelXavi Artigas
Summary: Ref T6966 Depends on D6455 Reviewers: zmike, devilhorns Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T6966 Differential Revision: https://phab.enlightenment.org/D6456
2018-06-25elm_panel: Wrap calls to edje_object_part_object_get with freeze/thawChris Michael
Summary: @ref T6884 Depends on D6406 Reviewers: zmike, ManMower Reviewed By: zmike Subscribers: cedric, #committers Tags: #efl Maniphest Tasks: T6884 Differential Revision: https://phab.enlightenment.org/D6407
2018-05-24efl: major rewrite of efl_part.Cedric BAIL
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-23elm: fix backward compatibility for "default" name partYeongJong Lee
Summary: If you use legacy content/text set/get/unset with "default" part name, _elm_layout_part_aliasing_eval change the part name to "elm.swallow.content". Because internal _content_set/get/unset checked only "default" string, legacy content/test set/get/unset with "default" part name was not working. This patch fixes that bug. Test Plan: elm_object_part_content/text_set(obj, "default", content) Reviewers: Jaehyun_Cho, woohyun Reviewed By: Jaehyun_Cho Subscribers: cedric, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6185
2018-04-24Efl.Gfx.Entity (from Efl.Gfx)Xavi Artigas
Ref https://phab.enlightenment.org/T6847 Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24Efl.Access.Object (from Efl.Access)Xavi Artigas
Ref https://phab.enlightenment.org/T6847 Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-17eolian gen: enable constness generation on property getter implsDaniel Kolesa
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-01-16elm_panel: add exception handling in _drawer_close()Jaeun Choi
this fixes a bug with scrollable panel not being blocked when it is closed. scroll is blocked in _anim_stop_cb() which is called after elm_interface_scrollable_region_bring_in(). but if panel content is already at the target position, _anim_stop_cb() is not called. so there is a need to check content's position and handle the exceptional case.
2018-01-16Revert "elm_panel: add exception handling in _drawer_close()"Jaeun Choi
This reverts commit 2acfc3e381dc4fc87e3249b0f63f1ba5e0d1c2de.
2018-01-16elm_panel: add exception handling in _drawer_close()Jaeun Choi
this fixes a bug with scrollable panel not being blocked when it is closed. scroll is blocked in _anim_stop_cb(), which is called after elm_interface_scrollable_region_bring_in(). but if panel content is already at the target position, _anim_stop_cb() is not called. so there is a need to check content's position and handle the exceptional case.
2018-01-16elm_panel: prevent redundant callback function addition or deletionJaeun Choi
there is a need to check if callback functions already exist or not before adding or deleting them, because they are added or deleted at two points: in _elm_panel_scrollable_set() and _elm_panel_elm_widget_disable().
2018-01-08widget: rename elm widget to Efl.Ui.Widget.Amitesh Singh
2017-11-16elm: Define and rename internal atspi struct in EOJean-Philippe Andre
This thing is used by only 2 EO APIs that are marked as @beta. I wonder if the @beta tag or the ptr() expression made it work for eolian, because it simply wasn't defined in EO. I'm renaming it just so that it's more consistent with the new names used by atspi (and EO API in general).
2017-11-16elm: Rename elm_interface_atspi_widget_action mixinLukasz Stanislawski
Reviewers: jpeg Subscribers: jenkins, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5400
2017-11-07elm: Create legacy widgets with elm_legacy_addJean-Philippe Andre
This will be used to solve issues around style_set: if the widget is legacy or pure eo we may need to select a different style. So in the constructor we need to know whether we are legacy or eo. Note that calling style_set in finalize only is too late as we would lose information such as efl_text_set() called inside efl_add().
2017-10-24widget: Rename EO APIs to efl_ui_widget_xxxJean-Philippe Andre
This only changes the eo_prefix for APIs. Ref T5363
2017-10-19elm: rename Elm_Interface_Atspi_Accessible interfaceLukasz Stanislawski
Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5341
2017-10-12widget: Rename focus_region (EO)Jean-Philippe Andre
This region has little to do with focus, as it's more of a region of interest within the widget, and not directly related to the highlight geometry, for instance. It's related to focus in the sense that only widgets with focus would really care about this region. I decided to change this name after talking with @bu5hm4n. Note that gengrid uses this but is also completely broken (the focus highlight floats around and you don't even see the focused item). Note: This is very close to show_region but I'm not sure those can be merged safely (since the default "focus_region" is NULL while the default "show_region" is the widget's geometry). Ref T5363
2017-10-10elm_panel: make it a layerMarcel Hollerbach
2017-09-21elm: Move base implementation for efl_part in widgetJean-Philippe Andre
This means that ALL part handles inherit from the base part class Efl.Ui.Widget.Part. Layout is the only exception where Efl.Part is specially overridden. This is a first step towards generic part APIs, including background in all widgets.
2017-09-18efl: Use Eina.Size2D for Efl.Gfx.sizeJean-Philippe Andre
Big patch as a lot of things call or reimplement size_set. Hopefully I got it right... fingers crossed.
2017-09-18efl: Use Eina.Position2D for Efl.Gfx.positionJean-Philippe Andre
Note: This is a little bit more cumbersome in some places but in most it's more convenient than (x,y).
2017-09-18efl: Introduce Eina.Rect and switch EO APIs to itJean-Philippe Andre
It's a complex struct but defined in EO as a simple struct. ABI-wise it's equivalent to Eina_Rectangle. Some macros that use Eina_Rectangle also work on Eina_Rect out of the box, most of the code dealing with x,y,w,h will require no modifications either. But Eina_Rect provides direct access to a size or position 2d component, as well as the usual x,y,w,h. The field "rect" is provided as a convenience for code dealing with both Eina_Rectangle and Eina_Rect. We may or may not require it. Note: Size2D could use unsigned values but I have spotted a few places in the code that actually use -1 to indicate invalid size (as opposed to 0x0). @feature
2017-09-13edje/elm: Rename _internal_ to _part_ (EO)Jean-Philippe Andre
In Edje and Elementary, we have part objects, which are what is returned by the interface efl_part(). Those objects can't be of an opaque type as this doesn't work nicely with strongly typed languages such as C++ or C#. In JS, Lua, C the types are weak and mostly runtime-based so it doesn't matter much. As a consequence, the documentation and the types need to look nice in this EO API. Thus, we remove the abusive term "internal" and explicitly call all those classes "part" something. Eventually we want the types to be declared in the EO file so bindings (C#, C++, ...) can generate the proper access methods, returning the best possible types. Note that right now a few of those part types are used in the legacy API but don't actually need to be exposed externally. This is kind of a mega commit that does all the renaming at once, but it's really just a big sed operation. The power of good IDEs :) Ref T5315 Ref T5306
2017-09-05elm_panel: set content as a sub object of panel objectJaeun Choi
since sd->bx is not an elm object, it is excluded from parent-child tree. in case of a non-scrollable panel, the content needs to be attached to the tree as a child of panel object directly.
2017-08-31widget: Mark old focus API as beta.Jean-Philippe Andre
It's not beta. It's about to die. Also, move #define ELM_WIDGET_BETA to the common header file, as it is consequently required by ALL widgets. :( Ping @bu5hm4n :) Ref T5363
2017-08-30scroll: Rename elm enum to efl.uiJean-Philippe Andre
This scroll block enum should also be used in widget itself. Ref T5363
2017-08-30widget: Use rectangle on the stack for region_showJean-Philippe Andre
Follow @k-s recommendation and simply use rectangles on the stack rather than by pointer. Ref T5363