~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

« back to all changes in this revision

Viewing changes to include/wx/cocoa/private/timer.h

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        wx/cocoa/private/timer.h
 
3
// Purpose:     Cocoa wxTimer class
 
4
// Author:      Ryan Norton
 
5
// Id:          $Id: timer.h 52834 2008-03-26 15:06:00Z FM $
 
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
 
 
21
DECLARE_WXCOCOA_OBJC_CLASS(NSTimer);
 
22
 
 
23
class WXDLLIMPEXP_CORE wxCocoaTimerImpl : public wxTimerImpl
 
24
{
 
25
public:
 
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
 
 
36
protected:
 
37
    void Init();
 
38
 
 
39
private:
 
40
    WX_NSTimer m_cocoaNSTimer;
 
41
};
 
42
 
 
43
#endif // _WX_COCOA_PRIVATE_TIMER_H_