Commit Graph

313 Commits

Author SHA1 Message Date
nick black
d8cc3569ac
Block some signals while writing
Writing a partial escape can easily lock up a terminal. This
is especially relevant when working with bitmaps, as they're
thousands or even millions of times longer than a typical
escape. Immediately before writing, block SIGINT, SIGQUIT, and
SIGTERM in the writing thread, and unblock them upon emerging
(at which point we'll immediately see any queued signal
get delivered). Don't block signals like SIGSEGV that would
seem indicative of actual problems. For this to actually work,
all other threads must also have the signals masked; we thus
now add them to the signal mask of notcurses_getc(), rather
than deleting them. Closes #1416.
2021-04-27 16:53:44 -04:00
nick black
e43a9955cd
channel_* functions -> ncchannel_* #1570 2021-04-27 14:10:41 -04:00
Nick Black
c8680255be
palette256 -> ncpalette #1570 (#1573)
everything prefixed with palette256 is now prefixed with ncpalette
2021-04-22 04:11:06 -04:00
nick black
f4aa419a31
add notcurses_canhalfblock()/notcurses_canquadrant() #1575 2021-04-22 00:10:55 -04:00
nick black
6c7b40debf
add stats for sprixel emissions/elisions #1563 2021-04-21 11:43:10 -04:00
nick black
d5b58d9f58
v2.2.8 2021-04-18 13:24:24 -04:00
nick black
eefc4fb91f
v2.2.7 2021-04-18 12:34:41 -04:00
nick black
6b7195a387 document new function ncvisual_inflate() #1546 2021-04-18 01:12:28 -04:00
nick black
32500239ac
cell_extract() -> nccell_extract() 2021-04-14 10:30:22 -04:00
Nick Black
e591ec2e98
cell -> nccell throughout much of remaining API (#1535)
cell -> nccell throughout much of the API #1532
2021-04-14 06:42:14 -04:00
nick black
e017dcba89
v2.2.6 2021-04-12 05:01:58 -04:00
nick black
0c566cd74a [ncvisual] pipe transcolor through #1518 2021-04-10 12:02:58 -04:00
nick black
d504e972cc
cell_release -> nccell_release 2021-04-10 09:09:56 -04:00
nick black
cf3a6317aa export ncdirect_stream() 2021-04-10 04:41:14 -04:00
Nick Black
04b1ba8ed2
Dankamongmen/unify geom (#1514)
deprecate ncvisual_geom() in favor of new ncvisual_blitter_geom(), which allows caller to get the blitter used. replace the checks and calculations in ncvisual_render() with a call to ncvisual_blitter_geom(), unifying the two paths (and eliminating several bugs in the unloved ncvisual_geom()).
2021-04-10 04:04:02 -04:00
nick black
f294c6bb0b
add ncplane_pixelgeom() #1507 2021-04-10 00:34:38 -04:00
nick black
05082fc277
ncplane_as_rgba(), returns pixel geometry along with bitmap #1508 2021-04-08 04:12:11 -04:00
nick black
8c78b089e1
v2.2.5 2021-04-04 14:28:16 -04:00
nick black
57114c8005
[bitmaps] remove redundant PixelWipeBlocks test 2021-03-28 16:59:02 -04:00
nick black
78c8e70933 [planes] add NCPLANE_OPTION_MARGINALIZED #1472 2021-03-27 07:07:48 -04:00
nick black
86de98c5d2 Fix cell blit / plane vertical alignment
Deprecate ncplane_align(), after rewriting it as a passthrough
to new function ncplane_halign(). Add ncplane_valign(). Update
all callers. Closes #1468.
2021-03-27 02:31:51 -04:00
nick black
6105913d06 [planes] add NCPLANE_OPTION_VERALIGNED #1465 2021-03-26 04:18:15 -04:00
nick black
828cce634a [capabilites] remove redundant notcurses_canpixel() 2021-03-25 20:41:02 -04:00
nick black
852b0ad0ec
[NEWS] mention nctabbed for 2.2.4 2021-03-25 16:44:22 -04:00
nick black
f8b68947f3 [NEWS] mention NCVISUAL_OPTION_HORALIGNED #1443 2021-03-24 05:22:15 -04:00
nick black
33d408b4a3
[sixel] call sprite_sixel_init at proper time #1436 2021-03-22 07:30:17 -04:00
nick black
a6548fbcc8 [ncvisual] refuse to blit bitmaps to standard plane 2021-03-22 03:43:18 -04:00
nick black
f35e2eb982
notcurses_visual.3: link to sixel/kitty 2021-03-08 23:31:27 -05:00
nick black
bc84987af5
v2.2.3 2021-03-08 07:10:50 -05:00
nick black
4a203ef0a9
direct mode: optimize out redundant SETAF, nice 2021-02-28 09:08:47 -05:00
nick black
49ce0d1c57
mention SIGCONT along with SIGWINCH 2021-02-28 04:26:00 -05:00
nick black
100a89291b hide cell_{b,f}channel(), cell_set_{b,f}channel() 2021-02-27 19:03:42 -05:00
nick black
6c7c9be6d2 require explicit check for pixel support
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.
2021-02-27 19:03:42 -05:00
nick black
e782287142 add NCBLIT_PIXEL to NEWS 2021-02-27 19:03:42 -05:00
nick black
fe8abbecc5 NEWS: mention nctree for 2.2.3 2021-02-24 22:23:01 -05:00
nick black
2221120543 add SIGILL to documented fatal signals #1357 2021-02-21 23:22:37 -05:00
nick black
c10f5a40ce
v2.2.2 2021-02-18 07:07:26 -05:00
nick black
1df9d85f28
Lock accesses to notcurses_stats #1139
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.
2021-02-18 01:37:30 -05:00
nick black
1b1e0b88be
ncplane_qrcode: drop blitter argument, update docs 2021-02-15 03:34:14 -05:00
nick black
be4a9154a8
v2.2.1 2021-02-09 19:34:03 -05:00
nick black
3cdf7160de
v2.2.0 2021-02-08 09:35:34 -05:00
nick black
6b126f4049
add notcurses_canbraille() capability test 2021-02-07 18:31:31 -05:00
nick black
54ca2249df
v2.1.8 2021-02-03 08:34:49 -05:00
nick black
b3569b6aef
Initialize Readline on demand
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.
2021-02-03 00:18:10 -05:00
nick black
2491b693ba
Add missing channel_set_palindex()
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.
2021-02-02 20:36:59 -05:00
nick black
7eafcfe598
rename notcurses-tetris -> nctetris 2021-01-21 03:51:12 -05:00
nick black
121f10a9c5
v2.1.7 2021-01-21 03:21:31 -05:00
nick black
57271d09ce
v2.1.6 2021-01-21 02:44:00 -05:00
nick black
45c389a709 document *_core_init() #1301 2021-01-19 23:09:22 -05:00
nick black
1631818784
rename notcurses-view to ncplayer #1299 2021-01-18 14:22:54 -05:00
Nick Black
9112185657
Split up notcurses/notcurses-core (#1297)
Extract `libnotcurses-core` from `libnotcurses`. The former contains everything except multimedia code. The latter contains multimedia stuff (a wrapper around FFmpeg or OIIO). If built with `-DUSE_MULTIMEDIA=none`, there will not be any `libnotcurses.so` generated. `libnotcurses.so` uses library constructors/destructors to insert its implementation into the `ncvisual` stack at runtime. Users linking `-lnotcurses` will get the full implementation; users linking `-lnotcurses-core` only will get the stack less multimedia code.

The upshot of this is that someone can compile/install only `libnotcurses-core`, and a program linked against it will work just fine. This eliminates the need to install the full (large) dependency stack of the multimedia code unless necessary. This will hopefully be useful for e.g. installers etc. Closes #339.
2021-01-18 14:10:04 -05:00
nick black
3ecdde74d0
v2.1.5 2021-01-15 05:14:07 -05:00
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.
2021-01-15 00:32:55 -05:00
nick black
1c0a623b8b
document new function ncplane_abs_yx() #1286 2021-01-14 23:06:43 -05:00
nick black
0a165a9de8
paint: solve for egc following colors #1068 2021-01-10 11:21:56 -05:00
nick black
68b340e3c8
ncdirect: prep readline for use #1120 2021-01-08 07:28:24 -05:00
nick black
15386d57ce
nontrivial stacking unit test #1068 2021-01-08 04:59:24 -05:00
nick black
e617acecc7
v2.1.4 2021-01-03 19:55:32 -05:00
nick black
998cf02f34
add NCDIRECT_NO_QUIT_SIGHANDLERS #1271 2021-01-02 23:18:28 -05:00
nick black
70b74a749b
v2.1.3 2020-12-31 02:57:16 -05:00
nick black
f1253560ad
ncdirect: set_ on rgb functions #1261 2020-12-28 13:52:58 -05:00
nick black
76d8e2dfce
ncdirect_{fg, bg}_default() -> ncdirect_set_{fg, bg}_default() #1261 2020-12-28 13:38:05 -05:00
nick black
638dde7657
remove unnecessary args from ncdirect_raster_frame() #1248 2020-12-28 02:41:22 -05:00
nick black
1d8fcbb5e4
ncdirect: styles{set, on, off} -> _styles #1247 2020-12-28 02:21:37 -05:00
nick black
55d563b646
v2.1.2 2020-12-26 02:53:40 -05:00
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
2020-12-25 17:05:31 -05:00
nick black
e1b1654d1e
NEWS: mention ncdirect image render split 2020-12-21 19:51:22 -05:00
nick black
248dd1fff2
add dynamic linesig control #1228 2020-12-20 20:16:08 -05:00
nick black
d6d5757b1d
v2.1.1 2020-12-16 17:42:06 -05:00
nick black
d56ea8b5e7 progbar: remove egcs options 2020-12-13 09:12:08 -05:00
nick black
6edafd1f84
v2.1.0 2020-12-13 03:04:23 -05:00
nick black
fd2acde1b1 rename cell->nccell, keep alias #1200 2020-12-13 00:49:37 -05:00
nick black
8497ee1877
v2.0.12 2020-12-12 06:42:47 -05:00
nick black
5fc0577529
NEWS: mention ncplane_resize_maximize() 2020-12-10 07:44:31 -05:00
nick black
eb485cda21
v2.0.11 2020-12-09 00:34:37 -05:00
nick black
a3220b8a73
add ncplane_descendant_p(), unit test it #1192 2020-12-09 00:18:47 -05:00
nick black
361a253aea
v2.0.10 2020-12-06 13:22:26 -05:00
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()
2020-12-03 01:02:16 -05:00
nick black
8083b46e3b
v2.0.9 2020-12-01 04:37:37 -05:00
nick black
2a45620cd6
v2.0.8 2020-11-27 16:49:56 -05:00
nick black
e3b2c91999
add NOTCURSES_VERSION_COMPARABLE #1131 2020-11-27 16:13:44 -05:00
nick black
202e3535d5 document new NCSTYLE_STRUCK #1138 2020-11-25 20:04:14 -05:00
nick black
fd97aa844c implement ncpile_{render, rasterize}() 🦀🦀 #1135 2020-11-25 19:19:31 -05:00
nick black
b2516d8534 Declare ncpile_render() and ncpile_rasterize() #1135 2020-11-25 19:19:31 -05:00
nick black
aa5b881e84 NEWS: purge empty sections 2020-11-25 19:19:31 -05:00
nick black
a2c35735d1 finish out NEWS for multipiles #1078 2020-11-25 19:19:31 -05:00
nick black
740dc2497d NEWS: mention integer version defines 2020-11-24 04:19:47 -05:00
nick black
b6e5b60374 ncpile_create() not NCPLANE_OPTION_NEWPILE #1078 2020-11-23 22:58:05 -05:00
nick black
b747af2ae8 drop NCPLANE_OPTION_NEWPILE #1078 2020-11-23 22:58:05 -05:00
nick black
0da6a8c44b add NCPLANE_OPTION_NEWPILE #1078 2020-11-23 22:58:05 -05:00
nick black
73b2f1bf19
v2.0.7 2020-11-22 00:22:11 -05:00
nick black
acdcf9e41f
v2.0.6 2020-11-21 23:35:24 -05:00
nick black
537caa2173
v2.0.5 2020-11-21 22:29:02 -05:00
nick black
65ed8c0d86
undeprecate ncplane_new(); why break running code? 2020-11-21 22:26:49 -05:00
nick black
c0cb5c7ff9
add ncplane_resizecb() #1124 2020-11-18 08:00:02 -05:00
nick black
6084105c68
add ncplane_set_resizecb() #1124 2020-11-18 07:49:22 -05:00
nick black
a92e5d97e0 don't threaten to remove ncplane_new() #1115 2020-11-17 23:42:36 -05:00
nick black
61baabe9a1 eagle, HUD: use default blitter 2020-11-17 23:42:36 -05:00
nick black
eef6df8c0a death to horiz #1115 2020-11-17 23:42:36 -05:00
nick black
a9fbe41f2b document the New Way 2020-11-17 23:42:36 -05:00