Skip to main content

frus_core/
lib.rs

1//! `frus-core` — the fundamental types shared by the whole framework.
2//!
3//! This crate holds **no logic**: only data types (geometry, colour) with no
4//! dependency on rendering or on any platform. It is the common foundation for
5//! `frus-gpu`, `frus-layout` and the rest, which keeps those layers from
6//! duplicating types or coupling to one another.
7
8#![deny(missing_docs)]
9
10// The README's example is compiled and run by `cargo test --doc`, so it cannot rot.
11#[cfg(doctest)]
12#[doc = include_str!("../README.md")]
13pub struct ReadmeDoctests;
14
15pub mod animation;
16mod color;
17mod colors;
18mod decoration;
19mod filter;
20mod geometry;
21mod hct;
22mod image;
23mod path;
24mod responsive;
25mod scene;
26mod semantics;
27mod shape;
28mod text_style;
29
30pub use animation::{
31    Animatable, Animation, AnimationController, BouncingScrollSimulation, ClampedSimulation,
32    ClampingScrollSimulation, Curve, Curved, FrictionSimulation, Lerp, PolynomialFit, Simulation,
33    SpringDescription, SpringSimulation, Status, Tolerance, Tween, TweenSequence, Velocity,
34    VelocityEstimate, VelocityStrategy, VelocityTracker, BOUNCING_DRAG, BOUNCING_FLING_WEIGHTS,
35    CLAMPING_FRICTION, DESKTOP_FLING_WEIGHTS, MAX_SPRING_TRANSFER_VELOCITY,
36};
37pub use color::{surface_tint_opacity, Color};
38pub use colors::{Colors, MaterialColor};
39pub use decoration::{
40    Border, BorderRadius, BorderRadiusDirectional, BoxDecoration, BoxShadow, LinearGradient,
41};
42pub use filter::{
43    Backdrop, BlendMode, ColorFilter, FractionalMask, ImageFilter, LayerFilter, MaskShader,
44    ShaderMask,
45};
46pub use geometry::{
47    fits, Affine, Alignment, AlignmentDirectional, AlignmentGeometry, Insets, InsetsDirectional,
48    Point, Rect, Size, TextDirection, WindowInsets,
49};
50pub use hct::{Hct, TonalPalette};
51pub use image::{
52    cached, fetched, forget_cached_images, forget_fetched_images, image_cache_budget,
53    image_cache_bytes, images_in_flight, set_image_cache_budget, set_image_fetcher, BoxFit,
54    Fetched, ImageData, ImageFetcher, ImageHandle, DEFAULT_IMAGE_CACHE_BYTES,
55};
56pub use path::{Path, PathVerb, Stroke};
57pub use responsive::{Orientation, SizeClass};
58pub use scene::{ClipShape, LayerTransform, PathGradient, Primitive, Scene, TextBlock};
59pub use semantics::{Role, SemanticsProperties, Toggled};
60pub use shape::{BorderSide, ShapeBorder};
61pub use text_style::{
62    install_text_scale, text_scale, with_text_scale, FontFamily, FontWeight, ResolvedTextStyle,
63    TextAlign, TextDecoration, TextOverflow, TextRun, TextScaleGuard, TextSpan, TextStyle,
64    DEFAULT_LINE_HEIGHT, DEFAULT_TEXT_SIZE,
65};