Commit Graph

673 Commits (60cce801b522de8ca705fd49f3bc8eea90e30902)

Author SHA1 Message Date
nick black 1108ebb5b6
Fix up some subtle pile issues
ncplane_destroy() needs to call ncplane_reparent_family(), not
ncplane_reparent() as it was doing (closes #1291). ->absy and
->absx actually are absolute; return them directly for an O(1)
ncplane_abs_yx() (down from O(N), huzzah). Add some unit tests
related to destroying and reparenting (#1286). Add ncplane_abs_y()
and ncplane_abs_x(), document them, etc.
4 years ago
nick black 1c0a623b8b
document new function ncplane_abs_yx() #1286 4 years ago
nick black 68b340e3c8
ncdirect: prep readline for use #1120 4 years ago
nick black 15386d57ce
nontrivial stacking unit test #1068 4 years ago
nick black 7e05d0438a
notcurses_init.3: fix up some syntax 4 years ago
nick black 54b44513c4
Wide EGC tweaks
Don't bias the nccell width by 1, or 0-length EGCs become
255 columns. We weren't actually using the width to drive
much anything until now, so this wasn't a problem, but it
is exposed as an error once we got rid of CELL_WIDE_ASIAN
and start looping through the actual egc column width.
Closes #1278, closes #1277
4 years ago
nick black 6d6416064e
ncdirect: set up fatal signal handlers #1271 4 years ago
nick black 998cf02f34
add NCDIRECT_NO_QUIT_SIGHANDLERS #1271 4 years ago
nick black 555a3262b1
add channel_palindex and friends 4 years ago
nick black af07822d35 Document base cell better
Improve the documentation for ncplane_set_base_cell() and
ncplane_set_base(). Go by render.c's authority (all three
channels are independently checked for transparency, and
replaced with the base cell if so--egc, fg, and bg). Add a
BASE CELL section to notcurses_plane.3. Check for, and reject,
an nccell which is secondary among a multicolumn EGC.

Closes #1238.
4 years ago
nick black e522429dfb
direct: reorder declarations to please freebsd 4 years ago
nick black 7e20a25482
ncdirect_*_palindex -> ncdirect_set_*_palindex #1261 4 years ago
nick black f1253560ad
ncdirect: set_ on rgb functions #1261 4 years ago
nick black 76d8e2dfce
ncdirect_{fg, bg}_default() -> ncdirect_set_{fg, bg}_default() #1261 4 years ago
nick black 58bc9bd3bc
fix up writeout stats, report in shutdown banner 4 years ago
nick black 638dde7657
remove unnecessary args from ncdirect_raster_frame() #1248 4 years ago
nick black 1d8fcbb5e4
ncdirect: styles{set, on, off} -> _styles #1247 4 years ago
nick black dd1cdc40d5 add NCSCALE_NONE_HIRES, NCSCALE_SCALE_HIRES #1250 4 years ago
nick black 4d8efcab82
Progress towards NCBLIT_3x2 by default
Add a new member 'sextants' to the terminfo cache (both
notcurses and ncvisual contain one of these, and both
initialize it the same way -- interrogate_terminfo()).
Add a new function, 'notcurses_media_defblitter()', and
deprecate 'ncvisual_default_blitter()' (the latter didn't
receive enough information to return NCBLIT_3x2). Update
all callers. Add new *internal* function rgba_default_blitter(),
so this logic can be freely changed in the future. If
sextants are available, and we're scaling, return NCBLIT_3x2.
Once we detect sextant availability, we'll have sexblitter
as a default -- stay tuned! #1114
4 years ago
nick black 248dd1fff2
add dynamic linesig control #1228 4 years ago
joseLuís 45c01c95af update align doc comments #1234 4 years ago
nick black 0b633fbdad
ncplane_at_yx_cell/at_cursor_cell: return bytes of egc 4 years ago
nick black 5cd3cdaf70
direct: s/ncplane/ncdirectv/g 4 years ago
Nick Black 730e9f69ec
Multithreaded ncls (#1232)
Thread out ncls to perform the media decode in different threads, in parallel. Only the display needs be locked. On a directory of 200 files on my 39070X, this speeds ncls from ~5s to ~1s. On 75 files, we go from ~.5s to ~.2s. On a single file, we lose about 5%. To facilitate this, ncdirect_render_image() has been split into two helpers, ncdirect_render_frame() and ncdirect_raster_frame().
4 years ago
nick black bf3e3eb0b5
ncplane_at_cursor_cell: rewrite with ncplane_at_yx_cell() 4 years ago
nick black 28b1a80433
ncplane_at_yx_cell: work directly with cell_duplicate() #1231 4 years ago
nick black 405b456428
disambiguate comment on ncdirect #1227 4 years ago
Nick Black 1bdd2d0555
Progress bar polishing (#1219)
Progress bars now support four 32-bit channels in ncprogbar_options, and uses them to color a gradient. The redraw procedure has been changed from O(n) to O(1). ASCII progress bars have been repaired. Closes #1213.
4 years ago
nick black 1bbbdd9dc0
annotate many functions with ((nonnull)) 4 years ago
nick black 827d758c19 properly color progbar #1202 4 years ago
nick black d56ea8b5e7 progbar: remove egcs options 4 years ago
nick black 82ffac8eed remove ncprogbar locking options #1202 4 years ago
nick black e37540c76e ncprogbar: implement core draw loop #1202 4 years ago
nick black 1d74979718 progbar core / poc #1202 4 years ago
nick black 6bff720122 initial API + documentation for ncprogbar #1202 4 years ago
nick black 33862979da
scan-build: remove dead stores 4 years ago
nick black fd2acde1b1 rename cell->nccell, keep alias #1200 4 years ago
Nick Black 6106dea18a
track+use width for polycolumn EGCs #1203 (#1205)
Some EGCs are more than 2 columns (wcwidth() never returns more than 2, so far as i can tell, but when multiple characters combine, we use the sum). An example would be ကြေ (Myanmar) which occupies three columns over the course of three characters. Track the width (biased by 1) in cell->width, taking over 8 bits from cell->reserved. Use this width in rasterization. Closes #1203.
4 years ago
nick black edf55d8cc1
notcurses_rasterize: adapt to piles 4 years ago
nick black a3220b8a73
add ncplane_descendant_p(), unit test it #1192 4 years ago
nick black e60a7aa463
add stat for notcurses_refresh() 4 years ago
nick black e6209ff5fc
with apologies to salman rushdie 4 years ago
nick black 14fa544433
add NCPLOT_OPTION_PRINTSAMPLE #1183 4 years ago
José Luis Cruz a69aa1d157 split out the UI ASCII art doc comments; fix #1180 4 years ago
nick black 58b47bf953
unit test for cell_load_egc32() #1176 4 years ago
nick black 0999e0ad3b add gcluster endianness comments 4 years ago
nick black 0645fb3931
run cell_load_char()/egc32() through cell_load() #1176 4 years ago
nick black 6fb5c1e512 Fill out some API holes, improve some comments
- Disambiguate the docs for ncplane_erase()
- Add ncpile_top(), ncpile_bottom()
- Refuse attempts to modify the standard plane's resizecb
- Copy alignment and resizecb in ncplane_dup()
- Add cell_load_egc32()
4 years ago
nick black 186b3a2a5e kill ifdefs via explitict initialization 4 years ago
igo95862 87d1ba17e6 Made CELL_TRIVIAL_INITIALIZER compatable between C and C++ 4 years ago