notcurses/rust/examples/direct-capabilities.rs
joseLuís eaee89c99f [rust] renamed FullMode & DirectMode to Nc & NcD
- improve pixel-cell example.
- rustfmt
2021-04-17 22:13:43 +02:00

23 lines
433 B
Rust

use libnotcurses_sys::*;
fn main() -> NcResult<()> {
let mut dm = NcD::new()?;
let (t_rows, t_cols) = dm.dim_yx();
println!("Terminal rows={0}, cols={1}", t_rows, t_cols);
println!(
"Can display UTF-8: {0}
Can open images: {1}
Supports Pixels: {2:?}
Palette size: {3:?}
",
dm.canutf8(),
dm.canopen_images(),
dm.check_pixel_support(),
dm.palette_size(),
);
Ok(())
}