evtloopsrc.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/unix/evtloopsrc.h
  3. // Purpose: wxUnixEventLoopSource class
  4. // Author: Vadim Zeitlin
  5. // Created: 2009-10-21
  6. // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _WX_UNIX_EVTLOOPSRC_H_
  10. #define _WX_UNIX_EVTLOOPSRC_H_
  11. class wxFDIODispatcher;
  12. class wxFDIOHandler;
  13. // ----------------------------------------------------------------------------
  14. // wxUnixEventLoopSource: wxEventLoopSource for Unix-like toolkits using fds
  15. // ----------------------------------------------------------------------------
  16. class wxUnixEventLoopSource : public wxEventLoopSource
  17. {
  18. public:
  19. // dispatcher and fdioHandler are only used here to allow us to unregister
  20. // from the event loop when we're destroyed
  21. wxUnixEventLoopSource(wxFDIODispatcher *dispatcher,
  22. wxFDIOHandler *fdioHandler,
  23. int fd,
  24. wxEventLoopSourceHandler *handler,
  25. int flags)
  26. : wxEventLoopSource(handler, flags),
  27. m_dispatcher(dispatcher),
  28. m_fdioHandler(fdioHandler),
  29. m_fd(fd)
  30. {
  31. }
  32. virtual ~wxUnixEventLoopSource();
  33. private:
  34. wxFDIODispatcher * const m_dispatcher;
  35. wxFDIOHandler * const m_fdioHandler;
  36. const int m_fd;
  37. wxDECLARE_NO_COPY_CLASS(wxUnixEventLoopSource);
  38. };
  39. #endif // _WX_UNIX_EVTLOOPSRC_H_