From: discomfitor Date: Mon, 21 Nov 2011 19:41:53 +0000 (+0000) Subject: add elm_win_focus_get X-Git-Tag: REL_F_I9500_20120323_1~17^2~1299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be9e4acb3006cb2b65ea84ca656c2b66ce9c83d2;p=framework%2Fuifw%2Felementary.git add elm_win_focus_get git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@65493 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index a812906..d7121c3 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -4452,6 +4452,12 @@ extern "C" { */ EAPI Evas_Object *elm_win_inlined_image_object_get(Evas_Object *obj); /** + * Determine whether a window has focus + * @param obj The window to query + * @return EINA_TRUE if the window exists and has focus, else EINA_FALSE + */ + EAPI Eina_Bool elm_win_focus_get(const Evas_Object *obj); + /** * Set the enabled status for the focus highlight in a window * * This function will enable or disable the focus highlight only for the diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c index c4c21e3..49bdf8f 100644 --- a/src/lib/elm_win.c +++ b/src/lib/elm_win.c @@ -2175,6 +2175,16 @@ elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y) if (y) *y = win->screen.y; } +EAPI Eina_Bool +elm_win_focus_get(const Evas_Object *obj) +{ + Elm_Win *win; + ELM_CHECK_WIDTYPE(obj, widtype); + win = elm_widget_data_get(obj); + if (!win) return; + return ecore_evas_focus_get(win->ee); +} + EAPI void elm_win_conformant_set(Evas_Object *obj, Eina_Bool conformant) {