mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 09:17:23 +01:00
22 lines
394 B
C++
22 lines
394 B
C++
#ifndef ESCHER_RUN_LOOP_H
|
|
#define ESCHER_RUN_LOOP_H
|
|
|
|
#include <ion.h>
|
|
#include <escher/timer.h>
|
|
|
|
class RunLoop {
|
|
public:
|
|
RunLoop();
|
|
void run();
|
|
void runWhile(bool (*callback)(void * ctx), void * ctx);
|
|
protected:
|
|
virtual bool dispatchEvent(Ion::Events::Event e) = 0;
|
|
virtual int numberOfTimers();
|
|
virtual Timer * timerAtIndex(int i);
|
|
private:
|
|
bool step();
|
|
int m_time;
|
|
};
|
|
|
|
#endif
|