diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-02 20:06:25 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | bead9f0b78380d1428f40fdab339c1c8f88fa626 (patch) | |
| tree | 960255de5a2cef661ec5d0ad3220a4b2b1738842 /ui_vaxis.zig | |
| parent | 62ef1882ab7878210f05f06504796849e412c318 (diff) | |
| download | pardes-bead9f0b78380d1428f40fdab339c1c8f88fa626.tar.gz pardes-bead9f0b78380d1428f40fdab339c1c8f88fa626.zip | |
sdl ui backend
Diffstat (limited to 'ui_vaxis.zig')
| -rw-r--r-- | ui_vaxis.zig | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ui_vaxis.zig b/ui_vaxis.zig new file mode 100644 index 00000000..61bf51ca --- /dev/null +++ b/ui_vaxis.zig @@ -0,0 +1,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; |
