Enum embedder_traits::EmbedderMsg
source · pub enum EmbedderMsg {
Show 32 variants
Status(Option<String>),
ChangePageTitle(Option<String>),
MoveTo(DeviceIntPoint),
ResizeTo(DeviceIntSize),
Prompt(PromptDefinition, PromptOrigin),
ShowContextMenu(IpcSender<ContextMenuResult>, Option<String>, Vec<String>),
AllowNavigationRequest(PipelineId, ServoUrl),
AllowOpeningBrowser(IpcSender<bool>),
BrowserCreated(TopLevelBrowsingContextId),
AllowUnload(IpcSender<bool>),
Keyboard(KeyboardEvent),
GetClipboardContents(IpcSender<String>),
SetClipboardContents(String),
SetCursor(Cursor),
NewFavicon(ServoUrl),
HeadParsed,
HistoryChanged(Vec<ServoUrl>, usize),
SetFullscreenState(bool),
LoadStart,
LoadComplete,
CloseBrowser,
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,
}
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.
AllowOpeningBrowser(IpcSender<bool>)
Whether or not to allow script to open a new tab/browser
BrowserCreated(TopLevelBrowsingContextId)
A new browser was created by script
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
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
CloseBrowser
A browser is to be closed
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
Compositing done, but external code needs to present.