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