From 7ec8336431787156826185628ad3ee05dc327d2a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 21 Mar 2025 19:00:45 +0530 Subject: Add event loop with uv --- src/LuaRuntime.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/LuaRuntime.hpp') diff --git a/src/LuaRuntime.hpp b/src/LuaRuntime.hpp index 5bfc82c..443dec5 100644 --- a/src/LuaRuntime.hpp +++ b/src/LuaRuntime.hpp @@ -1,7 +1,9 @@ #pragma once + #include #include +#include "AsyncEventLoop.hpp" #include "widgets/WebViewStack.hpp" class LuaRuntime : public QObject { @@ -15,6 +17,11 @@ public: void evaluate(QString code); + void stopEventLoop(); + void startEventLoop(); + + DELEGATE(eventLoop, queueTask, queueTask) + signals: void urlOpened(QString url, OpenType openType); @@ -26,4 +33,5 @@ protected: private: lua_State *state; + AsyncEventLoop *eventLoop = nullptr; }; -- cgit v1.3.1