add unfocus call.
authorCarsten Haitzler <raster@rasterman.com>
Sun, 10 Jan 2010 02:18:50 +0000 (02:18 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Sun, 10 Jan 2010 02:18:50 +0000 (02:18 +0000)
SVN revision: 45012

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

index 2c5c823..ec4f72a 100644 (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);
 
index 51b732b..78fec3e 100644 (file)
@@ -1393,6 +1393,21 @@ elm_object_focus(Evas_Object *obj)
 }
 
 /**
+ * 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
  *
  * This sets the ability for the object to be able to get keyboard focus or