diff options
author | David Robillard <d@drobilla.net> | 2021-01-06 23:53:27 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-01-06 23:53:27 +0100 |
commit | a3bd72a2d640e695739a15cb60f6c095bb90127d (patch) | |
tree | 8d69af7740e37ee9f9982e643369f1c965f7cec4 /bindings/cxx | |
parent | f913bfd3b5145a829d13501ef3391b001330d375 (diff) | |
download | pugl-a3bd72a2d640e695739a15cb60f6c095bb90127d.tar.gz pugl-a3bd72a2d640e695739a15cb60f6c095bb90127d.tar.bz2 pugl-a3bd72a2d640e695739a15cb60f6c095bb90127d.zip |
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.
Diffstat (limited to 'bindings/cxx')
-rw-r--r-- | bindings/cxx/include/pugl/pugl.hpp | 36 |
1 files changed, 34 insertions, 2 deletions
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<Status>(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<Status>(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<Status>(puglStopTimer(cobj(), id)); |