expose PBD::open_uri bindings to lua
authorRobin Gareus <robin@gareus.org>
Sun, 17 Jul 2016 15:04:02 +0000 (17:04 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 17 Jul 2016 15:04:02 +0000 (17:04 +0200)
libs/ardour/luabindings.cc

index f7ac8ec6331fb4aa855a2f65ddfb8c4e0749a9d6..b38df496fa55b5b0214ee07e5be2e43062460d95 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "timecode/bbt_time.h"
 #include "pbd/stateful_diff_command.h"
+#include "pbd/openuri.h"
 #include "evoral/Control.hpp"
 #include "evoral/ControlList.hpp"
 #include "evoral/Range.hpp"
@@ -245,6 +246,10 @@ LuaBindings::common (lua_State* L)
 {
        luabridge::getGlobalNamespace (L)
                .beginNamespace ("PBD")
+
+               .addFunction ("open_uri", (bool (*) (const std::string&))&PBD::open_uri)
+               .addFunction ("open_uri", &PBD::open_folder)
+
                .beginClass <PBD::ID> ("ID")
                .addConstructor <void (*) (std::string)> ()
                .addFunction ("to_s", &PBD::ID::to_s) // TODO special case LUA __tostring ?