From 7a7522a335d70c0d0035b7d713a6b3fda9ee2ec0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 30 May 2022 17:29:34 -0400 Subject: Separate ui.h from jalv_internal.h --- src/jalv.c | 1 + src/jalv_console.c | 1 + src/jalv_gtk.c | 1 + src/jalv_internal.h | 21 --------------------- src/jalv_qt.cpp | 1 + src/ui.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 48 insertions(+), 21 deletions(-) create mode 100644 src/ui.h diff --git a/src/jalv.c b/src/jalv.c index 43b7451..024a201 100644 --- a/src/jalv.c +++ b/src/jalv.c @@ -11,6 +11,7 @@ #include "log.h" #include "lv2_evbuf.h" #include "state.h" +#include "ui.h" #include "worker.h" #include "lilv/lilv.h" diff --git a/src/jalv_console.c b/src/jalv_console.c index e39d2cc..5f6a36b 100644 --- a/src/jalv_console.c +++ b/src/jalv_console.c @@ -10,6 +10,7 @@ #include "jalv_internal.h" #include "log.h" #include "state.h" +#include "ui.h" #include "lilv/lilv.h" #include "lv2/ui/ui.h" diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c index 6e10811..5f36aaf 100644 --- a/src/jalv_gtk.c +++ b/src/jalv_gtk.c @@ -3,6 +3,7 @@ #include "jalv_internal.h" #include "state.h" +#include "ui.h" #include "lilv/lilv.h" #include "lv2/atom/atom.h" diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 6b242a6..adaa86e 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -322,9 +322,6 @@ struct Jalv { int jalv_open(Jalv* jalv, int* argc, char*** argv); -int -jalv_init(int* argc, char*** argv, JalvOptions* opts); - int jalv_close(Jalv* jalv); @@ -349,24 +346,6 @@ jalv_set_control(const ControlID* control, LV2_URID type, const void* body); -const char* -jalv_native_ui_type(void); - -bool -jalv_discover_ui(Jalv* jalv); - -float -jalv_ui_refresh_rate(Jalv* jalv); - -float -jalv_ui_scale_factor(Jalv* jalv); - -int -jalv_open_ui(Jalv* jalv); - -LilvNode* -jalv_select_plugin(Jalv* jalv); - void jalv_init_ui(Jalv* jalv); diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp index 5920b2c..d9bfc57 100644 --- a/src/jalv_qt.cpp +++ b/src/jalv_qt.cpp @@ -3,6 +3,7 @@ #include "jalv_qt.hpp" #include "jalv_internal.h" +#include "ui.h" #include "lilv/lilv.h" #include "suil/suil.h" diff --git a/src/ui.h b/src/ui.h new file mode 100644 index 0000000..7eddafa --- /dev/null +++ b/src/ui.h @@ -0,0 +1,44 @@ +// Copyright 2007-2022 David Robillard +// SPDX-License-Identifier: ISC + +#ifndef JALV_UI_H +#define JALV_UI_H + +#include "jalv_internal.h" + +#include "lilv/lilv.h" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// Interface that must be implemented by UIs + +int +jalv_init(int* argc, char*** argv, JalvOptions* opts); + +const char* +jalv_native_ui_type(void); + +bool +jalv_discover_ui(Jalv* jalv); + +float +jalv_ui_refresh_rate(Jalv* jalv); + +float +jalv_ui_scale_factor(Jalv* jalv); + +int +jalv_open_ui(Jalv* jalv); + +LilvNode* +jalv_select_plugin(Jalv* jalv); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // JALV_UI_H -- cgit v1.2.1