Commit Graph

1716 Commits (7ac3f68f4e28b9284b582115ebe4af8bb1d6ada1)

Author SHA1 Message Date
nick black 17e8f62eb9
cell_no{fore/back}ground() was never intended for export 4 years ago
nick black c333c4def5
notcurses-ncreel: suppert +/- for adding/subbing lines 4 years ago
nick black 6354b26d78
notcurses-ncreel: handle +/- for tablets 4 years ago
nick black 17291b8743 implement ncmenu_mouse_selected() #819 4 years ago
nick black 6ea968c522 declare ncmenu_mouse_selected() #819 4 years ago
nick black 8ae8fd2cb0
menu: escape rolls up menu #819 4 years ago
nick black 357cba3843 ncplane_puttext: all unit tests work #815 4 years ago
nick black 243cbd6a92 fix LayoutFillsPlaneNoSpaces problems #815 4 years ago
nick black 1664e64617 add LayoutCrossBoundaryWide unit test #815 4 years ago
nick black 4adde41b05 Get LayoutFillsPlaneNoSpaces test working #815 4 years ago
nick black f0962fc6b5 utf8_etc_len: flatten wcwidth negative returns 4 years ago
nick black 858d1662eb clean_reel: clean up unused variables 4 years ago
nick black 015dc544a6 scan-build fix: return ret from notcurses_render_to_file() 4 years ago
nick black a70cbb894c get complete widechar ncplane_puttext() working #815 4 years ago
nick black 380ebc7e6e add wide ncplane_puttext unit tests #815 4 years ago
nick black d2b7c2b76c
notcurses_init: no screen clear for NO_ALTERNATE_SCREEN, though #817 4 years ago
nick black 6d2ba86acc
Clear screen if we want smcup but it's not available #817 4 years ago
nick black 0bd73e2f1f
CMake: drop dirgb from test suite due to excess output 4 years ago
nick black 8e34f7525b
rgb/rgbgb pocs: use alternate screen 4 years ago
nick black a76ee9a5af
tetris: refresh on startup in place of erase() 4 years ago
nick black 0e7e8b02eb
notcurses-input: refresh on start to clear screen in absence of smcup 4 years ago
nick black 604747c8f2 notcurses_puttext: use libunistring for wordbreaking #772 4 years ago
nick black 0ba1512d68 notcurses_debug: print plane name #780 4 years ago
nick black f441a2829a
ghastly 4 years ago
nick black 255b404842
ncplane_puttext(): start long words early
If we're fed a word that in and of itself is wider than
the text layout area, and it is not the first word on the
row on which it starts, go ahead and start it there, as
opposed to breaking the line. #720

