Enum embedder_traits::EmbedderMsg

source ·
pub enum EmbedderMsg {
Show 37 variants Status(Option<String>), ChangePageTitle(Option<String>), MoveTo(DeviceIntPoint), ResizeTo(DeviceIntSize), Prompt(PromptDefinition, PromptOrigin), ShowContextMenu(IpcSender<ContextMenuResult>, Option<String>, Vec<String>), AllowNavigationRequest(PipelineId, ServoUrl), AllowOpeningWebView(IpcSender<bool>), WebViewOpened(TopLevelBrowsingContextId), WebViewClosed(TopLevelBrowsingContextId), WebViewFocused(TopLevelBrowsingContextId), WebViewBlurred, AllowUnload(IpcSender<bool>), Keyboard(KeyboardEvent), GetClipboardContents(IpcSender<String>), SetClipboardContents(String), SetCursor(Cursor), NewFavicon(ServoUrl), HeadParsed, HistoryChanged(Vec<ServoUrl>, usize), SetFullscreenState(bool), LoadStart, LoadComplete, Panic(String, Option<String>), GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>), SelectFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>), PromptPermission(PermissionPrompt, IpcSender<PermissionRequest>), ShowIME(InputMethodType, Option<(String, i32)>, bool, DeviceIntRect), HideIME, Shutdown, ReportProfile(Vec<u8>), MediaSessionEvent(MediaSessionEvent), OnDevtoolsStarted(Result<u16, ()>, String), ReadyToPresent(Vec<WebViewId>), EventDelivered(CompositorEventVariant), PlayGamepadHapticEffect(usize, GamepadHapticEffectType, IpcSender<bool>), StopGamepadHapticEffect(usize, IpcSender<bool>),
}

Variants§

§

Status(Option<String>)

A status message to be displayed by the browser chrome.

§

ChangePageTitle(Option<String>)

Alerts the embedder that the current page has changed its title.

§

MoveTo(DeviceIntPoint)

Move the window to a point

§

ResizeTo(DeviceIntSize)

Resize the window to size

§

Prompt(PromptDefinition, PromptOrigin)

Show dialog to user

§

ShowContextMenu(IpcSender<ContextMenuResult>, Option<String>, Vec<String>)

Show a context menu to the user

§

AllowNavigationRequest(PipelineId, ServoUrl)

Whether or not to allow a pipeline to load a url.

§

AllowOpeningWebView(IpcSender<bool>)

Whether or not to allow script to open a new tab/browser

§

WebViewOpened(TopLevelBrowsingContextId)

A webview was created.

§

WebViewClosed(TopLevelBrowsingContextId)

A webview was destroyed.

§

WebViewFocused(TopLevelBrowsingContextId)

A webview gained focus for keyboard events.

§

WebViewBlurred

All webviews lost focus for keyboard events.

§

AllowUnload(IpcSender<bool>)

Wether or not to unload a document

§

Keyboard(KeyboardEvent)

Sends an unconsumed key event back to the embedder.

§

GetClipboardContents(IpcSender<String>)

Gets system clipboard contents

§

SetClipboardContents(String)

Sets system clipboard contents

§

SetCursor(Cursor)

Changes the cursor.

§

NewFavicon(ServoUrl)

A favicon was detected

§

HeadParsed

<head> tag finished parsing

§

HistoryChanged(Vec<ServoUrl>, usize)

The history state has changed.

§

SetFullscreenState(bool)

Enter or exit fullscreen

§

LoadStart

The load of a page has begun

§

LoadComplete

The load of a page has completed

§

Panic(String, Option<String>)

A pipeline panicked. First string is the reason, second one is the backtrace.

§

GetSelectedBluetoothDevice(Vec<String>, IpcSender<Option<String>>)

Open dialog to select bluetooth device.

§

SelectFiles(Vec<FilterPattern>, bool, IpcSender<Option<Vec<String>>>)

Open file dialog to select files. Set boolean flag to true allows to select multiple files.

§

PromptPermission(PermissionPrompt, IpcSender<PermissionRequest>)

Open interface to request permission specified by prompt.

§

ShowIME(InputMethodType, Option<(String, i32)>, bool, DeviceIntRect)

Request to present an IME to the user when an editable element is focused. If the input is text, the second parameter defines the pre-existing string text content and the zero-based index into the string locating the insertion point. bool is true for multi-line and false otherwise.

§

HideIME

Request to hide the IME when the editable element is blurred.

§

Shutdown

Servo has shut down

§

ReportProfile(Vec<u8>)

Report a complete sampled profile

§

MediaSessionEvent(MediaSessionEvent)

Notifies the embedder about media session events (i.e. when there is metadata for the active media session, playback state changes…).

§

OnDevtoolsStarted(Result<u16, ()>, String)

Report the status of Devtools Server with a token that can be used to bypass the permission prompt.

§

ReadyToPresent(Vec<WebViewId>)

Notify the embedder that it needs to present a new frame.

§

EventDelivered(CompositorEventVariant)

The given event was delivered to a pipeline in the given browser.

§

PlayGamepadHapticEffect(usize, GamepadHapticEffectType, IpcSender<bool>)

Request to play a haptic effect on a connected gamepad.

§

StopGamepadHapticEffect(usize, IpcSender<bool>)

Request to stop a haptic effect on a connected gamepad.

Trait Implementations§

source§

impl Debug for EmbedderMsg

source§

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

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for EmbedderMsg

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for EmbedderMsg

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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

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

source§

type Output = T

Should always be Self
source§

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

source§

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>,

source§

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<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

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

source§

impl<T> MaybeSendSync for T