nick black
8c12ca0c06
split up ncdirect_dump_{sprixel, cellplane}()
3 years ago
nick black
c0f432f99b
setup_signals: block SIGWINCH/SIGCONT for the calling thread #2175
3 years ago
nick black
a6d0a7e2cd
[input] support calling notcures_get() with a NULL ncinput
3 years ago
nick black
5eed1abe8e
notcurses_get: restore old delaybound behavior #2169
3 years ago
nick black
aa6b9486c9
pthread_cond_timedwait() directly returns errno #2169
3 years ago
nick black
8c0d32d986
fix windows build
3 years ago
nick black
1689365b6c
PixelWipe unit test: fix for sixel-based terminals
3 years ago
nick black
b2b9655d6f
don't try to run xrandr on XNU/Windows
3 years ago
nick black
0686a1c390
[input] signal when making space in output buffer
3 years ago
nick black
24c194df1b
[process_bulk] walk the buffer
3 years ago
nick black
78eeaf55ea
Merge branch 'master' into dankamongmen/input-thread
3 years ago
nick black
686aac4689
[input] pthread_cond_wait when no timeout
3 years ago
nick black
1d4c62d446
[input] implement timeouts
3 years ago
nick black
edb9eff34b
[input] serialize terminfo lookups ugh
3 years ago
nick black
81e2fd1351
[input] track linesigs status
3 years ago
nick black
9edd0c7849
[input] load specials from terminfo, except on windows
3 years ago
nick black
3d02a75323
NCOPTION_DRAIN_INPUT in notcurses-info and ncneofetch
3 years ago
nick black
a3ed82ccff
honor NCOPTION_DRAIN_INPUT
3 years ago
nick black
716a37f917
[input] walk specials automaton
3 years ago
nick black
5a64f25ac2
restripe_lastframe: properly index into tmp/lastframe
3 years ago
nick black
bfdd5dd01d
notcurses_input: need lock around refresh()
3 years ago
nick black
fd5708a7cd
unicode 14.0!
3 years ago
nick black
8f900754d5
[input] synthesize SIGINT/SIGQUIT
3 years ago
nick black
c31f20b602
[input] remap 0x7f to NCKEY_BACKSPACE
3 years ago
nick black
c3545a4b40
process_ncinput: fix ictx->isize check
3 years ago
nick black
37cb5adb87
[input] add constant specials to trie
3 years ago
nick black
315edacf08
[input] handle unicode-encoded mouse events
3 years ago
nick black
22f421657d
fix up windows block_on_input()
3 years ago
nick black
9e9a949f0f
[direct] move to new cursor location reports
3 years ago
nick black
6f0ddd8c15
[input] handle multibyte utf8
3 years ago
nick black
1fe5cc9555
[input] build kitty protocol into new input automaton
3 years ago
nick black
7159913530
[input] kill unnecessary state CURSOR_OR_PIXELGEOM
3 years ago
nick black
0dd41f0e79
[input] hand ncinputs back to calling client
3 years ago
nick black
5f00466b38
protect initdata, notcurses_getvec()
3 years ago
nick black
1630a1629f
merge that shit
3 years ago
nick black
3cf5a67b84
input thread #2136
3 years ago
nick black
55c7cc356d
[resize] carefully copy over reuseable parts of lastframe #2165
3 years ago
nick black
39025dd053
eliminate kitty graphics one-off enum type
3 years ago
nick black
20edd5a3cd
purge deprecated cell typedef
3 years ago
nick black
0213e026b2
allow users to set the stdplane's resizecb
...
Hardcode a call to ncplane_resize_maximize() in
notcurses_resize_internal() for the standard plane,
when handling the standard pile. allow the user
to set the standard plane's resize callback beyond
that. closes #2163 .
3 years ago
nick black
76b1ea9842
[kitty] fix 1st gen animation
...
Much as we needed to do in the accounting core for
kitty animation, whether we blitted a sprixcell of
alpha nulls or instead wiped it affects how we
rebuild under KITTY_ANIMATION, which right now is
all Kitty >= 0.20.0 since KITTY_SELFREF is disabled.
This gets KITTY_ANIMATION working perfectly on
bitmapstates. I've accomplished this by stashing a
bool onto the end of each KITTY_ANIMATION-style
auxvector, set high if it originated in a reblit's
null alphas, and low if it was zorched by a wipe.
Set {c, r} arguments to animation directive based
on whether this is set. See #2161 .
3 years ago
nick black
4789aca20f
notcurses.h: remove some more deprecated static inlines
3 years ago
nick black
4e1897c1c0
[kitty] KITTY_ANIMATED rebuild fix #2161
3 years ago
nick black
79610b2efa
more work on input thread
3 years ago
nick black
e54661f425
initialize and shutdown the new input layer from termdesc.c
3 years ago
nick black
b65f7b5e10
[input] tear down thread
3 years ago
nick black
613b2f9d31
extract cancel_and_join() helper
3 years ago
nick black
ff6066ba33
space_for_read(), read_input_nblock()
3 years ago
nick black
b6e5a815a3
[inputthread] scaffolding
3 years ago
nick black
eb70aeed90
start in on input thread
3 years ago
nick black
4ec1bfd8be
[info] differentiate between kitty animation and kitty selfref #2161
3 years ago
nick black
6612d1b149
[kitty] disable KITTY_SELFREF for now #2161
3 years ago
nick black
bd6d0e28fb
[kitty] unite kitty_wipe_animation and kitty_wipe_selfref #2161
3 years ago
nick black
9cc04ea259
[demo] use DETECTMAXONLY for fps graph #2152
3 years ago
nick black
9ec41fe123
[plots] fix NCPLOT_OPTION_DETECTMAXONLY #2152
3 years ago
nick black
88f40df4ae
[plots] print current sample as summary #2152
3 years ago
nick black
fb8b6bfcae
[kitty] multiframe annihilation transitivity
...
When using the reflexive composition extension to the
Kitty graphics protocol, we refer to the previously-
blitted image to rebuild cells, and thus don't have to
keep a copy of the image ourselves. We just blit null-
alpha cells to wipe, and then execute a reflective
composition to rebuild. The auxvector is a single word,
holding the state we were in before the wipe, since we
don't have a copy of the image to look at to determine
the state afresh (and caching it is more efficient
anyway). Good, good.
Except. When we reload the plane, we want to carry over
those wipe cells, yes? I.e. if there was a plane above
the graphic before, and we replace the graphic, that
plane still better be above it. And that means editing
the cell out of the new graphic that we blit up, on the
fly. Which we were doing. Problem is, if we later need
to rebuild that cell, and we reflexively compose using
this new image, *we reflexively compose the edited-out
cell*, and thus remain wiped (our RGB values get set
properly, but we have all 0 alphas). No good!
So instead, in KITTY_SELFREF (the most advanced kitty
implementation, corresponding to reflexive composition),
do a pass at the end and send AAAAA wipes for any
ANNIHILATED{_TRANS} sprixcells. We don't present until
both have hit (since we're using a new image ID), so
there's no flicker, though there is some bandwidth cost.
That handles rebuilding. Problem is, if we then need to
wipe these same sprixcells *again*, our auxvecs were
set to ANNIHILATED{_TRANS}, and thus no wipe takes place.
Rather than blindly propagating the auxvec across the
frames, properly reset the auxvec according to the new
blit. This handles wiping post rebuild, closing the cycle.
Kitty 0.22.0+ now runs the bitmapstates PoC perfectly.
Closes #2143 . woo-hah!
3 years ago
nick black
86ea9d00d0
sprixel_debug: don't perform overeager invalid decoding
3 years ago
nick black
4a6e45adb6
kitty_wipe_selfref: update auxvec with state #2143
3 years ago
nick black
e70302416e
[ncneofetch] try using sysctlbyname() on bsd for totalram
3 years ago
nick black
128c35dc69
[ncneofetch] get total RAM on apple
3 years ago
nick black
51de081616
[ncneofetch] don't go just printing NULLs
3 years ago
nick black
7e6442077b
[input] ctrl+ capitalizes ASCII, reflect when synthesizing signals
3 years ago
nick black
e7fe2d2ffd
[ncneofetch] kill 'KERNEL_XNU unhandled' warning
3 years ago
nick black
5734444d49
ncneofetch: use kern.osproductversion sysctl for macOS version #2158
3 years ago
nick black
54cf38b076
add ncstrwidth_valid() and documentation #2153
3 years ago
nick black
831a65aa7c
[kitty] move cursor prior to positioning command, closes #2155
3 years ago
nick black
956a2b03ec
[sprite] remove old debugging cruft
3 years ago
nick black
d899c5c9d3
notcurses_stop: free rstate fbuf
3 years ago
nick black
2a04effbca
[kitty] reset fbuf prior to init for animation #2150
3 years ago
nick black
762d382ba7
[ncplayer] s/getc/get/
3 years ago
nick black
3610ce26d6
[ncplayer] nonblocking input check even when behind clockwise
3 years ago
nick black
42179890c0
ncplane_mergedown: don't pass unsafe NULL for sprixelstack
3 years ago
nick black
1018a9d78d
[ncvisual_from_plane] kill two dead stores
3 years ago
nick black
0d948dcbf4
[plots] call destructors on error paths
3 years ago
nick black
5527fabdf5
[input] initialize ncinput all the way through
3 years ago
nick black
36825374b9
[shutdown] ensure kitty pop goes to tty
...
In notcurses_stop_minimal(), we need to send most of
our resets prior to sending rmcup. rmcup and the kitty
pop, furthermore, need to be going to the ttyfd to match
their opposites. They were previously going to stdout,
meaning the kitty pop wasn't acted on when we redirected
stdout. Closes #2149 .
3 years ago
nick black
b74b23ad7c
handle kitty's augmented backspace
3 years ago
nick black
d82a30cf97
[sixel] finish opaque side of update_rmatrix #2133
3 years ago
nick black
c24a31d49d
[sixel] update_rmatrix() logic for transparency side #2133
3 years ago
nick black
a406a5f8ef
introduce pixel_refresh #2133
3 years ago
nick black
4dc6b7e826
[plots] kill bogon duplicate plot plane #2133
3 years ago
nick black
953243971d
sprite_draw: properly place bound planes
3 years ago
nick black
16dc202362
[intro] don't fail out on unicode failures
3 years ago
nick black
270572c477
[egcpool] make it safe for c++ callers
3 years ago
nick black
fac2cd7045
[notcurses-input] fix for non-pixel terminals
3 years ago
nick black
d941a012c4
[render] on pile change, move to UNSEEN, not INVALIDATED
3 years ago
nick black
cb039eafdf
restore termios settings before calling rmcup
3 years ago
nick black
a299c3226d
[direct] pop kitty keyboard state to ttyfd #2145
3 years ago
nick black
1c72516c06
[direct] finalize fbuf on exit
3 years ago
nick black
61ee8b8668
sprixel: damage only on sprite_wipe() failure
3 years ago
nick black
1827a7d58d
[sixel] correctly invalidate on wipe #2142
3 years ago
nick black
882664b6c9
notcurses-input: use max sixelgeom as limiter on plot width #2140
3 years ago
nick black
ac5efd529d
[initbanner] properly clreol, ugh
3 years ago
nick black
ca3635c28d
render: sanity when we hit an undamaged cell when debugging #2133
3 years ago
nick black
d07221ecac
closing banner: clear lines #2134
3 years ago
nick black
83bb816c15
clear to end of line in init banner, if el is available #2134
3 years ago
nick black
108012950e
notcurses-info: indicate that el capability is present
3 years ago
nick black
335f47afe8
extract banner code into banner.{ch} #2134
3 years ago
nick black
0be7412376
only synthesize signals on non-windows #2131
3 years ago
nick black
2268328b3d
synthesize SIG{INT, TSTP, QUIT} for appropriate ctrls #2131
3 years ago
nick black
1ace0139ff
mention kitty keyboard protocol support #2131
3 years ago
nick black
f44d5bb97b
[input] close off the kitty specials list #2131
3 years ago
nick black
e1b84d6c41
handle legacy function key encodings #2131
3 years ago
nick black
c340a5b6b0
always add windows special keys #2131
3 years ago
nick black
25afdd8ab6
[kitty] handle level 1 of keyboard protocol #2131
3 years ago
nick black
e1a1ac3497
eliminate double-free of tpreserved
3 years ago
nick black
e968b3972c
fills unit test: require nccell_strdup() success
3 years ago
nick black
39f9dd3b96
kill fbuf_at(), eliminating static analyzer warning #1348
3 years ago
nick black
cd14e914fa
render: eliminate dead stores
3 years ago
nick black
2e1ccdce15
interrogate_terminfo: avoid double-free on error path
3 years ago
nick black
42d1722ec7
reel: protect against NULL bottom plane
3 years ago
nick black
d03051d154
notcurses_core_init: kill memory leak on error path
3 years ago
nick black
429485551a
[ncdirect] postition cursor after blitting image #2059
3 years ago
nick black
6ba5a98a7c
ncdirect_dump_plane: manually scroll before emitting plane #2059
3 years ago
nick black
823e79416b
[input] simplify startup automaton, unpop csi inputs
3 years ago
nick black
582e7b24c5
complete initial libgpm support #1405
3 years ago
nick black
1463049d32
add ncinput_shovel for GPM #1405
3 years ago
nick black
e245fa0fb2
block_on_input: mintty ought fall through to poll
3 years ago
nick black
009530c0cf
properly read cursor report from infd #2130
3 years ago
nick black
ccd2068ee3
calculate pixel-cell geometry from responses
3 years ago
nick black
fcd845c99a
[windows] kill compiler warning
3 years ago
nick black
71f491ad23
sixel_scrub: don't persist sixel override across loop #2106
3 years ago
nick black
0ee5ba4ffe
only use tpreserved when it's not NULL #2132
3 years ago
nick black
0fd2fe7ce1
restore terminal settings on interrogate_terminfo() failure #2132
3 years ago
nick black
556c448ee6
clean_sprixels: drop unnecessary cursor move
3 years ago
nick black
ea75d9355c
[render] adjust bitmaps for scrolling
...
If a sprixel is in SPRIXEL_MOVED, check to see whether
it's the same x position as it was before, and whether
it's moved up a number of rows equal to the number of
scrolls. If that is the case, take the sprixel to
SPRIXEL_QUIESCENT rather than actually redrawing. This
both saves us a blit, and properly aligns bitmaps when
sixels scroll. Closes #2110 .
3 years ago
nick black
ae1121402d
ncneofetch: accept -v
3 years ago
nick black
1b3c580a23
gpm: only use DRAG, DOWN, and UP, not MOVE #1405
3 years ago
nick black
9df967289f
decode GPM events
3 years ago
nick black
d7c74b8fda
multiselect PoC: NCLOGLEVEL_ERROR
3 years ago
nick black
b6844ca214
notcurss-input: NCLOGLEVEL_ERROR
3 years ago
nick black
cd7b4c021d
gpm: add version to banner, launch thread #1405
3 years ago
nick black
88ed5a48ab
[linux] don't close fb fd before font change #2108
3 years ago
nick black
22386f3154
[linux] blit fb copy back after font change
...
After reprogramming the Linux console font, remap
the framebuffer. Verify that the size and geometry
match the copy we made beforehand, and assuming
they do, blit the copy back into the framebuffer.
This allows us to reprogram the console font while
maintaining any graphics present. Closes #2108 .
3 years ago
nick black
6a6b9ad3b8
[linux] move fbdup code into linux.c #2108
3 years ago
nick black
b8e9b235ea
[linux] add copy_and_close_linux_fb #2108
3 years ago
nick black
4bcd773569
[linux] reprogram font before mapping framebuffer
...
You can't reprogram the Linux console font while holding
a map of the framebuffer, annoyingly. Move the attempt to
reprogram the fonts prior to the acquisition of the
framebuffer. The problem with this is that it clears the
framebuffer, so we're going to need to get a copy of it
beforehand, which we will reblit afterwards #2108 .
3 years ago
nick black
38495fd00b
[linux] track halfblocks distinctly from quads wrt font #2121
3 years ago
nick black
e49891100a
mintty has bce
3 years ago
nick black
333c614120
ncneofetch: drop ending newline
3 years ago
nick black
8802bf115e
Windows Terminal lacks smulx, but MinTTY has it
3 years ago
nick black
d7d18dcb64
Windows: GetUserNameExA(NameSamCompatible), correct test
3 years ago
nick black
83744f17bb
Windows: on cygwin/msys2, use regular cursor lookup #2098
3 years ago
nick black
8097b937c0
Windows: introduce tty_check() wrapper for isatty() #2098
3 years ago
nick black
2732620821
stop_minimal: use TCSAFLUSH to stop responses from emerging
3 years ago
nick black
0a959617c6
detect MinTTY with XTVERSION #2115
3 years ago
nick black
eaa67c1974
throw a diagnostic before blocking_write()
3 years ago
nick black
a5dc162a29
send cell geometry query in initial handshake, use result #2098
3 years ago
nick black
84b72e1e6b
lookup_blitset: handle exclusive plotter blitters #2113
3 years ago
nick black
54c1d3bbae
notcurses-input: move legend to bottom row
...
We don't want to possibly draw an NCBLIT_PIXEL plot
over the bottom row, lest we incur undesirable
scrolling. Instead, move the legend from the top row
to the bottom row, and the plot one row above it.
3 years ago
nick black
14533c4e73
linux console: no halfblocks unless we bring 'em #2109
3 years ago
nick black
ff12a1f75b
distinguish between halfblock and quadrant capabilities #2109
3 years ago
nick black
c2616c6cbb
Unit tests for bitmap wandering offscreen to the left and right #1646
3 years ago
nick black
7ad34fc282
sixel: knock out memory leak when replacing annihilated sprixcells #2104
3 years ago
nick black
fad79035e7
gpm: stash connect fd
3 years ago
nick black
bdc593a8ff
fbcon: properly use fbuf
3 years ago
nick black
b13ecb31f9
notcurses-info: show whether we're using gpm
3 years ago
nick black
919a549367
libgpm: keep the fd around #1405
3 years ago
nick black
28bc8411b5
sixel: free sixelmap on recycle #2104
3 years ago
nick black
06351d5a39
windows: s/65001/CP_UTF8
3 years ago
nick black
652b617ec7
Windows: handle hardcoded special key sequences #2097
3 years ago
nick black
e0cef88494
macos: satisfy all need for clock_nanosleep()
3 years ago
nick black
36d7b1ce4b
notcurses-demo: kill invalid cast in summary table
3 years ago
nick black
2620588a47
macos: statepixel does need compat.c
3 years ago
nick black
e35d37e6d1
Windows: need to add ccc/initc
3 years ago
nick black
3abeb81cb8
propagate early cursor report through interrogation #2094
3 years ago
nick black
83976d7fd1
extract_clrs: drop redundant nilayer param
3 years ago
nick black
ae3ada45f3
Windows: use cached inhandle in block_on_input
3 years ago
nick black
1ac2a3c8c8
Windows: invert smkx/rmkx #2097
3 years ago
nick black
35fbb74ed9
Windows: GetConsoleScreenBufferInfo() for cursor location #2094
3 years ago
nick black
db5b3e062c
windows: hack together cursor location report in direct mode #2094
3 years ago
nick black
3e29d3f182
Windows Terminal: define cu[udbf]
3 years ago
nick black
e5207c78c2
windows terminal: disable quads/braille
3 years ago
nick black
adbc26dd9b
demo: summary_table() failure is not immediate fail #2099
3 years ago
nick black
2feab02759
Windows: kill last warnings #2062
3 years ago
nick black
6d72fedca9
demo: kill warning on Windows #2062
3 years ago
nick black
1879ecbaff
Windows: declare faccessat()
3 years ago
nick black
93073e595a
move includes from ncport.h to internal compat.h
3 years ago
nick black
d68a3bf948
demo: hook up input on Windows #2062
3 years ago
nick black
409ee08849
Windows: use GetConsoleScreenBufferInfo on *output* handle #1982
3 years ago
nick black
ba030a3293
Windows: kill some warnings
3 years ago
nick black
321f9ecbe2
allow cursor enable/disable without a true tty
3 years ago
nick black
a07650c494
ffmpeg: include avcodec version in banner
3 years ago
nick black
55b6800f22
Windows: input layer work #2096
...
Send standard terminal interrogation queries on Windows.
They've always worked; we simply needed the correct
console settings. Enable screen geometry lookup via
GetConsoleScreenBufferInfo(). This does not resolve
problems affecting e.g. MSYS2, where we're on Windows,
but need to use termios. We'll need a solution for that.
3 years ago
nick black
63bafa0bde
Windows: enable/disable linesigs (ENABLE_PROCESSED_INPUT) #2096
3 years ago
nick black
5d0eeb7ec4
Windows: implement cbreak_mode() #2096
3 years ago
nick black
b46f4aed8d
Windows: empty define for sigemptyset to eliminate warning #2062
3 years ago
nick black
4f88f6f58c
demo: convert %ju+cast with PRIu64 #2062
3 years ago
nick black
8922a7f3f5
demo: replace some %jd+casts with PRId64 #2062
3 years ago
nick black
6105bc5bd5
direct: remove windows ifdefs #2062
3 years ago
nick black
283bf31a41
Windows: set up output handle, demand utf8 CPs #2094
3 years ago
nick black
e1226783a7
gpm: set maxMod to 0 on suggestion of Autumn Lamonte #1405
3 years ago
nick black
f24a727ac2
rendered mode: adapt to pointer termios #2093
3 years ago
nick black
9eb2a6a23f
direct mode: fix up for pointer-based termios tpreserved #2093
3 years ago
nick black
07ee5a5372
Windows: kill tcsetattr failure path warning #2062
3 years ago
nick black
3f00d07579
set up Windows Terminal very early #2062
3 years ago
nick black
890310abf8
move Windows SetConsoleMode() to before queries #2062
3 years ago
nick black
bb053e82e3
typo in comment
3 years ago
nick black
f7f7c12b47
on SetConsoleMode() failure, proceed to remainder of terminal interrogation #2062
3 years ago