From 8ec6f7927f57054105a1cda885ca8dfad2ed1101 Mon Sep 17 00:00:00 2001 From: Dione Julek Date: Sat, 5 Oct 2024 14:57:51 -0300 Subject: [PATCH] zigapi: add setInt and setFloat --- src/zigapi.zig | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/zigapi.zig b/src/zigapi.zig index a963e17..fecdfdd 100644 --- a/src/zigapi.zig +++ b/src/zigapi.zig @@ -75,6 +75,14 @@ pub const Frame = struct { }; } + pub fn setInt(self: Self, key: [*]const u8, n: i64) void { + _ = self.vsapi.?.mapSetInt.?(self.getPropertiesRW(), key, n, .Replace); + } + + pub fn setFloat(self: Self, key: [*]const u8, n: f64) void { + _ = self.vsapi.?.mapSetFloat.?(self.getPropertiesRW(), key, n, .Replace); + } + pub fn getPropertiesRO(self: Self) ?*const vs.Map { return self.vsapi.?.getFramePropertiesRO.?(self.frame); }