Crate embedder_traits

Source
Expand description

Types used by the embedding layer and/or exposed to the API. This crate is responsible for defining types that cross the process boundary from the embedding/rendering layer all the way to script, thus it should have very minimal dependencies on other parts of Servo. If a type is not exposed in the API or doesn’t involve messages sent to the embedding/libservo layer, it is probably a better fit for the constellation_traits crate.

Re-exports§

pub use crate::input_events::*;
pub use crate::webdriver::*;

Modules§

input_events
resources
user_content_manager
webdriver

Structs§

AuthenticationResponse
CompositorHitTestResult
The result of a hit test in the compositor.
DualRumbleEffectParams
https://w3.org/TR/gamepad/#dom-gamepadhapticeffecttype-dual-rumble
EmbedderProxy
Sends messages to the embedder.
FilterPattern
Filter for file selection; the String content is expected to be extension (e.g, “doc”, without the prefixing “.”)
FocusSequenceNumber
A sequence number generated by a script thread for its pipelines. The constellation attaches the target pipeline’s last seen FocusSequenceNumber to every focus-related message it sends.
Image
A raster image buffer.
JavaScriptEvaluationId
An identifier for a particular JavaScript evaluation that is used to track the evaluation from the embedding layer to the script layer and then back.
MediaMetadata
https://w3c.github.io/mediasession/#mediametadata
MediaPositionState
https://w3c.github.io/mediasession/#dictdef-mediapositionstate
Notification
Data that could be used to display a desktop notification to the end user when the Notification API is called.
NotificationAction
Actions available for users to choose from for interacting with the notification.
RgbColor
ScreenGeometry
Information about a WebView’s screen geometry and offset. This is used for the Screen CSSOM APIs and window.screenLeft / window.screenX / window.screenTop / window.screenY / window.moveBy/ window.resizeBy / window.outerWidth / window.outerHeight / window.screen.availHeight / window.screen.availWidth.
ScreenMetrics
Unlike ScreenGeometry, the data is in device-independent pixels to be used by DOM APIs
ScriptToEmbedderChan
A Script to Embedder Channel
SelectElementOption
TraversalId
An opaque identifier for a single history traversal operation.
UntrustedNodeAddress
The address of a node. Layout sends these back. They must be validated via from_untrusted_node_address before they can be used, because we do not trust layout.
ViewportDetails
Data about a WebView or <iframe> viewport: its size and also the HiDPI scale factor to use when rendering the contents.
WebResourceRequest
WebResourceResponse

Enums§

AlertResponse
AllowOrDeny
A response to a request to allow or deny an action.
AnimationState
For a given pipeline, whether any animations are currently running and any animation callbacks are queued
ConfirmResponse
ContextMenuResult
Cursor
A cursor for the window. This is different from a CSS cursor (see CursorKind) in that it has no Auto value.
EmbedderMsg
FormControl
GamepadHapticEffectType
https://w3.org/TR/gamepad/#dom-gamepadhapticeffecttype
InputMethodType
Used to specify the kind of input method editor appropriate to edit a field. This is a subset of htmlinputelement::InputType because some variants of InputType don’t make sense in this context.
JSValue
JavaScriptEvaluationError
LoadStatus
The status of the load in this WebView.
MediaSessionActionType
https://w3c.github.io/mediasession/#enumdef-mediasessionaction
MediaSessionEvent
Type of events sent from script to the embedder about the media session.
MediaSessionPlaybackState
https://w3c.github.io/mediasession/#enumdef-mediasessionplaybackstate
PermissionFeature
Enum with variants that match the DOM PermissionName enum
PixelFormat
PromptResponse
SelectElementOptionOrOptgroup
Represents the contents of either an <option> or an <optgroup> element
ShutdownState
Tracks whether Servo isn’t shutting down, is in the process of shutting down, or has finished shutting down.
SimpleDialog
Simple dialogs are synchronous dialogs that can be opened by web content. Since their messages are controlled by web content, they should be presented to the user in a way that makes them impossible to mistake for browser UI.
Theme
The type of platform theme.
TouchEventResult
Whether the default action for a touch event was prevented by web content
WebResourceResponseMsg

Traits§

EventLoopWaker