30 |
#define PG_TIMEROBJECT_H |
#define PG_TIMEROBJECT_H |
31 |
|
|
32 |
#include "paragui.h" |
#include "paragui.h" |
33 |
|
#include "pgsignals.h" |
34 |
#include <map> |
#include <map> |
35 |
|
|
36 |
typedef Uint32 PG_TimerID; |
typedef Uint32 PG_TimerID; |
48 |
public: |
public: |
49 |
|
|
50 |
/** |
/** |
51 |
|
Signal type declaration |
52 |
|
**/ |
53 |
|
template<class datatype = PG_Pointer> class SignalTimer : public PG_Signal2<PG_TimerObject*, PG_TimerID, datatype> {}; |
54 |
|
|
55 |
|
/** |
56 |
Constructor of the PG_TimerObject class. |
Constructor of the PG_TimerObject class. |
57 |
The constructor also calls SDL_InitSubSystem(SDL_Timer) to enable |
The constructor also calls SDL_InitSubSystem(SDL_Timer) to enable |
58 |
the SDL timer subsystem. |
the SDL timer subsystem. |
95 |
|
|
96 |
virtual Uint32 eventTimer(Uint32 interval); |
virtual Uint32 eventTimer(Uint32 interval); |
97 |
|
|
98 |
|
SignalTimer<> sigTimer; |
99 |
|
|
100 |
private: |
private: |
101 |
|
|
102 |
static Uint32 callbackTimer(Uint32 interval, void* data); |
static Uint32 callbackTimer(Uint32 interval, void* data); |