2020-12-24 17:40:33 +00:00
|
|
|
//! based on the proof of concept at ../../src/poc/kittyzapper.c
|
|
|
|
|
|
|
|
use libnotcurses_sys::*;
|
|
|
|
|
2020-12-25 04:16:34 +00:00
|
|
|
fn main() -> NcResult<()> {
|
2020-12-25 16:40:37 +00:00
|
|
|
let ncd = NcDirect::new()?;
|
2020-12-25 04:16:34 +00:00
|
|
|
|
2020-12-29 01:51:05 +00:00
|
|
|
ncd.set_fg_rgb8(100, 100, 100)?;
|
|
|
|
ncd.set_bg_rgb8(0xff, 0xff, 0xff)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("a");
|
2020-12-29 01:51:05 +00:00
|
|
|
ncd.set_bg_rgb8(0, 0, 0)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("b");
|
|
|
|
printf!(" ");
|
|
|
|
printf!(" ");
|
2020-12-29 01:51:05 +00:00
|
|
|
ncd.set_bg_rgb8(0, 0, 1)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("c");
|
|
|
|
printf!(" ");
|
|
|
|
printf!(" ");
|
2020-12-29 01:51:05 +00:00
|
|
|
ncd.set_bg_rgb8(0xff, 0xff, 0xff)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("d");
|
|
|
|
printf!("\n");
|
2020-12-25 04:16:34 +00:00
|
|
|
ncd.stop()?;
|
|
|
|
|
|
|
|
Ok(())
|
2020-12-24 17:40:33 +00:00
|
|
|
}
|