X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7b14c561d9f8cdfbbfbf05b0b1eef1dd63ece3e6..b9060f332453f80bc4c3c6aa6d25f322452d4f5e:/src/gtk1/timer.cpp diff --git a/src/gtk1/timer.cpp b/src/gtk1/timer.cpp index f5330bc012..c5e8bd37ad 100644 --- a/src/gtk1/timer.cpp +++ b/src/gtk1/timer.cpp @@ -7,12 +7,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "timer.h" -#endif - -#include "wx/defs.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_TIMER @@ -24,20 +20,21 @@ // wxTimer // ---------------------------------------------------------------------------- -IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxObject) +IMPLEMENT_ABSTRACT_CLASS(wxTimer, wxEvtHandler) -extern "C" gint timeout_callback( gpointer data ) +extern "C" { +static gint timeout_callback( gpointer data ) { wxTimer *timer = (wxTimer*)data; // Don't change the order of anything in this callback! - + if (timer->IsOneShot()) { // This sets m_tag to -1 timer->Stop(); } - + // When getting called from GDK's timer handler we // are no longer within GDK's grab on the GUI // thread so we must lock it here ourselves. @@ -53,6 +50,7 @@ extern "C" gint timeout_callback( gpointer data ) return TRUE; } +} void wxTimer::Init() {