summaryrefslogtreecommitdiff
path: root/gtk2_ardour/plugin_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-11-13 16:32:30 +0100
committerRobin Gareus <robin@gareus.org>2016-11-13 16:35:06 +0100
commit80fa696564a2b261b6cf751ff61e4d885d3a2dc0 (patch)
treee8a568760dc06daf3283523f1a05cfb8f5500554 /gtk2_ardour/plugin_ui.cc
parent8b93fb02f38148c25c91ed41a4f12735be38dbf0 (diff)
basic Mac VST Cocoa UI support
Diffstat (limited to 'gtk2_ardour/plugin_ui.cc')
-rw-r--r--gtk2_ardour/plugin_ui.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc
index 03c5ef301d..15600772e2 100644
--- a/gtk2_ardour/plugin_ui.cc
+++ b/gtk2_ardour/plugin_ui.cc
@@ -52,6 +52,10 @@
#include "ardour/lxvst_plugin.h"
#include "lxvst_plugin_ui.h"
#endif
+#ifdef MACVST_SUPPORT
+#include "ardour/mac_vst_plugin.h"
+#include "vst_plugin_ui.h"
+#endif
#ifdef LV2_SUPPORT
#include "ardour/lv2_plugin.h"
#include "lv2_plugin_ui.h"
@@ -107,6 +111,10 @@ PluginUIWindow::PluginUIWindow (
have_gui = create_lxvst_editor (insert);
break;
+ case ARDOUR::MacVST:
+ have_gui = create_mac_vst_editor (insert);
+ break;
+
case ARDOUR::AudioUnit:
have_gui = create_audiounit_editor (insert);
break;
@@ -273,6 +281,35 @@ PluginUIWindow::create_lxvst_editor(boost::shared_ptr<PluginInsert>)
}
bool
+#ifdef MACVST_SUPPORT
+PluginUIWindow::create_mac_vst_editor (boost::shared_ptr<PluginInsert> insert)
+#else
+PluginUIWindow::create_mac_vst_editor (boost::shared_ptr<PluginInsert>)
+#endif
+{
+#ifndef MACVST_SUPPORT
+ return false;
+#else
+ boost::shared_ptr<MacVSTPlugin> mvst;
+ if ((mvst = boost::dynamic_pointer_cast<MacVSTPlugin> (insert->plugin())) == 0) {
+ error << string_compose (_("unknown type of editor-supplying plugin (note: no MacVST support in this version of %1)"), PROGRAM_NAME)
+ << endmsg;
+ throw failed_constructor ();
+ }
+ VSTPluginUI* vpu = create_mac_vst_gui (insert);
+ _pluginui = vpu;
+ _pluginui->KeyboardFocused.connect (sigc::mem_fun (*this, &PluginUIWindow::keyboard_focused));
+ add (*vpu);
+ vpu->package (*this);
+
+ Application::instance()->ActivationChanged.connect (mem_fun (*this, &PluginUIWindow::app_activated));
+
+ return true;
+#endif
+}
+
+
+bool
#ifdef AUDIOUNIT_SUPPORT
PluginUIWindow::create_audiounit_editor (boost::shared_ptr<PluginInsert> insert)
#else