summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp8
-rw-r--r--src/gui/ConnectWindow.hpp4
-rw-r--r--src/gui/LoadPluginWindow.cpp2
-rw-r--r--src/gui/NodeMenu.cpp84
-rw-r--r--src/gui/NodeModule.cpp2
-rw-r--r--src/gui/PatchCanvas.cpp42
-rw-r--r--src/gui/PatchCanvas.hpp8
-rw-r--r--src/gui/wscript2
8 files changed, 76 insertions, 76 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index e4a8c167..7c15701e 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -49,8 +49,8 @@
#include "ThreadedLoader.hpp"
#include "WindowFactory.hpp"
#include "Port.hpp"
-#ifdef HAVE_SLV2
-#include "slv2/slv2.h"
+#ifdef HAVE_LILV
+#include "lilv/lilv.h"
#endif
using namespace std;
@@ -92,8 +92,8 @@ App::App(Ingen::Shared::World* world)
PluginModel::set_rdf_world(*world->rdf_world());
-#ifdef HAVE_SLV2
- PluginModel::set_slv2_world(world->slv2_world());
+#ifdef HAVE_LILV
+ PluginModel::set_lilv_world(world->lilv_world());
#endif
}
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 1e5fdd37..92f29f16 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -20,8 +20,8 @@
#include "ingen-config.h"
-#ifdef HAVE_SLV2
-#include "slv2/slv2.h"
+#ifdef HAVE_LILV
+#include "lilv/lilv.h"
#endif
#include <gtkmm.h>
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index cf780f2d..d305e4fb 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -243,7 +243,7 @@ LoadPluginWindow::set_row(Gtk::TreeModel::Row& row, SharedPtr<PluginModel> plugi
void
LoadPluginWindow::add_plugin(SharedPtr<PluginModel> plugin)
{
- if (plugin->slv2_plugin() && slv2_plugin_is_replaced(plugin->slv2_plugin())) {
+ if (plugin->lilv_plugin() && lilv_plugin_is_replaced(plugin->lilv_plugin())) {
return;
}
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index e89f0d41..0c5c88fb 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -84,38 +84,38 @@ NodeMenu::init(SharedPtr<NodeModel> node)
_embed_gui_menuitem->hide();
}
-#ifdef HAVE_SLV2
+#ifdef HAVE_LILV
if (plugin && plugin->type() == PluginModel::LV2) {
- SLV2Value preset_pred = slv2_value_new_uri(
- plugin->slv2_world(),
+ LilvValue preset_pred = lilv_value_new_uri(
+ plugin->lilv_world(),
"http://lv2plug.in/ns/dev/presets#hasPreset");
- SLV2Value title_pred = slv2_value_new_uri(
- plugin->slv2_world(),
+ LilvValue title_pred = lilv_value_new_uri(
+ plugin->lilv_world(),
"http://dublincore.org/documents/dcmi-namespace/title");
- SLV2Values presets = slv2_plugin_get_value(
- plugin->slv2_plugin(), preset_pred);
+ LilvValues presets = lilv_plugin_get_value(
+ plugin->lilv_plugin(), preset_pred);
if (presets) {
_presets_menu = Gtk::manage(new Gtk::Menu());
- SLV2_FOREACH(values, i, presets) {
- SLV2Value uri = slv2_values_get(presets, i);
- SLV2Values titles = slv2_plugin_get_value_for_subject(
- plugin->slv2_plugin(), uri, title_pred);
+ LILV_FOREACH(values, i, presets) {
+ LilvValue uri = lilv_values_get(presets, i);
+ LilvValues titles = lilv_plugin_get_value_for_subject(
+ plugin->lilv_plugin(), uri, title_pred);
if (titles) {
- SLV2Value title = slv2_values_get_first(titles);
+ LilvValue title = lilv_values_get_first(titles);
_presets_menu->items().push_back(
Gtk::Menu_Helpers::MenuElem(
- slv2_value_as_string(title),
+ lilv_value_as_string(title),
sigc::bind(
sigc::mem_fun(this, &NodeMenu::on_preset_activated),
- string(slv2_value_as_string(uri)))));
+ string(lilv_value_as_string(uri)))));
// I have no idea why this is necessary, signal_activated doesn't work
// in this menu (and only this menu)
Gtk::MenuItem* item = &(_presets_menu->items().back());
item->signal_button_release_event().connect(
sigc::bind<0>(sigc::mem_fun(this, &NodeMenu::on_preset_clicked),
- string(slv2_value_as_string(uri))));
+ string(lilv_value_as_string(uri))));
}
}
items().push_front(Gtk::Menu_Helpers::SeparatorElem());
@@ -124,9 +124,9 @@ NodeMenu::init(SharedPtr<NodeModel> node)
Gtk::MenuItem* presets_menu_item = &(items().front());
presets_menu_item->set_submenu(*_presets_menu);
}
- slv2_values_free(presets);
- slv2_value_free(title_pred);
- slv2_value_free(preset_pred);
+ lilv_values_free(presets);
+ lilv_value_free(title_pred);
+ lilv_value_free(preset_pred);
}
#endif
@@ -178,45 +178,45 @@ NodeMenu::on_menu_disconnect()
void
NodeMenu::on_preset_activated(const std::string& uri)
{
-#ifdef HAVE_SLV2
+#ifdef HAVE_LILV
const NodeModel* const node = (NodeModel*)_object.get();
const PluginModel* const plugin = dynamic_cast<const PluginModel*>(node->plugin());
- SLV2Value port_pred = slv2_value_new_uri(
- plugin->slv2_world(),
+ LilvValue port_pred = lilv_value_new_uri(
+ plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#port");
- SLV2Value symbol_pred = slv2_value_new_uri(
- plugin->slv2_world(),
+ LilvValue symbol_pred = lilv_value_new_uri(
+ plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#symbol");
- SLV2Value value_pred = slv2_value_new_uri(
- plugin->slv2_world(),
+ LilvValue value_pred = lilv_value_new_uri(
+ plugin->lilv_world(),
"http://lv2plug.in/ns/ext/presets#value");
- SLV2Value subject = slv2_value_new_uri(plugin->slv2_world(), uri.c_str());
- SLV2Values ports = slv2_plugin_get_value_for_subject(
- plugin->slv2_plugin(),
+ LilvValue subject = lilv_value_new_uri(plugin->lilv_world(), uri.c_str());
+ LilvValues ports = lilv_plugin_get_value_for_subject(
+ plugin->lilv_plugin(),
subject,
port_pred);
App::instance().engine()->bundle_begin();
- SLV2_FOREACH(values, i, ports) {
- SLV2Value uri = slv2_values_get(ports, i);
- SLV2Values values = slv2_plugin_get_value_for_subject(
- plugin->slv2_plugin(), uri, value_pred);
- SLV2Values symbols = slv2_plugin_get_value_for_subject(
- plugin->slv2_plugin(), uri, symbol_pred);
+ LILV_FOREACH(values, i, ports) {
+ LilvValue uri = lilv_values_get(ports, i);
+ LilvValues values = lilv_plugin_get_value_for_subject(
+ plugin->lilv_plugin(), uri, value_pred);
+ LilvValues symbols = lilv_plugin_get_value_for_subject(
+ plugin->lilv_plugin(), uri, symbol_pred);
if (values && symbols) {
- SLV2Value val = slv2_values_get_first(values);
- SLV2Value sym = slv2_values_get_first(symbols);
+ LilvValue val = lilv_values_get_first(values);
+ LilvValue sym = lilv_values_get_first(symbols);
App::instance().engine()->set_property(
- node->path().base() + slv2_value_as_string(sym),
+ node->path().base() + lilv_value_as_string(sym),
App::instance().uris().ingen_value,
- slv2_value_as_float(val));
+ lilv_value_as_float(val));
}
}
App::instance().engine()->bundle_end();
- slv2_values_free(ports);
- slv2_value_free(value_pred);
- slv2_value_free(symbol_pred);
- slv2_value_free(port_pred);
+ lilv_values_free(ports);
+ lilv_value_free(value_pred);
+ lilv_value_free(symbol_pred);
+ lilv_value_free(port_pred);
#endif
}
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index d8f22ecd..497d0461 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -289,7 +289,7 @@ NodeModule::remove_port(SharedPtr<PortModel> model)
bool
NodeModule::popup_gui()
{
-#ifdef HAVE_SLV2
+#ifdef HAVE_LILV
if (_node->plugin() && _node->plugin()->type() == PluginModel::LV2) {
if (_plugin_ui) {
warn << "LV2 GUI already embedded, cannot pop up" << endl;
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 9ff0ba31..e8532007 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -167,7 +167,7 @@ PatchCanvas::build_menus()
}
// Build skeleton LV2 plugin class heirarchy for 'Plugin' menu
-#ifdef HAVE_SLV2
+#ifdef HAVE_LILV
if (!_plugin_menu)
build_plugin_menu();
@@ -189,7 +189,7 @@ PatchCanvas::build_menus()
add_plugin(i->second);
}
-#ifdef HAVE_SLV2
+#ifdef HAVE_LILV
/** Recursively build the plugin class menu heirarchy rooted at
* @a plugin class into @a menu
@@ -197,12 +197,12 @@ PatchCanvas::build_menus()
size_t
PatchCanvas::build_plugin_class_menu(
Gtk::Menu* menu,
- SLV2PluginClass plugin_class, SLV2PluginClasses classes, const LV2Children& children,
+ LilvPluginClass plugin_class, LilvPluginClasses classes, const LV2Children& children,
std::set<const char*>& ancestors)
{
size_t num_items = 0;
- SLV2Value class_uri = slv2_plugin_class_get_uri(plugin_class);
- const char* class_uri_str = slv2_value_as_string(class_uri);
+ LilvValue class_uri = lilv_plugin_class_get_uri(plugin_class);
+ const char* class_uri_str = lilv_value_as_string(class_uri);
const std::pair<LV2Children::const_iterator, LV2Children::const_iterator> kids
= children.equal_range(class_uri_str);
@@ -213,9 +213,9 @@ PatchCanvas::build_plugin_class_menu(
// Add submenus
ancestors.insert(class_uri_str);
for (LV2Children::const_iterator i = kids.first; i != kids.second; ++i) {
- SLV2PluginClass c = i->second;
- const char* sub_label_str = slv2_value_as_string(slv2_plugin_class_get_label(c));
- const char* sub_uri_str = slv2_value_as_string(slv2_plugin_class_get_uri(c));
+ LilvPluginClass c = i->second;
+ const char* sub_label_str = lilv_value_as_string(lilv_plugin_class_get_label(c));
+ const char* sub_uri_str = lilv_value_as_string(lilv_plugin_class_get_uri(c));
if (ancestors.find(sub_uri_str) != ancestors.end()) {
LOG(warn) << "Infinite LV2 class recursion: " << class_uri_str
<< " <: " << sub_uri_str << endl;
@@ -259,16 +259,16 @@ PatchCanvas::build_plugin_menu()
_menu->reorder_child(*plugin_menu_item, 5);
}
- SLV2PluginClass lv2_plugin = slv2_world_get_plugin_class(PluginModel::slv2_world());
- SLV2PluginClasses classes = slv2_world_get_plugin_classes(PluginModel::slv2_world());
+ LilvPluginClass lv2_plugin = lilv_world_get_plugin_class(PluginModel::lilv_world());
+ LilvPluginClasses classes = lilv_world_get_plugin_classes(PluginModel::lilv_world());
LV2Children children;
- SLV2_FOREACH(plugin_classes, i, classes) {
- SLV2PluginClass c = slv2_plugin_classes_get(classes, i);
- SLV2Value p = slv2_plugin_class_get_parent_uri(c);
+ LILV_FOREACH(plugin_classes, i, classes) {
+ LilvPluginClass c = lilv_plugin_classes_get(classes, i);
+ LilvValue p = lilv_plugin_class_get_parent_uri(c);
if (!p)
- p = slv2_plugin_class_get_uri(lv2_plugin);
- children.insert(make_pair(slv2_value_as_string(p), c));
+ p = lilv_plugin_class_get_uri(lv2_plugin);
+ children.insert(make_pair(lilv_value_as_string(p), c));
}
std::set<const char*> ancestors;
build_plugin_class_menu(_plugin_menu, lv2_plugin, classes, children, ancestors);
@@ -345,18 +345,18 @@ PatchCanvas::add_plugin(SharedPtr<PluginModel> p)
if (_internal_menu && p->type() == Plugin::Internal) {
_internal_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(p->human_name(),
sigc::bind(sigc::mem_fun(this, &PatchCanvas::load_plugin), p)));
- } else if (_plugin_menu && p->type() == Plugin::LV2 && p->slv2_plugin()) {
- if (slv2_plugin_is_replaced(p->slv2_plugin())) {
+ } else if (_plugin_menu && p->type() == Plugin::LV2 && p->lilv_plugin()) {
+ if (lilv_plugin_is_replaced(p->lilv_plugin())) {
//info << (boost::format("[Menu] LV2 plugin <%s> hidden") % p->uri()) << endl;
return;
}
- SLV2PluginClass pc = slv2_plugin_get_class(p->slv2_plugin());
- SLV2Value class_uri = slv2_plugin_class_get_uri(pc);
- const char* class_uri_str = slv2_value_as_string(class_uri);
+ LilvPluginClass pc = lilv_plugin_get_class(p->lilv_plugin());
+ LilvValue class_uri = lilv_plugin_class_get_uri(pc);
+ const char* class_uri_str = lilv_value_as_string(class_uri);
Glib::RefPtr<Gdk::Pixbuf> icon = App::instance().icon_from_path(
- PluginModel::get_lv2_icon_path(p->slv2_plugin()), 16);
+ PluginModel::get_lv2_icon_path(p->lilv_plugin()), 16);
pair<iterator,iterator> range = _class_menus.equal_range(class_uri_str);
if (range.first == _class_menus.end() || range.first == range.second
diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp
index f55fca58..7be3a813 100644
--- a/src/gui/PatchCanvas.hpp
+++ b/src/gui/PatchCanvas.hpp
@@ -110,13 +110,13 @@ private:
void auto_menu_position(int& x, int& y, bool& push_in);
-#ifdef HAVE_SLV2
- typedef std::multimap<const std::string, SLV2PluginClass> LV2Children;
+#ifdef HAVE_LILV
+ typedef std::multimap<const std::string, LilvPluginClass> LV2Children;
void build_plugin_menu();
size_t build_plugin_class_menu(
Gtk::Menu* menu,
- SLV2PluginClass plugin_class,
- SLV2PluginClasses classes,
+ LilvPluginClass plugin_class,
+ LilvPluginClasses classes,
const LV2Children& children,
std::set<const char*>& ancestors);
#endif
diff --git a/src/gui/wscript b/src/gui/wscript
index cef45ccb..f5f28499 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -62,7 +62,7 @@ def build(bld):
SORD
SIGCPP
LV2CORE
- SLV2
+ LILV
SOUP
SUIL
''')