]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/private/timer.h
Fix compilation under dll builds. Wrap source files in wxUSE_WEB checks to allow...
[wxWidgets.git] / include / wx / cocoa / private / timer.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/private/timer.h
3// Purpose: Cocoa wxTimer class
4// Author: Ryan Norton
5// Id: $Id$
6// Copyright: (c) Ryan Norton
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_COCOA_PRIVATE_TIMER_H_
11#define _WX_COCOA_PRIVATE_TIMER_H_
12
13#include "wx/private/timer.h"
14
15#include "wx/cocoa/ObjcRef.h"
16
17//-----------------------------------------------------------------------------
18// wxTimer
19//-----------------------------------------------------------------------------
20
21DECLARE_WXCOCOA_OBJC_CLASS(NSTimer);
22
23class WXDLLIMPEXP_CORE wxCocoaTimerImpl : public wxTimerImpl
24{
25public:
26 wxCocoaTimerImpl(wxTimer* timer) : wxTimerImpl(timer) { Init(); }
27 virtual ~wxCocoaTimerImpl();
28
29 virtual bool Start(int millisecs = -1, bool oneShot = false);
30 virtual void Stop();
31
32 virtual bool IsRunning() const;
33
34 WX_NSTimer GetNSTimer() { return m_cocoaNSTimer; }
35
36protected:
37 void Init();
38
39private:
40 WX_NSTimer m_cocoaNSTimer;
41};
42
43#endif // _WX_COCOA_PRIVATE_TIMER_H_