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<()> {
|
2021-05-05 17:33:00 +00:00
|
|
|
let dm = NcDirect::new()?;
|
2020-12-25 04:16:34 +00:00
|
|
|
|
2021-01-02 21:50:48 +00:00
|
|
|
dm.set_fg_rgb8(100, 100, 100)?;
|
|
|
|
dm.set_bg_rgb8(0xff, 0xff, 0xff)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("a");
|
2021-01-02 21:50:48 +00:00
|
|
|
dm.set_bg_rgb8(0, 0, 0)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("b");
|
|
|
|
printf!(" ");
|
|
|
|
printf!(" ");
|
2021-01-02 21:50:48 +00:00
|
|
|
dm.set_bg_rgb8(0, 0, 1)?;
|
2020-12-24 17:40:33 +00:00
|
|
|
printf!("c");
|
|
|
|
printf!(" ");
|
|
|
|
printf!(" ");
|
2021-01-02 21:50:48 +00:00
|
|
|
dm.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
|
|
|
|
|
|
|
Ok(())
|
2020-12-24 17:40:33 +00:00
|
|
|
}
|