mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
cell_extract() -> nccell_extract()
This commit is contained in:
parent
da2a897544
commit
32500239ac
2
NEWS.md
2
NEWS.md
@ -6,7 +6,7 @@ rearrangements of Notcurses.
|
||||
function `nccell_extended_gcluster()`, which the former now wraps.
|
||||
It will be removed in ABI3. The same treatment has been applied to
|
||||
`cell_load_egc32()`, `cell_load_char()`, `cellcmp()`, `cell_init()`,
|
||||
`cell_load()`, and `cell_prime()`.
|
||||
`cell_extract()`, `cell_load()`, and `cell_prime()`.
|
||||
|
||||
* 2.2.6 (2021-04-12)
|
||||
* `ncplane_rgba()` has been deprecated in favor of the new function
|
||||
|
@ -1198,7 +1198,7 @@ namespace ncpp
|
||||
|
||||
char* extract (Cell const& cell, uint16_t *stylemask = nullptr, uint64_t *channels = nullptr)
|
||||
{
|
||||
return cell_extract (plane, cell, stylemask, channels);
|
||||
return nccell_extract (plane, cell, stylemask, channels);
|
||||
}
|
||||
|
||||
// FIXME these can except if fed a sprixel, right (returns NULL)?
|
||||
|
@ -828,8 +828,8 @@ cell_strdup(const struct ncplane* n, const nccell* c){
|
||||
|
||||
// Extract the three elements of a nccell.
|
||||
static inline char*
|
||||
cell_extract(const struct ncplane* n, const nccell* c,
|
||||
uint16_t* stylemask, uint64_t* channels){
|
||||
nccell_extract(const struct ncplane* n, const nccell* c,
|
||||
uint16_t* stylemask, uint64_t* channels){
|
||||
if(stylemask){
|
||||
*stylemask = c->stylemask;
|
||||
}
|
||||
@ -839,6 +839,12 @@ cell_extract(const struct ncplane* n, const nccell* c,
|
||||
return nccell_strdup(n, c);
|
||||
}
|
||||
|
||||
__attribute__ ((deprecated)) static inline char*
|
||||
cell_extract(const struct ncplane* n, const nccell* c,
|
||||
uint16_t* stylemask, uint64_t* channels){
|
||||
return nccell_extract(n, c, stylemask, channels);
|
||||
}
|
||||
|
||||
// Returns true if the two nccells are distinct EGCs, attributes, or channels.
|
||||
// The actual egcpool index needn't be the same--indeed, the planes needn't even
|
||||
// be the same. Only the expanded EGC must be equal. The EGC must be bit-equal;
|
||||
|
@ -154,7 +154,7 @@ char* ncplane_at_cursor(ncplane* n, uint16_t* stylemask, uint64_t* channels){
|
||||
char* ncplane_at_yx(const ncplane* n, int y, int x, uint16_t* stylemask, uint64_t* channels){
|
||||
if(y < n->leny && x < n->lenx){
|
||||
if(y >= 0 && x >= 0){
|
||||
return cell_extract(n, &n->fb[nfbcellidx(n, y, x)], stylemask, channels);
|
||||
return nccell_extract(n, &n->fb[nfbcellidx(n, y, x)], stylemask, channels);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user