mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[ncplanes] remove ncplane_set_[bf]channel() #2571
This commit is contained in:
parent
4e0428dfcc
commit
e33cb62de9
1
NEWS.md
1
NEWS.md
@ -2,6 +2,7 @@ This document attempts to list user-visible changes and any major internal
|
|||||||
rearrangements of Notcurses.
|
rearrangements of Notcurses.
|
||||||
|
|
||||||
* 3.0.6 (not yet released)
|
* 3.0.6 (not yet released)
|
||||||
|
* Remove the unsafe `ncplane_set_bchannel()` and `ncplane_set_fchannel()`.
|
||||||
|
|
||||||
* 3.0.5 (2022-01-21)
|
* 3.0.5 (2022-01-21)
|
||||||
* The Hyper and Super modifiers are now supported. CapsLock and NumLock
|
* The Hyper and Super modifiers are now supported. CapsLock and NumLock
|
||||||
|
4
USAGE.md
4
USAGE.md
@ -1807,10 +1807,6 @@ all implemented in terms of the lower-level [Channels API](#channels).
|
|||||||
uint64_t ncplane_channels(const struct ncplane* n);
|
uint64_t ncplane_channels(const struct ncplane* n);
|
||||||
uint16_t ncplane_attr(const struct ncplane* n);
|
uint16_t ncplane_attr(const struct ncplane* n);
|
||||||
|
|
||||||
// Set an entire 32-bit channel of the plane 'n'
|
|
||||||
int ncplane_set_fchannel(struct ncplane* n, uint32_t channel);
|
|
||||||
int ncplane_set_bchannel(struct ncplane* n, uint32_t channel);
|
|
||||||
|
|
||||||
// Extract the 32-bit working background channel from an ncplane.
|
// Extract the 32-bit working background channel from an ncplane.
|
||||||
static inline unsigned
|
static inline unsigned
|
||||||
ncplane_bchannel(const struct ncplane* nc){
|
ncplane_bchannel(const struct ncplane* nc){
|
||||||
|
@ -843,16 +843,6 @@ namespace ncpp
|
|||||||
return ncplane_fg_alpha (plane);
|
return ncplane_fg_alpha (plane);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t set_fchannel (uint32_t channel) const noexcept
|
|
||||||
{
|
|
||||||
return ncplane_set_fchannel (plane, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t set_bchannel (uint32_t channel) const noexcept
|
|
||||||
{
|
|
||||||
return ncplane_set_bchannel (plane, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_channels (uint64_t channels) const noexcept
|
void set_channels (uint64_t channels) const noexcept
|
||||||
{
|
{
|
||||||
ncplane_set_channels (plane, channels);
|
ncplane_set_channels (plane, channels);
|
||||||
|
@ -2903,10 +2903,6 @@ ncplane_bg_rgb8(const struct ncplane* n, unsigned* r, unsigned* g, unsigned* b){
|
|||||||
return ncchannels_bg_rgb8(ncplane_channels(n), r, g, b);
|
return ncchannels_bg_rgb8(ncplane_channels(n), r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set an entire 32-bit channel of the plane
|
|
||||||
API uint64_t ncplane_set_fchannel(struct ncplane* n, uint32_t channel);
|
|
||||||
API uint64_t ncplane_set_bchannel(struct ncplane* n, uint32_t channel);
|
|
||||||
|
|
||||||
// Set the current fore/background color using RGB specifications. If the
|
// Set the current fore/background color using RGB specifications. If the
|
||||||
// terminal does not support directly-specified 3x8b cells (24-bit "TrueColor",
|
// terminal does not support directly-specified 3x8b cells (24-bit "TrueColor",
|
||||||
// indicated by the "RGB" terminfo capability), the provided values will be
|
// indicated by the "RGB" terminfo capability), the provided values will be
|
||||||
|
@ -1471,14 +1471,6 @@ void ncplane_set_fg_default(ncplane* n){
|
|||||||
ncchannels_set_fg_default(&n->channels);
|
ncchannels_set_fg_default(&n->channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t ncplane_set_fchannel(ncplane* n, uint32_t channel){
|
|
||||||
return ncchannels_set_fchannel(&n->channels, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t ncplane_set_bchannel(ncplane* n, uint32_t channel){
|
|
||||||
return ncchannels_set_bchannel(&n->channels, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ncplane_set_bg_default(ncplane* n){
|
void ncplane_set_bg_default(ncplane* n){
|
||||||
ncchannels_set_bg_default(&n->channels);
|
ncchannels_set_bg_default(&n->channels);
|
||||||
}
|
}
|
||||||
|
@ -315,7 +315,7 @@ putpara(struct ncplane* p, const char* text){
|
|||||||
static int
|
static int
|
||||||
draw_domnode(struct ncplane* p, const pagedom* dom, const pagenode* n,
|
draw_domnode(struct ncplane* p, const pagedom* dom, const pagenode* n,
|
||||||
unsigned* wrotetext, unsigned* insubsec){
|
unsigned* wrotetext, unsigned* insubsec){
|
||||||
ncplane_set_fchannel(p, n->ttype->channel);
|
ncplane_set_fg_rgb(p, ncchannel_rgb(n->ttype->channel));
|
||||||
size_t b = 0;
|
size_t b = 0;
|
||||||
unsigned y;
|
unsigned y;
|
||||||
ncplane_cursor_yx(p, &y, NULL);
|
ncplane_cursor_yx(p, &y, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user