From cab804e69b47c4792a8c56bc9e27ca7be1610683 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Sat, 23 Jan 2016 16:40:49 +0100 Subject: [PATCH] New 1.17 API: elm.Notity.dismiss() --- doc/elementary/notify.rst | 1 + efl/elementary/notify.pxi | 18 ++++++++++++++++++ efl/elementary/notify_cdef.pxi | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/elementary/notify.rst b/doc/elementary/notify.rst index 503c4e1..179faa1 100644 --- a/doc/elementary/notify.rst +++ b/doc/elementary/notify.rst @@ -21,6 +21,7 @@ Emitted signals - ``timeout`` - when timeout happens on notify and it's hidden - ``block,clicked`` - when a click outside of the notify happens +- ``dismissed`` - When notify is closed as a result of a dismiss (since 1.17) Layout content parts diff --git a/efl/elementary/notify.pxi b/efl/elementary/notify.pxi index f9659d7..1d9d798 100644 --- a/efl/elementary/notify.pxi +++ b/efl/elementary/notify.pxi @@ -110,6 +110,13 @@ cdef class Notify(Object): def allow_events_get(self): return bool(elm_notify_allow_events_get(self.obj)) + def dismiss(self): + """Dismiss a notify object. + + .. versionadded:: 1.17 + + """ + elm_notify_dismiss(self.obj) property align: """Set the alignment of the notify object @@ -157,6 +164,17 @@ cdef class Notify(Object): def callback_block_clicked_del(self, func): self._callback_del("block,clicked", func) + def callback_dismissed_add(self, func, *args, **kwargs): + """When notify is closed as a result of a dismiss. + + .. versionadded:: 1.17 + + """ + self._callback_add("dismissed", func, args, kwargs) + + def callback_dismissed_del(self, func): + self._callback_del("dismissed", func) + property orient: def __get__(self): diff --git a/efl/elementary/notify_cdef.pxi b/efl/elementary/notify_cdef.pxi index acc31ec..635a175 100644 --- a/efl/elementary/notify_cdef.pxi +++ b/efl/elementary/notify_cdef.pxi @@ -26,4 +26,4 @@ cdef extern from "Elementary.h": Eina_Bool elm_notify_allow_events_get(const Evas_Object *obj) void elm_notify_align_set(Evas_Object *obj, double horizontal, double vertical) void elm_notify_align_get(const Evas_Object *obj, double *horizontal, double *vertical) - + void elm_notify_dismiss(const Evas_Object *obj)