1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "timer.h"
19 //-----------------------------------------------------------------------------
21 //-----------------------------------------------------------------------------
23 IMPLEMENT_ABSTRACT_CLASS(wxTimer,wxObject)
25 static gint timeout_callback( gpointer data )
27 wxTimer *timer = (wxTimer*)data;
29 /* when getting called from GDK's timer handler we
30 are no longer within GDK's grab on the GUI
31 thread so we must lock it here ourselves */
36 /* release lock again */
39 if ( timer->IsOneShot() )
56 bool wxTimer::Start( int millisecs, bool oneShot )
58 (void)wxTimerBase::Start(millisecs, oneShot);
60 m_tag = gtk_timeout_add( m_milli, timeout_callback, this );
69 gtk_timeout_remove( m_tag );