]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/timer.h
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / include / wx / timer.h
index 313e0446807de9a71c5dc2c5c05da52f49221cdb..6cded151efebff1a4ad35628d4e592b3f8e3cb75 100644 (file)
@@ -1,12 +1,12 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wx/timer.h
 // Purpose:     wxTimer, wxStopWatch and global time-related functions
 /////////////////////////////////////////////////////////////////////////////
 // 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$
 // 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
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
     #pragma interface "timerbase.h"
 #endif
 
     #pragma interface "timerbase.h"
 #endif
 
-#include "wx/setup.h"
+#include "wx/defs.h"
+
+#if wxUSE_GUI && wxUSE_TIMER
+
 #include "wx/object.h"
 #include "wx/longlong.h"
 #include "wx/event.h"
 #include "wx/object.h"
 #include "wx/longlong.h"
 #include "wx/event.h"
-
 #include "wx/stopwatch.h" // for backwards compatibility
 
 #include "wx/stopwatch.h" // for backwards compatibility
 
-#if wxUSE_GUI && wxUSE_TIMER
-
 // ----------------------------------------------------------------------------
 // wxTimer
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxTimer
 // ----------------------------------------------------------------------------
@@ -118,8 +118,10 @@ protected:
     #include "wx/motif/timer.h"
 #elif defined(__WXGTK__)
     #include "wx/gtk/timer.h"
     #include "wx/motif/timer.h"
 #elif defined(__WXGTK__)
     #include "wx/gtk/timer.h"
-#elif defined(__WXX11__) || defined(__WXMGL__) || defined(__WXCOCOA__)
+#elif defined(__WXX11__) || defined(__WXMGL__)
     #include "wx/generic/timer.h"
     #include "wx/generic/timer.h"
+#elif defined (__WXCOCOA__)
+    #include "wx/cocoa/timer.h"
 #elif defined(__WXMAC__)
     #include "wx/mac/timer.h"
 #elif defined(__WXPM__)
 #elif defined(__WXMAC__)
     #include "wx/mac/timer.h"
 #elif defined(__WXPM__)
@@ -187,8 +189,11 @@ private:
 
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
 
 typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
 
+#define wxTimerEventHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxTimerEventFunction, &func)
+
 #define EVT_TIMER(timerid, 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
 
 
 #endif // wxUSE_GUI && wxUSE_TIMER