Commit Graph

37 Commits

Author SHA1 Message Date
Marcel Hollerbach d1480d7762 efl_ui_scroller: remove from the sub_object list on unset
this should fix lifetime issues with Efl.Ui.Scroller

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10920
2019-12-19 11:46:24 -08:00
Hosang Kim ed7fb7ae27 scroller: add missing efl_content_unset
When efl_content_unset(scroller) is called, efl_content_unset for Efl.Ui.Pan class should be called also.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10906
2019-12-19 10:24:21 +01:00
Marcel Hollerbach 5892292ac8 efl_ui: docuement code
there was the request that this needs to be documented, here we are.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10874
2019-12-13 09:33:07 -08:00
Marcel Hollerbach e81dc6a02b efl_ui_scroller: free pan object correctly
we need to free the object in the invalidate, not in the destructor.
Otherwise we might leak objects in bindings.

Reviewed-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10840
2019-12-13 09:32:57 -08:00
WooHyun Jung f7e183b851 efl_ui_scrollable: remove ui_scrollable_interactive and move all into ui_scrollable
Summary:
Based on the discussion T7883, there is no reason to keep those
interfaces separately. So, now, efl_ui_scrollable will support
the events and methods together.

@ref T7883

Reviewers: eagleeye, bu5hm4n, zmike, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7883

Differential Revision: https://phab.enlightenment.org/D10072
2019-09-23 11:02:15 +02: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 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 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 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 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
Marcel Hollerbach d76d5db5cb Introduce efl_ui_scroll_util files.
Summary:
this brings API that connects the theme to the object. This reduces the
amount of code that you need to write in order to develop a widget that
can be scrollable.

For now efl_ui_grid and efl_ui_scroller are replaced with it.
efl_ui_list / efl_ui_list_view are not handeled with this, as they will
be replaced with newer widgets.

Right now this is only avaiable in the C API. However, wrapping this
into a mixin should be easy.

Reviewers: zmike, segfaultxavi

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9245
2019-07-09 08:49:12 -04:00
Marcel Hollerbach afd4e6bd5b efl_ui_scroller: fix Efl.Content implementation
this commit ensures the following:
- Delete content when new content is set
- Content set input validation
- Correct parent setting

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8682
2019-04-23 12:40:53 -07:00
Jaehyun Cho a6cc943211 elementary: fix not to call duplicate theme set
Theme is set during finalize in Efl.Ui.Layout_Base.
Therefore, it is not necessary to call theme set function if the widget
inherits Efl.Ui.Layout_Base and its klass is properly set.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8559
2019-04-06 12:52:57 -07:00
Mike Blumenkrantz bb6caaa471 efl.ui: remove Efl.Ui.Theme_Apply_Error
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-04 13:37:07 -05: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
Hosang Kim 493b095add efl_ui_scroller: apply handling focus.
Summary: Focus manager is applied to process key events.

Test Plan: elementary_test -> efl.ui.scroller

Reviewers: SanghyeonLee, YOhoho, marcelhollerbach, bu5hm4n

Reviewed By: bu5hm4n

Subscribers: woohyun, Jaehyun_Cho, bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7776
2019-02-26 16:53:13 +09: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 e4b98a243b api: efl.gfx.hints.change,size,hints -> efl.gfx.hints.hints,changed
Summary:
this is consistent with other "changed" event naming

ref T7563

Depends on D7977

Reviewers: segfaultxavi, cedric, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7563

Differential Revision: https://phab.enlightenment.org/D7978
2019-02-21 18:46:36 +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
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
Cedric BAIL f484ca0951 edje: migrate Eo API to use Eo callback instead of opaque type.
Summary: Depends on D7869

Reviewers: zmike, q66, segfaultxavi, bu5hm4n

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7671

Differential Revision: https://phab.enlightenment.org/D7870
2019-02-06 13:48:43 -05:00
Marcel Hollerbach 2dacf8a69b efl_ui_scroller: support the complete efl.content API
content_get and content_unset was not added.

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7756
2019-01-26 11:42:07 +01: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
Daniel Hirt 6e92042845 Ui Scroller : remove unnecessary efl_del
Child objects are already destoryed during destruction of the parent
object.

This fixes ERR messages when doing `efl_del(sd->smanager)`
object, which is already destroyed at that point.
2018-11-26 13:17:07 +02: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 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
Daniel Hirt 83c7db7283 Ui scroll: fix update scrollbar arrows on pos change 2018-11-05 18:17:43 +02: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 6a98b84cd7 Efl.Ui.Layout.Object (from Efl.Ui.Layout)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:54 -07: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
Shinwoo Kim 9f2e1d050f elm: Use ERR instead of CRI if *DATA_GET* returns NULL 2018-02-01 12:16:28 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Wonki Kim 47bf356435 scroller: Introducing Efl.Ui.Scroller
Summary:
scrollable widgets had a interface_scrollable as a mixin so that the
widgets had a 'is-a' relation with interface_scrollabe.  however, new
scroller concept don't have 'is-a' relationship, but 'has-a'
relationship.  scrollable widgets should have a scroll manager inside
them, then scroll manager handles event from user and api
implementations.  and also we cut the features such as paging because
there will be aka 'elm_pager'.

we are expecting that the new concept make us to maintain the scroller
easier.  please excuse for many unorganized code and logics. : (

[contained commit]
scrollable: add efl_ui_scroller example
scrollable: refactoring for behavior in case of multiple scroller
scrollable: remove repetitive scrollbar code.
scrollable: combine calculating bounce distance code.
scroll_manager: mouse up function refactoring
scroll_manager: mouse move function refactoring
scroll_manager: warp animator wip
scroll_manager: fix denominator value when calculating flicking behavior.
Fix to disconnect bounce animator once animation is done
gather duplicated animator drop logics
gather duplicated conditions
Rearrange prototypes and append comment
Add manipulate functions for animators
scroll_manager: change member_add function.
scroll_manger: apply mirroring logic
scroll_manager: apply scrollbar
apply API to scroller widget
scroll_manager: apply scroll event callback
Change logics for all about scroll animating
efl_ui_pan: add efl_ui_pan
scrollable:  change content_min_limit to match_content
scroll theme: apply overlapped scrollbar
+ many others!

Reviewers: akanad, woohyun, cedric, jpeg

Subscribers: jenkins, cedric, jpeg

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

Note by @jpeg:
Unfortunately this patch comes in a massive single blob, after too many
rebase operations. It has now come to a point where I think the API is
nice and it works as I'd expect.
Now I only wonder how applicable this will be for Efl.Ui.List. As we can
see Photocam (legacy and unified API) could be transformed to use this
new API.
2017-12-19 10:26:25 +09:00