diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2015-08-14 07:24:50 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2015-10-22 10:37:03 -0700 |
commit | fe7460f34d20d5f17d21d60e1053028b21c63ebc (patch) | |
tree | 6cc401775f503ce01b528021cc87bc7580fc7140 /components/script_traits/lib.rs | |
parent | 4ed15a8853fc49d0940ed24d939fd0c407ee80a9 (diff) | |
download | servo-fe7460f34d20d5f17d21d60e1053028b21c63ebc.tar.gz servo-fe7460f34d20d5f17d21d60e1053028b21c63ebc.zip |
Dispatch touch events and perform default touch actions.
This is currently limited to simple single-touch actions. It does not include
momentum scrolling or pinch zooming.
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 3c04fa36dda..8aa32cdcaae 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -150,7 +150,7 @@ pub enum ConstellationControlMsg { } /// The mouse button involved in the event. -#[derive(Clone, Debug)] +#[derive(Clone, Copy, Debug)] pub enum MouseButton { /// The left mouse button. Left, @@ -172,6 +172,12 @@ pub enum CompositorEvent { MouseUpEvent(MouseButton, Point2D<f32>), /// The mouse was moved over a point. MouseMoveEvent(Point2D<f32>), + /// A touch began at a point. + TouchDownEvent(i32, Point2D<f32>), + /// A touch was moved over a point. + TouchMoveEvent(i32, Point2D<f32>), + /// A touch ended at a point. + TouchUpEvent(i32, Point2D<f32>), /// A key was pressed. KeyEvent(Key, KeyState, KeyModifiers), } |