Commit Graph

74 Commits

Author SHA1 Message Date
Marcel Hollerbach b704db8f07 efl_ui_widget: move focus_highlight to the window
summary_:
the widget implementation just redirected calls from efl_ui_widget to
efl_ui_win. Which makes the properties unncessesary on the widget. This
commit moves them now to the window.

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

ref T7553

Depends on D8017

Reviewers: woohyun

Reviewed By: woohyun

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7553

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

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

ref T7553

Depends on D8016

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

ref T7553

Depends on D8014

Differential Revision: https://phab.enlightenment.org/D8015
2019-02-27 20:19:07 +01:00
Mike Blumenkrantz a5e183ad5d efl.canvas.object: clip -> clipper && clipees -> clipped_objects
Summary:
also clipees_has -> clipped_objects_count

ref T7555

Depends on D8039

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7555

Differential Revision: https://phab.enlightenment.org/D8040
2019-02-27 13:17:37 -05:00
Mike Blumenkrantz 4192753490 efl.canvas.group: group_member_del -> group_member_remove
Summary:
api naming in efl uses 'del' when deleting an object and 'remove' when
removing something from an object

ref T7554

Depends on D8034

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7554

Differential Revision: https://phab.enlightenment.org/D8035
2019-02-27 13:17:28 -05:00
Mike Blumenkrantz 335936e79d efl.ui.layout: split into abstract and real class
Summary:
most widgets inherit from layout to provide implementations for common
functionality such as content/text/theme get+set.

one of the things that layout also brings into its inheritance hierarchy
is efl.file and implementations for its methods. this becomes a problem
when the widget which inherits layout also wants to provide implementations
for efl.file methods (e.g., entry, which uses efl.file to load text files)
as it will result in calling all of the efl.file implementations up the
chain.

in the case of entry, this could result in the 'file' property eventually being
set to the current theme file in use by the entry's layout object, and then the
entry will attempt to autosave its content to the default theme file when it is
destroyed, corrupting the theme file and breaking everything

to solve this:

* efl.ui.layout remains an instantiable class which implements efl.file
* efl.ui.layout_base is the abstract class which provides all the methods of layout
  but should be inherited by all widgets which want to implement efl.file functionality

Depends on D8018

Reviewers: bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8032
2019-02-27 13:17:16 -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 5da43b2aa7 efl.gfx.entity: combine show/hide events into visibility,changed
Summary:
this requires some internal hackery to preserve legacy compatibility
and correctly translate the single new event into two legacy events

ref T7558

Depends on D8018

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

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

Tags: #efl_api

Maniphest Tasks: T7558

Differential Revision: https://phab.enlightenment.org/D8019
2019-02-25 14:00:14 -05:00
Marcel Hollerbach 5235f1da85 efl_ui_widget: remove focused_item
focused_item is only used in item containers. This API is now moved into
a widget item container, which *can* have a focused item.

ref T7553

Reviewed-by: WooHyun Jung <woohyun0705@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8013
2019-02-25 10:37:44 +01:00
Marcel Hollerbach a25444f0d5 efl_canvas_object: make is_frame_object internal
it was decided that this property should be internal. So now it is
internal.

ref T7555

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8010
2019-02-25 10:37:42 +01:00
Marcel Hollerbach 229dc576e6 efl_ui_focus_object: rename events
the event now math the pattern of <property-name>,changed.

ref T7571

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7989
2019-02-22 14:00:32 +01:00
Mike Blumenkrantz 71c390e6a2 api: efl.gfx.stack stack,changed -> stacking,changed
slight tweak to make this more consistent with meaning and docs

ref T7560

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7988
2019-02-22 10:09:48 +01: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 94efabedf6 efl.gfx.stack: restack -> stack,changed
Summary:
ref T7560

Depends on D7967

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7560

