Add keyboard shortcuts to glutin browser

This commit is contained in:
Jesse Ruderman 2015-06-27 03:06:18 -07:00
parent 8892f8175d
commit 1ff4fe02d9
4 changed files with 90 additions and 15 deletions

View file

@ -64,6 +64,8 @@ pub enum WindowEvent {
Zoom(f32),
/// Simulated "pinch zoom" gesture for non-touch platforms (e.g. ctrl-scrollwheel).
PinchZoom(f32),
/// Sent when the user resets zoom to default.
ResetZoom,
/// Sent when the user uses chrome navigation (i.e. backspace or shift-backspace).
Navigation(WindowNavigateMsg),
/// Sent when the user quits the application
@ -86,6 +88,7 @@ impl Debug for WindowEvent {
WindowEvent::Scroll(..) => write!(f, "Scroll"),
WindowEvent::Zoom(..) => write!(f, "Zoom"),
WindowEvent::PinchZoom(..) => write!(f, "PinchZoom"),
WindowEvent::ResetZoom => write!(f, "ResetZoom"),
WindowEvent::Navigation(..) => write!(f, "Navigation"),
WindowEvent::Quit => write!(f, "Quit"),
}