]>
git.saurik.com Git - wxWidgets.git/blob - src/gtk1/timer.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "timer.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 IMPLEMENT_ABSTRACT_CLASS(wxTimer
,wxObject
)
23 gint
timeout_callback( gpointer data
)
25 wxTimer
*timer
= (wxTimer
*)data
;
28 if ( timer
->OneShot() )
46 bool wxTimer::Start( int millisecs
, bool oneShot
)
48 if ( millisecs
!= -1 )
53 m_tag
= gtk_timeout_add( millisecs
, timeout_callback
, this );
62 gtk_timeout_remove( m_tag
);