/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#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>
+
+#include "pbd/libpbd_visibility.h"
namespace PBD
{
* when something like this is needed (it inherits from EventLoop).
*/
-class EventLoop
+class LIBPBD_API EventLoop
{
public:
EventLoop() {}
};
struct BaseRequestObject;
-
+
struct InvalidationRecord {
std::list<BaseRequestObject*> requests;
PBD::EventLoop* event_loop;
bool valid;
InvalidationRecord* invalidation;
boost::function<void()> the_slot;
-
+
BaseRequestObject() : valid (true), invalidation (0) {}
};
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;
};