1#![no_std]
2
3#[cfg(feature = "std")]
4extern crate std;
5
6pub mod block;
7pub mod completion;
8pub mod context;
9pub mod display_backend;
10#[cfg(feature = "embassy")]
11pub mod embassy;
12pub mod font;
13pub mod framebuffer;
14pub mod geometry;
15pub mod haptics;
16pub mod image;
17pub mod input;
18#[cfg(any(
19 feature = "embedded-text",
20 feature = "embedded-layout",
21 feature = "embedded-3dgfx"
22))]
23pub mod interop;
24pub mod layout;
25mod math;
26pub mod motion;
27pub mod palette;
28pub use motion as animation;
29pub use motion as animation_timeline;
30pub use motion as animation_timing;
31pub use motion as cinematic;
32pub use motion as screen_transition;
33pub use motion as transition_preset;
34pub use motion as widget_animation;
35pub mod present;
36pub mod render;
37pub mod screen;
38pub mod state;
39pub mod style;
40pub mod swapchain;
41#[cfg(feature = "std")]
42pub mod test_buffer;
43pub mod text;
44pub mod visual_widgets;
45pub mod widget;
46pub mod widgets;
47
48pub use haptics::{HapticPattern, HapticSequencer};
49
50pub use visual_widgets::{BusyWheel, GaugeWidget};
51#[cfg(feature = "embedded-dsp")]
52pub use visual_widgets::{SpectrumAnalyzerWidget, TouchInputFilter};
53
54pub use animation::{
55 Animation, AnimationError, AnimationHandlers, AnimationId, AnimationManager,
56 AnimationManagerCallbacks, AnimationState, Easing, InertiaAnimator, PathAnimator, PathPoint,
57 RepeatMode, SpringAnimator, Timer, Tween, apply_easing,
58};
59pub use animation_timeline::{
60 AnimationGroup, AnimationSequence, ComposedAnimation, ComposedAnimationCallbacks,
61 ComposedAnimationPlayer, ComposedAnimationStatus, CompositionControls, CompositionMode,
62 Keyframe, KeyframeTrack, KeyframeTrackCallbacks, SequencePlayer, SequencePlayerStatus,
63 SequenceRepeatMode, TimelineError, TimelineStep,
64};
65pub use animation_timing::{
66 DEFAULT_DURATION_MS, FRAME_INTERVAL_MS, MOOOK_DURATION_MS, NORMALIZED_MAX,
67 PORT_HOLE_DURATION_MS, SHUTTER_DURATION_MS, interpolate_moook, moook_curve, moook_duration_ms,
68 timing_half_phase, timing_scaled, timing_shutter_phase,
69};
70pub use block::Block;
71pub use cinematic::{
72 CardDeckDirection, CardDeckState, CardStory, CardStoryTransition, CinematicPreset,
73 GlanceTileSpec, MotionTokens, PeekRevealSpec, TimelineMotionPreset, animate_glance_focus,
74 animate_peek_reveal, apply_carddeck_visibility, setup_card_story, setup_launcher_glance,
75 setup_launcher_glance_with_tokens, setup_peek_timeline, setup_peek_timeline_with_tokens,
76};
77pub use completion::{CompletionSlot, WaitTransfer, WaitTransferFuture};
78pub use context::{
79 GuiContext, GuiError, KeyBindingAction, PressTiming, WidgetBuilder, WidgetKeyBindings,
80 WidgetKeyInputPolicy,
81};
82pub use display_backend::{
83 AsyncDmaTransfer, DisplayBackend, DisplayError, DisplayRegion, DmaTransfer, SimulatorBackend,
84 TransferError,
85};
86#[cfg(feature = "embassy")]
87pub use embassy::{EmbassyWaitTransfer, EmbassyWaitTransferFuture, FrameClock};
88pub use embedded_graphics_framebuf::{
89 FrameBuf,
90 backends::{DMACapableFrameBufferBackend, EndianCorrectedBuffer, EndianCorrection},
91};
92pub use font::{BitmapFont, Font, FontId, PackedFont};
93pub use framebuffer::{Framebuffer, FramebufferGray8, FramebufferRgba8888, Rgba8888};
94pub use geometry::{DirtyTracker, EdgeInsets, Rect};
95#[cfg(all(feature = "std", feature = "image-decode"))]
96pub use image::{
97 BasicImageDecoder, EncodedImageFormat, ImageDecodeError, ImageDecoder, decode_image_auto,
98 decode_image_with, decode_ppm_ascii,
99};
100pub use image::{
101 ImageAtlas, ImageAtlasEntry, ImageFit, ImageRef, ReelFrame, ReelPlayer, SpriteSheet, TileMode,
102 TileRef,
103};
104pub use input::{
105 EventPhaseMask, InputEvent, PointerButton, PointerState, UiEvent, UiEventFilter,
106 WidgetDispatchPolicy, WidgetEvent, WidgetEventFilter, WidgetEventKind,
107};
108pub use layout::{Align, Axis, Constraint, LayoutItem, Length, LinearLayout};
109pub use palette::{DisplayMode, DisplayPalette, InkRole, RoleColors};
110pub use present::PresentRegion;
111pub use render::{
112 AntiAliasMode, Blend, BlendMode, CHAR_HEIGHT, CHAR_WIDTH, ColorFormat, Compositor, Dither,
113 EllipsisMode, LayerState, PixelRead, RenderBackendCaps, RenderCtx, RenderQuality, StrokeCap,
114 StrokeJoin, StrokeStyle, TextAlign, TextMetrics, TextOverflow, TextOverflowPolicy, TextStyle,
115 TextWrap, Transform2D, VerticalAlign,
116};
117pub use screen::{
118 Screen, ScreenCommand, ScreenId, ScreenLifecycleEvent, ScreenStack, ScreenStackError,
119 ScreenTransition,
120};
121pub use screen_transition::{
122 ActiveScreenTransition, ScreenTransitionEffect, ScreenTransitionOrigin, ScreenTransitionRunner,
123 ScreenTransitionSample, ScreenTransitionSpec, composite_framebuffer_fade,
124 fade_outgoing_opacity, render_transition_pair,
125};
126pub use state::{FeedTimelineState, ListState, ScrollState, SliderState, TabsState};
127pub use style::{
128 AlphaLinearGradient, AlphaRadialGradient, Border, GradientDirection, LinearGradient, Shadow,
129 StateStyle, Style, StyleTransition, Theme, VisualState, WidgetStyle, lerp_style,
130};
131pub use swapchain::{StandardSwapChain, SwapChain};
132#[cfg(feature = "triple-buffering")]
133pub use swapchain::{StandardTripleSwapChain, TripleSwapChain};
134#[cfg(feature = "std")]
135pub use test_buffer::{LayerCanvas, TestBuffer};
136pub use text::{
137 BasicTextShaper, Line, ShapedGlyph, ShapingConfig, Span, Text, TextDirection, TextShaper,
138};
139pub use transition_preset::TransitionPreset;
140pub use widget::{
141 EventContext, EventPhase, EventPolicy, FocusGroupId, MenuContract, PropertyError, PropertyKey,
142 PropertyValue, StatefulWidget, StyleClassId, Widget, WidgetFlags, WidgetId,
143};
144pub use widget_animation::presets;
145pub use widget_animation::{
146 AnimatedProperty, AnimationConflictPolicy, BindingSnapshot, WidgetAnimationCallbacks,
147 WidgetAnimationError, WidgetAnimator, WidgetKeyframeState, WidgetPropertyKeyframe,
148};
149pub use widgets::{
150 ChartMode, KeyboardLayout, NotificationLevel, SurfaceState, WidgetKind, WidgetNode,
151};
152
153pub mod prelude {
154 pub use crate::{
155 ActiveScreenTransition, Align, AlphaLinearGradient, AlphaRadialGradient, AnimatedProperty,
156 Animation, AnimationConflictPolicy, AnimationError, AnimationGroup, AnimationHandlers,
157 AnimationId, AnimationManager, AnimationManagerCallbacks, AnimationSequence,
158 AnimationState, AntiAliasMode, Axis, BasicTextShaper, BindingSnapshot, BitmapFont, Blend,
159 BlendMode, Block, Border, CardDeckDirection, CardDeckState, CardStory, CardStoryTransition,
160 ChartMode, CinematicPreset, ColorFormat, ComposedAnimation, ComposedAnimationCallbacks,
161 ComposedAnimationPlayer, ComposedAnimationStatus, CompositionControls, CompositionMode,
162 Compositor, Constraint, DirtyTracker, Dither, Easing, EdgeInsets, EllipsisMode,
163 EventContext, EventPhase, EventPhaseMask, EventPolicy, FeedTimelineState, FocusGroupId,
164 Font, FontId, Framebuffer, FramebufferGray8, FramebufferRgba8888, GlanceTileSpec,
165 GradientDirection, GuiContext, GuiError, HapticPattern, HapticSequencer, ImageAtlas,
166 ImageAtlasEntry, ImageFit, ImageRef, InertiaAnimator, InputEvent, KeyBindingAction,
167 KeyboardLayout, Keyframe, KeyframeTrack, KeyframeTrackCallbacks, LayerState, LayoutItem,
168 Length, Line, LinearGradient, LinearLayout, ListState, MenuContract, MotionTokens,
169 NotificationLevel, PackedFont, PathAnimator, PathPoint, PeekRevealSpec, PixelRead,
170 PointerButton, PointerState, PresentRegion, PressTiming, Rect, ReelFrame, ReelPlayer,
171 RenderBackendCaps, RenderCtx, RenderQuality, RepeatMode, Rgba8888, Screen, ScreenCommand,
172 ScreenId, ScreenLifecycleEvent, ScreenStack, ScreenStackError, ScreenTransition,
173 ScreenTransitionEffect, ScreenTransitionOrigin, ScreenTransitionRunner,
174 ScreenTransitionSample, ScreenTransitionSpec, ScrollState, SequencePlayer,
175 SequencePlayerStatus, SequenceRepeatMode, Shadow, ShapedGlyph, ShapingConfig, SliderState,
176 Span, SpringAnimator, SpriteSheet, StateStyle, StatefulWidget, StrokeCap, StrokeJoin,
177 StrokeStyle, Style, StyleClassId, StyleTransition, SurfaceState, TabsState, Text,
178 TextAlign, TextDirection, TextMetrics, TextOverflow, TextOverflowPolicy, TextShaper,
179 TextStyle, TextWrap, Theme, TileMode, TileRef, TimelineError, TimelineMotionPreset,
180 TimelineStep, Timer, Transform2D, TransitionPreset, Tween, UiEvent, UiEventFilter,
181 VerticalAlign, VisualState, WidgetAnimationCallbacks, WidgetAnimationError, WidgetAnimator,
182 WidgetDispatchPolicy, WidgetEvent, WidgetEventFilter, WidgetEventKind, WidgetFlags,
183 WidgetId, WidgetKeyBindings, WidgetKeyInputPolicy, WidgetKeyframeState, WidgetKind,
184 WidgetNode, WidgetPropertyKeyframe, WidgetStyle, animate_glance_focus, animate_peek_reveal,
185 apply_carddeck_visibility, apply_easing, lerp_style, presets, render_transition_pair,
186 setup_card_story, setup_launcher_glance, setup_launcher_glance_with_tokens,
187 setup_peek_timeline, setup_peek_timeline_with_tokens,
188 };
189
190 #[cfg(all(feature = "std", feature = "image-decode"))]
191 pub use crate::{
192 BasicImageDecoder, EncodedImageFormat, ImageDecodeError, ImageDecoder, LayerCanvas,
193 TestBuffer, decode_image_auto, decode_image_with, decode_ppm_ascii,
194 };
195
196 #[cfg(all(feature = "std", not(feature = "image-decode")))]
197 pub use crate::{LayerCanvas, TestBuffer};
198}