add elm_win_focus_get
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 19:41:53 +0000 (19:41 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 19:41:53 +0000 (19:41 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@65493 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/Elementary.h.in
src/lib/elm_win.c

index a812906..d7121c3 100644 (file)
@@ -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
index c4c21e3..49bdf8f 100644 (file)
@@ -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)
 {