diff options
author | David Robillard <d@drobilla.net> | 2013-03-19 02:46:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-03-19 02:46:10 +0000 |
commit | a6acef5894a5086cb9e8952e245bcf959b374f50 (patch) | |
tree | 4608f27a421a09034f52ed89450d8992fe67d9fc /lv2/lv2plug.in/ns/extensions | |
parent | 68ab5ac516f893fe5366c172599ca4b688ca286a (diff) | |
download | lv2-a6acef5894a5086cb9e8952e245bcf959b374f50.tar.xz |
Add UI idle interface.
Diffstat (limited to 'lv2/lv2plug.in/ns/extensions')
-rw-r--r-- | lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl | 8 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/extensions/ui/manifest.ttl | 2 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/extensions/ui/ui.h | 19 | ||||
-rw-r--r-- | lv2/lv2plug.in/ns/extensions/ui/ui.ttl | 14 |
4 files changed, 42 insertions, 1 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 3dbabeb..8d5a81d 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,14 @@ doap:developer <http://lv2plug.in/ns/meta#larsl> ; doap:maintainer <http://drobilla.net/drobilla#me> ; doap:release [ + doap:revision "2.13" ; + doap:created "2013-03-18" ; + dcs:changeset [ + dcs:item [ + rdfs:label "Add idle interface so native UIs and foreign toolkits can drive their event loops." + ] + ] + ] , [ doap:revision "2.12" ; doap:created "2012-12-01" ; doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; diff --git a/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl b/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl index 404cbb4..3071a59 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 12 ; + lv2:microVersion 13 ; 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 62f4c93..2a9b28a 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/ui.h +++ b/lv2/lv2plug.in/ns/extensions/ui/ui.h @@ -41,6 +41,7 @@ #define LV2_UI__X11UI LV2_UI_PREFIX "X11UI" #define LV2_UI__binary LV2_UI_PREFIX "binary" #define LV2_UI__fixedSize LV2_UI_PREFIX "fixedSize" +#define LV2_UI__idleInterface LV2_UI_PREFIX "idleInterface" #define LV2_UI__noUserResize LV2_UI_PREFIX "noUserResize" #define LV2_UI__notifyType LV2_UI_PREFIX "notifyType" #define LV2_UI__parent LV2_UI_PREFIX "parent" @@ -338,6 +339,24 @@ typedef struct _LV2UI_Touch { } LV2UI_Touch; /** + UI Idle Feature (LV2_UI__idle) + + 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. +*/ +typedef struct _LV2UI_Idle_Interface { + /** + Run a single iteration of the UI's idle loop. + + This will be called "frequently" in the UI thread at a rate appropriate + for a toolkit main loop. There are no precise timing guarantees. + + @return 0 on success, or anything else to stop being called. + */ + int (*idle)(LV2UI_Handle ui); +} LV2UI_Idle_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 84a9761..70cc93f 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/ui.ttl +++ b/lv2/lv2plug.in/ns/extensions/ui/ui.ttl @@ -316,6 +316,20 @@ plugin UI. This feature corresponds to the LV2UI_Touch struct, which should be passed with the URI LV2_UI__touch.</p> """ . +ui:idleInterace + a lv2:Feature , + lv2:ExtensionData ; + lv2:documentation """ +<p>A feature that provides a callback for the host to call rapidly to drive the +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> + +<p>To indicate support, the host should pass a feature to instantiate() with +this URI, with NULL for data.</p> +""" . + ui:protocol a rdf:Property ; rdfs:domain ui:PortNotification ; |