added wxFDIODispatcher::HasPending() and implemented correctly wxConsoleEventLoop::Pending() using it to fix the pending events processing in console event loop based programs; also changed wxFDIODispatcher::Dispatch() return type/value to be able to indicate the errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57804 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "wx/private/fdiodispatcher.h"
|
||||
|
||||
struct epoll_event;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxEpollDispatcher : public wxFDIODispatcher
|
||||
{
|
||||
public:
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user