]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/private/timer.h
preparation for allowing to use wxTimer in wxBase (heavily modified patch 1113088):
[wxWidgets.git] / include / wx / gtk1 / private / timer.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/private/timer.h
3 // Purpose: wxTimerImpl for wxGTK
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK1_PRIVATE_TIMER_H_
11 #define _WX_GTK1_PRIVATE_TIMER_H_
12
13 #include "wx/private/timer.h"
14
15 //-----------------------------------------------------------------------------
16 // wxTimer
17 //-----------------------------------------------------------------------------
18
19 class WXDLLIMPEXP_CORE wxGTKTimerImpl : public wxTimerImpl
20 {
21 public:
22 wxGTKTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_tag = -1; }
23
24 virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
25 virtual void Stop();
26
27 virtual bool IsRunning() const { return m_tag != -1; }
28
29 private:
30 // registered timeout id, -1 if the timer isn't running
31 int m_tag;
32 };
33
34 #endif // _WX_GTK1_PRIVATE_TIMER_H_