From 86a92bcd91e2ae0983705bf3fe821d92b6cb05a8 Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Wed, 19 May 2010 13:17:02 +0000 Subject: [PATCH] Implements elm_object_focus_get that returns if the object is focused. SVN revision: 49005 --- src/lib/Elementary.h.in | 3 ++- src/lib/elm_main.c | 22 +++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/lib/Elementary.h.in b/src/lib/Elementary.h.in index 1862715..13b9f71 100644 --- a/src/lib/Elementary.h.in +++ b/src/lib/Elementary.h.in @@ -260,7 +260,8 @@ extern "C" { EAPI Evas_Coord elm_finger_size_get(void); EAPI void elm_finger_size_set(Evas_Coord size); EAPI void elm_finger_size_all_set(Evas_Coord size); - + + EAPI Eina_Bool elm_object_focus_get(Evas_Object *obj); EAPI void elm_object_focus(Evas_Object *obj); EAPI void elm_object_unfocus(Evas_Object *obj); EAPI void elm_object_focus_allow_set(Evas_Object *obj, Eina_Bool enable); diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c index e9bc65b..3a09de6 100644 --- a/src/lib/elm_main.c +++ b/src/lib/elm_main.c @@ -1174,9 +1174,24 @@ elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coor */ /** + * Get the focus of the object + * + * This gets the focused property of the object. + * + * @param obj The object + * @return 1 if the object is focused, 0 if not. + * @ingroup Focus + */ +EAPI Eina_Bool +elm_object_focus_get(Evas_Object *obj) +{ + return elm_widget_focus_get(obj); +} + +/** * Set the focus to the object * - * This sets the focus target forkeyboard input to be the object indicated. + * This sets the focus target for keyboard input to be the object indicated. * * @param obj The object * @ingroup Focus @@ -1189,9 +1204,10 @@ elm_object_focus(Evas_Object *obj) } /** - * Set the focus to the object + * Remove the focus from the object * - * This sets the focus target forkeyboard input to be the object indicated. + * This removes the focus target for keyboard input from be the object + * indicated. * * @param obj The object * @ingroup Focus -- 2.7.4