blob: 61bf51cacd49ba671c561466e116444a863f2cd9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// The UI abstraction surface. `main.zig` and `image.zig` program against THIS
// module (importing `"ui"`) instead of libvaxis directly, so the rendering +
// input backend can be swapped at build time (`-Dui=vaxis|sdl`).
//
// This is the *vaxis* (real terminal) backend: a transparent passthrough. It
// re-exports the libvaxis declarations the app uses, so every type (`Key`,
// `Mouse`, `Window`, `Cell`, …), the `Vaxis` renderer/loop, `Tty`, and `init`
// are exactly libvaxis's. All the UI logic therefore behaves identically to the
// pre-refactor app — this file exists purely as the seam a different backend
// (`ui_sdl.zig`) can replace.
//
// (Zig 0.16 dropped `pub usingnamespace`, so the re-export is explicit.)
const vaxis = @import("vaxis");
pub const Vaxis = vaxis.Vaxis;
pub const Tty = vaxis.Tty;
pub const Loop = vaxis.Loop;
pub const init = vaxis.init;
pub const Key = vaxis.Key;
pub const Mouse = vaxis.Mouse;
pub const Winsize = vaxis.Winsize;
pub const Color = vaxis.Color;
pub const Style = vaxis.Style;
pub const Cell = vaxis.Cell;
pub const Segment = vaxis.Segment;
pub const Window = vaxis.Window;
pub const Screen = vaxis.Screen;
pub const Image = vaxis.Image;
pub const Event = vaxis.Event;
pub const Capabilities = vaxis.Capabilities;
pub const Options = vaxis.Options;
pub const CursorShape = vaxis.Cell.CursorShape;
|