mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-06 03:20:26 +00:00
6049e07d27
- made const NotcursesOptions constructors. - refactor Notcurses constructors to return NcResult. - pass NotcursesOptions by value, since it's Copy. - update tests. - add helper modules for Notcurses & NcPlane. - new initialization functions to be used in tests. - BONUS: - refactor NcDirect - update examples.
20 lines
445 B
Rust
20 lines
445 B
Rust
use libnotcurses_sys::*;
|
|
|
|
fn main() -> NcResult<()> {
|
|
unsafe {
|
|
let nc = Notcurses::new()?;
|
|
let stdplane = notcurses_stdplane(nc);
|
|
|
|
for ch in "Initializing cells...".chars() {
|
|
let cell = NcCell::with_char7b(ch);
|
|
sleep![60];
|
|
ncplane_putc(&mut *stdplane, &cell);
|
|
let _ = notcurses_render(nc);
|
|
}
|
|
sleep![900];
|
|
|
|
notcurses_stop(nc);
|
|
}
|
|
Ok(())
|
|
}
|