2024-01-19 04:02:17 +01:00
|
|
|
pub const Cell = struct {
|
2024-01-19 18:02:32 +01:00
|
|
|
char: Character = .{},
|
2024-01-19 04:02:17 +01:00
|
|
|
style: Style = .{},
|
|
|
|
};
|
|
|
|
|
|
|
|
pub const Character = struct {
|
2024-01-19 18:02:32 +01:00
|
|
|
grapheme: []const u8 = " ",
|
|
|
|
width: usize = 1,
|
2024-01-19 04:02:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
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-24 20:15:04 +01:00
|
|
|
// TODO: url should maybe go outside of style. We'll need to allocate these
|
|
|
|
// in the internal screen
|
2024-01-19 04:02:17 +01:00
|
|
|
url: ?[]const u8 = null,
|
|
|
|
url_params: ?[]const u8 = null,
|
2024-01-20 02:43:35 +01:00
|
|
|
|
|
|
|
bold: bool = false,
|
|
|
|
dim: bool = false,
|
|
|
|
italic: bool = false,
|
|
|
|
blink: bool = false,
|
|
|
|
reverse: bool = false,
|
|
|
|
invisible: bool = false,
|
|
|
|
strikethrough: bool = false,
|
2024-01-19 04:02:17 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
pub const Color = union(enum) {
|
|
|
|
default,
|
|
|
|
index: u8,
|
|
|
|
rgb: [3]u8,
|
|
|
|
};
|