From c8eb3875ff8d90a76a32ed1c1c344ff1c7a5bb38 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 24 Nov 2020 00:09:30 +0100 Subject: [PATCH] [C++] API sync Added: * NotCurses: `stats_alloc` (`notcurses_stats_alloc`) * Plane: `set_resizecb` (`ncplane_set_resizecb`) --- include/ncpp/NotCurses.hh | 5 +++++ include/ncpp/Plane.hh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/ncpp/NotCurses.hh b/include/ncpp/NotCurses.hh index a4daef1a4..ebd972e8d 100644 --- a/include/ncpp/NotCurses.hh +++ b/include/ncpp/NotCurses.hh @@ -283,6 +283,11 @@ namespace ncpp return error_guard (notcurses_align (availcols, align, cols), -INT_MAX); } + ncstats* stats_alloc () const noexcept + { + return notcurses_stats_alloc (nc); + } + static bool ucs32_to_utf8 (const char32_t *ucs32, unsigned ucs32count, unsigned char *resultbuf, size_t buflen) NOEXCEPT_MAYBE { return error_guard (notcurses_ucs32_to_utf8 (ucs32, ucs32count, resultbuf, buflen), -1); diff --git a/include/ncpp/Plane.hh b/include/ncpp/Plane.hh index 5c57b8ebe..728107068 100644 --- a/include/ncpp/Plane.hh +++ b/include/ncpp/Plane.hh @@ -1146,6 +1146,11 @@ namespace ncpp return plane != nullptr; } + void set_resizecb (int(*resizecb)(struct ncplane*)) const noexcept + { + ncplane_set_resizecb (plane, resizecb); + } + protected: explicit Plane (ncplane *_plane, bool _is_stdplane) : Root (nullptr),