From 635ad557c779e142c937bb51c263f779dabdc5d1 Mon Sep 17 00:00:00 2001 From: nick black Date: Sun, 10 Oct 2021 20:53:57 -0400 Subject: [PATCH] kill ncplane_new() #1777 --- doc/man/man3/notcurses.3.md | 2 +- doc/man/man3/notcurses_plane.3.md | 3 --- include/notcurses/notcurses.h | 19 ------------------- src/lib/notcurses.c | 24 ------------------------ src/lib/reel.c | 4 ---- 5 files changed, 1 insertion(+), 51 deletions(-) diff --git a/doc/man/man3/notcurses.3.md b/doc/man/man3/notcurses.3.md index 69824883ed..52bcc57fd1 100644 --- a/doc/man/man3/notcurses.3.md +++ b/doc/man/man3/notcurses.3.md @@ -89,7 +89,7 @@ Following initialization, a single ncplane exists, the "standard plane" (see **notcurses_stdplane(3)**). This plane cannot be destroyed nor manually resized, and is always exactly as large as the screen (if run without a TTY, the "screen" is assumed to be 80x24 cells). Further ncplanes can be created with -**ncplane_new(3)**. A total z-ordering always exists on the set of ncplanes, +**ncplane_create(3)**. A total z-ordering always exists on the set of ncplanes, and new ncplanes are placed at the top of the z-buffer. Ncplanes can be larger, smaller, or the same size as the physical screen, and can be placed anywhere relative to it (including entirely off-screen). Ncplanes are made up of diff --git a/doc/man/man3/notcurses_plane.3.md b/doc/man/man3/notcurses_plane.3.md index f6407e5e01..b3bba57c03 100644 --- a/doc/man/man3/notcurses_plane.3.md +++ b/doc/man/man3/notcurses_plane.3.md @@ -505,9 +505,6 @@ All other functions cannot fail (and return **void**). # NOTES -**ncplane_new** is defined as a deprecated wrapper around **ncplane_create**. -It should not be used in new code. - # BUGS **ncplane_at_yx** doesn't yet account for bitmap-based graphics (see diff --git a/include/notcurses/notcurses.h b/include/notcurses/notcurses.h index 8db41654b0..97d08e875d 100644 --- a/include/notcurses/notcurses.h +++ b/include/notcurses/notcurses.h @@ -4090,11 +4090,6 @@ __attribute__ ((deprecated)) API int cell_duplicate(struct ncplane* n, nccell* t __attribute__ ((deprecated)) API void cell_release(struct ncplane* n, nccell* c); -// This function will be removed in ABI3 in favor of ncplane_create(). -// It persists in ABI2 only for backwards compatibility. -API ALLOC struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name) - __attribute__ ((deprecated)); - API void ncplane_styles_set(struct ncplane* n, unsigned stylebits) __attribute__ ((deprecated)); API void ncplane_styles_on(struct ncplane* n, unsigned stylebits) @@ -4102,20 +4097,6 @@ API void ncplane_styles_on(struct ncplane* n, unsigned stylebits) API void ncplane_styles_off(struct ncplane* n, unsigned stylebits) __attribute__ ((deprecated)); -__attribute__ ((deprecated)) API int -cells_rounded_box(struct ncplane* n, uint32_t styles, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, - nccell* lr, nccell* hl, nccell* vl); - -__attribute__ ((deprecated)) API int -cells_double_box(struct ncplane* n, uint32_t styles, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, - nccell* lr, nccell* hl, nccell* vl); - -// Deprecated form of nctablet_plane(). -API struct ncplane* nctablet_ncplane(struct nctablet* t) - __attribute__ ((deprecated)); - #undef API #undef ALLOC diff --git a/src/lib/notcurses.c b/src/lib/notcurses.c index 7f95a163b1..ca3b051c02 100644 --- a/src/lib/notcurses.c +++ b/src/lib/notcurses.c @@ -583,20 +583,6 @@ ncplane* ncpile_create(notcurses* nc, const struct ncplane_options* nopts){ return ncplane_new_internal(nc, NULL, nopts); } -struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name){ - ncplane_options nopts = { - .y = y, - .x = x, - .rows = rows, - .cols = cols, - .userptr = opaque, - .name = name, - .resizecb = NULL, - .flags = 0, - }; - return ncplane_create(n, &nopts); -} - void ncplane_home(ncplane* n){ n->x = 0; n->y = 0; @@ -2994,11 +2980,6 @@ int nccells_double_box(ncplane* n, uint32_t attr, uint64_t channels, return nccells_ascii_box(n, attr, channels, ul, ur, ll, lr, hl, vl); } -int cells_double_box(ncplane* n, uint32_t attr, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, nccell* lr, nccell* hl, nccell* vl){ - return nccells_double_box(n, attr, channels, ul, ur, ll, lr, hl, vl); -} - int nccells_rounded_box(ncplane* n, uint32_t attr, uint64_t channels, nccell* ul, nccell* ur, nccell* ll, nccell* lr, nccell* hl, nccell* vl){ if(notcurses_canutf8(ncplane_notcurses(n))){ @@ -3007,11 +2988,6 @@ int nccells_rounded_box(ncplane* n, uint32_t attr, uint64_t channels, return nccells_ascii_box(n, attr, channels, ul, ur, ll, lr, hl, vl); } -int cells_rounded_box(ncplane* n, uint32_t attr, uint64_t channels, - nccell* ul, nccell* ur, nccell* ll, nccell* lr, nccell* hl, nccell* vl){ - return nccells_rounded_box(n, attr, channels, ul, ur, ll, lr, hl, vl); -} - // find the center coordinate of a plane, preferring the top/left in the // case of an even number of rows/columns (in such a case, there will be one // more cell to the bottom/right of the center than the top/left). the diff --git a/src/lib/reel.c b/src/lib/reel.c index f036067ea9..ee0ef2d9e5 100644 --- a/src/lib/reel.c +++ b/src/lib/reel.c @@ -749,10 +749,6 @@ ncplane* nctablet_plane(nctablet* t){ return t->cbp; } -ncplane* nctablet_ncplane(nctablet* t){ // deprecated - return nctablet_plane(t); -} - ncplane* ncreel_plane(ncreel* nr){ return nr->p; }