Enum compositing::windowing::EmbedderEvent
source · pub enum EmbedderEvent {
Show 40 variants
Idle,
Refresh,
WindowResize,
ThemeChange(Theme),
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),
IMEComposition(CompositionEvent),
Reload(TopLevelBrowsingContextId),
NewWebView(ServoUrl, TopLevelBrowsingContextId),
CloseWebView(TopLevelBrowsingContextId),
SendError(Option<TopLevelBrowsingContextId>, String),
MoveResizeWebView(TopLevelBrowsingContextId, DeviceRect),
ShowWebView(TopLevelBrowsingContextId, bool),
HideWebView(TopLevelBrowsingContextId),
RaiseWebViewToTop(TopLevelBrowsingContextId, bool),
FocusWebView(TopLevelBrowsingContextId),
BlurWebView,
ToggleWebRenderDebug(WebRenderDebugOption),
CaptureWebRender,
ClearCache,
ToggleSamplingProfiler(Duration, Duration),
MediaSessionAction(MediaSessionActionType),
SetWebViewThrottled(TopLevelBrowsingContextId, bool),
IMEDismissed,
InvalidateNativeSurface,
ReplaceNativeSurface(*mut c_void, DeviceIntSize),
Gamepad(GamepadEvent),
Vsync,
}
Expand description
Events that the embedder sends to Servo, including events from the windowing system.
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.
WindowResize
Sent when the window is resized.
ThemeChange(Theme)
Sent when the platform theme changes.
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.
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
IMEComposition(CompositionEvent)
Sent for IME composition updates
Reload(TopLevelBrowsingContextId)
Sent when Ctr+R/Apple+R is called to reload the current page.
NewWebView(ServoUrl, TopLevelBrowsingContextId)
Create a new top-level browsing context.
CloseWebView(TopLevelBrowsingContextId)
Close a top-level browsing context.
SendError(Option<TopLevelBrowsingContextId>, String)
Panic a top-level browsing context.
MoveResizeWebView(TopLevelBrowsingContextId, DeviceRect)
Move and/or resize a webview to the given rect.
ShowWebView(TopLevelBrowsingContextId, bool)
Start painting a webview, and optionally stop painting all others.
HideWebView(TopLevelBrowsingContextId)
Stop painting a webview.
RaiseWebViewToTop(TopLevelBrowsingContextId, bool)
Start painting a webview on top of all others, and optionally stop painting all others.
FocusWebView(TopLevelBrowsingContextId)
Make a webview focused.
BlurWebView
Make none of the webviews focused.
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.).
SetWebViewThrottled(TopLevelBrowsingContextId, bool)
Set whether to use less resources, by stopping animations and running timers at a heavily limited rate.
IMEDismissed
Virtual keyboard was dismissed
InvalidateNativeSurface
Sent on platforms like Android where the native widget surface can be automatically destroyed by the system, for example when the app is sent to background.
ReplaceNativeSurface(*mut c_void, DeviceIntSize)
Sent on platforms like Android where system recreates a new surface for the native widget when it is brough back to foreground. This event carries the pointer to the native widget and its new size.
Gamepad(GamepadEvent)
Sent when new Gamepad information is available.
Vsync
Vertical Synchronization tick
Trait Implementations§
source§impl Clone for EmbedderEvent
impl Clone for EmbedderEvent
source§fn clone(&self) -> EmbedderEvent
fn clone(&self) -> EmbedderEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for EmbedderEvent
impl RefUnwindSafe for EmbedderEvent
impl !Send for EmbedderEvent
impl !Sync for EmbedderEvent
impl Unpin for EmbedderEvent
impl UnwindSafe for EmbedderEvent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more