]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/timer.h
wxCore build fix.
[wxWidgets.git] / include / wx / timer.h
index c8bce5dc9b3e4a0f0ca3bb5340ae7abefdade73d..3f25d378e99680abc4a35ce602571f2eea957b72 100644 (file)
@@ -1,31 +1,27 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wx/timer.h
 // Purpose:     wxTimer, wxStopWatch and global time-related functions
-// Author:      Julian Smart (wxTimer), Sylvain Bougnoux (wxStopWatch)
+// Author:      Julian Smart
 // Modified by: Vadim Zeitlin (wxTimerBase)
 //              Guillermo Rodriguez (global clean up)
 // Created:     04/01/98
 // RCS-ID:      $Id$
-// Copyright:   (c) wxWidgets team
+// Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_TIMER_H_BASE_
 #define _WX_TIMER_H_BASE_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma interface "timerbase.h"
-#endif
+#include "wx/defs.h"
+
+#if wxUSE_GUI && wxUSE_TIMER
 
-#include "wx/setup.h"
 #include "wx/object.h"
 #include "wx/longlong.h"
 #include "wx/event.h"
-
 #include "wx/stopwatch.h" // for backwards compatibility
 
-#if wxUSE_GUI && wxUSE_TIMER
-
 // ----------------------------------------------------------------------------
 // wxTimer
 // ----------------------------------------------------------------------------
@@ -116,8 +112,10 @@ protected:
     #include "wx/msw/timer.h"
 #elif defined(__WXMOTIF__)
     #include "wx/motif/timer.h"
-#elif defined(__WXGTK__)
+#elif defined(__WXGTK20__)
     #include "wx/gtk/timer.h"
+#elif defined(__WXGTK__)
+    #include "wx/gtk1/timer.h"
 #elif defined(__WXX11__) || defined(__WXMGL__)
     #include "wx/generic/timer.h"
 #elif defined (__WXCOCOA__)
@@ -189,8 +187,11 @@ private:
 
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
+#define wxTimerEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTimerEventFunction, &func)
+
 #define EVT_TIMER(timerid, func) \
-    DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxTimerEventFunction, & func ), NULL),
+    wx__DECLARE_EVT1(wxEVT_TIMER, timerid, wxTimerEventHandler(func))
 
 #endif // wxUSE_GUI && wxUSE_TIMER