Function ncursesw::mvwaddch[][src]

pub fn mvwaddch(
    handle: WINDOW,
    origin: Origin,
    ch: ChtypeChar
) -> Result<(), NCurseswError>
Expand description

Add/Output a ascii character and normal attribute/color pair combination on a given window at a given origin.

Example

extern crate ncursesw;
extern crate ascii;

use ascii::*;
use ncursesw::*;
use ncursesw::normal::*;

let win_size = Size { lines: 10, columns: 50 };
let win_origin = Origin { y: 5, x: 5 };

let win = newwin(win_size, win_origin)?;

let origin = Origin { y: 5, x: 10 };

let color_pair0 = ColorPair::default();
let attrs = Attributes::default() | color_pair0;

let ascii_char = AsciiChar::A;
let chtype_char = ChtypeChar::new(ascii_char) | attrs;

mvwaddch(win, origin, chtype_char)?;

delwin(win)?;