Update for new SLV2 UI API.
git-svn-id: svn://localhost/ardour2/branches/3.0@9108 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
34b9883537
commit
ca9a816d30
@ -30,6 +30,8 @@ using namespace Gtk;
|
|||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
using namespace PBD;
|
using namespace PBD;
|
||||||
|
|
||||||
|
SLV2UIHost LV2PluginUI::ui_host = NULL;
|
||||||
|
|
||||||
void
|
void
|
||||||
LV2PluginUI::lv2_ui_write(LV2UI_Controller controller,
|
LV2PluginUI::lv2_ui_write(LV2UI_Controller controller,
|
||||||
uint32_t port_index,
|
uint32_t port_index,
|
||||||
@ -166,13 +168,15 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_NEW_SLV2
|
#ifdef HAVE_NEW_SLV2
|
||||||
SLV2UIHost ui_host = slv2_ui_host_new(
|
if (!LV2PluginUI::ui_host) {
|
||||||
this, LV2PluginUI::lv2_ui_write, NULL, NULL, NULL);
|
LV2PluginUI::ui_host = slv2_ui_host_new(
|
||||||
|
LV2PluginUI::lv2_ui_write, NULL, NULL, NULL);
|
||||||
|
}
|
||||||
SLV2Value gtk_ui = slv2_value_new_uri(
|
SLV2Value gtk_ui = slv2_value_new_uri(
|
||||||
ARDOUR::PluginManager::the_manager()->lv2_world()->world,
|
ARDOUR::PluginManager::the_manager()->lv2_world()->world,
|
||||||
"http://lv2plug.in/ns/extensions/ui#GtkUI");
|
"http://lv2plug.in/ns/extensions/ui#GtkUI");
|
||||||
_inst = slv2_ui_instance_new(
|
_inst = slv2_ui_instance_new(
|
||||||
_lv2->slv2_plugin(), _lv2->slv2_ui(), gtk_ui, ui_host, features_dst);
|
_lv2->slv2_plugin(), _lv2->slv2_ui(), gtk_ui, ui_host, this, features_dst);
|
||||||
slv2_value_free(gtk_ui);
|
slv2_value_free(gtk_ui);
|
||||||
slv2_ui_host_free(ui_host);
|
slv2_ui_host_free(ui_host);
|
||||||
#else
|
#else
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (C) 2008 Paul Davis
|
Copyright (C) 2008-2011 Paul Davis
|
||||||
Author: Dave Robillard
|
Author: David Robillard
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -78,6 +78,10 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
|
|||||||
|
|
||||||
static void on_external_ui_closed(LV2UI_Controller controller);
|
static void on_external_ui_closed(LV2UI_Controller controller);
|
||||||
|
|
||||||
|
#ifdef HAVE_NEW_SLV2
|
||||||
|
static SLV2UIHost ui_host;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void lv2_ui_write(
|
static void lv2_ui_write(
|
||||||
LV2UI_Controller controller,
|
LV2UI_Controller controller,
|
||||||
uint32_t port_index,
|
uint32_t port_index,
|
||||||
|
Loading…
Reference in New Issue
Block a user