summaryrefslogtreecommitdiff
path: root/gtk2_ardour/gui_thread.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-11-16 03:18:30 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-11-16 03:18:30 +0000
commit7bbf76132164d3bd293c3bfdf2038dd47f1cc63b (patch)
treeb0ff92173f83b13d9aa395d50f63b72cdfea0be1 /gtk2_ardour/gui_thread.h
parent3f207b1e4f6ef356a45fb3648de36e17c5e91d73 (diff)
start of new crossthread-safe design
git-svn-id: svn://localhost/ardour2/trunk@1133 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/gui_thread.h')
-rw-r--r--gtk2_ardour/gui_thread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gtk2_ardour/gui_thread.h b/gtk2_ardour/gui_thread.h
index 22381e3536..1f53f97004 100644
--- a/gtk2_ardour/gui_thread.h
+++ b/gtk2_ardour/gui_thread.h
@@ -2,6 +2,7 @@
#define __ardour_gtk_gui_thread_h__
#include <gtkmm2ext/gtk_ui.h>
+#include <pbd/crossthread.h>
#define ENSURE_GUI_THREAD(slot) \
if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\
@@ -9,4 +10,8 @@
return;\
}
+#define GTK_SAFE(theSlot) crossthread_safe (Gtkmm2ext::UI::instance()->thread_id(),\
+ *Gtkmm2ext::UI::instance(), \
+ (theSlot))
+
#endif /* __ardour_gtk_gui_thread_h__ */