Add viewport configuration support to the compositor

This commit is contained in:
meh 2015-10-14 17:38:29 +02:00
parent e4b02cc981
commit 123c19a57a
2 changed files with 39 additions and 4 deletions

View file

@ -51,6 +51,8 @@ pub enum WindowEvent {
InitializeCompositing,
/// Sent when the window is resized.
Resize(TypedSize2D<DevicePixel, u32>),
/// Sent when you want to override the viewport.
Viewport(TypedPoint2D<DevicePixel, u32>, TypedSize2D<DevicePixel, u32>),
/// Sent when a new URL is to be loaded.
LoadUrl(String),
/// Sent when a mouse hit test is to be performed.
@ -81,6 +83,7 @@ impl Debug for WindowEvent {
WindowEvent::Refresh => write!(f, "Refresh"),
WindowEvent::InitializeCompositing => write!(f, "InitializeCompositing"),
WindowEvent::Resize(..) => write!(f, "Resize"),
WindowEvent::Viewport(..) => write!(f, "Viewport"),
WindowEvent::KeyEvent(..) => write!(f, "Key"),
WindowEvent::LoadUrl(..) => write!(f, "LoadUrl"),
WindowEvent::MouseWindowEventClass(..) => write!(f, "Mouse"),