Ardour  9.0-pre0-582-g084a23a80d
LuaInstance Class Reference

#include <luainstance.h>

Inheritance diagram for LuaInstance:
[legend]

Public Member Functions

 ~LuaInstance ()
 
void set_session (ARDOUR::Session *s)
 
int set_state (const XMLNode &)
 
XMLNodeget_action_state (void)
 
XMLNodeget_hook_state (void)
 
int load_state ()
 
int save_state ()
 
bool interactive_add (Gtk::Window &, ARDOUR::LuaScriptInfo::ScriptType, int)
 
void call_action (const int)
 
void render_icon (int i, cairo_t *, int, int, uint32_t)
 
bool set_lua_action (const int, const std::string &, const std::string &, const ARDOUR::LuaScriptParamList &)
 
bool remove_lua_action (const int)
 
bool lua_action_name (const int, std::string &)
 
std::vector< std::string > lua_action_names ()
 
bool lua_action (const int, std::string &, std::string &, ARDOUR::LuaScriptParamList &)
 
bool lua_action_has_icon (const int)
 
bool register_lua_slot (const std::string &, const std::string &, const ARDOUR::LuaScriptParamList &)
 
bool unregister_lua_slot (const PBD::ID &)
 
std::vector< PBD::IDlua_slots () const
 
bool lua_slot_name (const PBD::ID &, std::string &) const
 
std::vector< std::string > lua_slot_names () const
 
bool lua_slot (const PBD::ID &, std::string &, std::string &, ActionHook &, ARDOUR::LuaScriptParamList &)
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 
- Public Member Functions inherited from ARDOUR::SessionHandlePtr
 SessionHandlePtr (ARDOUR::Session *s)
 
 SessionHandlePtr ()
 
virtual ~SessionHandlePtr ()
 
virtual ARDOUR::Sessionsession () const
 

Static Public Member Functions

static LuaInstanceinstance ()
 
static void destroy_instance ()
 
static void register_classes (lua_State *L, bool sandbox)
 
static void register_hooks (lua_State *L)
 
static void bind_cairo (lua_State *L)
 
static void bind_dialog (lua_State *L)
 
static void render_action_icon (cairo_t *cr, int w, int h, uint32_t c, void *i)
 

Public Attributes

sigc::signal< void, int, std::string > ActionChanged
 
sigc::signal< void, PBD::ID, std::string, ActionHookSlotChanged
 

Static Public Attributes

static PBD::Signal< void()> LuaTimerS
 
static PBD::Signal< void()> LuaTimerDS
 
static PBD::Signal< void()> SetSession
 
static PBD::Signal< void()> SelectionChanged
 

Private Member Functions

 LuaInstance ()
 
void init ()
 
void set_dirty ()
 
void session_going_away ()
 
void pre_seed_scripts ()
 
void pre_seed_script (std::string const &, int &)
 
void selection_changed ()
 
void every_second ()
 
void every_point_one_seconds ()
 

Private Attributes

LuaState lua
 
luabridge::LuaRef * _lua_call_action
 
luabridge::LuaRef * _lua_render_icon
 
luabridge::LuaRef * _lua_add_action
 
luabridge::LuaRef * _lua_del_action
 
luabridge::LuaRef * _lua_get_action
 
luabridge::LuaRef * _lua_load
 
luabridge::LuaRef * _lua_save
 
luabridge::LuaRef * _lua_clear
 
LuaCallbackMap _callbacks
 
PBD::ScopedConnectionList _slotcon
 
sigc::connection second_connection
 
sigc::connection point_one_second_connection
 

Static Private Attributes

static LuaInstance_instance
 

Additional Inherited Members

- Protected Attributes inherited from ARDOUR::SessionHandlePtr
ARDOUR::Session_session
 
PBD::ScopedConnectionList _session_connections
 

Detailed Description

Definition at line 95 of file luainstance.h.

Constructor & Destructor Documentation

◆ ~LuaInstance()

LuaInstance::~LuaInstance ( )

◆ LuaInstance()

LuaInstance::LuaInstance ( )
private

Member Function Documentation

◆ bind_cairo()

static void LuaInstance::bind_cairo ( lua_State L)
static

◆ bind_dialog()

static void LuaInstance::bind_dialog ( lua_State L)
static

◆ call_action()

void LuaInstance::call_action ( const int  )

◆ destroy_instance()

static void LuaInstance::destroy_instance ( )
static

◆ every_point_one_seconds()

void LuaInstance::every_point_one_seconds ( )
private

◆ every_second()

void LuaInstance::every_second ( )
private

◆ get_action_state()

XMLNode& LuaInstance::get_action_state ( void  )

◆ get_hook_state()

XMLNode& LuaInstance::get_hook_state ( void  )

◆ init()

void LuaInstance::init ( )
private

◆ instance()

static LuaInstance* LuaInstance::instance ( )
static

◆ interactive_add()

bool LuaInstance::interactive_add ( Gtk::Window ,
ARDOUR::LuaScriptInfo::ScriptType  ,
int   
)

◆ load_state()

int LuaInstance::load_state ( )

◆ lua_action()

bool LuaInstance::lua_action ( const int  ,
std::string &  ,
std::string &  ,
ARDOUR::LuaScriptParamList  
)

◆ lua_action_has_icon()

bool LuaInstance::lua_action_has_icon ( const int  )

◆ lua_action_name()

