mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
129e208438
- remove `Nc` & `NcD` wrappers, to move them to notcurses-rs library. - update the summary header format for Notcurses and NcDirect - update docs and examples
44 lines
1.0 KiB
Rust
44 lines
1.0 KiB
Rust
use libnotcurses_sys::*;
|
|
|
|
fn main() -> NcResult<()> {
|
|
let nc = Notcurses::without_altscreen()?;
|
|
|
|
let (t_rows, t_cols) = nc.term_dim_yx();
|
|
println!("Terminal rows={0}, cols={1}", t_rows, t_cols);
|
|
|
|
println!(
|
|
"Can display UTF-8: {0}
|
|
Can display braille characters: {1}
|
|
Can display sextant characters: {2}
|
|
Can display quadrant characters: {3}
|
|
Can display half block characters: {4}
|
|
Can open images: {5}
|
|
Can open videos: {6}
|
|
Supports Pixels: {7:?}
|
|
Supports True Color: {8}
|
|
Supports fading: {9}
|
|
Supports changing the palette: {10}
|
|
Palette size: {11:?}
|
|
",
|
|
nc.canutf8(),
|
|
nc.canbraille(),
|
|
nc.cansextant(),
|
|
nc.canquadrant(),
|
|
nc.canhalfblock(),
|
|
nc.canopen_images(),
|
|
nc.canopen_videos(),
|
|
nc.check_pixel_support(),
|
|
nc.cantruecolor(),
|
|
nc.canfade(),
|
|
nc.canchangecolor(),
|
|
nc.palette_size(),
|
|
);
|
|
|
|
let pixelgeom = nc.stdplane().pixelgeom();
|
|
println!("{:#?}", pixelgeom);
|
|
|
|
nc.render()?;
|
|
nc.stop()?;
|
|
Ok(())
|
|
}
|