diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-03-20 22:10:57 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-03-20 22:10:57 +0530 |
| commit | fdeb33d34a97d062a120f72da919f81d7b1d45bf (patch) | |
| tree | 91165d5e3e718d4008bf73259f45d1705965f4b0 | |
| parent | 9e3474b5d8ee4afdd9c03cfb4a151ffebfca36b7 (diff) | |
| download | null-browser-fdeb33d34a97d062a120f72da919f81d7b1d45bf.tar.gz null-browser-fdeb33d34a97d062a120f72da919f81d7b1d45bf.zip | |
Move header files to src
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 6 | ||||
| -rw-r--r-- | flake.nix | 7 | ||||
| -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.cpp | 20 | ||||
| -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 |
13 files changed, 15 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c4edca2..7854e82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,13 +14,13 @@ find_package(PkgConfig REQUIRED) # Source file(GLOB_RECURSE SOURCE_FILES src/*.cpp) list(FILTER SOURCE_FILES EXCLUDE REGEX "src/main.cpp$") -file(GLOB_RECURSE HEADER_FILES include/*.hpp) +file(GLOB_RECURSE HEADER_FILES src/*.hpp) file(GLOB_RECURSE SPEC_FILES spec/*.cpp) # project add_executable(${PROJECT}) target_sources(${PROJECT} PRIVATE src/main.cpp ${SOURCE_FILES}) -target_include_directories(${PROJECT} PRIVATE include/) +target_include_directories(${PROJECT} PRIVATE src/) # Qt find_package(Qt6 REQUIRED COMPONENTS Core Widgets WebEngineWidgets Test) @@ -53,7 +53,7 @@ enable_testing() add_executable(tests) target_sources(tests PRIVATE ${SOURCE_FILES} ${MOC_SRCS} ${SPEC_FILES}) target_include_directories(tests PRIVATE - include/ + src/ spec/ ${LuaJIT_INCLUDE_DIRS} ${LibUV_INCLUDE_DIRS} @@ -16,11 +16,10 @@ dependencies = with pkgs; [ qt6.full - qt6.qtbase luajit libuv luajitPackages.libluv - luajitPackages.luv + # luajitPackages.luv # libcef # nss ]; @@ -30,7 +29,9 @@ version = "0.0.0"; src = ./.; - buildInputs = dependencies; + buildInputs = with pkgs; [ + qt6.qtbase + ] ++ dependencies; nativeBuildInputs = with pkgs; [ cmake qt6.wrapQtAppsHook pkg-config ]; }; 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 |
