freya_core/
lib.rs

1pub mod accessibility;
2pub mod animation_clock;
3pub mod current_context;
4pub mod cursor;
5pub mod data;
6pub mod debug;
7pub mod diff_key;
8pub mod element;
9pub mod elements;
10pub mod event_handler;
11pub mod events;
12pub mod events_combos;
13pub mod extended_hashmap;
14pub mod fifo_cache;
15pub mod helpers;
16pub mod hooks;
17pub mod layers;
18pub mod lifecycle;
19pub mod lru_cache;
20pub mod node_id;
21pub mod notify;
22pub mod path_element;
23pub mod platform;
24pub mod reactive_context;
25pub mod render_pipeline;
26pub mod rendering_ticker;
27pub mod runner;
28pub mod scope;
29pub mod scope_id;
30pub mod style;
31pub mod text_cache;
32pub mod tree;
33pub mod tree_layout_adapter;
34pub mod user_event;
35
36/// Used by all end users.
37pub mod prelude {
38    pub use bytes::Bytes;
39    pub use cursor_icon::CursorIcon;
40    pub use keyboard_types::{
41        Code,
42        Key,
43        Modifiers,
44        NamedKey,
45    };
46
47    pub use crate::{
48        accessibility::{
49            focus::*,
50            focus_strategy::*,
51            focusable::*,
52            id::{
53                AccessibilityId,
54                AccessibilityRole,
55            },
56            screen_reader::*,
57        },
58        animation_clock::AnimationClock,
59        cursor::*,
60        data::*,
61        debug::*,
62        diff_key::DiffKey,
63        element::RenderContext,
64        element::{
65            App,
66            Component,
67            ComponentKey,
68            ComponentOwned,
69            Element,
70            IntoElement,
71        },
72        elements::{
73            extensions::*,
74            image::{
75                AspectRatio,
76                ImageCover,
77                // The image element is hidden on purpose as its a "low level" element, users should rather use the `ImageViewer` component.
78                SamplingMode,
79            },
80            label::{
81                Label,
82                TextWidth,
83                label,
84            },
85            paragraph::{
86                Paragraph,
87                ParagraphHolder,
88                Span,
89                paragraph,
90            },
91            rect::{
92                Rect,
93                rect,
94            },
95            svg::{
96                Svg,
97                SvgBytes,
98                svg,
99            },
100        },
101        event_handler::{
102            Callback,
103            EventHandler,
104            NoArgCallback,
105        },
106        events::data::*,
107        events::*,
108        events_combos::*,
109        hooks::previous_and_current::*,
110        hooks::use_id::*,
111        layers::Layer,
112        lifecycle::{
113            base::*,
114            context::*,
115            effect::*,
116            future_task::*,
117            memo::*,
118            reactive::*,
119            readable::*,
120            state::*,
121            task::*,
122            writable::*,
123        },
124        platform::*,
125        reactive_context::ReactiveContext,
126        rendering_ticker::RenderingTicker,
127        scope_id::ScopeId,
128        style::{
129            border::*,
130            color::*,
131            corner_radius::*,
132            cursor::*,
133            fill::*,
134            font_slant::*,
135            font_weight::*,
136            font_width::*,
137            gradient::*,
138            scale::*,
139            shadow::*,
140            text_align::*,
141            text_height::*,
142            text_overflow::*,
143            text_shadow::*,
144            vertical_align::*,
145        },
146        user_event::UserEvent,
147    };
148}
149
150/// Used by renderers such as freya-testing, freya-winit or just integration crates.
151pub mod integration {
152    pub use rustc_hash::*;
153
154    pub use crate::{
155        accessibility::{
156            dirty_nodes::*,
157            focus_strategy::*,
158            id::*,
159            screen_reader::*,
160            tree::*,
161        },
162        animation_clock::AnimationClock,
163        data::*,
164        element::*,
165        elements::extensions::*,
166        events::{
167            data::*,
168            executor::*,
169            measurer::*,
170            name::*,
171            platform::*,
172        },
173        lifecycle::state::State,
174        node_id::NodeId,
175        platform::*,
176        render_pipeline::RenderPipeline,
177        rendering_ticker::*,
178        runner::Runner,
179        scope_id::ScopeId,
180        style::default_fonts::default_fonts,
181        tree::{
182            DiffModifies,
183            Tree,
184        },
185        user_event::*,
186    };
187}