Differential Revision: https://phab.enlightenment.org/D7968
2019-02-21 18:43:12 +01:00
Xavi Artigas 6b7346b7b2 Remove individual class BETA guards
Summary:
Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged
as @beta. This means that any app (and the EFL code) wanting to use BETA features
has to enable them class by class, which is cumbersome.
This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT
guard, so apps only need to define one symbol to access BETA features.

Any usage of the per-class guards has been removed from the EFL code and examples.
When building EFL the global guard is defined by configure, so all EFL methods
already have access to BETA API.
Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to
use BETA API have to define this symbol before including any EFL header
(It has been added to the examples requiring it).

Test Plan:
make && make check && make examples still work, but there's a lot less #defines
in the code

Reviewers: zmike, bu5hm4n, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T6788

Differential Revision: https://phab.enlightenment.org/D7924
2019-02-13 18:09:17 +01:00
Marcel Hollerbach 37d2d378ec eolian: drop class function overriding
Until this commit eo did class functions as part of the vtable, which
enabled those functions to be overwritten in classes inheriting another
class. However in task T7675 we decided that this is not really good for
bindings, as most OOP languages do not support this sort of feature.

After this commit eolian realizes class function completly outside of
the vtable, the c-symbol that is the class funciton is now just directly
redirecting to a implementation, without the involvement of the vtable.

This also means a change to the syntax created by eo:

Calling before:
  class_function(CLASS_A);
Calling after:
   class_function();

Implementation before:
   class_function(const Eo *obj, void *pd) { ... }
Implementation after:
   class_function(void) { ... }

This fixes T7675.

Co-authored-by: lauromauro <lauromoura@expertisesolutions.com.br>

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7901
2019-02-13 16:59:58 +01:00
WooHyun Jung 7f2b26861f elm: prevent from accessing null pointer after memory allocation
Summary: Add null checking code just after allocating memory

Test Plan: make check

Reviewers: jypark, Jaehyun_Cho, zmike

Reviewed By: Jaehyun_Cho, zmike

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

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7801
2019-01-29 09:23:44 -05:00
Derek Foreman d14c700e9d efl_ui_widget: Save some pointer indirection
We're getting the same widget data twice, as well as testing if the
object is a widget twice.  Let's do these things once.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D7698
2019-01-18 13:59:32 -06:00
Daniel Kolesa 0976e9adf3 elementary: internalize elm_combobox, expose legacy only
This is bad eo API, and won't remain like that, so completely
remove it from being managed by Eolian.
2019-01-17 15:54:24 +01:00
Cedric BAIL 88dbd866e0 elementary: rename Efl.Ui.Translatable -> Efl.Ui.L10n
If we are to choose Efl.Ui.I18n for the internationalization support, the localization API
should be named accordingly L10n.

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7507
2019-01-02 11:03:53 -08:00
Cedric BAIL 038612736c efl: rename Efl.Ui.Base -> Efl.Ui.I18n as that is really what it does.
Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7506
2019-01-02 11:03:51 -08:00
Hosang Kim c4ae2be685 efl_ui_scrollable: implement efl_ui_scrollable_content_pos_get method.
Summary:
Applications want to know current position on scroller.
Also, it is necessary when calculate position of focusable object.

Reviewers: herdsman, akanad, YOhoho, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7251
2018-11-28 14:34:28 +09:00
Marcel Hollerbach 97ece33134 efl_ui_focus_object: introduce a new event for focus geometry changes
before the move and resize events have been used. However, this turned
out to not work well, because not all registered items are real
efl.gfx.entity objects, there is also a custom property for getting the
focus geometry, so now this property is completed with a event that is
emitted when the focus geometry changes. With this event we can
reintroduce relation caching. Since all events are marked correctly
dirty now.

