mod(structure): update project structure

Remove examples, add description for design goals in README.md and
apply re-names and naming changes accordingly for the project structure.
Implement a flat hierachry, as the library shall remain pretty simple.
This commit is contained in:
2025-01-30 23:02:34 +01:00
parent 3decc541a9
commit bdbe05c996
41 changed files with 204 additions and 3474 deletions

20
src/cell.zig Normal file
View File

@@ -0,0 +1,20 @@
const std = @import("std");
const Style = @import("Style.zig");
pub const Cell = @This();
style: Style = .{},
rune: u8 = ' ',
pub fn eql(this: Cell, other: Cell) bool {
return this.rune == other.rune and this.style.eql(other.style);
}
pub fn reset(this: *Cell) void {
this.style = .{ .fg = .default, .bg = .default, .ul = .default, .ul_style = .off };
this.rune = ' ';
}
pub fn value(this: Cell, writer: anytype) !void {
try this.style.value(writer, this.rune);
}