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                svg,
98            },
99        },
100        event_handler::{
101            Callback,
102            EventHandler,
103            NoArgCallback,
104        },
105        events::data::*,
106        events::*,
107        events_combos::*,
108        hooks::use_id::*,
109        layers::Layer,
110        lifecycle::{
111            base::*,
112            context::*,
113            effect::*,
114            future_task::*,
115            memo::*,
116            reactive::*,
117            readable::*,
118            state::*,
119            task::*,
120            writable::*,
121        },
122        platform::*,
123        reactive_context::ReactiveContext,
124        rendering_ticker::RenderingTicker,
125        style::{
126            border::*,
127            color::*,
128            corner_radius::*,
129            cursor::*,
130            fill::*,
131            font_slant::*,
132            font_weight::*,
133            font_width::*,
134            gradient::*,
135            scale::*,
136            shadow::*,
137            text_align::*,
138            text_height::*,
139            text_overflow::*,
140            text_shadow::*,
141            vertical_align::*,
142        },
143        user_event::UserEvent,
144    };
145}
146
147/// Used by renderers such as freya-testing, freya-winit or just integration crates.
148pub mod integration {
149    pub use rustc_hash::*;
150
151    pub use crate::{
152        accessibility::{
153            dirty_nodes::*,
154            focus_strategy::*,
155            id::*,
156            screen_reader::*,
157            tree::*,
158        },
159        animation_clock::AnimationClock,
160        data::*,
161        element::*,
162        elements::extensions::*,
163        events::{
164            data::*,
165            executor::*,
166            measurer::*,
167            name::*,
168            platform::*,
169        },
170        lifecycle::state::State,
171        node_id::NodeId,
172        platform::*,
173        render_pipeline::RenderPipeline,
174        rendering_ticker::*,
175        runner::Runner,
176        scope_id::ScopeId,
177        style::default_fonts::default_fonts,
178        tree::{
179            DiffModifies,
180            Tree,
181        },
182        user_event::*,
183    };
184}