]> git.saurik.com Git - wxWidgets.git/blob - src/qt/timer.cpp
More configure fixes
[wxWidgets.git] / src / qt / timer.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: timer.cpp
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifdef __GNUG__
13 #pragma implementation "timer.h"
14 #endif
15
16 #include "wx/timer.h"
17
18 //-----------------------------------------------------------------------------
19 // wxTimer
20 //-----------------------------------------------------------------------------
21
22 IMPLEMENT_DYNAMIC_CLASS(wxTimer,wxObject)
23
24 gint timeout_callback( gpointer data )
25 {
26 wxTimer *timer = (wxTimer*)data;
27 timer->Notify();
28 if (timer->OneShot()) timer->Stop();
29 return TRUE;
30 };
31
32 wxTimer::wxTimer(void)
33 {
34 m_time = 1000;
35 m_oneShot = FALSE;
36 };
37
38 wxTimer::~wxTimer(void)
39 {
40 Stop();
41 };
42
43 int wxTimer::Interval(void)
44 {
45 return m_time;
46 };
47
48 bool wxTimer::OneShot(void)
49 {
50 return m_oneShot;
51 };
52
53 void wxTimer::Notify(void)
54 {
55 };
56
57 void wxTimer::Start( int millisecs, bool oneShot )
58 {
59 if (millisecs != -1) m_time = millisecs;
60 m_oneShot = oneShot;
61 };
62
63 void wxTimer::Stop(void)
64 {
65 };
66