summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 20:32:58 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 20:53:20 +0900
commit876ad2481515b8f1e5317d6db77b1de865e92920 (patch)
tree6f26259abfba00a60ad22bda49f2e24390c8aa19
parent1d39c2d175e24b3b89a3d29305eb1f0e7443c6a4 (diff)
widget: Remove name_find from EO
This is already implemented at the Efl.Object level, under the same name: "name_find". Ref T5363
-rw-r--r--src/lib/elementary/elm_widget.c19
-rw-r--r--src/lib/elementary/elm_widget.eo9
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,
4246 return EINA_FALSE; 4246 return EINA_FALSE;
4247} 4247}
4248 4248
4249static Evas_Object * 4249/** @internal */
4250_widget_name_find(const Evas_Object *obj, 4250EAPI Evas_Object *
4251 const char *name, 4251elm_widget_name_find(const Eo *obj, const char *name, int recurse)
4252 int recurse)
4253{ 4252{
4254 Eina_List *l; 4253 Eina_List *l;
4255 Evas_Object *child; 4254 Evas_Object *child;
4256 const char *s; 4255 const char *s;
4257 INTERNAL_ENTRY NULL; 4256 INTERNAL_ENTRY NULL;
4258 4257
4258 if (!name) return NULL;
4259 if (!_elm_widget_is(obj)) return NULL; 4259 if (!_elm_widget_is(obj)) return NULL;
4260 EINA_LIST_FOREACH(sd->subobjs, l, child) 4260 EINA_LIST_FOREACH(sd->subobjs, l, child)
4261 { 4261 {
4262 s = evas_object_name_get(child); 4262 s = evas_object_name_get(child);
4263 if ((s) && (!strcmp(s, name))) return child; 4263 if ((s) && (!strcmp(s, name))) return child;
4264 if ((recurse != 0) && 4264 if ((recurse != 0) &&
4265 ((child = _widget_name_find(child, name, recurse - 1)))) 4265 ((child = elm_widget_name_find(child, name, recurse - 1))))
4266 return child; 4266 return child;
4267 } 4267 }
4268 if (sd->hover_obj) 4268 if (sd->hover_obj)
@@ -4270,19 +4270,12 @@ _widget_name_find(const Evas_Object *obj,
4270 s = evas_object_name_get(sd->hover_obj); 4270 s = evas_object_name_get(sd->hover_obj);
4271 if ((s) && (!strcmp(s, name))) return sd->hover_obj; 4271 if ((s) && (!strcmp(s, name))) return sd->hover_obj;
4272 if ((recurse != 0) && 4272 if ((recurse != 0) &&
4273 ((child = _widget_name_find(sd->hover_obj, name, recurse - 1)))) 4273 ((child = elm_widget_name_find(sd->hover_obj, name, recurse - 1))))
4274 return child; 4274 return child;
4275 } 4275 }
4276 return NULL; 4276 return NULL;
4277} 4277}
4278 4278
4279EOLIAN static Evas_Object*
4280_elm_widget_name_find(const Eo *obj, Elm_Widget_Smart_Data *_pd EINA_UNUSED, const char *name, int recurse)
4281{
4282 if (!name) return NULL;
4283 return _widget_name_find(obj, name, recurse);
4284}
4285
4286/** 4279/**
4287 * @internal 4280 * @internal
4288 * 4281 *
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,
270 } 270 }
271 } 271 }
272 272
273 /* Probably not required with eo find */
274 name_find @const {
275 [[Find widget by name]]
276 return: Efl.Canvas.Object; [[Widget]]
277 params {
278 @in name: string; [[Widget name]]
279 @in recurse: int; [[Depth in the tree to search for the widget]]
280 }
281 }
282 sub_object_add { 273 sub_object_add {
283 [['Virtual' function handling sub objects being added.]] 274 [['Virtual' function handling sub objects being added.]]
284 return: bool; [[$true on success, $false otherwise]] 275 return: bool; [[$true on success, $false otherwise]]