Add Lua bindings for UIConfiguration variables
This commit is contained in:
parent
560994c97a
commit
7570b9a594
@ -56,6 +56,7 @@
|
||||
#include "selection.h"
|
||||
#include "script_selector.h"
|
||||
#include "timers.h"
|
||||
#include "ui_config.h"
|
||||
#include "utils_videotl.h"
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
@ -402,6 +403,12 @@ static void mixer_screenshot (const std::string& fn) {
|
||||
Mixer_UI::instance()->screenshot (fn);
|
||||
}
|
||||
|
||||
/** Access libardour global configuration */
|
||||
static UIConfiguration* _ui_config () {
|
||||
return &UIConfiguration::instance();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static PBD::ScopedConnectionList _luaexecs;
|
||||
@ -1068,6 +1075,21 @@ LuaInstance::register_classes (lua_State* L)
|
||||
|
||||
.addCFunction ("actionlist", &lua_actionlist)
|
||||
|
||||
|
||||
.beginClass <UIConfiguration> ("UIConfiguration")
|
||||
#undef UI_CONFIG_VARIABLE
|
||||
#define UI_CONFIG_VARIABLE(Type,var,name,value) \
|
||||
.addFunction ("get_" # var, &UIConfiguration::get_##var) \
|
||||
.addFunction ("set_" # var, &UIConfiguration::set_##var) \
|
||||
.addProperty (#var, &UIConfiguration::get_##var, &UIConfiguration::set_##var)
|
||||
|
||||
#include "ui_config_vars.h"
|
||||
|
||||
#undef UI_CONFIG_VARIABLE
|
||||
.endClass()
|
||||
|
||||
.addFunction ("config", &_ui_config)
|
||||
|
||||
.endNamespace () // end ArdourUI
|
||||
|
||||
.beginNamespace ("os")
|
||||
|
Loading…
Reference in New Issue
Block a user