aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/control.c2
-rw-r--r--src/control.h40
-rw-r--r--src/jalv.c1
-rw-r--r--src/jalv_gtk.c1
-rw-r--r--src/jalv_internal.h16
5 files changed, 44 insertions, 16 deletions
diff --git a/src/control.c b/src/control.c
index 011ad93..51afa08 100644
--- a/src/control.c
+++ b/src/control.c
@@ -3,6 +3,8 @@
#define _POSIX_C_SOURCE 200809L
+#include "control.h"
+
#include "jalv_internal.h"
#include "lilv/lilv.h"
diff --git a/src/control.h b/src/control.h
new file mode 100644
index 0000000..0442599
--- /dev/null
+++ b/src/control.h
@@ -0,0 +1,40 @@
+// Copyright 2007-2022 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
+
+#ifndef JALV_CONTROL_H
+#define JALV_CONTROL_H
+
+#include "jalv_internal.h"
+
+#include "lilv/lilv.h"
+#include "lv2/urid/urid.h"
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Plugin control utilities
+
+/// Order scale points by value
+int
+scale_point_cmp(const ScalePoint* a, const ScalePoint* b);
+
+ControlID*
+new_port_control(Jalv* jalv, uint32_t index);
+
+ControlID*
+new_property_control(Jalv* jalv, const LilvNode* property);
+
+void
+add_control(Controls* controls, ControlID* control);
+
+ControlID*
+get_property_control(const Controls* controls, LV2_URID property);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // JALV_CONTROL_H
diff --git a/src/jalv.c b/src/jalv.c
index 024a201..f0a6324 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -6,6 +6,7 @@
#define _DARWIN_C_SOURCE // for mkdtemp on Darwin
#include "backend.h"
+#include "control.h"
#include "jalv_config.h"
#include "jalv_internal.h"
#include "log.h"
diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c
index 5f36aaf..9ad443c 100644
--- a/src/jalv_gtk.c
+++ b/src/jalv_gtk.c
@@ -1,6 +1,7 @@
// Copyright 2007-2022 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
+#include "control.h"
#include "jalv_internal.h"
#include "state.h"
#include "ui.h"
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index adaa86e..e6977db 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -78,10 +78,6 @@ typedef struct {
char* label;
} ScalePoint;
-/// Order scale points by value
-int
-scale_point_cmp(const ScalePoint* a, const ScalePoint* b);
-
/// Plugin control
typedef struct {
Jalv* jalv;
@@ -107,23 +103,11 @@ typedef struct {
bool is_readable; ///< Readable (output)
} ControlID;
-ControlID*
-new_port_control(Jalv* jalv, uint32_t index);
-
-ControlID*
-new_property_control(Jalv* jalv, const LilvNode* property);
-
typedef struct {
size_t n_controls;
ControlID** controls;
} Controls;
-void
-add_control(Controls* controls, ControlID* control);
-
-ControlID*
-get_property_control(const Controls* controls, LV2_URID property);
-
/// Control change event, sent through ring buffers for UI updates
typedef struct {
uint32_t index;