aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-05-30 19:23:57 -0400
committerDavid Robillard <d@drobilla.net>2022-08-17 13:50:25 -0400
commitbf0664df5f22b2400fe5fb52ad9bf017986e1595 (patch)
tree0b8c0f0262cd4dad217a573b6b0cfbf3b9921f89
parent67cac5bf9eed6cfd1afc6cbb67784779387b50d8 (diff)
downloadjalv-bf0664df5f22b2400fe5fb52ad9bf017986e1595.tar.gz
jalv-bf0664df5f22b2400fe5fb52ad9bf017986e1595.tar.bz2
jalv-bf0664df5f22b2400fe5fb52ad9bf017986e1595.zip
Separate options.h from jalv_internal.h
-rw-r--r--src/frontend.h1
-rw-r--r--src/jack.c1
-rw-r--r--src/jalv.c1
-rw-r--r--src/jalv_console.c1
-rw-r--r--src/jalv_gtk.c1
-rw-r--r--src/jalv_internal.h21
-rw-r--r--src/jalv_qt.cpp1
-rw-r--r--src/log.c1
-rw-r--r--src/options.h37
9 files changed, 45 insertions, 20 deletions
diff --git a/src/frontend.h b/src/frontend.h
index b2e722d..31ac003 100644
--- a/src/frontend.h
+++ b/src/frontend.h
@@ -5,6 +5,7 @@
#define JALV_UI_H
#include "jalv_internal.h"
+#include "options.h"
#include "lilv/lilv.h"
diff --git a/src/jack.c b/src/jack.c
index f143a0b..5b04c4f 100644
--- a/src/jack.c
+++ b/src/jack.c
@@ -10,6 +10,7 @@
#include "log.h"
#include "lv2_evbuf.h"
#include "nodes.h"
+#include "options.h"
#include "urids.h"
#include "lilv/lilv.h"
diff --git a/src/jalv.c b/src/jalv.c
index b0b88c4..1b47653 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -13,6 +13,7 @@
#include "log.h"
#include "lv2_evbuf.h"
#include "nodes.h"
+#include "options.h"
#include "state.h"
#include "urids.h"
#include "worker.h"
diff --git a/src/jalv_console.c b/src/jalv_console.c
index 233f530..641c505 100644
--- a/src/jalv_console.c
+++ b/src/jalv_console.c
@@ -11,6 +11,7 @@
#include "jalv_config.h"
#include "jalv_internal.h"
#include "log.h"
+#include "options.h"
#include "state.h"
#include "lilv/lilv.h"
diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c
index 5b6bc16..0760683 100644
--- a/src/jalv_gtk.c
+++ b/src/jalv_gtk.c
@@ -5,6 +5,7 @@
#include "frontend.h"
#include "jalv_internal.h"
#include "nodes.h"
+#include "options.h"
#include "state.h"
#include "urids.h"
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index 9230d43..14e0648 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -8,6 +8,7 @@
#include "jalv_config.h"
#include "lv2_evbuf.h"
#include "nodes.h"
+#include "options.h"
#include "symap.h"
#include "urids.h"
@@ -68,26 +69,6 @@ struct Port {
float control; ///< For control ports, otherwise 0.0f
};
-typedef struct {
- char* name; ///< Client name
- int name_exact; ///< Exit if name is taken
- char* load; ///< Path for state to load
- char* preset; ///< URI of preset to load
- char** controls; ///< Control values
- uint32_t buffer_size; ///< Plugin <= >UI communication buffer size
- double update_rate; ///< UI update rate in Hz
- double scale_factor; ///< UI scale factor
- int dump; ///< Dump communication iff true
- int trace; ///< Print trace log iff true
- int generic_ui; ///< Use generic UI iff true
- int show_hidden; ///< Show controls for notOnGUI ports
- int no_menu; ///< Hide menu iff true
- int show_ui; ///< Show non-embedded UI
- int print_controls; ///< Print control changes to stdout
- int non_interactive; ///< Do not listen for commands on stdin
- char* ui_uri; ///< URI of UI to load
-} JalvOptions;
-
typedef enum { JALV_RUNNING, JALV_PAUSE_REQUESTED, JALV_PAUSED } JalvPlayState;
typedef struct {
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp
index 6b734b3..90e469d 100644
--- a/src/jalv_qt.cpp
+++ b/src/jalv_qt.cpp
@@ -5,6 +5,7 @@
#include "frontend.h"
#include "jalv_internal.h"
#include "nodes.h"
+#include "options.h"
#include "lilv/lilv.h"
#include "suil/suil.h"
diff --git a/src/log.c b/src/log.c
index e2defa7..a86267a 100644
--- a/src/log.c
+++ b/src/log.c
@@ -7,6 +7,7 @@
#include "jalv_config.h"
#include "jalv_internal.h"
+#include "options.h"
#include "urids.h"
#include "lilv/lilv.h"
diff --git a/src/options.h b/src/options.h
new file mode 100644
index 0000000..a9ffdc6
--- /dev/null
+++ b/src/options.h
@@ -0,0 +1,37 @@
+// Copyright 2007-2022 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
+
+#ifndef JALV_OPTIONS_H
+#define JALV_OPTIONS_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ char* name; ///< Client name
+ int name_exact; ///< Exit if name is taken
+ char* load; ///< Path for state to load
+ char* preset; ///< URI of preset to load
+ char** controls; ///< Control values
+ uint32_t buffer_size; ///< Plugin <= >UI communication buffer size
+ double update_rate; ///< UI update rate in Hz
+ double scale_factor; ///< UI scale factor
+ int dump; ///< Dump communication iff true
+ int trace; ///< Print trace log iff true
+ int generic_ui; ///< Use generic UI iff true
+ int show_hidden; ///< Show controls for notOnGUI ports
+ int no_menu; ///< Hide menu iff true
+ int show_ui; ///< Show non-embedded UI
+ int print_controls; ///< Print control changes to stdout
+ int non_interactive; ///< Do not listen for commands on stdin
+ char* ui_uri; ///< URI of UI to load
+} JalvOptions;
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // JALV_OPTIONS_H