]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/private/timer.h
wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / cocoa / private / timer.h
CommitLineData
2fcd7f64 1/////////////////////////////////////////////////////////////////////////////
c2ca375c 2// Name: wx/cocoa/private/timer.h
2fcd7f64
RN
3// Purpose: Cocoa wxTimer class
4// Author: Ryan Norton
2fcd7f64
RN
5// Copyright: (c) Ryan Norton
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
c2ca375c
VZ
9#ifndef _WX_COCOA_PRIVATE_TIMER_H_
10#define _WX_COCOA_PRIVATE_TIMER_H_
2fcd7f64 11
c2ca375c 12#include "wx/private/timer.h"
2fcd7f64 13
2fcd7f64
RN
14#include "wx/cocoa/ObjcRef.h"
15
16//-----------------------------------------------------------------------------
17// wxTimer
18//-----------------------------------------------------------------------------
19
20DECLARE_WXCOCOA_OBJC_CLASS(NSTimer);
21
53a2db12 22class WXDLLIMPEXP_CORE wxCocoaTimerImpl : public wxTimerImpl
2fcd7f64
RN
23{
24public:
c2ca375c
VZ
25 wxCocoaTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { Init(); }
26 virtual ~wxCocoaTimerImpl();
2fcd7f64
RN
27
28 virtual bool Start(int millisecs = -1, bool oneShot = false);
29 virtual void Stop();
30
31 virtual bool IsRunning() const;
32
c2ca375c 33 WX_NSTimer GetNSTimer() { return m_cocoaNSTimer; }
2fcd7f64
RN
34
35protected:
36 void Init();
37
38private:
39 WX_NSTimer m_cocoaNSTimer;
2fcd7f64
RN
40};
41
c2ca375c 42#endif // _WX_COCOA_PRIVATE_TIMER_H_