pub use std::error::Error; pub use std::io::{stdout, Stdout, Write}; pub use std::thread::{spawn, JoinHandle}; pub use std::time::Duration; pub use std::collections::BTreeMap; pub use std::sync::{Arc, Mutex, MutexGuard}; pub use std::sync::atomic::{Ordering, AtomicBool, AtomicUsize}; pub use std::sync::mpsc::{channel, Sender, Receiver}; pub use microxdg::XdgApp; pub use ratatui::prelude::*; pub use midly::{MidiMessage, live::LiveEvent, num::u7}; pub use crossterm::{ExecutableCommand, QueueableCommand}; pub use crossterm::event::{Event, KeyEvent, KeyCode, KeyModifiers}; macro_rules! submod { ($($name:ident)*) => { $(mod $name; pub use self::$name::*;)* }; } submod!( handle jack keymap midi port render run time ); pub type Usually = Result>; pub trait Component: Render + Handle {} impl Component for T {} /// A UI component that may have presence on the JACK grap. pub trait Device: Render + Handle + Process + Send + Sync { fn boxed (self) -> Box where Self: Sized + 'static { Box::new(self) } } /// All things that implement the required traits can be treated as `Device`. impl Device for T {} // Reexport macros: pub use crate::{ render, handle, process, phrase, keymap, key, ports };