30 lines
528 B
Rust
30 lines
528 B
Rust
|
extern crate pancurses;
|
||
|
|
||
|
use pancurses::{initscr, endwin, noecho, curs_set};
|
||
|
|
||
|
fn main() {
|
||
|
/*Create the window*/
|
||
|
let window = initscr();
|
||
|
|
||
|
/*Set some ncurses config*/
|
||
|
init();
|
||
|
window.printw("Hello Rust");
|
||
|
|
||
|
/*See function for explination */
|
||
|
refresh_win(&window);
|
||
|
window.getch();
|
||
|
endwin();
|
||
|
}
|
||
|
|
||
|
fn init() {
|
||
|
noecho();
|
||
|
curs_set(0);
|
||
|
}
|
||
|
|
||
|
|
||
|
/* This is a test to see how I can find a way to manipulate main()
|
||
|
* data in functions */
|
||
|
fn refresh_win(window: &pancurses::Window) {
|
||
|
window.refresh();
|
||
|
}
|