summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-02-22 04:37:21 +0000
committerDavid Robillard <d@drobilla.net>2015-02-22 04:37:21 +0000
commitbc82f3105f81388728dec83d008f5fddf22c5b2c (patch)
tree77cfae97704c3a5a7968af351c70da94094b6988 /src
parent6a20eac6475e5fda1c047e6adc66287b7e643b83 (diff)
downloadingen-bc82f3105f81388728dec83d008f5fddf22c5b2c.tar.gz
ingen-bc82f3105f81388728dec83d008f5fddf22c5b2c.tar.bz2
ingen-bc82f3105f81388728dec83d008f5fddf22c5b2c.zip
Set Jack port order metadata.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5600 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/JackDriver.cpp4
-rw-r--r--src/server/jackey.h11
2 files changed, 15 insertions, 0 deletions
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index 04a07cc6..16c4d507 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -284,6 +284,10 @@ JackDriver::port_property_internal(const jack_port_t* jport,
if (uri == _engine.world()->uris().lv2_name) {
jack_set_property(_client, jack_port_uuid(jport),
JACK_METADATA_PRETTY_NAME, value.ptr<char>(), "text/plain");
+ } else if (uri == _engine.world()->uris().lv2_index) {
+ jack_set_property(_client, jack_port_uuid(jport),
+ JACKEY_ORDER, std::to_string(value.get<int32_t>()).c_str(),
+ "http://www.w3.org/2001/XMLSchema#integer");
} else if (uri == _engine.world()->uris().rdf_type) {
if (value == _engine.world()->uris().lv2_CVPort) {
jack_set_property(_client, jack_port_uuid(jport),
diff --git a/src/server/jackey.h b/src/server/jackey.h
index 6695f3db..02a77357 100644
--- a/src/server/jackey.h
+++ b/src/server/jackey.h
@@ -59,3 +59,14 @@
channels can be found at http://lv2plug.in/ns/ext/port-groups
*/
#define JACKEY_DESIGNATION "http://lv2plug.in/ns/lv2core#designation"
+
+/**
+ Order for a port.
+
+ This is used to specify the best order to show ports in user interfaces.
+ The value MUST be an integer. There are no other requirements, so there may
+ be gaps in the orders for several ports. Applications should compare the
+ orders of ports to determine their relative order, but must not assign any
+ other relevance to order values.
+*/
+#define JACKEY_ORDER "http://jackaudio.org/metadata/order"