mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
remove NCSTYLE_{INVIS,BLINK,STANDOUT} #1818
This commit is contained in:
parent
8a98a98b7e
commit
8fc2a32990
3
NEWS.md
3
NEWS.md
@ -1,6 +1,9 @@
|
||||
This document attempts to list user-visible changes and any major internal
|
||||
rearrangements of Notcurses.
|
||||
|
||||
* 2.3.6 (not yet released)
|
||||
* Remove `NCSTYLE_{INVIS,BLINK,STANDOUT}` with extreme prejudice.
|
||||
|
||||
* 2.3.5 (2021-06-23)
|
||||
* Happy day! The terminal interrogation routines in the initialization code
|
||||
have been completely revamped. The first outcome of this is that Sixel
|
||||
|
3
USAGE.md
3
USAGE.md
@ -1896,13 +1896,10 @@ void nccell_release(struct ncplane* n, nccell* c);
|
||||
int nccell_width(const struct ncplane* n, const nccell* c);
|
||||
|
||||
#define NCSTYLE_MASK 0x03fful
|
||||
#define NCSTYLE_STANDOUT 0x0080ul
|
||||
#define NCSTYLE_UNDERLINE 0x0040ul
|
||||
#define NCSTYLE_REVERSE 0x0020ul
|
||||
#define NCSTYLE_BLINK 0x0010ul
|
||||
#define NCSTYLE_DIM 0x0008ul
|
||||
#define NCSTYLE_BOLD 0x0004ul
|
||||
#define NCSTYLE_INVIS 0x0002ul
|
||||
#define NCSTYLE_ITALIC 0x0100ul
|
||||
#define NCSTYLE_STRUCK 0x0200ul
|
||||
#define NCSTYLE_UNDERCURL 0x0400ul
|
||||
|
@ -12,13 +12,10 @@ namespace ncpp
|
||||
enum class CellStyle : uint32_t
|
||||
{
|
||||
None = 0,
|
||||
Standout = NCSTYLE_STANDOUT,
|
||||
Underline = NCSTYLE_UNDERLINE,
|
||||
Reverse = NCSTYLE_REVERSE,
|
||||
Blink = NCSTYLE_BLINK,
|
||||
Dim = NCSTYLE_DIM,
|
||||
Bold = NCSTYLE_BOLD,
|
||||
Invis = NCSTYLE_INVIS,
|
||||
Protect = NCSTYLE_PROTECT,
|
||||
Italic = NCSTYLE_ITALIC,
|
||||
Struck = NCSTYLE_STRUCK,
|
||||
|
@ -667,13 +667,13 @@ API void nccell_release(struct ncplane* n, nccell* c);
|
||||
#define NCSTYLE_UNDERCURL 0x0400u
|
||||
#define NCSTYLE_STRUCK 0x0200u
|
||||
#define NCSTYLE_ITALIC 0x0100u
|
||||
#define NCSTYLE_STANDOUT 0x0080u
|
||||
// 0x0080 NCSTYLE_STANDOUT has been deprecated
|
||||
#define NCSTYLE_UNDERLINE 0x0040u
|
||||
#define NCSTYLE_REVERSE 0x0020u
|
||||
#define NCSTYLE_BLINK 0x0010u
|
||||
// 0x0010 NCSTYLE_BLINK has been deprecated
|
||||
#define NCSTYLE_DIM 0x0008u
|
||||
#define NCSTYLE_BOLD 0x0004u
|
||||
#define NCSTYLE_INVIS 0x0002u
|
||||
// 0x0002 NCSTYLE_INVIS has been deprecated
|
||||
// 0x0001 NCSTYLE_PROTECT has been deprecated
|
||||
#define NCSTYLE_NONE 0
|
||||
|
||||
@ -1607,11 +1607,6 @@ ncplane_halign(const struct ncplane* n, ncalign_e align, int c){
|
||||
return notcurses_align(ncplane_dim_x(n), align, c);
|
||||
}
|
||||
|
||||
__attribute__ ((deprecated)) static inline int
|
||||
ncplane_align(const struct ncplane* n, ncalign_e align, int c){
|
||||
return ncplane_halign(n, align, c);
|
||||
}
|
||||
|
||||
// Return the row at which 'r' rows ought start in order to be aligned
|
||||
// according to 'align' within ncplane 'n'. Return -INT_MAX on invalid
|
||||
// 'align'. Undefined behavior on negative 'r'.
|
||||
@ -3831,6 +3826,11 @@ API void notcurses_debug_caps(const struct notcurses* nc, FILE* debugfp)
|
||||
|
||||
// DEPRECATED MATERIAL, GOING AWAY IN ABI3
|
||||
|
||||
__attribute__ ((deprecated)) static inline int
|
||||
ncplane_align(const struct ncplane* n, ncalign_e align, int c){
|
||||
return ncplane_halign(n, align, c);
|
||||
}
|
||||
|
||||
__attribute__ ((deprecated)) static inline void
|
||||
cell_init(nccell* c){
|
||||
nccell_init(c);
|
||||
@ -4363,6 +4363,10 @@ typedef nccell cell; // FIXME backwards-compat, remove in ABI3
|
||||
#define CELL_ALPHA_BLEND NCALPHA_BLEND
|
||||
#define CELL_ALPHA_OPAQUE NCALPHA_OPAQUE
|
||||
#define NCSTYLE_PROTECT 0x0001u
|
||||
#define NCSTYLE_STANDOUT 0x0080u
|
||||
#define NCSTYLE_BLINK 0x0010u
|
||||
#define NCSTYLE_INVIS 0x0002u
|
||||
|
||||
|
||||
#undef ALLOC
|
||||
#undef API
|
||||
|
@ -664,14 +664,10 @@ pub use ffi::{
|
||||
// NCSTYLE_UNDERCURL,
|
||||
// NCSTYLE_STRUCK,
|
||||
// NCSTYLE_ITALIC,
|
||||
// NCSTYLE_STANDOUT,
|
||||
// NCSTYLE_UNDERLINE,
|
||||
// NCSTYLE_REVERSE,
|
||||
// NCSTYLE_BLINK,
|
||||
// NCSTYLE_DIM,
|
||||
// NCSTYLE_BOLD,
|
||||
// NCSTYLE_INVIS,
|
||||
// NCSTYLE_PROTECT,
|
||||
// NCSTYLE_NONE,
|
||||
|
||||
// nctablet --------------------------------------------------------------------
|
||||
|
@ -287,14 +287,10 @@ pub type NcEgcBackstop = u8;
|
||||
/// - [`NCSTYLE_UNDERCURL`]
|
||||
/// - [`NCSTYLE_STRUCK`]
|
||||
/// - [`NCSTYLE_ITALIC`]
|
||||
/// - [`NCSTYLE_STANDOUT`]
|
||||
/// - [`NCSTYLE_UNDERLINE`]
|
||||
/// - [`NCSTYLE_REVERSE`]
|
||||
/// - [`NCSTYLE_BLINK`]
|
||||
/// - [`NCSTYLE_DIM`]
|
||||
/// - [`NCSTYLE_BOLD`]
|
||||
/// - [`NCSTYLE_INVIS`]
|
||||
/// - [`NCSTYLE_PROTECT`]
|
||||
/// - [`NCSTYLE_NONE`]
|
||||
///
|
||||
/// ## Diagram
|
||||
@ -319,29 +315,17 @@ pub const NCSTYLE_STRUCK: u16 = crate::bindings::ffi::NCSTYLE_STRUCK as u16;
|
||||
///
|
||||
pub const NCSTYLE_ITALIC: u16 = crate::bindings::ffi::NCSTYLE_ITALIC as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_STANDOUT: u16 = crate::bindings::ffi::NCSTYLE_STANDOUT as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_UNDERLINE: u16 = crate::bindings::ffi::NCSTYLE_UNDERLINE as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_REVERSE: u16 = crate::bindings::ffi::NCSTYLE_REVERSE as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_BLINK: u16 = crate::bindings::ffi::NCSTYLE_BLINK as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_DIM: u16 = crate::bindings::ffi::NCSTYLE_DIM as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_BOLD: u16 = crate::bindings::ffi::NCSTYLE_BOLD as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_INVIS: u16 = crate::bindings::ffi::NCSTYLE_INVIS as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_PROTECT: u16 = crate::bindings::ffi::NCSTYLE_PROTECT as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_NONE: u16 = crate::bindings::ffi::NCSTYLE_NONE as u16;
|
||||
|
@ -870,14 +870,16 @@ ncdirect_style_emit(ncdirect* n, unsigned* stylebits, FILE* out){
|
||||
if(*stylebits == 0 && (esc = get_escape(&n->tcache, ESCAPE_SGR0))){
|
||||
r = term_emit(esc, n->ttyfp, false);
|
||||
}else if( (esc = get_escape(&n->tcache, ESCAPE_SGR)) ){
|
||||
r = term_emit(tiparm(esc, *stylebits & NCSTYLE_STANDOUT,
|
||||
r = term_emit(tiparm(esc,
|
||||
0, // standout
|
||||
*stylebits & NCSTYLE_UNDERLINE,
|
||||
*stylebits & NCSTYLE_REVERSE,
|
||||
*stylebits & NCSTYLE_BLINK,
|
||||
0, // blink
|
||||
*stylebits & NCSTYLE_DIM,
|
||||
*stylebits & NCSTYLE_BOLD,
|
||||
*stylebits & NCSTYLE_INVIS,
|
||||
0 /* protect */, 0), out, false);
|
||||
0, // invisible
|
||||
0, // protect //
|
||||
0), out, false);
|
||||
}else{
|
||||
// no sgr, interesting. return failure if our stylebits were provided?
|
||||
// back off to individual enablers? FIXME
|
||||
|
@ -593,14 +593,15 @@ term_setstyles(FILE* out, notcurses* nc, const nccell* c){
|
||||
}
|
||||
}else if(sgr){
|
||||
if(term_emit(tiparm(sgr,
|
||||
cellattr & NCSTYLE_STANDOUT,
|
||||
0, // standout
|
||||
cellattr & NCSTYLE_UNDERLINE,
|
||||
cellattr & NCSTYLE_REVERSE,
|
||||
cellattr & NCSTYLE_BLINK,
|
||||
0, // blink
|
||||
cellattr & NCSTYLE_DIM,
|
||||
cellattr & NCSTYLE_BOLD,
|
||||
cellattr & NCSTYLE_INVIS,
|
||||
0 /* protect */, 0),
|
||||
0, // invisible
|
||||
0, // protect,
|
||||
0),
|
||||
out, false) < 0){
|
||||
ret = -1;
|
||||
}else{
|
||||
|
@ -437,13 +437,10 @@ int interrogate_terminfo(tinfo* ti, int fd, const char* termname, unsigned utf8,
|
||||
unsigned ncvbit; // bit in "ncv" mask for unconditional deny
|
||||
} styles[] = {
|
||||
{ NCSTYLE_BOLD, "bold", A_BOLD },
|
||||
{ NCSTYLE_STANDOUT, "smso", A_STANDOUT },
|
||||
{ NCSTYLE_REVERSE, "rev", A_REVERSE },
|
||||
{ NCSTYLE_UNDERLINE, "smul", A_UNDERLINE },
|
||||
{ NCSTYLE_BLINK, "blink", A_BLINK },
|
||||
{ NCSTYLE_DIM, "dim", A_DIM },
|
||||
{ NCSTYLE_ITALIC, "sitm", A_ITALIC },
|
||||
{ NCSTYLE_INVIS, "invis", A_INVIS },
|
||||
{ 0, NULL, 0 }
|
||||
};
|
||||
const char* sgr = get_escape(ti, ESCAPE_SGR);
|
||||
|
Loading…
x
Reference in New Issue
Block a user