Skip to main content

Crate inset_embedder

Crate inset_embedder 

Source
Expand description

Flutter’s dart:ui: host traits (Platform, View) and value types (Offset, Color, Canvas, Paint, Shadow).

The framework depends on this crate. This crate does not depend on the framework. Hosts implement Platform and View, and invoke EmbedderClient on the client the start closure returns. They do not name App.

Re-exports§

pub use valo;

Structs§

ApplicationSwitcherDescription
Specifies a description of the application that is pertinent to the embedder’s application switcher (also known as “recent tasks”) user interface.
AutofillConfiguration
A collection of autofill related information that represents an AutofillClient.
Backdrop
Backdrop filters the sampled scene before a save layer’s children paint.
Color
An immutable color value in ARGB format.
FontCollection
FontCollection owns registered faces and sources for resolving missing fonts.
FontDemand
FontDemand describes font requests that no registered face could satisfy.
FontFeature
A feature tag and value that affect the selection of glyphs in a font.
FontId
FontId identifies a registered font within a FaceSet or FontCollection.
FontVariation
An axis tag and value that can be used to customize variable fonts.
FontWeight
The thickness of the glyphs used to draw the text.
Frame
One complete engine frame delivered to the client.
GestureSettings
A null field indicates that the platform or view does not have a preference and the fallback constants should be used instead.
GlyphInfo
The measurements of a character (or a sequence of visually connected characters) within a paragraph.
Image
Image is a cheap-to-clone handle to an immutable GPU image.
ImageFrame
One decoded frame, prepared and ready to draw. Flutter dart:ui FrameInfo.
InertPlatform
Platform for hand-pumped tests.
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
KeyData
Information about a key event.
LineMetrics
LineMetrics stores the measurements and statistics of a single line in the paragraph.
Locale
An identifier used to select a user’s language and formatting preferences.
MaskBlur
MaskBlur applies a Gaussian blur to a draw’s coverage mask.
Matrix4
Matrix is a full 4×4 column-major transform.
Offset
An immutable 2D floating-point offset.
Paint
Paint describes how a drawing operation produces and composites pixels.
Paragraph
A paragraph of text.
ParagraphBuilder
Builds a Paragraph containing text with the given styling information.
ParagraphConstraints
Layout constraints for Paragraph objects.
ParagraphStyle
An opaque object that determines the configuration used by ParagraphBuilder to position lines within a Paragraph of text.
Path
Path is an immutable collection of line and Bézier contours.
PathBuilder
PathBuilder records commands used to create an immutable Path.
PointerData
Information about the state of a pointer.
PointerDataPacket
A sequence of reports about the state of pointers.
Quaternion
A rotation as a unit quaternion.
RRect
An immutable rounded rectangle with the custom radii for all four corners.
RSuperellipse
An immutable rounded superellipse.
Radius
A radius for either circular or elliptical shapes.
RawFloatingCursorPoint
The current state and position of the floating cursor.
Rect
An immutable, 2D, axis-aligned, floating-point rectangle whose coordinates are relative to a given origin.
RestorationUpdate
What the host answers when the framework asks for the restoration data it stored.
SceneBuilder
Builds a Scene containing the given visuals.
Shadow
A representation of a shadow.
Size
Holds a 2D floating-point size.
Stroke
Stroke describes the width, ends, joins, and optional dash pattern of a line.
SystemFontSource
The engine’s font manager: the platform’s installed fonts through a FontManager, and the two family names Flutter’s engine defines for the platform’s own user-interface font.
SystemUiOverlayStyle
Specifies a system overlay style for a portion of the app.
TextBox
A rectangle enclosing a run of text.
TextDecoration
A linear decoration to draw near the text.
TextEditingValue
The current text, selection, and composing state for editing a run of text.
TextHeightBehavior
Defines how to apply TextStyle.height over and under text.
TextInputConfiguration
Controls the visual appearance of the text input control.
TextInputType
The type of information for which to optimize the text input control.
TextPosition
A position in a string of text.
TextRange
A range of characters in a string of text.
TextSelection
A range of text that represents a selection.
TextStyle
An opaque object that determines the size, position, and rendering of text.
Typeface
Typeface is one face the platform matched: a font file, the face’s index in it, and how the platform names and styles that face.
Vector3
A three-dimensional vector.
ViewConstraints
Immutable layout constraints for a view (dart:ui ViewConstraints).
ViewFocusEvent
An event for the engine to communicate view focus changes to the app. Flutter counterpart: ViewFocusEvent in dart:ui/platform_dispatcher.dart.
ViewId
Opaque id for one View (FlutterView.viewId).
ViewMetrics
Per-view geometry the host reports (_ViewConfiguration fields we use).
ViewPadding
Physical padding on each side of a view (dart:ui ViewPadding).
WindowConfig
How a window is made. Sizes and positions are logical, in the host’s screen space with the origin at the top left of the primary screen.

Enums§

