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