From 382358caa9b8ea0b41b28e934574a7f0c5d5ff31 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Mar 2012 02:06:41 +0000 Subject: Move UI resize functionality to UI extension. --- doc/reference.doxygen.in | 1 - lv2/lv2plug.in/ns/ext/ui-resize/ext.pc.in | 1 - lv2/lv2plug.in/ns/ext/ui-resize/manifest.ttl | 9 ---- lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h | 58 ------------------------- lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.ttl | 43 ------------------ lv2/lv2plug.in/ns/ext/ui-resize/waf | 1 - lv2/lv2plug.in/ns/ext/ui-resize/wscript | 1 - lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl | 44 ++++++++++--------- lv2/lv2plug.in/ns/extensions/ui/manifest.ttl | 2 +- lv2/lv2plug.in/ns/extensions/ui/ui.h | 49 ++++++++++++++++++++- lv2/lv2plug.in/ns/extensions/ui/ui.ttl | 19 ++++---- 11 files changed, 83 insertions(+), 145 deletions(-) delete mode 120000 lv2/lv2plug.in/ns/ext/ui-resize/ext.pc.in delete mode 100644 lv2/lv2plug.in/ns/ext/ui-resize/manifest.ttl delete mode 100644 lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h delete mode 100644 lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.ttl delete mode 120000 lv2/lv2plug.in/ns/ext/ui-resize/waf delete mode 120000 lv2/lv2plug.in/ns/ext/ui-resize/wscript diff --git a/doc/reference.doxygen.in b/doc/reference.doxygen.in index 5ace210..4f06423 100644 --- a/doc/reference.doxygen.in +++ b/doc/reference.doxygen.in @@ -581,7 +581,6 @@ INPUT = \ @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/resize-port/resize-port.h \ @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/state/state.h \ @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/time/time.h \ - @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h \ @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/uri-map/uri-map.h \ @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/urid/urid.h \ @LV2_SRCDIR@/lv2/lv2plug.in/ns/ext/worker/worker.h \ diff --git a/lv2/lv2plug.in/ns/ext/ui-resize/ext.pc.in b/lv2/lv2plug.in/ns/ext/ui-resize/ext.pc.in deleted file mode 120000 index 03dd044..0000000 --- a/lv2/lv2plug.in/ns/ext/ui-resize/ext.pc.in +++ /dev/null @@ -1 +0,0 @@ -../../../../../ext.pc.in \ No newline at end of file diff --git a/lv2/lv2plug.in/ns/ext/ui-resize/manifest.ttl b/lv2/lv2plug.in/ns/ext/ui-resize/manifest.ttl deleted file mode 100644 index ca5cdf9..0000000 --- a/lv2/lv2plug.in/ns/ext/ui-resize/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: . -@prefix rdfs: . - - - a lv2:Specification ; - lv2:minorVersion 0 ; - lv2:microVersion 1 ; - rdfs:seeAlso . - diff --git a/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h b/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h deleted file mode 100644 index cf5ccc6..0000000 --- a/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright 2011 David Robillard - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_UI_RESIZE_H -#define LV2_UI_RESIZE_H - -#define LV2_UI_RESIZE_URI "http://lv2plug.in/ns/ext/ui-resize" - -typedef void* LV2_UI_Resize_Feature_Data; - -/** - UI Resize Feature. - - This structure may be used in two ways: as a feature passed by the host - (e.g. via the features parameter of LV2UI_Descriptor::instantiate()) or - as a feature exposed by a UI (e.g. via LV2UI_Descriptor::extension_data()). - - In both cases, the URI to be used is - http://lv2plug.in/ns/ext/ui-resize#UIResize -*/ -typedef struct { - - LV2_UI_Resize_Feature_Data data; - - /** - Request or notify a size change. - - When this struct is provided by the host, the UI may call this - function to notify the host that a size change is desired, or notify - the host of the initial size of the UI. - - When this struct is provided by the plugin, the host may call this - function in the UI thread to notify the UI that it should change its - size to the given dimensions. - - @return 0 on success. - */ - int (*ui_resize)(LV2_UI_Resize_Feature_Data data, - int width, - int height); - -} LV2_UI_Resize_Feature; - -#endif /* LV2_UI_RESIZE_H */ - diff --git a/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.ttl b/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.ttl deleted file mode 100644 index f3b7d92..0000000 --- a/lv2/lv2plug.in/ns/ext/ui-resize/ui-resize.ttl +++ /dev/null @@ -1,43 +0,0 @@ -# LV2 UI Resize Extension -# Copyright 2011 David Robillard -# -# Permission to use, copy, modify, and/or distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -@prefix uirsz: . -@prefix lv2: . -@prefix rdf: . -@prefix rdfs: . -@prefix xsd: . -@prefix doap: . -@prefix foaf: . - - - a lv2:Specification ; - doap:name "LV2 UI Resize Extension" ; - doap:shortdesc "A feature for self-resizing plugin UIs." ; - doap:license ; - lv2:documentation """ -

