Tim Culverhouse
00afc7c130
examples(xev): don't render in the eventCallback
2024-05-30 12:05:18 -05:00
Tim Culverhouse
d294428b74
examples(xev): duplicate functionality of vaxis example
...
The xev example is now a complete replication of the vaxis example, but
using xev as the event loop
2024-05-30 11:10:03 -05:00
Tim Culverhouse
335ea9f2d0
xev: fix todos
2024-05-30 10:06:28 -05:00
Tim Culverhouse
bbd9184e00
loop: add an xev loop implementation
...
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)
2024-05-30 09:43:48 -05:00
Tim Culverhouse
04f1586e8f
vaxis: add panic handler function
...
Applications may use this to handle panics gracefully
2024-05-30 09:43:48 -05:00
Jari Vetoniemi
ba4caa0767
build.zig.zon: fix paths
...
Use single "src" element in paths to include everything under src/
The Tty.zig was renamed to tty.zig and that was not picked up
2024-05-30 06:38:38 -05:00
Tim Culverhouse
288b8cac75
build: remove some examples
2024-05-29 13:16:35 -05:00
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
59abd7d7d4
refactor(vaxis): move tty out of vaxis
...
Refactor to move the tty out of the vaxis struct. All vaxis writes now
take an io.AnyWriter
2024-05-29 11:33:39 -05:00
Tim Culverhouse
cf2d2ab50b
GraphemeCache: remove testing alias
2024-05-29 10:27:59 -05:00
Tim Culverhouse
572bb8ba6a
image: remove testing alias
2024-05-29 10:26:28 -05:00
Tim Culverhouse
d7c3a7496d
refactor(tty): move state into Vaxis struct
...
Move tty state (*not* termios, though) into Vaxis struct
2024-05-28 12:18:07 -05:00
Tim Culverhouse
49003b0e2b
refactor(parser): make parser easier to read and more robust
...
Refactor the parser to be more robust and easier to read.
2024-05-28 10:33:36 -05:00
Tim Culverhouse
93ac8e00f8
vaxis: add support for color scheme updates
2024-05-26 06:52:06 -05:00
Tim Culverhouse
0fa082033e
examples: add readline example
2024-05-24 11:00:35 -05:00
Tim Culverhouse
6b9f91986c
vaxis: add support for color reports (OSC 4, 10, 11, 12)
...
Add support for querying colors (index, foreground, background, and
cursor)
2024-05-24 10:59:20 -05:00
Tim Culverhouse
fba8984cf8
window(print): check for col after loop and at very beginning
2024-05-24 09:03:11 -05:00
Tim Culverhouse
409e17b883
examples: add vaxis example
2024-05-24 08:04:54 -05:00
Tim Culverhouse
3a3f7d32cf
vaxis: add a logo
2024-05-23 20:16:01 -05:00
Tim Culverhouse
a9a0abf16b
window(wrap): fix when we shift to new line
...
Add a newline at the top of the loop instead of the bottom
2024-05-23 20:15:14 -05:00
Tim Culverhouse
465c01e403
chore: remove TODO from tty
2024-05-23 15:41:59 -05:00
Tim Culverhouse
11dcd099fa
tty: correctly handle partial reads
2024-05-23 15:39:08 -05:00
CJ van den Berg
473357f24a
parser: don't enable pixel mouse if the terminal explicitly says it doesn't support it
2024-05-23 13:05:36 -05:00
CJ van den Berg
1c11333717
tty: do not close /dev/tty on macos
...
Attempting to close /dev/tty may block indefinitely on macos if another
thread is already blocked on a read operation. As there is no practical
use for closing /dev/tty on exit besides unblocking other threads (which
does not work on macos anyway) we can just skip the close call.
2024-05-23 12:38:11 -05:00
CJ van den Berg
55809160b9
vaxis: detect pixel mouse mode and translate coordinates to cell offsets
...
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.
2024-05-22 15:04:26 -05:00
CJ van den Berg
a75cce6e78
parser: fix panic on zero mouse coordinate reports
2024-05-22 15:04:26 -05:00
Tim Culverhouse
1b957ec84e
fix examples, update readme features
2024-05-22 14:09:15 -05:00
Tim Culverhouse
d7bc2c451b
build: use explicit paths in build.zig.zon
2024-05-22 13:56:25 -05:00
CJ van den Berg
d48826c0b1
vaxis: add osc52 copy/paste support
2024-05-22 13:51:19 -05:00
Tim Culverhouse
a1263b1baa
mouse: enable pixel tracking
2024-05-21 15:00:14 -05:00
Tim Culverhouse
1dc90bd764
image: use image options struct, add more functionality
...
Use an options struct for controlling image output. Add more
functionality from the core kitty image protocol
2024-05-21 11:14:07 -05:00
Tim Culverhouse
fd6c380c57
ci: fix CI zig version
2024-05-21 11:14:07 -05:00
CJ van den Berg
8871ca2aef
vaxis: add functions to query the terminal and enable features in two steps
...
This allows better integration with applications that are using a custom
main loop.
2024-05-21 11:12:49 -05:00
Tim Culverhouse
fff034d20a
image: remove debug log statement
2024-05-21 08:07:28 -05:00
CJ van den Berg
9906a67ef6
screen: fix off by one error in readCell bounds checks
2024-05-21 06:35:48 -05:00
CJ van den Berg
0333e178bd
screen: fix off by one error in writeCell bounds checks
2024-05-17 15:04:31 -05:00
CJ van den Berg
329ba0e43b
window: do not attempt to fill offscreen windows
2024-05-17 15:04:31 -05:00
Tim Culverhouse
4f5db2b224
core: apply quirk for termux
...
Termux spews SGR sequences to the screen if they are not legacy encoded.
Add a quirk for termux (TERMUX_VERSION will be set)
2024-05-17 07:25:06 -05:00
Tim Culverhouse
9d11d13085
window: remove deprecated code, add printSegment
2024-05-16 07:00:41 -05:00
Tim Culverhouse
9f015b7f49
docs: refactor docs build step
2024-05-14 12:53:29 -05:00
Tim Culverhouse
dea1a875e0
chore: zig fmt
2024-05-12 20:27:24 -05:00
00JCIV00
173ff4e216
Removed old vaxis.zig
2024-05-12 20:25:51 -05:00
00JCIV00
6e97c8d21d
Fixed PR Corrections
2024-05-12 20:25:51 -05:00
00JCIV00
d117a5f5fa
Remove old docs directory
2024-05-12 20:25:51 -05:00
00JCIV00
ee13f32b17
Removed previously missing (now duplicative) assert declaration
2024-05-12 20:25:51 -05:00
00JCIV00
037a301bd6
Added missing 'assert' definition for TextInput
2024-05-12 20:25:51 -05:00
00JCIV00
ca0371bc44
Updated 'os' to 'posix' for Zig v0.12-3457
2024-05-12 20:25:51 -05:00
00JCIV00
46b82062de
Improved the Table Widget
...
- Added support for creating Tables from `ArrayList([]const u8)`.
- Added the `col_width` field to TableContext to help with Mouse support.
2024-05-12 20:25:51 -05:00
00JCIV00
0329ae9b95
Improved the Table Widget
...
- Added better Integer bounds checks with Saturated Operators.
- Implemented truncated cells using the "..." suffix.
2024-05-12 20:25:51 -05:00
00JCIV00
d75c44725e
Added the basic example for pausing the TUI with a Child Process.
2024-05-12 20:25:51 -05:00