Commit Graph

2126 Commits (e268301a4217f0ed045c7e11d076f8197dc28bb9)
 

Author SHA1 Message Date
nick black 0cda775900
metric: use FE_TONEAREST instead of TOWARDZERO #615 4 years ago
nick black 343b4d144e
demo: purge use_oiio/use_nomm 4 years ago
nick black ec1af2d090 oiio: fix image rendering 4 years ago
nick black 4f5c8ef3d7 eagle/outro support for non-multimedia builds 4 years ago
nick black 2d3fef115e ncfadectx_setup(): remove timespec param #659 4 years ago
nick black fd2bb53f83 fade: more unit tests, verify abort on callback #659 4 years ago
nick black 3deeecdf2e fade: finish out proposed API, basic unit tests #659 4 years ago
nick black 74e8e9c3d9 fade: move more reproduced code into common area #659 4 years ago
nick black 0766dd08e7 fade: factor out duplicated maxsteps determination #659 4 years ago
nick black 3ff083b73f Fade API: move control of delays into callback 4 years ago
nick black be35dee206 reuse and destroy new plane in OIIO streamer #660 4 years ago
nick black 607353d96c reuse and destroy newly-created plane in ncvisual_stream() #660 4 years ago
nick black a617598f13 notcurses_drop_planes(): fix up links #661 4 years ago
nick black e879bf8f93
let outro demo run on no-multimedia builds 4 years ago
nick black 8709387590 Implement CELL_ALPHA_BLEND for all blitters #652 4 years ago
nick black 8793fcd876 c++ Visual: add from_plane constructor, test #654 4 years ago
nick black 6a9bbad91e
Visual C++ constructor test #538 4 years ago
nick black 0331ae4c4c
introduce NCVISUAL_OPTION_BLEND #652 4 years ago
nick black acd956393b
subproc: remove debugging cruft 4 years ago
nick black 33318254b2
absorb first ncvisual_decode into ncvisual_from_file() #655 4 years ago
nick black 10b134b596
outro: render the first frame of samoa along with changes #652 4 years ago
nick black 8da22e4425
zaxis: reset links in the direction of travel 4 years ago
nick black 89ffb6658e
CMake: improvements to testing usability
Replace USE_TESTS with BUILD_TESTING variable already exported by CTest.
Use the CMake 3.17 CMAKE_CTEST_ARGUMENTS to pass "-V" to ctest. #651
4 years ago
nick black 0766007a77
tester: kill off inhibit_alternate_screen #651 4 years ago
nick black e88bc5c04b
Metric tests: observe local customs #650 4 years ago
nick black 899adf873d
ncvisual.3: update man page 4 years ago
nick black f47bde1c4e
Graceful fallback among blitters #637
If we're in ASCII mode, no blitter except for NCBLIT_1x1 is going to
work. Whenever NCBLIT_DEFAULT is provided, select NCBLIT_1x1 if we're
in ASCII mode. Add NCVISUAL_OPTIONS_MAYDEGRADE and
NCPLOT_OPTIONS_MAYDEGRADE. Both serve to allow smooth degradation when a
blitter other than NCBLIT_DEFAULT has been provided. Closes #637.

Make calc_gradient_cell() static inline so our templated ncppplot
implementation can use it (ugh). When using NCBLIT_1x1 for plots in
ASCII mode, use space rather than full block, and invert colors.

