'elm_object_focused_object_get_any_win_focus' will returns current focused
object regardless of window focus state.
Note that this is only for internal use.
Change-Id: If0592dfec3ef2478abeac65507d4ff8648d7aa82
EAPI Evas_Object *elm_object_focused_object_get(const Evas_Object *obj);
/**
+ * @internal
+ *
+ * Get focused object regardless of window focus state in object tree.
+ *
+ * This function returns current focused object in one object sub-tree.
+ * This won't check window focus state.
+ *
+ * @param obj The object root of sub-tree
+ * @return Current focused or @c NULL, if there is no focused object.
+ *
+ * @ingroup Elm_Focus
+ */
+EAPI Evas_Object *elm_object_focused_object_get_any_win_focus(const Evas_Object *obj);
+
+/**
* Make the elementary object and its children to be focusable
* (or unfocusable).
*
//
}
+EAPI Evas_Object *
+elm_object_focused_object_get_any_win_focus(const Evas_Object *obj)
+{
+ API_ENTRY_VAL(NULL)
+ const Evas_Object *subobj;
+
+ if (!pd->focused) return NULL;
+ for (unsigned int i = 0; i < eina_array_count(pd->children); ++i)
+ {
+ subobj = eina_array_data_get(pd->children, i);
+ Evas_Object *fobj;
+ if (!efl_isa(subobj, EFL_UI_WIDGET_CLASS)) continue;
+ fobj = elm_object_focused_object_get_any_win_focus(subobj);
+ if (fobj) return fobj;
+ }
+ return (Evas_Object *)obj;
+}
+
EAPI Eina_Bool
elm_object_focus_get(const Evas_Object *obj)
{