summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
Diffstat (limited to 'slv2')
-rw-r--r--slv2/Makefile.am1
-rw-r--r--slv2/plugin.h4
-rw-r--r--slv2/slv2.h1
-rw-r--r--slv2/types.h11
-rw-r--r--slv2/value.h25
5 files changed, 39 insertions, 3 deletions
diff --git a/slv2/Makefile.am b/slv2/Makefile.am
index e0a9c0e..f090e22 100644
--- a/slv2/Makefile.am
+++ b/slv2/Makefile.am
@@ -1,6 +1,7 @@
slv2includedir = $(includedir)/slv2
slv2include_HEADERS = \
+ gui.h \
lv2.h \
lv2-gtk2gui.h \
plugin.h \
diff --git a/slv2/plugin.h b/slv2/plugin.h
index 9dc53e7..36add35 100644
--- a/slv2/plugin.h
+++ b/slv2/plugin.h
@@ -338,12 +338,12 @@ slv2_plugin_get_guis(SLV2Plugin plugin);
/** Get the URI for a GUI library.
*
* \param plugin The plugin that the GUI is for.
- * \param gui A GUI identifier as returned by slv2_plugin_get_guis().
+ * \param gui A GUI identifier as returned by slv2_plugin_get_guis() (with type SLV2_VALUE_GUI).
*
* Time = Query
*/
SLV2Value
-slv2_plugin_gui_get_library_uri(SLV2Plugin plugin,
+slv2_plugin_get_gui_library_uri(SLV2Plugin plugin,
SLV2Value gui);
diff --git a/slv2/slv2.h b/slv2/slv2.h
index e5c2b07..e575229 100644
--- a/slv2/slv2.h
+++ b/slv2/slv2.h
@@ -24,6 +24,7 @@ extern "C" {
#endif
#include <slv2/types.h>
+#include <slv2/gui.h>
#include <slv2/world.h>
#include <slv2/pluginclass.h>
#include <slv2/plugin.h>
diff --git a/slv2/types.h b/slv2/types.h
index e5c10e2..0eba199 100644
--- a/slv2/types.h
+++ b/slv2/types.h
@@ -55,6 +55,13 @@ typedef enum _SLV2URIType {
} SLV2URIType;
+/** A type of plugin GUI (corresponding to some LV2 GUI extension).
+ */
+typedef enum _SLV2GUIType {
+ SLV2_GTK2_GUI ///< http://ll-plugins.nongnu.org/lv2/ext/gtk2gui
+} SLV2GUIType;
+
+
/** A port on a plugin. Opaque, but valid to compare to NULL. */
typedef struct _SLV2Port* SLV2Port;
@@ -87,6 +94,10 @@ typedef struct _SLV2Value* SLV2Value;
typedef void* SLV2Values;
+/** A plugin GUI */
+typedef void* SLV2GUI;
+
+
#ifdef __cplusplus
}
#endif
diff --git a/slv2/value.h b/slv2/value.h
index 1470d36..4fd0cf4 100644
--- a/slv2/value.h
+++ b/slv2/value.h
@@ -74,7 +74,7 @@ slv2_value_is_uri(SLV2Value value);
/** Return this value as a URI string, e.g. "http://example.org/foo".
*
* Valid to call only if slv2_value_is_uri(\a value) or
- * slv2_value_is_qname(\a value) returns true.
+ * slv2_value_is_gui(\a value) returns true.
* Returned value is owned by \a value and must not be freed by caller.
*
* Time = O(1)
@@ -172,6 +172,29 @@ int
slv2_value_as_int(SLV2Value value);
+/** Return whether this value is a GUI (URI and type).
+ *
+ * If this returns true, slv2_value_as_uri will return the URI of the GUI,
+ * and slv2_value_as_gui_type will return the SLV2GUIType (which can be
+ * used to find the URI of the corresponding GUI spec itself, with
+ * slv2_gui_type_get_uri).
+ *
+ * Time = O(1)
+ */
+bool
+slv2_value_is_gui(SLV2Value value);
+
+
+/** Return \a value as an SLV2GUIType.
+ *
+ * Valid to call only if slv2_value_is_gui(\a value) returns true.
+ *
+ * Time = O(1)
+ */
+SLV2GUIType
+slv2_value_as_gui_type(SLV2Value value);
+
+
/** @} */
#ifdef __cplusplus