timer.h 1017 B

123456789101112131415161718192021222324252627282930313233343536
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/msw/private/timer.h
  3. // Purpose: wxTimer class
  4. // Author: Julian Smart
  5. // Created: 01/02/97
  6. // Copyright: (c) Julian Smart
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_MSW_PRIVATE_TIMER_H_
  10. #define _WX_MSW_PRIVATE_TIMER_H_
  11. #if wxUSE_TIMER
  12. #include "wx/private/timer.h"
  13. #include "wx/msw/wrapwin.h" // for WPARAM
  14. class WXDLLIMPEXP_BASE wxMSWTimerImpl : public wxTimerImpl
  15. {
  16. public:
  17. wxMSWTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_id = 0; }
  18. virtual bool Start(int milliseconds = -1, bool oneShot = false);
  19. virtual void Stop();
  20. virtual bool IsRunning() const { return m_id != 0; }
  21. protected:
  22. // this must be 64 bit under Win64 as WPARAM (storing timer ids) is 64 bit
  23. // there and so the ids may possibly not fit in 32 bits
  24. WPARAM m_id;
  25. };
  26. #endif // wxUSE_TIMER
  27. #endif // _WX_TIMERH_