mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Add RCConfiguration Lua Bindings
This commit is contained in:
parent
9f87805d95
commit
11aa1d60ae
1 changed files with 29 additions and 0 deletions
|
|
@ -193,6 +193,7 @@ CLASSKEYS(ARDOUR::Plugin::PresetRecord);
|
||||||
CLASSKEYS(ARDOUR::PortEngine);
|
CLASSKEYS(ARDOUR::PortEngine);
|
||||||
CLASSKEYS(ARDOUR::PortManager);
|
CLASSKEYS(ARDOUR::PortManager);
|
||||||
CLASSKEYS(ARDOUR::PresentationInfo);
|
CLASSKEYS(ARDOUR::PresentationInfo);
|
||||||
|
CLASSKEYS(ARDOUR::RCConfiguration);
|
||||||
CLASSKEYS(ARDOUR::Session);
|
CLASSKEYS(ARDOUR::Session);
|
||||||
CLASSKEYS(ARDOUR::SessionConfiguration);
|
CLASSKEYS(ARDOUR::SessionConfiguration);
|
||||||
CLASSKEYS(ARDOUR::Source);
|
CLASSKEYS(ARDOUR::Source);
|
||||||
|
|
@ -310,6 +311,11 @@ CLASSKEYS(LuaDialog::Dialog);
|
||||||
|
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
|
/** Access libardour global configuration */
|
||||||
|
static RCConfiguration* _libardour_config () {
|
||||||
|
return ARDOUR::Config;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
LuaBindings::stddef (lua_State* L)
|
LuaBindings::stddef (lua_State* L)
|
||||||
{
|
{
|
||||||
|
|
@ -1920,6 +1926,25 @@ LuaBindings::common (lua_State* L)
|
||||||
.addFunction ("vcas", &VCAManager::vcas)
|
.addFunction ("vcas", &VCAManager::vcas)
|
||||||
.endClass()
|
.endClass()
|
||||||
|
|
||||||
|
.deriveClass <RCConfiguration, PBD::Configuration> ("RCConfiguration")
|
||||||
|
#undef CONFIG_VARIABLE
|
||||||
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
|
#define CONFIG_VARIABLE(Type,var,name,value) \
|
||||||
|
.addFunction ("get_" # var, &RCConfiguration::get_##var) \
|
||||||
|
.addFunction ("set_" # var, &RCConfiguration::set_##var) \
|
||||||
|
.addProperty (#var, &RCConfiguration::get_##var, &RCConfiguration::set_##var)
|
||||||
|
|
||||||
|
#define CONFIG_VARIABLE_SPECIAL(Type,var,name,value,mutator) \
|
||||||
|
.addFunction ("get_" # var, &RCConfiguration::get_##var) \
|
||||||
|
.addFunction ("set_" # var, &RCConfiguration::set_##var) \
|
||||||
|
.addProperty (#var, &RCConfiguration::get_##var, &RCConfiguration::set_##var)
|
||||||
|
|
||||||
|
#include "ardour/rc_configuration_vars.h"
|
||||||
|
|
||||||
|
#undef CONFIG_VARIABLE
|
||||||
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
|
.endClass()
|
||||||
|
|
||||||
.deriveClass <SessionConfiguration, PBD::Configuration> ("SessionConfiguration")
|
.deriveClass <SessionConfiguration, PBD::Configuration> ("SessionConfiguration")
|
||||||
#undef CONFIG_VARIABLE
|
#undef CONFIG_VARIABLE
|
||||||
#undef CONFIG_VARIABLE_SPECIAL
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
|
|
@ -1938,6 +1963,10 @@ LuaBindings::common (lua_State* L)
|
||||||
#undef CONFIG_VARIABLE
|
#undef CONFIG_VARIABLE
|
||||||
#undef CONFIG_VARIABLE_SPECIAL
|
#undef CONFIG_VARIABLE_SPECIAL
|
||||||
.endClass()
|
.endClass()
|
||||||
|
|
||||||
|
// we could use addProperty ()
|
||||||
|
.addFunction ("config", &_libardour_config)
|
||||||
|
|
||||||
.endNamespace ();
|
.endNamespace ();
|
||||||
|
|
||||||
// basic representation of Session
|
// basic representation of Session
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue