summaryrefslogtreecommitdiff
path: root/src/libaudcore/mainloop.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libaudcore/mainloop.h')
-rw-r--r--src/libaudcore/mainloop.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/libaudcore/mainloop.h b/src/libaudcore/mainloop.h
index 4c38eba..2d74e28 100644
--- a/src/libaudcore/mainloop.h
+++ b/src/libaudcore/mainloop.h
@@ -27,43 +27,41 @@
class QueuedFunc
{
public:
- typedef void (* Func) (void * data);
+ typedef void (*Func)(void * data);
// one-time idle callback
- void queue (Func func, void * data);
+ void queue(Func func, void * data);
// one-time delayed callback
- void queue (int delay_ms, Func func, void * data);
+ void queue(int delay_ms, Func func, void * data);
// periodic timer callback
- void start (int interval_ms, Func func, void * data);
+ void start(int interval_ms, Func func, void * data);
// stops any type of callback
// note that queue() and start() also stop any previous callback
- void stop ();
+ void stop();
// true if a periodic timer is running
// does not apply to one-time callbacks
- bool running () const
- { return _running; }
+ bool running() const { return _running; }
- constexpr QueuedFunc () = default;
- QueuedFunc (const QueuedFunc &) = delete;
- void operator= (const QueuedFunc &) = delete;
+ constexpr QueuedFunc() = default;
+ QueuedFunc(const QueuedFunc &) = delete;
+ void operator=(const QueuedFunc &) = delete;
- ~QueuedFunc ()
- { stop (); }
+ ~QueuedFunc() { stop(); }
// cancels any pending callbacks
// inhibits all future callbacks
// needed to allow safe shutdown of some (Qt!) main loops
- static void inhibit_all ();
+ static void inhibit_all();
private:
bool _running = false;
};
-void mainloop_run ();
-void mainloop_quit ();
+void mainloop_run();
+void mainloop_quit();
#endif // LIBAUDCORE_MAINLOOP_H