An extension that allows LV2 plugin UIs to notify the host about size -changes, or for the host to notify plugin UIs about size changes.

-""" . - -uirsz:UIResize - a lv2:Feature ; - lv2:documentation """ -

A feature that allows the UI to notify the host about its current size, or -request a size change. This feature corresponds to the LV2_UI_Resize_Feature -struct, which should be passed with the feature URI -http://lv2plug.in/ns/ext/ui-resize#UIResize. This struct may also -be provided by the UI as extension data using the same URI, in which case it -is used by the host to request that the UI change its size.

-""" . diff --git a/lv2/lv2plug.in/ns/ext/ui-resize/waf b/lv2/lv2plug.in/ns/ext/ui-resize/waf deleted file mode 120000 index 5235032..0000000 --- a/lv2/lv2plug.in/ns/ext/ui-resize/waf +++ /dev/null @@ -1 +0,0 @@ -../../../../../waf \ No newline at end of file diff --git a/lv2/lv2plug.in/ns/ext/ui-resize/wscript b/lv2/lv2plug.in/ns/ext/ui-resize/wscript deleted file mode 120000 index 7e2c01b..0000000 --- a/lv2/lv2plug.in/ns/ext/ui-resize/wscript +++ /dev/null @@ -1 +0,0 @@ -../../../../../ext.wscript \ No newline at end of file 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 5b8ca9e..796b828 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl +++ b/lv2/lv2plug.in/ns/extensions/ui/lv2-ui.doap.ttl @@ -18,17 +18,19 @@ doap:developer [ a foaf:Person ; foaf:name "Lars Luthman" ; - foaf:mbox + foaf:mbox ; ] ; doap:maintainer ; doap:release [ - doap:revision "2.5" ; - doap:created "2011-12-28" ; + doap:revision "2.7" ; + doap:created "2012-03-22" ; dcs:changeset [ dcs:item [ - rdfs:label "Add ui:parent." - ] - ] + rdfs:label "Add ui:parent and ui:resize." ; + ] , [ + rdfs:label "Add support for referring to ports by symbol." ; + ] ; + ] ; ] , [ doap:revision "2.4" ; doap:created "2011-11-21" ; @@ -36,17 +38,17 @@ dcs:blame ; dcs:changeset [ dcs:item [ - rdfs:label "Deprecate ui:makeSONameResident." + rdfs:label "Deprecate ui:makeSONameResident." ; ] , [ - rdfs:label "Add Qt4 and X11 widget types." + rdfs:label "Add Qt4 and X11 widget types." ; ] , [ - rdfs:label "Install header to URI-based system path." + rdfs:label "Install header to URI-based system path." ; ] , [ - rdfs:label "Add pkg-config file." + rdfs:label "Add pkg-config file." ; ] , [ - rdfs:label "Make ui.ttl a valid OWL 2 DL ontology." - ] - ] + rdfs:label "Make ui.ttl a valid OWL 2 DL ontology." ; + ] ; + ] ; ] , [ doap:revision "2.2" ; doap:created "2011-05-26" ; @@ -54,13 +56,13 @@ dcs:blame ; dcs:changeset [ dcs:item [ - rdfs:label "Add build system (for installation)." + rdfs:label "Add build system (for installation)." ; ] , [ - rdfs:label "Convert documentation to HTML and use lv2:documentation." + rdfs:label "Convert documentation to HTML and use lv2:documentation." ; ] , [ - rdfs:label "Use lv2:Specification to be discovered as an extension." - ] - ] + rdfs:label "Use lv2:Specification to be discovered as an extension." ; + ] ; + ] ; ] , [ doap:revision "2.0" ; doap:created "2010-10-06" ; @@ -68,7 +70,7 @@ dcs:blame ; dcs:changeset [ dcs:item [ - rdfs:label "Initial release." - ] - ] + rdfs:label "Initial release." ; + ] ; + ] ; ] . diff --git a/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl b/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl index 28412c4..9e009f6 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl +++ b/lv2/lv2plug.in/ns/extensions/ui/manifest.ttl @@ -4,6 +4,6 @@ a lv2:Specification ; lv2:minorVersion 2 ; - lv2:microVersion 5 ; + lv2:microVersion 7 ; rdfs:seeAlso , . diff --git a/lv2/lv2plug.in/ns/extensions/ui/ui.h b/lv2/lv2plug.in/ns/extensions/ui/ui.h index 6d64a0d..8716291 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/ui.h +++ b/lv2/lv2plug.in/ns/extensions/ui/ui.h @@ -26,7 +26,22 @@ #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#define LV2_UI_URI "http://lv2plug.in/ns/extensions/ui" +#define LV2_UI_URI "http://lv2plug.in/ns/extensions/ui" +#define LV2_UI_PREFIX LV2_UI_URI "#" + +#define LV2_UI__UI LV2_UI_PREFIX "UI" +#define LV2_UI__GtkUI LV2_UI_PREFIX "GtkUI" +#define LV2_UI__Qt4UI LV2_UI_PREFIX "Qt4UI" +#define LV2_UI__X11UI LV2_UI_PREFIX "X11UI" +#define LV2_UI__noUserResize LV2_UI_PREFIX "noUserResize" +#define LV2_UI__fixedSize LV2_UI_PREFIX "fixedSize" +#define LV2_UI__parent LV2_UI_PREFIX "parent" +#define LV2_UI__PortNotification LV2_UI_PREFIX "PortNotification" +#define LV2_UI__portNotification LV2_UI_PREFIX "portNotification" +#define LV2_UI__plugin LV2_UI_PREFIX "plugin" +#define LV2_UI__portIndex LV2_UI_PREFIX "portIndex" +#define LV2_UI__notifyType LV2_UI_PREFIX "notifyType" +#define LV2_UI__resize LV2_UI_PREFIX "resize" #ifdef __cplusplus extern "C" { @@ -220,6 +235,38 @@ typedef struct _LV2UI_Descriptor { } LV2UI_Descriptor; +typedef void* LV2_UI_Resize_Handle; + +/** + UI Resize Feature (LV2_UI__resize) + + This structure may be used in two ways: as a feature passed by the host + (e.g. via the features parameter of LV2UI_Descriptor::instantiate()) or + as a feature exposed by a UI (e.g. via LV2UI_Descriptor::extension_data()). +*/ +typedef struct { + + LV2_UI_Resize_Handle handle; + + /** + Request or notify a size change. + + When this struct is provided by the host, the UI may call this + function to notify the host that a size change is desired, or notify + the host of the initial size of the UI. + + When this struct is provided by the plugin, the host may call this + function in the UI thread to notify the UI that it should change its + size to the given dimensions. + + @return 0 on success. + */ + int (*ui_resize)(LV2_UI_Resize_Handle handle, + int width, + int height); + +} LV2_UI_Resize; + /** A plugin UI programmer must include a function called "lv2ui_descriptor" with the following function prototype within the shared object file. This diff --git a/lv2/lv2plug.in/ns/extensions/ui/ui.ttl b/lv2/lv2plug.in/ns/extensions/ui/ui.ttl index 010580f..fa07e0b 100644 --- a/lv2/lv2plug.in/ns/extensions/ui/ui.ttl +++ b/lv2/lv2plug.in/ns/extensions/ui/ui.ttl @@ -194,14 +194,6 @@ ui:PortNotification owl:cardinality 1 ; rdfs:comment """ A PortNotification MUST have exactly one ui:plugin which is a lv2:Plugin. -""" - ] , [ - a owl:Restriction ; - owl:onProperty ui:portIndex ; - owl:someValuesFrom xsd:decimal ; - owl:cardinality 1 ; - rdfs:comment """ -A PortNotification MUST have exactly one ui:portIndex which is an xsd:decimal. """ ] ; lv2:documentation """ @@ -254,3 +246,14 @@ can be used to indicate that only a particular type of data should cause notification. This is useful where port traffic is very dense, but only a certain small number of events are actually of interest to the UI.

""" . + +ui:resize + a lv2:Feature ; + lv2:documentation """ +

A feature that allows the UI to notify the host about its current size, or +request a size change. This feature corresponds to the LV2_UI_Resize struct, +which should be passed with the URI LV2_UI__resize. This struct may also be +provided by the UI as extension data using the same URI, in which case it is +used by the host to request that the UI change its size.

+""" . +o \ No newline at end of file -- cgit v1.2.1