Extract wxFDIOEventLoopSourceHandler in its own header.
[wxWidgets.git] / include / wx / private / fdioeventloopsourcehandler.h
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 // RCS-ID: $Id$
7 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
8 // (c) 2013 Rob Bresalier
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H
13 #define _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H
14
15 #include "wx/evtloopsrc.h"
16
17 // This class is a temporary bridge between event loop sources and
18 // FDIODispatcher. It is going to be removed soon, when all subject interfaces
19 // are modified
20 class wxFDIOEventLoopSourceHandler : public wxFDIOHandler
21 {
22 public:
23 wxEXPLICIT wxFDIOEventLoopSourceHandler(wxEventLoopSourceHandler* handler)
24 : m_handler(handler)
25 {
26 }
27
28 // Just forward to the real handler.
29 virtual void OnReadWaiting() { m_handler->OnReadWaiting(); }
30 virtual void OnWriteWaiting() { m_handler->OnWriteWaiting(); }
31 virtual void OnExceptionWaiting() { m_handler->OnExceptionWaiting(); }
32
33 protected:
34 wxEventLoopSourceHandler* const m_handler;
35
36 wxDECLARE_NO_COPY_CLASS(wxFDIOEventLoopSourceHandler);
37 };
38
39 #endif // _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H