add elm_win_focus_get
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 21 Nov 2011 19:41:53 +0000 (19:41 +0000)
committerMike McCormack <mj.mccormack@samsung.com>
Wed, 23 Nov 2011 05:52:01 +0000 (14:52 +0900)
git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@65493 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

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

index eb64d12..97028e7 100644 (file)
@@ -4430,6 +4430,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) EINA_ARG_NONNULL(1);
+   /**
     * Get screen geometry details for the screen that a window is on
     * @param obj The window to query
     * @param x where to return the horizontal offset value. May be NULL.
index fae74b7..9a08013 100644 (file)
@@ -2151,6 +2151,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_screen_size_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
 {