mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
c++: deprecate ncplane_new() #1115
This commit is contained in:
parent
a3d9f78612
commit
886835a8b4
@ -69,14 +69,21 @@ namespace ncpp
|
||||
explicit Plane (int rows, int cols, int yoff, int xoff, void *opaque = nullptr, NotCurses *ncinst = nullptr)
|
||||
: Root (ncinst)
|
||||
{
|
||||
plane = ncplane_new (
|
||||
struct ncplane_options nopts = {
|
||||
.y = yoff,
|
||||
.horiz = {
|
||||
.x = xoff,
|
||||
},
|
||||
.rows = rows,
|
||||
.cols = cols,
|
||||
.userptr = opaque,
|
||||
.name = nullptr,
|
||||
.resizecb = nullptr,
|
||||
.flags = 0,
|
||||
};
|
||||
plane = ncplane_create (
|
||||
notcurses_stdplane(get_notcurses ()),
|
||||
rows,
|
||||
cols,
|
||||
yoff,
|
||||
xoff,
|
||||
opaque,
|
||||
nullptr
|
||||
&nopts
|
||||
);
|
||||
|
||||
if (plane == nullptr)
|
||||
@ -1165,14 +1172,21 @@ namespace ncpp
|
||||
private:
|
||||
ncplane* create_plane (const Plane &n, int rows, int cols, int yoff, int xoff, void *opaque)
|
||||
{
|
||||
ncplane *ret = ncplane_new (
|
||||
struct ncplane_options nopts = {
|
||||
.y = yoff,
|
||||
.horiz = {
|
||||
.x = xoff,
|
||||
},
|
||||
.rows = rows,
|
||||
.cols = cols,
|
||||
.userptr = opaque,
|
||||
.name = nullptr,
|
||||
.resizecb = nullptr,
|
||||
.flags = 0,
|
||||
};
|
||||
ncplane *ret = ncplane_create (
|
||||
n.plane,
|
||||
rows,
|
||||
cols,
|
||||
yoff,
|
||||
xoff,
|
||||
opaque,
|
||||
nullptr
|
||||
&nopts
|
||||
);
|
||||
|
||||
if (ret == nullptr)
|
||||
|
Loading…
Reference in New Issue
Block a user