Enum compositing::windowing::EmbedderEvent

source ·
pub enum EmbedderEvent {
Show 37 variants Idle, Refresh, WindowResize, 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), 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),
}
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.

§

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.

§

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.

Trait Implementations§

source§

impl Clone for EmbedderEvent

source§

fn clone(&self) -> EmbedderEvent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for EmbedderEvent

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T