forked from enlightenment/efl
example of how to work around heirachy to go back up the tree - but wont work
for going bck down. i.e. - focus. SVN revision: 47302
This commit is contained in:
parent
7462246b63
commit
2257453fe4
|
@ -345,9 +345,26 @@ elm_widget_focused_object_get(const Evas_Object *obj)
|
||||||
EAPI Evas_Object *
|
EAPI Evas_Object *
|
||||||
elm_widget_top_get(const Evas_Object *obj)
|
elm_widget_top_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
#if 1 // strict way
|
||||||
API_ENTRY return NULL;
|
API_ENTRY return NULL;
|
||||||
if (sd->parent_obj) return elm_widget_top_get(sd->parent_obj);
|
if (sd->parent_obj) return elm_widget_top_get(sd->parent_obj);
|
||||||
return (Evas_Object *)obj;
|
return (Evas_Object *)obj;
|
||||||
|
#else // loose way
|
||||||
|
Smart_Data *sd = evas_object_smart_data_get(obj);
|
||||||
|
Evas_Object *par;
|
||||||
|
|
||||||
|
if (!obj) return NULL;
|
||||||
|
if ((sd) && (!strcmp(evas_object_type_get(obj), SMART_NAME)))
|
||||||
|
{
|
||||||
|
if ((sd->type) && (!strcmp(sd->type, "win")))
|
||||||
|
return (Evas_Object *)obj;
|
||||||
|
if (sd->parent_obj)
|
||||||
|
return elm_widget_top_get(sd->parent_obj);
|
||||||
|
}
|
||||||
|
par = evas_object_smart_parent_get(obj);
|
||||||
|
if (!par) return (Evas_Object *)obj;
|
||||||
|
return elm_widget_top_get(par);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
|
|
Loading…
Reference in New Issue