Evas Canvas: Remove focused_objects property.
authorGuilherme Iscaro <iscaro@profusion.mobi>
Wed, 4 Jan 2017 01:49:22 +0000 (10:49 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 4 Jan 2017 06:30:21 +0000 (15:30 +0900)
Summary:
This property is not needed and it will only increase the API size.
One can simple achieve the same behaviour by simple doing:

//C code...

Eina_List *l;
Evas_Device *dev;

devices = evas_device_list(evas, NULL);

EINA_LIST_FOREACH(devices, l, dev)
{
   Evas_Object *obj;

   if (evas_device_class_get(dev) != EVAS_DEVICE_CLASS_SEAT)
      continue;
   obj = evas_canvas_seat_focus_get(dev);
   //Do something with the focused object.....
}
//More C code...

Reviewers: bdilly, barbieri, conr2d, jpeg

Reviewed By: jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4547

src/lib/evas/canvas/evas_canvas.eo
src/lib/evas/canvas/evas_focus.c

index fa9cf00..d71b342 100644 (file)
@@ -138,7 +138,7 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
               See also \@ref evas_object_focus_set,
               \@ref evas_object_focus_get, \@ref evas_object_key_grab,
               \@ref evas_object_key_ungrab, @.seat_focus.get,
-              @.focused_objects.get, @Efl.Canvas.Object.seat_focus_check,
+              @Efl.Canvas.Object.seat_focus_check,
               @Efl.Canvas.Object.seat_focus_add,
               @Efl.Canvas.Object.seat_focus_del.
             ]]
@@ -158,14 +158,6 @@ class Evas.Canvas (Efl.Object, Efl.Canvas, Efl.Animator, Efl.Input.Interface,
                                                   or $null if there is not one.]]
          }
       }
-      @property focused_objects {
-         [[Return an iterator of focused objects. @since 1.19]]
-         get {
-            return: free(own(iterator<Eina_Hash_Tuple>), eina_iterator_free);  [[An iterator that contains
-                                                                                 Eina_Hash_Tuple which the key is an
-                                                                               Efl.Input.Device and the data is an Efl.Canvas.Object or $null on error.]]
-         }
-      }
       @property seat_focus {
          [[Return the focused object by a given seat. @since 1.19]]
          get {}
index 36f265c..71351cc 100644 (file)
@@ -263,9 +263,3 @@ _evas_canvas_focus_get(Eo *eo_obj EINA_UNUSED, Evas_Public_Data *e)
 {
    return _evas_canvas_seat_focus_get(eo_obj, e, NULL);
 }
-
-EOLIAN Eina_Iterator *
-_evas_canvas_focused_objects_get(Eo *eo_obj EINA_UNUSED, Evas_Public_Data *e)
-{
-   return eina_hash_iterator_tuple_new(e->focused_objects);
-}