mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
purge some wideasian cruft from rust wrappers
This commit is contained in:
parent
3d9b3b679c
commit
a229d64703
@ -55,7 +55,6 @@ pub use ffi::{
|
||||
// CELL_FG_PALETTE,
|
||||
// CELL_FG_RGB_MASK,
|
||||
// CELL_NOBACKGROUND_MASK,
|
||||
// CELL_WIDEASIAN_MASK,
|
||||
|
||||
#[doc(inline)]
|
||||
pub use ffi::{
|
||||
|
@ -406,7 +406,7 @@ impl NcCell {
|
||||
crate::cell_strdup(plane, self)
|
||||
}
|
||||
|
||||
/// Does this NcCell contain an East Asian Wide codepoint?
|
||||
/// Does this NcCell contain a wide codepoint?
|
||||
///
|
||||
/// *C style function: [cell_double_wide_p()][crate::cell_double_wide_p].*
|
||||
pub fn double_wide_p(&self) -> bool {
|
||||
@ -420,7 +420,7 @@ impl NcCell {
|
||||
crate::cell_wide_right_p(self)
|
||||
}
|
||||
|
||||
/// Is this the right half of a wide character?
|
||||
/// Is this the right side of a wide character?
|
||||
///
|
||||
/// *C style function: [cell_wide_right_p()][crate::cell_wide_right_p].*
|
||||
pub fn wide_right_p(&self) -> bool {
|
||||
|
@ -272,14 +272,6 @@ pub const NCCELL_FG_RGB_MASK: u64 = crate::bindings::ffi::CELL_FG_RGB_MASK;
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
pub const NCCELL_NOBACKGROUND_MASK: u64 = crate::bindings::ffi::CELL_NOBACKGROUND_MASK;
|
||||
|
||||
/// If this bit is set, the cell is part of a multicolumn glyph.
|
||||
///
|
||||
/// Whether a cell is the left or right side of the glyph can be determined
|
||||
/// by checking whether ->gcluster is zero.
|
||||
///
|
||||
/// See the detailed diagram at [`NcChannelPair`][crate::NcChannelPair]
|
||||
pub const NCCELL_WIDEASIAN_MASK: u64 = crate::bindings::ffi::CELL_WIDEASIAN_MASK as u64;
|
||||
|
||||
// NcEgc
|
||||
//
|
||||
/// Extended Grapheme Cluster. A 32-bit [`char`]-like type
|
||||
|
@ -6,7 +6,7 @@ use crate::{
|
||||
cell_release, cstring, NcAlphaBits, NcCell, NcChannel, NcChannelPair, NcColor, NcEgc,
|
||||
NcIntResult, NcPaletteIndex, NcPlane, NcRgb, NcStyleMask, NCCELL_ALPHA_OPAQUE,
|
||||
NCCELL_BGDEFAULT_MASK, NCCELL_BG_PALETTE, NCCELL_FGDEFAULT_MASK, NCCELL_FG_PALETTE,
|
||||
NCCELL_NOBACKGROUND_MASK, NCCELL_WIDEASIAN_MASK, NCRESULT_ERR, NCRESULT_OK, NCSTYLE_MASK,
|
||||
NCCELL_NOBACKGROUND_MASK, NCRESULT_ERR, NCRESULT_OK, NCSTYLE_MASK,
|
||||
};
|
||||
|
||||
// Alpha -----------------------------------------------------------------------
|
||||
@ -320,7 +320,7 @@ pub fn cell_set_styles(cell: &mut NcCell, stylebits: NcStyleMask) {
|
||||
// Waiting for: https://github.com/rust-lang/rust-bindgen/issues/1875
|
||||
#[inline]
|
||||
pub const fn cell_double_wide_p(cell: &NcCell) -> bool {
|
||||
(cell.channels & NCCELL_WIDEASIAN_MASK as NcChannelPair) != 0
|
||||
cell.width > 0
|
||||
}
|
||||
|
||||
/// Is this the right half of a wide character?
|
||||
|
@ -192,7 +192,6 @@ pub type NcAlphaBits = u32;
|
||||
/// - [`NCCELL_FG_PALETTE`][crate::NCCELL_FG_PALETTE]
|
||||
/// - [`NCCELL_FG_RGB_MASK`][crate::NCCELL_FG_RGB_MASK]
|
||||
/// - [`NCCELL_NOBACKGROUND_MASK`][crate::NCCELL_NOBACKGROUND_MASK]
|
||||
/// - [`NCCELL_WIDEASIAN_MASK`][crate::NCCELL_WIDEASIAN_MASK]
|
||||
///
|
||||
pub type NcChannelPair = u64;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user