30 is_stdplane = other.is_stdplane;
32 map_plane (plane,
this);
34 other.plane =
nullptr;
35 other.is_stdplane =
false;
41 plane = duplicate_plane (other,
nullptr);
47 plane = duplicate_plane (other, opaque);
50 explicit Plane (
Plane *
n,
int rows,
int cols,
int yoff,
int xoff,
void *opaque =
nullptr)
51 :
Plane (static_cast<const
Plane*>(
n), rows, cols, yoff, xoff, opaque)
54 explicit Plane (
const Plane *
n,
int rows,
int cols,
int yoff,
int xoff,
void *opaque =
nullptr)
60 plane = create_plane (*
n, rows, cols, yoff, xoff, opaque);
64 :
Plane (static_cast<const
Plane*>(
n), nopts, ncinst)
74 plane = create_plane (*
n, nopts);
77 explicit Plane (
const Plane &
n,
int rows,
int cols,
int yoff,
int xoff,
void *opaque =
nullptr)
80 plane = create_plane (
n, rows, cols, yoff, xoff, opaque);
83 explicit Plane (
unsigned rows,
unsigned cols,
int yoff,
int xoff,
void *opaque =
nullptr,
NotCurses *ncinst =
nullptr)
103 if (plane ==
nullptr)
104 throw init_error (
"Notcurses failed to create a new plane");
106 map_plane (plane,
this);
112 plane = create_plane (
n, rows, cols, yoff, align, opaque);
118 plane = create_plane (
const_cast<Plane&
>(
n), rows, cols, yoff, align, opaque);
122 :
Plane (static_cast<
Plane const&>(
n), nopts, ncinst)
128 plane = create_plane (
n, nopts);
137 plane = create_plane (*
n, rows, cols, yoff, align, opaque);
146 plane = create_plane (
const_cast<Plane&
>(*
n), rows, cols, yoff, align, opaque);
156 if (is_stdplane || plane ==
nullptr)
159 if (!is_notcurses_stopped ())
208 return error_guard (ret, -1);
213 return error_guard (
ncplane_pulse (plane, ts, fader, curry), -1);
218 return error_guard<int> (
ncplane_gradient (plane,
y,
x,
ylen,
xlen,
egc, stylemask,
ul,
ur,
ll,
lr), -1);
233 return error_guard (ncplane_resize_simple (plane,
ylen,
xlen), -1);
238 return fadeout (
static_cast<const timespec*
>(ts), fader, curry);
243 return fadeout (&ts, fader, curry);
248 return fadeout (&ts, fader, curry);
258 return fadein (
static_cast<const timespec*
>(ts), fader);
263 return fadein (&ts, fader);
268 return fadein (&ts, fader);
273 return error_guard (
ncplane_fadein (plane, ts, fader, curry), -1);
303 return error_guard<int> (ncplane_halign (plane,
static_cast<ncalign_e>(align),
c), INT_MAX);
308 return error_guard<int> (ncplane_halign (plane,
static_cast<ncalign_e>(align),
c), INT_MAX);
313 return error_guard<int> (ncplane_valign (plane,
static_cast<ncalign_e>(align),
r), INT_MAX);
316 void get_dim (
unsigned *rows,
unsigned *cols)
const noexcept
321 void get_dim (
unsigned &rows,
unsigned &cols)
const noexcept
323 get_dim (&rows, &cols);
328 return ncplane_dim_x (plane);
333 return ncplane_dim_y (plane);
354 if (ret ==
nullptr) {
358 return map_plane (ret);
367 return map_plane (ret);
372 return reparent (
const_cast<Plane*
>(newparent));
377 return reparent (
const_cast<Plane*
>(&newparent));
386 return map_plane (ret);
391 return reparent_family (
const_cast<Plane*
>(newparent));
396 return reparent_family (
const_cast<Plane*
>(&newparent));
411 ncplane_move_top (plane);
416 ncplane_move_bottom (plane);
426 if (below ==
nullptr)
429 return move_below (*below);
439 if (above ==
nullptr)
442 return move_above (*above);
445 bool mergedown (
Plane &dst,
unsigned begsrcy,
unsigned begsrcx,
unsigned leny,
unsigned lenx,
unsigned dsty,
unsigned dstx)
const
447 return mergedown (&dst, begsrcy, begsrcx, leny, lenx, dsty, dstx);
450 bool mergedown (
Plane *dst,
int begsrcy,
int begsrcx,
unsigned leny,
unsigned lenx,
int dsty,
int dstx)
const
452 if (plane == dst->plane)
453 throw invalid_argument (
"'dst' must refer to a different plane than the one this method is called on");
455 return error_guard (
ncplane_mergedown (plane, dst->plane, begsrcy, begsrcx, leny, lenx, dsty, dstx), -1);
460 return mergedown_simple (&dst);
465 if (plane == dst->plane)
466 throw invalid_argument (
"'dst' must refer to a different plane than the one this method is called on");
483 get_cursor_yx (&
y, &
x);
488 return ncplane_cursor_y(plane);
493 return ncplane_cursor_x(plane);
498 return error_guard<int> (ncplane_putc (plane,
c), -1);
519 return putc (
y,
x, *
c);
525 if (retain_styling) {
528 ret = ncplane_putchar (plane,
c);
531 return error_guard<int> (ret, -1);
536 return error_guard<int> (ncplane_putchar_yx (plane,
y,
x,
c), -1);
539 int putc (
const char *gclust,
size_t *sbytes =
nullptr,
bool retain_styling =
false) const
NOEXCEPT_MAYBE
542 if (retain_styling) {
545 ret = ncplane_putegc (plane, gclust, sbytes);
548 return error_guard<int> (ret, -1);
556 int putc (
const wchar_t *gclust,
size_t *sbytes =
nullptr,
bool retain_styling =
false) const
NOEXCEPT_MAYBE
559 if (retain_styling) {
562 ret = ncplane_putwegc (plane, gclust, sbytes);
565 return error_guard<int> (ret, -1);
570 return error_guard<int> (ncplane_putwegc_yx (plane,
y,
x, gclust, sbytes), -1);
577 return error_guard<int> (ncplane_putwc_yx (plane,
y,
x, w), -1);
583 return error_guard<int> (ncplane_putwc (plane, w), -1);
588 return error_guard<int> (ncplane_putwc_stained (plane, w), -1);
593 int ret = ncplane_putstr (plane, gclustarr);
594 return error_guard_cond<int> (ret, ret < 0);
599 int ret = ncplane_putstr_yx (plane,
y,
x, gclustarr);
600 return error_guard_cond<int> (ret, ret < 0);
605 return error_guard<int> (ncplane_putstr_aligned (plane,
y,
static_cast<ncalign_e>(atype), s), -1);
610 return error_guard<int> (ncplane_putwstr (plane, gclustarr), -1);
615 return error_guard<int> (ncplane_putwstr_yx (plane,
y,
x, gclustarr), -1);
620 return error_guard<int> (ncplane_putwstr_aligned (plane,
y,
static_cast<ncalign_e>(atype), gcluststyles), -1);
630 int ret = ncplane_putstr_stained (plane, s);
631 return error_guard_cond<int> (ret, ret < 0);
643 return error_guard<int> (ret, -1);
652 int ret = ncplane_vprintf (plane, format, va);
655 return error_guard<int> (ret, -1);
667 return error_guard<int> (ret, -1);
676 int ret = vprintf (
y, align, format, va);
679 return error_guard<int> (ret, -1);
689 return error_guard<int> (ncplane_vprintf (plane, format, ap), -1);
704 return error_guard<int> (ncplane_hline (plane,
c,
len), -1);
714 return error_guard<int> (ncplane_vline (plane,
c,
len), -1);
724 return error_guard (nccells_load_box (plane, styles, channels,
ul,
ur,
ll,
lr, hl, vl, gclusters), -1);
729 return load_box (
static_cast<uint16_t
>(style), channels,
ul,
ur,
ll,
lr, hl, vl, gclusters);
734 return error_guard (nccells_rounded_box (plane, styles, channels,
ul,
ur,
ll,
lr, hl, vl), -1);
739 return load_rounded_box (
static_cast<uint16_t
>(style), channels,
ul,
ur,
ll,
lr, hl, vl);
744 return error_guard (nccells_double_box (plane, styles, channels,
ul,
ur,
ll,
lr, hl, vl), -1);
749 return load_double_box (
static_cast<uint16_t
>(style), channels,
ul,
ur,
ll,
lr, hl, vl);
753 const Cell &hline,
const Cell &vline,
int ystop,
int xstop,
756 return error_guard (
ncplane_box (plane,
ul,
ur,
ll,
lr, hline, vline, ystop, xstop,
ctlword), -1);
763 return error_guard (ncplane_box_sized (plane,
ul,
ur,
ll,
lr, hline, vline,
ylen,
xlen,
ctlword), -1);
768 return error_guard (ncplane_rounded_box (plane, styles, channels, ystop, xstop,
ctlword), -1);
773 return error_guard (ncplane_rounded_box_sized (plane, styles, channels,
ylen,
xlen,
ctlword), -1);
778 return error_guard (ncplane_double_box (plane, styles, channels, ystop, xstop,
ctlword), -1);
783 return error_guard (ncplane_double_box_sized (plane, styles, channels,
ylen,
xlen,
ctlword), -1);
788 return error_guard (ncplane_perimeter (plane,
ul,
ur,
ll,
lr, hline, vline,
ctlword), -1);
793 return error_guard (ncplane_perimeter_rounded (plane, stylemask, channels,
ctlword), -1);
798 return error_guard (ncplane_perimeter_double (plane, stylemask, channels,
ctlword), -1);
806 uint32_t*
rgba(
ncblitter_e blit,
unsigned begy,
unsigned begx,
unsigned leny,
unsigned lenx)
const noexcept
808 return ncplane_as_rgba (plane, blit, begy, begx, leny, lenx,
nullptr,
nullptr);
811 char*
content(
unsigned begy,
unsigned begx,
unsigned leny,
unsigned lenx)
const noexcept
823 return ncplane_bchannel (plane);
828 return ncplane_fchannel (plane);
833 return ncplane_fg_rgb (plane);
838 return ncplane_bg_rgb (plane);
843 return ncplane_fg_alpha (plane);
858 return ncplane_bg_alpha (plane);
866 unsigned get_fg_rgb8 (
unsigned *
r,
unsigned *g,
unsigned *b)
const noexcept
868 return ncplane_fg_rgb8 (plane,
r, g, b);
896 unsigned get_bg_rgb8 (
unsigned *
r,
unsigned *g,
unsigned *b)
const noexcept
898 return ncplane_bg_rgb8 (plane,
r, g, b);
974 return error_guard_cond<bool, bool> (ret, ret);
980 return error_guard_cond<bool, bool> (ret, ret);
986 return error_guard_cond<bool, bool> (ret, ret);
999 return at_cursor (*
c);
1002 char*
at_cursor (uint16_t* stylemask, uint64_t* channels)
const
1004 if (stylemask ==
nullptr || channels ==
nullptr)
1020 return get_at (
y,
x, *
c);
1023 char*
get_at (
int y,
int x, uint16_t* stylemask, uint64_t* channels)
const
1025 if (stylemask ==
nullptr || channels ==
nullptr)
1036 template<
typename T>
1039 return static_cast<T*
>(set_userptr (
static_cast<void*
>(opaque)));
1047 template<
typename T>
1050 return static_cast<T*
>(get_userptr ());
1060 int ret = nccell_load_egc32 (plane, cell,
egc);
1061 return error_guard_cond<int> (ret, ret != 1);
1066 return error_guard<int> (
nccell_load (plane, cell, gcluster), -1);
1071 return error_guard (nccell_load_char (plane, cell, ch), -1);
1076 return error_guard<int> (nccell_prime (plane, cell, gcluster, styles, channels), -1);
1096 if (source ==
nullptr)
1099 return duplicate (target, *source);
1104 if (source ==
nullptr)
1107 return duplicate (target, *source);
1112 if (target ==
nullptr)
1114 if (source ==
nullptr)
1117 return duplicate (*target, *source);
1122 if (target ==
nullptr)
1124 if (source ==
nullptr)
1127 return duplicate (*target, *source);
1132 if (target ==
nullptr)
1135 return duplicate (*target, source);
1140 if (target ==
nullptr)
1143 return duplicate (*target, source);
1153 translate (*
this, dst,
y,
x);
1186 return nccell_strdup (plane, cell);
1189 char*
extract (
Cell const& cell, uint16_t *stylemask =
nullptr, uint64_t *channels =
nullptr)
1191 return nccell_extract (plane, cell, stylemask, channels);
1209 return error_guard_cond<bool, bool> (ret, ret);
1215 return error_guard_cond<bool, bool> (ret, ret);
1221 return error_guard_cond<int> (ret, ret < 0);
1226 return ncplane_descendant_p (plane, ancestor) != 0;
1231 return ncplane_fg_default_p (plane);
1236 return ncplane_bg_default_p (plane);
1241 return plane !=
nullptr;
1253 is_stdplane (_is_stdplane)
1255 if (_plane ==
nullptr)
1270 if (_plane ==
nullptr) {
1274 if (plane !=
nullptr) {
1279 map_plane (plane,
this);
1284 if (plane ==
nullptr)
1294 ncplane* create_plane (
const Plane &
n,
unsigned rows,
unsigned cols,
int yoff,
int xoff,
void *opaque)
1303 .resizecb =
nullptr,
1308 return create_plane (
n, nopts);
1311 ncplane* create_plane (
Plane &
n,
unsigned rows,
unsigned cols,
int yoff,
NCAlign align,
void *opaque)
1325 return create_plane (
n, nopts);
1335 if (ret ==
nullptr) {
1336 throw init_error (
"Notcurses failed to create an aligned plane");
1339 map_plane (plane,
this);
1343 ncplane* duplicate_plane (
const Plane &other,
void *opaque)
1347 throw init_error (
"Notcurses failed to duplicate plane");
1354 bool is_stdplane =
false;
1355 static std::map<ncplane*,Plane*> *plane_map;
1356 static std::mutex plane_map_mutex;
1360 friend class Tablet;
1362 template<
typename TPlot,
typename TCoord>
friend class PlotBase;
int ncblit_rgba(const void *data, int linesize, const struct ncvisual_options *vopts)
int ncblit_bgrx(const void *data, int linesize, const struct ncvisual_options *vopts)
int get_abs_y() const noexcept
int putstr(int y, NCAlign atype, const char *s) const NOEXCEPT_MAYBE
Plane(NotCurses *ncinst=nullptr)
static Plane * map_plane(ncplane *ncp, Plane *associated_plane=nullptr) noexcept
bool perimeter_rounded(uint16_t stylemask, uint64_t channels, unsigned ctlword) const NOEXCEPT_MAYBE
bool resize_maximize() const NOEXCEPT_MAYBE
unsigned get_bchannel() const noexcept
int at_cursor(Cell &c) const NOEXCEPT_MAYBE
int putc(const wchar_t *gclust, size_t *sbytes=nullptr, bool retain_styling=false) const NOEXCEPT_MAYBE
bool double_box(uint16_t styles, uint64_t channels, int ystop, int xstop, unsigned ctlword) const NOEXCEPT_MAYBE
bool fadein(timespec const &ts, fadecb fader=nullptr) const NOEXCEPT_MAYBE
int gradient2x1(int y, int x, unsigned ylen, unsigned xlen, uint32_t ul, uint32_t ur, uint32_t ll, uint32_t lr) const NOEXCEPT_MAYBE
const char * get_extended_gcluster(Cell const &cell) const noexcept
Plane(ncplane *_plane, bool _is_stdplane)
bool resize(int ylen, int xlen) const NOEXCEPT_MAYBE
unsigned cursor_x() const noexcept
int load_egc32(Cell &cell, uint32_t egc) const NOEXCEPT_MAYBE
int putwch(int y, int x, wchar_t w) const NOEXCEPT_MAYBE
unsigned get_styles() const noexcept
bool resize_realign() const NOEXCEPT_MAYBE
void * set_userptr(void *opaque) const noexcept
bool load_box(CellStyle style, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl, const char *gclusters) const NOEXCEPT_MAYBE
void styles_on(CellStyle styles) const noexcept
Plane(unsigned rows, unsigned cols, int yoff, int xoff, void *opaque=nullptr, NotCurses *ncinst=nullptr)
int duplicate(Cell *target, Cell const *source) const
int putstr(const wchar_t *gclustarr) const NOEXCEPT_MAYBE
const char * get_extended_gcluster(Cell &cell) const noexcept
bool fadeout(timespec &ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
bool fadeout(timespec const &ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
bool perimeter_double(uint16_t stylemask, uint64_t channels, unsigned ctlword) const NOEXCEPT_MAYBE
bool perimeter(const Cell &ul, const Cell &ur, const Cell &ll, const Cell &lr, const Cell &hline, const Cell &vline, unsigned ctlword) const NOEXCEPT_MAYBE
int vprintf(const char *format, va_list ap) const NOEXCEPT_MAYBE
Plane(Plane &n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
bool load_double_box(CellStyle style, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
int putstr(int y, NCAlign atype, const wchar_t *gcluststyles) const NOEXCEPT_MAYBE
Plane * reparent_family(const Plane *newparent) const noexcept
int hline(const Cell &c, unsigned len, uint64_t c1, uint64_t c2) const NOEXCEPT_MAYBE
unsigned get_dim_x() const noexcept
bool move_above(Plane *above) const
bool load_box(uint16_t styles, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl, const char *gclusters) const NOEXCEPT_MAYBE
uint32_t * rgba(ncblitter_e blit, unsigned begy, unsigned begx, unsigned leny, unsigned lenx) const noexcept
int duplicate(Cell &target, Cell const *source) const
bool fadein(const timespec *ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
Plane(Plane const *n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
bool fadein(timespec *ts, fadecb fader=nullptr) const NOEXCEPT_MAYBE
int vprintf_stained(const char *format, va_list ap) const NOEXCEPT_MAYBE
Plane * get_above() const noexcept
int putc(const char *gclust, size_t *sbytes=nullptr, bool retain_styling=false) const NOEXCEPT_MAYBE
unsigned get_fg_rgb() const noexcept
int vline(const Cell &c, unsigned len) const NOEXCEPT_MAYBE
bool rotate_cw() const NOEXCEPT_MAYBE
void set_channels(uint64_t channels) const noexcept
int duplicate(Cell &target, Cell const &source) const NOEXCEPT_MAYBE
bool set_base_cell(Cell &c) const NOEXCEPT_MAYBE
void get_yx(int &y, int &x) const noexcept
Plane * reparent(const Plane *newparent) const noexcept
unsigned get_bg_alpha() const noexcept
bool rounded_box_sized(uint16_t styles, uint64_t channels, int ylen, int xlen, unsigned ctlword) const NOEXCEPT_MAYBE
int printf(const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
bool set_fg_rgb8(int r, int g, int b, bool clipped=false) const NOEXCEPT_MAYBE
int putstr(int y, int x, const wchar_t *gclustarr) const NOEXCEPT_MAYBE
T * get_userptr() const noexcept
bool is_fg_default() const noexcept
void get_abs_yx(int *y, int *x) const noexcept
int prime(Cell &cell, const char *gcluster, uint16_t styles, uint64_t channels) const NOEXCEPT_MAYBE
Plane * get_below() const noexcept
int vprintf(int y, NCAlign align, const char *format, va_list ap) const NOEXCEPT_MAYBE
bool mergedown(Plane *dst, int begsrcy, int begsrcx, unsigned leny, unsigned lenx, int dsty, int dstx) const
bool set_fg_alpha(unsigned alpha) const NOEXCEPT_MAYBE
bool get_base(Cell &c) const NOEXCEPT_MAYBE
unsigned get_fchannel() const noexcept
unsigned get_dim_y() const noexcept
bool load(Cell &cell, char ch) const NOEXCEPT_MAYBE
int duplicate(Cell *target, Cell &source) const
void set_fg_default() const noexcept
bool box(const Cell &ul, const Cell &ur, const Cell &ll, const Cell &lr, const Cell &hline, const Cell &vline, int ystop, int xstop, unsigned ctlword) const NOEXCEPT_MAYBE
int putc(int y, int x, const wchar_t *gclust, size_t *sbytes=nullptr) const NOEXCEPT_MAYBE
bool fadeout(timespec *ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
unsigned get_fg_alpha() const noexcept
int printf_stained(const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
int duplicate(Cell *target, Cell *source) const
void center_abs(int *y, int *x) const noexcept
Plane * reparent(Plane *newparent=nullptr) const noexcept
int hline(const Cell &c, unsigned len) const NOEXCEPT_MAYBE
void get_dim(unsigned *rows, unsigned *cols) const noexcept
int get_valign(NCAlign align, int r) const NOEXCEPT_MAYBE
int stain(int y, int x, unsigned ylen, unsigned xlen, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) const NOEXCEPT_MAYBE
Plane(Plane &n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
int duplicate(Cell *target, Cell const &source) const
bool rounded_box(uint16_t styles, uint64_t channels, int ystop, int xstop, unsigned ctlword) const NOEXCEPT_MAYBE
bool set_fg_palindex(int idx) const NOEXCEPT_MAYBE
int get_at(int y, int x, Cell &c) const NOEXCEPT_MAYBE
bool is_bg_default() const noexcept
char * content(unsigned begy, unsigned begx, unsigned leny, unsigned lenx) const noexcept
int putc(char c, bool retain_styling=false) const NOEXCEPT_MAYBE
bool mergedown_simple(Plane &dst) const
void styles_off(CellStyle styles) const noexcept
int putstr(const char *gclustarr) const NOEXCEPT_MAYBE
int putwch(wchar_t w) const NOEXCEPT_MAYBE
int putc(int y, int x, char c) const NOEXCEPT_MAYBE
void set_resizecb(int(*resizecb)(struct ncplane *)) const noexcept
int get_x() const noexcept
Plane * reparent(const Plane &newparent) const noexcept
bool load_rounded_box(CellStyle style, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
void set_bg_default() const noexcept
int duplicate(Cell &target, Cell *source) const
int vline(const Cell &c, unsigned len, uint64_t c1, uint64_t c2) const NOEXCEPT_MAYBE
void release_native_plane() noexcept
static void unmap_plane(Plane *p) noexcept
bool double_box_sized(uint16_t styles, uint64_t channels, int ylen, int xlen, unsigned ctlword) const NOEXCEPT_MAYBE
unsigned cursor_y() const noexcept
int get_at(int y, int x, Cell *c) const
bool is_valid() const noexcept
bool translate_abs(int *y=nullptr, int *x=nullptr) const NOEXCEPT_MAYBE
bool move_below(Plane *below) const
bool set_fg_rgb(uint32_t channel) const NOEXCEPT_MAYBE
Plane(const Plane *n, int rows, int cols, int yoff, int xoff, void *opaque=nullptr)
int duplicate(Cell &target, Cell &source) const NOEXCEPT_MAYBE
void get_dim(unsigned &rows, unsigned &cols) const noexcept
bool fadein(timespec &ts, fadecb fader=nullptr) const NOEXCEPT_MAYBE
Plane * get_parent() const noexcept
void translate(const Plane &dst, int *y=nullptr, int *x=nullptr) const noexcept
char * extract(Cell const &cell, uint16_t *stylemask=nullptr, uint64_t *channels=nullptr)
bool set_bg_rgb8(int r, int g, int b, bool clipped=false) const NOEXCEPT_MAYBE
bool set_bg_palindex(int idx) const NOEXCEPT_MAYBE
int polyfill(int y, int x, const Cell &c) const NOEXCEPT_MAYBE
Plane(Plane *n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
unsigned get_bg_rgb() const noexcept
void release(Cell &cell) const noexcept
bool move_above(Plane &above) const NOEXCEPT_MAYBE
bool set_base(const char *egc, uint16_t stylemask, uint64_t channels) const NOEXCEPT_MAYBE
int get_y() const noexcept
bool set_bg_rgb(uint32_t channel) const NOEXCEPT_MAYBE
bool blit_rgba(const void *data, int linesize, const struct ncvisual_options *vopts) const NOEXCEPT_MAYBE
int putstr(int y, int x, const char *gclustarr) const NOEXCEPT_MAYBE
int format(int y, int x, unsigned ylen, unsigned xlen, uint16_t stylemask) const NOEXCEPT_MAYBE
Plane * reparent_family(const Plane &newparent) const noexcept
Plane(Plane *n, int rows, int cols, int yoff, int xoff, void *opaque=nullptr)
ncplane * to_ncplane() const noexcept
void styles_set(CellStyle styles) const noexcept
bool set_bg_alpha(unsigned alpha) const NOEXCEPT_MAYBE
Plane(Plane const &n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
bool mergedown_simple(Plane *dst) const
bool load_double_box(uint16_t styles, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
unsigned get_fg_rgb8(unsigned *r, unsigned *g, unsigned *b) const noexcept
int at_cursor(Cell *c) const noexcept
Plane(Plane const &other, void *opaque)
void greyscale() const noexcept
int vprintf(int y, int x, const char *format, va_list ap) const NOEXCEPT_MAYBE
bool cursor_move(int y, int x) const NOEXCEPT_MAYBE
Plane * reparent_family(Plane *newparent=nullptr) const noexcept
int putc(const Cell &c) const NOEXCEPT_MAYBE
void erase() const noexcept
bool resize(int keepy, int keepx, int keepleny, int keeplenx, int yoff, int xoff, int ylen, int xlen) const NOEXCEPT_MAYBE
static void translate(const Plane &src, const Plane &dst, int *y=nullptr, int *x=nullptr) noexcept
NcReel * ncreel_create(const ncreel_options *popts=nullptr)
unsigned get_bg_rgb8(unsigned *r, unsigned *g, unsigned *b) const noexcept
bool is_descendant_of(const Plane &ancestor) const noexcept
int putc(const Cell *c) const
int get_align(NCAlign align, int c) const NOEXCEPT_MAYBE
bool fadeout(const timespec *ts, fadecb fader=nullptr, void *curry=nullptr) const NOEXCEPT_MAYBE
bool move(int y, int x) const NOEXCEPT_MAYBE
int qrcode(unsigned *ymax, unsigned *xmax, const void *data, size_t len) const NOEXCEPT_MAYBE
int gradient(int y, int x, unsigned ylen, unsigned xlen, const char *egc, uint16_t stylemask, uint64_t ul, uint64_t ur, uint64_t ll, uint64_t lr) const NOEXCEPT_MAYBE
int putstr_stained(const wchar_t *gclustarr) const NOEXCEPT_MAYBE
void set_plane(ncplane *_plane)
Plane(const Plane &n, int rows, int cols, int yoff, int xoff, void *opaque=nullptr)
bool box_sized(const Cell &ul, const Cell &ur, const Cell &ll, const Cell &lr, const Cell &hline, const Cell &vline, int ylen, int xlen, unsigned ctlword) const NOEXCEPT_MAYBE
int putc(int y, int x, Cell const *c) const NOEXCEPT_MAYBE
bool pulse(const timespec *ts, fadecb fader, void *curry) const NOEXCEPT_MAYBE
static void translate(const Plane *src, const Plane *dst, int *y=nullptr, int *x=nullptr)
void * get_userptr() const noexcept
void get_yx(int *y, int *x) const noexcept
int putc(int y, int x, Cell const &c) const NOEXCEPT_MAYBE
int get_abs_x() const noexcept
Plane(Plane const &other)
Plane(Plane const &n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
void get_cursor_yx(unsigned &y, unsigned &x) const noexcept
char * at_cursor(uint16_t *stylemask, uint64_t *channels) const
bool rotate_ccw() const noexcept
bool mergedown(Plane &dst, unsigned begsrcy, unsigned begsrcx, unsigned leny, unsigned lenx, unsigned dsty, unsigned dstx) const
int load(Cell &cell, const char *gcluster) const NOEXCEPT_MAYBE
int printf(int y, int x, const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
void move_bottom() noexcept
bool load_rounded_box(uint16_t styles, uint64_t channels, Cell &ul, Cell &ur, Cell &ll, Cell &lr, Cell &hl, Cell &vl) const NOEXCEPT_MAYBE
Plane(ncplane *_plane) noexcept
int printf(int y, NCAlign align, const char *format,...) const NOEXCEPT_MAYBE __attribute__((format(printf
void translate(const Plane *dst, int *y=nullptr, int *x=nullptr) const noexcept
Plane(Plane *n, int rows, int cols, int yoff, NCAlign align, void *opaque=nullptr)
int putstr_stained(const char *s) const NOEXCEPT_MAYBE
int putwc_stained(wchar_t w) const NOEXCEPT_MAYBE
void get_cursor_yx(unsigned *y, unsigned *x) const noexcept
int get_halign(NCAlign align, int c) const NOEXCEPT_MAYBE
int putc(int y, int x, const char *gclust, size_t *sbytes=nullptr) const NOEXCEPT_MAYBE
char * get_at(int y, int x, uint16_t *stylemask, uint64_t *channels) const
bool move_below(Plane &below) const NOEXCEPT_MAYBE
void home() const noexcept
Plane(const Plane *n, ncplane_options const &nopts, NotCurses *ncinst=nullptr)
bool set_scrolling(bool scrollp) const noexcept
T * set_userptr(T *opaque) const noexcept
uint64_t get_channels() const noexcept
char * strdup(Cell const &cell) const noexcept
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
__attribute__((nonnull(1, 2))) static inline int egcpool_stash(egcpool *pool
int ncplane_pulse(ncplane *n, const struct timespec *ts, fadecb fader, void *curry)
int ncplane_fadeout(ncplane *n, const struct timespec *ts, fadecb fader, void *curry)
int ncplane_fadein(ncplane *n, const struct timespec *ts, fadecb fader, void *curry)
int ncplane_gradient2x1(ncplane *n, int y, int x, unsigned ylen, unsigned xlen, uint32_t ul, uint32_t ur, uint32_t ll, uint32_t lr)
void ncplane_greyscale(ncplane *n)
int ncplane_rotate_ccw(ncplane *n)
int ncplane_polyfill_yx(ncplane *n, int ystart, int xstart, const nccell *c)
int ncplane_gradient(ncplane *n, int y, int x, unsigned ylen, unsigned xlen, const char *egc, uint16_t stylemask, uint64_t ul, uint64_t ur, uint64_t bl, uint64_t br)
int ncplane_format(ncplane *n, int y, int x, unsigned ylen, unsigned xlen, uint16_t stylemask)
int ncplane_qrcode(ncplane *n, unsigned *ymax, unsigned *xmax, const void *data, size_t len)
int ncplane_stain(ncplane *n, int y, int x, unsigned ylen, unsigned xlen, uint64_t tl, uint64_t tr, uint64_t bl, uint64_t br)
int ncplane_rotate_cw(ncplane *n)
int ncplane_abs_x(const ncplane *n)
int ncplane_putwstr_stained(ncplane *n, const wchar_t *gclustarr)
void ncplane_on_styles(ncplane *n, unsigned stylebits)
void ncplane_set_fg_default(ncplane *n)
int ncplane_set_fg_rgb(ncplane *n, unsigned channel)
int ncplane_cursor_move_yx(ncplane *n, int y, int x)
void ncplane_set_fg_rgb8_clipped(ncplane *n, int r, int g, int b)
void ncplane_home(ncplane *n)
int ncplane_x(const ncplane *n)
void * ncplane_userptr(ncplane *n)
int ncplane_y(const ncplane *n)
char * ncplane_contents(ncplane *nc, int begy, int begx, unsigned leny, unsigned lenx)
void ncplane_cursor_yx(const ncplane *n, unsigned *y, unsigned *x)
ncplane * notcurses_stdplane(notcurses *nc)
void ncplane_set_channels(ncplane *n, uint64_t channels)
void ncplane_abs_yx(const ncplane *n, int *RESTRICT y, int *RESTRICT x)
ncplane * ncplane_dup(const ncplane *n, void *opaque)
void ncplane_set_bg_rgb8_clipped(ncplane *n, int r, int g, int b)
int ncplane_putchar_stained(ncplane *n, char c)
int ncplane_vprintf_aligned(ncplane *n, int y, ncalign_e align, const char *format, va_list ap)
int ncplane_set_bg_alpha(ncplane *n, int alpha)
void ncplane_set_styles(ncplane *n, unsigned stylebits)
int ncplane_destroy(ncplane *ncp)
const char * nccell_extended_gcluster(const ncplane *n, const nccell *c)
void ncplane_off_styles(ncplane *n, unsigned stylebits)
void * ncplane_set_userptr(ncplane *n, void *opaque)
char * ncplane_at_yx(const ncplane *n, int y, int x, uint16_t *stylemask, uint64_t *channels)
int ncplane_set_fg_palindex(ncplane *n, unsigned idx)
int ncplane_putegc_stained(ncplane *n, const char *gclust, size_t *sbytes)
int ncplane_abs_y(const ncplane *n)
uint16_t ncplane_styles(const ncplane *n)
int ncplane_set_fg_alpha(ncplane *n, int alpha)
int ncplane_set_bg_rgb(ncplane *n, unsigned channel)
ncplane * ncplane_reparent_family(ncplane *n, ncplane *newparent)
int ncplane_move_yx(ncplane *n, int y, int x)
int ncplane_base(ncplane *ncp, nccell *c)
int ncplane_resize_maximize(ncplane *n)
int nccell_load(ncplane *n, nccell *c, const char *gcluster)
int ncplane_putwegc_stained(ncplane *n, const wchar_t *gclust, size_t *sbytes)
void ncplane_translate(const ncplane *src, const ncplane *dst, int *restrict y, int *restrict x)
int ncplane_putegc_yx(ncplane *n, int y, int x, const char *gclust, size_t *sbytes)
int ncplane_set_base(ncplane *ncp, const char *egc, uint16_t stylemask, uint64_t channels)
int ncplane_set_bg_rgb8(ncplane *n, unsigned r, unsigned g, unsigned b)
int ncplane_vprintf_stained(struct ncplane *n, const char *format, va_list ap)
int ncplane_vprintf_yx(ncplane *n, int y, int x, const char *format, va_list ap)
ncplane * ncplane_above(ncplane *n)
void ncplane_set_resizecb(ncplane *n, int(*resizecb)(ncplane *))
bool ncplane_set_scrolling(ncplane *n, unsigned scrollp)
ncplane * ncplane_below(ncplane *n)
uint32_t * ncplane_as_rgba(const ncplane *nc, ncblitter_e blit, int begy, int begx, unsigned leny, unsigned lenx, unsigned *pxdimy, unsigned *pxdimx)
char * ncplane_at_cursor(const ncplane *n, uint16_t *stylemask, uint64_t *channels)
void ncplane_set_bg_default(ncplane *n)
void ncplane_yx(const ncplane *n, int *y, int *x)
int ncplane_hline_interp(ncplane *n, const nccell *c, unsigned len, uint64_t c1, uint64_t c2)
ncplane * ncplane_reparent(ncplane *n, ncplane *newparent)
int ncplane_at_cursor_cell(ncplane *n, nccell *c)
int ncplane_resize_realign(ncplane *n)
int ncplane_move_below(ncplane *restrict n, ncplane *restrict below)
int ncplane_at_yx_cell(ncplane *n, int y, int x, nccell *c)
int ncplane_set_fg_rgb8(ncplane *n, unsigned r, unsigned g, unsigned b)
int ncplane_resize(ncplane *n, int keepy, int keepx, unsigned keepleny, unsigned keeplenx, int yoff, int xoff, unsigned ylen, unsigned xlen)
bool ncplane_translate_abs(const ncplane *n, int *restrict y, int *restrict x)
int ncplane_vline_interp(ncplane *n, const nccell *c, unsigned len, uint64_t c1, uint64_t c2)
uint64_t ncplane_channels(const ncplane *n)
ncplane * ncplane_create(ncplane *n, const ncplane_options *nopts)
void ncplane_erase(ncplane *n)
ncplane * ncplane_parent(ncplane *n)
int ncplane_move_above(ncplane *restrict n, ncplane *restrict above)
int ncplane_box(ncplane *n, const nccell *ul, const nccell *ur, const nccell *ll, const nccell *lr, const nccell *hl, const nccell *vl, unsigned ystop, unsigned xstop, unsigned ctlword)
int ncplane_putc_yx(ncplane *n, int y, int x, const nccell *c)
void ncplane_center_abs(const ncplane *n, int *RESTRICT y, int *RESTRICT x)
int ncplane_set_base_cell(ncplane *ncp, const nccell *c)
void ncplane_dim_yx(const ncplane *n, unsigned *rows, unsigned *cols)
int(* fadecb)(struct notcurses *nc, struct ncplane *n, const struct timespec *, void *curry)
const struct ncplane_options struct ncvisual struct ncvisual_options * vopts
API int API int const nccell unsigned len
void nccell_release(ncplane *n, nccell *c)
int ncplane_mergedown(ncplane *restrict src, ncplane *restrict dst, int begsrcy, int begsrcx, unsigned leny, unsigned lenx, int dsty, int dstx)
int nccell_duplicate(ncplane *n, nccell *targ, const nccell *c)
int ncplane_mergedown_simple(ncplane *restrict src, ncplane *restrict dst)