From a6acef5894a5086cb9e8952e245bcf959b374f50 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Mar 2013 02:46:10 +0000 Subject: Add UI idle interface. --- lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl | 8 ++++++++ lv2/lv2plug.in/ns/extensions/ui/manifest.ttl | 2 +- lv2/lv2plug.in/ns/extensions/ui/ui.h | 19 +++++++++++++++++++ lv2/lv2plug.in/ns/extensions/ui/ui.ttl | 14 ++++++++++++++ wscript | 2 +- 5 files changed, 43 insertions(+), 2 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 ; doap:maintainer ; 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 ; 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 @@ a lv2:Specification ; lv2:minorVersion 2 ; - lv2:microVersion 12 ; + lv2:microVersion 13 ; rdfs:seeAlso . \ 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" @@ -337,6 +338,24 @@ typedef struct _LV2UI_Touch { bool grabbed); } 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. */ 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.

""" . +ui:idleInterace + a lv2:Feature , + lv2:ExtensionData ; + lv2:documentation """ +

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.

+ +

To indicate support, the host should pass a feature to instantiate() with +this URI, with NULL for data.

+""" . + ui:protocol a rdf:Property ; rdfs:domain ui:PortNotification ; diff --git a/wscript b/wscript index a2fd6aa..df44302 100644 --- a/wscript +++ b/wscript @@ -14,7 +14,7 @@ import waflib.Scripting as Scripting # Variables for 'waf dist' APPNAME = 'lv2' -VERSION = '1.4.0' +VERSION = '1.4.1' # Mandatory variables top = '.' -- cgit v1.2.1