diff options
Diffstat (limited to 'src/LuaRuntime.hpp')
| -rw-r--r-- | src/LuaRuntime.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/LuaRuntime.hpp b/src/LuaRuntime.hpp index dd5c0ec..6c45ca5 100644 --- a/src/LuaRuntime.hpp +++ b/src/LuaRuntime.hpp @@ -1,6 +1,7 @@ #pragma once #include <QtCore> +#include <functional> #include <lua.hpp> #include "AsyncEventLoop.hpp" @@ -18,17 +19,21 @@ public: void evaluate(QString code); QVariant evaluateSync(QString code); + void loadFile(QString code); + void stopEventLoop(); void startEventLoop(); QVariant getValue(int idx); DELEGATE(eventLoop, queueTask, queueTask) + DEFINE_GETTER(getState, state) signals: void urlOpened(QString url, OpenType openType); void evaluationCompleted(QVariant value); void evaluationFailed(QString value); + void keymapAddRequested(QString mode, QString keyseq, std::function<void()>); // void outputProduced(QVariant value); protected: @@ -36,6 +41,7 @@ protected: ~LuaRuntime(); static int lua_onUrlOpen(lua_State *state); static int lua_onUrlTabOpen(lua_State *state); + static int lua_addKeymap(lua_State *state); private: lua_State *state; |
