add unfocus call.

SVN revision: 45012
This commit is contained in:
Carsten Haitzler 2010-01-10 02:18:50 +00:00
parent d0529a449d
commit cc406d10dd
2 changed files with 16 additions and 0 deletions

View File

@ -226,6 +226,7 @@ extern "C" {
EAPI void elm_finger_size_set(Evas_Coord size);
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);
EAPI Eina_Bool elm_object_focus_allow_get(Evas_Object *obj);

View File

@ -1392,6 +1392,21 @@ elm_object_focus(Evas_Object *obj)
elm_widget_focus_set(obj, 1);
}
/**
* Set the focus to the object
*
* This sets the focus target forkeyboard input to be the object indicated.
*
* @param obj The object
* @ingroup Focus
*/
EAPI void
elm_object_unfocus(Evas_Object *obj)
{
if (!elm_widget_can_focus_get(obj)) return;
elm_widget_focused_object_clear(obj);
}
/**
* Set the ability for the object to focus
*