Also, remove sgr from test suite, as it's not a notcurses
application.
4 years ago
nick black 7a459abd56
tetris: clear screen in case background isn't available 4 years ago
nick black 26ae8cda5b
linux console: shim in eighths and quarter blocks #810 4 years ago
nick black 9c3428c6fa
reel: horrible bullshit downtightening ugh shameful #790 4 years ago
nick black 87ec38fce8
reel: remove obsolete FIXMEs 4 years ago
nick black 3166d0f233
map empty ballot to O in console, not - 4 years ago
nick black 001276e112
linux console: program ☐/☒ mappings for multiselect #809 4 years ago
nick black 3b405469a6
ncreel: fix painting of focused tablet at bottom #796 4 years ago
nick black 86edb9c9ad
ncreel: accept -m argument for reel margins #796 4 years ago
nick black 889f02bf6e
stage_cursor(): verify cuf1/cuf before using them #789 4 years ago
nick black 3aedec2501 expose cell_load_direct() #797 4 years ago
nick black 97571e86af ncplane_putegc_yx() copies directly as opposed to going through putc() #797 4 years ago
nick black 0767aaec01
work around opensuse compilation issue #806 4 years ago
nick black e768fb1509
rename stdscr->stdplane to work around ncurses.h #806 4 years ago
nick black 104bbfef50
add notcurses_lex_blitter() 4 years ago
nick black 5d6df94187
add notcurses_str_scalemode() 4 years ago
nick black 765ff89a3b
notcurses_str_blitter(): rewrite using objects 4 years ago
nick black 5422268d6f
python: install notcurses-pydemo from setup.py 4 years ago
nick black 37ceb753bf
notcurses-view: print blitter name #805 4 years ago
nick black 431d4a449d
use tty_emit() in place of term_emit() for tty-specific escapes #773 4 years ago
nick black d46ca758a0 highcontrast: stash fgstate for later reapplication #748 4 years ago
nick black 9bd0b42a0e normal: fix ncvisual_rotate() abort reported as FAILED #802 4 years ago
nick black f8c47b0681 normal: fix plane rotation quit reported as FAILED #802 4 years ago
nick black e0155c7d56 CELL_ALPHA_HIGHCONTRAST unit tests #748 4 years ago
Nick Black 82676cd395 linuxconjammer/linuxconsole PoCs: compile on freebsd 4 years ago
nick black 86a75531c6
Support newlines in ncplane_putnstr() when scrolling #793 4 years ago
nick black b5cfc3e1ca linux console: full quadblitter power #201 4 years ago
nick black 575c366960 linux console: we've got some hats now, motherfuckers #201 4 years ago
nick black 21d28e7234 linux console: shim in single quad block glyphs #201 4 years ago
nick black eaa1c28756 linux console: shim in half blocks #201 4 years ago
nick black a009eb946c linux console: prep table for shims #201 4 years ago
Nick Black 50ce76bad8
Add kernel unicode-to-font mappings dynamically for line-drawing characters (#794)
Part 1 of a two-part revolution in Linux console graphics. Map all the line-drawing Unicode characters to similar glyphs. This means all our nice corners freely translate into rigid corners etc in the console, rather than hateful default characters (usually black diamonds). The demo and all widgets now look correct when drawing lines and boxes. Next, we'll add the actual glyphs for the block-drawing characters, and we'll have the finest graphics ever seen on a text-mode Linux console. #201
4 years ago
nick black ff569d7114
terminfo: chop off $<N> syntax #769 4 years ago
nick black 1c95241948
fileroller/procroller: check widget destructor for error #793 4 years ago
nick black b0990c1389
dumbass 4 years ago
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
4 years ago
nick black 992eaea8d0
tetris: swap colors on level change 4 years ago
nick black 894c6d15f6
tetris: start on level 1 4 years ago
nick black 20864949fa
ncneofetch: check for swapped cursor coordinates #765 4 years ago
nick black 5cf912feb6
ncplane_printf_stainable() and _vfprintf_stainable() #754 4 years ago
nick black 4a97c139e6
add ncplane_putstr_stainable() #754 4 years ago
nick black a6b002fa77 add ncdirect box-drawing functions #753 4 years ago
nick black 96c6dc8e16 add ncdirect_canopen_images() and ncdirect_canutf8() #753 4 years ago
nick black c783244185 ncdirect_hline_interp(), ncdirect_vline_interp(), dirlines PoC #753 4 years ago
nick black 750f88b70a split direct into its own header 4 years ago
nick black b617587ade
demo_nanosleep_abstime_ns: silence compiler warning 4 years ago
nick black 9ff805e754
demo_nanosleep_abstime_ns: fix test sense, swallow input #782 4 years ago
nick black 4b893164e1
ncplane_stain(): only stain valid EGCs #777 4 years ago
nick black 5512158fc5
postpaint(): no need to replace nul with space #777 4 years ago
nick black ea183c0d66
fdthread: stop being an asshole and NUL terminate the input #778 4 years ago
nick black 3ef1a3a07d
add notcurses_version_components() 4 years ago
Nick Black 162f9910c2
Tons of work on ncreel (#776)
Tons of work on ncreel (#627, #749, #694)
Improve reel demo: get input wired up once more, avoid the FPS demo at bottom, print pointer and line count in each tablet, use new ncreel API. Improve notcurses-ncreel explorer: kill memory leaks (#694), draw tablets better, use new ncreel API. Fix bug in ncreel core where cruft could be left on the screen, via a very gross brute force algorithm. I'll likely come back and make this a bit less ghastly in the future #749. Remove weird one-off input system from ncreel, residue from outcurses. Make some of the normalizing changes speced out in #627

* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* more terminal environment variable notes
* TERMS.md: add Sakura, st
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* ncreel: give each tablet an index, and print it #749
* reel: eliminate FIXME + param to insert_tabler() #749
* ncreel: label tablets with their adress to correlate against debugging logs #749
* ncreel: move legend out of reel proper
* ncreel_options: dump min/max_supported_rows/cols #627
* ncreel: remove weird one-off input layer #627
* ncreel: add ncreel_offer_input()
* reel demo: call demo_getc()
* reel demo: rig up input to demo main
* ncreel: drop ncreel_del_focused(), properly bind tablets
* reel demo: don't free up necessary plane
* ncreel: don't pull absolute locations of tablets
* ncreel: place tablets correctly in boundrel
* reel demo: add back support for left/right
* reel demo: restore thread movement
* ncreel: remove a great deal of complexity
* reel demo: stay out of FPS graph's way
* reel: tighten up reel following redraw
* reel: fix upper-left corner of topless perimeter
* ncreel: print linecount, return clipped value
* reel: draw focused tablet relative to reel
* reel: brute force decruftification, how embarrassing #749
4 years ago
nick black 479dd00739
ncreel: purge {tblr}off fields; these are ncplane properties #627 4 years ago
nick black 8a9a0c35e0
remove debugging cruft 4 years ago
nick black da765ebdaa
mojibake: don't stomp right side of boxes 4 years ago
nick black f2af24648d
mojibake: add all remaining emoji collations #770 4 years ago
nick black 2c37f2c4ba
mojibake: second third of the emoji collations #770 4 years ago
nick black fd83cc8639
mojibake: add all unicode 13 emoji via CLDR order #770 4 years ago
nick black b6330d142b
add notcurses_render_file() #491 4 years ago
nick black b26bd14d11
demo: make HUD text opaque #771 4 years ago
nick black 5a9e0c6f05
rendering: lack of term capability is not error #768
If we don't have setaf/setab, then we're not going to set color.
OK, fine. Don't regard it as an error during
notcurses_rasterization(), just don't emit the escape. This is
necessary to run on terminals like vt100, which in turn is
necessary to run unit tests properly on Redhat's koji.
Also, use notcurses_canfade() to avoid just breaking during
fades in intro and trans demos.
4 years ago
nick black 2d87aff90e
subprocfd: fix memory leak on error path 4 years ago
nick black 7744c6aae5
highcon: keep text in original position #762 4 years ago
nick black efcf0583c9
ncmetric: fix µ for ASCII mode #764 4 years ago
Nick Black e201c9994d lookup_blitset: properly pass utf8 test #763 4 years ago
Nick Black c88c51c4d3 cell_load: check for negative cols result, propagate #761 4 years ago
Nick Black ecc7bb25cc selector: draw indicators in ASCII mode #761 4 years ago
nick black 6b1b8d1695 ncplane_puttext: unit tests for scrolling #719 4 years ago
nick black 84746f1f31
OTHERS: add termbox, termion, pancurses 4 years ago
nick black 718abd648a ncdirect_render_image: add alignment #759 4 years ago
nick black 2fa8de9813 ncdirect: silence ffmpeg #759 4 years ago
nick black 46b8c8c913 ncdirect_render_image(): get it working for all geometries #759 4 years ago
nick black eba7106067 ncdirect_clear: use ->clearscr, kill off bogon ->clear #759 4 years ago
nick black 4c3cb44100 ncdirect_render_image: fix NCSCALE_NONE #759 4 years ago
nick black b829398538 ncdirect_render_image: accept ncalign_e parameter #759 4 years ago
nick black 46d75c072a ncdirect_render_image(): don't take current x into account #759 4 years ago
nick black 74b44506b6 vizdirect: use all three scaling types #759 4 years ago
nick black b698efb953
ncdirect: prefer provided fp, iff it's a tty #752 4 years ago
nick black e5c9168523
notcurses_init(): dup() ttyfd so we can always close() it 4 years ago
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.
4 years ago
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
4 years ago
nick black 2370329077
loop on fflush()->EAGAIN
sometimes when we call fflush(ttyfp), we get EAGAIN. we can
loop on this and force the flush. without it, we (fairly rarely)
get errors on shutdown, sometimes manifesting as unit test
failures (especially in the rust wrappers). #742
4 years ago
nick black 6b5fd0d009
ncdirect_render_image(): handle newlines properly
in ncdirect_render_image(), we want to emit newlines if and
only if we did not hit the right border. we want to emit
cuds (cursor downs) if and only if we've hit the bottom
border. this resolves all mysteries of blank lines, eliminating
a FIXME. it also fixes ncneofetch's image display on very
wide terminals. closes #756. also removes the display semaphore
in ncneofetch, using a more natural pthread_join().
4 years ago
nick black 31c584e2e6 ncneofetch: work no matter y offset, done! #750 4 years ago
nick black 8fedec050c ncneofetch: draw infoplane with notcurses + margin_t #750 4 years ago
nick black 93ff1d7789 ncdirect: open an fd for the controlling terminal
Use ctermid(3) to identify the controlling terminal device.
When one exists, open(2) it up, and retain this file descriptor
across the life of the ncdirect context. Allow a failure, since
not everything requires such an fd. This will be used for tty-
specific activity such as ioctl()s and escape sequences
involving terminal replies (such as get absolute cursor
position). #752
4 years ago
nick black cda4253a0a ncneofetch: sem_post() on error path 4 years ago
nick black a8db078689 ncneofetch: default background on palette 4 years ago
nick black 9ae1c6b3df ncdirect_render_image: fix arguments to rgba_blitter_low #751 4 years ago
nick black 4e04c3ae8f ncneofetch: fill out first line of infoplane 4 years ago
nick black 45fbbdb4ef ncneofetch: align output #750 4 years ago
nick black 33cb21d917 ncdirect_printf_aligned() added #750 4 years ago
nick black 4889e9b391 ncneofetch: scale 4 years ago
nick black 60619fc4b9 ncneofetch: move back to NCSCALE_SCALE #750 4 years ago
nick black 7eb70dad71 ncneofetch: display() in direct mode #750 4 years ago
nick black 7a022a4c76 ncneofetch: show palette via direct mode #750 4 years ago
nick black 452fdc671d
intro: move legend into main plane 4 years ago
nick black 4863c7e3df
ncdirect_image_render: restore NCBLIT_2x2 #751 4 years ago
nick black 0586adbe24
ffmpeg: disable debugging cruft erp 4 years ago
nick black 8a2f86ea16 vizdirect: use DFSG-safe media only #725 4 years ago
nick black fd064b0f2a ncvisual_render_image(): working! #725 4 years ago
nick black 40d0efcece ncdirect_render_image(): just about working #725 4 years ago
nick black 277cbc9c16 ncdirect_render_image(): getting closer #725 4 years ago
nick black 3bb789eb74 refactoring to prep for ncdirect_visual 4 years ago
nick black 229079696d ncvisual refactoring to support ncdirect 4 years ago
nick black 052e10ebe1
subproc: fix up USING_PIDFD definition 4 years ago
nick black b9dc9a7f1c
subprocs: simplify __linux__ check 4 years ago
nick black dda6d2f596
subproc: check for __NR_clone3 4 years ago
nick black 8310b687ac
demo: enable FPS plot by default #744 4 years ago
nick black ae1b45efbf
plot: make legend glyph-transparent #744 4 years ago
nick black 9a5a4a65ca demo: enable HUD by default #743 4 years ago
nick black 8da3e6f968 HUD: fully glyph-transparent, looks great #743 4 years ago
nick black ba1c9868e5 HUD: glyph-transparent inter-column gap #743 4 years ago
nick black 64857e12ac HUD: glyph transparency on frame count #743 4 years ago
nick black 96575fb402 hud: glyph-transparent right side 4 years ago
nick black 1cbf98cb6c
notcurses_init: allow US-ASCII, used by FreeBSD 4 years ago
nick black 3d6585e445
Trigger clone3()+waitid() path off definition of P_PIDFD #733 4 years ago
Nick Black d5dca33e00 ncneofetch: don't print (null) for distro_pretty 4 years ago
Nick Black d52ced823c make Wide unit tests sensitive to local irregularities #741 4 years ago
nick black 5815a65fb5
ncsubproc: properly catch exit on non-pidfd path
When we don't have a pidfd available on which to poll(2) (this
is true of Linux pre-5.3, and FreeBSD), we can't rely on a
child death breaking our poll loop. Instead, in this case launch
a second thread, which just sits on a blocking waitpid(2). If
it gets an exit, it calls the completion callback, triggering
the teardown. Closes #728, and ought lets us run the test suite
on FreeBSD.
4 years ago
nick black 6303e803f6
outro: don't obfuscate globe with acai plane 4 years ago
nick black 9fe48f8539 procroller/fileroller: enable scrolling on standard plane 4 years ago
nick black 6f6826238e
mojibake: improve topside a tad 4 years ago
nick black 5513707d8d
allglyph: don't print UTF-16 surrogate characters #740 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 3985085d04
terminfo: capability is "rev" not "reverse"
While I'm at it, comment up all these properties,
and eliminate double lookup of smkx.
4 years ago