Add `notcurses_check_pixel_support()` and
`ncdirect_check_pixel_support()` per #1367. Removes
NCOPTION_VERIFY_SIXEL, again per #1367. Adds
`free_terminfo_cache()`, and calls it from both
`notcurses_stop_minimal()` and `ncdirect_stop()`.
Update all documentation. Closes#1371 and #1367.
notcurses_stats() and notcurses_stats_reset() now take the
new statlock member, as do stat modifications from render,
raster, writeout, resize, plane creation, and plane
destruction. Add nonnull attributes to stats API. Initialize
and destroy statlock as part of notcurses struct. Update
documentation. Free pilelock on error paths. Closes#1139.
After a long delay, apologies :)
Added:
* NotCurses: `can_sextant` (`notcurses_cansextant`)
* Notcurses: `linesigs_enable` (`notcurses_linesigs_enable`)
* Notcurses: `linesigs_disable` (`notcurses_linesigs_disable`)
* Pile: `top_with` (`ncpile_top`)
* Pile: `bottom_with` (`ncpile_bottom`)
* Plane: `resize_maximize` (`ncplane_resize_maximize`)
* Plane: `get_abs_x` (`ncplane_abs_x`)
* Plane: `get_abs_y` (`ncplane_abs_y`)
* Plane: `get_abs_yx` (`ncplane_abs_yx`)
* Plane: `load_egc32` (`cell_load_egc32`)
* Plane: `is_descendant_of` (`ncplane_descendant_p`)
* Progbar: new class, wraps `ncprogbar_*`
Changed:
* Plane (ABI break): `at_cursor` overloads now return `int` where
before they returned `bool` because the underlying Notcurses API
only signalled the operation status with the return value while now
it returns actual information.
Eliminate NCDIRECT_OPTION_NO_READLINE (it was only introduced in
Notcurses 2.1.6). Add a new function, ncdirect_readline(). Upon
first call to this function, initialize libreadline. Destroy
libreadline in ncdirect_stop() iff we initialized it. Add
hilodirect guessing game PoC from #1325. Rename
notcurses_directmode.3 to notcurses_direct.3. Closes#1326.
Implement channels_set_fg_palindex() and channels_set_bg_palindex()
in terms of channel_set_palindex(). Add missing entries to
notcurses_channels.3 man page. Use uint32_t in place of unsigned
when dealing with channels in notcurses.h.
Reclaim the "blitted" and "full foreground" bits in the
channels. Instead, we now write four bits, encoding the
four quadrants we might occupy as the result of a blit.
These four imply the previous two, leaving us with four
free bits remaining in the channels. This opens a clear
path to O(1)-time, zero-space blitter stacking #1068.
w00t!
For properly stacking transparent blittings (#1068), we
need tag those cells which both (1) originated in an
ncvisual operation and (2) have some transparency. For
the three affected blitters (halfblock, quadrant, and
sexblitter), call cell_set_blitted().
Rather than trying to force things in via library constructors
and weak symbols and --whole-archive and pkg-config tricks, just
add new functions ncdirect_core_init() and notcurses_core_init().
libnotcurses has ncdirect_init() and notcurses_init(), which pass
through to these. apps linking against notcurses-core ought use
the _core_ variants directly. This gets exactly the linkage we
want, everywhere. Convert many PoCs to _core_ variants. #1301
Signed-off-by: nick black <dankamongmen@gmail.com>
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.
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
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.