projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
create tests/window directory for wxWindow tests
[wxWidgets.git]
/
src
/
unix
/
evtloopunix.cpp
diff --git
a/src/unix/evtloopunix.cpp
b/src/unix/evtloopunix.cpp
index 89a541d5a9b79f4ec2460253e3ae2101d2759b6e..ec07e2559d5ab3c80caf63a48f962a319d0ea272 100644
(file)
--- a/
src/unix/evtloopunix.cpp
+++ b/
src/unix/evtloopunix.cpp
@@
-19,7
+19,7
@@
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#i
nclude "wx/evtloop.h"
+#i
f wxUSE_CONSOLE_EVENTLOOP
#ifndef WX_PRECOMP
#include "wx/app.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
@@
-27,6
+27,8
@@
#endif
#include <errno.h>
#endif
#include <errno.h>
+#include "wx/apptrait.h"
+#include "wx/evtloop.h"
#include "wx/thread.h"
#include "wx/module.h"
#include "wx/unix/private/timer.h"
#include "wx/thread.h"
#include "wx/module.h"
#include "wx/unix/private/timer.h"
@@
-35,10
+37,6
@@
#define TRACE_EVENTS _T("events")
#define TRACE_EVENTS _T("events")
-//this code should not be compiled when GUI is defined
-//(monolithic build issue)
-#if !wxUSE_GUI
-
// ===========================================================================
// wxEventLoop::PipeIOHandler implementation
// ===========================================================================
// ===========================================================================
// wxEventLoop::PipeIOHandler implementation
// ===========================================================================
@@
-128,15
+126,9
@@
wxConsoleEventLoop::wxConsoleEventLoop()
return;
}
return;
}
-#ifdef HAVE_SYS_EPOLL_H
- m_dispatcher = wxEpollDispatcher::Get();
+ m_dispatcher = wxFDIODispatcher::Get();
if ( !m_dispatcher )
if ( !m_dispatcher )
-#endif // HAVE_SYS_EPOLL_H
- {
- m_dispatcher = wxSelectDispatcher::Get();
- }
-
- wxCHECK_RET( m_dispatcher, _T("failed to create IO dispatcher") );
+ return;
m_dispatcher->RegisterFD
(
m_dispatcher->RegisterFD
(
@@
-144,7
+136,7
@@
wxConsoleEventLoop::wxConsoleEventLoop()
&m_wakeupPipe,
wxFDIO_INPUT
);
&m_wakeupPipe,
wxFDIO_INPUT
);
-}
;
+}
//-----------------------------------------------------------------------------
// events dispatch and loop handling
//-----------------------------------------------------------------------------
// events dispatch and loop handling
@@
-184,7
+176,7
@@
void wxConsoleEventLoop::OnNextIteration()
timeout = wxFDIODispatcher::TIMEOUT_INFINITE;
}
timeout = wxFDIODispatcher::TIMEOUT_INFINITE;
}
- m_dispatcher->
RunLoop
(timeout);
+ m_dispatcher->
Dispatch
(timeout);
#if wxUSE_TIMER
wxTimerScheduler::Get().NotifyExpired();
#if wxUSE_TIMER
wxTimerScheduler::Get().NotifyExpired();
@@
-194,4
+186,10
@@
void wxConsoleEventLoop::OnNextIteration()
wxTheApp->CheckSignal();
}
wxTheApp->CheckSignal();
}
-#endif // !wxUSE_GUI
+
+wxEventLoopBase *wxConsoleAppTraits::CreateEventLoop()
+{
+ return new wxEventLoop();
+}
+
+#endif // wxUSE_CONSOLE_EVENTLOOP