forked from enlightenment/efl
widget: Remove name_find from EO
This is already implemented at the Efl.Object level, under the same name: "name_find". Ref T5363
This commit is contained in:
parent
1d39c2d175
commit
876ad24815
|
@ -4246,23 +4246,23 @@ elm_widget_type_check(const Evas_Object *obj,
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Evas_Object *
|
/** @internal */
|
||||||
_widget_name_find(const Evas_Object *obj,
|
EAPI Evas_Object *
|
||||||
const char *name,
|
elm_widget_name_find(const Eo *obj, const char *name, int recurse)
|
||||||
int recurse)
|
|
||||||
{
|
{
|
||||||
Eina_List *l;
|
Eina_List *l;
|
||||||
Evas_Object *child;
|
Evas_Object *child;
|
||||||
const char *s;
|
const char *s;
|
||||||
INTERNAL_ENTRY NULL;
|
INTERNAL_ENTRY NULL;
|
||||||
|
|
||||||
|
if (!name) return NULL;
|
||||||
if (!_elm_widget_is(obj)) return NULL;
|
if (!_elm_widget_is(obj)) return NULL;
|
||||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||||
{
|
{
|
||||||
s = evas_object_name_get(child);
|
s = evas_object_name_get(child);
|
||||||
if ((s) && (!strcmp(s, name))) return child;
|
if ((s) && (!strcmp(s, name))) return child;
|
||||||
if ((recurse != 0) &&
|
if ((recurse != 0) &&
|
||||||
((child = _widget_name_find(child, name, recurse - 1))))
|
((child = elm_widget_name_find(child, name, recurse - 1))))
|
||||||
return child;
|
return child;
|
||||||
}
|
}
|
||||||
if (sd->hover_obj)
|
if (sd->hover_obj)
|
||||||
|
@ -4270,19 +4270,12 @@ _widget_name_find(const Evas_Object *obj,
|
||||||
s = evas_object_name_get(sd->hover_obj);
|
s = evas_object_name_get(sd->hover_obj);
|
||||||
if ((s) && (!strcmp(s, name))) return sd->hover_obj;
|
if ((s) && (!strcmp(s, name))) return sd->hover_obj;
|
||||||
if ((recurse != 0) &&
|
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 child;
|
||||||
}
|
}
|
||||||
return NULL;
|
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
|
* @internal
|
||||||
*
|
*
|
||||||
|
|
|
@ -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 {
|
sub_object_add {
|
||||||
[['Virtual' function handling sub objects being added.]]
|
[['Virtual' function handling sub objects being added.]]
|
||||||
return: bool; [[$true on success, $false otherwise]]
|
return: bool; [[$true on success, $false otherwise]]
|
||||||
|
|
Loading…
Reference in New Issue