Skip to content

Commit

Permalink
zigapi: add setInt and setFloat
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjulek committed Oct 5, 2024
1 parent 93239bd commit 8ec6f79
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/zigapi.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8ec6f79

Please sign in to comment.