#ifndef _WX_UNIX_PRIVATE_WAKEUPPIPE_H_
#define _WX_UNIX_PRIVATE_WAKEUPPIPE_H_
-#include "wx/private/fdiohandler.h"
-
#include "wx/unix/pipe.h"
+#include "wx/evtloopsrc.h"
// ----------------------------------------------------------------------------
// wxWakeUpPipe: allows to wake up the event loop by writing to it
// This class is not MT-safe, see wxWakeUpPipeMT below for a wake up pipe
// usable from other threads.
-class wxWakeUpPipe : public wxFDIOHandler
+class wxWakeUpPipe : public wxEventLoopSourceHandler
{
public:
// Create and initialize the pipe.
int GetReadFd() { return m_pipe[wxPipe::Read]; }
- // implement wxFDIOHandler pure virtual methods
+ // Implement wxEventLoopSourceHandler pure virtual methods
virtual void OnReadWaiting();
virtual void OnWriteWaiting() { }
virtual void OnExceptionWaiting() { }
// This class can be used from multiple threads, i.e. its WakeUp() can be
// called concurrently.
+#if wxUSE_THREADS
class wxWakeUpPipeMT : public wxWakeUpPipe
{
wxCriticalSection m_pipeLock;
};
+#else // !wxUSE_THREADS
+
+typedef wxWakeUpPipe wxWakeUpPipeMT;
+
+#endif // wxUSE_THREADS/!wxUSE_THREADS
+
#endif // _WX_UNIX_PRIVATE_WAKEUPPIPE_H_