Merge branch 'master' into cairocanvas
[ardour.git] / libs / pbd / pbd / event_loop.h
index 6e7e42e9dd1a50fd164c01f870701cd6a77fda22..b5ee9b80000785accf2475f5aa13b9ef1ae675a5 100644 (file)
 
 #include <boost/function.hpp>
 #include <boost/bind.hpp> /* we don't need this here, but anything calling call_slot() probably will, so this is convenient */
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 
 namespace PBD
 {
 
+/** An EventLoop is as basic abstraction designed to be used with any "user
+ * interface" (not necessarily graphical) that needs to wait on
+ * events/requests and dispatch/process them as they arrive.
+ *
+ * This is a very basic class that doesn't by itself provide an actual
+ * event loop or thread. See BaseUI for the "real" object to be used
+ * when something like this is needed (it inherits from EventLoop).
+ */
+
 class EventLoop 
 {
   public:
@@ -60,13 +69,13 @@ class EventLoop
        };
 
        virtual void call_slot (InvalidationRecord*, const boost::function<void()>&) = 0;
-        virtual Glib::Mutex& slot_invalidation_mutex() = 0;
+        virtual Glib::Threads::Mutex& slot_invalidation_mutex() = 0;
 
        static EventLoop* get_event_loop_for_thread();
        static void set_event_loop_for_thread (EventLoop* ui);
 
   private:
-       static Glib::StaticPrivate<EventLoop> thread_event_loop;
+        static Glib::Threads::Private<EventLoop> thread_event_loop;
 
 };