Prepare for next ncurses release

This commit is contained in:
Alexandre Bury 2018-11-02 10:06:53 -07:00
parent 3b81305b16
commit 9430fec91b
3 changed files with 5 additions and 20 deletions

View File

@ -10,7 +10,6 @@ name = "cursive"
readme = "Readme.md"
repository = "https://github.com/gyscos/Cursive"
version = "0.9.3-alpha.0"
build = "build.rs"
[badges.travis-ci]
repository = "gyscos/Cursive"
@ -18,9 +17,6 @@ repository = "gyscos/Cursive"
[badges.appveyor]
repository = "gyscos/Cursive"
[build-dependencies]
ncurses = {optional = true, version = "5.96"}
[dependencies]
enum-map = "0.4"
enumset = "0.3"
@ -49,7 +45,8 @@ version = "1.3"
[dependencies.ncurses]
features = ["wide"]
optional = true
version = "5.96"
#version = "5.97"
git = "https://github.com/jeaye/ncurses-rs"
[dependencies.pancurses]
features = ["wide"]

View File

@ -1,9 +0,0 @@
fn main() {
#[cfg(feature = "ncurses-backend")]
{
extern crate ncurses;
if ncurses::NCURSES_MOUSE_VERSION == 1 {
print!(r#"cargo:rustc-cfg=feature="ncurses.mouse_v1""#);
}
}
}

View File

@ -420,7 +420,6 @@ fn get_mouse_button(bare_event: i32) -> MouseButton {
| ncurses::BUTTON4_CLICKED
| ncurses::BUTTON4_DOUBLE_CLICKED
| ncurses::BUTTON4_TRIPLE_CLICKED => MouseButton::Button4,
#[cfg(not(feature = "ncurses.mouse_v1"))]
ncurses::BUTTON5_RELEASED
| ncurses::BUTTON5_PRESSED
| ncurses::BUTTON5_CLICKED
@ -445,16 +444,14 @@ where
match bare_event {
ncurses::BUTTON1_RELEASED
| ncurses::BUTTON2_RELEASED
| ncurses::BUTTON3_RELEASED
| ncurses::BUTTON4_RELEASED => f(MouseEvent::Release(button)),
#[cfg(not(feature = "ncurses.mouse_v1"))]
ncurses::BUTTON5_RELEASED => f(MouseEvent::Release(button)),
| ncurses::BUTTON3_RELEASED => f(MouseEvent::Release(button)),
ncurses::BUTTON1_PRESSED
| ncurses::BUTTON2_PRESSED
| ncurses::BUTTON3_PRESSED => f(MouseEvent::Press(button)),
ncurses::BUTTON4_PRESSED => f(MouseEvent::WheelUp),
#[cfg(not(feature = "ncurses.mouse_v1"))]
ncurses::BUTTON5_PRESSED => f(MouseEvent::WheelDown),
// BUTTON4_RELEASED? BUTTON5_RELEASED?
// Do they ever happen?
_ => debug!("Unknown event: {:032b}", bare_event),
}
}