1#ifndef NOTCURSES_NOTCURSES
2#define NOTCURSES_NOTCURSES
22#define _Static_assert(...)
24#define RESTRICT restrict
32#define API __attribute__((visibility("default")))
34#define API __declspec(dllexport)
36#define ALLOC __attribute__((malloc)) __attribute__((warn_unused_result))
87#define NCALIGN_TOP NCALIGN_LEFT
88#define NCALIGN_BOTTOM NCALIGN_RIGHT
105#define NCALPHA_HIGHCONTRAST 0x30000000ull
106#define NCALPHA_TRANSPARENT 0x20000000ull
107#define NCALPHA_BLEND 0x10000000ull
108#define NCALPHA_OPAQUE 0x00000000ull
111#define NCPALETTESIZE 256
116#define NC_NOBACKGROUND_MASK 0x8700000000000000ull
118#define NC_BGDEFAULT_MASK 0x0000000040000000ull
120#define NC_BG_RGB_MASK 0x0000000000ffffffull
123#define NC_BG_PALETTE 0x0000000008000000ull
125#define NC_BG_ALPHA_MASK 0x30000000ull
128#define NCCHANNEL_INITIALIZER(r, g, b) \
129 (((uint32_t)(r) << 16u) + ((uint32_t)(g) << 8u) + (b) + NC_BGDEFAULT_MASK)
132#define NCCHANNELS_INITIALIZER(fr, fg, fb, br, bg, bb) \
133 ((NCCHANNEL_INITIALIZER((fr), (fg), (fb)) << 32ull) + \
134 (NCCHANNEL_INITIALIZER((br), (bg), (bb))))
142static inline uint32_t
143ncchannel_alpha(uint32_t channel){
151ncchannel_set_alpha(uint32_t* channel,
unsigned alpha){
155 *channel = (uint32_t)alpha | (*channel & (uint32_t)~NC_BG_ALPHA_MASK);
164ncchannel_default_p(uint32_t channel){
169static inline uint32_t
170ncchannel_set_default(uint32_t* channel){
178ncchannel_palindex_p(uint32_t channel){
179 return !ncchannel_default_p(channel) && (channel &
NC_BG_PALETTE);
184static inline unsigned
185ncchannel_palindex(uint32_t channel){
186 return channel & 0xff;
192ncchannel_set_palindex(uint32_t* channel,
unsigned idx){
197 *channel &= 0xff000000ull;
204ncchannel_rgb_p(uint32_t channel){
205 return !(ncchannel_default_p(channel) || ncchannel_palindex_p(channel));
210static inline unsigned
211ncchannel_r(uint32_t channel){
212 return (channel & 0xff0000u) >> 16u;
217static inline unsigned
218ncchannel_g(uint32_t channel){
219 return (channel & 0x00ff00u) >> 8u;
224static inline unsigned
225ncchannel_b(uint32_t channel){
226 return (channel & 0x0000ffu);
231static inline uint32_t
232ncchannel_rgb(uint32_t channel){
238static inline uint32_t
241 *
r = ncchannel_r(channel);
242 *g = ncchannel_g(channel);
243 *b = ncchannel_b(channel);
251ncchannel_set_rgb8(uint32_t* channel,
unsigned r,
unsigned g,
unsigned b){
252 if(
r >= 256 || g >= 256 || b >= 256){
255 uint32_t
c = (
r << 16u) | (g << 8u) | b;
264ncchannel_set(uint32_t* channel, uint32_t rgb){
276ncchannel_set_rgb8_clipped(uint32_t* channel,
int r,
int g,
int b){
295 uint32_t
c = (uint32_t)((
r << 16u) | (g << 8u) | b);
301static inline uint32_t
302ncchannels_bchannel(uint64_t
channels){
309static inline uint32_t
310ncchannels_fchannel(uint64_t
channels){
311 return ncchannels_bchannel(
channels >> 32u);
315static inline uint64_t
316ncchannels_channels(uint64_t
channels){
317 return ncchannels_bchannel(
channels) |
318 ((uint64_t)ncchannels_fchannel(
channels) << 32u);
322ncchannels_bg_rgb_p(uint64_t
channels){
323 return ncchannel_rgb_p(ncchannels_bchannel(
channels));
327ncchannels_fg_rgb_p(uint64_t
channels){
328 return ncchannel_rgb_p(ncchannels_fchannel(
channels));
332static inline unsigned
333ncchannels_bg_alpha(uint64_t
channels){
334 return ncchannel_alpha(ncchannels_bchannel(
channels));
339static inline uint64_t
340ncchannels_set_bchannel(uint64_t*
channels, uint32_t channel){
349static inline uint64_t
350ncchannels_set_fchannel(uint64_t*
channels, uint32_t channel){
358static inline uint64_t
359ncchannels_set_channels(uint64_t* dst, uint64_t
channels){
360 ncchannels_set_bchannel(dst,
channels & 0xffffffffull);
361 ncchannels_set_fchannel(dst, (uint32_t)((
channels >> 32u) & 0xffffffffull));
367ncchannels_set_bg_alpha(uint64_t*
channels,
unsigned alpha){
371 uint32_t channel = ncchannels_bchannel(*
channels);
372 if(ncchannel_set_alpha(&channel, alpha) < 0){
375 ncchannels_set_bchannel(
channels, channel);
380static inline unsigned
381ncchannels_fg_alpha(uint64_t
channels){
382 return ncchannel_alpha(ncchannels_fchannel(
channels));
387ncchannels_set_fg_alpha(uint64_t*
channels,
unsigned alpha){
388 uint32_t channel = ncchannels_fchannel(*
channels);
389 if(ncchannel_set_alpha(&channel, alpha) < 0){
400static inline uint64_t
401ncchannels_reverse(uint64_t
channels){
402 const uint64_t raw = ((uint64_t)ncchannels_bchannel(
channels) << 32u) +
406 uint64_t ret = raw & ~statemask;
409 if(!ncchannels_bg_rgb_p(ret)){
414 if(!ncchannels_fg_rgb_p(ret)){
423static inline uint64_t
424ncchannels_combine(uint32_t fchan, uint32_t bchan){
426 ncchannels_set_fchannel(&
channels, fchan);
427 ncchannels_set_bchannel(&
channels, bchan);
431static inline unsigned
432ncchannels_fg_palindex(uint64_t
channels){
433 return ncchannel_palindex(ncchannels_fchannel(
channels));
436static inline unsigned
437ncchannels_bg_palindex(uint64_t
channels){
438 return ncchannel_palindex(ncchannels_bchannel(
channels));
442static inline uint32_t
443ncchannels_fg_rgb(uint64_t
channels){
444 return ncchannel_rgb(ncchannels_fchannel(
channels));
448static inline uint32_t
449ncchannels_bg_rgb(uint64_t
channels){
450 return ncchannel_rgb(ncchannels_bchannel(
channels));
454static inline uint32_t
455ncchannels_fg_rgb8(uint64_t
channels,
unsigned*
r,
unsigned* g,
unsigned* b){
456 return ncchannel_rgb8(ncchannels_fchannel(
channels),
r, g, b);
460static inline uint32_t
461ncchannels_bg_rgb8(uint64_t
channels,
unsigned*
r,
unsigned* g,
unsigned* b){
462 return ncchannel_rgb8(ncchannels_bchannel(
channels),
r, g, b);
468ncchannels_set_fg_rgb8(uint64_t*
channels,
unsigned r,
unsigned g,
unsigned b){
469 uint32_t channel = ncchannels_fchannel(*
channels);
470 if(ncchannel_set_rgb8(&channel,
r, g, b) < 0){
479ncchannels_set_fg_rgb8_clipped(uint64_t*
channels,
int r,
int g,
int b){
480 uint32_t channel = ncchannels_fchannel(*
channels);
481 ncchannel_set_rgb8_clipped(&channel,
r, g, b);
486ncchannels_set_fg_palindex(uint64_t*
channels,
unsigned idx){
487 uint32_t channel = ncchannels_fchannel(*
channels);
488 if(ncchannel_set_palindex(&channel,
idx) < 0){
497ncchannels_set_fg_rgb(uint64_t*
channels,
unsigned rgb){
498 uint32_t channel = ncchannels_fchannel(*
channels);
499 if(ncchannel_set(&channel, rgb) < 0){
509ncchannels_set_bg_rgb8(uint64_t*
channels,
unsigned r,
unsigned g,
unsigned b){
510 uint32_t channel = ncchannels_bchannel(*
channels);
511 if(ncchannel_set_rgb8(&channel,
r, g, b) < 0){
514 ncchannels_set_bchannel(
channels, channel);
520ncchannels_set_bg_rgb8_clipped(uint64_t*
channels,
int r,
int g,
int b){
521 uint32_t channel = ncchannels_bchannel(*
channels);
522 ncchannel_set_rgb8_clipped(&channel,
r, g, b);
523 ncchannels_set_bchannel(
channels, channel);
529ncchannels_set_bg_palindex(uint64_t*
channels,
unsigned idx){
530 uint32_t channel = ncchannels_bchannel(*
channels);
531 if(ncchannel_set_palindex(&channel,
idx) < 0){
534 ncchannels_set_bchannel(
channels, channel);
540ncchannels_set_bg_rgb(uint64_t*
channels,
unsigned rgb){
541 uint32_t channel = ncchannels_bchannel(*
channels);
542 if(ncchannel_set(&channel, rgb) < 0){
545 ncchannels_set_bchannel(
channels, channel);
551ncchannels_fg_default_p(uint64_t
channels){
552 return ncchannel_default_p(ncchannels_fchannel(
channels));
557ncchannels_fg_palindex_p(uint64_t
channels){
558 return ncchannel_palindex_p(ncchannels_fchannel(
channels));
565ncchannels_bg_default_p(uint64_t
channels){
566 return ncchannel_default_p(ncchannels_bchannel(
channels));
571ncchannels_bg_palindex_p(uint64_t
channels){
572 return ncchannel_palindex_p(ncchannels_bchannel(
channels));
576static inline uint64_t
577ncchannels_set_fg_default(uint64_t*
channels){
578 uint32_t channel = ncchannels_fchannel(*
channels);
579 ncchannel_set_default(&channel);
580 ncchannels_set_fchannel(
channels, channel);
585static inline uint64_t
586ncchannels_set_bg_default(uint64_t*
channels){
587 uint32_t channel = ncchannels_bchannel(*
channels);
588 ncchannel_set_default(&channel);
589 ncchannels_set_bchannel(
channels, channel);
594#define WCHAR_MAX_UTF8BYTES 4
601API int ncstrwidth(
const char* egcs,
int* validbytes,
int* validwidth)
610 unsigned char* resultbuf,
size_t buflen)
731#define NCCELL_INITIALIZER(c, s, chan) { .gcluster = (htole(c)), .gcluster_backstop = 0,\
732 .width = (uint8_t)((wcwidth(c) < 0 || !c) ? 1 : wcwidth(c)), .stylemask = (s), .channels = (chan), }
734#define NCCELL_CHAR_INITIALIZER(c) { .gcluster = (htole(c)), .gcluster_backstop = 0,\
735 .width = (uint8_t)((wcwidth(c) < 0 || !c) ? 1 : wcwidth(c)), .stylemask = 0, .channels = 0, }
737#define NCCELL_TRIVIAL_INITIALIZER { .gcluster = 0, .gcluster_backstop = 0,\
738 .width = 1, .stylemask = 0, .channels = 0, }
742 memset(
c, 0,
sizeof(*
c));
753 uint16_t stylemask, uint64_t channels){
769#define NCSTYLE_MASK 0xffffu
770#define NCSTYLE_ITALIC 0x0010u
771#define NCSTYLE_UNDERLINE 0x0008u
772#define NCSTYLE_UNDERCURL 0x0004u
773#define NCSTYLE_BOLD 0x0002u
774#define NCSTYLE_STRUCK 0x0001u
775#define NCSTYLE_NONE 0
780nccell_set_styles(
nccell*
c,
unsigned stylebits){
785static inline uint16_t
793nccell_on_styles(
nccell*
c,
unsigned stylebits){
799nccell_off_styles(
nccell*
c,
unsigned stylebits){
805nccell_set_fg_default(
nccell*
c){
811nccell_set_bg_default(
nccell*
c){
816nccell_set_fg_alpha(
nccell*
c,
unsigned alpha){
817 return ncchannels_set_fg_alpha(&
c->
channels, alpha);
821nccell_set_bg_alpha(
nccell*
c,
unsigned alpha){
822 return ncchannels_set_bg_alpha(&
c->
channels, alpha);
825static inline uint64_t
826nccell_set_bchannel(
nccell*
c, uint32_t channel){
827 return ncchannels_set_bchannel(&
c->
channels, channel);
830static inline uint64_t
831nccell_set_fchannel(
nccell*
c, uint32_t channel){
832 return ncchannels_set_fchannel(&
c->
channels, channel);
835static inline uint64_t
836nccell_set_channels(
nccell*
c, uint64_t channels){
837 return ncchannels_set_channels(&
c->
channels, channels);
842nccell_double_wide_p(
const nccell*
c){
848nccell_wide_right_p(
const nccell*
c){
849 return nccell_double_wide_p(
c) &&
c->
gcluster == 0;
854nccell_wide_left_p(
const nccell*
c){
855 return nccell_double_wide_p(
c) &&
c->
gcluster;
863static inline uint64_t
864nccell_channels(
const nccell*
c){
870static inline uint32_t
871nccell_bchannel(
const nccell* cl){
872 return ncchannels_bchannel(cl->
channels);
877static inline uint32_t
878nccell_fchannel(
const nccell* cl){
879 return ncchannels_fchannel(cl->
channels);
884static inline unsigned
891ALLOC static inline char*
899 uint16_t* stylemask, uint64_t* channels){
906 return nccell_strdup(
n,
c);
917 if(c1->stylemask != c2->stylemask){
920 if(c1->channels != c2->channels){
940 char gcluster[
sizeof(
egc) + 1];
942 memcpy(gcluster, &
egc,
sizeof(
egc));
957 "WCHAR_MAX_UTF8BYTES didn't equal sizeof(uint32_t)");
958 memcpy(&utf8asegc, utf8,
sizeof(utf8));
959 return nccell_load_egc32(
n,
c, utf8asegc);
990#define NCOPTION_INHIBIT_SETLOCALE 0x0001ull
996#define NCOPTION_NO_CLEAR_BITMAPS 0x0002ull
1000#define NCOPTION_NO_WINCH_SIGHANDLER 0x0004ull
1005#define NCOPTION_NO_QUIT_SIGHANDLERS 0x0008ull
1011#define NCOPTION_PRESERVE_CURSOR 0x0010ull
1015#define NCOPTION_SUPPRESS_BANNERS 0x0020ull
1019#define NCOPTION_NO_ALTERNATE_SCREEN 0x0040ull
1025#define NCOPTION_NO_FONT_CHANGES 0x0080ull
1030#define NCOPTION_DRAIN_INPUT 0x0100ull
1034#define NCOPTION_SCROLLING 0x0200ull
1037#define NCOPTION_CLI_MODE (NCOPTION_NO_ALTERNATE_SCREEN \
1038 |NCOPTION_NO_CLEAR_BITMAPS \
1039 |NCOPTION_PRESERVE_CURSOR \
1040 |NCOPTION_SCROLLING)
1190nckey_mouse_p(uint32_t
r){
1203#define NCINPUT_MAX_EFF_TEXT_CODEPOINTS 4
1258ncinput_capslock_p(
const ncinput*
n){
1263ncinput_numlock_p(
const ncinput*
n){
1273 if(n1->
id != n2->
id){
1276 if(n1->
y != n2->
y || n1->
x != n2->
x){
1321static inline uint32_t
1323 struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 };
1329static inline uint32_t
1336ncinput_nomod_p(
const ncinput* ni){
1340#define NCMICE_NO_EVENTS 0
1341#define NCMICE_MOVE_EVENT 0x1
1342#define NCMICE_BUTTON_EVENT 0x2
1343#define NCMICE_DRAG_EVENT 0x4
1344#define NCMICE_ALL_EVENTS 0x7
1395static inline const struct ncplane*
1402static inline unsigned
1403ncplane_dim_y(
const struct ncplane*
n){
1409static inline unsigned
1410ncplane_dim_x(
const struct ncplane*
n){
1441#define NCPLANE_OPTION_HORALIGNED 0x0001ull
1443#define NCPLANE_OPTION_VERALIGNED 0x0002ull
1450#define NCPLANE_OPTION_MARGINALIZED 0x0004ull
1454#define NCPLANE_OPTION_FIXED 0x0008ull
1458#define NCPLANE_OPTION_AUTOGROW 0x0010ull
1462#define NCPLANE_OPTION_VSCROLL 0x0020ull
1600ncpalette_set_rgb8(
ncpalette* p,
int idx,
unsigned r,
unsigned g,
unsigned b){
1604 return ncchannel_set_rgb8(&p->
chans[
idx],
r, g, b);
1612 return ncchannel_set(&p->
chans[
idx], rgb);
1616ncpalette_get(
const ncpalette* p,
int idx, uint32_t* palent){
1620 *palent = ncchannel_rgb(p->
chans[
idx]);
1629 return (
int)ncchannel_rgb8(p->
chans[
idx],
r, g, b);
1701 if(!caps->can_change_colors){
1705 if(caps->colors <
sizeof(p->
chans) /
sizeof(*p->
chans)){
1713notcurses_cantruecolor(const struct
notcurses* nc){
1719notcurses_canchangecolor(const struct
notcurses* nc){
1726 return notcurses_canchangecolor(
n) || notcurses_cantruecolor(
n);
1739notcurses_canutf8(const struct
notcurses* nc){
1745notcurses_canhalfblock(const struct
notcurses* nc){
1746 return notcurses_canutf8(nc);
1751notcurses_canquadrant(const struct
notcurses* nc){
1757notcurses_cansextant(const struct
notcurses* nc){
1763notcurses_canoctant(const struct
notcurses* nc){
1769notcurses_canbraille(const struct
notcurses* nc){
1775notcurses_canpixel(const struct
notcurses* nc){
1853 unsigned keepleny,
unsigned keeplenx,
1861 unsigned oldy, oldx;
1863 unsigned keepleny = oldy >
ylen ?
ylen : oldy;
1864 unsigned keeplenx = oldx >
xlen ?
xlen : oldx;
1884 uint16_t stylemask, uint64_t channels);
1926ncplane_descendant_p(
const struct ncplane*
n,
const struct ncplane* ancestor){
1954ncplane_move_top(struct
ncplane*
n){
1960ncplane_move_bottom(struct
ncplane*
n){
1977ncplane_move_family_top(struct
ncplane*
n){
1983ncplane_move_family_bottom(struct
ncplane*
n){
2085 unsigned* pxdimy,
unsigned* pxdimx)
2092notcurses_align(
int availu,
ncalign_e align,
int u){
2097 return (availu - u) / 2;
2110 return notcurses_align((
int)ncplane_dim_x(
n), align,
c);
2118 return notcurses_align((
int)ncplane_dim_y(
n), align,
r);
2141static inline unsigned
2142ncplane_cursor_y(
const struct ncplane*
n){
2148static inline unsigned
2149ncplane_cursor_x(
const struct ncplane*
n){
2181ncplane_putchar_yx(
struct ncplane*
n,
int y,
int x,
char c){
2188ncplane_putchar(
struct ncplane*
n,
char c){
2189 return ncplane_putchar_yx(
n, -1, -1,
c);
2208ncplane_putegc(
struct ncplane*
n,
const char* gclust,
size_t* sbytes){
2218ALLOC static inline char*
2219ncwcsrtombs(
const wchar_t* src){
2221 memset(&ps, 0,
sizeof(ps));
2222 size_t mbytes = wcsrtombs(
NULL, &src, 0, &ps);
2223 if(mbytes == (
size_t)-1){
2227 char* mbstr = (
char*)malloc(mbytes);
2231 size_t s = wcsrtombs(mbstr, &src, mbytes, &ps);
2232 if(s == (
size_t)-1){
2241ncplane_putwegc(
struct ncplane*
n,
const wchar_t* gclust,
size_t* sbytes){
2242 char* mbstr = ncwcsrtombs(gclust);
2246 int ret = ncplane_putegc(
n, mbstr, sbytes);
2253ncplane_putwegc_yx(
struct ncplane*
n,
int y,
int x,
const wchar_t* gclust,
2258 return ncplane_putwegc(
n, gclust, sbytes);
2273ncplane_putstr_yx(
struct ncplane*
n,
int y,
int x,
const char* gclusters){
2296ncplane_putstr(
struct ncplane*
n,
const char* gclustarr){
2297 return ncplane_putstr_yx(
n, -1, -1, gclustarr);
2302 int validbytes, validwidth;
2305 int xpos = ncplane_halign(
n, align, validwidth);
2309 return ncplane_putstr_yx(
n,
y, xpos, s);
2315ncplane_putstr_stained(
struct ncplane*
n,
const char* gclusters){
2342ncplane_putnstr_yx(
struct ncplane*
n,
int y,
int x,
size_t s,
const char* gclusters){
2346 while(offset < s && gclusters[offset]){
2366ncplane_putnstr(
struct ncplane*
n,
size_t s,
const char* gclustarr){
2367 return ncplane_putnstr_yx(
n, -1, -1, s, gclustarr);
2373ncplane_putwstr_yx(
struct ncplane*
n,
int y,
int x,
const wchar_t* gclustarr){
2376 char* mbstr = (
char*)malloc(mbytes);
2381 memset(&ps, 0,
sizeof(ps));
2382 const wchar_t** gend = &gclustarr;
2383 size_t s = wcsrtombs(mbstr, gend, mbytes, &ps);
2384 if(s == (
size_t)-1){
2388 int ret = ncplane_putstr_yx(
n,
y,
x, mbstr);
2395 const wchar_t* gclustarr){
2396 int width = wcswidth(gclustarr, INT_MAX);
2397 int xpos = ncplane_halign(
n, align, width);
2401 return ncplane_putwstr_yx(
n,
y, xpos, gclustarr);
2408ncplane_putwstr(
struct ncplane*
n,
const wchar_t* gclustarr){
2409 return ncplane_putwstr_yx(
n, -1, -1, gclustarr);
2416ncplane_pututf32_yx(
struct ncplane*
n,
int y,
int x, uint32_t u){
2422 char utf8c[MB_LEN_MAX + 1];
2424 memset(&ps, 0,
sizeof(ps));
2427 size_t s = wcrtomb(utf8c, (
wchar_t)u, &ps);
2428 if(s == (
size_t)-1){
2436ncplane_putwc_yx(
struct ncplane*
n,
int y,
int x,
wchar_t w){
2437 return ncplane_pututf32_yx(
n,
y,
x, (uint32_t)w);
2442ncplane_putwc(
struct ncplane*
n,
wchar_t w){
2443 return ncplane_putwc_yx(
n, -1, -1, w);
2456ncplane_putwc_utf32(
struct ncplane*
n,
const wchar_t* w,
unsigned* wchars){
2458 if(*w >= 0xd000 && *w <= 0xdbff){
2460 if(w[1] < 0xdc00 || w[1] > 0xdfff){
2463 utf32 = (w[0] & 0x3fflu) << 10lu;
2464 utf32 += (w[1] & 0x3fflu);
2467 utf32 = (uint32_t)*w;
2469 return ncplane_pututf32_yx(
n, -1, -1, utf32);
2475ncplane_putwc_stained(
struct ncplane*
n,
wchar_t w){
2476 wchar_t warr[2] = { w, L
'\0' };
2482 const char* format, va_list ap)
2487 const
char* format, va_list ap)
2492ncplane_vprintf(struct
ncplane*
n, const
char* format, va_list ap){
2501ncplane_printf(struct
ncplane*
n, const
char* format, ...)
2506ncplane_printf(struct
ncplane*
n, const
char* format, ...){
2509 int ret = ncplane_vprintf(
n, format, va);
2515ncplane_printf_yx(
struct ncplane*
n,
int y,
int x,
const char* format, ...)
2519ncplane_printf_yx(struct
ncplane*
n,
int y,
int x, const
char* format, ...){
2529 const char* format, ...)
2533ncplane_printf_aligned(struct
ncplane*
n,
int y,
ncalign_e align, const
char* format, ...){
2542ncplane_printf_stained(
struct ncplane*
n,
const char* format, ...)
2546ncplane_printf_stained(struct
ncplane*
n, const
char* format, ...){
2574 const char* text,
size_t* bytes)
2584 unsigned len, uint64_t c1, uint64_t c2)
2593 unsigned len, uint64_t c1, uint64_t c2)
2601#define NCBOXMASK_TOP 0x0001
2602#define NCBOXMASK_RIGHT 0x0002
2603#define NCBOXMASK_BOTTOM 0x0004
2604#define NCBOXMASK_LEFT 0x0008
2605#define NCBOXGRAD_TOP 0x0010
2606#define NCBOXGRAD_RIGHT 0x0020
2607#define NCBOXGRAD_BOTTOM 0x0040
2608#define NCBOXGRAD_LEFT 0x0080
2609#define NCBOXCORNER_MASK 0x0300
2610#define NCBOXCORNER_SHIFT 8u
2632 const nccell* vline,
unsigned ystop,
unsigned xstop,
2641 const nccell* vline,
unsigned ystop,
unsigned xstop,
2656 unsigned dimy, dimx;
2658 return ncplane_box_sized(
n,
ul,
ur,
ll,
lr, hline, vline, dimy, dimx,
ctlword);
2691 unsigned xlen,
const char*
egc, uint16_t styles,
2692 uint64_t
ul, uint64_t
ur, uint64_t
ll, uint64_t
lr)
2700 unsigned xlen, uint32_t
ul, uint32_t
ur,
2701 uint32_t
ll, uint32_t
lr)
2723 unsigned xlen, uint64_t
ul, uint64_t
ur,
2724 uint64_t
ll, uint64_t
lr)
2746 int begsrcy,
int begsrcx,
2784static inline uint32_t
2785nccell_fg_rgb(
const nccell* cl){
2786 return ncchannels_fg_rgb(cl->
channels);
2790static inline uint32_t
2791nccell_bg_rgb(
const nccell* cl){
2792 return ncchannels_bg_rgb(cl->
channels);
2796static inline uint32_t
2797nccell_fg_alpha(
const nccell* cl){
2798 return ncchannels_fg_alpha(cl->
channels);
2802static inline uint32_t
2803nccell_bg_alpha(
const nccell* cl){
2804 return ncchannels_bg_alpha(cl->
channels);
2808static inline uint32_t
2809nccell_fg_rgb8(
const nccell* cl,
unsigned*
r,
unsigned* g,
unsigned* b){
2810 return ncchannels_fg_rgb8(cl->
channels,
r, g, b);
2814static inline uint32_t
2815nccell_bg_rgb8(
const nccell* cl,
unsigned*
r,
unsigned* g,
unsigned* b){
2816 return ncchannels_bg_rgb8(cl->
channels,
r, g, b);
2822nccell_set_fg_rgb8(
nccell* cl,
unsigned r,
unsigned g,
unsigned b){
2823 return ncchannels_set_fg_rgb8(&cl->
channels,
r, g, b);
2828nccell_set_fg_rgb8_clipped(
nccell* cl,
int r,
int g,
int b){
2829 ncchannels_set_fg_rgb8_clipped(&cl->
channels,
r, g, b);
2834nccell_set_fg_rgb(
nccell*
c, uint32_t channel){
2835 return ncchannels_set_fg_rgb(&
c->
channels, channel);
2841nccell_set_fg_palindex(
nccell* cl,
unsigned idx){
2842 return ncchannels_set_fg_palindex(&cl->
channels,
idx);
2845static inline uint32_t
2846nccell_fg_palindex(
const nccell* cl){
2847 return ncchannels_fg_palindex(cl->
channels);
2853nccell_set_bg_rgb8(
nccell* cl,
unsigned r,
unsigned g,
unsigned b){
2854 return ncchannels_set_bg_rgb8(&cl->
channels,
r, g, b);
2859nccell_set_bg_rgb8_clipped(
nccell* cl,
int r,
int g,
int b){
2860 ncchannels_set_bg_rgb8_clipped(&cl->
channels,
r, g, b);
2866nccell_set_bg_rgb(
nccell*
c, uint32_t channel){
2867 return ncchannels_set_bg_rgb(&
c->
channels, channel);
2873nccell_set_bg_palindex(
nccell* cl,
unsigned idx){
2874 return ncchannels_set_bg_palindex(&cl->
channels,
idx);
2877static inline uint32_t
2878nccell_bg_palindex(
const nccell* cl){
2879 return ncchannels_bg_palindex(cl->
channels);
2884nccell_fg_default_p(
const nccell* cl){
2885 return ncchannels_fg_default_p(cl->
channels);
2889nccell_fg_palindex_p(
const nccell* cl){
2890 return ncchannels_fg_palindex_p(cl->
channels);
2897nccell_bg_default_p(
const nccell* cl){
2898 return ncchannels_bg_default_p(cl->
channels);
2902nccell_bg_palindex_p(
const nccell* cl){
2903 return ncchannels_bg_palindex_p(cl->
channels);
2908static inline uint32_t
2909ncplane_bchannel(
const struct ncplane*
n){
2915static inline uint32_t
2916ncplane_fchannel(
const struct ncplane*
n){
2949static inline uint32_t
2950ncplane_fg_rgb(
const struct ncplane*
n){
2955static inline uint32_t
2956ncplane_bg_rgb(
const struct ncplane*
n){
2961static inline uint32_t
2962ncplane_fg_alpha(
const struct ncplane*
n){
2968ncplane_fg_default_p(
const struct ncplane*
n){
2973static inline uint32_t
2974ncplane_bg_alpha(
const struct ncplane*
n){
2980ncplane_bg_default_p(
const struct ncplane*
n){
2985static inline uint32_t
2986ncplane_fg_rgb8(
const struct ncplane*
n,
unsigned*
r,
unsigned* g,
unsigned* b){
2991static inline uint32_t
2992ncplane_bg_rgb8(
const struct ncplane*
n,
unsigned*
r,
unsigned* g,
unsigned* b){
3030 const struct timespec*,
void* curry);
3037 fadecb fader,
void* curry)
3044 fadecb fader,
void* curry)
3059 int iter,
fadecb fader,
void* curry)
3065 int iter,
fadecb fader,
void* curry)
3093 if(nccell_prime(
n, vl, gclusters +
ulen, styles,
channels) > 0){
3153 unsigned ystop,
unsigned xstop,
unsigned ctlword){
3158 if((ret = nccells_rounded_box(
n, styles,
channels, &
ul, &
ur, &
ll, &
lr, &hl, &vl)) == 0){
3168ncplane_perimeter_rounded(
struct ncplane*
n, uint16_t stylemask,
3173 unsigned dimy, dimx;
3184 int r = ncplane_box_sized(
n, &
ul, &
ur, &
ll, &
lr, &hl, &vl, dimy, dimx,
ctlword);
3192ncplane_rounded_box_sized(
struct ncplane*
n, uint16_t styles, uint64_t
channels,
3207 if((ret = nccells_double_box(
n, styles,
channels, &
ul, &
ur, &
ll, &
lr, &hl, &vl)) == 0){
3223 if((ret = nccells_ascii_box(
n, styles,
channels, &
ul, &
ur, &
ll, &
lr, &hl, &vl)) == 0){
3233ncplane_perimeter_double(
struct ncplane*
n, uint16_t stylemask,
3238 unsigned dimy, dimx;
3249 int r = ncplane_box_sized(
n, &
ul, &
ur, &
ll, &
lr, &hl, &vl, dimy, dimx,
ctlword);
3257ncplane_double_box_sized(
struct ncplane*
n, uint16_t styles, uint64_t
channels,
3317 int palsize,
int pstride,
3318 const uint32_t* palette)
3330 unsigned leny,
unsigned lenx)
3337#define NCVISUAL_OPTION_NODEGRADE 0x0001ull
3338#define NCVISUAL_OPTION_BLEND 0x0002ull
3339#define NCVISUAL_OPTION_HORALIGNED 0x0004ull
3340#define NCVISUAL_OPTION_VERALIGNED 0x0008ull
3341#define NCVISUAL_OPTION_ADDALPHA 0x0010ull
3342#define NCVISUAL_OPTION_CHILDPLANE 0x0020ull
3343#define NCVISUAL_OPTION_NOINTERPOLATE 0x0040ull
3534 const struct timespec*,
void*);
3540 const struct timespec* tspec,
void* curry)
3595static inline unsigned
3596ncpixel_a(uint32_t pixel){
3597 return (
htole(pixel) & 0xff000000u) >> 24u;
3601static inline unsigned
3602ncpixel_r(uint32_t pixel){
3603 return (
htole(pixel) & 0x000000ffu);
3607static inline unsigned
3608ncpixel_g(uint32_t pixel){
3609 return (
htole(pixel) & 0x0000ff00u) >> 8u;
3613static inline unsigned
3614ncpixel_b(uint32_t pixel){
3615 return (
htole(pixel) & 0x00ff0000u) >> 16u;
3620ncpixel_set_a(uint32_t* pixel,
unsigned a){
3624 *pixel =
htole((
htole(*pixel) & 0x00ffffffu) | (a << 24u));
3630ncpixel_set_r(uint32_t* pixel,
unsigned r){
3634 *pixel =
htole((
htole(*pixel) & 0xffffff00u) |
r);
3640ncpixel_set_g(uint32_t* pixel,
unsigned g){
3644 *pixel =
htole((
htole(*pixel) & 0xffff00ffu) | (g << 8u));
3650ncpixel_set_b(uint32_t* pixel,
unsigned b){
3654 *pixel =
htole((
htole(*pixel) & 0xff00ffffu) | (b << 16u));
3659static inline uint32_t
3660ncpixel(
unsigned r,
unsigned g,
unsigned b){
3662 ncpixel_set_a(&pixel, 0xff);
3663 if(
r > 255)
r = 255;
3664 ncpixel_set_r(&pixel,
r);
3665 if(g > 255) g = 255;
3666 ncpixel_set_g(&pixel, g);
3667 if(b > 255) b = 255;
3668 ncpixel_set_b(&pixel, b);
3674ncpixel_set_rgb8(uint32_t* pixel,
unsigned r,
unsigned g,
unsigned b){
3675 if(ncpixel_set_r(pixel,
r) || ncpixel_set_g(pixel, g) || ncpixel_set_b(pixel, b)){
3694#define NCREEL_OPTION_INFINITESCROLL 0x0001ull
3698#define NCREEL_OPTION_CIRCULAR 0x0002ull
3813API const char*
ncnmetric(uintmax_t val,
size_t s, uintmax_t decimal,
3814 char* buf,
int omitdec, uintmax_t mult,
int uprefix)
3825#define NCPREFIXCOLUMNS 7
3826#define NCIPREFIXCOLUMNS 8
3827#define NCBPREFIXCOLUMNS 9
3828#define NCPREFIXSTRLEN (NCPREFIXCOLUMNS + 1)
3829#define NCIPREFIXSTRLEN (NCIPREFIXCOLUMNS + 1)
3830#define NCBPREFIXSTRLEN (NCBPREFIXCOLUMNS + 1)
3833#define NCMETRICFWIDTH(x, cols) \
3834 ((int)(strlen(x) - ncstrwidth(x, NULL, NULL) + (cols)))
3835#define NCPREFIXFMT(x) NCMETRICFWIDTH((x), NCPREFIXCOLUMNS), (x)
3836#define NCIPREFIXFMT(x) NCMETRICFWIDTH((x), NCIPREFIXCOLUMNS), (x)
3837#define NCBPREFIXFMT(x) NCMETRICFWIDTH((x), NCBPREFIXCOLUMNS), (x)
3840static inline const char*
3841ncqprefix(uintmax_t val, uintmax_t decimal,
char* buf,
int omitdec){
3846static inline const char*
3847nciprefix(uintmax_t val, uintmax_t decimal,
char* buf,
int omitdec){
3852static inline const char*
3853ncbprefix(uintmax_t val, uintmax_t decimal,
char* buf,
int omitdec){
4127#define NCMENU_OPTION_BOTTOM 0x0001ull
4128#define NCMENU_OPTION_HIDING 0x0002ull
4161 const char* item,
bool enabled);
4203#define NCPROGBAR_OPTION_RETROGRADE 0x0001u
4237#define NCTABBED_OPTION_BOTTOM 0x0001ull
4258 __attribute ((nonnull (1)));
4332 const char*
name,
void* opaque)
4347 struct nctab* before)
4384static inline uint64_t
4391static inline uint64_t
4398static inline uint64_t
4480#define NCPLOT_OPTION_LABELTICKSD 0x0001u
4481#define NCPLOT_OPTION_EXPONENTIALD 0x0002u
4482#define NCPLOT_OPTION_VERTICALI 0x0004u
4483#define NCPLOT_OPTION_NODEGRADE 0x0008u
4484#define NCPLOT_OPTION_DETECTMAXONLY 0x0010u
4485#define NCPLOT_OPTION_PRINTSAMPLE 0x0020u
4511 uint64_t miny, uint64_t maxy)
4515 double miny,
double maxy)
4579 const char* bin,
const char*
const arg[],
4584 const char* bin,
const char*
const arg[],
4589 const char* bin,
const char*
const arg[],
4590 const char*
const env[],
4607 const void* data,
size_t len)
4611#define NCREADER_OPTION_HORSCROLL 0x0001ull
4613#define NCREADER_OPTION_VERSCROLL 0x0002ull
4615#define NCREADER_OPTION_NOCMDKEYS 0x0004ull
4618#define NCREADER_OPTION_CURSOR 0x0008ull
API int API int API int uint64_t uint64_t uint64_t uint64_t lr
API int API int API int uint64_t uint64_t uint64_t uint64_t unsigned unsigned unsigned ctlword
API int API int API int uint64_t uint64_t uint64_t ll
API int API int API int uint64_t uint64_t uint64_t uint64_t unsigned unsigned xlen
API int API int API int uint64_t uint64_t uint64_t uint64_t unsigned ylen
API int API int API int uint64_t ul
API int API int API int uint64_t uint64_t ur
const char va_start(va, fmt)
#define NCKEY_MOD_NUMLOCK
#define NCKEY_MOD_CAPSLOCK
const char * nccell_extended_gcluster(const ncplane *n, const nccell *c)
#define NCVISUAL_OPTION_CHILDPLANE
API int notcurses_default_foreground(const struct notcurses *nc, uint32_t *fg) __attribute__((nonnull(1)))
API int notcurses_refresh(struct notcurses *n, unsigned *RESTRICT y, unsigned *RESTRICT x) __attribute__((nonnull(1)))
API ALLOC struct nctabbed * nctabbed_create(struct ncplane *n, const nctabbed_options *opts) __attribute((nonnull(1)))
API int API int API void nctree_destroy(struct nctree *n)
API ALLOC struct nctablet * ncreel_add(struct ncreel *nr, struct nctablet *after, struct nctablet *before, tabletcb cb, void *opaque) __attribute__((nonnull(1)))
API int ncplane_polyfill_yx(struct ncplane *n, int y, int x, const nccell *c) __attribute__((nonnull(1
API void ncplane_set_styles(struct ncplane *n, unsigned stylebits) __attribute__((nonnull(1)))
API int ncvisual_polyfill_yx(struct ncvisual *n, unsigned y, unsigned x, uint32_t rgba) __attribute__((nonnull(1)))
API uint64_t ncplane_channels(const struct ncplane *n) __attribute__((nonnull(1)))
API int ncreader_move_up(struct ncreader *n) __attribute__((nonnull(1)))
API struct ncplane * ncmultiselector_plane(struct ncmultiselector *n)
API struct nctab * nctabbed_prev(struct nctabbed *nt) __attribute__((nonnull(1)))
API int ncplane_move_above(struct ncplane *RESTRICT n, struct ncplane *RESTRICT above) __attribute__((nonnull(1)))
API void ncprogbar_destroy(struct ncprogbar *n)
API __attribute__((returns_nonnull)) const char *nccell_extended_gcluster(const struct ncplane *n
API void nctabbed_set_sepchan(struct nctabbed *nt, uint64_t chan) __attribute__((nonnull(1)))
API char * ncplane_at_cursor(const struct ncplane *n, uint16_t *stylemask, uint64_t *channels) __attribute__((nonnull(1)))
API void ncvisual_destroy(struct ncvisual *ncv)
API void nctabbed_redraw(struct nctabbed *nt) __attribute__((nonnull(1)))
API int ncmenu_nextsection(struct ncmenu *n) __attribute__((nonnull(1)))
API int ncplane_base(struct ncplane *n, nccell *c)
API const char * nctabbed_separator(struct nctabbed *nt) __attribute__((nonnull(1)))
API struct ncplane * ncplane_reparent(struct ncplane *n, struct ncplane *newparent) __attribute__((nonnull(1
API int ncplane_resize(struct ncplane *n, int keepy, int keepx, unsigned keepleny, unsigned keeplenx, int yoff, int xoff, unsigned ylen, unsigned xlen)
API struct ncplane * ncreel_plane(struct ncreel *nr) __attribute__((nonnull(1)))
API const char * nctab_name(struct nctab *t) __attribute__((nonnull(1)))
API ALLOC struct ncvisual * ncvisual_from_sixel(const char *s, unsigned leny, unsigned lenx) __attribute__((nonnull(1)))
API int ncplane_mergedown_simple(struct ncplane *RESTRICT src, struct ncplane *RESTRICT dst) __attribute__((nonnull(1
API int API int ncplane_mergedown(struct ncplane *RESTRICT src, struct ncplane *RESTRICT dst, int begsrcy, int begsrcx, unsigned leny, unsigned lenx, int dsty, int dstx) __attribute__((nonnull(1
API int ncplane_putwegc_stained(struct ncplane *n, const wchar_t *gclust, size_t *sbytes) __attribute__((nonnull(1
API int ncvisual_simple_streamer(struct ncvisual *ncv, struct ncvisual_options *vopts, const struct timespec *tspec, void *curry) __attribute__((nonnull(1)))
API ALLOC struct ncselector * ncselector_create(struct ncplane *n, const ncselector_options *opts) __attribute__((nonnull(1)))
API bool API int ncreader_move_left(struct ncreader *n) __attribute__((nonnull(1)))
API int ncplane_set_bg_palindex(struct ncplane *n, unsigned idx)
API uint32_t notcurses_get(struct notcurses *n, const struct timespec *ts, ncinput *ni) __attribute__((nonnull(1)))
API ALLOC struct ncplane * ncplane_create(struct ncplane *n, const ncplane_options *nopts) __attribute__((nonnull(1
API int API void nctab_move_right(struct nctabbed *nt, struct nctab *t) __attribute__((nonnull(1
API ALLOC char * notcurses_accountname(void)
API int ncplane_set_bg_rgb(struct ncplane *n, uint32_t channel)
API struct ncplane * ncmenu_plane(struct ncmenu *n)
API void ncplane_dim_yx(const struct ncplane *n, unsigned *RESTRICT y, unsigned *RESTRICT x) __attribute__((nonnull(1)))
API int ncpile_render(struct ncplane *n) __attribute__((nonnull(1)))
API int notcurses_enter_alternate_screen(struct notcurses *nc) __attribute__((nonnull(1)))
API bool notcurses_canopen_videos(const struct notcurses *nc) __attribute__((pure))
API ALLOC struct ncprogbar * ncprogbar_create(struct ncplane *n, const ncprogbar_options *opts) __attribute__((nonnull(1)))
API struct ncplane * ncselector_plane(struct ncselector *n) __attribute__((nonnull(1)))
#define WCHAR_MAX_UTF8BYTES
API int ncplane_fadeout_iteration(struct ncplane *n, struct ncfadectx *nctx, int iter, fadecb fader, void *curry) __attribute__((nonnull(1
const struct ncplane_options struct ncvisual * ncv
API int ncmenu_previtem(struct ncmenu *n) __attribute__((nonnull(1)))
API int ncreader_move_right(struct ncreader *n) __attribute__((nonnull(1)))
API int ncplane_set_bg_rgb8(struct ncplane *n, unsigned r, unsigned g, unsigned b)
API struct ncplane * ncfdplane_plane(struct ncfdplane *n) __attribute__((nonnull(1)))
void(* tabcb)(struct nctab *t, struct ncplane *ncp, void *curry)
API int nctabbed_tabcount(struct nctabbed *nt) __attribute__((nonnull(1)))
API int ncvisual_resize(struct ncvisual *n, int rows, int cols) __attribute__((nonnull(1)))
API int notcurses_stop(struct notcurses *nc)
API int notcurses_cursor_yx(const struct notcurses *nc, int *y, int *x) __attribute__((nonnull(1)))
API const char * ncselector_selected(const struct ncselector *n) __attribute__((nonnull(1)))
API int ncplane_cursor_move_yx(struct ncplane *n, int y, int x) __attribute__((nonnull(1)))
API struct ncplane * nctabbed_plane(struct nctabbed *nt) __attribute__((nonnull(1)))
API struct ncplane * ncvisual_blit(struct notcurses *nc, struct ncvisual *ncv, const struct ncvisual_options *vopts) __attribute__((nonnull(2)))
API int ncplane_set_base(struct ncplane *n, const char *egc, uint16_t stylemask, uint64_t channels)
API int ncstrwidth(const char *egcs, int *validbytes, int *validwidth) __attribute__((nonnull(1)))
API struct notcurses * ncplane_notcurses(const struct ncplane *n) __attribute__((nonnull(1)))
int(* fadecb)(struct notcurses *nc, struct ncplane *n, const struct timespec *, void *curry)
API int notcurses_getvec(struct notcurses *n, const struct timespec *ts, ncinput *ni, int vcount) __attribute__((nonnull(1
API struct ncplane * notcurses_stdplane(struct notcurses *nc) __attribute__((nonnull(1)))
const struct ncplane_options struct ncvisual struct ncvisual_options * vopts
API bool ncplane_translate_abs(const struct ncplane *n, int *RESTRICT y, int *RESTRICT x) __attribute__((nonnull(1)))
API void ncplane_abs_yx(const struct ncplane *n, int *RESTRICT y, int *RESTRICT x) __attribute__((nonnull(1)))
API const char * ncmenu_selected(const struct ncmenu *n, ncinput *ni)
API int notcurses_ucs32_to_utf8(const uint32_t *ucs32, unsigned ucs32count, unsigned char *resultbuf, size_t buflen) __attribute__((nonnull(1
API struct nctab * nctabbed_select(struct nctabbed *nt, struct nctab *t) __attribute__((nonnull(1
API bool ncplane_scrolling_p(const struct ncplane *n) __attribute__((nonnull(1)))
API bool ncreel_offer_input(struct ncreel *nr, const ncinput *ni) __attribute__((nonnull(1
API int notcurses_cursor_enable(struct notcurses *nc, int y, int x) __attribute__((nonnull(1)))
API ALLOC struct notcurses * notcurses_init(const notcurses_options *opts, FILE *fp)
API int notcurses_cursor_disable(struct notcurses *nc) __attribute__((nonnull(1)))
API int API int ncvisual_set_yx(const struct ncvisual *n, unsigned y, unsigned x, uint32_t pixel) __attribute__((nonnull(1)))
API int API void API void nctab_move_left(struct nctabbed *nt, struct nctab *t) __attribute__((nonnull(1
API ALLOC struct ncplane API ALLOC struct ncplane * ncpile_create(struct notcurses *nc, const ncplane_options *nopts) __attribute__((nonnull(1
API void API void notcurses_stats_reset(struct notcurses *nc, ncstats *stats) __attribute__((nonnull(1)))
API int notcurses_leave_alternate_screen(struct notcurses *nc) __attribute__((nonnull(1)))
API int ncplane_putchar_stained(struct ncplane *n, char c) __attribute__((nonnull(1)))
API int ncpile_rasterize(struct ncplane *n) __attribute__((nonnull(1)))
API struct ncplane * nctabbed_content_plane(struct nctabbed *nt) __attribute__((nonnull(1)))
API int ncplane_at_cursor_cell(struct ncplane *n, nccell *c) __attribute__((nonnull(1
#define NCINPUT_MAX_EFF_TEXT_CODEPOINTS
#define NC_BGDEFAULT_MASK
const struct ncplane_options * opts
API int nctab_set_name(struct nctab *t, const char *newname) __attribute__((nonnull(1
API int ncplane_x(const struct ncplane *n) __attribute__((pure))
API struct ncplane * ncpile_top(struct ncplane *n) __attribute__((nonnull(1)))
API ALLOC char * notcurses_hostname(void)
API void ncreader_destroy(struct ncreader *n, char **contents)
API uint64_t ncplane_set_fchannel(struct ncplane *n, uint32_t channel) __attribute__((nonnull(1)))
API int ncplane_set_fg_alpha(struct ncplane *n, int alpha)
int(* tabletcb)(struct nctablet *t, bool drawfromtop)
API struct nctab * nctab_next(struct nctab *t) __attribute__((nonnull(1)))
API ALLOC struct ncvisual * ncvisual_from_rgb_loose(const void *rgba, int rows, int rowstride, int cols, int alpha) __attribute__((nonnull(1)))
#define NC_NOBACKGROUND_MASK
API int ncreader_move_down(struct ncreader *n) __attribute__((nonnull(1)))
API uint16_t ncplane_styles(const struct ncplane *n) __attribute__((nonnull(1)))
API int API int API void notcurses_drop_planes(struct notcurses *nc) __attribute__((nonnull(1)))
API ALLOC struct ncfadectx * ncfadectx_setup(struct ncplane *n) __attribute__((nonnull(1)))
API int ncplane_putegc_stained(struct ncplane *n, const char *gclust, size_t *sbytes) __attribute__((nonnull(1
API void notcurses_stats(struct notcurses *nc, ncstats *stats) __attribute__((nonnull(1
API char * notcurses_at_yx(struct notcurses *nc, unsigned yoff, unsigned xoff, uint16_t *stylemask, uint64_t *channels) __attribute__((nonnull(1)))
API void ncplane_yx(const struct ncplane *n, int *RESTRICT y, int *RESTRICT x) __attribute__((nonnull(1)))
API void nctabbed_set_hdrchan(struct nctabbed *nt, uint64_t chan) __attribute__((nonnull(1)))
API int ncplane_puttext(struct ncplane *n, int y, ncalign_e align, const char *text, size_t *bytes) __attribute__((nonnull(1
API struct nctab * nctabbed_selected(struct nctabbed *nt) __attribute__((nonnull(1)))
API void ncplane_set_bg_default(struct ncplane *n)
API bool ncmultiselector_offer_input(struct ncmultiselector *n, const ncinput *nc) __attribute__((nonnull(1
API bool API void ncmultiselector_destroy(struct ncmultiselector *n)
API void ncpalette_free(ncpalette *p)
API int ncplane_erase_region(struct ncplane *n, int ystart, int xstart, int ylen, int xlen) __attribute__((nonnull(1)))
API void notcurses_debug(const struct notcurses *nc, FILE *debugfp) __attribute__((nonnull(1
API int ncplane_rotate_ccw(struct ncplane *n) __attribute__((nonnull(1)))
API int ncvisual_geom(const struct notcurses *nc, const struct ncvisual *n, const struct ncvisual_options *vopts, ncvgeom *geom) __attribute__((nonnull(4)))
API int ncvisual_decode_loop(struct ncvisual *nc) __attribute__((nonnull(1)))
API int ncvisual_resize_noninterpolative(struct ncvisual *n, int rows, int cols) __attribute__((nonnull(1)))
API int nctree_add(struct nctree *n, const unsigned *spec, const struct nctree_item *add) __attribute__((nonnull(1
API uint64_t ncplane_set_bchannel(struct ncplane *n, uint32_t channel) __attribute__((nonnull(1)))
API int ncplane_scrollup(struct ncplane *n, int r) __attribute__((nonnull(1)))
API int ncplane_resize_placewithin(struct ncplane *n)
API ALLOC struct ncvisual * ncvisual_from_rgba(const void *rgba, int rows, int rowstride, int cols) __attribute__((nonnull(1)))
API struct nctab * nctabbed_next(struct nctabbed *nt) __attribute__((nonnull(1)))
API ALLOC struct ncsubproc * ncsubproc_createvp(struct ncplane *n, const ncsubproc_options *opts, const char *bin, const char *const arg[], ncfdplane_callback cbfxn, ncfdplane_done_cb donecbfxn) __attribute__((nonnull(1)))
API struct nctab API void nctabbed_channels(struct nctabbed *nt, uint64_t *RESTRICT hdrchan, uint64_t *RESTRICT selchan, uint64_t *RESTRICT sepchan) __attribute__((nonnull(1)))
API struct ncplane API struct ncplane * ncplane_reparent_family(struct ncplane *n, struct ncplane *newparent) __attribute__((nonnull(1
API void ncplane_translate(const struct ncplane *src, const struct ncplane *dst, int *RESTRICT y, int *RESTRICT x) __attribute__((nonnull(1)))
API ALLOC struct ncdplot * ncdplot_create(struct ncplane *n, const ncplot_options *opts, double miny, double maxy) __attribute__((nonnull(1)))
API unsigned notcurses_palette_size(const struct notcurses *nc) __attribute__((nonnull(1))) __attribute__((pure))
API int ncplane_putegc_yx(struct ncplane *n, int y, int x, const char *gclust, size_t *sbytes) __attribute__((nonnull(1
API uint16_t notcurses_supported_styles(const struct notcurses *nc) __attribute__((nonnull(1))) __attribute__((pure))
API int ncplane_putnstr_aligned(struct ncplane *n, int y, ncalign_e align, size_t s, const char *str) __attribute__((nonnull(1
API int API int API int ncplane_gradient2x1(struct ncplane *n, int y, int x, unsigned ylen, unsigned xlen, uint32_t ul, uint32_t ur, uint32_t ll, uint32_t lr) __attribute__((nonnull(1)))
API int API int ncblit_rgba(const void *data, int linesize, const struct ncvisual_options *vopts) __attribute__((nonnull(1)))
API const char * ncselector_previtem(struct ncselector *n) __attribute__((nonnull(1)))
API int nctree_redraw(struct nctree *n) __attribute__((nonnull(1)))
API void ncuplot_destroy(struct ncuplot *n)
API bool ncmenu_offer_input(struct ncmenu *n, const ncinput *nc) __attribute__((nonnull(1
API int ncblit_rgb_packed(const void *data, int linesize, const struct ncvisual_options *vopts, int alpha) __attribute__((nonnull(1)))
API int ncmultiselector_selected(struct ncmultiselector *n, bool *selected, unsigned count)
API int ncvisual_rotate(struct ncvisual *n, double rads) __attribute__((nonnull(1)))
API void nctabbed_ensure_selected_header_visible(struct nctabbed *nt) __attribute__((nonnull(1)))
API bool ncselector_offer_input(struct ncselector *n, const ncinput *nc) __attribute__((nonnull(1
API void * nctree_prev(struct nctree *n) __attribute__((nonnull(1)))
API const struct ncplane * ncplane_parent_const(const struct ncplane *n) __attribute__((nonnull(1)))
API void ncplane_set_fg_default(struct ncplane *n)
API int ncmenu_rollup(struct ncmenu *n) __attribute__((nonnull(1)))
API void nccell_release(struct ncplane *n, nccell *c)
API void * nctab_userptr(struct nctab *t) __attribute__((nonnull(1)))
API ncpixelimpl_e notcurses_check_pixel_support(const struct notcurses *nc) __attribute__((nonnull(1))) __attribute__((pure))
API int ncvisual_stream(struct notcurses *nc, struct ncvisual *ncv, float timescale, ncstreamcb streamer, const struct ncvisual_options *vopts, void *curry) __attribute__((nonnull(1
API struct ncplane * ncuplot_plane(struct ncuplot *n) __attribute__((nonnull(1)))
API void * nctablet_userptr(struct nctablet *t)
API int(*)(struct ncplane *) ncplane_resizecb(const struct ncplane *n)
API ALLOC struct notcurses * notcurses_core_init(const notcurses_options *opts, FILE *fp)
API int notcurses_default_background(const struct notcurses *nc, uint32_t *bg) __attribute__((nonnull(1)))
API int ncplane_qrcode(struct ncplane *n, unsigned *ymax, unsigned *xmax, const void *data, size_t len) __attribute__((nonnull(1
API int ncreader_clear(struct ncreader *n) __attribute__((nonnull(1)))
API int ncplane_at_yx_cell(struct ncplane *n, int y, int x, nccell *c) __attribute__((nonnull(1
API struct ncplane * ncsubproc_plane(struct ncsubproc *n) __attribute__((nonnull(1)))
API int notcurses_lex_scalemode(const char *op, ncscale_e *scalemode) __attribute__((nonnull(1)))
API int API char * ncplane_at_yx(const struct ncplane *n, int y, int x, uint16_t *stylemask, uint64_t *channels) __attribute__((nonnull(1)))
API int ncplane_putc_yx(struct ncplane *n, int y, int x, const nccell *c) __attribute__((nonnull(1
API struct nctablet * ncreel_prev(struct ncreel *nr) __attribute__((nonnull(1)))
API int ncreel_redraw(struct ncreel *nr) __attribute__((nonnull(1)))
API void ncplane_center_abs(const struct ncplane *n, int *RESTRICT y, int *RESTRICT x) __attribute__((nonnull(1)))
API int ncplane_scrollup_child(struct ncplane *n, const struct ncplane *child) __attribute__((nonnull(1
API void nctabbed_destroy(struct nctabbed *nt)
API bool API struct nctablet * ncreel_focused(struct ncreel *nr) __attribute__((nonnull(1)))
API int ncplane_vline_interp(struct ncplane *n, const nccell *c, unsigned len, uint64_t c1, uint64_t c2) __attribute__((nonnull(1
API int ncfadectx_iterations(const struct ncfadectx *nctx) __attribute__((nonnull(1)))
API int notcurses_mice_enable(struct notcurses *n, unsigned eventmask) __attribute__((nonnull(1)))
API int ncmenu_unroll(struct ncmenu *n, int sectionidx)
API int API void API void API void nctabbed_rotate(struct nctabbed *nt, int amt) __attribute__((nonnull(1)))
API ALLOC struct nctab API int nctabbed_del(struct nctabbed *nt, struct nctab *t) __attribute__((nonnull(1)))
API struct ncplane * ncprogbar_plane(struct ncprogbar *n) __attribute__((nonnull(1)))
API int API int ncpile_render_to_file(struct ncplane *p, FILE *fp) __attribute__((nonnull(1
API int API int notcurses_inputready_fd(struct notcurses *n) __attribute__((nonnull(1)))
API int nctab_name_width(struct nctab *t) __attribute__((nonnull(1)))
API int ncprogbar_set_progress(struct ncprogbar *n, double p) __attribute__((nonnull(1)))
API int ncreader_write_egc(struct ncreader *n, const char *egc) __attribute__((nonnull(1
API struct nctablet * ncreel_next(struct ncreel *nr) __attribute__((nonnull(1)))
API const char * notcurses_str_scalemode(ncscale_e scalemode)
API ALLOC struct ncsubproc * ncsubproc_createvpe(struct ncplane *n, const ncsubproc_options *opts, const char *bin, const char *const arg[], const char *const env[], ncfdplane_callback cbfxn, ncfdplane_done_cb donecbfxn) __attribute__((nonnull(1)))
API int API int nctree_del(struct nctree *n, const unsigned *spec) __attribute__((nonnull(1
API int ncplane_stain(struct ncplane *n, int y, int x, unsigned ylen, unsigned xlen, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) __attribute__((nonnull(1)))
API int nccell_load(struct ncplane *n, nccell *c, const char *gcluster)
API struct ncplane * ncplane_parent(struct ncplane *n) __attribute__((nonnull(1)))
API int notcurses_linesigs_enable(struct notcurses *n) __attribute__((nonnull(1)))
API int ncplane_move_family_below(struct ncplane *n, struct ncplane *targ) __attribute__((nonnull(1)))
API int ncmenu_nextitem(struct ncmenu *n) __attribute__((nonnull(1)))
API int ncvisual_decode(struct ncvisual *nc) __attribute__((nonnull(1)))
API ALLOC struct nctree * nctree_create(struct ncplane *n, const nctree_options *opts) __attribute__((nonnull(1
API struct nctab * nctab_prev(struct nctab *t) __attribute__((nonnull(1)))
API int ncuplot_add_sample(struct ncuplot *n, uint64_t x, uint64_t y) __attribute__((nonnull(1)))
API int ncreel_del(struct ncreel *nr, struct nctablet *t) __attribute__((nonnull(1)))
API int API int API int ncplane_pulse(struct ncplane *n, const struct timespec *ts, fadecb fader, void *curry) __attribute__((nonnull(1)))
API struct ncplane * ncpile_bottom(struct ncplane *n) __attribute__((nonnull(1)))
ALLOC API char * notcurses_detected_terminal(const struct notcurses *nc) __attribute__((nonnull(1)))
API int ncvisual_at_yx(const struct ncvisual *n, unsigned y, unsigned x, uint32_t *pixel) __attribute__((nonnull(1
API void ncreel_destroy(struct ncreel *nr)
API struct ncplane * ncdplot_plane(struct ncdplot *n) __attribute__((nonnull(1)))
API ALLOC struct ncmultiselector * ncmultiselector_create(struct ncplane *n, const ncmultiselector_options *opts) __attribute__((nonnull(1)))
API bool API void * nctree_focused(struct nctree *n) __attribute__((nonnull(1)))
API void ncplane_set_channels(struct ncplane *n, uint64_t channels) __attribute__((nonnull(1)))
API int ncselector_delitem(struct ncselector *n, const char *item)
API void ncplane_set_resizecb(struct ncplane *n, int(*resizecb)(struct ncplane *))
API int ncplane_set_fg_rgb8(struct ncplane *n, unsigned r, unsigned g, unsigned b)
API bool ncplane_set_scrolling(struct ncplane *n, unsigned scrollp) __attribute__((nonnull(1)))
API struct ncplane * ncplane_below(struct ncplane *n) __attribute__((nonnull(1)))
API struct ncplane * ncplane_above(struct ncplane *n) __attribute__((nonnull(1)))
API int ncplane_vprintf_stained(struct ncplane *n, const char *format, va_list ap) __attribute__((nonnull(1
API ALLOC struct nctree API struct ncplane * nctree_plane(struct nctree *n) __attribute__((nonnull(1)))
API ALLOC struct ncuplot * ncuplot_create(struct ncplane *n, const ncplot_options *opts, uint64_t miny, uint64_t maxy) __attribute__((nonnull(1)))
API ALLOC struct ncvisual API ALLOC struct ncvisual * ncvisual_from_plane(const struct ncplane *n, ncblitter_e blit, int begy, int begx, unsigned leny, unsigned lenx) __attribute__((nonnull(1)))
API int ncpalette_use(struct notcurses *nc, const ncpalette *p) __attribute__((nonnull(1
API int ncdplot_sample(const struct ncdplot *n, uint64_t x, double *y) __attribute__((nonnull(1)))
API const char * notcurses_str_blitter(ncblitter_e blitter)
API bool API void ncselector_destroy(struct ncselector *n, char **item)
API ALLOC ncstats * notcurses_stats_alloc(const struct notcurses *nc __attribute__((unused))) __attribute__((nonnull(1)))
API int ncdplot_add_sample(struct ncdplot *n, uint64_t x, double y) __attribute__((nonnull(1)))
API void ncplane_set_bg_rgb8_clipped(struct ncplane *n, int r, int g, int b)
API struct ncplane * nctablet_plane(struct nctablet *t)
API void ncplane_home(struct ncplane *n) __attribute__((nonnull(1)))
API tabcb nctab_set_cb(struct nctab *t, tabcb newcb) __attribute__((nonnull(1)))
API int ncplane_set_base_cell(struct ncplane *n, const nccell *c)
API ALLOC struct ncreel * ncreel_create(struct ncplane *n, const ncreel_options *popts) __attribute__((nonnull(1)))
API void ncfadectx_free(struct ncfadectx *nctx)
API ALLOC struct ncplane API ncblitter_e ncvisual_media_defblitter(const struct notcurses *nc, ncscale_e scale) __attribute__((nonnull(1)))
API ALLOC struct ncplane API ALLOC struct ncplane API int ncplane_resize_maximize(struct ncplane *n)
API void ncplane_pixel_geom(const struct ncplane *n, unsigned *RESTRICT pxy, unsigned *RESTRICT pxx, unsigned *RESTRICT celldimy, unsigned *RESTRICT celldimx, unsigned *RESTRICT maxbmapy, unsigned *RESTRICT maxbmapx) __attribute__((nonnull(1)))
API void ncplane_cursor_yx(const struct ncplane *n, unsigned *RESTRICT y, unsigned *RESTRICT x) __attribute__((nonnull(1)))
API bool ncplane_set_autogrow(struct ncplane *n, unsigned growp) __attribute__((nonnull(1)))
API ALLOC struct ncvisual * ncvisual_from_bgra(const void *bgra, int rows, int rowstride, int cols) __attribute__((nonnull(1)))
int(* ncfdplane_done_cb)(struct ncfdplane *n, int fderrno, void *curry)
API ALLOC char * notcurses_osversion(void)
API int ncplane_cursor_move_rel(struct ncplane *n, int y, int x) __attribute__((nonnull(1)))
API int ncplane_vprintf_aligned(struct ncplane *n, int y, ncalign_e align, const char *format, va_list ap) __attribute__((nonnull(1
API ALLOC struct ncvisual * ncvisual_from_file(const char *file) __attribute__((nonnull(1)))
API struct ncplane API struct ncplane API ALLOC struct ncplane * ncplane_dup(const struct ncplane *n, void *opaque) __attribute__((nonnull(1)))
API ALLOC ncpalette * ncpalette_new(struct notcurses *nc) __attribute__((nonnull(1)))
#define NCCELL_TRIVIAL_INITIALIZER
API int API int ncplane_rotate_cw(struct ncplane *n) __attribute__((nonnull(1)))
API int ncblit_rgb_loose(const void *data, int linesize, const struct ncvisual_options *vopts, int alpha) __attribute__((nonnull(1)))
API ALLOC struct ncvisual * ncvisual_from_palidx(const void *data, int rows, int rowstride, int cols, int palsize, int pstride, const uint32_t *palette) __attribute__((nonnull(1
#define NCCELL_INITIALIZER(c, s, chan)
API ALLOC char * ncplane_name(const struct ncplane *n) __attribute__((nonnull(1)))
API void * ncplane_userptr(struct ncplane *n) __attribute__((nonnull(1)))
API void ncdplot_destroy(struct ncdplot *n)
API int notcurses_lex_blitter(const char *op, ncblitter_e *blitter) __attribute__((nonnull(1)))
API int ncplane_abs_y(const struct ncplane *n) __attribute__((pure))
API ALLOC struct ncvisual * ncvisual_from_rgb_packed(const void *rgba, int rows, int rowstride, int cols, int alpha) __attribute__((nonnull(1)))
API int nccell_duplicate(struct ncplane *n, nccell *targ, const nccell *c)
struct ncvisual_options v
API void ncplane_greyscale(struct ncplane *n) __attribute__((nonnull(1)))
API int ncuplot_sample(const struct ncuplot *n, uint64_t x, uint64_t *y) __attribute__((nonnull(1)))
API int ncfdplane_destroy(struct ncfdplane *n)
API int ncplane_set_fg_rgb(struct ncplane *n, uint32_t channel)
API const struct ncplane * notcurses_stdplane_const(const struct notcurses *nc) __attribute__((nonnull(1)))
API const char * ncnmetric(uintmax_t val, size_t s, uintmax_t decimal, char *buf, int omitdec, uintmax_t mult, int uprefix) __attribute__((nonnull(4)))
API bool notcurses_canopen_images(const struct notcurses *nc) __attribute__((pure))
API void ncplane_set_fg_rgb8_clipped(struct ncplane *n, int r, int g, int b)
API int ncplane_resize_marginalized(struct ncplane *n)
API int ncmenu_item_set_status(struct ncmenu *n, const char *section, const char *item, bool enabled)
API int nctab_move(struct nctabbed *nt, struct nctab *t, struct nctab *after, struct nctab *before) __attribute__((nonnull(1
API int API int ncplane_hline_interp(struct ncplane *n, const nccell *c, unsigned len, uint64_t c1, uint64_t c2) __attribute__((nonnull(1
API int API char * ncplane_contents(struct ncplane *n, int begy, int begx, unsigned leny, unsigned lenx) __attribute__((nonnull(1)))
API int ncplane_putwstr_stained(struct ncplane *n, const wchar_t *gclustarr) __attribute__((nonnull(1
API int API void * nctab_set_userptr(struct nctab *t, void *newopaque) __attribute__((nonnull(1)))
API int nctabbed_separator_width(struct nctabbed *nt) __attribute__((nonnull(1)))
API const char * ncselector_nextitem(struct ncselector *n) __attribute__((nonnull(1)))
API int API char * ncreader_contents(const struct ncreader *n) __attribute__((nonnull(1)))
int(* ncfdplane_callback)(struct ncfdplane *n, const void *buf, size_t s, void *curry)
API int ncsubproc_destroy(struct ncsubproc *n)
API int ncplane_set_name(struct ncplane *n, const char *name) __attribute__((nonnull(1)))
API ALLOC struct ncplane * ncvisual_subtitle_plane(struct ncplane *parent, const struct ncvisual *ncv) __attribute__((nonnull(1
API void ncplane_on_styles(struct ncplane *n, unsigned stylebits) __attribute__((nonnull(1)))
API void * nctree_goto(struct nctree *n, const unsigned *spec, int *failspec)
API int ncreel_tabletcount(const struct ncreel *nr) __attribute__((nonnull(1)))
API int notcurses_lex_margins(const char *op, notcurses_options *opts) __attribute__((nonnull(1)))
int(* ncstreamcb)(struct ncvisual *, struct ncvisual_options *, const struct timespec *, void *)
API int ncplane_move_below(struct ncplane *RESTRICT n, struct ncplane *RESTRICT below) __attribute__((nonnull(1)))
API int ncplane_move_family_above(struct ncplane *n, struct ncplane *targ) __attribute__((nonnull(1)))
API int ncdplot_set_sample(struct ncdplot *n, uint64_t x, double y) __attribute__((nonnull(1)))
API int ncplane_vprintf_yx(struct ncplane *n, int y, int x, const char *format, va_list ap) __attribute__((nonnull(1
API int ncpile_render_to_buffer(struct ncplane *p, char **buf, size_t *buflen) __attribute__((nonnull(1
API const struct notcurses * ncplane_notcurses_const(const struct ncplane *n) __attribute__((nonnull(1)))
API const char * ncmenu_mouse_selected(const struct ncmenu *n, const ncinput *click, ncinput *ni)
#define NCALPHA_HIGHCONTRAST
API int API int API void ncplane_erase(struct ncplane *n) __attribute__((nonnull(1)))
API struct ncplane * ncreader_plane(struct ncreader *n) __attribute__((nonnull(1)))
API void notcurses_version_components(int *major, int *minor, int *patch, int *tweak)
API const char * notcurses_version(void)
API int ncplane_fadeout(struct ncplane *n, const struct timespec *ts, fadecb fader, void *curry) __attribute__((nonnull(1)))
API int ncplane_box(struct ncplane *n, const nccell *ul, const nccell *ur, const nccell *ll, const nccell *lr, const nccell *hline, const nccell *vline, unsigned ystop, unsigned xstop, unsigned ctlword)
API int API int const nccell unsigned len
API int ncplane_format(struct ncplane *n, int y, int x, unsigned ylen, unsigned xlen, uint16_t stylemask) __attribute__((nonnull(1)))
API ALLOC struct ncfdplane * ncfdplane_create(struct ncplane *n, const ncfdplane_options *opts, int fd, ncfdplane_callback cbfxn, ncfdplane_done_cb donecbfxn) __attribute__((nonnull(1)))
API ALLOC uint32_t * ncplane_as_rgba(const struct ncplane *n, ncblitter_e blit, int begy, int begx, unsigned leny, unsigned lenx, unsigned *pxdimy, unsigned *pxdimx) __attribute__((nonnull(1)))
API ALLOC struct ncreader * ncreader_create(struct ncplane *n, const ncreader_options *opts) __attribute__((nonnull(1)))
API void nctabbed_set_selchan(struct nctabbed *nt, uint64_t chan) __attribute__((nonnull(1)))
API int ncplane_move_yx(struct ncplane *n, int y, int x)
API double ncprogbar_progress(const struct ncprogbar *n) __attribute__((nonnull(1)))
API int ncplane_destroy(struct ncplane *n)
API void * nctree_next(struct nctree *n) __attribute__((nonnull(1)))
API ALLOC struct nctab * nctabbed_add(struct nctabbed *nt, struct nctab *after, struct nctab *before, tabcb tcb, const char *name, void *opaque) __attribute__((nonnull(1
API bool ncreader_offer_input(struct ncreader *n, const ncinput *ni) __attribute__((nonnull(1
API int API int ncplane_gradient(struct ncplane *n, int y, int x, unsigned ylen, unsigned xlen, const char *egc, uint16_t styles, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) __attribute__((nonnull(1
API int ncplane_set_fg_palindex(struct ncplane *n, unsigned idx)
API void * ncplane_set_userptr(struct ncplane *n, void *opaque) __attribute__((nonnull(1)))
API bool ncplane_autogrow_p(const struct ncplane *n) __attribute__((nonnull(1)))
API void ncplane_off_styles(struct ncplane *n, unsigned stylebits) __attribute__((nonnull(1)))
API ALLOC struct ncsubproc * ncsubproc_createv(struct ncplane *n, const ncsubproc_options *opts, const char *bin, const char *const arg[], ncfdplane_callback cbfxn, ncfdplane_done_cb donecbfxn) __attribute__((nonnull(1)))
API struct nctab * nctabbed_leftmost(struct nctabbed *nt) __attribute__((nonnull(1)))
API int nctabbed_set_separator(struct nctabbed *nt, const char *separator) __attribute__((nonnull(1
API int ncplane_set_bg_alpha(struct ncplane *n, int alpha)
API int notcurses_linesigs_disable(struct notcurses *n) __attribute__((nonnull(1)))
API tabcb nctab_cb(struct nctab *t) __attribute__((nonnull(1)))
API int ncmenu_prevsection(struct ncmenu *n) __attribute__((nonnull(1)))
API const nccapabilities * notcurses_capabilities(const struct notcurses *n) __attribute__((nonnull(1)))
API int ncblit_bgrx(const void *data, int linesize, const struct ncvisual_options *vopts) __attribute__((nonnull(1)))
API bool API void ncmenu_destroy(struct ncmenu *n)
API int ncplane_resize_realign(struct ncplane *n)
API int ncuplot_set_sample(struct ncuplot *n, uint64_t x, uint64_t y) __attribute__((nonnull(1)))
API int ncselector_additem(struct ncselector *n, const struct ncselector_item *item)
API int ncplane_fadein(struct ncplane *n, const struct timespec *ts, fadecb fader, void *curry) __attribute__((nonnull(1)))
API int ncplane_abs_x(const struct ncplane *n) __attribute__((pure))
API int API int ncplane_fadein_iteration(struct ncplane *n, struct ncfadectx *nctx, int iter, fadecb fader, void *curry) __attribute__((nonnull(1
API bool nctree_offer_input(struct nctree *n, const ncinput *ni) __attribute__((nonnull(1
API ALLOC struct ncmenu * ncmenu_create(struct ncplane *n, const ncmenu_options *opts) __attribute__((nonnull(1)))
API int ncplane_y(const struct ncplane *n) __attribute__((pure))
uint8_t gcluster_backstop
const struct ncmselector_item * items
uint32_t chans[NCPALETTESIZE]
int(* resizecb)(struct ncplane *)
int(* resizecb)(struct ncplane *)
const struct ncselector_item * items
uint64_t failed_writeouts
uint64_t cell_geo_changes
uint64_t defaultemissions
uint64_t sprixelemissions
uint64_t pixel_geo_changes
struct nctree_item * subs
int(* nctreecb)(struct ncplane *, void *, int)
const struct nctree_item * items