X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/04021d6facae8732f5914298cb37c431fa32599d..f895c3fce291ad1071041b8ddff8ecf283c5b68e:/include/wx/unix/private/epolldispatcher.h diff --git a/include/wx/unix/private/epolldispatcher.h b/include/wx/unix/private/epolldispatcher.h index d689ea243c..e32df9cce6 100644 --- a/include/wx/unix/private/epolldispatcher.h +++ b/include/wx/unix/private/epolldispatcher.h @@ -17,7 +17,9 @@ #include "wx/private/fdiodispatcher.h" -class WXDLLIMPEXP_CORE wxEpollDispatcher : public wxFDIODispatcher +struct epoll_event; + +class WXDLLIMPEXP_BASE wxEpollDispatcher : public wxFDIODispatcher { public: // create a new instance of this class, can return NULL if @@ -32,12 +34,18 @@ public: virtual bool RegisterFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL); virtual bool ModifyFD(int fd, wxFDIOHandler* handler, int flags = wxFDIO_ALL); virtual bool UnregisterFD(int fd); - virtual bool Dispatch(int timeout = TIMEOUT_INFINITE); + virtual bool HasPending() const; + virtual int Dispatch(int timeout = TIMEOUT_INFINITE); private: // ctor is private, use Create() wxEpollDispatcher(int epollDescriptor); + // common part of HasPending() and Dispatch(): calls epoll_wait() with the + // given timeout + int DoPoll(epoll_event *events, int numEvents, int timeout) const; + + int m_epollDescriptor; };