aboutsummaryrefslogtreecommitdiffstats
path: root/lv2/lv2plug.in
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-02-09 20:32:07 +0000
committerDavid Robillard <d@drobilla.net>2014-02-09 20:32:07 +0000
commit8d228466f47c0730f2b00a0e74860ad5987d5295 (patch)
tree8424f4087f810ad2a61e6d89974660a5d8508f88 /lv2/lv2plug.in
parent7553d21abaac2a211f38d6633a8c478e1ddcd292 (diff)
downloadlv2-8d228466f47c0730f2b00a0e74860ad5987d5295.tar.xz
Add show interface so UIs can gracefully degrade to separate windows if hosts can not use their widget directly.
Diffstat (limited to 'lv2/lv2plug.in')
-rw-r--r--lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl11
-rw-r--r--lv2/lv2plug.in/ns/extensions/ui/manifest.ttl2
-rw-r--r--lv2/lv2plug.in/ns/extensions/ui/ui.h28
-rw-r--r--lv2/lv2plug.in/ns/extensions/ui/ui.ttl12
4 files changed, 50 insertions, 3 deletions
diff --git a/lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl b/lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl
index b67069b..2abb648 100644
--- a/lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl
+++ b/lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl
@@ -13,6 +13,17 @@
doap:developer <http://lv2plug.in/ns/meta#larsl> ;
doap:maintainer <http://drobilla.net/drobilla#me> ;
doap:release [
+ doap:revision "2.17" ;
+ doap:created "2014-02-09" ;
+ dcs:blame <http://drobilla.net/drobilla#me> ;
+ dcs:changeset [
+ dcs:item [
+ rdfs:label "Add show interface so UIs can gracefully degrade to separate windows if hosts can not use their widget directly."
+ ] , [
+ rdfs:label "Fix identifier typos in documentation."
+ ]
+ ]
+ ] , [
doap:revision "2.16" ;
doap:created "2014-01-04" ;
doap:file-release <http://lv2plug.in/spec/lv2-1.8.0.tar.bz2> ;
diff --git a/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl b/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl
index 23a9da9..8ae13ea 100644
--- a/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl
+++ b/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl
@@ -4,5 +4,5 @@
<http://lv2plug.in/ns/extensions/ui>
a lv2:Specification ;
lv2:minorVersion 2 ;
- lv2:microVersion 16 ;
+ lv2:microVersion 17 ;
rdfs:seeAlso <ui.ttl> . \ No newline at end of file
diff --git a/lv2/lv2plug.in/ns/extensions/ui/ui.h b/lv2/lv2plug.in/ns/extensions/ui/ui.h
index ad51aa3..e59e298 100644
--- a/lv2/lv2plug.in/ns/extensions/ui/ui.h
+++ b/lv2/lv2plug.in/ns/extensions/ui/ui.h
@@ -51,6 +51,7 @@
#define LV2_UI__portNotification LV2_UI_PREFIX "portNotification"
#define LV2_UI__portSubscribe LV2_UI_PREFIX "portSubscribe"
#define LV2_UI__resize LV2_UI_PREFIX "resize"
+#define LV2_UI__showInterface LV2_UI_PREFIX "showInterface"
#define LV2_UI__touch LV2_UI_PREFIX "touch"
#define LV2_UI__ui LV2_UI_PREFIX "ui"
#define LV2_UI__updateRate LV2_UI_PREFIX "updateRate"
@@ -340,7 +341,7 @@ typedef struct _LV2UI_Touch {
} LV2UI_Touch;
/**
- UI Idle Feature (LV2_UI__idle)
+ UI Idle Feature (LV2_UI__idleInterface)
This feature is an addition to the UI API that provides a callback for the
host to call rapidly, e.g. to drive the idle callback of a toolkit.
@@ -358,6 +359,31 @@ typedef struct _LV2UI_Idle_Interface {
} LV2UI_Idle_Interface;
/**
+ UI Show Interface (LV2_UI__showInterface)
+
+ UIs can use this interface to provide show/hide methods to pop up a window,
+ which allows them to function in hosts unable to embed their widget type.
+
+ If used, LV2UI_Idle_Interface should also be used to drive the UI. The UI
+ should return non-zero from idle() when the window has been closed.
+*/
+typedef struct _LV2UI_Show_Interface {
+ /**
+ Show a window for this UI.
+
+ @return 0 on success, or anything else to stop being called.
+ */
+ int (*show)(LV2UI_Handle ui);
+
+ /**
+ Hide the window for this UI.
+
+ @return 0 on success, or anything else to stop being called.
+ */
+ int (*hide)(LV2UI_Handle ui);
+} LV2UI_Show_Interface;
+
+/**
Peak data for a slice of time, the update format for ui:peakProtocol.
*/
typedef struct _LV2UI_Peak_Data {
diff --git a/lv2/lv2plug.in/ns/extensions/ui/ui.ttl b/lv2/lv2plug.in/ns/extensions/ui/ui.ttl
index 5ab029d..c8aa10a 100644
--- a/lv2/lv2plug.in/ns/extensions/ui/ui.ttl
+++ b/lv2/lv2plug.in/ns/extensions/ui/ui.ttl
@@ -325,12 +325,22 @@ ui:idleInterface
UI. To support this feature, the UI should list it as a lv2:optionalFeature or
lv2:requiredFeature in its data, and also as lv2:extensionData. When the UI's
extension_data() is called with this URI (LV2_UI__idleInterface), it should
-return a pointer to an LV2_UI_Idle_Interface.</p>
+return a pointer to an LV2UI_Idle_Interface.</p>
<p>To indicate support, the host should pass a feature to instantiate() with
this URI, with NULL for data.</p>
""" .
+ui:showInterface
+ a lv2:ExtensionData ;
+ lv2:documentation """
+<p>An interface for showing and hiding a window for a UI. This allows UIs to
+gracefully degrade to separate windows when the host is unable to embed the UI
+widget for whatever reason. When the UI's extension_data() is called with this
+URI (LV2_UI__showInterface), it should return a pointer to an
+LV2UI_Show_Interface.</p>
+""" .
+
ui:updateRate
a rdf:Property ;
rdfs:range xsd:float ;