2021-04-07 12:49:44 +00:00
|
|
|
use libnotcurses_sys::*;
|
|
|
|
|
|
|
|
fn main() -> NcResult<()> {
|
2021-06-15 19:00:52 +00:00
|
|
|
let nc = Nc::without_altscreen()?;
|
2021-04-07 12:49:44 +00:00
|
|
|
|
|
|
|
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}
|
2021-04-22 00:12:08 +00:00
|
|
|
Can display braille characters: {1}
|
|
|
|
Can display sextant characters: {2}
|
2021-04-22 10:25:24 +00:00
|
|
|
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:?}
|
2021-04-07 12:49:44 +00:00
|
|
|
",
|
|
|
|
nc.canutf8(),
|
2021-04-22 00:12:08 +00:00
|
|
|
nc.canbraille(),
|
2021-04-07 12:49:44 +00:00
|
|
|
nc.cansextant(),
|
2021-04-22 10:25:24 +00:00
|
|
|
nc.canquadrant(),
|
|
|
|
nc.canhalfblock(),
|
2021-04-07 12:49:44 +00:00
|
|
|
nc.canopen_images(),
|
|
|
|
nc.canopen_videos(),
|
|
|
|
nc.check_pixel_support(),
|
|
|
|
nc.cantruecolor(),
|
2021-04-22 10:25:24 +00:00
|
|
|
nc.canfade(),
|
|
|
|
nc.canchangecolor(),
|
2021-04-07 12:49:44 +00:00
|
|
|
nc.palette_size(),
|
|
|
|
);
|
|
|
|
|
2021-04-10 13:09:02 +00:00
|
|
|
let pixelgeom = nc.stdplane().pixelgeom();
|
|
|
|
println!("{:#?}", pixelgeom);
|
|
|
|
|
2021-04-22 00:12:08 +00:00
|
|
|
nc.render()?;
|
2021-05-05 17:33:00 +00:00
|
|
|
nc.stop()?;
|
2021-04-07 12:49:44 +00:00
|
|
|
Ok(())
|
|
|
|
}
|