From 830fe4da2f119c15d141f9939a0d9d33b8463b4a Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 8 Oct 2022 18:43:33 +0200 Subject: [PATCH] Add preference enum for plugin GUI unmap behavior --- libs/ardour/ardour/types.h | 6 ++++++ libs/ardour/ardour/types_convert.h | 1 + libs/ardour/enums.cc | 6 ++++++ libs/ardour/luabindings.cc | 6 ++++++ 4 files changed, 19 insertions(+) diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index efd7786005..d1c39516d2 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -677,6 +677,12 @@ struct CleanupReport { size_t space; }; +enum PluginGUIBehavior { + PluginGUIHide, + PluginGUIDestroyAny, + PluginGUIDestroyVST, +}; + /** A struct used to describe changes to processors in a route. * This is useful because objects that respond to a change in processors * can optimise what work they do based on details of what has changed. diff --git a/libs/ardour/ardour/types_convert.h b/libs/ardour/ardour/types_convert.h index dedbd4c7e7..b2d75a1c21 100644 --- a/libs/ardour/ardour/types_convert.h +++ b/libs/ardour/ardour/types_convert.h @@ -79,6 +79,7 @@ DEFINE_ENUM_CONVERT(ARDOUR::RegionEquivalence) DEFINE_ENUM_CONVERT(ARDOUR::WaveformScale) DEFINE_ENUM_CONVERT(ARDOUR::WaveformShape) DEFINE_ENUM_CONVERT(ARDOUR::ScreenSaverMode) +DEFINE_ENUM_CONVERT(ARDOUR::PluginGUIBehavior) DEFINE_ENUM_CONVERT(ARDOUR::VUMeterStandard) DEFINE_ENUM_CONVERT(ARDOUR::MeterLineUp) DEFINE_ENUM_CONVERT(ARDOUR::InputMeterLayout) diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 11be5def6d..853cfe8608 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -143,6 +143,7 @@ setup_enum_writer () WaveformScale _WaveformScale; WaveformShape _WaveformShape; ScreenSaverMode _ScreenSaverMode; + PluginGUIBehavior _PluginGUIBehavior; Session::PostTransportWork _Session_PostTransportWork; MTC_Status _MIDI_MTC_Status; BufferingPreset _BufferingPreset; @@ -750,6 +751,11 @@ setup_enum_writer () REGISTER_ENUM(InhibitAlways); REGISTER(_ScreenSaverMode); + REGISTER_ENUM(PluginGUIHide); + REGISTER_ENUM(PluginGUIDestroyAny); + REGISTER_ENUM(PluginGUIDestroyVST); + REGISTER(_PluginGUIBehavior); + REGISTER_ENUM (Small); REGISTER_ENUM (Medium); REGISTER_ENUM (Large); diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index a4143c5776..e432cd4e0a 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -2549,6 +2549,12 @@ LuaBindings::common (lua_State* L) .addConst ("InhibitAlways", ARDOUR::ScreenSaverMode(InhibitAlways)) .endNamespace () + .beginNamespace ("PluginGUIBehavior") + .addConst ("PluginGUIHide", ARDOUR::PluginGUIBehavior(PluginGUIHide)) + .addConst ("PluginGUIDestroyAny", ARDOUR::PluginGUIBehavior(PluginGUIDestroyAny)) + .addConst ("PluginGUIDestroyVST", ARDOUR::PluginGUIBehavior(PluginGUIDestroyVST)) + .endNamespace () + .beginNamespace ("ClockDeltaMode") .addConst ("NoDelta", ARDOUR::ClockDeltaMode(NoDelta)) .addConst ("DeltaEditPoint", ARDOUR::ClockDeltaMode(DeltaEditPoint))