mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-09 19:00:46 +00:00
Update for latest ncurses-rs
This commit is contained in:
parent
651c7d619b
commit
9871e12734
@ -23,7 +23,7 @@ unicode-width = "0.1"
|
||||
[dependencies.ncurses]
|
||||
features = ["wide"]
|
||||
optional = true
|
||||
version = "5.82.0"
|
||||
version = "5.83.0"
|
||||
|
||||
[dependencies.termion]
|
||||
optional = true
|
||||
|
@ -12,12 +12,12 @@ impl backend::Backend for NcursesBackend {
|
||||
::std::env::set_var("ESCDELAY", "25");
|
||||
ncurses::setlocale(ncurses::LcCategory::all, "");
|
||||
ncurses::initscr();
|
||||
ncurses::keypad(unsafe { ncurses::stdscr }, true);
|
||||
ncurses::keypad(unsafe { ncurses::stdscr() }, true);
|
||||
ncurses::noecho();
|
||||
ncurses::cbreak();
|
||||
ncurses::start_color();
|
||||
ncurses::curs_set(ncurses::CURSOR_VISIBILITY::CURSOR_INVISIBLE);
|
||||
ncurses::wbkgd(unsafe { ncurses::stdscr },
|
||||
ncurses::wbkgd(unsafe { ncurses::stdscr() },
|
||||
ncurses::COLOR_PAIR(ColorStyle::Background.id()));
|
||||
|
||||
NcursesBackend
|
||||
@ -26,7 +26,7 @@ impl backend::Backend for NcursesBackend {
|
||||
fn screen_size(&self) -> (usize, usize) {
|
||||
let mut x: i32 = 0;
|
||||
let mut y: i32 = 0;
|
||||
ncurses::getmaxyx(unsafe { ncurses::stdscr }, &mut y, &mut x);
|
||||
ncurses::getmaxyx(unsafe { ncurses::stdscr() }, &mut y, &mut x);
|
||||
(x as usize, y as usize)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user