X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d31a4a84fb81e0f4975690e45d4d3b11a0f3cd5d..9966c62b28abfe227198ec3fe79d557a2676ace2:/include/wx/unix/private/epolldispatcher.h diff --git a/include/wx/unix/private/epolldispatcher.h b/include/wx/unix/private/epolldispatcher.h index 39bd3a27e5..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 void 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; };