diff options
author | Robin Gareus <robin@gareus.org> | 2019-11-03 21:56:32 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-17 12:07:11 +0100 |
commit | ef7231b465b5b3bf24b6d4d437af460ef5910099 (patch) | |
tree | 7525357275a7ee1b9445126e8019e6270418ffa8 /lv2 | |
parent | 91ca5a8fe86294ac2d536c510f777ccfe04ce4b7 (diff) | |
download | lv2-ef7231b465b5b3bf24b6d4d437af460ef5910099.tar.xz |
Add UI scale factor and color properties
Diffstat (limited to 'lv2')
-rw-r--r-- | lv2/ui/lv2-ui.doap.ttl | 2 | ||||
-rw-r--r-- | lv2/ui/ui.h | 3 | ||||
-rw-r--r-- | lv2/ui/ui.ttl | 47 |
3 files changed, 52 insertions, 0 deletions
diff --git a/lv2/ui/lv2-ui.doap.ttl b/lv2/ui/lv2-ui.doap.ttl index ace0a0f..b83a730 100644 --- a/lv2/ui/lv2-ui.doap.ttl +++ b/lv2/ui/lv2-ui.doap.ttl @@ -18,6 +18,8 @@ dcs:changeset [ dcs:item [ rdfs:label "Add ui:requestValue feature." + ] , [ + rdfs:label "Add ui:scaleFactor, ui:foregroundColor, and ui:backgroundColor properties." ] ] ] , [ diff --git a/lv2/ui/ui.h b/lv2/ui/ui.h index aba3d5a..ce6aa4f 100644 --- a/lv2/ui/ui.h +++ b/lv2/ui/ui.h @@ -69,6 +69,9 @@ #define LV2_UI__ui LV2_UI_PREFIX "ui" ///< http://lv2plug.in/ns/extensions/ui#ui #define LV2_UI__updateRate LV2_UI_PREFIX "updateRate" ///< http://lv2plug.in/ns/extensions/ui#updateRate #define LV2_UI__windowTitle LV2_UI_PREFIX "windowTitle" ///< http://lv2plug.in/ns/extensions/ui#windowTitle +#define LV2_UI__scaleFactor LV2_UI_PREFIX "scaleFactor" ///< http://lv2plug.in/ns/extensions/ui#scaleFactor +#define LV2_UI__foregroundColor LV2_UI_PREFIX "foregroundColor" ///< http://lv2plug.in/ns/extensions/ui#foregroundColor +#define LV2_UI__backgroundColor LV2_UI_PREFIX "backgroundColor" ///< http://lv2plug.in/ns/extensions/ui#backgroundColor /** The index returned by LV2UI_Port_Map::port_index() for unknown ports. diff --git a/lv2/ui/ui.ttl b/lv2/ui/ui.ttl index 8641471..fcd2f67 100644 --- a/lv2/ui/ui.ttl +++ b/lv2/ui/ui.ttl @@ -1,4 +1,5 @@ @prefix lv2: <http://lv2plug.in/ns/lv2core#> . +@prefix opts: <http://lv2plug.in/ns/ext/options#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @@ -179,6 +180,52 @@ The data pointer for the LV2_Feature for this feature should always be set to NULL.</p> """ . +ui:scaleFactor + a rdf:Property , + owl:DatatypeProperty , + opts:Option ; + rdfs:range xsd:float ; + rdfs:label "UI scale factor" ; + lv2:documentation """ +<p>HiDPI (High Dots Per Inch) displays have a high resolution on a relatively +small form factor. Many systems use a scale factor to compensate for this, so +for example, a scale factor of 2 means things are drawn twice as large as +normal.</p> + +<p>Hosts can pass this as an option to UIs to communicate this information, so +that the UI can draw at an appropriate scale.</p> +""" . + +ui:backgroundColor + a rdf:Property , + owl:DatatypeProperty , + opts:Option ; + rdfs:label "Background color" ; + lv2:documentation """ +<p>The background color of the host's UI. The host can pass this as an option +so that UIs can integrate nicely with the host window around it.</p> + +<p>Hosts should pass this as an option to UIs with an integer RGBA32 color +value. If the value is a 32-bit integer, it is guaranteed to be in RGBA32 +format, but the UI must check the value type and not assume this, to allow for +other types of color in the future.</p> +""" . + +ui:foregroundColor + a rdf:Property , + owl:DatatypeProperty , + opts:Option ; + rdfs:label "Foreground color" ; + lv2:documentation """ +<p>The foreground color of the host's UI. The host can pass this as an option +so that UIs can integrate nicely with the host window around it.</p> + +<p>Hosts should pass this as an option to UIs with an integer RGBA32 color +value. If the value is a 32-bit integer, it is guaranteed to be in RGBA32 +format, but the UI must check the value type and not assume this, to allow for +other types of color in the future.</p> +""" . + ui:parent a lv2:Feature ; lv2:documentation """ |