Skip to main content

gpui_material_foundation/
lib.rs

1//! Material presentation and adapters for GPUI and Base.
2#![warn(missing_docs)]
3#![deny(rustdoc::broken_intra_doc_links)]
4
5mod root;
6mod strings;
7mod surface;
8mod theme_scope;
9mod typography;
10
11pub use root::{
12    MaterialRoot, ReduceMotionPreference, appearance_from_window, material_theme,
13    observe_system_appearance, observe_window_system_appearance, project_base_theme,
14    set_material_theme, set_reduce_motion_preference, set_window_material_theme,
15    sync_system_reduce_motion, system_appearance, window_material_theme,
16};
17pub use strings::{material_strings, set_material_strings};
18pub use surface::{
19    Surface, SurfaceBorder, SurfaceFeedback, color, elevation_shadow_pair, elevation_shadows,
20    resolve_color_spec, resolve_edges, scrim_color,
21};
22pub use theme_scope::{
23    ThemeScope, current_base_theme, current_material_strings, current_material_theme,
24};
25#[doc(hidden)]
26pub use typography::font_cache_revision;
27pub use typography::{ShapedText, font_for_style, shape_text, text_style, wrapped_text};
28
29pub mod control_feedback;
30mod feedback;
31mod motion;
32mod shape;
33
34pub use feedback::{
35    FOCUS_RING_OUTER_OFFSET, FOCUS_RING_WIDTH, FocusRingPlacement, InteractionFeedback,
36    InteractionState, Ripple,
37};
38pub use gpui_material_theme::{AppearanceMode, MaterialShape, MaterialStrings};
39pub use motion::{
40    LoopClock, MotionSample, MotionStatus, OverlayMotion, RetargetTransition, ScaledOverlay,
41    animate, animate_with_status, is_bounds_visible, sanitize_overlay_scale,
42};
43pub use shape::{PolygonMorph, Shape, ShapeFit, ShapeMorph, ShapeMorphSequence, ShapePolygon};
44
45mod input;
46mod interaction;
47mod overlay;
48mod range;
49
50pub use input::{DragCapture, move_roving_focus};
51pub use interaction::{InteractionSource, InteractionTracker, InteractionUpdate};
52pub use overlay::{Scrim, isolated_scroll, logical_anchor};
53pub use range::{RangeThumb, range_semantics, value_label};
54pub use web_time::Instant;
55
56#[cfg(feature = "test-support")]
57pub mod test;