add elm_hover_dismiss()

SVN revision: 66805
This commit is contained in:
Mike Blumenkrantz 2012-01-03 18:02:56 +00:00
parent 4390f8f16f
commit 5292a1a487
2 changed files with 19 additions and 0 deletions

View 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", "");
}

View File

@ -187,6 +187,14 @@ 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);
/**
* @}
*/