This loop adds an xev.File wrapper called TtyWatcher which delivers
events to the users callback. Note that this implementation does not
handle any of the writes. Writes are always safe in the main thread, so
we let users decide how they will schedule those (buffered writers, xev
writes, etc)
This detects support for pixel mouse mode so it can be enabled only
if supported.
This also translates pixel coordinates to something more compatible
with plaine cell coordinates. This make it much easier to write
applications that support both.
- Consolidated `main.zig` into `vaxis.zig` as the new library entry point.
- Exposed more Types throughout the library for more transparent doc navigation.
- Reorganized certain Modules and Types to be more coherent and readable.
- Re-generated docs to reflect these changes.
Add a renderer for applications running on the primary screen. This
renderer uses relative cursor positioning, and works with all the same
primitives as the alternate screen.
Fix a bug where repositioning was never turned back to false. This was a
nasty one with huge perf implications.
Set internal cells to a space and default on init. This prevents us from
writing them. As a result, we now issue a hardware clear on resize.
Previously, stopping the read thread would not fully clean up the tty.
This could result in issues such as #9 where the terminal state was
borked upon return to shell or if temporarily exiting the TUI.
Fixes: #9
Refactor the main API to split Loop and Vaxis types. This enables the
core Vaxis type to be more easily referenced in other types, since it
doesn't require a comptime type parameter. This will make the switch to
the zg unicode library easier.
- Added standard .gitattributes file for Zig projects.
- Reworked build.zig a little, hopefully it's a bit clearer. Also, now zig build will run all steps.
- outer: while in examples was redundant since there's only one loop to break from. switch expressions don't allow breaking from them, so breaking is only for loops, i.e. while and for.
- When returning a struct instance from a function, the compiler infers the return type from function signature, so instead of return MyType{...}; , it's more idiomatic to write return .{...};.
- Logging adds a new line by default, so you don't usually need to write \n like here: log.debug("event: {}\r\n", .{event});.