summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-04-29 17:30:30 +0000
committerDavid Robillard <d@drobilla.net>2011-04-29 17:30:30 +0000
commit17e187d3642ee4437af0d500dc13367be6136e32 (patch)
tree011c325859e6dbeb952c0df45f7ef973669c7ed1 /src/gui
parent8a73d68a8857588396dfe201dcf76c4dfb84722e (diff)
downloadingen-17e187d3642ee4437af0d500dc13367be6136e32.tar.gz
ingen-17e187d3642ee4437af0d500dc13367be6136e32.tar.bz2
ingen-17e187d3642ee4437af0d500dc13367be6136e32.zip
LilvValue => LilvNode.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3234 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeMenu.cpp60
-rw-r--r--src/gui/PatchCanvas.cpp16
2 files changed, 38 insertions, 38 deletions
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 5876037a..6cf45f75 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -86,36 +86,36 @@ NodeMenu::init(SharedPtr<NodeModel> node)
#ifdef HAVE_LILV
if (plugin && plugin->type() == PluginModel::LV2) {
- LilvValue* preset_pred = lilv_new_uri(
+ LilvNode* preset_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/dev/presets#hasPreset");
- LilvValue* title_pred = lilv_new_uri(
+ LilvNode* title_pred = lilv_new_uri(
plugin->lilv_world(),
"http://dublincore.org/documents/dcmi-namespace/title");
- LilvValues* presets = lilv_plugin_get_value(
+ LilvNodes* presets = lilv_plugin_get_value(
plugin->lilv_plugin(), preset_pred);
if (presets) {
_presets_menu = Gtk::manage(new Gtk::Menu());
- LILV_FOREACH(values, i, presets) {
- const LilvValue* uri = lilv_values_get(presets, i);
- LilvValues* titles = lilv_plugin_get_value_for_subject(
+ LILV_FOREACH(nodes, i, presets) {
+ const LilvNode* uri = lilv_nodes_get(presets, i);
+ LilvNodes* titles = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, title_pred);
if (titles) {
- const LilvValue* title = lilv_values_get_first(titles);
+ const LilvNode* title = lilv_nodes_get_first(titles);
_presets_menu->items().push_back(
Gtk::Menu_Helpers::MenuElem(
- lilv_value_as_string(title),
+ lilv_node_as_string(title),
sigc::bind(
sigc::mem_fun(this, &NodeMenu::on_preset_activated),
- string(lilv_value_as_string(uri)))));
+ string(lilv_node_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(lilv_value_as_string(uri))));
+ string(lilv_node_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);
}
- lilv_values_free(presets);
- lilv_value_free(title_pred);
- lilv_value_free(preset_pred);
+ lilv_nodes_free(presets);
+ lilv_node_free(title_pred);
+ lilv_node_free(preset_pred);
}
#endif
@@ -182,41 +182,41 @@ NodeMenu::on_preset_activated(const std::string& uri)
const NodeModel* const node = (NodeModel*)_object.get();
const PluginModel* const plugin = dynamic_cast<const PluginModel*>(node->plugin());
- LilvValue* port_pred = lilv_new_uri(
+ LilvNode* port_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#port");
- LilvValue* symbol_pred = lilv_new_uri(
+ LilvNode* symbol_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#symbol");
- LilvValue* value_pred = lilv_new_uri(
+ LilvNode* value_pred = lilv_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/ext/presets#value");
- LilvValue* subject = lilv_new_uri(plugin->lilv_world(), uri.c_str());
- LilvValues* ports = lilv_plugin_get_value_for_subject(
+ LilvNode* subject = lilv_new_uri(plugin->lilv_world(), uri.c_str());
+ LilvNodes* ports = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(),
subject,
port_pred);
App::instance().engine()->bundle_begin();
- LILV_FOREACH(values, i, ports) {
- const LilvValue* uri = lilv_values_get(ports, i);
- LilvValues* values = lilv_plugin_get_value_for_subject(
+ LILV_FOREACH(nodes, i, ports) {
+ const LilvNode* uri = lilv_nodes_get(ports, i);
+ LilvNodes* values = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, value_pred);
- LilvValues* symbols = lilv_plugin_get_value_for_subject(
+ LilvNodes* symbols = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, symbol_pred);
if (values && symbols) {
- const LilvValue* val = lilv_values_get_first(values);
- const LilvValue* sym = lilv_values_get_first(symbols);
+ const LilvNode* val = lilv_nodes_get_first(values);
+ const LilvNode* sym = lilv_nodes_get_first(symbols);
App::instance().engine()->set_property(
- node->path().base() + lilv_value_as_string(sym),
+ node->path().base() + lilv_node_as_string(sym),
App::instance().uris().ingen_value,
- lilv_value_as_float(val));
+ lilv_node_as_float(val));
}
}
App::instance().engine()->bundle_end();
- lilv_values_free(ports);
- lilv_value_free(value_pred);
- lilv_value_free(symbol_pred);
- lilv_value_free(port_pred);
+ lilv_nodes_free(ports);
+ lilv_node_free(value_pred);
+ lilv_node_free(symbol_pred);
+ lilv_node_free(port_pred);
#endif
}
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index bf48b121..91120448 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -203,8 +203,8 @@ PatchCanvas::build_plugin_class_menu(
std::set<const char*>& ancestors)
{
size_t num_items = 0;
- const LilvValue* class_uri = lilv_plugin_class_get_uri(plugin_class);
- const char* class_uri_str = lilv_value_as_string(class_uri);
+ const LilvNode* class_uri = lilv_plugin_class_get_uri(plugin_class);
+ const char* class_uri_str = lilv_node_as_string(class_uri);
const std::pair<LV2Children::const_iterator, LV2Children::const_iterator> kids
= children.equal_range(class_uri_str);
@@ -216,8 +216,8 @@ PatchCanvas::build_plugin_class_menu(
ancestors.insert(class_uri_str);
for (LV2Children::const_iterator i = kids.first; i != kids.second; ++i) {
const 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));
+ const char* sub_label_str = lilv_node_as_string(lilv_plugin_class_get_label(c));
+ const char* sub_uri_str = lilv_node_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;
@@ -268,10 +268,10 @@ PatchCanvas::build_plugin_menu()
LV2Children children;
LILV_FOREACH(plugin_classes, i, classes) {
const LilvPluginClass* c = lilv_plugin_classes_get(classes, i);
- const LilvValue* p = lilv_plugin_class_get_parent_uri(c);
+ const LilvNode* p = lilv_plugin_class_get_parent_uri(c);
if (!p)
p = lilv_plugin_class_get_uri(lv2_plugin);
- children.insert(make_pair(lilv_value_as_string(p), c));
+ children.insert(make_pair(lilv_node_as_string(p), c));
}
std::set<const char*> ancestors;
build_plugin_class_menu(_plugin_menu, lv2_plugin, classes, children, ancestors);
@@ -355,8 +355,8 @@ PatchCanvas::add_plugin(SharedPtr<PluginModel> p)
}
const LilvPluginClass* pc = lilv_plugin_get_class(p->lilv_plugin());
- const LilvValue* class_uri = lilv_plugin_class_get_uri(pc);
- const char* class_uri_str = lilv_value_as_string(class_uri);
+ const LilvNode* class_uri = lilv_plugin_class_get_uri(pc);
+ const char* class_uri_str = lilv_node_as_string(class_uri);
Glib::RefPtr<Gdk::Pixbuf> icon = App::instance().icon_from_path(
PluginModel::get_lv2_icon_path(p->lilv_plugin()), 16);