Introduce a MouseButton enum.

This commit is contained in:
Ms2ger 2015-04-02 17:52:12 +02:00
parent 85808c1cdd
commit 6b127a8df8
16 changed files with 57 additions and 20 deletions

View file

@ -13,6 +13,7 @@ use layers::geometry::DevicePixel;
use layers::platform::surface::NativeGraphicsMetadata;
use msg::compositor_msg::{PaintState, ReadyState};
use msg::constellation_msg::{Key, KeyState, KeyModifiers};
use script_traits::MouseButton;
use url::Url;
use util::cursor::Cursor;
use util::geometry::ScreenPx;
@ -21,9 +22,9 @@ use std::rc::Rc;
#[derive(Clone)]
pub enum MouseWindowEvent {
Click(uint, TypedPoint2D<DevicePixel, f32>),
MouseDown(uint, TypedPoint2D<DevicePixel, f32>),
MouseUp(uint, TypedPoint2D<DevicePixel, f32>),
Click(MouseButton, TypedPoint2D<DevicePixel, f32>),
MouseDown(MouseButton, TypedPoint2D<DevicePixel, f32>),
MouseUp(MouseButton, TypedPoint2D<DevicePixel, f32>),
}
#[derive(Clone)]