add elm_hover_dismiss()
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 3 Jan 2012 18:02:56 +0000 (18:02 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 3 Jan 2012 18:02:56 +0000 (18:02 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@66805 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_hover.c
src/lib/elm_hover.h

index 970e32e..61893c9 100644 (file)
@@ -852,3 +852,14 @@ elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_
    else if (spc_b > spc_r) return _HOV_BOTTOM;
    return _HOV_LEFT;
 }
+
+EAPI void
+elm_hover_dismiss(Evas_Object *obj)
+{
+   Widget_Data *wd;
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   edje_object_signal_emit(wd->cov, "elm,action,dismiss", "");
+}
index 5469c0c..ff2f5b8 100644 (file)
@@ -188,5 +188,13 @@ EAPI Evas_Object *elm_hover_content_unset(Evas_Object *obj, const char *swallow)
 EAPI const char  *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis);
 
 /**
+ * @brief Dismiss a hover object
+ *
+ * @param obj The hover object
+ * Use this function to simulate clicking outside the hover to dismiss it.
+ * In this way, the hover will be hidden and the "clicked" signal will be emitted.
+ */
+EAPI void elm_hover_dismiss(Evas_Object *obj);
+/**
  * @}
  */