X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2fcd7f64a536513f8c8e3ecfac51c0a9ed7f92b7..21c8c5236009308b9ba88d003aae4b764875761a:/include/wx/timer.h diff --git a/include/wx/timer.h b/include/wx/timer.h index c8bce5dc9b..6cded151ef 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -1,12 +1,12 @@ ///////////////////////////////////////////////////////////////////////////// // 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 ///////////////////////////////////////////////////////////////////////////// @@ -17,15 +17,15 @@ #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/stopwatch.h" // for backwards compatibility -#if wxUSE_GUI && wxUSE_TIMER - // ---------------------------------------------------------------------------- // wxTimer // ---------------------------------------------------------------------------- @@ -189,8 +189,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