Commit Graph

427 Commits (86e09bec4991436f8ce3ed8066cf64b0ab144d05)

Author SHA1 Message Date
nick black 4863c7e3df
ncdirect_image_render: restore NCBLIT_2x2 #751 4 years ago
nick black 6ab11e679f
v1.5.3 4 years ago
nick black 354152b48b
Redefine CELL_ALPHA_ in their natural forms
CELL_ALPHA_OPAQUE et al were defined as 0..3, meaning
CELL_ALPHA_SHIFT had to be used to compare them to their
channel representations. Instead, define them in said
representation outright, eliminating the need to shift while
retaining arithmetic properties, and zero initialization for
CELL_ALPHA_OPAQUE. Eliminate CELL_ALPHA_SHIFT #738.
4 years ago
nick black 64d42212a3
v1.5.2 4 years ago
nick black 2c19987f97
fly honies say ooo-oooh 4 years ago
nick black 4a3d436e5b
drone: update builders 4 years ago
nick black 79d3ae67e4
add notcurses_cantruecolor() 4 years ago
nick black 0657267274
v1.5.1 4 years ago
Nick Black 0084dbaa6d
qrcode generalization #699 (#713)
Add convenience function ncplane_home(). Add an ncblitter_e param
to ncplane_qrcode(), and split int maxversion into value-result
int* ymax and int* xmax. Write the actual sizes of the resulting
visual into these parameters. Update the qrcode demo. Add the
qrcode PoC. Update demos to ncplane_home(), where possible.