AppExitResponse
The possible responses to a request to exit the application.
AppLifecycleState
States that an application can be in once it is running.
BlendMode
BlendMode controls how source pixels combine with destination pixels.
BlurStyle
BlurStyle controls where blurred coverage appears relative to a shape.
BoxHeightStyle
Defines various ways to vertically bound the boxes returned by Paragraph::get_boxes_for_range.
BoxWidthStyle
Defines various ways to horizontally bound the boxes returned by Paragraph::get_boxes_for_range.
Brightness
Describes the contrast of a theme or color palette.
Clip
Different ways to clip content.
ClipOp
ClipOp controls how a clip shape changes the current clip.
ColorFilter
A description of a color filter to apply when drawing a shape or compositing a layer with a particular Paint. A color filter is a function that takes two colors, and outputs one color. When applied during compositing, it is independently applied to each pixel of the layer being drawn before the entire layer is merged with the destination.
ColorSpace
The color space describes the colors that are available to an Image.
FillRule
FillRule determines which regions of overlapping contours are filled.
FloatingCursorDragState
The state of a “floating cursor” drag on an iOS soft keyboard.
FontStyle
Whether to use the italic type variation of glyphs in the font.
HapticFeedbackType
The kind of haptic feedback to play.
ImageDecodeError
Why an image could not be read. Flutter reports these as an exception on the codec future.
ImageFilter
A filter operation to apply to a raster image.
ImageRepetition
How an animation repeats once it has played through.
KeyEventDeviceType
The source device for the key event.
KeyEventType
The type of a key event.
MatrixKind
MatrixKind classifies the behavior relevant to two-dimensional rendering.
PaintStyle
PaintStyle selects filled geometry or a stroked outline.
PlaceholderAlignment
Where to vertically align the placeholder relative to the surrounding text.
PointerChange
How the pointer has changed since the last report.
PointerDeviceKind
The kind of pointer device.
PointerSignalKind
The kind of pointer signal event.
PopupMenuEntry
One line of a popup menu the host shows with its own menu system.
RawWindowHandle
A window handle for a particular windowing system.
RestorationData
One value in the restoration data, of the kinds StandardMessageCodec can carry.
SmartDashesType
Indicates how to handle the intelligent replacement of dashes in text input.
SmartQuotesType
Indicates how to handle the intelligent replacement of quotes in text input.
SystemContextMenuItem
A button to show in the system-rendered context menu.
SystemMouseCursorKind
A system cursor kind (SystemMouseCursor.kind). The host maps each to its native cursor and shows the basic arrow for one it lacks; None hides the cursor.
TargetPlatform
The platform that user interaction should adapt to target.
TextAffinity
A way to disambiguate a TextPosition when its offset could match two different locations in the rendered string.
TextAlign
Whether and how to align text horizontally.
TextBaseline
A horizontal line used for aligning text.
TextCapitalization
Configures how the platform keyboard will select an uppercase or lowercase keyboard.
TextDecorationStyle
The style in which to draw a text decoration
TextDirection
A direction in which text flows.
TextInputAction
An action the user has requested the text input control to perform.
TextLeadingDistribution
How the leading of the text is distributed over and under the text.
ViewFocusDirection
Represents the direction in which focus transitioned across views.
ViewFocusState
Represents the focus state of a given view.
WindowBackground
What the window shows behind the app’s painting. Anything but Solid lets what is behind the window show where the app paints nothing.
WindowError
WindowLevel

Constants§

K_TEXT_HEIGHT_NONE
A TextStyle.height value that indicates the text span should take the height defined by the font, which may not be exactly the height of fontSize.

Traits§

CanvasText
Paragraph drawing on a Canvas (Dart’s Canvas.drawParagraph).
EmbedderClient
Complete frames and typed view lifecycle notifications.
FontManager
FontManager is the platform’s font lookup, in the shape of Skia’s SkFontMgr.
FontSource
FontSource locates fonts that are not already registered.
HostWindow
A window the host has on screen. Its view is what the framework draws into and receives input from, like the implicit view.
ImageCodec
One encoded image, opened and ready to give up its frames. Flutter dart:ui Codec.
Platform
The long-lived host object held by the application.
View
A stable handle to one host-provided view.
WindowingOwner
The host’s window maker. None from crate::Platform::windowing_owner where the implicit view is the only one there can be.

Functions§

clamp_double
Same as f64::clamp but maps NaN to max.
compose
Composes a matrix from translation, rotation and scale.
decompose
Decomposes matrix into its translation, rotation and scale components.
default_font_families
Flutter txt::GetDefaultFontFamilies(): the family names FontCollection::setDefaultFontManager looks up when a style leaves fontFamily unset.
flattened_ops
The picture’s operations in replay order with every embedded list’s following its embedding op, for a test or a diagnostic that asks what a scene draws regardless of how its layers nested it.
lerp_double
Linearly interpolate between two numbers, a and b, by an extrapolation factor t.
lerp_int
Linearly interpolate between two integers.
rrect_radii_elliptical
Per-corner elliptical radii in valo’s order (clockwise from top-left).
rsuperellipse_radii_elliptical
Per-corner elliptical radii in valo’s order (clockwise from top-left).
set_default_font_manager
Flutter skia::textlayout::FontCollection::setDefaultFontManager: register the default family’s faces as the collection’s fallback chain, then keep source for later lookups.
transform3
Transforms a point as a 3-vector, with no perspective division.

Type Aliases§

Canvas
Flutter Canvas — valo records into a display list.
EngineLayer
Flutter EngineLayer — the display list a layer’s subtree recorded when it was last added to a scene, which SceneBuilder::add_retained embeds again while nothing in it changed. The engine keeps a node of its layer tree; valo keeps a nested list.
ImageCodecFuture
A codec being opened. Flutter’s Future<ui.Codec>.
ImageFrameFuture
A frame being decoded. Flutter’s Future<ui.FrameInfo>.
Picture
Flutter Picture — a finished display list, what crate::View::present takes (Flutter FlutterView.render takes a Scene).
PlatformRef
RestorationMap
Flutter’s Map<Object?, Object?> of restoration data: insertion-ordered, keyed by value.
Scene
Flutter Scene — what SceneBuilder::build produces and crate::View::present takes.
ViewRef
WindowFuture
A window being made: the host finishes it on its own loop.
WindowRef