pub const Buffer = @import("Buffer.zig"); pub const Border = @import("Border.zig"); pub const Cell = @import("Cell.zig"); pub const Color = @import("color.zig").Color; pub const Key = @import("Key.zig"); pub const Line = @import("Line.zig"); pub const Lines = @import("Lines.zig"); pub const Link = @import("Link.zig"); pub const Mouse = @import("Mouse.zig"); pub const Rectangle = @import("Rectangle.zig"); pub const RenderBuffer = @import("RenderBuffer.zig"); pub const Screen = @import("Screen.zig"); pub const Style = @import("Style.zig"); pub const screen = @import("screen.zig"); pub const TabStops = @import("TabStops.zig"); pub const TerminalRenderer = @import("TerminalRenderer.zig"); pub const ansi = @import("ansi.zig"); pub const decoder = @import("decoder.zig"); pub const event = @import("event.zig"); pub const parser = @import("parser.zig"); pub const styled = @import("styled.zig"); pub const width = @import("width.zig"); pub const Window = @import("Window.zig"); /// The terminal's color capabilities, mirroring `colorprofile.Profile`. /// Order matters: `ascii` and below drop colors entirely. pub const Profile = enum(u8) { unknown, no_tty, ascii, ansi, ansi256, true_color, }; // max size to use per os pub const Size = switch (@import("builtin").os.tag) { // windows uses i16 but never goes negative, using u15 to cover positive // range and prevent use of negative values without having to put checks // everywhere .windows => u15, else => u16, }; /// Per-line dirty metadata in a `RenderBuffer`'s `touched` table. A line is /// `.untouched` (no changes recorded), `.synced` (already rewritten to the /// terminal by the renderer), or `.changed` with a half-open span /// `[first_cell, last_cell)` plus the old row index for scroll optimization. pub const LineData = union(enum) { untouched, synced, changed: Changed, const Changed = struct { first_cell: Size = 0, last_cell: Size = 0, old_index: Size = 0, }; pub fn changes(first: Size, last: Size, old: Size) LineData { return .{ .changed = .{ .first_cell = first, .last_cell = last, .old_index = old, } }; } }; test { @import("std").testing.refAllDecls(@This()); _ = @import("screen.zig"); _ = @import("color.zig"); }