summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/NodeMenu.cpp32
-rw-r--r--src/gui/PatchCanvas.cpp31
-rw-r--r--src/gui/PatchCanvas.hpp12
3 files changed, 39 insertions, 36 deletions
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp
index 0c5c88fb..871ccaf9 100644
--- a/src/gui/NodeMenu.cpp
+++ b/src/gui/NodeMenu.cpp
@@ -86,23 +86,23 @@ NodeMenu::init(SharedPtr<NodeModel> node)
#ifdef HAVE_LILV
if (plugin && plugin->type() == PluginModel::LV2) {
- LilvValue preset_pred = lilv_value_new_uri(
+ LilvValue* preset_pred = lilv_value_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/dev/presets#hasPreset");
- LilvValue title_pred = lilv_value_new_uri(
+ LilvValue* title_pred = lilv_value_new_uri(
plugin->lilv_world(),
"http://dublincore.org/documents/dcmi-namespace/title");
- LilvValues presets = lilv_plugin_get_value(
+ LilvValues* presets = lilv_plugin_get_value(
plugin->lilv_plugin(), preset_pred);
if (presets) {
_presets_menu = Gtk::manage(new Gtk::Menu());
LILV_FOREACH(values, i, presets) {
- LilvValue uri = lilv_values_get(presets, i);
- LilvValues titles = lilv_plugin_get_value_for_subject(
+ const LilvValue* uri = lilv_values_get(presets, i);
+ LilvValues* titles = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, title_pred);
if (titles) {
- LilvValue title = lilv_values_get_first(titles);
+ const LilvValue* title = lilv_values_get_first(titles);
_presets_menu->items().push_back(
Gtk::Menu_Helpers::MenuElem(
lilv_value_as_string(title),
@@ -182,30 +182,30 @@ 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_value_new_uri(
+ LilvValue* port_pred = lilv_value_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#port");
- LilvValue symbol_pred = lilv_value_new_uri(
+ LilvValue* symbol_pred = lilv_value_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/lv2core#symbol");
- LilvValue value_pred = lilv_value_new_uri(
+ LilvValue* value_pred = lilv_value_new_uri(
plugin->lilv_world(),
"http://lv2plug.in/ns/ext/presets#value");
- LilvValue subject = lilv_value_new_uri(plugin->lilv_world(), uri.c_str());
- LilvValues ports = lilv_plugin_get_value_for_subject(
+ 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();
LILV_FOREACH(values, i, ports) {
- LilvValue uri = lilv_values_get(ports, i);
- LilvValues values = lilv_plugin_get_value_for_subject(
+ const 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(
+ LilvValues* symbols = lilv_plugin_get_value_for_subject(
plugin->lilv_plugin(), uri, symbol_pred);
if (values && symbols) {
- LilvValue val = lilv_values_get_first(values);
- LilvValue sym = lilv_values_get_first(symbols);
+ const LilvValue* val = lilv_values_get_first(values);
+ const LilvValue* sym = lilv_values_get_first(symbols);
App::instance().engine()->set_property(
node->path().base() + lilv_value_as_string(sym),
App::instance().uris().ingen_value,
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index e8532007..bf48b121 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -196,13 +196,15 @@ PatchCanvas::build_menus()
*/
size_t
PatchCanvas::build_plugin_class_menu(
- Gtk::Menu* menu,
- LilvPluginClass plugin_class, LilvPluginClasses classes, const LV2Children& children,
- std::set<const char*>& ancestors)
+ Gtk::Menu* menu,
+ const LilvPluginClass* plugin_class,
+ const LilvPluginClasses* classes,
+ const LV2Children& children,
+ std::set<const char*>& ancestors)
{
- size_t num_items = 0;
- LilvValue class_uri = lilv_plugin_class_get_uri(plugin_class);
- const char* class_uri_str = lilv_value_as_string(class_uri);
+ 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 std::pair<LV2Children::const_iterator, LV2Children::const_iterator> kids
= children.equal_range(class_uri_str);
@@ -213,7 +215,7 @@ PatchCanvas::build_plugin_class_menu(
// Add submenus
ancestors.insert(class_uri_str);
for (LV2Children::const_iterator i = kids.first; i != kids.second; ++i) {
- LilvPluginClass c = i->second;
+ 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));
if (ancestors.find(sub_uri_str) != ancestors.end()) {
@@ -259,13 +261,14 @@ PatchCanvas::build_plugin_menu()
_menu->reorder_child(*plugin_menu_item, 5);
}
- LilvPluginClass lv2_plugin = lilv_world_get_plugin_class(PluginModel::lilv_world());
- LilvPluginClasses classes = lilv_world_get_plugin_classes(PluginModel::lilv_world());
+ const LilvWorld* world = PluginModel::lilv_world();
+ const LilvPluginClass* lv2_plugin = lilv_world_get_plugin_class(world);
+ const LilvPluginClasses* classes = lilv_world_get_plugin_classes(world);
LV2Children children;
LILV_FOREACH(plugin_classes, i, classes) {
- LilvPluginClass c = lilv_plugin_classes_get(classes, i);
- LilvValue p = lilv_plugin_class_get_parent_uri(c);
+ const LilvPluginClass* c = lilv_plugin_classes_get(classes, i);
+ const LilvValue* 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));
@@ -351,9 +354,9 @@ PatchCanvas::add_plugin(SharedPtr<PluginModel> p)
return;
}
- 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);
+ 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);
Glib::RefPtr<Gdk::Pixbuf> icon = App::instance().icon_from_path(
PluginModel::get_lv2_icon_path(p->lilv_plugin()), 16);
diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp
index 7be3a813..1263b8ac 100644
--- a/src/gui/PatchCanvas.hpp
+++ b/src/gui/PatchCanvas.hpp
@@ -111,14 +111,14 @@ private:
void auto_menu_position(int& x, int& y, bool& push_in);
#ifdef HAVE_LILV
- typedef std::multimap<const std::string, LilvPluginClass> LV2Children;
+ typedef std::multimap<const std::string, const LilvPluginClass*> LV2Children;
void build_plugin_menu();
size_t build_plugin_class_menu(
- Gtk::Menu* menu,
- LilvPluginClass plugin_class,
- LilvPluginClasses classes,
- const LV2Children& children,
- std::set<const char*>& ancestors);
+ Gtk::Menu* menu,
+ const LilvPluginClass* plugin_class,
+ const LilvPluginClasses* classes,
+ const LV2Children& children,
+ std::set<const char*>& ancestors);
#endif
GraphObject::Properties get_initial_data();