fdioeventloopsourcehandler.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/private/fdioeventloopsourcehandler.h
  3. // Purpose: declares wxFDIOEventLoopSourceHandler class
  4. // Author: Rob Bresalier, Vadim Zeitlin
  5. // Created: 2013-06-13 (extracted from src/unix/evtloopunix.cpp)
  6. // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // (c) 2013 Rob Bresalier
  8. // Licence: wxWindows licence
  9. ///////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H
  11. #define _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H
  12. #include "wx/evtloopsrc.h"
  13. // This class is a temporary bridge between event loop sources and
  14. // FDIODispatcher. It is going to be removed soon, when all subject interfaces
  15. // are modified
  16. class wxFDIOEventLoopSourceHandler : public wxFDIOHandler
  17. {
  18. public:
  19. wxEXPLICIT wxFDIOEventLoopSourceHandler(wxEventLoopSourceHandler* handler)
  20. : m_handler(handler)
  21. {
  22. }
  23. // Just forward to the real handler.
  24. virtual void OnReadWaiting() { m_handler->OnReadWaiting(); }
  25. virtual void OnWriteWaiting() { m_handler->OnWriteWaiting(); }
  26. virtual void OnExceptionWaiting() { m_handler->OnExceptionWaiting(); }
  27. protected:
  28. wxEventLoopSourceHandler* const m_handler;
  29. wxDECLARE_NO_COPY_CLASS(wxFDIOEventLoopSourceHandler);
  30. };
  31. #endif // _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H