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