summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/collections.c7
-rw-r--r--src/plugin.c3
-rw-r--r--src/slv2_internal.h9
3 files changed, 15 insertions, 4 deletions
diff --git a/src/collections.c b/src/collections.c
index 862a401..6ec004e 100644
--- a/src/collections.c
+++ b/src/collections.c
@@ -106,9 +106,12 @@ prefix ## _get_by_uri(CollType coll, SLV2Value uri) \
}
SLV2_SEQUENCE_IMPL(SLV2PluginClasses, SLV2PluginClass,
- slv2_plugin_classes, &slv2_plugin_class_free)
+ slv2_plugin_classes, &slv2_plugin_class_free)
+
+#ifdef SLV2_WITH_UI
SLV2_SEQUENCE_IMPL(SLV2UIs, SLV2UI,
- slv2_uis, &slv2_ui_free)
+ slv2_uis, &slv2_ui_free)
+#endif
/* VALUES */
diff --git a/src/plugin.c b/src/plugin.c
index 78c8b73..7e639d9 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -761,6 +761,7 @@ slv2_plugin_get_author_homepage(SLV2Plugin plugin)
return NULL;
}
+#ifdef SLV2_WITH_UI
SLV2_API
SLV2UIs
slv2_plugin_get_uis(SLV2Plugin p)
@@ -814,4 +815,4 @@ slv2_plugin_get_uis(SLV2Plugin p)
return NULL;
}
}
-
+#endif /* SLV2_WITH_UI */
diff --git a/src/slv2_internal.h b/src/slv2_internal.h
index 8f69544..60ed023 100644
--- a/src/slv2_internal.h
+++ b/src/slv2_internal.h
@@ -42,6 +42,9 @@ extern "C" {
#endif
#include "slv2/slv2.h"
+#ifdef SLV2_WITH_UI
+#include "slv2/ui.h"
+#endif
#define SLV2_NS_DOAP (const uint8_t*)"http://usefulinc.com/ns/doap#"
#define SLV2_NS_RDFS (const uint8_t*)"http://www.w3.org/2000/01/rdf-schema#"
@@ -150,13 +153,14 @@ struct _SLV2InstanceImpl {
/* ********* UI Instance ********* */
+#ifdef SLV2_WITH_UI
struct _SLV2UIInstance {
void* lib_handle;
const LV2UI_Descriptor* lv2ui_descriptor;
LV2UI_Handle lv2ui_handle;
LV2UI_Widget widget;
};
-
+#endif
/* ********* Plugin Class ********* */
@@ -230,6 +234,8 @@ slv2_world_load_file(SLV2World world, const char* file_uri);
/* ********* Plugin UI ********* */
+#ifdef SLV2_WITH_UI
+
struct _SLV2UI {
struct _SLV2World* world;
SLV2Value uri;
@@ -247,6 +253,7 @@ slv2_ui_new(SLV2World world,
void slv2_ui_free(SLV2UI ui);
+#endif /* SLV2_WITH_UI */
/* ********* Value ********* */