From a3bd72a2d640e695739a15cb60f6c095bb90127d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 6 Jan 2021 23:53:27 +0100 Subject: Fix Doxygen warnings The redundancy here is pretty unfortunate, but ignoring Doxygen warnings obscures more serious issues, so fix this by just duplicating the docs. --- bindings/cxx/include/pugl/pugl.hpp | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) (limited to 'bindings/cxx/include') diff --git a/bindings/cxx/include/pugl/pugl.hpp b/bindings/cxx/include/pugl/pugl.hpp index 9e65589..8758a17 100644 --- a/bindings/cxx/include/pugl/pugl.hpp +++ b/bindings/cxx/include/pugl/pugl.hpp @@ -580,13 +580,45 @@ public: return static_cast(puglRequestAttention(cobj())); } - /// @copydoc puglStartTimer + /** + Activate a repeating timer event. + + This starts a timer which will send a timer event to `view` every + `timeout` seconds. This can be used to perform some action in a view at a + regular interval with relatively low frequency. Note that the frequency + of timer events may be limited by how often update() is called. + + If the given timer already exists, it is replaced. + + @param id The identifier for this timer. This is an application-specific + ID that should be a low number, typically the value of a constant or `enum` + that starts from 0. There is a platform-specific limit to the number of + supported timers, and overhead associated with each, so applications should + create only a few timers and perform several tasks in one if necessary. + + @param timeout The period, in seconds, of this timer. This is not + guaranteed to have a resolution better than 10ms (the maximum timer + resolution on Windows) and may be rounded up if it is too short. On X11 + and MacOS, a resolution of about 1ms can usually be relied on. + + Errors: + - #PUGL_FAILURE if timers are not supported by this system or build. + - #PUGL_UNKNOWN_ERROR if setting the timer failed. + */ Status startTimer(const uintptr_t id, const double timeout) noexcept { return static_cast(puglStartTimer(cobj(), id, timeout)); } - /// @copydoc puglStopTimer + /** + Stop an active timer. + + @param id The ID previously passed to startTimer(). + + Errors: + - #PUGL_FAILURE if timers are not supported by this system or build. + - #PUGL_UNKNOWN_ERROR if stopping the timer failed. + */ Status stopTimer(const uintptr_t id) noexcept { return static_cast(puglStopTimer(cobj(), id)); -- cgit v1.2.1