#ifndef __ardour_gtk_gui_thread_h__ #define __ardour_gtk_gui_thread_h__ #include #include "debug.h" #ifdef GTKARDOUR_DEBUG_EXTRA #define ENSURE_GUI_THREAD(slot) \ if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\ LOG_GTKARDOUR_DEBUG << "Sending cross thread signal";\ Gtkmm2ext::UI::instance()->call_slot ((slot));\ return;\ } #else #define ENSURE_GUI_THREAD(slot) \ if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) {\ Gtkmm2ext::UI::instance()->call_slot ((slot));\ return;\ } #endif #endif /* __ardour_gtk_gui_thread_h__ */