ncplane_qrcode() now takes an ncblitter_e and two value-result int*s
in the place of a single value int. The final size of the displayed qrcode
is written to *ymax and *xmax. If the code can't fit within the specified
dimensions, an error is returned. Standard rules for pluggable blitters
apply regarding fallback etc. #699
4 years ago
nick black 70183ee283
Rewrite plot tests using C interface #703
The Plot unit tests were reaching directly into the objects,
which meant the implementations couldn't include anything
we didn't want public. This was annoying, so I've changed it.
This required adding ncdplot_sample() and ncuplot_sample(),
which we should have had anyway.
4 years ago
nick black 20322fe805
demo improvements for ASCII mode (#696)
* eagle: use new ncvisual_geom() to properly zoom
* qrcode: skip for now (#699)
* luigi: draw with spaces, not full blocks
4 years ago
nick black 7fc38d8fdd
v1.5.0 4 years ago
Nick Black 28431914a8
First go at ncplane_puttext() (#690)
Very simple take at ncplane_puttext(), a new function for linebroken text. Also some very basic unit tests. I doubt this works very well yet, but it handles the simplest cases #682. Added nclog(), internal function for logging. #520
4 years ago
nick black b2dcc50606
notcurses_options: fold bools into flags 4 years ago
nick black 990f401427
ncvisual_set_yx() 4 years ago
nick black b9628ca21a
sync definitions of ncvisual_from_plane() 4 years ago
nick black 2c417ddb0c
yield demo: punch up with polyfills 4 years ago
nick black 3bc9a4cfa2
v1.4.5 4 years ago
nick black deda0ff681
mention notcurses_reader.3 in notcurses.3 4 years ago
nick black 9a0f0c66fe
ncblit: accept an ncvisual_options #680 4 years ago
Nick Black de23139111
Open some whoopass on ncvisual rotation (#677)
Whip the ol' llama's ass (fix ncvisual rotation)

* notcurses: flush cursor change requests #673
* rotator: verify ncplane_rgba and ncblit_rgba
* ncblit: rename, accept ncblitter_e #674
* rotator: render from rgba
* rotator: get to rotation
* rotator: add a pi/4 turn at the end
* normal: reuse incoming plane for rendering #672
* rotator poc: rotate a fullplane gradient #672
* normal demo: place visual correctly
* rotator: verify ncplane_rgba and ncblit_rgba
* ncblit: rename, accept ncblitter_e #674
* rotator: render from rgba
* rotator: add a pi/4 turn at the end
* normal: reuse incoming plane for rendering #672
* rotator poc: rotate a fullplane gradient #672
* normal demo: place visual correctly
* rotator poc: throw some red into gradient
* rotator poc: done #662
* oiio: ncvisual_resize() needs set ibuf pointer #662
* normal: only need erase at top of loop
* visual poc: shorter delay
* normal demo: center rendered visual
* comment ncvisual_resize() call
* ncvisual_rotate: call ncvisual_details_seed()
* ffmpeg ncvisual: fix rotation #662
4 years ago
nick black cb048c9796
python: update streamcb definition 4 years ago
nick black 354ece5826
v1.4.4.1 4 years ago
nick black 230f3af8e1
v1.4.4 4 years ago
nick black 3ff083b73f Fade API: move control of delays into callback 4 years ago
nick black 0331ae4c4c
introduce NCVISUAL_OPTION_BLEND #652 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 c08c9b7f7f
v1.4.3 4 years ago
nick black 07e894c40c
v1.4.2.4 4 years ago
nick black 37a4114f42
O(1) z-axis moves #623
Replace the singly-linked z-axis with a doubly-linked list,
and reimplement all z-axis moves as O(1) functions.
Eliminate ncplane_move_{above/below}_unsafe(), as there are no
longer unsafe moves.
4 years ago
nick black 32d3ae91c8
v1.4.2.3 4 years ago
nick black e132c6bb24
v1.4.2.2 4 years ago
nick black 49fb03655e
v1.4.2.1 4 years ago
nick black 38e67abd9d
v1.4.2 4 years ago
nick black d1b5a39135 ncvisual_stream(): update python streamcb typedef 4 years ago
nick black 9ce9d8f35b
python: wrapper for notcurses_canopen_videos() 4 years ago
nick black ad22661560
python: update cffi signatures 4 years ago
nick black 8b5b44cf36
v1.4.1 4 years ago
nick black 6a22040584
v1.4.0 4 years ago
nick black 720dd7c845
python: update ncreel_options definition #590 4 years ago
nick black fbed12cd80
ncreel_options: add flag field #590 4 years ago
nick black 66bafd59b3
subproc, fdplane, plot, selector, mselector: flag words #590 4 years ago
nick black bfdf6ef190
python: update for ncreader/ncmenu changes #590 4 years ago
nick black eaaa36f0c8
ncreader: ncplane as first arg #590 4 years ago
nick black fec423264f
selector: undo switch to notcurses from ncplane 4 years ago
nick black fcc73856cb
notcurses_init(): call setlocale unless INHIBIT_SETLOCALE #579 4 years ago
nick black 05408f918c
python: remove raw notcurses_getc() wrapper #584 4 years ago
nick black 989ca7ff9a selector->ncselector, multiselector -> ncmultiselector #580 4 years ago
nick black f0357ef6cb ncplane_contents(): declarations #582 4 years ago
nick black 4819c0e1c3 selector/multiselect: accept notcurses 4 years ago
nick black e2b610506f
v1.3.4 4 years ago
nick black 7337280e17
ncplane_at_yx(): const ncplane argument 4 years ago
nick black 5bdfc0183f
ncvisual_from_plane() #559 4 years ago
nick black 90dacae213
python/docs: declare ncvisual_from_plane() 4 years ago
nick black 94fcada67c
ncvisual_rotate: unify _cw/_ccw, take radians 4 years ago
nick black f63325db60 Lots of ncvisual work
Unify ffmpeg/oiio/null implementations, where possible. This effectively
required placing all three in the same file, which meant they're all now
C++. Update FFmpeg implemenation to be C++-usable. Implement
ncvisual_rotate_cw() and ncvisual_rotate_ccw() #515. Move most of tetris
over to Visual from Plane #558. Add bgra_to_rgba(), necessary for
creating ncvisual from BGRA memory. Implement ncvisual_from_rgba()
and ncvisual_from_bgra() #557. Add unit tests on ncvisual rotation.
4 years ago
nick black 39548acc3a rename ncvisual_open_plane->ncvisual_from_file() #560 4 years ago
nick black 0135a6b54d rotation: ncvisual, not ncplane #515 4 years ago
nick black d95bbb7c61
python: add input functions 4 years ago
nick black c8322e6cb1
ncfdplane: on non-following planes, break out on 0 read 4 years ago
nick black b34fa9be41
python: proper ncfdplane/ncsubproc decls 4 years ago
nick black 6d0fb39458
python: add ncfdplane/ncsubproc decls 4 years ago
nick black 84107c547d
view: support -m argument for margins #551 4 years ago
nick black 05753bd91a
v1.3.3 4 years ago
nick black 0b4ada19b1 Remove AVFrame from API #532 4 years ago
nick black 2037cdfacb move libav.c to nc_err_e #532 4 years ago
Nick Black 0e73b9d3d5
Floating-point ncplot, genericize ncplot (#531)
* compile ncplot as c++ generic #446
* add floating-point plots #446
4 years ago
nick black 7791eec65e
fedora: update spec for review feedback 4 years ago
nick black 1dad2c6b50
v1.3.2 4 years ago
nick black e00ef4aca9
prep for 1.3.1 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 86e225dc4c prep for 1.3.0 #460 4 years ago
nick black 24a9343b0b
prep for 1.2.9 4 years ago
nick black 69b716f7f8 prep for 1.2.8 4 years ago
nick black 89809d5b59 prep for 1.2.7 4 years ago
nick black bdfcdf4086
get pydemo working again #459 4 years ago
nick black 6d366380ed prep for 1.2.6 4 years ago
nick black 2c2da61c72
ncdirect: add relative move functions #419 4 years ago
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
4 years ago
nick black 77dd998b05
ncplot uses exclusively non-negative samples #447 4 years ago
nick black 5c44416426
export ncplane_putstr_yx() as static inline 4 years ago
nick black e3b3719a97 python: pull ncplane_putsimple_yx() 4 years ago
nick black fcd7e19e4c Add ncplane_set_scrolling() #323 4 years ago
nick black df3dc6b5bc
prep for 1.2.5 4 years ago
nick black 4917603478
ncplot: swap NCPLOT_2x1 and NCPLOT_1x1x4 4 years ago
nick black 58b7d39b7d plot: fix up python for labelaxisd 4 years ago
nick black 68b4ba1706 plots: implement remaining vertical grid types #136 4 years ago
nick black 5f3eb3dc24 keyplot: add third plot, this one with half blocks #433 4 years ago
nick black 5bccf6b446 ncplot: implement x windowing #430 4 years ago
nick black 41f1f8bb49 python needs ncgridgeom_e 4 years ago
nick black 4926186b5a ncplot: check input parameters for validity #430 4 years ago
nick black a2170a4291 ncplot: add_sample(), set_sample() #430 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 7c6b655483 v1.2.4 4 years ago
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.
4 years ago
nick black bdd7f9422a
python: add ncdirect_cursor_*() 4 years ago
Nick Black c056a0a026
Subregion renders #293 (#404)
Add four new fields to notcurses_options: margin_{tblr}, which requests margins to the top, right, bottom, and left. Render only within those margins, leaving the screen otherwise untouched (well, cleared if using the alternate screen). #293
4 years ago
nick black de520f3aa0
python avoid double def 4 years ago
nick black be089747a7 ncmultiselector_selected() #322 4 years ago
nick black 638be8feb7 multiselector options/items #322 4 years ago
nick black eead4c1414
notcurses_highgradient() added #398 4 years ago
nick black ac683e21d2
v1.2.3 4 years ago
nick black 333f7c1192
define ncplane_rotate_cw/ccw() 4 years ago
nick black bb579d0d05
notcurses_directmode()->ncdirect_init() 4 years ago
nick black 2c98013150
python: fix up seqnum reference 4 years ago
nick black a09bdc4ade
Add seqnum field to ncinput #374 4 years ago
nick black ddd33fea31
ncdirect_move() doc, readme, python, c++ #382 4 years ago
nick black e72111ac8b
v1.2.2 4 years ago
nick black 9b0603bb32
Implement + test ncplane_mouseevent_p() #305 4 years ago
nick black 5e38da9ea3
implement ncplane_stain() #347 4 years ago
nick black 002e8be574
implement ncplane_format() #347 4 years ago
nick black 88c49df1b1
v1.2.1
DSFG demo can't have luigi
s/1.2.0/1.2.1/g
4 years ago
nick black 35d850f008
Implement + test ncplane_putegc_stainable() #352 4 years ago
nick black e9818fe8e8
pydemo: extract demo from main module 4 years ago
Nick Black e5d6685c92
No locks, more lox #290 (#358)
* README/CMake: only require doctest 2.3.5

* man pages: remove talk of locking #290

* Remove locking from notcurses core #290

* Purge locking from notcurses core #290
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 2b08c53075 prep for 1.2.0 4 years ago
nick black b076253b16
python/LICENSE.txt: reduce to proper apache format 4 years ago
nick black c6520ab84c add notcurses_drop_planes, use from demo #346 4 years ago
nick black 8ecb4ba6a8 declare gradient functions #340 4 years ago
nick black 124004c87c add nplane_polyfill_yx() #340 4 years ago
nick black ce3e5d112e add ncdirect_clear() #343 4 years ago
nick black 36440ee278
python: sync ncselector declarations 4 years ago
nick black d8c42d4d1e
ncmenu_selected() fills in an ncinput #333 4 years ago
nick black 887726b0d9 Debian: move all symbols/history to 1.1.8 4 years ago
nick black cda600a4aa :/ 4 years ago
nick black ae62e046b0 python: add shebangs 4 years ago
nick black 533752063f python: move notcurses.py back into module 4 years ago
nick black 3e801c1f52
python: clean up example syntax 4 years ago
nick black b0c72607c4
ncmenu_offer_input(), use it in demo/pocmenu #333 4 years ago
nick black 79661633f0
ncmenu: knock out unterminated short descs 4 years ago
nick black aacec297b2
ncmenu: declare ncmenu_offer_input() 4 years ago
nick black 74b9690cf3
ncmenu: remove dumb restrictions/special casing 4 years ago
nick black e78f19c697
python: notcurses.py is runnable 4 years ago
nick black b8adfe1a39 Debian/python: make module runnable #335 4 years ago
nick black acbff55994 so deeply sick of python packaging woes #335 4 years ago
nick black 53df21b977
python: run sdist in build process 4 years ago
nick black 5c67591294
python: match new blend signatures 4 years ago
nick black 62488eaf10
blit->ncblit #324 4 years ago
nick black 5021212953
python: add ncreel, nctablet 4 years ago
nick black 89f516dcaa
tablet->nctablet, add ncreel to python #324 4 years ago
nick black b284901d18
prep for 1.1.6 4 years ago
nick black 09ff64e19f
ncdirect_style_*() #321 4 years ago
nick black f28bdf5d42
Python wrappers for ncdirect_styles_*() #321 4 years ago
nick black 429e00d612 v1.1.5 4 years ago
nick black ab3a91c5d0
python for ncdirect 4 years ago
nick black 87296a9f1c
Debian: update symbols with ncmenu 4 years ago
nick black 2a9f3c5ab3
ncmenu_selected(), update docs #179 4 years ago
nick black 65db9721d9
Python: add ncselector/blitter wrappers 4 years ago
nick black 60c19017f0
v1.1.4 4 years ago
nick black 746ef96ea1 prep for v1.1.3 4 years ago
nick black ca628e55bb python: do all work in build directory 4 years ago
Nick Black da0283ac25
Selector widget #166, subtitles #95 (#301)
Get rid of annoying empty line in notcurses-view (and ncvisuals at offsets in general)
Implement most of the Selector widget. Need to add styling and scrolling still. #166
Reenable ubuntu focal build
Subtitles! We decode them, and display them in notcurses-view. If ncvisual_simple_streamer() is provided an extra ncplane, it will use it to display subtitles. #95
We now build Python by default, as things are working much better.
ncplane_set_base() now takes channel, attrword, and EGC, so you can usually avoid having to set up and release a cell. ncplane_set_base_cell() takes over duty from ncplane_set_base() for ease of conversion.
notcurses-demo and notcurses-view now both accept a 0 for delay multiplier, meaning 'go as fast as you possibly can'. Very small multipliers (e.g. 0.00001) no longer cause floating point exceptions.
fading routines no longer cause floating point exceptions on very small timescales.
4 years ago
nick black c9bfc54381
prep for 1.1.2 4 years ago
nick black 92f8d4ce26
Python: indicate devstatus beta 4 years ago
Nick Black 16dfe05a93
Build and install Python wrappers #294 (#298)
* cmake: build python extension
* Python: remove obsolete clear_screen_start
* Debian: python3-cffi, not python-cffi
* Debian: add dep on python3-setuptools
* Python: build extension module from CMake #294
* Python: install python wrappers #294
* drone: disable focal for now
4 years ago
nick black ac791c781d
1.1.1, update version numbers 4 years ago
nick black aadf98179a
Debian: dep on python3-cffi and -setuptools 4 years ago
nick black bc15d517d3
python wrappers for direct mode 4 years ago
nick black 6e92492117
docs, python: add notcurses_canchangecolor() 5 years ago
nick black dec2ab515e python: update palette256 API wrapper 5 years ago
Nick Black 3d612aebcb
ruins color cycling demo #253 (#287)
* palette_set: update pal256 damage map #230
* drone: use newest builders
* palette: send oc on exit for color reset #285
* palette_new: copy existing palette in #230
* Python: use checkRGB everywhere
* more palette unit testing
* add ncplane_set_*_palindex()
* render fg palindex #230
* palette index color is out of 1000
* jungle demo works #253
5 years ago
nick black f7d1282924
Python: update fade/palette definitions 5 years ago
nick black 684bcdcc8c introduce palette256 #230 5 years ago
nick black 26f1b50a28 Python: add full cell/ncplane APIs 5 years ago
nick black 9c2d5197c7 python: add most functions 5 years ago
nick black 2c2542a553 docs/rust/python: update versions to 1.1.0 5 years ago
nick black 0330919564
add notes about python release 5 years ago
nick black 1be4025289
CMake: true fix for #208, use NOTCURSES_SHARE 5 years ago
nick black 32cdc58cd5 python: PoC up through dimensions/output 5 years ago
nick black 1ecd570369 python: notcurses_stdplane() 5 years ago
nick black 202115d826 Add python3-all-dev build-dep 5 years ago
nick black 9f103d36e2 python: get init/stop working 5 years ago
nick black 92d73fc600 eine klein python #149 5 years ago
nick black fb336bdde4 python bindings skeleton #149 5 years ago
nick black c00fc3c3f7
mask out SIGWINCH in demo #262 5 years ago