diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-02-22 14:16:33 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-02-22 14:16:33 +1100 |
| commit | f9aec8b6906599296417af5414b1c72a3cf53e73 (patch) | |
| tree | 088fb6abe8cb1cf1d3a389572c5b6f577fa8e2e2 /src/lua/include/lua_thread.hpp | |
| parent | 4b2003c78a5e4270f384283f72d185cd4a40f30e (diff) | |
| download | tangara-fw-f9aec8b6906599296417af5414b1c72a3cf53e73.tar.gz | |
split the lua thread registry into its own files
Diffstat (limited to 'src/lua/include/lua_thread.hpp')
| -rw-r--r-- | src/lua/include/lua_thread.hpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/lua/include/lua_thread.hpp b/src/lua/include/lua_thread.hpp index c12a0bfc..384de61d 100644 --- a/src/lua/include/lua_thread.hpp +++ b/src/lua/include/lua_thread.hpp @@ -10,9 +10,7 @@ #include <string> #include "lua.hpp" -#include "lvgl.h" -#include "bridge.hpp" #include "service_locator.hpp" namespace lua { @@ -43,36 +41,4 @@ class LuaThread { lua_State* state_; }; -class Registry { - public: - static auto instance(system_fsm::ServiceLocator&) -> Registry&; - - auto uiThread() -> std::shared_ptr<LuaThread>; - auto newThread() -> std::shared_ptr<LuaThread>; - - auto AddPropertyModule( - const std::string&, - std::vector< - std::pair<std::string, std::variant<LuaFunction, Property*>>>) - -> void; - - Registry(const Registry&) = delete; - Registry& operator=(const Registry&) = delete; - - private: - Registry(system_fsm::ServiceLocator&); - - system_fsm::ServiceLocator& services_; - std::unique_ptr<Bridge> bridge_; - - std::shared_ptr<LuaThread> ui_thread_; - std::list<std::weak_ptr<LuaThread>> threads_; - - std::vector< - std::pair<std::string, - std::vector<std::pair<std::string, - std::variant<LuaFunction, Property*>>>>> - modules_; -}; - } // namespace lua |
