mod: change interface for rendering of Layouts and Widgets to use a non-const pointer to the renderer instead
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 38s

This commit is contained in:
2024-11-11 13:47:01 +01:00
parent 8b3f863404
commit d2d655c829
10 changed files with 23 additions and 19 deletions

View File

@@ -44,7 +44,11 @@ pub fn Buffered(comptime _: bool) type {
pub fn Direct(comptime _: bool) type {
return struct {
pub fn clear(this: @This(), size: Size) !void {
pub fn resize(this: *@This(), size: Size) void {
_ = this;
_ = size;
}
pub fn clear(this: *@This(), size: Size) !void {
_ = this;
const anchor = size.anchor;
// NOTE: clear entire screen for the first content (derived from the anchor being at the very left-top)
@@ -53,7 +57,7 @@ pub fn Direct(comptime _: bool) type {
}
}
pub fn render(this: @This(), size: Size, contents: []u8) !void {
pub fn render(this: *@This(), size: Size, contents: []u8) !void {
_ = this;
try terminal.setCursorPosition(size.anchor);
var row: u16 = 0;