From 876ad2481515b8f1e5317d6db77b1de865e92920 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Wed, 23 Aug 2017 20:32:58 +0900 Subject: [PATCH] widget: Remove name_find from EO This is already implemented at the Efl.Object level, under the same name: "name_find". Ref T5363 --- src/lib/elementary/elm_widget.c | 19 ++++++------------- src/lib/elementary/elm_widget.eo | 9 --------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index b4e5a48ea6..7911e5bc24 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -4246,23 +4246,23 @@ elm_widget_type_check(const Evas_Object *obj, return EINA_FALSE; } -static Evas_Object * -_widget_name_find(const Evas_Object *obj, - const char *name, - int recurse) +/** @internal */ +EAPI Evas_Object * +elm_widget_name_find(const Eo *obj, const char *name, int recurse) { Eina_List *l; Evas_Object *child; const char *s; INTERNAL_ENTRY NULL; + if (!name) return NULL; if (!_elm_widget_is(obj)) return NULL; EINA_LIST_FOREACH(sd->subobjs, l, child) { s = evas_object_name_get(child); if ((s) && (!strcmp(s, name))) return child; if ((recurse != 0) && - ((child = _widget_name_find(child, name, recurse - 1)))) + ((child = elm_widget_name_find(child, name, recurse - 1)))) return child; } if (sd->hover_obj) @@ -4270,19 +4270,12 @@ _widget_name_find(const Evas_Object *obj, s = evas_object_name_get(sd->hover_obj); if ((s) && (!strcmp(s, name))) return sd->hover_obj; if ((recurse != 0) && - ((child = _widget_name_find(sd->hover_obj, name, recurse - 1)))) + ((child = elm_widget_name_find(sd->hover_obj, name, recurse - 1)))) return child; } return NULL; } -EOLIAN static Evas_Object* -_elm_widget_name_find(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *name, int recurse) -{ - if (!name) return NULL; - return _widget_name_find(obj, name, recurse); -} - /** * @internal * diff --git a/src/lib/elementary/elm_widget.eo b/src/lib/elementary/elm_widget.eo index 958b7e2fb1..729530223b 100644 --- a/src/lib/elementary/elm_widget.eo +++ b/src/lib/elementary/elm_widget.eo @@ -270,15 +270,6 @@ abstract Elm.Widget (Efl.Canvas.Group, Elm.Interface.Atspi_Accessible, } } - /* Probably not required with eo find */ - name_find @const { - [[Find widget by name]] - return: Efl.Canvas.Object; [[Widget]] - params { - @in name: string; [[Widget name]] - @in recurse: int; [[Depth in the tree to search for the widget]] - } - } sub_object_add { [['Virtual' function handling sub objects being added.]] return: bool; [[$true on success, $false otherwise]]