moved wxX11's wxSocketTable to private wxSocketEventDispatcher class reusable in other ports (backport from SOC2006_SOCKETS branch); use it in wxDFB

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-12-14 14:13:57 +00:00
parent ede5511517
commit 6b44a33553
7 changed files with 462 additions and 414 deletions

View File

@@ -26,6 +26,7 @@
#endif
#include "wx/timer.h"
#include "wx/private/socketevtdispatch.h"
#include "wx/dfb/private.h"
#define TRACE_EVENTS _T("events")
@@ -86,7 +87,8 @@ bool wxEventLoop::Dispatch()
// time out after a brief period in order to make sure that
// OnNextIteration() will be called frequently enough
//
// FIXME: call NotifyTimers() from here (and loop) instead?
// FIXME: call NotifyTimers() and wxSocketEventDispatcher::RunLoop() from here
// (and loop) instead?
const int TIMEOUT = 100;
if ( ms_buffer->WaitForEventWithTimeout(0, TIMEOUT) )
@@ -125,10 +127,16 @@ void wxEventLoop::WakeUp()
void wxEventLoop::OnNextIteration()
{
#if wxUSE_TIMER
// see the comment in Dispatch
#if wxUSE_TIMER
wxTimer::NotifyTimers();
#endif
#if wxUSE_SOCKETS
// handle any pending socket events:
wxSocketEventDispatcher::Get().RunLoop();
#endif
}