summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-20 12:36:02 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-25 13:31:24 +0100
commitf7868fd28cfc2a941601cd11e4598abf77e17c6c (patch)
treeb63288cbe76988f6b3bf387b63d9673179c2524b /src/lib
parent3b743715a0812a426602e885ca3ce55c32407c35 (diff)
downloadefl-f7868fd28cfc2a941601cd11e4598abf77e17c6c.tar.gz
efl_ui_multi_selectable: clean this up
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 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10675
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/Efl_Ui.h3
-rw-r--r--src/lib/elementary/efl_ui_collection.c6
-rw-r--r--src/lib/elementary/efl_ui_collection.eo10
-rw-r--r--src/lib/elementary/efl_ui_collection_view.c4
-rw-r--r--src/lib/elementary/efl_ui_collection_view.eo6
-rw-r--r--src/lib/elementary/efl_ui_grid.eo2
-rw-r--r--src/lib/elementary/efl_ui_grid_view.eo4
-rw-r--r--src/lib/elementary/efl_ui_item.c3
-rw-r--r--src/lib/elementary/efl_ui_list.eo2
-rw-r--r--src/lib/elementary/efl_ui_list_view.eo4
-rw-r--r--src/lib/elementary/efl_ui_multi_selectable.eo34
-rw-r--r--src/lib/elementary/efl_ui_multi_selectable_async.eo63
-rw-r--r--src/lib/elementary/efl_ui_multi_selectable_index_range.eo53
-rw-r--r--src/lib/elementary/efl_ui_multi_selectable_object_range.eo46
-rw-r--r--src/lib/elementary/efl_ui_select_model.c24
-rw-r--r--src/lib/elementary/efl_ui_select_model.eo16
-rw-r--r--src/lib/elementary/meson.build3
17 files changed, 145 insertions, 138 deletions
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index 9c8744d006..b3b07b5181 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -298,6 +298,8 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
# include <efl_ui_selectable.eo.h>
# include <efl_ui_single_selectable.eo.h>
# include <efl_ui_multi_selectable.eo.h>
+# include <efl_ui_multi_selectable_object_range.eo.h>
+# include <efl_ui_multi_selectable_index_range.eo.h>
# include <efl_ui_popup.eo.h>
# include <efl_ui_alert_popup.eo.h>
# include <efl_ui_popup_part_backwall.eo.h>
@@ -307,7 +309,6 @@ typedef Eo Efl_Ui_Spotlight_Indicator;
# include <efl_ui_tab_bar.eo.h>
# include <efl_ui_tab_page.eo.h>
# include <efl_ui_tab_pager.eo.h>
-# include <efl_ui_multi_selectable_async.eo.h>
# include <efl_ui_select_model.eo.h>
# include <efl_ui_list_view.eo.h>
diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c
index 6c3c5fe226..3e54f79b24 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -261,7 +261,7 @@ _efl_ui_collection_efl_ui_single_selectable_last_selected_get(const Eo *obj EINA
}
EOLIAN static Eina_Iterator*
-_efl_ui_collection_efl_ui_multi_selectable_selected_iterator_new(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
+_efl_ui_collection_efl_ui_multi_selectable_object_range_selected_iterator_new(Eo *obj EINA_UNUSED, Efl_Ui_Collection_Data *pd)
{
return eina_list_iterator_new(pd->selected);
}
@@ -1147,13 +1147,13 @@ _range_selection_find(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Selectable *a,
}
EOLIAN static void
-_efl_ui_collection_efl_ui_multi_selectable_range_select(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Selectable *a, Efl_Ui_Selectable *b)
+_efl_ui_collection_efl_ui_multi_selectable_object_range_range_select(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Selectable *a, Efl_Ui_Selectable *b)
{
_range_selection_find(obj, pd, a, b, EINA_TRUE);
}
EOLIAN static void
-_efl_ui_collection_efl_ui_multi_selectable_range_unselect(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Selectable *a, Efl_Ui_Selectable *b)
+_efl_ui_collection_efl_ui_multi_selectable_object_range_range_unselect(Eo *obj, Efl_Ui_Collection_Data *pd, Efl_Ui_Selectable *a, Efl_Ui_Selectable *b)
{
_range_selection_find(obj, pd, a, b, EINA_FALSE);
}
diff --git a/src/lib/elementary/efl_ui_collection.eo b/src/lib/elementary/efl_ui_collection.eo
index 6071c2ae02..342feea116 100644
--- a/src/lib/elementary/efl_ui_collection.eo
+++ b/src/lib/elementary/efl_ui_collection.eo
@@ -1,7 +1,7 @@
class Efl.Ui.Collection extends Efl.Ui.Layout_Base implements
Efl.Pack_Linear,
Efl.Ui.Layout_Orientable,
- Efl.Ui.Multi_Selectable,
+ Efl.Ui.Multi_Selectable_Object_Range,
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager,
Efl.Ui.Item_Clickable
@@ -24,7 +24,7 @@ class Efl.Ui.Collection extends Efl.Ui.Layout_Base implements
If all items do not fit in the current widget size scrolling facilities are provided.
Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable.select_mode
- policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable.selected_iterator_new.
+ policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Object_Range.selected_iterator_new.
@since 1.23
]]
@@ -84,12 +84,12 @@ class Efl.Ui.Collection extends Efl.Ui.Layout_Base implements
Efl.Ui.Widget.focus_state_apply;
Efl.Ui.Focus.Manager.move;
Efl.Ui.Single_Selectable.last_selected { get; }
- Efl.Ui.Multi_Selectable.selected_iterator_new;
Efl.Ui.Multi_Selectable.select_mode {get; set;}
Efl.Ui.Multi_Selectable.all_select;
Efl.Ui.Multi_Selectable.all_unselect;
- Efl.Ui.Multi_Selectable.range_select;
- Efl.Ui.Multi_Selectable.range_unselect;
+ Efl.Ui.Multi_Selectable_Object_Range.selected_iterator_new;
+ Efl.Ui.Multi_Selectable_Object_Range.range_select;
+ Efl.Ui.Multi_Selectable_Object_Range.range_unselect;
Efl.Ui.Single_Selectable.fallback_selection {get; set;}
}
}
diff --git a/src/lib/elementary/efl_ui_collection_view.c b/src/lib/elementary/efl_ui_collection_view.c
index e3d4c96ff0..e5cff428b4 100644
--- a/src/lib/elementary/efl_ui_collection_view.c
+++ b/src/lib/elementary/efl_ui_collection_view.c
@@ -1921,11 +1921,11 @@ _efl_ui_collection_view_model_changed(void *data, const Efl_Event *event)
// Search the composition of model for the one providing MULTI_SELECTABLE_ASYNC
mselect = ev->current;
while (mselect &&
- !efl_isa(mselect, EFL_UI_MULTI_SELECTABLE_ASYNC_INTERFACE) &&
+ !efl_isa(mselect, EFL_UI_MULTI_SELECTABLE_INDEX_RANGE_INTERFACE) &&
efl_isa(mselect, EFL_COMPOSITE_MODEL_CLASS))
mselect = efl_ui_view_model_get(mselect);
- if (!efl_isa(mselect, EFL_UI_MULTI_SELECTABLE_ASYNC_INTERFACE))
+ if (!efl_isa(mselect, EFL_UI_MULTI_SELECTABLE_INDEX_RANGE_INTERFACE))
{
mselect = NULL;
selection = EINA_FALSE;
diff --git a/src/lib/elementary/efl_ui_collection_view.eo b/src/lib/elementary/efl_ui_collection_view.eo
index 330c95693c..65a1ee9e62 100644
--- a/src/lib/elementary/efl_ui_collection_view.eo
+++ b/src/lib/elementary/efl_ui_collection_view.eo
@@ -3,7 +3,7 @@ class Efl.Ui.Collection_View extends Efl.Ui.Layout_Base implements
Efl.Ui.Focus.Manager_Sub,
Efl.Ui.Widget_Focus_Manager,
Efl.Ui.Item_Clickable
- composites Efl.Ui.Scrollable, Efl.Ui.Scrollbar, Efl.Ui.Multi_Selectable_Async, Efl.Ui.Single_Selectable
+ composites Efl.Ui.Scrollable, Efl.Ui.Scrollbar, Efl.Ui.Multi_Selectable_Index_Range, Efl.Ui.Single_Selectable
{
[[This widget displays a list of items in an arrangement controlled by an external @.position_manager
object. By using different @.position_manager objects this widget can show unidimensional lists or
@@ -21,8 +21,8 @@ class Efl.Ui.Collection_View extends Efl.Ui.Layout_Base implements
If all items do not fit in the current widget size scrolling facilities are provided.
- Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable_Async.select_mode
- policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Async.selected_iterator_new.
+ Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable.select_mode
+ policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Index_Range.selected_ndx_iterator_new.
@since 1.23
]]
diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo
index d461760eda..ad4a4aee68 100644
--- a/src/lib/elementary/efl_ui_grid.eo
+++ b/src/lib/elementary/efl_ui_grid.eo
@@ -8,7 +8,7 @@ class Efl.Ui.Grid extends Efl.Ui.Collection
@Efl.Ui.Layout_Orientable.orientation.
Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable.select_mode
- policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable.selected_iterator_new.
+ policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Object_Range.selected_iterator_new.
@Efl.Ui.Grid supports grouping by using @Efl.Ui.Group_Item objects.
Group headers are displayed at the top of the viewport if items belonging to the group
diff --git a/src/lib/elementary/efl_ui_grid_view.eo b/src/lib/elementary/efl_ui_grid_view.eo
index 18e513e8c9..3ad70c25d2 100644
--- a/src/lib/elementary/efl_ui_grid_view.eo
+++ b/src/lib/elementary/efl_ui_grid_view.eo
@@ -7,8 +7,8 @@ class @beta Efl.Ui.Grid_View extends Efl.Ui.Collection_View
The orientation (vertical or horizontal) of the grid can be set with
@Efl.Ui.Layout_Orientable.orientation.
- Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable_Async.select_mode
- policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Async.selected_iterator_new.
+ Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable.select_mode
+ policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Index_Range.selected_ndx_iterator_new.
]]
data: null;
implements {
diff --git a/src/lib/elementary/efl_ui_item.c b/src/lib/elementary/efl_ui_item.c
index f3c35ac9cf..349416ee8a 100644
--- a/src/lib/elementary/efl_ui_item.c
+++ b/src/lib/elementary/efl_ui_item.c
@@ -30,7 +30,7 @@ static Efl_Ui_Select_Mode
_fetch_state(Eo *obj)
{
if (efl_isa(obj, EFL_UI_MULTI_SELECTABLE_INTERFACE))
- return efl_ui_selectable_select_mode_get(obj);
+ return efl_ui_multi_selectable_select_mode_get(obj);
if (efl_isa(obj, EFL_UI_SINGLE_SELECTABLE_INTERFACE))
return EFL_UI_SELECT_MODE_SINGLE;
ERR("Uncaught state %s", efl_debug_name_get(obj));
@@ -236,6 +236,7 @@ ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_item, Efl_Ui_Item_Data)
#include "efl_ui_item.eo.c"
#include "efl_ui_selectable.eo.c"
#include "efl_ui_multi_selectable.eo.c"
+#include "efl_ui_multi_selectable_object_range.eo.c"
#include "efl_ui_single_selectable.eo.c"
#include "efl_ui_item_clickable.eo.c"
diff --git a/src/lib/elementary/efl_ui_list.eo b/src/lib/elementary/efl_ui_list.eo
index 0bd3045223..73ef34b9e8 100644
--- a/src/lib/elementary/efl_ui_list.eo
+++ b/src/lib/elementary/efl_ui_list.eo
@@ -8,7 +8,7 @@ class Efl.Ui.List extends Efl.Ui.Collection
@Efl.Ui.Layout_Orientable.orientation.
Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable.select_mode
- policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable.selected_iterator_new.
+ policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Object_Range.selected_iterator_new.
@Efl.Ui.List supports grouping by using @Efl.Ui.Group_Item objects.
Group headers are displayed at the top or left side of the viewport if items belonging to the group
diff --git a/src/lib/elementary/efl_ui_list_view.eo b/src/lib/elementary/efl_ui_list_view.eo
index c4de87da5a..af46bd32d0 100644
--- a/src/lib/elementary/efl_ui_list_view.eo
+++ b/src/lib/elementary/efl_ui_list_view.eo
@@ -7,8 +7,8 @@ class @beta Efl.Ui.List_View extends Efl.Ui.Collection_View
The orientation (vertical or horizontal) of the list can be set with
@Efl.Ui.Layout_Orientable.orientation.
- Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable_Async.select_mode
- policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Async.selected_iterator_new.
+ Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable.select_mode
+ policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Index_Range.selected_ndx_iterator_new.
]]
data: null;
implements {
diff --git a/src/lib/elementary/efl_ui_multi_selectable.eo b/src/lib/elementary/efl_ui_multi_selectable.eo
index 251f640185..c5237c8118 100644
--- a/src/lib/elementary/efl_ui_multi_selectable.eo
+++ b/src/lib/elementary/efl_ui_multi_selectable.eo
@@ -6,47 +6,15 @@ interface @beta Efl.Ui.Multi_Selectable extends Efl.Ui.Single_Selectable
The implementor of this interface provides the possibility to select multiple Selectables.
If not, only @Efl.Ui.Single_Selectable should be implemented.]]
- c_prefix: efl_ui_selectable;
+ c_prefix: efl_ui_multi_selectable;
methods
{
@property select_mode {
[[The mode type for children selection.]]
- set {}
- get {}
values {
mode: Efl.Ui.Select_Mode; [[Type of selection of children]]
}
}
- selected_iterator_new {
- [[Get the selected items in a iterator. The iterator sequence will be decided by selection.]]
- return: iterator<Efl.Ui.Selectable> @move @no_unused; [[User has to free the iterator after usage.]]
- }
- range_select @beta {
- [[Select a range of @Efl.Ui.Selectable.
-
- This will select the range of selectables from a to b or from b to a depending on which one comes first.
- If a or b are not part of the widget, a error is returned, and no change is applied.
- $null is not allowed as either of the parameters.
- Both of the passed values will also be selected.
- ]]
- params {
- a : Efl.Ui.Selectable; [[One side of the range.]]
- b : Efl.Ui.Selectable; [[The other side of the range.]]
- }
- }
- range_unselect @beta {
- [[Unselect a range of @Efl.Ui.Selectable.
-
- This will unselect the range of selectables from a to b or from b to a depending on which one comes first.
- If a or b are not part of the widget, a error is returned, and no change is applied.
- $null is not allowed as either of the parameters.
- Both of the passed values will also be unselected.
- ]]
- params {
- a : Efl.Ui.Selectable; [[One side of the range.]]
- b : Efl.Ui.Selectable; [[The other side of the range.]]
- }
- }
all_select {
[[Select all @Efl.Ui.Selectable]]
}
diff --git a/src/lib/elementary/efl_ui_multi_selectable_async.eo b/src/lib/elementary/efl_ui_multi_selectable_async.eo
deleted file mode 100644
index 3a09682358..0000000000
--- a/src/lib/elementary/efl_ui_multi_selectable_async.eo
+++ /dev/null
@@ -1,63 +0,0 @@
-import efl_ui;
-
-interface @beta Efl.Ui.Multi_Selectable_Async extends Efl.Ui.Single_Selectable
-{
- [[Interface for getting access to a range of selected items for widgets that provide them asynchronously.
-
- The implementor of this interface provides the possibility to select multiple @Efl.Ui.Selectable.
- If not, only @Efl.Ui.Single_Selectable should be implemented.
- A widget can only provide either this interface or @Efl.Ui.Multi_Selectable, but not both.]]
- methods
- {
- @property select_mode {
- [[The mode type for children selection.]]
- set {}
- get {}
- values {
- mode: Efl.Ui.Select_Mode; [[Type of selection of children]]
- }
- }
- selected_iterator_new {
- [[Gets an iterator of all the selected child of this model.
- ]]
- return: iterator<uint64> @move @no_unused; [[The iterator gives indices of selected children.
- It is valid until any change is made on the model.]]
- }
- unselected_iterator_new {
- [[Gets an iterator of all the child of this model that are not selected.
- ]]
- return: iterator<uint64> @move @no_unused; [[The iterator gives indices of unselected children.
- It is valid until any change is made on the model.]]
- }
- range_select @beta {
- [[Select a range of @Efl.Ui.Selectable.
-
- This will select the range of selectables from $a to $b or from $b to $a depending on which one comes first.
- If $a or $b are not in the range the widget, an error is returned, and no change is applied.
- Both of the passed values will also be selected.
- ]]
- params {
- a : uint64; [[One side of the range.]]
- b : uint64; [[The other side of the range.]]
- }
- }
- range_unselect @beta {
- [[Unselect a range of @Efl.Ui.Selectable.
-
- This will unselect the range of selectables from $a to $b or from $b to $a depending on which one comes first.
- If $a or $b are not in the range of the widget, an error is returned, and no change is applied.
- Both of the passed values will also be unselected.
- ]]
- params {
- a : uint64; [[One side of the range.]]
- b : uint64; [[The other side of the range.]]
- }
- }
- all_select {
- [[Select all @Efl.Ui.Selectable]]
- }
- all_unselect {
- [[Unselect all @Efl.Ui.Selectable]]
- }
- }
-}
diff --git a/src/lib/elementary/efl_ui_multi_selectable_index_range.eo b/src/lib/elementary/efl_ui_multi_selectable_index_range.eo
new file mode 100644
index 0000000000..39747ab8b4
--- /dev/null
+++ b/src/lib/elementary/efl_ui_multi_selectable_index_range.eo
@@ -0,0 +1,53 @@
+import efl_ui;
+
+interface @beta Efl.Ui.Multi_Selectable_Index_Range extends Efl.Ui.Multi_Selectable
+{
+ [[Interface for getting access to a range of selected items through their indices.
+
+ The implementor of this interface provides the possibility to select multiple @Efl.Ui.Selectable objects.
+ If not, only @Efl.Ui.Single_Selectable should be implemented.
+ A widget can only provide either this interface or @Efl.Ui.Multi_Selectable_Object_Range, but not both.]]
+ c_prefix: efl_ui_multi_selectable;
+ methods
+ {
+ selected_ndx_iterator_new {
+ [[Gets an iterator over the indices of all the selected children.
+ ]]
+ return: iterator<uint64> @move @no_unused; [[The iterator gives the indices of the selected children.
+ It is valid until any change is made to the selection state.]]
+ }
+ unselected_ndx_iterator_new {
+ [[Gets an iterator over the indices of all the unselected children.
+ ]]
+ return: iterator<uint64> @move @no_unused; [[The iterator gives the indices of the unselected children.
+ It is valid until any change is made to the selection state.]]
+ }
+ ndx_range_select @beta {
+ [[Select a range of @Efl.Ui.Selectable objects using their indices inside the container.
+
+ This will select the range of @Efl.Ui.Selectable objects from $a to $b or from $b to $a depending on
+ which one comes first.
+ If $a or $b are not part of the widget, an error is returned, and no change is applied.
+ $NULL is not allowed as either of the parameters.
+ ]]
+ params {
+ a : uint64; [[One side of the range.]]
+ b : uint64; [[The other side of the range.]]
+ }
+ }
+ ndx_range_unselect @beta {
+ [[Unselect a range of @Efl.Ui.Selectable objects using their indices inside the container.
+
+ This will unselect the range of @Efl.Ui.Selectable objects from $a to $b or from $b to $a depending on
+ which one comes first.
+ If $a or $b are not part of the widget, an error is returned, and no change is applied.
+ $NULL is not allowed as either of the parameters.
+ Both of the passed values will also be unselected.
+ ]]
+ params {
+ a : uint64; [[One side of the range.]]
+ b : uint64; [[The other side of the range.]]
+ }
+ }
+ }
+}
diff --git a/src/lib/elementary/efl_ui_multi_selectable_object_range.eo b/src/lib/elementary/efl_ui_multi_selectable_object_range.eo
new file mode 100644
index 0000000000..f88beb9efa
--- /dev/null
+++ b/src/lib/elementary/efl_ui_multi_selectable_object_range.eo
@@ -0,0 +1,46 @@
+import efl_ui;
+
+interface @beta Efl.Ui.Multi_Selectable_Object_Range extends Efl.Ui.Multi_Selectable
+{
+ [[Interface for getting access to a range of selected items.
+
+ The implementor of this interface provides the possibility to select multiple Selectables.
+ If not, only @Efl.Ui.Single_Selectable should be implemented.
+ A widget can only provide either this interface or @Efl.Ui.Multi_Selectable_Index_Range, but not both.]]
+ c_prefix: efl_ui_multi_selectable;
+ methods
+ {
+ selected_iterator_new {
+ [[Get the selected items in an iterator. The iterator sequence will be decided by selection.]]
+ return: iterator<Efl.Ui.Selectable> @move @no_unused; [[User has to free the iterator after usage.]]
+ }
+ range_select @beta {
+ [[Select a range of @Efl.Ui.Selectable.
+
+ This will select the range of @Efl.Ui.Selectable objects from $a to $b or from $b to $a depending on
+ which one comes first.
+ If $a or $b are not part of the widget, an error is returned, and no change is applied.
+ $NULL is not allowed as either of the parameters.
+ Both of the passed values will also be selected.
+ ]]
+ params {
+ a : Efl.Ui.Selectable; [[One side of the range.]]
+ b : Efl.Ui.Selectable; [[The other side of the range.]]
+ }
+ }
+ range_unselect @beta {
+ [[Unselect a range of @Efl.Ui.Selectable.
+
+ This will unselect the range of @Efl.Ui.Selectable objects from $a to $b or from $b to $a depending on
+ which one comes first.
+ If $a or $b are not part of the widget, an error is returned, and no change is applied.
+ $NULL is not allowed as either of the parameters.
+ Both of the passed values will also be unselected.
+ ]]
+ params {
+ a : Efl.Ui.Selectable; [[One side of the range.]]
+ b : Efl.Ui.Selectable; [[The other side of the range.]]
+ }
+ }
+ }
+}
diff --git a/src/lib/elementary/efl_ui_select_model.c b/src/lib/elementary/efl_ui_select_model.c
index c6092a50a6..016f720a15 100644
--- a/src/lib/elementary/efl_ui_select_model.c
+++ b/src/lib/elementary/efl_ui_select_model.c
@@ -469,7 +469,7 @@ _efl_ui_select_model_efl_model_property_get(const Eo *obj, Efl_Ui_Select_Model_D
}
static Eina_Iterator *
-_efl_ui_select_model_efl_ui_multi_selectable_async_selected_iterator_new(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_index_range_selected_ndx_iterator_new(Eo *obj,
Efl_Ui_Select_Model_Data *pd)
{
if (pd->parent && pd->parent->selection == EFL_UI_SELECT_MODE_NONE)
@@ -478,7 +478,7 @@ _efl_ui_select_model_efl_ui_multi_selectable_async_selected_iterator_new(Eo *obj
}
static Eina_Iterator *
-_efl_ui_select_model_efl_ui_multi_selectable_async_unselected_iterator_new(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_index_range_unselected_ndx_iterator_new(Eo *obj,
Efl_Ui_Select_Model_Data *pd EINA_UNUSED)
{
return efl_boolean_model_boolean_iterator_get(obj, "selected", EINA_FALSE);
@@ -492,7 +492,7 @@ _efl_ui_select_model_efl_ui_single_selectable_last_selected_get(const Eo *obj EI
}
static void
-_efl_ui_select_model_efl_ui_multi_selectable_async_select_mode_set(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_select_mode_set(Eo *obj,
Efl_Ui_Select_Model_Data *pd,
Efl_Ui_Select_Mode mode)
{
@@ -501,11 +501,11 @@ _efl_ui_select_model_efl_ui_multi_selectable_async_select_mode_set(Eo *obj,
case EFL_UI_SELECT_MODE_SINGLE:
mode = EFL_UI_SELECT_MODE_SINGLE;
if (pd->selection == EFL_UI_SELECT_MODE_MULTI)
- efl_ui_multi_selectable_async_all_unselect(obj);
+ efl_ui_multi_selectable_all_unselect(obj);
break;
case EFL_UI_SELECT_MODE_NONE:
if (pd->selection == EFL_UI_SELECT_MODE_MULTI)
- efl_ui_multi_selectable_async_all_unselect(obj);
+ efl_ui_multi_selectable_all_unselect(obj);
else if (pd->last_model)
{
Eina_Value unselect = eina_value_bool_init(EINA_FALSE);
@@ -526,14 +526,14 @@ _efl_ui_select_model_efl_ui_multi_selectable_async_select_mode_set(Eo *obj,
}
static Efl_Ui_Select_Mode
-_efl_ui_select_model_efl_ui_multi_selectable_async_select_mode_get(const Eo *obj EINA_UNUSED,
+_efl_ui_select_model_efl_ui_multi_selectable_select_mode_get(const Eo *obj EINA_UNUSED,
Efl_Ui_Select_Model_Data *pd)
{
return pd->selection;
}
static void
-_efl_ui_select_model_efl_ui_multi_selectable_async_all_select(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_all_select(Eo *obj,
Efl_Ui_Select_Model_Data *pd EINA_UNUSED)
{
unsigned long count, i;
@@ -553,16 +553,16 @@ _efl_ui_select_model_efl_ui_multi_selectable_async_all_select(Eo *obj,
}
static void
-_efl_ui_select_model_efl_ui_multi_selectable_async_all_unselect(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_all_unselect(Eo *obj,
Efl_Ui_Select_Model_Data *pd EINA_UNUSED)
{
uint64_t count = efl_model_children_count_get(obj);
- efl_ui_multi_selectable_async_range_unselect(obj, 0, count - 1);
+ efl_ui_multi_selectable_ndx_range_unselect(obj, 0, count - 1);
}
static void
-_efl_ui_select_model_efl_ui_multi_selectable_async_range_select(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_index_range_ndx_range_select(Eo *obj,
Efl_Ui_Select_Model_Data *pd EINA_UNUSED,
uint64_t a, uint64_t b)
{
@@ -604,7 +604,7 @@ _children_unselect_then(Eo *o EINA_UNUSED, void *data EINA_UNUSED, const Eina_Va
#define BATCH_MAX 100
static void
-_efl_ui_select_model_efl_ui_multi_selectable_async_range_unselect(Eo *obj,
+_efl_ui_select_model_efl_ui_multi_selectable_index_range_ndx_range_unselect(Eo *obj,
Efl_Ui_Select_Model_Data *pd EINA_UNUSED,
uint64_t a, uint64_t b)
{
@@ -695,4 +695,4 @@ _efl_ui_select_model_efl_ui_selectable_selected_get(const Eo *obj,
}
#include "efl_ui_select_model.eo.c"
-#include "efl_ui_multi_selectable_async.eo.c"
+#include "efl_ui_multi_selectable_index_range.eo.c"
diff --git a/src/lib/elementary/efl_ui_select_model.eo b/src/lib/elementary/efl_ui_select_model.eo
index 7fa0f8411a..abe5137a18 100644
--- a/src/lib/elementary/efl_ui_select_model.eo
+++ b/src/lib/elementary/efl_ui_select_model.eo
@@ -1,5 +1,5 @@
class @beta Efl.Ui.Select_Model extends Efl.Boolean_Model
- implements Efl.Ui.Multi_Selectable_Async,
+ implements Efl.Ui.Multi_Selectable_Index_Range,
Efl.Ui.Selectable
{
[[Efl ui select model class]]
@@ -9,13 +9,13 @@ class @beta Efl.Ui.Select_Model extends Efl.Boolean_Model
Efl.Model.property { get; set; }
Efl.Model.properties { get; }
Efl.Ui.Single_Selectable.last_selected { get; }
- Efl.Ui.Multi_Selectable_Async.selected_iterator_new;
- Efl.Ui.Multi_Selectable_Async.unselected_iterator_new;
- Efl.Ui.Multi_Selectable_Async.select_mode {get; set;}
- Efl.Ui.Multi_Selectable_Async.all_select;
- Efl.Ui.Multi_Selectable_Async.all_unselect;
- Efl.Ui.Multi_Selectable_Async.range_select;
- Efl.Ui.Multi_Selectable_Async.range_unselect;
+ Efl.Ui.Multi_Selectable.select_mode {get; set;}
+ Efl.Ui.Multi_Selectable.all_select;
+ Efl.Ui.Multi_Selectable.all_unselect;
+ Efl.Ui.Multi_Selectable_Index_Range.selected_ndx_iterator_new;
+ Efl.Ui.Multi_Selectable_Index_Range.unselected_ndx_iterator_new;
+ Efl.Ui.Multi_Selectable_Index_Range.ndx_range_select;
+ Efl.Ui.Multi_Selectable_Index_Range.ndx_range_unselect;
Efl.Ui.Single_Selectable.fallback_selection {get; set;}
Efl.Ui.Selectable.selected {get; set;}
}
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 7e21417aef..e9aaa55f57 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -178,7 +178,8 @@ pub_eo_files = [
'efl_ui_position_manager_grid.eo',
'efl_ui_selectable.eo',
'efl_ui_multi_selectable.eo',
- 'efl_ui_multi_selectable_async.eo',
+ 'efl_ui_multi_selectable_object_range.eo',
+ 'efl_ui_multi_selectable_index_range.eo',
'efl_ui_single_selectable.eo',
'efl_ui_position_manager_data_access_v1.eo',
'efl_ui_tab_bar_default_item.eo',