X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30c45bdd06c4174d28f62133692733d447d008ea..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/dfb/evtloop.cpp?ds=inline diff --git a/src/dfb/evtloop.cpp b/src/dfb/evtloop.cpp index c4c6c3bdeb..6c6bef402d 100644 --- a/src/dfb/evtloop.cpp +++ b/src/dfb/evtloop.cpp @@ -26,12 +26,12 @@ #endif #include "wx/thread.h" -#include "wx/timer.h" -#include "wx/private/selectdispatcher.h" +#include "wx/generic/private/timer.h" +#include "wx/private/fdiodispatcher.h" #include "wx/dfb/private.h" #include "wx/nonownedwnd.h" -#define TRACE_EVENTS _T("events") +#define TRACE_EVENTS "events" // =========================================================================== // implementation @@ -41,28 +41,28 @@ // wxEventLoop initialization //----------------------------------------------------------------------------- -wxIDirectFBEventBufferPtr wxEventLoop::ms_buffer; +wxIDirectFBEventBufferPtr wxGUIEventLoop::ms_buffer; -wxEventLoop::wxEventLoop() +wxGUIEventLoop::wxGUIEventLoop() { if ( !ms_buffer ) InitBuffer(); } /* static */ -void wxEventLoop::InitBuffer() +void wxGUIEventLoop::InitBuffer() { ms_buffer = wxIDirectFB::Get()->CreateEventBuffer(); } /* static */ -void wxEventLoop::CleanUp() +void wxGUIEventLoop::CleanUp() { ms_buffer.Reset(); } /* static */ -wxIDirectFBEventBufferPtr wxEventLoop::GetDirectFBEventBuffer() +wxIDirectFBEventBufferPtr wxGUIEventLoop::GetDirectFBEventBuffer() { if ( !ms_buffer ) InitBuffer(); @@ -74,16 +74,16 @@ wxIDirectFBEventBufferPtr wxEventLoop::GetDirectFBEventBuffer() // events dispatch and loop handling //----------------------------------------------------------------------------- -bool wxEventLoop::Pending() const +bool wxGUIEventLoop::Pending() const { - wxCHECK_MSG( ms_buffer, false, _T("invalid event buffer") ); + wxCHECK_MSG( ms_buffer, false, "invalid event buffer" ); return ms_buffer->HasEvent(); } -bool wxEventLoop::Dispatch() +bool wxGUIEventLoop::Dispatch() { - wxCHECK_MSG( ms_buffer, false, _T("invalid event buffer") ); + wxCHECK_MSG( ms_buffer, false, "invalid event buffer" ); // NB: we don't block indefinitely waiting for an event, but instead // time out after a brief period in order to make sure that @@ -126,26 +126,26 @@ bool wxEventLoop::Dispatch() return true; } -void wxEventLoop::WakeUp() +void wxGUIEventLoop::WakeUp() { - wxCHECK_RET( ms_buffer, _T("invalid event buffer") ); + wxCHECK_RET( ms_buffer, "invalid event buffer" ); ms_buffer->WakeUp(); } -void wxEventLoop::OnNextIteration() +void wxGUIEventLoop::OnNextIteration() { #if wxUSE_TIMER - wxTimer::NotifyTimers(); + wxGenericTimerImpl::NotifyTimers(); #endif #if wxUSE_SOCKETS // handle any pending socket events: - wxSelectDispatcher::Get().RunLoop(0); + wxFDIODispatcher::DispatchPending(); #endif } -void wxEventLoop::Yield() +void wxGUIEventLoop::Yield() { // process all pending events: while ( Pending() ) @@ -160,7 +160,7 @@ void wxEventLoop::Yield() // DirectFB -> wxWidgets events translation //----------------------------------------------------------------------------- -void wxEventLoop::HandleDFBEvent(const wxDFBEvent& event) +void wxGUIEventLoop::HandleDFBEvent(const wxDFBEvent& event) { switch ( event.GetClass() ) { @@ -179,7 +179,7 @@ void wxEventLoop::HandleDFBEvent(const wxDFBEvent& event) #endif { wxLogTrace(TRACE_EVENTS, - _T("ignoring event of unsupported class %i"), + "ignoring event of unsupported class %i", (int)event.GetClass()); } }