mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-27 11:16:03 +00:00
Prepare for next ncurses release
This commit is contained in:
parent
3b81305b16
commit
9430fec91b
@ -10,7 +10,6 @@ name = "cursive"
|
|||||||
readme = "Readme.md"
|
readme = "Readme.md"
|
||||||
repository = "https://github.com/gyscos/Cursive"
|
repository = "https://github.com/gyscos/Cursive"
|
||||||
version = "0.9.3-alpha.0"
|
version = "0.9.3-alpha.0"
|
||||||
build = "build.rs"
|
|
||||||
|
|
||||||
[badges.travis-ci]
|
[badges.travis-ci]
|
||||||
repository = "gyscos/Cursive"
|
repository = "gyscos/Cursive"
|
||||||
@ -18,9 +17,6 @@ repository = "gyscos/Cursive"
|
|||||||
[badges.appveyor]
|
[badges.appveyor]
|
||||||
repository = "gyscos/Cursive"
|
repository = "gyscos/Cursive"
|
||||||
|
|
||||||
[build-dependencies]
|
|
||||||
ncurses = {optional = true, version = "5.96"}
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
enum-map = "0.4"
|
enum-map = "0.4"
|
||||||
enumset = "0.3"
|
enumset = "0.3"
|
||||||
@ -49,7 +45,8 @@ version = "1.3"
|
|||||||
[dependencies.ncurses]
|
[dependencies.ncurses]
|
||||||
features = ["wide"]
|
features = ["wide"]
|
||||||
optional = true
|
optional = true
|
||||||
version = "5.96"
|
#version = "5.97"
|
||||||
|
git = "https://github.com/jeaye/ncurses-rs"
|
||||||
|
|
||||||
[dependencies.pancurses]
|
[dependencies.pancurses]
|
||||||
features = ["wide"]
|
features = ["wide"]
|
||||||
|
9
build.rs
9
build.rs
@ -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""#);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -420,7 +420,6 @@ fn get_mouse_button(bare_event: i32) -> MouseButton {
|
|||||||
| ncurses::BUTTON4_CLICKED
|
| ncurses::BUTTON4_CLICKED
|
||||||
| ncurses::BUTTON4_DOUBLE_CLICKED
|
| ncurses::BUTTON4_DOUBLE_CLICKED
|
||||||
| ncurses::BUTTON4_TRIPLE_CLICKED => MouseButton::Button4,
|
| ncurses::BUTTON4_TRIPLE_CLICKED => MouseButton::Button4,
|
||||||
#[cfg(not(feature = "ncurses.mouse_v1"))]
|
|
||||||
ncurses::BUTTON5_RELEASED
|
ncurses::BUTTON5_RELEASED
|
||||||
| ncurses::BUTTON5_PRESSED
|
| ncurses::BUTTON5_PRESSED
|
||||||
| ncurses::BUTTON5_CLICKED
|
| ncurses::BUTTON5_CLICKED
|
||||||
@ -445,16 +444,14 @@ where
|
|||||||
match bare_event {
|
match bare_event {
|
||||||
ncurses::BUTTON1_RELEASED
|
ncurses::BUTTON1_RELEASED
|
||||||
| ncurses::BUTTON2_RELEASED
|
| ncurses::BUTTON2_RELEASED
|
||||||
| ncurses::BUTTON3_RELEASED
|
| ncurses::BUTTON3_RELEASED => f(MouseEvent::Release(button)),
|
||||||
| ncurses::BUTTON4_RELEASED => f(MouseEvent::Release(button)),
|
|
||||||
#[cfg(not(feature = "ncurses.mouse_v1"))]
|
|
||||||
ncurses::BUTTON5_RELEASED => f(MouseEvent::Release(button)),
|
|
||||||
ncurses::BUTTON1_PRESSED
|
ncurses::BUTTON1_PRESSED
|
||||||
| ncurses::BUTTON2_PRESSED
|
| ncurses::BUTTON2_PRESSED
|
||||||
| ncurses::BUTTON3_PRESSED => f(MouseEvent::Press(button)),
|
| ncurses::BUTTON3_PRESSED => f(MouseEvent::Press(button)),
|
||||||
ncurses::BUTTON4_PRESSED => f(MouseEvent::WheelUp),
|
ncurses::BUTTON4_PRESSED => f(MouseEvent::WheelUp),
|
||||||
#[cfg(not(feature = "ncurses.mouse_v1"))]
|
|
||||||
ncurses::BUTTON5_PRESSED => f(MouseEvent::WheelDown),
|
ncurses::BUTTON5_PRESSED => f(MouseEvent::WheelDown),
|
||||||
|
// BUTTON4_RELEASED? BUTTON5_RELEASED?
|
||||||
|
// Do they ever happen?
|
||||||
_ => debug!("Unknown event: {:032b}", bare_event),
|
_ => debug!("Unknown event: {:032b}", bare_event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user