Commit Graph

25 Commits

Author SHA1 Message Date
Cedric BAIL 4624b56bed elementary: make sure that our index for the maximum number of object is actually unsigned int bound.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10927
2019-12-27 11:36:59 +01:00
Cedric BAIL 8331ea048c elementary: improve data layout for Efl.Ui.PositionManager*.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10688
2019-12-11 11:12:06 +01:00
Cedric BAIL 2b324779c9 elementary: reduce events triggered by Efl.Ui.PositionManager.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10687
2019-12-11 11:12:01 +01:00
Cedric BAIL b77482e7d6 elementary: cleanup Eina_Future properly by relying on efl_future_then proper lifecycle.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10613
2019-11-07 22:24:00 +01:00
Marcel Hollerbach 7025d9aee8 efl_ui_position_manager_list: emit events correctly
it does not matter if pmin_size is > 0 or not. The important thing is
that it is different to what is now, but thats it.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9970
2019-09-24 11:12:49 -07:00
Cedric BAIL 2e1317baed elementary: introduce Efl.Ui.CollectionView a generic listing View.
The idea of this widget is to provide to MVVM what Efl.Ui.Collection provide and
leverage the same shared logic for layout.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>
Co-authored-by: Marcel Hollerbach <mail@marcel-hollerbach.de>

Differential Revision: https://phab.enlightenment.org/D9958
2019-09-24 11:12:43 -07:00
Marcel Hollerbach 534021632c efl_ui_position_manager: review cache accesses
in position manager grid and list, there are caches for the sizes, so
the access within placing the item is faster. The cache sometimes is
invalidated, which means, it must be rebuild before accessing it.

This commit is the result of reviewing all the accesses, that the
correct item is available.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10065
2019-09-23 10:33:19 -07:00
Marcel Hollerbach fc935e99d9 efl_ui_position_manager: a way to announce new entities
there are situations where the entity is not ready yet when the initial
placing does happen. With this API you can tell the position manager
that the placing of the items can be reapplied at the entities are
availble now.

Differential Revision: https://phab.enlightenment.org/D9947
2019-09-19 14:37:52 -07:00
Cedric Bail e448110439 elementary: properly shutdown and cleanup Efl.Ui.Position_Manager.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9946
2019-09-17 10:24:14 -07:00
Marcel Hollerbach 6e23dfba62 efl_ui_position_manager: only fill as many items as we need
prior to this commit, we just passed the start_id and the end_id the
end_id was the start_id plus the size of the memory buffer. However,
making this depending on the size of the memory buffer is a bad idea, as
changing it based on our needs is rather painfull.

With this commit we have explicit passing of the start_id, end_id and
memory len. This is kind of redundant, however, its very convenient, and
easy to write. The buffer will be filled with the maximum size that is
possible with length of the buffer, however, the end_id will not be
filled anymore.

Differential Revision: https://phab.enlightenment.org/D9756
2019-09-10 09:10:11 +02:00
Marcel Hollerbach 389dbd2524 efl_ui_position_manager_list: support odd even styles
this was simply forgotten, but was part of the previous widget, so this
fixes the missing widget.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D9846
2019-09-10 09:10:10 +02:00
Marcel Hollerbach e25a56077c efl_ui_position_manager_list: fix return on viewport changes
Summary:
we also need to return here when the position is not the same, or we are
going to place items in the wrong spot.

Reviewers: segfaultxavi, zmike, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9869
2019-09-09 09:03:33 -04:00
Marcel Hollerbach d73190a0bf efl_ui_position_manager_list: skip cache calculation for not finalized
if we are not finalized yet, there is no reason to calculate the caches,
as this will be redone later on anyways.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9825
2019-09-03 18:36:23 +02:00
Marcel Hollerbach b3aba63616 efl_ui_positon_manager_list: skip viewport size setting if its the same
this can be skipped.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9824
2019-09-03 18:36:22 +02:00
Marcel Hollerbach 018ae84bbe efl_ui_position_manager_list: require cache here
the cache need to be required here, as we are going to access it later
on.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9823
2019-09-03 18:36:21 +02:00
Marcel Hollerbach 1511470127 efl_ui_position_manager_list: set visibilitly more often
it is possible that the object returned by the batching call is NULL.
That is valid, however, if the batching call for the visibility is
getting the NULL element, but the placement is getting the none NULL
element, then the item on screen will not be visible. This commit
ensures that those items will be visible.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9822
2019-09-03 18:36:20 +02:00
Marcel Hollerbach 4617e5dcfb efl_ui_position_manager_list: error when we detect that sizes are wrong
when sizes are different to the cached size, then the displayed items
are out of order, or do not fill the whole viewport. This should not
happen. In case that this is detected, print an error.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9821
2019-09-03 18:36:19 +02:00
Marcel Hollerbach 53739890ce efl_ui_position_manager: refactor data access
before data access has been a property on
Efl.Ui.Position_Manager.Entity. However, we are not sure how stable all
this will be, and maybe we have the demand to change that in future, in
order to allow more high-performance item passing here.

Additionally, this patch addresses a few lectures learned from the past,
that includes:
- direct group header filling.
- direct group sizing
- difference between size for caching, and size for displaying
- Have a end_id which is the maximum of id that is filled.

ref T8179

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9754
2019-08-27 17:47:54 +02:00
Marcel Hollerbach 9eef883312 efl_ui_position_manager_common: generalize code
move the same code to a common header file.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9630
2019-08-21 07:50:55 +02:00
Marcel Hollerbach 5ad686bc85 efl_ui_position_manager_list: make it handle group items
this makes the group items stick at the top of the viewport, if the
corresponding items in there do have the item available.
For now items between two groups are not really handled, the group
header will still just be displayed.

The code for this feature is explicitly written in a single block, it
was said that we might want to have this able to be enabled / disabled
later on.

This commit also shuffels the code here a bit, one single method just
got too long.

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9587
2019-08-21 07:50:51 +02:00
Marcel Hollerbach e2b859bdae efl_ui_position_manager: pass on information about group ids
every batched call will now contain the id of the first item, if the
conditions in the documentation are met.

ref T8115

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9586
2019-08-21 07:50:50 +02:00
Marcel Hollerbach 63d3af3ce9 efl_ui_collection: implement initial focus behaviour
Summary:
the behaviour here is that the next item according to the direction is
getting focused. This sounds easy but is quite complex given the fact
that the items might be hidden. This is the first draft for this, to see
how good it performes.

Reviewers: zmike, stefan_schmidt, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9496
2019-08-06 09:34:42 -04:00
Marcel Hollerbach 4f45749b14 efl_ui_position_manager: add event for updating the range
the new event can be used to message back the currently visible range
from the position to the collection / collection_view.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9462
2019-08-01 14:36:59 -07:00
Marcel Hollerbach d98d434e56 efl_ui_position_manager: move from accessor to function callback
this commit enables access to the item structure of the collection via a
function callback. The function callback now enables batching for items,
which does not pay off right now. However, a few more optimizations can
be done in order to get the whole payoff.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9445
2019-07-31 15:51:48 -07:00
Cedric BAIL 9419be9baf elementary: make Efl.Ui.Position_Manager a namespace.
This does the following rename as per T8058:
Efl.Ui.Item_Position_Manager -> Efl.Ui.Position_Manager.Entity
Efl.Ui.Grid_Position_Manager -> Efl.Ui.Position_Manager.Grid
Efl.Ui.List_Position_Manager -> Efl.Ui.Position_Manager.List

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9388
2019-07-24 21:26:43 +02:00