pub extern crate ncurses; mod window; pub use window::*; pub use ncurses::LcCategory; pub use ncurses as old; /// Initializes rcurses and returns main window. /// /// This function initializes console for ncurses. /// If you used this function, you must remember to use /// `end()`. Otherwise console can not work properly after /// shutdown of your program. /// /// # Examples /// ``` /// use rcurses::*; /// let window = init(); /// end(); /// ``` pub fn init() -> Window { Window::from(old::initscr()) } /// Sets locale. /// /// # Examples /// ``` /// use rcurses::*; /// set_locale(LcCategory::all, "en_US"); /// ``` pub fn set_locale(category: LcCategory, locale: &str) { old::setlocale(category, locale); } /// Stops rcurses mode. /// /// # Examples /// ``` /// use rcurses::*; /// let window = init(); /// end(); /// ``` pub fn end() { old::endwin(); }