Commit Graph

97 Commits

Author SHA1 Message Date
Mike Blumenkrantz 4279f75f0b elm/scrollable: avoid unnecessary edje recalcs
in this case we just want to trigger pending edje calcs and not force new
ones. this avoids doing a full edje recalc constantly when scrolling

@fix

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9335
2019-07-17 10:54:48 -07:00
Jongmin Lee 56d7f22b51 elm/interface_scrollable: check parameters before using them
Summary: it crashes when calling elm_interface_scrollable_loop_get() function with NULL parameters.

Test Plan: call elm_interface_scrollable_loop_get() function with NULL parameters.

Reviewers: Hermet, woohyun, kimcinoo, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9082
2019-06-11 08:27:49 -04:00
Mike Blumenkrantz f5d92b5297 elm/interface_scrollable: return immediately from setting region if no content
Summary:
this is a valid case and should be handled without erroring

@fix
Depends on D8997

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8998
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 71f49619dc elm_interface_scrollable: remove elm_pan_eo.h from public header
this is a legacy header so it can't include (non-installed) eo headers

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8229
2019-03-07 14:17:09 -08:00
Mike Blumenkrantz feba0d905c elm_pan: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
efl and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D8189
2019-03-07 14:15:58 -08:00
Mike Blumenkrantz af7d1ef7ed interfaces: move animator,tick to efl.canvas.object and remove efl.animator
Summary:
this interface only contains a single event which is implemented only by the
canvas object

ref T7561

Reviewers: cedric, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7561

