Enum compositing::windowing::WindowEvent
source · [−]pub enum WindowEvent {
Show 29 variants
Idle,
Refresh,
Resize,
AllowNavigationResponse(PipelineId, bool),
LoadUrl(TopLevelBrowsingContextId, ServoUrl),
MouseWindowEventClass(MouseWindowEvent),
MouseWindowMoveEventClass(DevicePoint),
Touch(TouchEventType, TouchId, DevicePoint),
Wheel(WheelDelta, DevicePoint),
Scroll(ScrollLocation, DeviceIntPoint, TouchEventType),
Zoom(f32),
PinchZoom(f32),
ResetZoom,
Navigation(TopLevelBrowsingContextId, TraversalDirection),
Quit,
ExitFullScreen(TopLevelBrowsingContextId),
Keyboard(KeyboardEvent),
Reload(TopLevelBrowsingContextId),
NewBrowser(ServoUrl, TopLevelBrowsingContextId),
CloseBrowser(TopLevelBrowsingContextId),
SendError(Option<TopLevelBrowsingContextId>, String),
SelectBrowser(TopLevelBrowsingContextId),
ToggleWebRenderDebug(WebRenderDebugOption),
CaptureWebRender,
ClearCache,
ToggleSamplingProfiler(Duration, Duration),
MediaSessionAction(MediaSessionActionType),
ChangeBrowserVisibility(TopLevelBrowsingContextId, bool),
IMEDismissed,
}
Expand description
Events that the windowing system sends to Servo.
Variants
Idle
Sent when no message has arrived, but the event loop was kicked for some reason (perhaps by another Servo subsystem).
FIXME(pcwalton): This is kind of ugly and may not work well with multiprocess Servo.
It’s possible that this should be something like
CompositorMessageWindowEvent(compositor_thread::Msg)
instead.
Refresh
Sent when part of the window is marked dirty and needs to be redrawn. Before sending this
message, the window must make the same GL context as in PrepareRenderingEvent
current.
Resize
Sent when the window is resized.
AllowNavigationResponse(PipelineId, bool)
Sent when a navigation request from script is allowed/refused.
LoadUrl(TopLevelBrowsingContextId, ServoUrl)
Sent when a new URL is to be loaded.
MouseWindowEventClass(MouseWindowEvent)
Sent when a mouse hit test is to be performed.
MouseWindowMoveEventClass(DevicePoint)
Sent when a mouse move.
Touch(TouchEventType, TouchId, DevicePoint)
Touch event: type, identifier, point
Wheel(WheelDelta, DevicePoint)
Sent when user moves the mouse wheel.
Scroll(ScrollLocation, DeviceIntPoint, TouchEventType)
Sent when the user scrolls. The first point is the delta and the second point is the origin.
Zoom(f32)
Sent when the user zooms.
PinchZoom(f32)
Simulated “pinch zoom” gesture for non-touch platforms (e.g. ctrl-scrollwheel).
ResetZoom
Sent when the user resets zoom to default.
Navigation(TopLevelBrowsingContextId, TraversalDirection)
Sent when the user uses chrome navigation (i.e. backspace or shift-backspace).
Quit
Sent when the user quits the application
ExitFullScreen(TopLevelBrowsingContextId)
Sent when the user exits from fullscreen mode
Keyboard(KeyboardEvent)
Sent when a key input state changes
Reload(TopLevelBrowsingContextId)
Sent when Ctr+R/Apple+R is called to reload the current page.
NewBrowser(ServoUrl, TopLevelBrowsingContextId)
Create a new top level browsing context
CloseBrowser(TopLevelBrowsingContextId)
Close a top level browsing context
SendError(Option<TopLevelBrowsingContextId>, String)
Panic a top level browsing context.
SelectBrowser(TopLevelBrowsingContextId)
Make a top level browsing context visible, hiding the previous visible one.
ToggleWebRenderDebug(WebRenderDebugOption)
Toggles a debug flag in WebRender
CaptureWebRender
Capture current WebRender
ClearCache
Clear the network cache.
ToggleSamplingProfiler(Duration, Duration)
Toggle sampling profiler with the given sampling rate and max duration.
MediaSessionAction(MediaSessionActionType)
Sent when the user triggers a media action through the UA exposed media UI (play, pause, seek, etc.).
ChangeBrowserVisibility(TopLevelBrowsingContextId, bool)
Set browser visibility. A hidden browser will not tick the animations.
IMEDismissed
Virtual keyboard was dismissed
Trait Implementations
sourceimpl Clone for WindowEvent
impl Clone for WindowEvent
sourcefn clone(&self) -> WindowEvent
fn clone(&self) -> WindowEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for WindowEvent
impl Send for WindowEvent
impl Sync for WindowEvent
impl Unpin for WindowEvent
impl UnwindSafe for WindowEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more