mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-13 20:09:59 +02:00
Implement the plugin side of the GUI functions
This commit is contained in:
@@ -56,6 +56,18 @@ using ClapMainThreadControlRequest =
|
||||
clap::plugin::Deactivate,
|
||||
clap::ext::audio_ports::plugin::Count,
|
||||
clap::ext::audio_ports::plugin::Get,
|
||||
clap::ext::gui::plugin::IsApiSupported,
|
||||
clap::ext::gui::plugin::Create,
|
||||
clap::ext::gui::plugin::Destroy,
|
||||
clap::ext::gui::plugin::SetScale,
|
||||
clap::ext::gui::plugin::GetSize,
|
||||
clap::ext::gui::plugin::CanResize,
|
||||
clap::ext::gui::plugin::GetResizeHints,
|
||||
clap::ext::gui::plugin::AdjustSize,
|
||||
clap::ext::gui::plugin::SetSize,
|
||||
clap::ext::gui::plugin::SetParent,
|
||||
clap::ext::gui::plugin::Show,
|
||||
clap::ext::gui::plugin::Hide,
|
||||
clap::ext::latency::plugin::Get,
|
||||
clap::ext::note_ports::plugin::Count,
|
||||
clap::ext::note_ports::plugin::Get,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "plugin.h"
|
||||
|
||||
#include <clap/ext/audio-ports.h>
|
||||
#include <clap/ext/gui.h>
|
||||
#include <clap/ext/latency.h>
|
||||
#include <clap/ext/note-ports.h>
|
||||
#include <clap/ext/params.h>
|
||||
@@ -81,9 +82,10 @@ const clap_plugin_descriptor_t* Descriptor::get() const {
|
||||
return &clap_descriptor;
|
||||
}
|
||||
|
||||
std::array<std::pair<bool, const char*>, 6> SupportedPluginExtensions::list()
|
||||
std::array<std::pair<bool, const char*>, 7> SupportedPluginExtensions::list()
|
||||
const noexcept {
|
||||
return {std::pair(supports_audio_ports, CLAP_EXT_AUDIO_PORTS),
|
||||
std::pair(supports_gui, CLAP_EXT_GUI),
|
||||
std::pair(supports_latency, CLAP_EXT_LATENCY),
|
||||
std::pair(supports_note_ports, CLAP_EXT_NOTE_PORTS),
|
||||
std::pair(supports_params, CLAP_EXT_PARAMS),
|
||||
|
||||
@@ -115,6 +115,7 @@ struct Descriptor {
|
||||
struct SupportedPluginExtensions {
|
||||
// Don't forget to add new extensions to below method
|
||||
bool supports_audio_ports = false;
|
||||
bool supports_gui = false;
|
||||
bool supports_latency = false;
|
||||
bool supports_note_ports = false;
|
||||
bool supports_params = false;
|
||||
@@ -125,11 +126,12 @@ struct SupportedPluginExtensions {
|
||||
* Get a list of `<bool, extension_name>` tuples for the supported
|
||||
* extensions. Used during logging.
|
||||
*/
|
||||
std::array<std::pair<bool, const char*>, 6> list() const noexcept;
|
||||
std::array<std::pair<bool, const char*>, 7> list() const noexcept;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value1b(supports_audio_ports);
|
||||
s.value1b(supports_gui);
|
||||
s.value1b(supports_latency);
|
||||
s.value1b(supports_note_ports);
|
||||
s.value1b(supports_params);
|
||||
|
||||
Reference in New Issue
Block a user