New 1.17 API: elm.Notity.dismiss()

This commit is contained in:
Davide Andreoli 2016-01-23 16:40:49 +01:00
parent 190d0aa7b6
commit cab804e69b
3 changed files with 20 additions and 1 deletions

View File

@ -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

View File

@ -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):

View File

@ -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)