mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
bye DynamicDevice; now to reenable playback...
This commit is contained in:
parent
55a85fafef
commit
9d46cb7619
4 changed files with 40 additions and 125 deletions
16
src/core.rs
16
src/core.rs
|
|
@ -15,10 +15,24 @@ pub use crossterm::event::{Event, KeyEvent, KeyCode, KeyModifiers};
|
|||
|
||||
macro_rules! submod { ($($name:ident)*) => { $(mod $name; pub use self::$name::*;)* }; }
|
||||
|
||||
submod!( device handle jack keymap midi port render run time );
|
||||
submod!( handle jack keymap midi port render run time );
|
||||
|
||||
pub type Usually<T> = Result<T, Box<dyn Error>>;
|
||||
|
||||
pub trait Component: Render + Handle {}
|
||||
|
||||
impl<T: Render + Handle> Component for T {}
|
||||
|
||||
/// A UI component that may have presence on the JACK grap.
|
||||
pub trait Device: Render + Handle + Ports + Send + Sync {
|
||||
fn boxed (self) -> Box<dyn Device> where Self: Sized + 'static {
|
||||
Box::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// All things that implement the required traits can be treated as `Device`.
|
||||
impl<T: Render + Handle + Ports + Send + Sync> Device for T {}
|
||||
|
||||
// Reexport macros:
|
||||
pub use crate::{
|
||||
render,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue