diff options
author | David Robillard <d@drobilla.net> | 2022-05-30 20:06:57 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-08-17 13:50:30 -0400 |
commit | 15e67e4e4e2333731e8d7a9e70bd95976e512f2c (patch) | |
tree | 557082b69559dc5d5743d74a5955c144ba739059 /src | |
parent | 2920fd5f170179e4e1a880856068d3d8b5f0f420 (diff) | |
download | jalv-15e67e4e4e2333731e8d7a9e70bd95976e512f2c.tar.gz jalv-15e67e4e4e2333731e8d7a9e70bd95976e512f2c.tar.bz2 jalv-15e67e4e4e2333731e8d7a9e70bd95976e512f2c.zip |
Reduce dependence on jalv_internal.h
Diffstat (limited to 'src')
-rw-r--r-- | src/backend.h | 2 | ||||
-rw-r--r-- | src/frontend.h | 2 | ||||
-rw-r--r-- | src/jack.c | 3 | ||||
-rw-r--r-- | src/jalv.c | 1 | ||||
-rw-r--r-- | src/jalv_console.c | 1 | ||||
-rw-r--r-- | src/jalv_gtk.c | 1 | ||||
-rw-r--r-- | src/jalv_internal.h | 11 | ||||
-rw-r--r-- | src/jalv_qt.hpp | 2 | ||||
-rw-r--r-- | src/log.h | 2 | ||||
-rw-r--r-- | src/portaudio.c | 2 | ||||
-rw-r--r-- | src/state.h | 2 | ||||
-rw-r--r-- | src/types.h | 24 |
12 files changed, 37 insertions, 16 deletions
diff --git a/src/backend.h b/src/backend.h index f05d687..53f5db2 100644 --- a/src/backend.h +++ b/src/backend.h @@ -4,7 +4,7 @@ #ifndef JALV_BACKEND_H #define JALV_BACKEND_H -#include "jalv_internal.h" +#include "types.h" #include <stdint.h> diff --git a/src/frontend.h b/src/frontend.h index 31ac003..68e6863 100644 --- a/src/frontend.h +++ b/src/frontend.h @@ -4,8 +4,8 @@ #ifndef JALV_UI_H #define JALV_UI_H -#include "jalv_internal.h" #include "options.h" +#include "types.h" #include "lilv/lilv.h" @@ -12,6 +12,7 @@ #include "nodes.h" #include "options.h" #include "port.h" +#include "types.h" #include "urids.h" #include "lilv/lilv.h" @@ -37,7 +38,7 @@ #include <stdlib.h> #include <string.h> -struct JalvBackend { +struct JalvBackendImpl { jack_client_t* client; ///< Jack client bool is_internal_client; ///< Running inside jackd }; @@ -16,6 +16,7 @@ #include "options.h" #include "port.h" #include "state.h" +#include "types.h" #include "urids.h" #include "worker.h" diff --git a/src/jalv_console.c b/src/jalv_console.c index f71c49f..ebb9164 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -14,6 +14,7 @@ #include "options.h" #include "port.h" #include "state.h" +#include "types.h" #include "lilv/lilv.h" #include "lv2/ui/ui.h" diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c index 3be1957..998d789 100644 --- a/src/jalv_gtk.c +++ b/src/jalv_gtk.c @@ -8,6 +8,7 @@ #include "options.h" #include "port.h" #include "state.h" +#include "types.h" #include "urids.h" #include "lilv/lilv.h" diff --git a/src/jalv_internal.h b/src/jalv_internal.h index f07241b..a841e80 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -9,6 +9,7 @@ #include "nodes.h" #include "options.h" #include "symap.h" +#include "types.h" #include "urids.h" #include "worker.h" @@ -46,14 +47,6 @@ extern "C" { #endif -struct Jalv; - -typedef struct JalvBackend JalvBackend; - -typedef struct Jalv Jalv; - -typedef enum { JALV_RUNNING, JALV_PAUSE_REQUESTED, JALV_PAUSED } JalvPlayState; - typedef struct { LV2_Feature map_feature; LV2_Feature unmap_feature; @@ -73,7 +66,7 @@ typedef struct { LV2_Extension_Data_Feature ext_data; } JalvFeatures; -struct Jalv { +struct JalvImpl { JalvOptions opts; ///< Command-line options JalvURIDs urids; ///< URIDs JalvNodes nodes; ///< Nodes diff --git a/src/jalv_qt.hpp b/src/jalv_qt.hpp index bb74e46..24a57b5 100644 --- a/src/jalv_qt.hpp +++ b/src/jalv_qt.hpp @@ -1,8 +1,8 @@ // Copyright 2007-2022 David Robillard <d@drobilla.net> // SPDX-License-Identifier: ISC -#include "jalv_internal.h" #include "state.h" +#include "types.h" #include "lilv/lilv.h" @@ -4,7 +4,7 @@ #ifndef JALV_LOG_H #define JALV_LOG_H -#include "jalv_internal.h" +#include "types.h" #include "lv2/log/log.h" #include "lv2/urid/urid.h" diff --git a/src/portaudio.c b/src/portaudio.c index 403002c..f50c262 100644 --- a/src/portaudio.c +++ b/src/portaudio.c @@ -10,7 +10,7 @@ #include <portaudio.h> #include <stdio.h> -struct JalvBackend { +struct JalvBackendImpl { PaStream* stream; }; diff --git a/src/state.h b/src/state.h index 72c11da..6d68967 100644 --- a/src/state.h +++ b/src/state.h @@ -4,7 +4,7 @@ #ifndef JALV_STATE_H #define JALV_STATE_H -#include "jalv_internal.h" +#include "types.h" #include "lilv/lilv.h" #include "lv2/atom/atom.h" diff --git a/src/types.h b/src/types.h new file mode 100644 index 0000000..6a1cfd7 --- /dev/null +++ b/src/types.h @@ -0,0 +1,24 @@ +// Copyright 2007-2022 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#ifndef JALV_TYPES_H +#define JALV_TYPES_H + +#ifdef __cplusplus +extern "C" { +#endif + +/// Backend playing state +typedef enum { JALV_RUNNING, JALV_PAUSE_REQUESTED, JALV_PAUSED } JalvPlayState; + +/// "Global" application state +typedef struct JalvImpl Jalv; + +/// Audio/MIDI backend +typedef struct JalvBackendImpl JalvBackend; + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // JALV_TYPES_H |