mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
add links to useful man pages
This commit is contained in:
parent
fe7b6bbf89
commit
046d0314b9
@ -2160,6 +2160,7 @@ up someday **FIXME**.
|
||||
|
||||
* [BiDi in Terminal Emulators](https://terminal-wg.pages.freedesktop.org/bidi/)
|
||||
* [The Xterm FAQ](https://invisible-island.net/xterm/xterm.faq.html)
|
||||
* [XTerm Control Sequences](https://invisible-island.net/xterm/ctlseqs/ctlseqs.pdf)
|
||||
* [The NCURSES FAQ](https://invisible-island.net/ncurses/ncurses.faq.html)
|
||||
* [ECMA-35 Character Code Structure and Extension Techniques](https://www.ecma-international.org/publications/standards/Ecma-035.htm) (ISO/IEC 2022)
|
||||
* [ECMA-43 8-bit Coded Character Set Structure and Rules](https://www.ecma-international.org/publications/standards/Ecma-043.htm)
|
||||
@ -2171,6 +2172,13 @@ up someday **FIXME**.
|
||||
* [Dark Corners of Unicode](https://eev.ee/blog/2015/09/12/dark-corners-of-unicode/)
|
||||
* [UTF-8 Decoder Capability and Stress Test](https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt)
|
||||
|
||||
#### Useful man pages
|
||||
* Linux: [console_codes(4)](http://man7.org/linux/man-pages/man4/console_codes.4.html)
|
||||
* Linux: [termios(3)](http://man7.org/linux/man-pages/man3/termios.3.html)
|
||||
* Linux: [ioctl_tty(2)](http://man7.org/linux/man-pages/man2/ioctl_tty.2.html)
|
||||
* Linux: [ioctl_console(2)](http://man7.org/linux/man-pages/man2/ioctl_console.2.html)
|
||||
* Portable: [terminfo(5)](http://man7.org/linux/man-pages/man5/terminfo.5.html)
|
||||
|
||||
### Other TUI libraries of note
|
||||
|
||||
* [tui-rs](https://github.com/fdehau/tui-rs) (Rust)
|
||||
|
@ -40,12 +40,19 @@ fadethread(void* vnc){
|
||||
ncvisual_destroy(ncv);
|
||||
return NULL;
|
||||
}
|
||||
int rows, cols;
|
||||
notcurses_term_dim_yx(nc, &rows, &cols);
|
||||
struct ncplane* apiap = notcurses_newplane(nc, 1, cols, rows - 1, 0, NULL);
|
||||
ncplane_set_fg_rgb(apiap, 0xc0, 0x40, 0x80);
|
||||
ncplane_set_bg_rgb(apiap, 0, 0, 0);
|
||||
ncplane_putstr_aligned(apiap, 0, "Apia🡺 Atlanta. Samoa, tula'i ma sisi ia lau fu'a, lou pale lea!", NCALIGN_CENTER);
|
||||
ncvisual_stream(nc, ncv, &averr, perframe);
|
||||
ncvisual_destroy(ncv);
|
||||
ncplane_erase(ncp);
|
||||
fade.tv_sec = 2;
|
||||
fade.tv_nsec = 0;
|
||||
nanosleep(&fade, NULL);
|
||||
ncplane_destroy(apiap);
|
||||
return vnc;
|
||||
}
|
||||
|
||||
@ -106,15 +113,19 @@ outro_message(struct notcurses* nc, int* rows, int* cols){
|
||||
if(ncplane_set_bg_alpha(non, CELL_ALPHA_OPAQUE)){ // FIXME use intermediate
|
||||
return NULL;
|
||||
}
|
||||
ncplane_styles_on(non, CELL_STYLE_BOLD);
|
||||
if(ncplane_putstr_aligned(non, ++ybase, str0, NCALIGN_CENTER) < 0){
|
||||
return NULL;
|
||||
}
|
||||
ncplane_styles_off(non, CELL_STYLE_BOLD);
|
||||
if(ncplane_putstr_aligned(non, ++ybase, str1, NCALIGN_CENTER) < 0){
|
||||
return NULL;
|
||||
}
|
||||
ncplane_styles_on(non, CELL_STYLE_ITALIC);
|
||||
if(ncplane_putstr_aligned(non, ++ybase, str2, NCALIGN_CENTER) < 0){
|
||||
return NULL;
|
||||
}
|
||||
ncplane_styles_off(non, CELL_STYLE_ITALIC);
|
||||
if(notcurses_render(nc)){
|
||||
return NULL;
|
||||
}
|
||||
|
@ -141,8 +141,10 @@ tabletdraw(struct tablet* t, int begx, int begy, int maxx, int maxy, bool clipto
|
||||
}
|
||||
}
|
||||
err |= ncplane_cursor_move_yx(p, summaryy, begx);
|
||||
ncplane_styles_on(p, CELL_STYLE_BOLD);
|
||||
ncplane_printf(p, "[#%u %d line%s %u/%u] ", tctx->id, tctx->lines,
|
||||
tctx->lines == 1 ? "" : "s", begy, maxy);
|
||||
ncplane_styles_off(p, CELL_STYLE_BOLD);
|
||||
}
|
||||
/*fprintf(stderr, " \\--> callback for %d, %d lines (%d/%d -> %d/%d) dir: %s wrote: %d ret: %d\n", tctx->id,
|
||||
tctx->lines, begy, begx, maxy, maxx,
|
||||
@ -283,10 +285,12 @@ panelreel_demo_core(struct notcurses* nc, int efd, tabletctx** tctxs){
|
||||
}
|
||||
// Press a for a new panel above the current, c for a new one below the
|
||||
// current, and b for a new block at arbitrary placement. q quits.
|
||||
ncplane_styles_on(w, CELL_STYLE_BOLD | CELL_STYLE_ITALIC);
|
||||
ncplane_set_fg_rgb(w, 58, 150, 221);
|
||||
ncplane_set_bg_default(w);
|
||||
ncplane_cursor_move_yx(w, 1, 1);
|
||||
ncplane_printf(w, "a, b, c create tablets, DEL deletes, q quits.");
|
||||
ncplane_styles_off(w, CELL_STYLE_BOLD | CELL_STYLE_ITALIC);
|
||||
// FIXME clrtoeol();
|
||||
unsigned id = 0;
|
||||
struct timespec deadline;
|
||||
@ -308,7 +312,9 @@ panelreel_demo_core(struct notcurses* nc, int efd, tabletctx** tctxs){
|
||||
ncplane_set_fg_rgb(w, 197, 15, 31);
|
||||
int count = panelreel_tabletcount(pr);
|
||||
ncplane_cursor_move_yx(w, 2, 2);
|
||||
ncplane_styles_on(w, CELL_STYLE_BOLD);
|
||||
ncplane_printf(w, "%d tablet%s", count, count == 1 ? "" : "s");
|
||||
ncplane_styles_off(w, CELL_STYLE_BOLD);
|
||||
// FIXME wclrtoeol(w);
|
||||
ncplane_set_fg_rgb(w, 0, 55, 218);
|
||||
wchar_t rw;
|
||||
|
@ -39,14 +39,14 @@ view_video_demo(struct notcurses* nc){
|
||||
|
||||
static struct ncplane*
|
||||
legend(struct notcurses* nc, int dimy, int dimx){
|
||||
struct ncplane* n = notcurses_newplane(nc, 3, 25, dimy / 8, dimx / 12, NULL);
|
||||
struct ncplane* n = notcurses_newplane(nc, 4, 25, dimy * 7 / 8, (dimx - 25) / 2, NULL);
|
||||
ncplane_set_bg_alpha(n, CELL_ALPHA_TRANSPARENT);
|
||||
uint64_t channels = 0;
|
||||
channels_set_bg_alpha(&channels, CELL_ALPHA_TRANSPARENT);
|
||||
cell c = CELL_INITIALIZER(' ', 0, channels);
|
||||
ncplane_set_default(n, &c);
|
||||
ncplane_set_fg_rgb(n, 0x0, 0x0, 0x0);
|
||||
ncplane_styles_set(n, CELL_STYLE_BOLD);
|
||||
ncplane_set_fg_rgb(n, 0xff, 0xff, 0xff);
|
||||
if(ncplane_putstr_aligned(n, 0, "target launch", NCALIGN_CENTER) <= 0){
|
||||
ncplane_destroy(n);
|
||||
return NULL;
|
||||
@ -61,6 +61,11 @@ legend(struct notcurses* nc, int dimy, int dimx){
|
||||
ncplane_destroy(n);
|
||||
return NULL;
|
||||
}
|
||||
ncplane_set_fg_rgb(n, 0x80, 0xc0, 0x80);
|
||||
if(ncplane_putstr_aligned(n, 3, "exo-atmospheric intercept", NCALIGN_LEFT) <= 0){
|
||||
ncplane_destroy(n);
|
||||
return NULL;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -840,7 +840,7 @@ int notcurses_stop(notcurses* nc){
|
||||
char minbuf[BPREFIXSTRLEN + 1];
|
||||
char maxbuf[BPREFIXSTRLEN + 1];
|
||||
double avg = nc->stashstats.render_ns / (double)nc->stashstats.renders;
|
||||
fprintf(stderr, "%ju render%s, %.03gs total (%.03gs min, %.03gs max, %.02gs avg %.1f fps)\n",
|
||||
fprintf(stderr, "\n%ju render%s, %.03gs total (%.03gs min, %.03gs max, %.02gs avg %.1f fps)\n",
|
||||
nc->stashstats.renders, nc->stashstats.renders == 1 ? "" : "s",
|
||||
nc->stashstats.render_ns / 1000000000.0,
|
||||
nc->stashstats.render_min_ns / 1000000000.0,
|
||||
|
BIN
tests/fm6.mkv
BIN
tests/fm6.mkv
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user