bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7884a38dbd46baf4d9636663269bcbb53f6c0b97

commit 7884a38dbd46baf4d9636663269bcbb53f6c0b97
Author: SangHyeon Jade Lee <sh10233....@samsung.com>
Date:   Wed Sep 25 10:57:03 2019 +0000

    efl_ui : change selected_items_get to selected_iterator_new.
    
    multi_selectable_aync already changed name as
    selected_iterator_new
    so multi_selectable change name also for unity of API.
    
    not sure about we need unselected_items_get in multi_selectable,
    so skip to create new api for this time.
    
    Reviewed-by: Marcel Hollerbach <m...@marcel-hollerbach.de>
    Differential Revision: https://phab.enlightenment.org/D10148
---
 src/examples/elementary/efl_ui_list_example_1.c      |  2 +-
 src/lib/elementary/efl_ui_collection.c               |  2 +-
 src/lib/elementary/efl_ui_collection.eo              |  4 ++--
 src/lib/elementary/efl_ui_grid.eo                    |  2 +-
 src/lib/elementary/efl_ui_list.eo                    |  2 +-
 src/lib/elementary/efl_ui_multi_selectable.eo        |  2 +-
 .../elementary/spec/efl_test_multi_selectable.c      | 20 ++++++++++----------
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/examples/elementary/efl_ui_list_example_1.c 
b/src/examples/elementary/efl_ui_list_example_1.c
index cbd05d23d1..dab45ae261 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -30,7 +30,7 @@ _list_selected(void *data EINA_UNUSED, const Efl_Event *ev)
   Eo *item = ev->info, *tmp;
   printf("list item [%p:%d] is %s\n", item, efl_ui_item_index_get(item), 
(efl_ui_selectable_selected_get(item)? "selected" : "unselected"));
 
-  Eina_Iterator *selects = efl_ui_selected_items_get(list);
+  Eina_Iterator *selects = efl_ui_selected_iterator_new(list);
 
   EINA_ITERATOR_FOREACH(selects, tmp)
      printf("selected [%p:%d] ", tmp, efl_ui_item_index_get(tmp));
diff --git a/src/lib/elementary/efl_ui_collection.c 
b/src/lib/elementary/efl_ui_collection.c
index b71b1af32c..abef6732c1 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_items_get(Eo *obj 
EINA_UNUSED, Efl_Ui_Collection_Data *pd)
+_efl_ui_collection_efl_ui_multi_selectable_selected_iterator_new(Eo *obj 
EINA_UNUSED, Efl_Ui_Collection_Data *pd)
 {
    return eina_list_iterator_new(pd->selected);
 }
diff --git a/src/lib/elementary/efl_ui_collection.eo 
b/src/lib/elementary/efl_ui_collection.eo
index 507477c2bc..28ecb4975d 100644
--- a/src/lib/elementary/efl_ui_collection.eo
+++ b/src/lib/elementary/efl_ui_collection.eo
@@ -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_items_get.
+     policy, and the selection can be retrieved with 
@Efl.Ui.Multi_Selectable.selected_iterator_new.
    ]]
    methods {
       item_scroll {
@@ -82,7 +82,7 @@ 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_items_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;
diff --git a/src/lib/elementary/efl_ui_grid.eo 
b/src/lib/elementary/efl_ui_grid.eo
index 72c2bfface..0b8be563df 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_items_get.
+     policy, and the selection can be retrieved with 
@Efl.Ui.Multi_Selectable.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_list.eo 
b/src/lib/elementary/efl_ui_list.eo
index c4481361f6..37173c2e0e 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_items_get.
+     policy, and the selection can be retrieved with 
@Efl.Ui.Multi_Selectable.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_multi_selectable.eo 
b/src/lib/elementary/efl_ui_multi_selectable.eo
index 44b39942fe..ea8e376ad2 100644
--- a/src/lib/elementary/efl_ui_multi_selectable.eo
+++ b/src/lib/elementary/efl_ui_multi_selectable.eo
@@ -17,7 +17,7 @@ interface @beta Efl.Ui.Multi_Selectable extends 
Efl.Ui.Single_Selectable
             mode: Efl.Ui.Select_Mode; [[Type of selection of children]]
          }
       }
-      selected_items_get {
+      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.]]
       }