bool LuaInstance::lua_action_name ( const int  ,
std::string &   
)

◆ lua_action_names()

std::vector<std::string> LuaInstance::lua_action_names ( )

◆ lua_slot()

bool LuaInstance::lua_slot ( const PBD::ID ,
std::string &  ,
std::string &  ,
ActionHook ,
ARDOUR::LuaScriptParamList  
)

◆ lua_slot_name()

bool LuaInstance::lua_slot_name ( const PBD::ID ,
std::string &   
) const

◆ lua_slot_names()

std::vector<std::string> LuaInstance::lua_slot_names ( ) const

◆ lua_slots()

std::vector<PBD::ID> LuaInstance::lua_slots ( ) const

◆ pre_seed_script()

void LuaInstance::pre_seed_script ( std::string const &  ,
int &   
)
private

◆ pre_seed_scripts()

void LuaInstance::pre_seed_scripts ( )
private

◆ register_classes()

static void LuaInstance::register_classes ( lua_State L,
bool  sandbox 
)
static

◆ register_hooks()

static void LuaInstance::register_hooks ( lua_State L)
static

◆ register_lua_slot()

bool LuaInstance::register_lua_slot ( const std::string &  ,
const std::string &  ,
const ARDOUR::LuaScriptParamList  
)

◆ remove_lua_action()

bool LuaInstance::remove_lua_action ( const int  )

◆ render_action_icon()

static void LuaInstance::render_action_icon ( cairo_t *  cr,
int  w,
int  h,
uint32_t  c,
void *  i 
)
static

◆ render_icon()

void LuaInstance::render_icon ( int  i,
cairo_t *  ,
int  ,
int  ,
uint32_t   
)

◆ save_state()

int LuaInstance::save_state ( )

◆ selection_changed()

void LuaInstance::selection_changed ( )
private

◆ session_going_away()

void LuaInstance::session_going_away ( )
privatevirtual

Reimplemented from ARDOUR::SessionHandlePtr.

◆ set_dirty()

void LuaInstance::set_dirty ( )
private

◆ set_lua_action()

bool LuaInstance::set_lua_action ( const int  ,
const std::string &  ,
const std::string &  ,
const ARDOUR::LuaScriptParamList  
)

◆ set_session()

void LuaInstance::set_session ( ARDOUR::Session s)
virtual

Reimplemented from ARDOUR::SessionHandlePtr.

◆ set_state()

int LuaInstance::set_state ( const XMLNode )

◆ unregister_lua_slot()

bool LuaInstance::unregister_lua_slot ( const PBD::ID )

Member Data Documentation

◆ _callbacks

LuaCallbackMap LuaInstance::_callbacks
private

Definition at line 168 of file luainstance.h.

◆ _instance

LuaInstance* LuaInstance::_instance
staticprivate

Definition at line 148 of file luainstance.h.

◆ _lua_add_action

luabridge::LuaRef* LuaInstance::_lua_add_action
private

Definition at line 160 of file luainstance.h.

◆ _lua_call_action

luabridge::LuaRef* LuaInstance::_lua_call_action
private

Definition at line 158 of file luainstance.h.

◆ _lua_clear

luabridge::LuaRef* LuaInstance::_lua_clear
private

Definition at line 166 of file luainstance.h.

◆ _lua_del_action

luabridge::LuaRef* LuaInstance::_lua_del_action
private

Definition at line 161 of file luainstance.h.

◆ _lua_get_action

luabridge::LuaRef* LuaInstance::_lua_get_action
private

Definition at line 162 of file luainstance.h.

◆ _lua_load

luabridge::LuaRef* LuaInstance::_lua_load
private

Definition at line 164 of file luainstance.h.

◆ _lua_render_icon

luabridge::LuaRef* LuaInstance::_lua_render_icon
private

Definition at line 159 of file luainstance.h.

◆ _lua_save

luabridge::LuaRef* LuaInstance::_lua_save
private

Definition at line 165 of file luainstance.h.

◆ _slotcon

PBD::ScopedConnectionList LuaInstance::_slotcon
private

Definition at line 169 of file luainstance.h.

◆ ActionChanged

sigc::signal<void,int,std::string> LuaInstance::ActionChanged

Definition at line 130 of file luainstance.h.

◆ lua

LuaState LuaInstance::lua
private

Definition at line 156 of file luainstance.h.

◆ LuaTimerDS

PBD::Signal<void()> LuaInstance::LuaTimerDS
static

Definition at line 142 of file luainstance.h.

◆ LuaTimerS

PBD::Signal<void()> LuaInstance::LuaTimerS
static

Definition at line 141 of file luainstance.h.

◆ point_one_second_connection

sigc::connection LuaInstance::point_one_second_connection
private

Definition at line 177 of file luainstance.h.

◆ second_connection

sigc::connection LuaInstance::second_connection
private

Definition at line 174 of file luainstance.h.

◆ SelectionChanged

PBD::Signal<void()> LuaInstance::SelectionChanged
static

Definition at line 144 of file luainstance.h.

◆ SetSession

PBD::Signal<void()> LuaInstance::SetSession
static

Definition at line 143 of file luainstance.h.

◆ SlotChanged

sigc::signal<void,PBD::ID,std::string,ActionHook> LuaInstance::SlotChanged

Definition at line 139 of file luainstance.h.


The documentation for this class was generated from the following file: