Commit Graph

93 Commits

Author SHA1 Message Date
nick black
16ff667325 blissful endianness-opacity
not caring about endianness is the opiate of the masses.
happy, happy masses. remove endianness.h and all its baleful
influence by explicitly breaking up the cell structure. #892
2020-08-16 01:44:36 -04:00
nick black
7f8631b35c wide tests: death to cowardly copying 2020-08-15 17:38:20 -04:00
nick black
3bc15c2824 inlined egcs: straightline cell_duplicate() 2020-08-15 17:38:20 -04:00
nick black
1605416585 more egc-inline test fixes 2020-08-15 17:38:20 -04:00
nick black
604747c8f2 notcurses_puttext: use libunistring for wordbreaking #772 2020-07-22 03:31:54 -04:00
Nick Black
d5dca33e00 ncneofetch: don't print (null) for distro_pretty 2020-06-28 06:43:29 -04:00
nick black
b49d1ad838
rewrite all unit tests to use testing_notcurses() #718 2020-06-15 23:58:43 -04:00
nick black
b2dcc50606
notcurses_options: fold bools into flags 2020-06-07 05:08:46 -04:00
nick black
75f458d69a
ncplane_yx: results are relative to bound plane 2020-06-03 12:17:51 -04:00
nick black
0766007a77
tester: kill off inhibit_alternate_screen #651 2020-05-29 02:30:57 -04:00
nick black
6edc6f098f
streamline unit test common initialization 2020-05-17 07:57:21 -04:00
nick black
d9bb9b03af notcurses-tester: run passing tests in C locale #325 2020-05-11 05:59:55 -04:00
nick black
ed548ab590
tests: apply clang modernizations 2020-05-07 00:52:40 -04:00
nick black
9e28e14001
move enforce_utf8() into main 2020-04-18 03:00:25 -04:00
nick black
0a6f5d1a9f
enforce_utf8() for wide tests, duh 2020-04-18 01:59:21 -04:00
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
2020-04-18 00:09:14 -04:00
nick black
295ae0a8d0
extract wide glyph unit tests into their own file #475 2020-04-13 23:12:10 -04:00
nick black
e6a80ab98d Strip down OverWide unit test 2020-04-12 07:07:02 -04:00
nick black
d26b111f35 new unit test Ncplane::OverWide #362 2020-04-12 07:07:02 -04:00
nick black
a7f17040ce another scrolling unit test 2020-04-05 23:54:38 -04:00
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.
2020-03-27 03:49:13 -04:00
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.
2020-03-27 03:13:30 -04:00
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.
2020-03-03 00:59:44 -05:00
nick black
9b0603bb32
Implement + test ncplane_mouseevent_p() #305 2020-02-23 03:50:17 -05:00
Nick Black
745e742a12
Fix gradient engine #368 (#372)
Simplify and correct the gradient engine, resolving all test breakage.
2020-02-22 21:00:03 -05:00
nick black
002e8be574
implement ncplane_format() #347 2020-02-21 06:52:57 -05:00
nick black
35d850f008
Implement + test ncplane_putegc_stainable() #352 2020-02-20 04:41:56 -05:00
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
2020-02-18 12:36:16 -05:00
nick black
9fc53e811f
ncplane_perimeter() plus unit test 2020-02-12 12:29:28 -05:00
nick black
85e377e652
Accept US-ASCII/C encoding, with warning. 2020-02-06 22:05:48 -05:00
nick black
54c57b3487 s/CELL_STYLE/NCSTYLE/ throughout 2020-02-02 05:13:40 -05:00
nick black
08f6fa0e79 implement ncplane_dup() 2020-01-17 08:35:28 -05:00
Nick Black
7ec022d067
Painter's algorithm #255 (#274)
* notcursesI.avi 30 -> 60fps
* painter's algorithm works #255
2020-01-14 03:51:11 -05:00
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
2020-01-04 02:37:55 -05:00
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
2020-01-01 06:41:19 -05:00
nick black
2ea4f77875
introduce ncplane_aligned() #237 2019-12-30 02:28:40 -05:00
nick black
21c3861804
s/bannner/banner/g, heh 2019-12-28 18:37:44 -05:00
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
2019-12-27 17:20:20 -05:00
nick black
66057e0363
eliminate most uniglyphs from unit tests #196 2019-12-27 05:47:24 -05:00
nick black
37a45955ad
FreeBSD: declare array explicitly 2019-12-27 02:49:17 -05:00
nick black
cb2bf16a73 support building sans ffmpeg #153 2019-12-25 02:24:10 -05:00
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.
2019-12-23 23:12:29 -05:00
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
2019-12-20 20:38:13 -05:00
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
2019-12-18 04:38:43 -05:00
Nick Black
ff463d464e
Channels API sanity #119 (#138)
* orthogonalize channel/channels/cells APIs #119
* sync README.md with new ncplane channels api #119
2019-12-14 05:33:34 -05:00
nick black
a1c90a347a
add ncplane_box() corner masking 2019-12-13 19:40:22 -05:00
nick black
0001fa955d
on a wide enough screen, this test breaks 2019-12-12 17:05:17 -05:00
nick black
7c72b0ce83
emoji unit test 2019-12-12 16:14:01 -05:00
nick black
23f8a070b3
unit tests: don't try to close a NULL outfp_ 2019-12-12 09:08:06 -05:00
nick black
ca2f0471c3
setlocale(LC_ALL, "") everywhere 2019-12-12 08:59:16 -05:00