aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/CommandParser.hpp (renamed from include/CommandParser.hpp)0
-rw-r--r--src/Configuration.hpp (renamed from include/Configuration.hpp)0
-rw-r--r--src/InputMediator.hpp (renamed from include/InputMediator.hpp)0
-rw-r--r--src/LuaRuntime.cpp20
-rw-r--r--src/LuaRuntime.hpp (renamed from include/LuaRuntime.hpp)0
-rw-r--r--src/keymap/KeySeqParser.hpp (renamed from include/keymap/KeySeqParser.hpp)0
-rw-r--r--src/keymap/KeymapEvaluator.hpp (renamed from include/keymap/KeymapEvaluator.hpp)0
-rw-r--r--src/utils.hpp (renamed from include/utils.hpp)0
-rw-r--r--src/widgets/MainWindow.hpp (renamed from include/widgets/MainWindow.hpp)0
-rw-r--r--src/widgets/WebView.hpp (renamed from include/widgets/WebView.hpp)0
-rw-r--r--src/widgets/WebViewStack.hpp (renamed from include/widgets/WebViewStack.hpp)0
11 files changed, 8 insertions, 12 deletions
diff --git a/include/CommandParser.hpp b/src/CommandParser.hpp
index 9197df5..9197df5 100644
--- a/include/CommandParser.hpp
+++ b/src/CommandParser.hpp
diff --git a/include/Configuration.hpp b/src/Configuration.hpp
index cc68803..cc68803 100644
--- a/include/Configuration.hpp
+++ b/src/Configuration.hpp
diff --git a/include/InputMediator.hpp b/src/InputMediator.hpp
index 7194ff9..7194ff9 100644
--- a/include/InputMediator.hpp
+++ b/src/InputMediator.hpp
diff --git a/src/LuaRuntime.cpp b/src/LuaRuntime.cpp
index e66c591..d89f7dc 100644
--- a/src/LuaRuntime.cpp
+++ b/src/LuaRuntime.cpp
@@ -1,24 +1,20 @@
+#include <QtCore>
#include <lua.hpp>
-
-#include "LuaRuntime.hpp"
-
extern "C" {
#include <luv.h>
-// Forward declare luv registration function
-// LUALIB_API int luaopen_luv(lua_State *L);
}
+#include "LuaRuntime.hpp"
+
LuaRuntime::LuaRuntime() {
state = luaL_newstate();
luaL_openlibs(state);
- luaopen_luv(state);
- if (luaL_dostring(state, "_G.uv = require'luv'")) {
- qDebug() << "Unable to load luv: " << lua_tostring(state, -1);
- } else {
- qDebug() << "succ";
- }
+ // Load `uv` (luv)
+ luaopen_luv(state);
+ lua_setglobal(state, "uv");
+ // Load `web`
luaL_Reg weblib[] = {
{"open", &LuaRuntime::lua_onUrlOpen},
{"tabopen", &LuaRuntime::lua_onUrlTabOpen},
@@ -43,7 +39,7 @@ LuaRuntime::LuaRuntime() {
// auto pp = R"(
// print('Hello -- ');
// local t = uv.new_timer();
- // uv.timer_start(t, 7000, 0, function()
+ // uv.timer_start(t, 4000, 0, function()
// print('after time')
// end);
// uv.run();
diff --git a/include/LuaRuntime.hpp b/src/LuaRuntime.hpp
index 5bfc82c..5bfc82c 100644
--- a/include/LuaRuntime.hpp
+++ b/src/LuaRuntime.hpp
diff --git a/include/keymap/KeySeqParser.hpp b/src/keymap/KeySeqParser.hpp
index fac2546..fac2546 100644
--- a/include/keymap/KeySeqParser.hpp
+++ b/src/keymap/KeySeqParser.hpp
diff --git a/include/keymap/KeymapEvaluator.hpp b/src/keymap/KeymapEvaluator.hpp
index db93900..db93900 100644
--- a/include/keymap/KeymapEvaluator.hpp
+++ b/src/keymap/KeymapEvaluator.hpp
diff --git a/include/utils.hpp b/src/utils.hpp
index 0650ac2..0650ac2 100644
--- a/include/utils.hpp
+++ b/src/utils.hpp
diff --git a/include/widgets/MainWindow.hpp b/src/widgets/MainWindow.hpp
index 2bbc42e..2bbc42e 100644
--- a/include/widgets/MainWindow.hpp
+++ b/src/widgets/MainWindow.hpp
diff --git a/include/widgets/WebView.hpp b/src/widgets/WebView.hpp
index 8a95139..8a95139 100644
--- a/include/widgets/WebView.hpp
+++ b/src/widgets/WebView.hpp
diff --git a/include/widgets/WebViewStack.hpp b/src/widgets/WebViewStack.hpp
index e5b7ecc..e5b7ecc 100644
--- a/include/widgets/WebViewStack.hpp
+++ b/src/widgets/WebViewStack.hpp