Skip to main content

Module icons

Module icons 

Source
Expand description

Icon loading.

Structs§

EmptyFrameListError
Error returned when attempting to create a FrameList from an empty vec.
FrameList
A non-empty list of icon frames for animation.
FramesData
Data for a frame-based animation. Fields are private; use accessor methods.
FreedesktopLoader
Loader for freedesktop.org icon themes (GTK / Linux).
LucideLoader
Loader for Lucide Icons (bundled SVG).
MaterialLoader
Loader for Google Material Symbols (bundled SVG).
RgbaData
Rasterized RGBA pixels whose buffer holds exactly width × height × 4 bytes.
SegoeFluentLoader
Loader for Windows Segoe Fluent Icons (Windows only).
SfSymbolsLoader
Loader for Apple SF Symbols (macOS only).
TransformData
Data for a transform-based animation. Fields are private; use accessor methods.

Enums§

AnimatedIcon
An animated icon, either frame-based or transform-based.
IconData
Icon data returned by loading functions.
IconId
Identifies what icon to load: a semantic role, a platform-specific name, or a custom provider.
IconRole
Semantic icon roles for cross-platform icon resolution.
IconSetChoice
The user’s icon set selection mode.
TransformAnimation
A CSS-like transform animation applied to a single icon.

Constants§

MAX_ICON_SIZE
The largest size, in pixels (points for an SF Symbol), that the system loaders (FreedesktopLoader::size, SfSymbolsLoader::size, SegoeFluentLoader::size), and through them load_custom_icon and load_custom_icon_in, and rasterize::rasterize_svg (feature svg-rasterize) load or draw an icon at: a larger size is taken as this one, and 0 as 1.

Traits§

IconProvider
Trait for types that map icon identifiers to platform-specific names and SVG data.

Functions§

colorize_monochrome_svg
Colour a monochrome SVG icon in its bytes.
default_icon_choice
Determine the default icon set choice for a theme.
fill_current_color
Fill a symbolic icon’s currentColor in with color, in its bytes.
icon_name
Look up the platform-specific icon identifier for a given icon set and role.
is_freedesktop_theme_available
Check whether a freedesktop icon theme is installed on this system.
list_freedesktop_themes
List installed freedesktop icon themes.
load_custom_icon
Load a custom icon from an IconProvider for a set known only at runtime, in color, at size.
load_custom_icon_in
load_custom_icon, with a freedesktop icon looked up in icon_theme (FreedesktopLoader::theme) where it is Some, the system’s icon theme where it is None. size is clamped to 1..=MAX_ICON_SIZE as there.
load_icon
Load an icon using the given set with default per-set options.
load_icon_indicator
Load the animated loading indicator for the given set.