Use NCBLIT_DEFAULT in the demo for the FPS plot.
4 years ago
nick black 33c0e7fa2c
banner: reset stderr after printing any warnings 4 years ago
nick black cce55f1d4e
ncplot: fix top row calculations #642 4 years ago
Nick Black ebcba82d4b
Fully general ncvisual layer (#647)
This represents an essentially complete rewrite of ncvisual and associated code. It had two major goals:

Improve the ncvisual API based off lessons learned, pursuant to the upcoming API freeze. In particular, I wanted to:

decouple ncvisuals from ncplanes. It should be possible to render a ncvisual to multiple planes, with different scaling each time. It should be possible to create an ncvisual without a plane, etc.
normalize the various ways of constructing an ncvisual -- file, memory, plane, etc.
Support multiple blitters, from 7-bit ASCII to Sixel. This required writing the blitters in several cases, and they're not yet in their final implementations (but the API is fine)
I have not yet unified Plots and Visuals, and might not, given that the Plot code works fine. We could at this point implement Plots in terms of Visuals, though -- the blitter backend range has been unified. Sixel is not yet implemented, though it is listed.

There is a new POC tool, blitter. It renders its arguments using all possible blitter+scaling combinations. Another new POC, resize, displays its argument, then resizes it to the screen size and displays that, explicitly making use of ncvisual_resize() rather than a scaling parameter to ncvisual_render().

This also eliminates some memory leaks and bugs we were seeing in trunk, and brings in Sixel scaffolding.

The C++ wrapper will also need patching back up; I cut most of it down while wrestling with this crap, urk.

Closes #638, #562, and #622.
4 years ago
Nick Black 478ebadd64 Revert "Change DSO versioning scheme"
This reverts commit 51205551f5.
4 years ago
Marek Habersack 51205551f5 Change DSO versioning scheme
This commit introduces the same shared library versioning scheme as used
by the SDL library.  The advantage is that different versions of
notcurses can be installed alongside each other (which is not an
unlikely scenario, as SDL itself certifies) and that, if the versioning
protocol is followed, any change to ABI will produce a DSO whose name
will not break any applications linked against any previous version.
4 years ago
nick black b80ac3d241
demo: move HUD/about to top of screen 4 years ago
Marek Habersack b5d8549bb3 [C++] Allow multiple instances of `NotCurses`
This is to make it possible, in the future, to create multiple instances
of `NotCurses` for multiple terminals.  The first instance of
`NotCurses` becomes the default one, so that any instances of other
classes that aren't explicitly created with a pointer to another
`NotCurses` instance still work as expected.

Note that currently trying to call `notcurses_init` twice results in the
following error for me:

    0x55555559bfc0 is already registered for signals
    Couldn't drop signals: 0x55555559bfc0 != 0x5555555b6720
    terminate called after throwing an instance of 'ncpp::init_error*'

    Program received signal SIGABRT, Aborted.

The error is signalled by `setup_signals` and the pointer shown in the
message points to the first `struct notcurses` instance created.
4 years ago
nick black dbc20bd5c0
add man page for ncmetric(3) #631 4 years ago
Marek Habersack e0462ed53a
[C++] Sync API changes (#633)
Added:

  * NotCurses: can_utf8 (`notcurses_canutf8`)
  * NotCurses: debug (`notcurses_debug`)
  * Plane: center_abs (`ncplane_center_abs`)
  * Plane: set_channels (`ncplane_set_channels`)
  * Plane: set_attr (`ncplane_set_attr`)
  * Reader: clear (`ncreader_clear`)

Changed:

  * USAGE.md: clarfied when C++ throws exceptions
4 years ago
nick black e097723a63
subproc: on older linux, fall back to fork() 4 years ago
nick black 8971bda0c2 ncpp: stop() resets _instance, add unit test #538 4 years ago
nick black 8e649ebe46 ncpp: test NotCurses construction/stop 4 years ago
nick black 4347cd956a merge in master changes 4 years ago
nick black 9675ed251e
eagle demo: work with ascii mode #634 4 years ago
Marek Habersack 9ca8d9c9c6 Correctly cast `ncpp::Plane` to `ncplane*`
Fixes: https://github.com/dankamongmen/notcurses/issues/616

SIGSEGV was caused by an invalid cast.

Short explanation: PEBKAC

Long explanation: `Selector.hh`, `Plot.hh` and `MultiSelector.hh` did
not include `Plane.hh`, they merely declared `class Plane;` because
inclusion of `Plane.hh` would cause circular dependencies to appear and
the compiler would be unhappy.  On top of that, yours truly wrenched the
compiler's hands and caused it to believe that a pointer to `Plane` is
really a pointer to `ncplane*` which was quite a silly thing to do as
the compiler, not having included `Plane.hh` and thus not knowing full
definition of the type, wasn't able to look up the type cast operator in
`Plane`.

Don't abuse `reinterpret_cast`, kids!
4 years ago
nick black 698f664bd8
drone: update to new builders 4 years ago
nick black c08c9b7f7f
v1.4.3 4 years ago
nick black ba8d80d444
procroller: don't recurse on argv[0], whoops 4 years ago
nick black 24dae2cf15
ncmetric: tighten up PREFIXFWIDTH macros 4 years ago
nick black bec9691999
NEWS: document *PREFIXFMT macros #630 4 years ago
nick black cce9384ab8
ncmetric: adapt PREFIXFMT to multibyte #630 4 years ago
nick black 4e9f46e063
Correct scaling in qrcode_rows() 4 years ago
nick black e682b4fae8
qrcode: only render sufficiently small codes #629 4 years ago