Implement home end key scroll.

This commit is contained in:
Sam 2016-11-08 18:00:43 +00:00
parent ca6376a714
commit 7e4255eb95
9 changed files with 118 additions and 47 deletions

View file

@ -16,6 +16,7 @@ use servo_geometry::ScreenPx;
use servo_url::ServoUrl;
use std::fmt::{Debug, Error, Formatter};
use style_traits::cursor::Cursor;
use webrender_traits::ScrollLocation;
#[derive(Clone)]
pub enum MouseWindowEvent {
@ -62,7 +63,7 @@ pub enum WindowEvent {
Touch(TouchEventType, TouchId, TypedPoint2D<f32, DevicePixel>),
/// Sent when the user scrolls. The first point is the delta and the second point is the
/// origin.
Scroll(TypedPoint2D<f32, DevicePixel>, TypedPoint2D<i32, DevicePixel>, TouchEventType),
Scroll(ScrollLocation, TypedPoint2D<i32, DevicePixel>, TouchEventType),
/// Sent when the user zooms.
Zoom(f32),
/// Simulated "pinch zoom" gesture for non-touch platforms (e.g. ctrl-scrollwheel).