Expand description
§Slint Runtime Library
NOTE: This library is an internal crate of the Slint project.
This crate should not be used directly by applications using Slint.
You should use the slint
crate instead.
WARNING: This crate does not follow the semver convention for versioning and can
only be used with version = "=x.y.z"
in Cargo.toml.
Re-exports§
pub use context::with_global_context;
pub use context::SlintContext;
Modules§
- accessibility
- animations
- The animation system
- api
- This module contains types that are public and re-exported in the slint-rs as well as the slint-interpreter crate as public API.
- callbacks
- Callback that can be connected to one single handler.
- component_
factory - This module defines a
ComponentFactory
and related code. - context
- date_
time - future
- This module contains the code that runs futures
- graphics
- Graphics Abstractions.
- input
- Module handling mouse events
- item_
focus - This module contains the code moving the keyboard focus between items
- item_
rendering - module for rendering the tree of items
- item_
tree - This module contains the ItemTree and code that helps navigating it
- items
- This module contains the builtin items, either in this file or in sub-modules.
- layout
- Runtime support for layouts.
- lengths
- menus
- model
- Model and Repeater
- platform
- The backend is the abstraction for crates that need to do the actual drawing and event loop
- properties
- Property binding engine.
- renderer
- sharedvector
- module for the SharedVector and related things
- slice
- FFI-friendly slice
- string
- module for the SharedString and related things
- tests
- Functions useful for testing
- textlayout
- module for basic text layout
- timers
- Support for timers.
- translations
- window
- Exposed Window API
Macros§
- Item
TreeV Table_ static - Instantiate a static ItemTreeVTable for a given type and implements
vtable::HasStaticVTable<ItemTreeVTable>
for it. - ItemV
Table_ static - Instantiate a static ItemVTable for a given type and implements
vtable::HasStaticVTable<ItemVTable>
for it. - Item
VisitorV Table_ static - Instantiate a static ItemVisitorVTable for a given type and implements
vtable::HasStaticVTable<ItemVisitorVTable>
for it. - MenuV
Table_ static - Instantiate a static MenuVTable for a given type and implements
vtable::HasStaticVTable<MenuVTable>
for it. - Opaque
ImageV Table_ static - Instantiate a static OpaqueImageVTable for a given type and implements
vtable::HasStaticVTable<OpaqueImageVTable>
for it. - debug_
log - This macro allows producing debug output that will appear on stderr in regular builds and in the console log for wasm builds.
- declare_
item_ vtable - format
- This macro is the same as
std::format!
, but it returns aSharedString
instead.
Structs§
- Border
Radius - Top-left, top-right, bottom-right, and bottom-left border radius, optionally tagged with a unit.
- Callback
- A Callback that can be connected to a handler.
- Color
- Color represents a color in the Slint run-time, represented using 8-bit channels for
red, green, blue and the alpha (opacity).
It can be conveniently converted using the
to_
andfrom_
(a)rgb helper functions: - Internal
Token - This type is not exported from the public API crate, so function having this parameter cannot be called from the public API without naming it
- Property
- A Property that allow binding that track changes
- Rgba
Color - RgbaColor stores the red, green, blue and alpha components of a color
with the precision of the generic parameter T. For example if T is f32,
the values are normalized between 0 and 1. If T is u8, they values range
is 0 to 255.
This is merely a helper class for use with
Color
. - Shared
String - A string type used by the Slint run-time.
- Shared
Vector - SharedVector holds a reference-counted read-only copy of
[T]
. - Static
Textures - A texture is stored in read-only memory and may be composed of sub-textures.
Enums§
- Brush
- A brush is a data structure that is used to describe how a shape, such as a rectangle, path or even text, shall be filled. A brush can also be applied to the outline of a shape, that means the fill of the outline itself.
- Image
Inner - A resource is a reference to binary data, for example images. They can be accessible on the file system or embedded in the resulting binary. Or they might be URLs to a web server and a downloaded is necessary before they can be used. cbindgen:prefix-with-name
- Path
Data - PathData represents a path described by either high-level elements or low-level events and coordinates.