mirror of
https://github.com/servo/servo.git
synced 2025-06-09 00:53:26 +00:00
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.
This commit is contained in:
parent
4ed15a8853
commit
fe7460f34d
9 changed files with 276 additions and 15 deletions
|
@ -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),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue