summaryrefslogtreecommitdiff
path: root/src/ui/include
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-04-18 10:06:45 +1000
committerjacqueline <me@jacqueline.id.au>2024-04-18 10:06:45 +1000
commitcc255f6d779b0478ae3eb795c2cae5ec864d8ef0 (patch)
tree036218815269099cc3c5cada4a8812e22b70e7c2 /src/ui/include
parent874218e3ff0ffd244936b3d56f1645efc3f9519f (diff)
downloadtangara-fw-cc255f6d779b0478ae3eb795c2cae5ec864d8ef0.tar.gz
Suspend property bindings when their screens aren't visible
Diffstat (limited to 'src/ui/include')
-rw-r--r--src/ui/include/screen_lua.hpp6
1 files changed, 6 insertions, 0 deletions
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<void(lua::Binding*)> fn) -> void;
+
lua_State* s_;
std::optional<int> obj_ref_;
};