From dd1e7f3b7ed50786ec2a75ddfb5f96c6ac87750f Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 21 Nov 2020 22:08:55 -0500 Subject: [PATCH] document ncplane_reparent() more completely --- include/notcurses/notcurses.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 21eac7c8a..11f9da0d5 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -1059,13 +1059,17 @@ API void ncplane_set_resizecb(struct ncplane* n, int(*resizecb)(struct ncplane*) // Returns the ncplane's current resize callback. API int (*ncplane_resizecb(const struct ncplane* n))(struct ncplane*); -// Plane 'n' will be unbound from its parent plane, if it is currently bound, -// and will be made a bound child of 'newparent', if 'newparent' is not NULL. +// Plane 'n' will be unbound from its parent plane, and will be made a bound +// child of 'newparent'. It is an error if 'n' or 'newparent' are NULL. If +// 'newparent' is equal to 'n', 'n' becomes the root of a new pile, unless 'n' +// is already the root of a pile, in which case this is a no-op. Returns 'n'. +// The standard plane cannot be reparented. API struct ncplane* ncplane_reparent(struct ncplane* n, struct ncplane* newparent); // Duplicate an existing ncplane. The new plane will have the same geometry, // will duplicate all content, and will start with the same rendering state. -// The new plane will be immediately above the old one on the z axis. +// The new plane will be immediately above the old one on the z axis, and will +// be bound to the same parent. API struct ncplane* ncplane_dup(const struct ncplane* n, void* opaque); // provided a coordinate relative to the origin of 'src', map it to the same