Commit Graph

722 Commits

Author SHA1 Message Date
nick black
5dcf4d3601
work around OIIO bswap32 definition #1392 2021-03-18 05:09:11 -04:00
nick black
6ce1daee74 [nccell] add comment about pixel gclusters #1401 2021-03-16 00:32:45 -04:00
nick black
645b61e9dc [pixel] pass celldimy through blitterargs #1401 2021-03-16 00:32:45 -04:00
nick black
b18682e86c [pixels] rewrite cell_pixels_p() for 0x02 #1401 2021-03-16 00:32:45 -04:00
nick black
9728e79396 [ncplayer] obey margins in direct mode #1411 2021-03-14 22:48:47 -04:00
nick black
7bc3800e27 [direct] accept limits for prep_image() #1411 2021-03-14 22:48:47 -04:00
nick black
d99b16a1ba ncpp: error_guard<int> in get_dim_x/y() #1413 2021-03-14 22:48:47 -04:00
nick black
04ad933a4b
ncplayer: don't try to drive four/eight #1406 2021-03-14 03:49:18 -04:00
nick black
9534bfdefd
ncplane_reparent: nonnull annotations 2021-03-11 22:38:06 -05:00
nick black
b9382231e2
c++: pass self on reparenting, not nullptr 2021-03-11 22:37:54 -05:00
nick black
268a720225
Keep hardcursurpos bool across rasterizations
Move hardcursorpos into the renderstate carried
across rasterizations. This eliminates undesirable vertical
movement following pixel image emission #1400.
2021-03-11 20:46:54 -05:00
nick black
6693e5f386
pass tcache down through visual blit stack #1095 2021-03-07 19:30:43 -05:00
nick black
7b61395ec4 sixel: set egc width properly based off tcache #1380 2021-03-02 08:12:37 -05:00
nick black
7592d0c4a3 rendered mode: properly scale pixel graphics #1380 2021-03-02 08:12:37 -05:00
nick black
0ffbba3365 restore stashed stats for closing banner #1374 2021-02-27 19:03:42 -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
53c52e30ff remove c++/rust channel wholesalers 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
40746e76e6 s/nonehi/hires/g 2021-02-27 19:03:42 -05:00
nick black
391fef3a3f cell pixel defines / inlines #200 2021-02-27 19:03:42 -05:00
nick black
036d0a8697 s/NCBLIT_SIXEL/NCBLIT_PIXEL/g #1095 2021-02-27 19:03:42 -05:00
nick black
aa4da3f335
nctree: drop bchannels from options 2021-02-24 23:33:53 -05:00
Nick Black
e30b12a480
nctree (#1361)
The nctree widget, PoC, and unitt rs #1164.
2021-02-23 14:38:06 -05:00
nick black
2221120543 add SIGILL to documented fatal signals #1357 2021-02-21 23:22:37 -05:00
nick black
8a7ff8a317 signals: restore them on exit #1357 2021-02-21 23:22:37 -05:00
nick black
925870bd7a
update some definitions in USAGE.md 2021-02-19 12:41:43 -05:00
nick black
4951ea3d88
update comment on notcurses_lex_scalemode() 2021-02-19 12:36:25 -05:00
nick black
d845e979c2
tighten up CELL_BG_ALPHA_MASK 2021-02-19 12:15:44 -05:00
nick black
2741b049cb
don't expose nctree in 2.2.2 2021-02-18 07:04:03 -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
bb14694000 add nctree movement api #1164 2021-02-15 13:23:41 -05:00
nick black
3eb42d6c0c implment nctree_create()/free() #1164 2021-02-15 13:23:41 -05:00
nick black
7a698310b6 ncinput is not opaque 2021-02-15 13:23:41 -05:00
nick black
2348546932 nctree API cut 1 #1164 2021-02-15 13:23:41 -05:00
nick black
e88875c4a7 nctree: add nctreecb to options #1164 2021-02-15 13:23:41 -05:00
nick black
7e56c8e1c2 nctree_options definition #1164 2021-02-15 13:23:41 -05:00
nick black
1b1e0b88be
ncplane_qrcode: drop blitter argument, update docs 2021-02-15 03:34:14 -05:00
nick black
e63ca5f704 use ALLOC in ncdirect.h 2021-02-10 04:29:06 -05:00
nick black
602531ff33 include warn_unused_result in ALLOC 2021-02-10 04:29:06 -05:00
nick black
1b61786694 apply ((alloc)) attributes to API 2021-02-10 04:29:06 -05:00
Marek Habersack
d32bef358d [C++] API sync
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.
2021-02-07 23:10:24 -05:00
nick black
6b126f4049
add notcurses_canbraille() capability test 2021-02-07 18:31:31 -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
43dd0440f7
add raster timing stats #1324 2021-02-02 21:59:29 -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
b112b93901 use byteswap.h on GNU/Hurd #1320 2021-02-02 00:57:58 -05:00
nick black
cb58f45dd3 Write blit quadrants to channel
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!
2021-02-02 00:57:58 -05:00
nick black
f37ebba78d Add CELL_BLITTEDMASK to track ncvisual cells
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().
2021-02-02 00:57:58 -05:00
nick black
6bd288f056 Workable split of library
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>
2021-01-19 23:09:22 -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