diff options
author | Eduard Bopp <eduard.bopp@aepsil0n.de> | 2015-02-05 16:52:53 +0100 |
---|---|---|
committer | Eduard Bopp <eduard.bopp@aepsil0n.de> | 2015-02-05 16:52:53 +0100 |
commit | b2367fe2e6bded2c36d1b5e4f0dc595586b4bd08 (patch) | |
tree | fbd22f780f5251e2964bbdddd53cb95f6f8b1f5b /src/cocoa/mod.rs | |
parent | a3cd89c2dc6f23e86a56dacae9cbdf9e35ab1c20 (diff) | |
download | glutin-b2367fe2e6bded2c36d1b5e4f0dc595586b4bd08.tar.gz glutin-b2367fe2e6bded2c36d1b5e4f0dc595586b4bd08.zip |
Rename enum variants of MouseButton
With enums that are namespaced by default, it seems reasonable to be less
redundant in the variant naming here.
Diffstat (limited to 'src/cocoa/mod.rs')
-rw-r--r-- | src/cocoa/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cocoa/mod.rs b/src/cocoa/mod.rs index 2ff4ff9..1086a1b 100644 --- a/src/cocoa/mod.rs +++ b/src/cocoa/mod.rs @@ -29,7 +29,7 @@ use std::ascii::AsciiExt; use events::Event::{MouseInput, MouseMoved, ReceivedCharacter, KeyboardInput, MouseWheel}; use events::ElementState::{Pressed, Released}; -use events::MouseButton::{LeftMouseButton, RightMouseButton}; +use events::MouseButton; use events; pub use self::monitor::{MonitorID, get_available_monitors, get_primary_monitor}; @@ -433,10 +433,10 @@ impl Window { } match msg_send()(event, selector("type")) { - NSLeftMouseDown => { events.push_back(MouseInput(Pressed, LeftMouseButton)); }, - NSLeftMouseUp => { events.push_back(MouseInput(Released, LeftMouseButton)); }, - NSRightMouseDown => { events.push_back(MouseInput(Pressed, RightMouseButton)); }, - NSRightMouseUp => { events.push_back(MouseInput(Released, RightMouseButton)); }, + NSLeftMouseDown => { events.push_back(MouseInput(Pressed, MouseButton::Left)); }, + NSLeftMouseUp => { events.push_back(MouseInput(Released, MouseButton::Left)); }, + NSRightMouseDown => { events.push_back(MouseInput(Pressed, MouseButton::Right)); }, + NSRightMouseUp => { events.push_back(MouseInput(Released, MouseButton::Right)); }, NSMouseMoved => { let window_point: NSPoint = msg_send()(event, selector("locationInWindow")); // let window_point = event.locationInWindow(); |