diff --git a/Cargo.toml b/Cargo.toml index fe39014..463e91c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dominator" -version = "0.5.2" +version = "0.5.3" authors = ["Pauan "] description = "Zero cost declarative DOM library using FRP signals" repository = "https://github.com/Pauan/rust-dominator" diff --git a/src/events.rs b/src/events.rs index f68e8d2..5d020b8 100644 --- a/src/events.rs +++ b/src/events.rs @@ -57,6 +57,9 @@ macro_rules! make_mouse_event { #[inline] pub fn shift_key(&self) -> bool { self.event.shift_key() } #[inline] pub fn alt_key(&self) -> bool { self.event.alt_key() } + #[inline] pub fn mouse_x(&self) -> i32 { self.event.client_x() } + #[inline] pub fn mouse_y(&self) -> i32 { self.event.client_y() } + pub fn button(&self) -> MouseButton { match self.event.button() { 0 => MouseButton::Left,