2024-01-19 04:02:17 +01:00
|
|
|
pub const Cell = struct {
|
|
|
|
char: Character,
|
|
|
|
style: Style = .{},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const Character = struct {
|
|
|
|
grapheme: []const u8,
|
|
|
|
width: usize,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const Style = struct {
|
2024-01-19 06:17:57 +01:00
|
|
|
pub const Underline = enum {
|
|
|
|
off,
|
|
|
|
single,
|
|
|
|
double,
|
|
|
|
curly,
|
|
|
|
dotted,
|
|
|
|
dashed,
|
|
|
|
};
|
|
|
|
|
2024-01-19 04:02:17 +01:00
|
|
|
fg: Color = .default,
|
|
|
|
bg: Color = .default,
|
|
|
|
ul: Color = .default,
|
2024-01-19 06:17:57 +01:00
|
|
|
ul_style: Underline = .off,
|
2024-01-19 04:02:17 +01:00
|
|
|
url: ?[]const u8 = null,
|
|
|
|
url_params: ?[]const u8 = null,
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const Color = union(enum) {
|
|
|
|
default,
|
|
|
|
index: u8,
|
|
|
|
rgb: [3]u8,
|
|
|
|
};
|