mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 09:09:03 -04:00
GTFO NCSTYLE_DIM, NCSTYLE_REVERSE #1818
This commit is contained in:
parent
d08b65f323
commit
9d7f07771b
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.7 (not yet released)
|
||||
* Deprecated `NCSTYLE_REVERSE` and `NCSTYLE_DIM`. The remainder are safe.
|
||||
|
||||
* 2.3.6 (2021-06-23)
|
||||
* Fixed (harmless) warning with `-Wformat-security`.
|
||||
* Remove `NCSTYLE_{INVIS,BLINK,STANDOUT}` with extreme prejudice. They
|
||||
|
2
USAGE.md
2
USAGE.md
@ -1897,8 +1897,6 @@ int nccell_width(const struct ncplane* n, const nccell* c);
|
||||
|
||||
#define NCSTYLE_MASK 0x03fful
|
||||
#define NCSTYLE_UNDERLINE 0x0040ul
|
||||
#define NCSTYLE_REVERSE 0x0020ul
|
||||
#define NCSTYLE_DIM 0x0008ul
|
||||
#define NCSTYLE_BOLD 0x0004ul
|
||||
#define NCSTYLE_ITALIC 0x0100ul
|
||||
#define NCSTYLE_STRUCK 0x0200ul
|
||||
|
@ -26,6 +26,13 @@ typedef struct ncplane_options {
|
||||
uint64_t flags; // closure over NCPLANE_OPTION_*
|
||||
int margin_b, margin_r; // bottom and right margins
|
||||
} ncplane_options;
|
||||
|
||||
#define NCSTYLE_UNDERCURL 0x0400u
|
||||
#define NCSTYLE_STRUCK 0x0200u
|
||||
#define NCSTYLE_ITALIC 0x0100u
|
||||
#define NCSTYLE_UNDERLINE 0x0040u
|
||||
#define NCSTYLE_BOLD 0x0004u
|
||||
#define NCSTYLE_NONE 0
|
||||
```
|
||||
|
||||
**struct ncplane* ncplane_create(struct ncplane* ***n***, const ncplane_options* ***nopts***);**
|
||||
|
@ -13,11 +13,10 @@ namespace ncpp
|
||||
{
|
||||
None = 0,
|
||||
Underline = NCSTYLE_UNDERLINE,
|
||||
Reverse = NCSTYLE_REVERSE,
|
||||
Dim = NCSTYLE_DIM,
|
||||
Bold = NCSTYLE_BOLD,
|
||||
Italic = NCSTYLE_ITALIC,
|
||||
Struck = NCSTYLE_STRUCK,
|
||||
Undercurl = NCSTYLE_UNDERCURL,
|
||||
};
|
||||
|
||||
DECLARE_ENUM_FLAG_OPERATORS (CellStyle)
|
||||
|
@ -670,9 +670,9 @@ API void nccell_release(struct ncplane* n, nccell* c);
|
||||
#define NCSTYLE_ITALIC 0x0100u
|
||||
// 0x0080 NCSTYLE_STANDOUT has been deprecated
|
||||
#define NCSTYLE_UNDERLINE 0x0040u
|
||||
#define NCSTYLE_REVERSE 0x0020u
|
||||
// 0x0020 NCSTYLE_REVERSE has been deprecated
|
||||
// 0x0010 NCSTYLE_BLINK has been deprecated
|
||||
#define NCSTYLE_DIM 0x0008u
|
||||
// 0x0008 NCSTYLE_DIM has been deprecated
|
||||
#define NCSTYLE_BOLD 0x0004u
|
||||
// 0x0002 NCSTYLE_INVIS has been deprecated
|
||||
// 0x0001 NCSTYLE_PROTECT has been deprecated
|
||||
@ -4364,8 +4364,9 @@ API void notcurses_debug_caps(const struct notcurses* nc, FILE* debugfp)
|
||||
#define NCSTYLE_PROTECT 0x0001u
|
||||
#define NCSTYLE_STANDOUT 0x0080u
|
||||
#define NCSTYLE_BLINK 0x0010u
|
||||
#define NCSTYLE_REVERSE 0x0020u
|
||||
#define NCSTYLE_INVIS 0x0002u
|
||||
|
||||
#define NCSTYLE_DIM 0x0008u
|
||||
|
||||
#undef ALLOC
|
||||
#undef API
|
||||
|
@ -665,8 +665,6 @@ pub use ffi::{
|
||||
// NCSTYLE_STRUCK,
|
||||
// NCSTYLE_ITALIC,
|
||||
// NCSTYLE_UNDERLINE,
|
||||
// NCSTYLE_REVERSE,
|
||||
// NCSTYLE_DIM,
|
||||
// NCSTYLE_BOLD,
|
||||
// NCSTYLE_NONE,
|
||||
|
||||
|
@ -288,8 +288,6 @@ pub type NcEgcBackstop = u8;
|
||||
/// - [`NCSTYLE_STRUCK`]
|
||||
/// - [`NCSTYLE_ITALIC`]
|
||||
/// - [`NCSTYLE_UNDERLINE`]
|
||||
/// - [`NCSTYLE_REVERSE`]
|
||||
/// - [`NCSTYLE_DIM`]
|
||||
/// - [`NCSTYLE_BOLD`]
|
||||
/// - [`NCSTYLE_NONE`]
|
||||
///
|
||||
@ -318,12 +316,6 @@ pub const NCSTYLE_ITALIC: u16 = crate::bindings::ffi::NCSTYLE_ITALIC 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_DIM: u16 = crate::bindings::ffi::NCSTYLE_DIM as u16;
|
||||
|
||||
///
|
||||
pub const NCSTYLE_BOLD: u16 = crate::bindings::ffi::NCSTYLE_BOLD as u16;
|
||||
|
||||
|
@ -136,6 +136,8 @@ tinfo_debug_styles(const tinfo* ti, FILE* debugfp, const char* indent){
|
||||
fprintf(debugfp, "\n");
|
||||
}
|
||||
|
||||
// we should probably change this up to use regular good ol'
|
||||
// notcurses_render() without the alternate screen, no?
|
||||
int main(void){
|
||||
char* mbuf = NULL;
|
||||
size_t len = 0;
|
||||
|
@ -595,9 +595,9 @@ term_setstyles(FILE* out, notcurses* nc, const nccell* c){
|
||||
if(term_emit(tiparm(sgr,
|
||||
0, // standout
|
||||
cellattr & NCSTYLE_UNDERLINE,
|
||||
cellattr & NCSTYLE_REVERSE,
|
||||
0, // reverse
|
||||
0, // blink
|
||||
cellattr & NCSTYLE_DIM,
|
||||
0, // dim
|
||||
cellattr & NCSTYLE_BOLD,
|
||||
0, // invisible
|
||||
0, // protect,
|
||||
|
Loading…
x
Reference in New Issue
Block a user