diff options
Diffstat (limited to 'src/cell.rs')
-rw-r--r-- | src/cell.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/cell.rs b/src/cell.rs index 4c0d6fb..ef12756 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -2,6 +2,7 @@ use libc; use std; use color; +use ffi; use types; pub struct Cell(*mut types::CellImpl); @@ -56,4 +57,29 @@ impl Cell { let attrs = unsafe { &(*prefix).attrs }; color::Color::new(&attrs.bgcolor) } + + pub fn is_wide(&self) -> bool { + let Cell(cell_impl) = *self; + unsafe { ffi::vt100_wrapper_cell_is_wide(cell_impl) != 0 } + } + + pub fn bold(&self) -> bool { + let Cell(cell_impl) = *self; + unsafe { ffi::vt100_wrapper_cell_bold(cell_impl) != 0 } + } + + pub fn italic(&self) -> bool { + let Cell(cell_impl) = *self; + unsafe { ffi::vt100_wrapper_cell_italic(cell_impl) != 0 } + } + + pub fn underline(&self) -> bool { + let Cell(cell_impl) = *self; + unsafe { ffi::vt100_wrapper_cell_underline(cell_impl) != 0 } + } + + pub fn inverse(&self) -> bool { + let Cell(cell_impl) = *self; + unsafe { ffi::vt100_wrapper_cell_inverse(cell_impl) != 0 } + } } |