X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d31a4a84fb81e0f4975690e45d4d3b11a0f3cd5d..a4f6fe43c33bd7933645d110ad2719871dab043d:/include/wx/unix/private/epolldispatcher.h?ds=sidebyside diff --git a/include/wx/unix/private/epolldispatcher.h b/include/wx/unix/private/epolldispatcher.h index 39bd3a27e5..dbffb924dc 100644 --- a/include/wx/unix/private/epolldispatcher.h +++ b/include/wx/unix/private/epolldispatcher.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/private/epolldispatcher.h +// Name: wx/unix/private/epolldispatcher.h // Purpose: wxEpollDispatcher class // Authors: Lukasz Michalski // Created: April 2007 @@ -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; };