add deprecated nctablet_ncplane() for old binaries

This commit is contained in:
nick black 2020-09-29 11:59:33 -04:00
parent 6ddf105746
commit 174a00b56c
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 10 additions and 1 deletions

View File

@ -1020,7 +1020,8 @@ API struct ncplane* ncplane_create(struct ncplane* n, const ncplane_options* nop
// This function will be marked deprecated in 2.0 in favor of ncplane_create(). // This function will be marked deprecated in 2.0 in favor of ncplane_create().
// It persists only for backwards compatibility. // It persists only for backwards compatibility.
API struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name); API struct ncplane* ncplane_new(struct ncplane* n, int rows, int cols, int y, int x, void* opaque, const char* name)
__attribute__ ((deprecated));
// Suitable for use as a `resizecb`. This will realign the plane 'n' against its // Suitable for use as a `resizecb`. This will realign the plane 'n' against its
// parent, using the alignment specified at ncplane_create()-time. // parent, using the alignment specified at ncplane_create()-time.
@ -2528,6 +2529,10 @@ API void* nctablet_userptr(struct nctablet* t);
// Access the ncplane associated with nctablet 't', if one exists. // Access the ncplane associated with nctablet 't', if one exists.
API struct ncplane* nctablet_plane(struct nctablet* t); API struct ncplane* nctablet_plane(struct nctablet* t);
// Deprecated form of nctablet_plane().
API struct ncplane* nctablet_ncplane(struct nctablet* t)
__attribute__ ((deprecated));
// The number of columns is one fewer, as the STRLEN expressions must leave // The number of columns is one fewer, as the STRLEN expressions must leave
// an extra byte open in case 'µ' (U+00B5, 0xC2 0xB5) shows up. PREFIXCOLUMNS // an extra byte open in case 'µ' (U+00B5, 0xC2 0xB5) shows up. PREFIXCOLUMNS
// is the maximum number of columns used by a mult == 1000 (standard) // is the maximum number of columns used by a mult == 1000 (standard)

View File

@ -715,6 +715,10 @@ ncplane* nctablet_plane(nctablet* t){
return t->cbp; return t->cbp;
} }
ncplane* nctablet_ncplane(nctablet* t){ // deprecated
return nctablet_plane(t);
}
ncplane* ncreel_plane(ncreel* nr){ ncplane* ncreel_plane(ncreel* nr){
return nr->p; return nr->p;
} }