managersub: remove the select_set call
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>
Mon, 24 Oct 2016 15:16:34 +0000 (17:16 +0200)
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>
Thu, 20 Apr 2017 12:38:57 +0000 (14:38 +0200)
this can be done directly be inheriting border_elements and cutting down
the set.

src/lib/elementary/efl_ui_focus_manager_sub.c
src/lib/elementary/efl_ui_focus_manager_sub.eo
src/tests/elementary/elm_test_focus_sub.c
src/tests/elementary/focus_test_sub.eo

index 98fa075..8732ec9 100644 (file)
@@ -38,7 +38,12 @@ _border_flush(Eo *obj, Efl_Ui_Focus_Manager_Sub_Data *pd)
    Efl_Ui_Focus_Object *node;
 
    borders = efl_ui_focus_manager_border_elements_get(obj);
-   selection = efl_ui_focus_manager_sub_select_set(obj, borders);
+   selection = NULL;
+   EINA_ITERATOR_FOREACH(borders, node)
+     {
+        selection = eina_list_append(selection, node);
+     }
+   eina_iterator_free(borders);
 
    //elements which are not in the current border elements
    tmp = eina_list_clone(pd->current_border);
index f56af23..a26020b 100644 (file)
@@ -6,16 +6,9 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Ef
 
       Each submanager also has to be a focus object, the object itself will be registered into the parent manager. It will be used as logical parent while registering the border elements.
 
-      The border elements can be filtered by using the select_set function.
+      You can filter the border elements by overriding the border_elements property of the manager.
     ]]
     methods {
-        select_set {
-            [[filters the given iterator for which elements should be registered in the upper manager]]
-            params {
-                objects : iterator<Efl.Ui.Focus.Object>; [[The objects to filter]]
-            }
-            return : list<Efl.Ui.Focus.Object>; [[The rest set from objects to use]]
-        }
         @property parent {
             [[The logical parent which is used to register the object itself in the parent manager]]
             values {
@@ -24,7 +17,6 @@ abstract Efl.Ui.Focus.Manager.Sub (Efl.Ui.Focus.Manager, Efl.Ui.Focus.Object, Ef
         }
     }
     implements {
-        @empty .select_set;
         @empty Efl.Ui.Focus.Object.geometry_get;
         @empty Efl.Ui.Focus.Object.focus.get;
         @empty Efl.Ui.Focus.User.manager.get;
index 3b253f5..f9012c6 100644 (file)
@@ -5,22 +5,6 @@ typedef struct {
 
 } Focus_Test_Sub_Data;
 
-EOLIAN static Eina_List*
-_focus_test_sub_efl_ui_focus_manager_sub_select_set(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Iterator *objects)
-{
-   Eina_List *list = NULL;
-   Efl_Ui_Focus_Object *o;
-
-   EINA_ITERATOR_FOREACH(objects, o)
-     {
-        list = eina_list_append(list, o);
-     }
-
-   eina_iterator_free(objects);
-
-   return list;
-}
-
 EOLIAN static void
 _focus_test_sub_efl_ui_focus_object_geometry_get(Eo *obj EINA_UNUSED, Focus_Test_Sub_Data *pd EINA_UNUSED, Eina_Rectangle *rect EINA_UNUSED)
 {
index 355acb9..60c6a43 100644 (file)
@@ -1,6 +1,5 @@
 class Focus.Test.Sub(Efl.Ui.Focus.Manager.Sub) {
     implements {
-        Efl.Ui.Focus.Manager.Sub.select_set;
         Efl.Ui.Focus.Object.geometry_get;
         Efl.Ui.Focus.Object.focus.get;
         Efl.Ui.Focus.User.manager.get;