From cc255f6d779b0478ae3eb795c2cae5ec864d8ef0 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 18 Apr 2024 10:06:45 +1000 Subject: Suspend property bindings when their screens aren't visible --- src/ui/include/screen_lua.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ui/include/screen_lua.hpp') diff --git a/src/ui/include/screen_lua.hpp b/src/ui/include/screen_lua.hpp index 41d97a1e..8a463bad 100644 --- a/src/ui/include/screen_lua.hpp +++ b/src/ui/include/screen_lua.hpp @@ -8,6 +8,7 @@ #include "lua.hpp" +#include "property.hpp" #include "screen.hpp" namespace ui { @@ -26,6 +27,11 @@ class Lua : public Screen { auto SetObjRef(lua_State*) -> void; private: + /* Invokes a method on this screen's Lua counterpart. */ + auto callMethod(std::string name) -> void; + /* Applies fn to each binding in this screen's `bindings` field. */ + auto forEachBinding(std::function fn) -> void; + lua_State* s_; std::optional obj_ref_; }; -- cgit v1.2.3