mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: sample selector
This commit is contained in:
parent
4603bbd0da
commit
f303a8d552
13 changed files with 278 additions and 125 deletions
20
src/core.rs
20
src/core.rs
|
|
@ -8,6 +8,9 @@ pub(crate) use std::time::Duration;
|
|||
pub(crate) use std::collections::BTreeMap;
|
||||
pub(crate) use std::sync::atomic::{Ordering, AtomicBool};
|
||||
pub(crate) use std::sync::{Arc, Mutex, RwLock, LockResult, RwLockReadGuard, RwLockWriteGuard};
|
||||
pub(crate) use std::path::PathBuf;
|
||||
pub(crate) use std::fs::read_dir;
|
||||
pub(crate) use std::ffi::OsString;
|
||||
|
||||
// Non-stdlib dependencies:
|
||||
pub(crate) use microxdg::XdgApp;
|
||||
|
|
@ -51,6 +54,19 @@ pub trait Exit: Component {
|
|||
}
|
||||
}
|
||||
|
||||
#[macro_export] macro_rules! exit {
|
||||
($T:ty) => {
|
||||
impl Exit for $T {
|
||||
fn exited (&self) -> bool {
|
||||
self.exited
|
||||
}
|
||||
fn exit (&mut self) {
|
||||
self.exited = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Anything that implements `Render` + `Handle` can be used as a UI component.
|
||||
impl<T: Render + Handle + Sync> Component for T {}
|
||||
|
||||
|
|
@ -66,7 +82,9 @@ pub trait Device: Render + Handle + Process + Send + Sync {
|
|||
impl<T: Render + Handle + Process + Send + Sync> Device for T {}
|
||||
|
||||
// Reexport macros:
|
||||
pub use crate::{submod, pubmod, render, handle, process, phrase, keymap, ports};
|
||||
pub use crate::{
|
||||
submod, pubmod, render, handle, process, phrase, keymap, ports, exit
|
||||
};
|
||||
|
||||
// Reexport JACK proto-lib:
|
||||
pub use crate::jack::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue