Commit Graph

281 Commits

Author SHA1 Message Date
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
2020-05-29 02:47:29 -04:00
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.
2020-05-28 21:16:58 -04:00
nick black
f425944bba
FreeBSD: move back to getrandom(); read_random() is kernelspace 2020-05-22 05:32:47 -04:00
nick black
fc998510a0
CMake: only install static libs if built #625 2020-05-21 23:51:10 -04:00
nick black
a288c2e654
document all build options 2020-05-20 13:22:43 -04:00
nick black
9ccbc99e9e
now in fedora core! 2020-05-13 14:56:09 -04:00
nick black
4b642bc68d
require oiio 2.15.0+ to get infinite loop fix #547 2020-05-13 07:41:19 -04:00
nick black
5081ed048c
do an OIIO rotate() #559 2020-05-13 07:35:31 -04:00
nick black
084bb721fa
we're now part of freebsd! 2020-05-11 12:30:53 -04:00
nick black
759dfbf499
add 1.4.0 to README.md 2020-05-10 22:52:49 -04:00
nick black
98eddd86a9
README: link to hype videos 2020-05-09 06:08:23 -04:00
nick black
a2888f2c75 FAQ entry about 10-bit color 2020-05-06 01:02:46 -04:00
nick black
d54e2c3957
README: point to debian unstable package 2020-04-30 01:14:42 -04:00
nick black
018e88f53b
README: don't undersell it 2020-04-26 21:21:43 -04:00
nick black
7d1e3c77c8 oiio: image scaling #535, subimages for video #536 2020-04-26 18:33:52 -04:00
nick black
0a38cd6ff5
move usage ToC to USAGE.md 2020-04-26 17:38:54 -04:00
nick black
d40c46a7aa
README: fix up syntax in header list 2020-04-26 17:37:55 -04:00
nick black
5f42e06383 oiio: open and close image #453 2020-04-24 04:17:56 -04:00
nick black
6045c54189 move usage stuff into USAGE.md 2020-04-24 04:17:56 -04:00
nick black
11c5aacb08
ncsubproc: move to big bad clone3() #310 2020-04-21 09:42:25 -04:00
nick black
04f90fa1ea
ncsubproc: launch processes, make pipes
link to LWN article in History section of README.md.
2020-04-21 03:33:04 -04:00
Nick Black
fe8034b5e0
ncfdplane, fileroller PoC, ncfdplane unit tests, qrcodes #24 #514 (#524)
* first draft of ncsubproc spec
* qrcode first draft #24
* demo: add qrcode demo skeleton, entries #24
* qrcode demo #24
* fedora python build changes from @dcantrell
* ncplane_qrcode() works #24
* add some flash to the qrcode demo #24
* drone: use newest builders
* fix up rgb PoC
* drop jungle demo to 100Hz target
* add fd.c
* ncfd skeletons
* more ncfdplane #514
* ncfdp i/o loop
* ncfp: improve uinit test, write core
* firm up ncfdplane #514
* fileroller PoC #514
* ncplane: allow '\n' in stream when scrolling #523
2020-04-20 23:26:41 -04:00
nick black
790a953c82
list libqrcodegen in README 2020-04-20 06:58:58 -04:00
nick black
40f36a9fb4
accepted into Debian, like a boss 2020-04-19 15:23:39 -04:00
Nick Black
1c7796a2b0
ncdirect_cursor_yx, ncdirect_cursor_pop, ncdirect_cursor_push #401 (#492)
* ncdirect_cursor_{push, pop, yx} declarations #401
* direct PoC: invoke ncdirect_cursor_yx() #401
* direct PoC: move to top of screen #401
* OTHERS.md: mention blessings
* ncdirect_cursor_yx working #401
* CHANGELOG: mention ncdirect_cursor_*() #401
2020-04-18 07:11:33 -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
957e09671e debian: repack DFSG tarball using uscan #496 2020-04-17 21:14:12 -04:00
nick black
6cbca20d0a
add 1.3.0 release to README 2020-04-13 15:10:19 -04:00
nick black
9a202b558e
remove colloquy from specfile, README 2020-04-10 13:08:22 -04:00
nick black
4c9a756630
drop notcurses-keyplot from README 2020-04-10 12:45:41 -04:00
nick black
2c2da61c72
ncdirect: add relative move functions #419 2020-04-08 09:07:49 -04:00
Nick Black
c2a645e9af
Rust wrapper work (#454)
* packaging: s/libtinfo/Terminfo/g
* rust: add stddim_yx()
* rust: check for valid init in unit tests
* rust: serialize up tests
* constify notcurses_term_dim_yx()
* rust: add dim wrappers
* remove notcurses_resize() from public API #367
* call notcurses_resize() from notcurses_refresh() #367
2020-04-08 05:39:41 -04:00
nick black
5c44416426
export ncplane_putstr_yx() as static inline 2020-04-06 01:15:20 -04:00
nick black
4a6ab358ba inline ncplane_putsimple_yx() 2020-04-05 23:54:38 -04:00
nick black
32c590ea64 document details of scrolling #323 2020-04-05 23:54:38 -04:00
nick black
fcd7e19e4c Add ncplane_set_scrolling() #323 2020-04-05 23:54:38 -04:00
nick black
7cf3bad556
note that ANSI_X3.4-1968 is also allowed 2020-04-04 00:03:51 -04:00
nick black
459b1029af README: add notcurses-keyplot to app list 2020-04-03 05:51:02 -04:00
nick black
af478ccf95
README: book has been published, link it =] 2020-04-02 14:01:57 -04:00
nick black
a45d888601
All fill-type functions return cells changed
Fill-type functions used to return 0 for success, and -1
on failure. They now return the number of cells written
on success, similarly to ncvisual_render(). Resolves #427.
2020-03-29 05:26:56 -04:00
nick black
8651486ad7
Don't say DirectColor when TrueColor is meant 2020-03-27 12:58:30 -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
ff71eda6a1
reels are a cylinder, not a torus 2020-03-26 23:31:28 -04:00
nick black
ee754ed241
Tetris: simplify MoveDown(), don't be stupid 2020-03-25 23:10:31 -04:00
Nick Black
de9158bd7b
More tetris work for book #421 (#423)
* tetris: use NES gravities
* tetris: use NES grav multiplier of 50ms
* tetris: implement move down #421
* README: mention notcurses-tetris #421
* tetris: use double box for boundary #421
* tetris: extract background.h
* tetris: break up into chunks suitable for book
* tetris: do the rotations
2020-03-25 04:06:38 -04:00
nick black
060c0c2a47 README: WINDOW->plane in reel docs 2020-03-21 11:58:50 -04:00
nick black
38f4255dc0 Define ncplane_mergedown() #361
ncplane_mergedown() is similar to the "Merge down" operation
in the GIMP. It writes to the destination plane the result
of rendering the source and destination frames per se.
2020-03-21 05:09:31 -04:00
nick black
6f9fdc115a published next month! :D 2020-03-17 10:56:01 -04:00
nick black
ba90c70a47
ncplane_cursor_yx() takes const first argument 2020-03-14 21:15:37 -04:00