Commit Graph

91 Commits (84631369d46dc85c88e74bd372bfcf0cb2d1bcc5)

Author SHA1 Message Date
nick black 3bc15c2824 inlined egcs: straightline cell_duplicate() 4 years ago
nick black 1605416585 more egc-inline test fixes 4 years ago
nick black 604747c8f2 notcurses_puttext: use libunistring for wordbreaking #772 4 years ago
Nick Black d5dca33e00 ncneofetch: don't print (null) for distro_pretty 4 years ago
nick black b49d1ad838
rewrite all unit tests to use testing_notcurses() #718 4 years ago
nick black b2dcc50606
notcurses_options: fold bools into flags 4 years ago
nick black 75f458d69a
ncplane_yx: results are relative to bound plane 4 years ago
nick black 0766007a77
tester: kill off inhibit_alternate_screen #651 4 years ago
nick black 6edc6f098f
streamline unit test common initialization 4 years ago
nick black d9bb9b03af notcurses-tester: run passing tests in C locale #325 4 years ago
nick black ed548ab590
tests: apply clang modernizations 4 years ago
nick black 9e28e14001
move enforce_utf8() into main 4 years ago
nick black 0a6f5d1a9f
enforce_utf8() for wide tests, duh 4 years ago
Nick Black c6a9997554
Normalize ncplane_at_* / ncplane_set_base() (#479)
* ncplane_at_* and ncplane_at_cursor_*

We had notcurses_at_yx() expanding into three distinct parts of
the cell structure, and ncplane_at_yx() / ncplane_at_cursor()
writing directly to a cell. It was annoying to remember which
was which. The latter two now have a signature matching
notcurses_at_yx(), while the old functionality has been moved
to ncplane_at_yx_cell() and ncplane_at_cursor_yx(). #476
4 years ago
nick black 295ae0a8d0
extract wide glyph unit tests into their own file #475 4 years ago
nick black e6a80ab98d Strip down OverWide unit test 4 years ago
nick black d26b111f35 new unit test Ncplane::OverWide #362 4 years ago
nick black a7f17040ce another scrolling unit test 4 years ago
nick black a77774f4dc
notcurses_at_yx(): value-result u32+u64, not cell
Resolves #410. notcurses_at_yx() accepted a cell*, but the
gcluster of this cell was always set to 0. The EGC is instead
a heap-allocated copy, returned as the primary return value.
This is due to the absence of an egcpool to bind against.
Existing callers can be converted thus:

* instead of passing cell 'c', pass &(c)->attrword, &(c)->channels
* either initialize 'c' with CELL_TRIVIAL_INITIALIZER, or set its
   gcluster field to 0 following the call

I've updated all calls from tests/demos, updated the docs, and
updated the C++ and Python wrappers.
4 years ago
nick black 73b61f6a69 Add bound planes (#71) plus docs/tests
Add ncplane_bound(3). This allows a new plane N to be created in the
*bound* state relative to another ncplane B. If B moves, N moves the
same amount. If N is moved, the coordinates are taken relative to B
as opposed to the standard plane. If B is destroyed, N is destroyed.
Each plane can have many planes bound to it, but can only be bound to
a single plane. Add ncplane_reparent(3). This allows a plane to be
detached from any plane to which it is bound, and optionally rebound
to a new plane. The standard plane cannot be reparented.
Documentation and unit tests have been added for both.
4 years ago
nick black 3498956370
ncplane_mouseevent_p()->ncplane_translate_abs()
ncplane_mouseevent_p() is retired--it was poorly named, and
ncplane_translate_abs() does what it does, plus more, plus
more generally (it works on any y, x, not necessarily an
ncinput). update c++ wrappers #394.
4 years ago
nick black 9b0603bb32
Implement + test ncplane_mouseevent_p() #305 4 years ago
Nick Black 745e742a12
Fix gradient engine #368 (#372)
Simplify and correct the gradient engine, resolving all test breakage.
4 years ago
nick black 002e8be574
implement ncplane_format() #347 4 years ago
nick black 35d850f008
Implement + test ncplane_putegc_stainable() #352 4 years ago
Nick Black e6637e81cc
Prep for serious rusting #101 (#354)
* CMake: add USE_PANDOC, USE_DOXYGEN options #101
* README: mention rust
* start integrating rust into build #101
* CMake: add USE_NETWORK option for cargo
* Debian: build-dep on doxygen
* rust: colloquy checks in Cargo.lock
* extract NCKEY defines into their own include
* colloquy: use clap to parse CLI args
* CMake: unify option namespace
* Python: update include path
* Rust: fix up --frozen workings for -DUSE_NETWORK=off
* CMake: abstract out colloquy a little
* Sync direct.hh to the New Way
4 years ago
nick black 9fc53e811f
ncplane_perimeter() plus unit test 4 years ago
nick black 85e377e652
Accept US-ASCII/C encoding, with warning. 4 years ago
nick black 54c57b3487 s/CELL_STYLE/NCSTYLE/ throughout 4 years ago
nick black 08f6fa0e79 implement ncplane_dup() 5 years ago
Nick Black 7ec022d067
Painter's algorithm #255 (#274)
* notcursesI.avi 30 -> 60fps
* painter's algorithm works #255
5 years ago
Nick Black f6975d11d5
Docs/API sweep for 1.0.0 #244 #249 (#250)
* sync up some docs #244
* sync README and man page
* notcurses_output() man page work
* pull attr/channels from output functions #244
* witherworm: clean up explicit moves #244
* still more man page work
* notcurses_lines, last of the man pages i think
* panelreel man page #244
* debian: ruby-ronn->pandoc
* debian: full multiarch compliance
* debian: symbols file
* pandoc: fix syntax for lexgrog
* fm6.mkv: strip audio
* pandoc: fix up apropos man syntax #249
* ncurses_lines man page
5 years ago
Nick Black 2fbc94e41c
Higher planes obliterate bisected wide glyphs #158 (#243)
* higher planes stomp wide glyphs
* broken unit test
* develop out widestomp PoC
* fix notcurses_at_yx()
* fix up dig_visible_cell() return value
* refuse wide glyph on last column #242
* set adjacent cell wide when rendering #158
* xray: eliminate weird color flicker
* witherworm: don't eat wide glyphs
* unit test for boxed glyph
* uniblock: no need to emit so many U+200Es
* witherworm: remove wide glyph hack
5 years ago
nick black 2ea4f77875
introduce ncplane_aligned() #237 5 years ago
nick black 21c3861804
s/bannner/banner/g, heh 5 years ago
Nick Black ce2a390b52
Out with googletest, in with doctest #202 (#231)
* introduce doctest over googletest #202
* call dtester in in targets
* doctest conversion #202
* channel.cpp -> doctest #202
* egcpool tests -> doctest #202
* input tests to doctester
* zaxis -> doctest
* drone: always define LANG
* libav to doctest #202
* panelreel tests to doctest #202
* spec that a C++17 compiler is now required for doctest #202
* enmetric tests -> doctest #202
* fade tests -> doctest #202
* notcurses test case -> doctest #202
* last conversion to doctest #202
* finish move to doctest #202
* drone: set up make test
5 years ago
nick black 66057e0363
eliminate most uniglyphs from unit tests #196 5 years ago
nick black 37a45955ad
FreeBSD: declare array explicitly 5 years ago
nick black cb2bf16a73 support building sans ffmpeg #153 5 years ago
nick black 452e1d302e
output API enhancements #210 #209
Allow -1 in move specification to remain where we are on that
axis (#210), necessary for context-sensitive aligned output.
Add _aligned forms to printf and vprintf. Invert various output
functions so that simpler form is static inline wrapper around
more complicated form, rather than complicated form being a
static inline composition, facilitating atomic move+output. All
output forms now have a simple form (no alignment, placement at
cursor), an _aligned() form, and a _yx() form.
5 years ago
Nick Black 0e0925a84e
Planereel exploration app, panelreel logic fixes (#188)
* planereels tester #180
* suppress_banner in all tests
* tabletcb: start passing back tablet
* properly initialize fbbytes stat
* panelreel: logic fixes #178
* install all testing data
5 years ago
Nick Black 957549105b
Wide character rigor (#117) (#157)
* unidamage PoC
* add cell_load_simple()
* clear CELL_WIDEASIAN_MASK in cell_load()
* split out render code
* add CELL_SIMPLE_INITIALIZER
* widecolor: fix message plane
* widecolor: simplify color increments
* document wide character handling
* unit tests for wide obliteration #117
* widechar obliteration hardening #117
* widecolor -> widechomper, update man page
5 years ago
Nick Black ff463d464e
Channels API sanity #119 (#138)
* orthogonalize channel/channels/cells APIs #119
* sync README.md with new ncplane channels api #119
5 years ago
nick black a1c90a347a
add ncplane_box() corner masking 5 years ago
nick black 0001fa955d
on a wide enough screen, this test breaks 5 years ago
nick black 7c72b0ce83
emoji unit test 5 years ago
nick black 23f8a070b3
unit tests: don't try to close a NULL outfp_ 5 years ago
nick black ca2f0471c3
setlocale(LC_ALL, "") everywhere 5 years ago
nick black 1821867e35
move outfp out of notcurses_options #130 5 years ago
nick black 7eafdd6772
fix up unit testing sanity 5 years ago