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:
@@ -67,10 +67,13 @@ public:
|
||||
// unregister descriptor previously registered with RegisterFD()
|
||||
virtual bool UnregisterFD(int fd) = 0;
|
||||
|
||||
// check if any events are currently available without dispatching them
|
||||
virtual bool HasPending() const = 0;
|
||||
|
||||
// wait for an event for at most timeout milliseconds and process it;
|
||||
// return true if we processed any events or false if timeout expired
|
||||
// without anything happening
|
||||
virtual bool Dispatch(int timeout = TIMEOUT_INFINITE) = 0;
|
||||
// return the number of events processed (possibly 0 if timeout expired) or
|
||||
// -1 if an error occurred
|
||||
virtual int Dispatch(int timeout = TIMEOUT_INFINITE) = 0;
|
||||
|
||||
virtual ~wxFDIODispatcher() { }
|
||||
};
|
||||
|
Reference in New Issue
Block a user