Differential Revision: https://phab.enlightenment.org/D7905
2019-02-21 22:04:30 +01: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
Jérémy Zurcher 8a617fda97 silence most left over compiler warnings
Summary: silence -Wshadow -Wunused-variable -Wunused-parameter

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7473
2018-12-18 13:08:01 +01:00
Marcel Hollerbach a444ff743f elm_interface_scrollable: add support for *jumping* into a scroller
Until recently we have been only registering the border elements of the
graph, (so only the elements that don't have a neighboor). However this
lead to the situation that a scroller that is scrolled into the middle
(so not the x nor the y axis is scrolled to the max), is not accessable.

Now, we register all elements that have a neighboor in the outside.
The patch in the test suite is required in order to provide the correct
geometry to the implementation of efl_ui_focus_manager_sub.

Differential Revision: https://phab.enlightenment.org/D7360
2018-12-04 08:45:49 +01:00
Marcel Hollerbach a73904ba66 elm_interface_scrollable: freeze the manager object when content moves
this freezes the manager object of the user of the interface. This
improves the overall performance when moving arround focus in a
scrollable object, since no new relations are needed to be recalculated.
This safes up about 2% in the "Scroller 2" test. Additional
optimizations are added in another commit.

Differential Revision: https://phab.enlightenment.org/D7349
2018-11-26 11:37:04 +01:00
Cedric BAIL 5de51f84fb eo: rename efl_future_Eina_FutureXXX_then in efl_future_then as this has been available for some time.
Reviewed-by: Vitor Sousa da Silva <vitorsousa@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D7327
2018-11-23 11:39:43 -08:00
Carsten Haitzler 665a75378f xxx - fix eina_future_then calls to pass sotrage val - fix warns 2018-11-09 11:43:59 +00:00
Hosang Kim cd547c5a07 elm_interface_scrollable: fix using wrong variable.
Summary:
vy isn't initialized when p >1.0 or p<0.

this function is for finding out a current animating speed of momentum scrolling.
and a caller of this function calls this function by reference(vx, vy)
so that if progress ratio is not between 0 and 1, vx, vy must be zero.

The issue was detected by coverity check.
It may not discovered any issues yet, but the typo is too obvious, so need to fix the right value.

Test Plan: This is coverity issue.

Reviewers: akanad, Hermet, SanghyeonLee

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7114
2018-09-28 15:44:58 +09:00
Yeongjong Lee 221ac4e51a elm_interface_scrollable: add 1 space after if keyword
Reviewers: Hermet, akanad, SanghyeonLee

Reviewed By: Hermet, SanghyeonLee

Subscribers: SanghyeonLee, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6954
2018-08-31 17:47:29 +09:00
Yeongjong Lee b224cecf90 elm_interface_scrollable: fix wrong pointer reference
Reviewers: akanad

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6955
2018-08-31 12:32:56 +09:00
Chris Michael b41d3752bb elm_interface_scrollable: Remove unused variables 2018-08-29 13:20:53 -04:00
Wonki Kim 1566cc79ec scroller: removes unused variables
Summary: this patch removes some variables that are unused.

Reviewers: Hermet, eagleeye, zmike

Reviewed By: Hermet

Subscribers: #reviewers, cedric, #committers, zmike

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D6593
2018-08-29 21:38:20 +09:00
Wonki Kim 6409cfa41b scroller: refactory a momentum scroll animator
Summary:
this patch refactories a momentum scroll animator logics.

1. animation duration

  animating runs within a one second now.
  and if it needs more time to animate, it decrease intepolation progress by dividing some value.
  current logic makes sense however, it is not easy to read to know how it works.

  this patch modify current logic to calculate distance to move, and time to animate.

2. distance to move

  we can apply simple physics something like mass of pan and friction of scroller itself.
  but this patch apply just geometric seqeunce to calculate distance to go.
  it's more easy to customize behavior of scroller than current sine graph based one.

3. accelerate logic

  scroller sets 'extra_time' to accelerate a scroller for now.
  but this patch modify logic not to use it.
  however it uses current momenutum velocity as a bais of next momentum animating.

@feature

Reviewers: zmike, #reviewers, Hermet

Reviewed By: #reviewers, Hermet

Subscribers: Hermet, cedric, zmike

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D6643
2018-08-29 15:58:10 +09:00
Wonki Kim 79ec29897f scroller: remove unused ifdef blocks
Summary:
there are unused ifdef blocks and also there is a variable that accessed from nowhere.
this patch removes both of theme.

related with D6567

Reviewers: Hermet, eagleeye, devilhorns

Reviewed By: Hermet

Subscribers: cedric, zmike

Tags: #efl, #do_not_merge

Differential Revision: https://phab.enlightenment.org/D6585
2018-08-20 13:56:46 +09:00
Jean-Philippe Andre 6f6b365c84 elm_scroll: Avoid calls to non-existing part
In case of Bryce's style, there are no scroll bars.

this avoids errors for non-existent objects

ref T7030

Signed-off-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D6317
2018-06-25 11:30:52 +02:00
Hosang Kim 37f13a9d10 elm_interface_scrollable: change return value for post events.
Summary:
1. Scroller in scroller case, callback process should continue.
     If child scroller does not scroll, parent scroller should be checked whether scroll or not.
     So returning EINA_TRUE is necessary.
2. down.dragged flag is always EINA_FALSE, so scroll is never unlocked.
@fix

Test Plan:
precondition
  elementary_config -> scrolling -> Set Scroll Smooth Amount to 0
elementary_test -> pagescroller

Reviewers: woohyun, zmike, singh.amitesh, cedric

Reviewed By: cedric

Subscribers: #committers, cedric, zmike

Tags: #efl

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:04:50 -07:00
Cedric BAIL 2ce788063a elementary: no need to recalculate the layout during invalidate. 2018-05-24 16:02:19 -07: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
Marcel Hollerbach 139efaaba3 elm_interface_scrollable: rework filtering
A item might be in the middle of the viewport and still miss relations.
2018-04-30 15:22:52 +02: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
Marcel Hollerbach e40f25b67e efl_interface_scrollable: call constructor at first
other calls could lead to a geometry_get call, which will crash if the
constructor of the canvas_object is not called yet.
2018-03-28 10:48:01 +02:00
Marcel Hollerbach 8746c275f5 elm_interface_scrollable: make sure to have the content always focusable 2018-03-15 15:39:12 +01:00
Mike Blumenkrantz 8530bbc57b elm_interface_scrollable: repeat_events -> content_events 2018-02-15 13:11:01 -05:00
Mike Blumenkrantz a6566ef8ae elm_interface_scrollable: use 'mirrored' from Efl.Ui.Base 2018-02-15 13:11:01 -05:00
Mike Blumenkrantz f13682a5df elm_interface_scrollable: repeat_events -> content_events 2018-02-15 13:11:01 -05:00
Sungtaek Hong cb25699dac efl_ui_legacy: add new interface to indicate legacy widget
Summary:
For now, how to check whether a widget is legacy or not
is to check flags in private data or static flag, which is set
during elm_legacy_add.
If Efl.Ui.Legacy interface is added, it can be easilly checked
by efl_isa(obj, EFL_UI_LEGACY_INTERFACE)

Reviewers: woohyun, jpeg, cedric, Jaehyun_Cho

Subscribers: conr2d, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5748
2018-01-24 18:14:26 +09:00
Jean-Philippe Andre a92186be6a ecore/edje/elm: Fix a few WRN from calls to NULL
This fixes some of the warnings generated by calling functions on NULL
objects. One of the main remaining points is to avoid unwanted warnings
on non-existing parts.

Ref T6326
2018-01-16 18:37:05 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Jean-Philippe Andre c2a5ee65d5 elm: Fix duplicate EO API
elm_interface_scrollable is used by legacy but isn't public API.
2017-12-20 15:26:22 +09:00
Cedric BAIL d614894d04 ecore: rename efl_loop_Eina_FutureXXX_job to efl_loop_job. 2017-12-11 14:04:09 -08:00
Cedric BAIL 0cb8bde34a elementary: use Eina.Future based job. 2017-12-11 14:04:09 -08:00
Carsten Haitzler 01ec011f8e elm ifrace scrollable - fix uninitialized values on scroll asjust
dragable values were invalid (not fetched) so vx/y were junk and this
was making decisions based on that. guarantee it to be 0.

@fix
2017-11-24 23:52:08 +09:00
Sungtaek Hong 8f2369c5b6 efl_ui_widget: secure elm_legacy_add flag
Summary:
_elm_legacy_add goes back to EINA_FALSE after setting sd->legacy.
if constructor get called again after going back to EINA_FALSE,
sd->legacy should remain EINA_TRUE.
also, elm_legacy_add() should not be called non-elm_widget.

Test Plan:
Run elementary test->Efl.Ui.Text.Label.
Check legacy flag in _elm_theme_object_set() for efl_ui_win.
Check legacy flag for efl_ui_text after scrollable text is added.

Reviewers: jpeg, woohyun

Reviewed By: jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5529
2017-11-24 14:32:36 +09:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
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-11-07 14:50:31 +09:00
Jean-Philippe Andre 2f465e1fbb widget: Rename EO APIs to efl_ui_widget_xxx
This only changes the eo_prefix for APIs.

Ref T5363
2017-10-24 14:30:21 +09:00
Marcel Hollerbach 3184e0f550 elm_interface_scrollable: do not scroll to a focused element by default
this can be done in the implementing other widgets
2017-10-19 15:20:59 +02:00
Marcel Hollerbach 56e9f582b6 elm_interface_scrollable: make sure this region is really visual
right now we just request the complete geom to be visible since there
seems to be no way ot checking where the new widgets will be in. This
needs some improvements.
2017-10-19 10:04:59 +02:00
Marcel Hollerbach 0fb1d6e1fa elm_interface_scrollable: fix bringing in of a focused item
you also need to calculate in the object position
2017-10-17 17:49:48 +02:00
Marcel Hollerbach d15ee47db0 elm_interface_scrollable: use focus_geometry not normal geometry 2017-10-10 22:25:21 +02:00
Jean-Philippe Andre 4c0167916b focus: Avoid infinite loop in window
I kept the safety error message for easier debugging.
Test scenario:
  elementary_test -to "Window Inline"
  Click on an entry. Press Shift+Tab.

Ping @bu5hm4n
2017-10-10 19:32:50 +09:00
Jean-Philippe Andre 4c634ed78e efl: Use Eina.Size2D for Efl.Gfx.size
Big patch as a lot of things call or reimplement size_set. Hopefully I
got it right... fingers crossed.
2017-09-18 13:34:50 +09:00
Jean-Philippe Andre 8fb194d969 efl: Use Eina.Position2D for Efl.Gfx.position
Note: This is a little bit more cumbersome in some places but in most
it's more convenient than (x,y).
2017-09-18 13:22:54 +09:00
Jean-Philippe Andre 6d0957b0a5 widget: Rename focus_manager_factory to create
factory is not a verb :)

Ref T5363
2017-09-13 13:43:55 +09:00