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