timer.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk1/private/timer.h
  3. // Purpose: wxTimerImpl for wxGTK
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK1_PRIVATE_TIMER_H_
  9. #define _WX_GTK1_PRIVATE_TIMER_H_
  10. #include "wx/private/timer.h"
  11. //-----------------------------------------------------------------------------
  12. // wxTimer
  13. //-----------------------------------------------------------------------------
  14. class WXDLLIMPEXP_CORE wxGTKTimerImpl : public wxTimerImpl
  15. {
  16. public:
  17. wxGTKTimerImpl(wxTimer *timer) : wxTimerImpl(timer) { m_tag = -1; }
  18. virtual bool Start(int millisecs = -1, bool oneShot = FALSE);
  19. virtual void Stop();
  20. virtual bool IsRunning() const { return m_tag != -1; }
  21. private:
  22. // registered timeout id, -1 if the timer isn't running
  23. int m_tag;
  24. };
  25. #endif // _WX_GTK1_PRIVATE_TIMER_H_