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 decoration_image;
20mod device;
21mod filter;
22mod geometry;
23mod gradient;
24mod hct;
25mod image;
26mod path;
27mod platform;
28mod responsive;
29mod scene;
30mod semantics;
31mod shape;
32mod text_style;
33
34pub use animation::{
35    Animatable, Animation, AnimationController, BouncingScrollSimulation, ClampedSimulation,
36    ClampingScrollSimulation, Curve, Curved, FrictionSimulation, Lerp, PolynomialFit, Simulation,
37    SpringDescription, SpringSimulation, Status, Tolerance, Tween, TweenSequence, Velocity,
38    VelocityEstimate, VelocityStrategy, VelocityTracker, BOUNCING_DRAG, BOUNCING_FLING_WEIGHTS,
39    CLAMPING_FRICTION, DESKTOP_FLING_WEIGHTS, MAX_SPRING_TRANSFER_VELOCITY,
40};
41pub use color::{surface_tint_opacity, Color};
42pub use colors::{Colors, MaterialColor};
43pub use decoration::{
44    paint_elevation, Border, BorderDirectional, BorderRadius, BorderRadiusDirectional, BoxBorder,
45    BoxDecoration, BoxShadow, BoxShape,
46};
47pub use decoration_image::{
48    apply_box_fit, DecorationImage, FittedSizes, ImagePiece, ImageRepeat, MAX_IMAGE_TILES,
49};
50pub use device::{ButtonEdge, Cutout, DeviceFrame, DeviceInsets, DeviceProfile, SideButton};
51pub use filter::{
52    Backdrop, BlendMode, ColorFilter, FractionalMask, ImageFilter, LayerFilter, MaskShader,
53    ShaderMask,
54};
55pub use geometry::{
56    fits, Affine, Alignment, AlignmentDirectional, AlignmentGeometry, Insets, InsetsDirectional,
57    InsetsGeometry, Point, Rect, Size, TextDirection, WindowInsets,
58};
59pub use gradient::{tile, Gradient, LinearGradient, RadialGradient, SweepGradient, TileMode};
60pub use hct::{Hct, TonalPalette};
61pub use image::{
62    cached, cached_at, decoded_at, fetched, fetched_at, forget_cached_images,
63    forget_fetched_images, image_cache_budget, image_cache_bytes, image_fetcher, images_in_flight,
64    set_image_cache_budget, set_image_fetcher, trim_image_caches, BoxFit, DecodeSize, Fetched,
65    ImageData, ImageFetcher, ImageHandle, DEFAULT_IMAGE_CACHE_BYTES,
66};
67pub use path::{FillRule, Path, PathVerb, Stroke, StrokeCap};
68pub use platform::{
69    __set_detected_target_platform, debug_default_target_platform_override,
70    default_target_platform, set_debug_default_target_platform_override, Platform, TargetPlatform,
71    IS_WEB,
72};
73pub use responsive::{Orientation, SizeClass};
74pub use scene::{
75    BlurStyle, ClipShape, GradientRamp, LayerTransform, PathGradient, Primitive, RampShape, Scene,
76    TextBlock,
77};
78pub use semantics::{Role, SemanticsProperties, Toggled};
79pub use shape::{BorderSide, ShapeBorder};
80pub use text_style::{
81    install_text_scale, text_scale, with_text_scale, FontFamily, FontWeight, ResolvedTextStyle,
82    TextAlign, TextDecoration, TextOverflow, TextRun, TextScaleGuard, TextSpan, TextStyle,
83    DEFAULT_LINE_HEIGHT, DEFAULT_TEXT_SIZE,
84};