rust: add poc-kittyzapper example
- fix ncdirect_[b|f]g_rgb8 functions. - fix NcDirect.bg_rgb8 method. - new printf![] macro.pull/1253/head
parent
3c8328c9cc
commit
a9413eafb2
@ -0,0 +1,22 @@
|
||||
//! based on the proof of concept at ../../src/poc/kittyzapper.c
|
||||
|
||||
use libnotcurses_sys::*;
|
||||
|
||||
fn main() {
|
||||
let ncd = NcDirect::new();
|
||||
ncd.fg_rgb8(100, 100, 100);
|
||||
ncd.bg_rgb8(0xff, 0xff, 0xff);
|
||||
printf!("a");
|
||||
ncd.bg_rgb8(0, 0, 0);
|
||||
printf!("b");
|
||||
printf!(" ");
|
||||
printf!(" ");
|
||||
ncd.bg_rgb8(0, 0, 1);
|
||||
printf!("c");
|
||||
printf!(" ");
|
||||
printf!(" ");
|
||||
ncd.bg_rgb8(0xff, 0xff, 0xff);
|
||||
printf!("d");
|
||||
printf!("\n");
|
||||
ncd.stop();
|
||||
}
|
Loading…
Reference in New Issue