1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use dioxus_native_core::NodeId;
use dom_events::DomEvent;
use freya_events::FreyaEvent;

use accesskit::NodeId as AccessibilityId;
use rustc_hash::FxHashMap;
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
use tokio::sync::watch;
use torin::prelude::Area;

pub mod accessibility;
pub mod accessibility_state;
pub mod dom_events;
pub mod events;
pub mod events_processor;
pub mod freya_events;
pub mod layers;
pub mod layout;
pub mod node;
pub mod render;
pub mod viewports;

pub type FocusSender = watch::Sender<Option<AccessibilityId>>;
pub type FocusReceiver = watch::Receiver<Option<AccessibilityId>>;
pub type EventEmitter = UnboundedSender<DomEvent>;
pub type EventReceiver = UnboundedReceiver<DomEvent>;
pub type EventsQueue = Vec<FreyaEvent>;
pub type NodesEvents = FxHashMap<String, Vec<(NodeId, FreyaEvent)>>;
pub type ViewportsCollection = FxHashMap<NodeId, (Option<Area>, Vec<NodeId>)>;

pub mod prelude {
    pub use crate::accessibility::*;
    pub use crate::accessibility_state::*;
    pub use crate::dom_events::*;
    pub use crate::events::*;
    pub use crate::events_processor::*;
    pub use crate::freya_events::*;
    pub use crate::layers::*;
    pub use crate::layout::*;
    pub use crate::node::*;
    pub use crate::render::*;
    pub use crate::viewports::*;

    pub use crate::EventEmitter;
    pub use crate::EventReceiver;
    pub use crate::EventsQueue;
    pub use crate::FocusReceiver;
    pub use crate::FocusSender;
    pub use crate::NodesEvents;
    pub use crate::ViewportsCollection;
}