Tim Culverhouse
5f41978054
refactor(vaxis): require an io.AnyWriter for writes
...
All vaxis functions that write to the terminal now require an
io.AnyWriter as a parameter
2024-05-29 13:13:54 -05:00
Tim Culverhouse
1b957ec84e
fix examples, update readme features
2024-05-22 14:09:15 -05:00
CJ van den Berg
d48826c0b1
vaxis: add osc52 copy/paste support
2024-05-22 13:51:19 -05:00
forgoty
019669d2f0
Fix examples: main, pathological, table.
2024-04-29 17:51:33 -05:00
Tim Culverhouse
e7915b5dd7
examples: fix api for main, pathological, table
2024-04-29 12:35:02 -05:00
00JCIV00
b7d7ba6b36
example: s/start/startReadThread s/stop/stopReadThread
2024-02-26 19:06:05 -06:00
Jora Troosh
4a463cfa3a
refactor: make code more idiomatic
...
- 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});.
2024-02-11 12:59:33 -06:00
Tim Culverhouse
93d9ead99c
parser: more progress on CSI parsing
...
Add additional CSI parsing for keys
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-20 08:05:22 -06:00
Tim Culverhouse
462a303903
examples: add some comments
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 22:02:10 -06:00
Tim Culverhouse
de91cbe2d0
render: complete the render loop
...
This loop matches the go version of Vaxis to a tee. :chefs-kiss:
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 19:43:35 -06:00
Tim Culverhouse
58bc6864cb
render: implement double buffered screen for rendering
...
This lets us efficiently render by only updating cells that have changed
since last render
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 13:13:20 -06:00
Tim Culverhouse
811fbdd2cb
screen: refactor arg order and fix some math
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 12:21:14 -06:00
Tim Culverhouse
bef5276340
vaxis: send winsize at run, initialize screen to default cells
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 11:44:20 -06:00
Tim Culverhouse
8c8caf4769
tty: enable writing to tty and add smcup in example
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 10:58:14 -06:00
Tim Culverhouse
74d55aaa19
vaxis: fix window initialization
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 10:31:23 -06:00
Tim Culverhouse
c3964fec43
rename project libvaxis
...
This is so similar to my vaxis project for go that we'll retain the name
here as well. The two can keep similar APIs and feature sets, but are
used in different languages. Maybe someday libvaxis will export a C api
for even broader use
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-19 10:13:32 -06:00
Tim Culverhouse
266c5ec224
screen: implement initial screen data structure
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-18 23:18:19 -06:00
Tim Culverhouse
a9c97d051b
tty: implement winch handling
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-18 22:37:48 -06:00
Tim Culverhouse
3176eb81ef
hack: go to ground state in escape state
...
Only doing this until I finish the parser
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-18 20:35:33 -06:00
Tim Culverhouse
d22b2a89f3
chore: refactor build
...
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2024-01-18 20:17:26 -06:00