1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Cocoa wxTimer class
6 // Copyright: (c) Ryan Norton
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_TIMER_H__
12 #define __WX_TIMER_H__
14 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
15 #pragma interface "timer.h"
18 #include "wx/cocoa/ObjcRef.h"
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24 DECLARE_WXCOCOA_OBJC_CLASS(NSTimer
);
26 class WXDLLEXPORT wxTimer
: public wxTimerBase
30 wxTimer(wxEvtHandler
*owner
, int timerid
= -1) : wxTimerBase(owner
, timerid
)
34 virtual bool Start(int millisecs
= -1, bool oneShot
= false);
37 virtual bool IsRunning() const;
39 inline WX_NSTimer
GetNSTimer()
40 { return m_cocoaNSTimer
; }
46 WX_NSTimer m_cocoaNSTimer
;
47 static const wxObjcAutoRefFromAlloc
<struct objc_object
*> sm_cocoaDelegate
;
49 DECLARE_ABSTRACT_CLASS(wxTimer
)
52 #endif // __WX_TIMER_H__