Function ncursesw::winsch[][src]

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

Insert a ascii character and normal attribute/color pair combination on the given window.

Insert the character with rendition before the character under the cursor. All characters to the right of the cursor are moved one space to the right, with the possibility of the rightmost character on the line being lost. The insertion operation does not change the cursor position.

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 color_pair0 = ColorPair::default();
let attrs = Attributes::default();

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

winsch(win, chtype_char)?;

delwin(win)?;