]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/unix/private/wakeuppipe.h
Fix wxGTK compilation in wxUSE_MENUS==0 case.
[wxWidgets.git] / include / wx / unix / private / wakeuppipe.h
index b2dda1635ca44e4aa62dc14476f14a6eafaa196f..23bcf12912f1f3a0aed639d0daff324477fd743e 100644 (file)
@@ -11,9 +11,8 @@
 #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
@@ -22,7 +21,7 @@
 // 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.
@@ -45,7 +44,7 @@ public:
     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() { }
@@ -66,6 +65,7 @@ private:
 
 // This class can be used from multiple threads, i.e. its WakeUp() can be
 // called concurrently.
+#if wxUSE_THREADS
 
 class wxWakeUpPipeMT : public wxWakeUpPipe
 {
@@ -93,4 +93,10 @@ private:
     wxCriticalSection m_pipeLock;
 };
 
+#else // !wxUSE_THREADS
+
+typedef wxWakeUpPipe wxWakeUpPipeMT;
+
+#endif // wxUSE_THREADS/!wxUSE_THREADS
+
 #endif // _WX_UNIX_PRIVATE_WAKEUPPIPE_H_