From 8819e192ccaf5844505790b2422c577832f306d1 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Sun, 5 May 2024 21:17:03 +0200 Subject: [PATCH] vaxis: export Parser, Tty and getWinsize for applications that cannot use Loop --- src/Tty.zig | 2 +- src/main.zig | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Tty.zig b/src/Tty.zig index fdb2536..f9fffdf 100644 --- a/src/Tty.zig +++ b/src/Tty.zig @@ -278,7 +278,7 @@ pub const Winsize = struct { y_pixel: usize, }; -fn getWinsize(fd: posix.fd_t) !Winsize { +pub fn getWinsize(fd: posix.fd_t) !Winsize { var winsize = posix.winsize{ .ws_row = 0, .ws_col = 0, diff --git a/src/main.zig b/src/main.zig index 78ad6ce..4c73892 100644 --- a/src/main.zig +++ b/src/main.zig @@ -14,8 +14,10 @@ pub const Image = @import("Image.zig"); pub const Mouse = @import("Mouse.zig"); pub const Screen = @import("Screen.zig"); pub const AllocatingScreen = @import("InternalScreen.zig"); -pub const Winsize = @import("Tty.zig").Winsize; +pub const Parser = @import("Parser.zig"); +pub const Tty = @import("Tty.zig"); pub const Window = @import("Window.zig"); +pub const Winsize = Tty.Winsize; pub const widgets = @import("widgets.zig"); pub const gwidth = @import("gwidth.zig");