diff options
author | Robin Gareus <robin@gareus.org> | 2017-02-17 18:56:18 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-02-17 18:58:11 +0100 |
commit | 472f14c80350455cd492c867104941e884f74034 (patch) | |
tree | 0c220e93db24a0e972960252f80c8f59acea4b9b /gtk2_ardour/luainstance.h | |
parent | 149634c2cf61a4ecaef4b86b84f8531ce0ce51a0 (diff) |
Allow Lua action scripts to provide a button icon
Diffstat (limited to 'gtk2_ardour/luainstance.h')
-rw-r--r-- | gtk2_ardour/luainstance.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/luainstance.h b/gtk2_ardour/luainstance.h index cad533e753..4d3d0b1973 100644 --- a/gtk2_ardour/luainstance.h +++ b/gtk2_ardour/luainstance.h @@ -3,6 +3,8 @@ #include <bitset> +#include <cairo.h> + #include "pbd/id.h" #include "pbd/signals.h" #include "pbd/xml++.h" @@ -86,6 +88,8 @@ public: static void register_hooks (lua_State* L); static void bind_cairo (lua_State* L); + static void render_action_icon (cairo_t* cr, int w, int h, uint32_t c, void* i); + void set_session (ARDOUR::Session* s); int set_state (const XMLNode&); @@ -96,12 +100,14 @@ public: /* actions */ 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); sigc::signal<void,int,std::string> ActionChanged; /* callbacks */ @@ -125,6 +131,7 @@ private: 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; |