diff --git a/src/tests/elementary/spec/efl_test_multi_selectable.c 
b/src/tests/elementary/spec/efl_test_multi_selectable.c
index ac0e6424b7..5e2c719d77 100644
--- a/src/tests/elementary/spec/efl_test_multi_selectable.c
+++ b/src/tests/elementary/spec/efl_test_multi_selectable.c
@@ -52,7 +52,7 @@ EFL_START_TEST(test_multi_select)
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
0)), EINA_TRUE);
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
2)), EINA_TRUE);
    ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), 
efl_pack_content_get(widget, 2));
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 2);
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), 
efl_pack_content_get(widget, 0));
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 1), 
efl_pack_content_get(widget, 2));
@@ -87,7 +87,7 @@ EFL_START_TEST(test_multi_select_removal)
    c = 0;
 
    ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), NULL);
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 0);
    efl_event_callback_del(widget, 
EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) 
event_callback_single_call_int_data, &c);
    efl_event_callback_del(widget, 
EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, 
event_callback_that_quits_the_main_loop_when_called, NULL);
@@ -114,7 +114,7 @@ EFL_START_TEST(test_single_select)
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
0)), EINA_FALSE);
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
2)), EINA_TRUE);
    ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), 
efl_pack_content_get(widget, 2));
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 1);
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), 
efl_pack_content_get(widget, 2));
 
@@ -144,7 +144,7 @@ EFL_START_TEST(test_none_select)
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
0)), EINA_FALSE);
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
2)), EINA_FALSE);
    ck_assert_ptr_eq(efl_ui_single_selectable_last_selected_get(widget), NULL);
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 0);
    efl_event_callback_del(widget, 
EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, (void*) 
event_callback_single_call_int_data, &c);
    efl_event_callback_del(widget, 
EFL_UI_SINGLE_SELECTABLE_EVENT_SELECTION_CHANGED, 
event_callback_that_quits_the_main_loop_when_called, NULL);
@@ -157,7 +157,7 @@ EFL_START_TEST(all_select_api)
 
    efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI);
    efl_ui_all_select(widget);
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
 
    ck_assert_int_eq(eina_array_count(arr_selected), 3);
 
@@ -175,7 +175,7 @@ EFL_START_TEST(all_unselect_api)
    efl_ui_selectable_selected_set(efl_pack_content_get(widget, 0), EINA_TRUE);
 
    efl_ui_all_unselect(widget);
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
 
    ck_assert_int_eq(eina_array_count(arr_selected), 0);
    
ck_assert_int_eq(efl_ui_selectable_selected_get(efl_pack_content_get(widget, 
0)), EINA_FALSE);
@@ -190,7 +190,7 @@ EFL_START_TEST(range_unselect)
    efl_ui_all_select(widget);
 
    efl_ui_range_unselect(widget, efl_pack_content_get(widget, 1), 
efl_pack_content_get(widget, 2));
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 1);
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), 
efl_pack_content_get(widget, 0));
 }
@@ -204,7 +204,7 @@ EFL_START_TEST(range_unselect2)
    efl_ui_all_select(widget);
 
    efl_ui_range_unselect(widget, efl_pack_content_get(widget, 2), 
efl_pack_content_get(widget, 1));
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 1);
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), 
efl_pack_content_get(widget, 0));
 }
@@ -216,7 +216,7 @@ EFL_START_TEST(range_select)
 
    efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI);
    efl_ui_range_select(widget, efl_pack_content_get(widget, 1), 
efl_pack_content_get(widget, 2));
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 2);
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), 
efl_pack_content_get(widget, 1));
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 1), 
efl_pack_content_get(widget, 2));
@@ -229,7 +229,7 @@ EFL_START_TEST(range_select2)
 
    efl_ui_select_mode_set(widget, EFL_UI_SELECT_MODE_MULTI);
    efl_ui_range_select(widget, efl_pack_content_get(widget, 2), 
efl_pack_content_get(widget, 1));
-   _iterator_to_array(&arr_selected, efl_ui_selected_items_get(widget));
+   _iterator_to_array(&arr_selected, efl_ui_selected_iterator_new(widget));
    ck_assert_int_eq(eina_array_count(arr_selected), 2);
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 0), 
efl_pack_content_get(widget, 1));
    ck_assert_ptr_eq(eina_array_data_get(arr_selected, 1), 
efl_pack_content_get(widget, 2));

-- 


Reply via email to