freya_core/
lib.rs

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