From bc82f3105f81388728dec83d008f5fddf22c5b2c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 22 Feb 2015 04:37:21 +0000 Subject: Set Jack port order metadata. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5600 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/JackDriver.cpp | 4 ++++ src/server/jackey.h | 11 +++++++++++ 2 files changed, 15 insertions(+) (limited to 'src') 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(), "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()).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" -- cgit v1.2.1