From 939cd71702c277cf9f6b6a33c774f174a1362023 Mon Sep 17 00:00:00 2001 From: Dave Andreoli Date: Sun, 14 Aug 2016 08:54:29 +0200 Subject: [PATCH] Small Timer docs improvement --- doc/ecore/ecore.rst | 4 ++-- efl/ecore/efl.ecore.pyx | 4 ++++ efl/ecore/efl.ecore_timer.pxi | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/ecore/ecore.rst b/doc/ecore/ecore.rst index ca89065..fdafb92 100644 --- a/doc/ecore/ecore.rst +++ b/doc/ecore/ecore.rst @@ -15,8 +15,8 @@ great responsiveness without the need for threads(or any other concurrency). Timers ------ -:py:class:`Timers` serve two main purposes: doing something at a specified time and -repeatedly doing something with a set interval. +:py:class:`Timers` serve two main purposes: doing something at +a specified time and repeatedly doing something with a set interval. Animators diff --git a/efl/ecore/efl.ecore.pyx b/efl/ecore/efl.ecore.pyx index 62f4a0c..7c076e3 100644 --- a/efl/ecore/efl.ecore.pyx +++ b/efl/ecore/efl.ecore.pyx @@ -114,6 +114,8 @@ Flags for executing a child with its stdin and/or stdout piped back. Makes child receive SIGTERM when parent dies +.. _Ecore_Callback_Returns: + Callback return values ---------------------- @@ -126,6 +128,8 @@ Callback return values Return value to keep a callback +.. _Ecore_Event_Returns: + Event return values ------------------- diff --git a/efl/ecore/efl.ecore_timer.pxi b/efl/ecore/efl.ecore_timer.pxi index 0cb7e64..f5bdc51 100644 --- a/efl/ecore/efl.ecore_timer.pxi +++ b/efl/ecore/efl.ecore_timer.pxi @@ -36,6 +36,10 @@ cdef class Timer(Eo): returning *False* from ``func``, otherwise they'll continue alive, even 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): """Timer(...)