From 13e0055f99be75e81e50de81fc7b5bc3670b35e9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 12 Apr 2012 23:47:14 +0000 Subject: Use URI defines from LV2 headers where possible. git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@4175 a436a847-0d15-0410-975c-d299462d15a1 --- src/jalv.c | 13 +++++-------- src/state.c | 12 ++++-------- wscript | 2 +- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/jalv.c b/src/jalv.c index 4fc67b0..611b990 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -43,6 +43,7 @@ #include "lv2/lv2plug.in/ns/ext/uri-map/uri-map.h" #include "lv2/lv2plug.in/ns/ext/urid/urid.h" #include "lv2/lv2plug.in/ns/ext/worker/worker.h" +#include "lv2/lv2plug.in/ns/extensions/ui/ui.h" #include "lilv/lilv.h" @@ -51,11 +52,7 @@ #include "lv2_evbuf.h" #include "worker.h" -#define NS_ATOM "http://lv2plug.in/ns/ext/atom#" -#define NS_MIDI "http://lv2plug.in/ns/ext/midi#" -#define NS_PSET "http://lv2plug.in/ns/ext/presets#" -#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" -#define NS_UI "http://lv2plug.in/ns/extensions/ui#" +#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" #define USTR(str) ((const uint8_t*)str) @@ -542,9 +539,9 @@ jalv_ui_is_resizable(Jalv* jalv) } const LilvNode* s = lilv_ui_get_uri(jalv->ui); - LilvNode* p = lilv_new_uri(jalv->world, NS_UI "optionalFeature"); - LilvNode* fs = lilv_new_uri(jalv->world, NS_UI "fixedSize"); - LilvNode* nrs = lilv_new_uri(jalv->world, NS_UI "noUserResize"); + LilvNode* p = lilv_new_uri(jalv->world, LV2_CORE__optionalFeature); + LilvNode* fs = lilv_new_uri(jalv->world, LV2_UI__fixedSize); + LilvNode* nrs = lilv_new_uri(jalv->world, LV2_UI__noUserResize); LilvNodes* fs_matches = lilv_world_find_nodes(jalv->world, s, p, fs); LilvNodes* nrs_matches = lilv_world_find_nodes(jalv->world, s, p, nrs); diff --git a/src/state.c b/src/state.c index c134520..aff7e13 100644 --- a/src/state.c +++ b/src/state.c @@ -35,14 +35,10 @@ #include "jalv_config.h" #include "jalv_internal.h" -#define NS_ATOM "http://lv2plug.in/ns/ext/atom#" -#define NS_JALV "http://drobilla.net/ns/jalv#" -#define NS_LV2 "http://lv2plug.in/ns/lv2core#" -#define NS_PSET "http://lv2plug.in/ns/ext/presets#" -#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" -#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#" -#define NS_STATE "http://lv2plug.in/ns/ext/state#" -#define NS_XSD "http://www.w3.org/2001/XMLSchema#" +#define NS_JALV "http://drobilla.net/ns/jalv#" +#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" +#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#" +#define NS_XSD "http://www.w3.org/2001/XMLSchema#" #define USTR(s) ((const uint8_t*)s) diff --git a/wscript b/wscript index c1e9135..a6bd342 100644 --- a/wscript +++ b/wscript @@ -34,7 +34,7 @@ def configure(conf): autowaf.configure(conf) autowaf.display_header('Jalv Configuration') - autowaf.check_pkg(conf, 'lv2', atleast_version='0.1.0', uselib_store='LV2') + autowaf.check_pkg(conf, 'lv2', atleast_version='0.5.0', uselib_store='LV2') autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV', atleast_version='0.4.0', mandatory=True) autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD', -- cgit v1.2.1