mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-09 19:10:48 +00:00
9.2 KiB
9.2 KiB
This document attempts to list user-visible changes and any major internal rearrangements of Notcurses.
-
1.4.2.3 (2020-05-17)
- Added
notcurses_canutf8()
, to verify use of UTF-8 encoding. - Fixed bug in
ncvisual_from_plane()
when invoked on the standard plane. ncvisual_from_plane()
now accepts the same four geometric parameters as other plane selectors. To reproduce the old behavior, forncv
, call it asncvisual_from_plane(ncv, 0, 0, -1, -1)
.ncvisual_from_plane()
,ncplane_move_below_unsafe()
,ncplane_dup()
, andncplane_move_above_unsafe()
now acceptconst
arguments where they did not before.notcurses_canopen()
has been split intonotcurses_canopen_images()
andnotcurses_canopen_videos()
.ncmetric()
now uses multibyte suffixes (particularly for the case of 'µ', i.e. micro). This has changed the values ofPREFIXSTRLEN
and friends. So long as you were usingPREFIXSTRLEN
, this should require only a recompile. If you were usingPREFIXSTRLEN
in a formatted output context to count columns, you must change toPREFIXCOLUMNS
etc.- The
streamcb
type definition now accepts aconst struct timespec*
as its third argument. This is the absolute time vizCLOCK_MONOTONIC
through which the frame ought be displayed. The callback must now effect delay. - Mouse coordinates are now properly translated for any margins.
qprefix()
andbprefix()
now take auintmax_t
in place of anunsigned
, to matchncprefix
.
- Added
-
1.4.1 (2020-05-11)
- No user-visible changes (fixed two unit tests).
-
1.4.0 (2020-05-10)
ncplane_content()
was added. It allows all non-null glyphs of a plane to be returned as a nul-terminated, heap-allocated string.ncreader
was added. This widget allows freeform input to be edited in a block, and collected into a string.selector_options
has been renamed toncselector_options
, andmultiselector_options
has been renamed toncmultiselector_options
. This matches the other widget option struct's nomenclature.ncplane_set_channels()
andncplane_set_attr()
have been added to allowncplane
attributes to be set directly and in toto.NULL
can now be passed as theFILE*
argument tonotcurses_init()
andncdirect_init()
. In this case, a newFILE*
will be created using/dev/tty
. If theFILE*
cannot be created, an error will be returned.- A
flags
field has been added tonotcurses_options
. This will allow new boolean options to be added in the future without resizing the structure. DefineNCOPTION_INHIBIT_SETLOCALE
bit. If it's not set, and the "C" or "POSIX" locale is in use,notcurses_init()
will invokesetlocale(LC_ALL, "")
. - All widgets now take an
ncplane*
as their first argument (some tooknotcurses*
before). All widgets'options
structs now have anunsigned flags
bitfield. This future-proofs the widget API, to a degree.
-
1.3.4 (2020-05-07)
notcurses_lex_margins()
has been added to lex margins expressed in either of two canonical formats. Hopefully this will lead to more programs supporting margins.ncvisual_open_plane()
has been renamedncvisual_from_file()
. The former has been retained as a deprecated alias. It will be removed by 1.6/2.0.ncvisual_from_rgba()
andncvisual_from_bgra()
have been added to support creation ofncvisual
s from memory, requiring no file.ncvisual_rotate()
has been added, supporting rotations of arbitrary radians onncvisual
objects.ncvisual_from_plane()
has been added to support "promotion" of anncplane
to anncvisual
. The source plane may contain only spaces, half blocks, and full blocks. This builds atop the new functionncplane_rgba()
, which makes an RGBA flat array from anncplane
.- The
ncplane
argument toncplane_at_yx()
is nowconst
.
-
1.3.3 (2020-04-26)
- The
ncdplot
type has been added for plots based ondouble
s rather thanuint64_t
s. Thencplot
type and allncplot_*
functions were renamedncuplot
for symmetry. - FFMpeg types are no longer leaked through the Notcurses API.
AVERROR
is no longer applicable, andncvisual_decode()
no longer returns astruct AVframe*
. Instead, thenc_err_e
enumeration has been introduced. Functions which once accepted a value-resultAVERROR
now accept a value- resultnc_err_e
. The relevant constants can be found innotcurses/ncerrs.h
. - OpenImageIO 2.1+ is now supported as an experimental multimedia backend. FFmpeg remains recommended. Video support with OIIO is spotty thus far.
- CMake no longer uses the
USE_FFMPEG
option. Instead, theUSE_MULTIMEDIA
option can be defined asffmpeg
,oiio
, ornone
. Incmake-gui
, this item will now appear as an option selector.oiio
selects OpenImageIO.
- The
-
1.3.2 (2020-04-19)
ncdirect_cursor_push()
,notcurses_cursor_pop()
, andncdirect_cursor_yx()
have been added. These are not supported on all terminals.ncdirect_cursor_yx()
ought be considered experimental; it must read a response from the terminal, and this can interact poorly with other uses of standard input.- 1.3.1 unintentionally inverted the C++
Notcurses::render()
wrapper's return code. The previous semantics have been restored.
-
1.3.1 (2020-04-18)
ncplane_at_yx()
andncplane_at_cursor()
have been changed to return a heap-allocated EGC, and write the attributes and channels to value-resultuint32_t*
anduint64_t*
parameters, instead of to acell*
. This matchesnotcurses_at_yx()
, and means they're no longer invalidated if the plane in question is destroyed. The previous functionality is available as new functionsncplane_at_yx_cell()
andncplane_at_cursor_cell()
.ncplane_set_base()
inverted itsuint32_t attrword
anduint64_t channels
parameters, thus matching every other function with these two parameters. It movedconst char* egc
before either, to force a type error, as the change would otherwise be likely to go overlooked.- Scrolling is now completely implemented. When a plane has scrolling enabled
through use of
ncplane_set_scrolling(true)
, output past the end of the last line will now result in the top line of the plane being lost, all other lines moved up one, and the bottom line cleared.
-
1.3.0 (2020-04-12)
- No user-visible changes
-
1.2.9 (2020-04-11)
- No user-visible changes
-
1.2.8 (2020-04-10)
notcurses-tetris
now happily continues if it can't load its background.
-
1.2.7 (2020-04-10)
- Plots now always keep the most recent data to their far right (i.e., the gap that is initially filled is on the left, rather than the right).
-
1.2.6 (2020-04-08)
ncplane_putsimple_yx()
andncplane_putstr_yx()
have been exported as static inline functions.ncplane_set_scrolling()
has been added, allowing control over whether a plane scrolls. All planes, including the standard plane, do not scroll by default. If scrolling is enabled, text output via the*put*
family of functions continues onto the next line when encountering the end of a row. This does not apply to e.g. boxes or lines.ncplane_putstr_yx()
now always returns the inverse of the number of columns advanced on an error (it used to return the positive short count so long as the error was due to plane geometry, not bad input).ncplot_add_sample()
andncplot_set_sample()
have been changed to accept auint64_t
rather thanint64_t
, since negative samples do not currently make sense. Plots were made more accurate in general.notcurses_term_dim_yx()
now accepts aconst struct notcurses*
.notcurses_resize()
is no longer exported. It was never necessary to call this in response to a resize, despite confusing documentation that could have been read to suggest otherwise. If you're in a long block on input, and get anNCKEY_RESIZE
, just callnotcurses_refresh()
(which now callsnotcurses_resize()
internally, asnotcurses_render()
always has).- First Fedora packaging.
-
1.2.5 (2020-04-05)
- Add ncplot, with support for sliding-windowed horizontal histograms.
- gradient, polyfill,
ncplane_format()
andncplane_stain()
all now return the number of cells written on success. Failure still sees -1 returned. ncvisual_render()
now returns the number of cells emitted on success, as opposed to 0. Failure still sees -1 returned.ncvisual_render()
now interprets length parameters of -1 to mean "to the end along this axis", and no longer interprets 0 to mean this. 0 now means "a length of 0", resulting in a zero-area rendering.notcurses_at_yx()
no longer accepts acell*
as its last parameter. Instead, it accepts auint32_t*
and auint64_t*
, and writes the attribute and channels to these parameters. This was done because thegcluster
field of thecell*
was always set to 0, which was surprising and a source of blunders. The EGC is returned via thechar*
return value. https://github.com/dankamongmen/notcurses/issues/410
-
1.2.4 (2020-03-24)
- Add ncmultiselector
- Add
ncdirect_cursor_enable()
andncdirect_cursor_disable()
.