From ef7231b465b5b3bf24b6d4d437af460ef5910099 Mon Sep 17 00:00:00 2001
From: Robin Gareus
Date: Sun, 3 Nov 2019 21:56:32 +0100
Subject: Add UI scale factor and color properties
---
lv2/ui/lv2-ui.doap.ttl | 2 ++
lv2/ui/ui.h | 3 +++
lv2/ui/ui.ttl | 47 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+)
(limited to 'lv2/ui')
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: .
+@prefix opts: .
@prefix owl: .
@prefix rdf: .
@prefix rdfs: .
@@ -179,6 +180,52 @@ The data pointer for the LV2_Feature for this feature should always be set
to NULL.
""" .
+ui:scaleFactor
+ a rdf:Property ,
+ owl:DatatypeProperty ,
+ opts:Option ;
+ rdfs:range xsd:float ;
+ rdfs:label "UI scale factor" ;
+ lv2:documentation """
+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.
+
+Hosts can pass this as an option to UIs to communicate this information, so
+that the UI can draw at an appropriate scale.
+""" .
+
+ui:backgroundColor
+ a rdf:Property ,
+ owl:DatatypeProperty ,
+ opts:Option ;
+ rdfs:label "Background color" ;
+ lv2:documentation """
+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.
+
+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.
+""" .
+
+ui:foregroundColor
+ a rdf:Property ,
+ owl:DatatypeProperty ,
+ opts:Option ;
+ rdfs:label "Foreground color" ;
+ lv2:documentation """
+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.
+
+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.
+""" .
+
ui:parent
a lv2:Feature ;
lv2:documentation """
--
cgit v1.2.1