Differential Revision: https://phab.enlightenment.org/D7347
2018-11-26 11:37:04 +01:00
Derek Foreman 02840efec2 elm: roll _tree_custom_chain_missing into main focus test function
Further reduction in eo overhead.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-22 16:09:39 +01:00
Derek Foreman 45f24b6ef4 elm: Compress more focus tests into the same list walk
Since we're already at the top of the list, we can do the WIN_CLASS test
much more cheaply.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-22 16:09:39 +01:00
Derek Foreman 30be434fb1 elm: Re-order focus tests
Placing the cheapest tests first can save on some heavy walks.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-22 16:09:39 +01:00
Derek Foreman b8f6323a36 elm: Walk parents instead of parent widget in focus test
This Should Work, right?

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-22 16:09:38 +01:00
Derek Foreman a4e4343082 elm: speed up _eval_registration_candidate
combining _tree_unfocusable and _tree_disabled into a single function
reduces eo overhead.  This saves a few ms at startup in elementary_test.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-22 16:09:38 +01:00
Chris Michael f7c073d77c elementary: Reduce EO calls by using geometry_set
This patch reduces EO calls by using evas_object_geometry_set rather
than calling move & resize.
2018-11-21 11:25:58 -05:00
Jaehyun Cho 4f9c8d524c efl_ui_theme: Introduce Efl.Ui.Theme class
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-11-20 13:56:37 +09:00
Jaehyun Cho 0611620301 efl_ui_bg: remove Efl.Ui.Bg interface and rename Efl.Ui.Bg_Widget class
Summary:
Efl.Ui.Bg interface does not have any new property or method.
Moreover, Efl.Ui.Bg interface is not used by widgets except
Efl.Ui.Bg_Widget and Efl.Ui.Widget_Part_Bg.
Consequently, Efl.Ui.Bg interface can be replaced by other interfaces.

Due to Efl.Ui.Bg interface, the bg widget class name becomes
Efl.UI.Bg_Widget which is not synchronized with other widget names.

Therefore, to keep consistency with other widgets, it would be better to
remove Efl.Ui.Bg interface and rename Efl.Ui.Bg_Widget to Efl.Ui.Bg.

Reviewers: woohyun, segfaultxavi, bu5hm4n, zmike

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7304
2018-11-20 10:24:05 +09:00
Jaehyun Cho 2d460e52e4 elementary: remove Efl.Ui.Layout namespace
Summary:
Efl.Ui.Layout namespace is removed to keep consistency with other
widgets.
Consequently, "Efl.Ui.Layout.Object" is renamed to "Efl.Ui.Layout" and
"Efl.Ui.Layout." is renamed to "Efl.Ui.Layout_".

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers, SanghyeonLee, woohyun

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7291
2018-11-16 11:11:13 +01:00
Marcel Hollerbach 9f758dc363 elm: update widgets that have documented focus and unfocused events
this emits focus and unfocus on those widgets.

fixes T7386

Depends on D7124

Differential Revision: https://phab.enlightenment.org/D7103
2018-11-15 13:55:37 +01:00
Yeongjong Lee 02d83ebcd4 docs: Fix typos in API reference doc and comments.
Reviewers: Hermet, segfaultxavi

Reviewed By: Hermet, segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6948
2018-08-31 17:45:31 +09:00
Alastair Poole 91e146f108 efl_ui_widget: silence warnings with clang.
Clang doesn't like dangling else.
2018-06-22 09:11:32 +01:00
Hermet Park 5a4f16531f elementary widget: fix to trigger object signal emit properly.
This is more generic way to trigger signals for all derived classes of layout.

This fixes the dayselector item signal emit issue as well.

@fix T6981
2018-06-05 20:27:56 +09:00
YeongJong Lee 61dc4899b5 elm_win: fix widget type name for backward compatibility
Summary:
It should use legacy class in elm_win_add.

this patch fixes T6898, T6899

Test Plan: make check

Reviewers: zmike, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6899, T6898

Differential Revision: https://phab.enlightenment.org/D6233
2018-05-31 21:39:34 +09:00
Youngbok Shin 6e6ed72921 elementary widget: Do super's efl_gfx_color_set to apply color to widget itself
Summary:
The efl_gfx_color interface was not applied properly.
The implementation code of evas_object_smart_color_set was moved
to efl_gfx_color_set implementation code. But, these two functions are not same.
In efl_gfx_color_set impl, it has to call super's color set to apply
the given color values to widget object itself.

