Page MenuHomePhabricator

efl_ui_multi_selectable: clean this up

Authored by bu5hm4n on Nov 14 2019, 12:20 PM.



this commit merges common functions from efl_ui_multi_selectable and
efl_ui_multi_selectable_async. Additionally, the two different aspects
of accessing the elements in a multi_selectable widget (numerical or
object based) are now abstracted into interfaces called range_numeric and
range_object. numeric APIs are also prefixed with id's, so its possible
for one widget to implement both (if there will ever be the demand to do
that in future).

The main reason for this split is:

  • there is no good common path between mvvm based multi_selectable and

object based multi_Selectable, so there is no way that both sides would
benefit, without the other one suffering.

  • If we find later on the demand to implement both on one widget, we now

can fully do that

  • Common API is available for both types, so its less API and less

confusion for the API user.

ref T7871
ref T8265

Diff Detail

rEFL core/efl
No Linters Available
No Unit Test Coverage
Build Status
Buildable 14586
Build 10031: arc lint + arc unit
bu5hm4n created this revision.Nov 14 2019, 12:20 PM
bu5hm4n requested review of this revision.Nov 14 2019, 12:20 PM
cedric requested changes to this revision.Nov 14 2019, 1:06 PM
cedric added inline comments.

The prefix id_ make this API awful. I don't have any idea right now, but will share if I find something. @segfaultxavi any suggestion?

This revision now requires changes to proceed.Nov 14 2019, 1:06 PM
bu5hm4n added inline comments.Nov 14 2019, 1:40 PM

We need some prefix. And well it's a "id" range it's a iterator of selection "id"s. So I don't really see this is making it awful ?

SanghyeonLee added inline comments.

what about using class prefix numeric and object?
though in this case, selected_numeric or selected_index seems more natural than numeric_selected or index_selected..
we could pair it like this.



Efl.Ui.Multi_Selectable_Range_Numeric/Object sounds a bit weird... How about:

Efl.Ui.Multi_Selectable_Index_Range and Efl.Ui.Multi_Selectable_Object_Range?


I agree with @SanghyeonLee, as the docs say, "The iterator gives indices of selected children." therefore maybe this should be called selected_index_iterator_new or selected_ndx_iterator_new, no?

Efl.Ui.Multi_Selectable_Index_Range and Efl.Ui.Multi_Selectable_Object_Range?

I like this proposal.


  • Efl.Ui.Multi_Selectable_Range_Numeric --> Efl.Ui.Multi_Selectable_Index_Range
  • Efl.Ui.Multi_Selectable_Range_Object --> Efl.Ui.Multi_Selectable_Object_Range
  • id prefixes --> ndx (instead of "index", because this API is already way too verbose)

This is again ready for review!

Thank you for taking this over :)

Okay, i am totally fine with this. I would say lets go with this one.

@cedric are you ok with that ?

cedric accepted this revision.Nov 25 2019, 3:27 AM

Looks better this way.

This revision is now accepted and ready to land.Nov 25 2019, 3:27 AM
Closed by commit rEFLf7868fd28cfc: efl_ui_multi_selectable: clean this up (authored by Marcel Hollerbach <>). · Explain WhyNov 25 2019, 4:31 AM
This revision was automatically updated to reflect the committed changes.