summaryrefslogtreecommitdiff
path: root/src/examples/elementary/efl_ui_list_example_1.c
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/examples/elementary/efl_ui_list_example_1.c
parent3b743715a0812a426602e885ca3ce55c32407c35 (diff)
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/examples/elementary/efl_ui_list_example_1.c')
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index ac4976a3c1..edf6d5dd4b 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -37,7 +37,7 @@ _list_selected(void *data EINA_UNUSED, const Efl_Event *ev)
37 Eo *item = ev->info, *tmp; 37 Eo *item = ev->info, *tmp;
38 printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_selectable_selected_get(item)? "selected" : "unselected")); 38 printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), (efl_ui_selectable_selected_get(item)? "selected" : "unselected"));
39 39
40 Eina_Iterator *selects = efl_ui_selectable_selected_iterator_new(list); 40 Eina_Iterator *selects = efl_ui_multi_selectable_selected_iterator_new(list);
41 41
42 EINA_ITERATOR_FOREACH(selects, tmp) 42 EINA_ITERATOR_FOREACH(selects, tmp)
43 printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp)); 43 printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp));
@@ -77,7 +77,7 @@ static void
77_select_radio_changed(void *data, const Efl_Event *ev) 77_select_radio_changed(void *data, const Efl_Event *ev)
78{ 78{
79 Eo *list = data; 79 Eo *list = data;
80 efl_ui_selectable_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object)); 80 efl_ui_multi_selectable_select_mode_set(list, efl_ui_radio_group_selected_value_get(ev->object));
81} 81}
82 82
83static void 83static void