Small Timer docs improvement

This commit is contained in:
Davide Andreoli 2016-08-14 08:54:29 +02:00
parent 0ef56b3a58
commit 939cd71702
3 changed files with 10 additions and 2 deletions

View File

@ -15,8 +15,8 @@ great responsiveness without the need for threads(or any other concurrency).
Timers Timers
------ ------
:py:class:`Timers<efl.ecore.Timer>` serve two main purposes: doing something at a specified time and :py:class:`Timers<efl.ecore.Timer>` serve two main purposes: doing something at
repeatedly doing something with a set interval. a specified time and repeatedly doing something with a set interval.
Animators Animators

View File

@ -114,6 +114,8 @@ Flags for executing a child with its stdin and/or stdout piped back.
Makes child receive SIGTERM when parent dies Makes child receive SIGTERM when parent dies
.. _Ecore_Callback_Returns:
Callback return values Callback return values
---------------------- ----------------------
@ -126,6 +128,8 @@ Callback return values
Return value to keep a callback Return value to keep a callback
.. _Ecore_Event_Returns:
Event return values Event return values
------------------- -------------------

View File

@ -36,6 +36,10 @@ cdef class Timer(Eo):
returning *False* from ``func``, otherwise they'll continue alive, even returning *False* from ``func``, otherwise they'll continue alive, even
if the current python context delete it's reference to it. if the current python context delete it's reference to it.
For convenience and readability callback can also return one of the
:ref:`Ecore_Callback_Returns`. That is ``ECORE_CALLBACK_RENEW`` (like
returning True) or ``ECORE_CALLBACK_CANCEL`` (like returning False).
""" """
def __init__(self, double interval, func, *args, **kargs): def __init__(self, double interval, func, *args, **kargs):
"""Timer(...) """Timer(...)