This bug caused color_set/get test failure and the following bug.
1. elm_image_add
2. evas_object_color_set
3. elm_image_file_set
4. show. See the given color is not applied. It was applied in the past.

Test Plan: color_set/get to elm_image object is included in test suite.

Reviewers: raster, cedric, herdsman, woohyun

Reviewed By: cedric

Subscribers: #committers, zmike

Tags: #efl

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:08:24 -07:00
Cedric BAIL 0fe3b7962d elementary: due to lifecycle difference between legacy object and unified object, we need to track their lifecycle more explicitely.
It is my understanding that some items view are created with efl_add directly
and manipulate VIEW directly with Eo new API. This clash with the inconsistent
behavior that evas_object_del expect. To work around this, we track object life
by explictely relying on efl_wref_add while holding the pointer to the object.
2018-05-24 16:02:19 -07: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
Cedric BAIL 0ac6e47697 elementary: use invalidate instead of overriding del for widget items.
Differential Revision: https://phab.enlightenment.org/D6073
2018-05-24 16:02:18 -07:00
Cedric BAIL 95f8bf2ebd elementary: rely on inheritance instead of faking efl_del behavior.
Differential Revision: https://phab.enlightenment.org/D6072
2018-05-24 16:02:18 -07:00
Cedric BAIL b265c5c887 elementary: make del_pre not return a bool and force rely on Eo ref counting.
Differential Revision: https://phab.enlightenment.org/D6071
2018-05-24 16:02:18 -07:00
SangHyeon Lee ebdb3b71a1 cursor: fix ABI break in widget item cursor APIs
Summary:
fix ABI break in widget item cursor APIs
by efl_ui_cursor interface implementing.

item's view were not elementary widget mostly,
reimplementing efl_ui_cursor on efl_ui_widget
cannot resolve item's cursor API call.

Test Plan:
check,
elm_object_item_cursor_XXX
API is working properly on elm_object_item.

Reviewers: cedric, jpeg, raster

Reviewed By: raster

Subscribers: stefan_schmidt, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6046
2018-05-19 01:21:12 +09:00
Hosang Kim ec670e9a22 efl_ui_scrollable: apply scroll_hold_push/pop and scroll_freeze_push/pop
Test Plan: elementary_test -> Efl.Ui.Scroller -> move slider

Reviewers: jpeg, woohyun, akanad, cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: zmike, Jaehyun_Cho, eagle001, cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D5796
2018-05-17 18:17:44 +09:00
Marcel Hollerbach a218c883c7 Introduce efl_ui_widget_focus_manager
Summary:
The mixin encapsulates the correct
- creation
- composition attaching
- Lifecycle handling

of the focus managers that are assosiated with the object.

This fixes error messages on shutdown, and additionally lifetime issues
where the composite_attached object was deleted before the object was
deleted.

Reviewers: cedric, zmike

Reviewed By: zmike

Subscribers: segfaultxavi, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6108
2018-05-16 13:30:28 -04:00
Hosang Kim 19833657e8 elm_slider: fix test suite fail
Summary: change legacy widget name.

Reviewers: Jaehyun, stefan_schmidt, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6162
2018-05-15 20:13:06 +09:00
Yeongjong Lee 6c252fc16c efl_ui_widget: use efl_data_scope_safe_get instead of macro
Summary: This macro isn't actually as safe as this safe data_get.

Reviewers: woohyun, Jaehyun_Cho

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6133
2018-05-09 10:19:38 +09:00
Marcel Hollerbach e3049e4a16 efl_ui_widget: do not register if the child is missing in a custom chain 2018-04-30 19:24:47 +02:00
Jaehyun Cho ec59f8053a elm_multibuttonentry: Fix make check fail
Fix make check fail of elm_multibuttonentry caused by
939690a8a9
2018-04-30 19:53:26 +09:00