]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/timer.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "timer.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 IMPLEMENT_ABSTRACT_CLASS(wxTimer
,wxObject
)
24 gint
timeout_callback( gpointer data
)
26 wxTimer
*timer
= (wxTimer
*)data
;
29 if ( timer
->OneShot() )
47 bool wxTimer::Start( int millisecs
, bool oneShot
)
49 if ( millisecs
!= -1 )
54 m_tag
= gtk_timeout_add( millisecs
, timeout_callback
, this );
63 gtk_timeout_remove( m_tag
);