Commit Graph

349 Commits

Author SHA1 Message Date
nick black
4a9be7fa90
include memory.h where necessary 2020-10-03 18:54:34 -04:00
Marek Habersack
a29bfe9c42 [C++] Deal with widgets grabbing full ownership of Panel
Fixes: https://github.com/dankamongmen/notcurses/issues/1009

Whenever a widget is created with its `*_create` function it currently
claims full ownership of the passed panel, including its destruction.
However, the C++ wrapper around the panel is not aware of this and will
attempt to destroy the native panel in the destructor, leading to
segfaults.

Fix this by introduction of a `Widget` class which contains the logic to
properly modify the `Panel` instance to not double-destroy the native
panel.  The solution is a bit fragile since the `Panel` instance is left
intact (we can't free it for the user) in a state that's safe for the
C++ wrapper, but calling any C function via the wrapper **will** pass a
`NULL` pointer in the panel argument - therefore the C functions MUST be
proofed against this.  The proofing belongs in the C backend code since
this protects also C and other language binding users from such abuse.

The Widget class will first verify that the passed `Plane` instance
hasn't already been "disowned" and will throw an exception to the effect
if it was.  Next, it will proceed to take over ownership of the native
panel instance and mark the passed `Panel` as "invalid" (i.e. not owning
any native panel instance anymore)

The above changes require modification of `Panel` instances and so all
the widget constructors taking `const*` or `const&` have been removed
from widget classes.
2020-10-03 13:19:49 -04:00
nick black
7241e0a5e1
demo tabletfxn: cliptop __attribute__ ((unused)) 2020-10-03 02:43:18 -04:00
nick black
bf40e163c8
reel poc: cap return at true size 2020-09-30 03:43:41 -04:00
nick black
683217ef07 normalize style setters #1034 2020-09-29 13:09:44 -04:00
nick black
8d347d14bb
move ncreel to PoCs, don't install #1033 2020-09-28 07:20:16 -04:00
nick black
36aed3c521 add ncplane_create() + ncplane_options #1020 2020-09-20 05:52:27 -04:00
nick black
a4367fcfb5 rip out ncplane_ creation functions #985 2020-09-18 17:46:57 -04:00
nick black
b7a57eaab7 convert all channel rgb calls #985 2020-09-18 01:39:21 -04:00
nick black
25a192c7ba
ncpp_build: disable Plot stuff for now #1009 2020-09-13 15:17:07 -04:00
nick black
c3e5e47a2a
ncreader: conform to the New Way #627 2020-09-13 13:53:11 -04:00
nick black
4f04f1bc31 remove bgchannels field from selector_options #627 2020-09-13 13:22:58 -04:00
nick black
306948507f ncmultiselect: normalize per new widget API #627 #1006 2020-09-13 13:22:58 -04:00
nick black
8839d44454 selector: transfer ownership of ncplane #1006 #627 2020-09-13 13:22:58 -04:00
nick black
784b0a4e2a reader poc: use ncreader's native cursor control #962 2020-09-06 23:10:16 -04:00
nick black
e4326c8fe6 direct PoC: always call ncdirect_stop() 2020-09-06 17:12:31 -04:00
nick black
2f28420034 rename ncplane_putsimple() -> ncplane_putchar() #912 2020-08-31 21:14:29 -04:00
nick black
4c7a1d0427 ncdirect_init: add flags parameter #976 2020-08-30 13:38:33 -04:00
nick black
9ae58194e6 handle_getc(): properly seed ncinput #972 2020-08-30 11:31:45 -04:00
nick black
f64ea58e6c kill stdin buffering #972 2020-08-30 11:31:45 -04:00
nick black
825370e6c9
direct-input: convert to utf8 for display 2020-08-30 04:43:55 -04:00
nick black
d5a4cd2349
add notcurses-direct-pydemo 2020-08-30 03:06:06 -04:00
nick black
b36435bed4
run through with a single glyph 2020-08-30 00:50:20 -04:00
nick black
eb0030bad3
flesh out sgr-full PoC 2020-08-29 18:46:24 -04:00
nick black
201994ab0c
ncdirect: don't make infd nonblocking #919 2020-08-26 23:49:02 -04:00
nick black
9476cb33d5 ncdirect: set up input layer #919 2020-08-26 23:12:59 -04:00
nick black
8595c21495
dirgb poc: use fflush, not printf("\n") 2020-08-26 23:08:43 -04:00
nick black
1a21d193c4
ncreader: kill diagnostics #839 2020-08-25 18:20:14 -04:00
nick black
9b1ae7d970
ncreader: bring cursor back following putegc #839 2020-08-25 18:17:20 -04:00
nick black
9d75f575db
ncplane_set_[fb]channels 2020-08-25 17:28:29 -04:00
nick black
70a28feb63
ncreader: horizontal scrolling mostly works #839 2020-08-25 08:58:49 -04:00
nick black
afc06a0271
reader PoC: accept -hs for horizontal scrolling #839 2020-08-25 08:58:49 -04:00
nick black
7cbb2e9110 zoo demo: show cursor in reader box #835 2020-08-25 06:29:03 -04:00
nick black
a53d5a21a8 disable/enable cursor for rasterize 2020-08-25 04:55:06 -04:00
nick black
cab19cf790 Cursor work (placement, drop RETAIN_CURSOR) #953
notcurses_enable_cursor() now accepts placement arguments.
both it and notcurses_disable_cursor() now return int rather
than void. add notcurses_cursor_move_yx().
2020-08-25 03:11:50 -04:00
nick black
4dd1d6a4c8 Annihilate nc_err_e and all infrastructure #948 2020-08-24 17:20:29 -04:00
nick black
c64f42b717 add sgr-full PoC 2020-08-22 12:51:32 -04:00
nick black
bdea9bc9c8
gradient PoC: sleep between flip #921 2020-08-20 22:35:31 -04:00
nick black
4745c3596d
gradients PoC: add lower block for completeness #921 2020-08-19 12:45:26 -04:00
nick black
086571ff4b
gradients: purge improper cut-and-pasted comment 2020-08-19 12:39:29 -04:00
nick black
1e334fa63e
new 'gradients' PoC #920 2020-08-19 12:33:47 -04:00
nick black
90e98ada07
wcwidth PoC: accept command line args 2020-08-18 04:16:30 -04:00
nick black
26ea0b3785
dirgb PoC: throw in some italics 2020-08-16 17:56:55 -04:00
nick black
807af53fbb sgr/sgr-direct: knock out compiler warnings 2020-08-15 17:38:20 -04:00
nick black
b980d7deee
sgr-direct PoC 2020-08-14 15:55:27 -04:00
nick black
b315c31141
ncdirect: fix style transitions #890 2020-08-14 08:32:27 -04:00
nick black
7d1e4fae54
plug memory leak in PoC direct 2020-08-12 03:03:10 -04:00
nick black
d5eca34cd5
plug memory leak in PoC selector 2020-08-12 03:00:19 -04:00
nick black
2f3fba59c8
revert early-morning idiocy #866 2020-08-08 10:30:57 -04:00
nick black
4232ca1427
blitters PoC: hoist ncv creation from main loop #866 2020-08-08 10:28:38 -04:00
nick black
e17f7198e7
printf(%lc) is wint_t not wchar_t 2020-08-06 03:08:00 -04:00
nick black
2dcab374c4 mojibake: fix some row overruns #842 2020-07-31 23:05:09 -04:00
nick black
fe904cc8da resize PoC: restore bottom stanza 2020-07-31 23:05:09 -04:00
nick black
c1c1238e7e resize PoC: add some functionality #842 2020-07-31 23:05:09 -04:00
nick black
78a7b4d255 constify ncreader_options->egc 2020-07-30 03:50:44 -04:00
nick black
1a82273231
selector: handle nonzero defidx with zero maxdisplay #834 2020-07-29 08:23:10 -04:00
nick black
2b4b516260
selector PoC: use CHANNELS_RGB_INITIALIZER() 2020-07-29 04:08:32 -04:00
nick black
7174a84e94 zoo: add multiselector 2020-07-29 01:15:50 -04:00
nick black
ab2710cf7a
selector poc: improve background contrast 2020-07-28 22:46:26 -04:00
nick black
bac02bccd0
selector/multiselect: kill itemcount options field #831 2020-07-28 22:42:49 -04:00
nick black
0bd73e2f1f
CMake: drop dirgb from test suite due to excess output 2020-07-22 16:38:23 -04:00
nick black
8e34f7525b
rgb/rgbgb pocs: use alternate screen 2020-07-22 14:59:14 -04:00
Nick Black
82676cd395 linuxconjammer/linuxconsole PoCs: compile on freebsd 2020-07-16 14:33:42 -04:00
nick black
86a75531c6
Support newlines in ncplane_putnstr() when scrolling #793 2020-07-15 18:37:54 -04:00
nick black
1c95241948
fileroller/procroller: check widget destructor for error #793 2020-07-13 05:26:29 -04:00
Nick Black
dbc83c41b3
linuxconsole PoC (#791)
* use ioctl(KDGETMODE) to detect Linux console
* diagnostic on KDGETMODE
* add logdebug()
* unit test for notcurses_drop_planes(), add ncplane_putnstr_aligned()
* linuxconsole PoC
* linuxconsole: dump unicode->font table
* linuxconsole: explode glyphs
* linuxconsole: show 7 glyphs per 'line'
* linuxconjammer: shim console font with half blocks
* signals: handler for SIGTERM
* man pages: update notcurses_init() for options
* add NCOPTION_NO_FONT_CHANGES #201
2020-07-13 01:21:41 -04:00
nick black
a6b002fa77 add ncdirect box-drawing functions #753 2020-07-10 18:41:25 -04:00
nick black
96c6dc8e16 add ncdirect_canopen_images() and ncdirect_canutf8() #753 2020-07-10 18:41:25 -04:00
nick black
c783244185 ncdirect_hline_interp(), ncdirect_vline_interp(), dirlines PoC #753 2020-07-10 18:41:25 -04:00
nick black
750f88b70a split direct into its own header 2020-07-10 18:41:25 -04:00
nick black
718abd648a ncdirect_render_image: add alignment #759 2020-07-03 21:24:00 -04:00
nick black
2fa8de9813 ncdirect: silence ffmpeg #759 2020-07-03 21:24:00 -04:00
nick black
eba7106067 ncdirect_clear: use ->clearscr, kill off bogon ->clear #759 2020-07-03 21:24:00 -04:00
nick black
b829398538 ncdirect_render_image: accept ncalign_e parameter #759 2020-07-03 21:24:00 -04:00
nick black
46d75c072a ncdirect_render_image(): don't take current x into account #759 2020-07-03 21:24:00 -04:00
nick black
74b44506b6 vizdirect: use all three scaling types #759 2020-07-03 21:24:00 -04:00
nick black
f7fc665c13
Acquire and use ttyfd properly in ncdirect #752
When we don't have an actual terminal in ncdirect, return
placeholder 80x24 for ncdirect_dim_y()/ncdirect_dim_x(), but
don't go querying e.g. a redirected file for its dimensions.
Similarly, only request info about cursor position from a true
TTY (we're otherwise likely to hang, or at best get meaningless
data). Rewrite 'direct' PoC to use ncdirect_dim_*().
Add tty_emit(). Closes #752.
2020-07-03 15:28:28 -04:00
Nick Black
415d4b813f
Tight work on unit testing, controlling tty vs output fd (#758)
* Some things go to the FILE* we're provided. Some can only go to a controlling terminal. Check to see if the FILE we're given is a TTY. If not, open up /dev/tty #752.
* term_emit(): fflush() can return EAGAIN. Loop on it to eliminate a rare error on shutdown that particularly affected unit tests (where we start and shut down Notcurses many times in a row).
* sgr poc: check return value of setlocale()
* drone: run all unit tests
* CMake: add some tests using PoCs
* ncneofetch: print even small palettes
2020-07-02 18:03:52 -04:00
nick black
4863c7e3df
ncdirect_image_render: restore NCBLIT_2x2 #751 2020-07-01 01:14:42 -04:00
nick black
8a2f86ea16 vizdirect: use DFSG-safe media only #725 2020-06-30 00:18:02 -04:00
nick black
40d0efcece ncdirect_render_image(): just about working #725 2020-06-30 00:18:02 -04:00
nick black
277cbc9c16 ncdirect_render_image(): getting closer #725 2020-06-30 00:18:02 -04:00
nick black
9fe48f8539 procroller/fileroller: enable scrolling on standard plane 2020-06-28 05:50:42 -04:00
nick black
78c2cef7e9
Use NCBLIT_2x2 by default with NCSCALE_STRETCH
We're not using NCBLIT_2x2 by default because it warps the
aspect ratio. If we're using NCSCALE_STRETCH, though, we've
(1) already indicated that aspect ratio isn't terribly
important to us and (2) are trying to maximize the space.
Since NCBLIT_2x2 is best for large images anyway, make it
the default when NCSCALE_STRECTH is being used.

Remove all explicit uses of NCBLIT_2x2 when NCSCALE_STRETCH
is being used in notcurses-demo.
2020-06-25 14:09:15 -04:00
nick black
cadd0ae283 quadblitter: fix arguments to channel_rgb() #667 2020-06-14 03:54:10 -04:00
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
2020-06-13 22:24:50 -04:00
nick black
3936d1b528
adapt callers of ncvisual_geom() 2020-06-12 00:53:34 -04:00
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
2020-06-09 05:12:30 -04:00
nick black
1ffd871784
blocks poc: handle std coredump-free #645 2020-06-08 04:37:42 -04:00
nick black
6e7996f1a8
notcurses_init: properly check flags for unknowns 2020-06-07 16:11:21 -04:00
nick black
b2dcc50606
notcurses_options: fold bools into flags 2020-06-07 05:08:46 -04:00
nick black
d863220e23
add pixels PoC 2020-06-06 21:38:05 -04:00
nick black
2c417ddb0c
yield demo: punch up with polyfills 2020-06-06 05:11:45 -04:00
nick black
deda0ff681
mention notcurses_reader.3 in notcurses.3 2020-06-05 05:56:29 -04:00
nick black
9a0f0c66fe
ncblit: accept an ncvisual_options #680 2020-06-05 03:47:13 -04:00
nick black
e1d34c4f43
ncplane_highgradient: only pass a single channel #676 2020-06-05 00:36:42 -04:00
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
2020-06-04 22:47:38 -04:00
nick black
efa51e9cf2 quadrant blitter #648
Novel blitter using Unicode quadrant glyphs. 2:1 cell aspect ratio, but
double the horizonal resolution of the half block blitter.
2020-06-02 18:33:04 -04:00
nick black
38c0509d86
notcurses_init: properly initialize rstate cursor
When we first begin operations, we need emit a cursor homing, which
we were not doing for the first line. As a result, the first row
didn't show up until you rendered something else, and even then
didn't show up unless you changed it (as it was otherwise undamaged).
This explains a lot of mystery behavior in notcurses-demo that I've
long told myself I'd hallucinated or imagined. Hurrah! but also
supershittytothemax! Thanks Marek Habersack for pointing out something
which led to an experiment which led to chasing this down once and
forever. Closes #619, w00t!
2020-06-01 09:42:22 -04:00
nick black
0331ae4c4c
introduce NCVISUAL_OPTION_BLEND #652 2020-05-29 14:53:53 -04:00
nick black
33318254b2
absorb first ncvisual_decode into ncvisual_from_file() #655 2020-05-29 08:39:11 -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
Marek Habersack
b5d8549bb3 [C++] Allow multiple instances of NotCurses
This is to make it possible, in the future, to create multiple instances
of `NotCurses` for multiple terminals.  The first instance of
`NotCurses` becomes the default one, so that any instances of other
classes that aren't explicitly created with a pointer to another
`NotCurses` instance still work as expected.

Note that currently trying to call `notcurses_init` twice results in the
following error for me:

    0x55555559bfc0 is already registered for signals
    Couldn't drop signals: 0x55555559bfc0 != 0x5555555b6720
    terminate called after throwing an instance of 'ncpp::init_error*'

    Program received signal SIGABRT, Aborted.

The error is signalled by `setup_signals` and the pointer shown in the
message points to the first `struct notcurses` instance created.
2020-05-26 04:34:31 -04:00
nick black
8971bda0c2 ncpp: stop() resets _instance, add unit test #538 2020-05-24 03:34:46 -04:00
nick black
ba8d80d444
procroller: don't recurse on argv[0], whoops 2020-05-22 09:16:41 -04:00
nick black
7e12436196
reader poc: fix Plane memory leak #624 2020-05-21 18:08:19 -04:00
nick black
57fb7fc96a
sgr poc: don't put critical logic in assert() #624 2020-05-21 18:03:36 -04:00
nick black
f9f76046d5
sgr poc: don't put critical logic in assert() #624 2020-05-21 18:02:53 -04:00
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.
2020-05-20 15:32:27 -04:00
nick black
bcdf513e31
direct poc: exit out on bad ncdirect_cursor_up() 2020-05-19 09:08:10 -04:00
nick black
7f2888269f
all PoCs: use NCOPTION_INHIBIT_SETLOCALE 2020-05-19 08:44:39 -04:00
nick black
5081ed048c
do an OIIO rotate() #559 2020-05-13 07:35:31 -04:00
nick black
7aa488f419
ncvisual_rotate: perfect rotate_bounding_box() #599 2020-05-13 02:30:08 -04:00
Nick Black
f602c440a6
ncvisual_rotate() for arbitrary radians (#600)
* normal/visual: need dup stdplane for rotate
* add ncplane_center(), unit tests
* ncplane_center_abs(): add, unit tests
* ncvisual_bounding_box() for #599
* ncvisual_rotate(): works via bounding box #599
* normal demo: comment out broken section
* rotate: resize underlying plane as needed #599
* ncvisual_rotate: support negative rads #599
2020-05-12 22:57:28 -04:00
nick black
9a80750316
notcurses_canopen: split into images/videos #598 2020-05-12 20:10:53 -04:00
nick black
eaaa36f0c8
ncreader: ncplane as first arg #590 2020-05-09 08:41:19 -04:00
nick black
fec423264f
selector: undo switch to notcurses from ncplane 2020-05-09 07:51:23 -04:00
nick black
f6a7adc7e8
reader PoC: print content on exit 2020-05-09 06:44:00 -04:00
nick black
006f430e10
selector poc: kill #ifdef 2020-05-09 03:50:27 -04:00
nick black
3eb99b2447
reader: advance/backspace across lines #585 2020-05-09 01:12:45 -04:00
nick black
1c394dc103 modernize c++ according to clang-tidy-11 2020-05-08 21:42:04 -04:00
nick black
5b0d773fb5 modernize some PoC c++ according to clang-tidy 2020-05-08 21:42:04 -04:00
nick black
ba94919de7 rgbbg: modernize c++ 2020-05-08 21:42:04 -04:00
nick black
06e4b9f06b NEWS: mention ncplane_set_channels() 2020-05-08 21:42:04 -04:00
nick black
989ca7ff9a selector->ncselector, multiselector -> ncmultiselector #580 2020-05-08 21:42:04 -04:00
nick black
196de625c4 reader poc: render after each change to reader area #403 2020-05-08 21:42:04 -04:00
nick black
f2546c0949 reader poc: initialize ncreader_options #403 2020-05-08 21:42:04 -04:00
nick black
48de25821c ncreader man page #403 2020-05-08 21:42:04 -04:00
nick black
980e0ff29a ncreader: use underscore by default #403 2020-05-08 21:42:04 -04:00
nick black
4819c0e1c3 selector/multiselect: accept notcurses 2020-05-08 21:42:04 -04:00
nick black
94e42809fe
notcurses_resize(): kill unnecessary memset() 2020-05-07 01:25:32 -04:00
nick black
3f93d15cda
widestomp: apply clang-tidy-11 fixes 2020-05-07 00:18:12 -04:00
nick black
20d0048838
CMake improvements/cleanup #565
Rather than inspecting CMAKE_BUILD_TYPE manually and setting
DEBUG_OPTIONS based off the results, set CMAKE_{C/CXX}_FLAGS_DEBUG,
and allow that to be picked up by CMake #565. Remove repeated -W
flags that were all over the place, making them global compiler
flags. Remove repeated FORTIFY=2 definition that was all over the
place, making it a global compiler definition. Remove all uses of
${DEBUG_FLAGS}. Also, since CMake doesn't define a CMAKE_BUILD_TYPE
by default, instead just setting neither debugging nor optimization
flags, in what seems a pretty fucking boneheaded move, set it by
default to RelWithDebInfo. ugh. Explicitly disuse unused PoC variables.
2020-05-06 05:24:23 -04:00
Marek Habersack
e23d5baea4 [C++] Sync API changes
Added:

  * class FDPlane (`ncfdplane*`)
  * class Subproc (`ncsubproc*`)
  * NotCurses: get_inputready_fd (`notcurses_inputready_fd`)
  * Plane: qrcode (`ncplane_qrcode`)
  * class PlotBase: templated base class for Plot variations
  * class PlotU: `uint64_t` instantiation of PlotBase (aliased to previous
    `Plot` class for source compatibility), `ncuplot*`
  * class PlotD: `double` instantiation of PlotBase, `ncdplot*`
2020-05-04 05:39:01 -04:00
nick black
6e0fd72e33
proc/fileroller: don't call ncfdplane_destroy() from within callbacks 2020-05-02 03:33:30 -04:00
nick black
7d1e3c77c8 oiio: image scaling #535, subimages for video #536 2020-04-26 18:33:52 -04:00
nick black
f92a5805bd
pocroller/fileroller: destroy widgets 2020-04-25 17:55:59 -04:00
nick black
d904b2b8c1
scroll/cjkscroll: remove unused variables 2020-04-25 17:52:04 -04:00
Nick Black
9a075ae5d0
Support image decoding with OpenImageIO #453 (#534)
* fedora: dep on OpenImageIO, and use it
* fedora: dep on libqrcodegen-devel
* fedora: BuildRequires OpenEXR-devel
* tight check on USE_MULTIMEDIA
* CMake: enable notcurses-view for ffmpeg OR oiio
* notcurses-view: don't reach into libav
* oiio: ncvisual_render() #453
* oiio: need our own properly-offset ncvisual_plane()
* `visual` poc: accept optional command line argument
* oiio: work for 3-channel images #453
* oiio: destroy ncvisual's plane if we own it #453
* notcurses_visual.3: s/FFmpeg/multimedia/g
2020-04-25 15:52:23 -04:00
nick black
0b4ada19b1 Remove AVFrame from API #532 2020-04-24 04:17:56 -04:00
nick black
2037cdfacb move libav.c to nc_err_e #532 2020-04-24 04:17:56 -04:00
nick black
ad0685aa1b switch to nc_err_e #532 2020-04-24 04:17:56 -04:00
nick black
7da3847b50
ncsubproc: get client exit notification #310 2020-04-21 10:14:17 -04:00
nick black
16a336fd21
ncsubproc: tease apart from ncfdplane 2020-04-21 08:45:07 -04:00
nick black
3e853f6635
ncsubproc: map new pipe onto stdio #310 2020-04-21 03:51:54 -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
ee15d4c1f4
new procroller PoC 2020-04-21 01:50:25 -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
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