mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +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
23 lines
434 B
Rust
23 lines
434 B
Rust
use libnotcurses_sys::*;
|
|
|
|
fn main() -> NcResult<()> {
|
|
let dm = NcDirect::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(())
|
|
}
|