1
0
Fork 0
nih-plug/src/context.rs
Robbert van der Helm b676353589 Split the nih_plug::context module
So that structs are more logically grouped with their traits.
2022-10-22 14:19:10 +02:00

27 lines
709 B
Rust

//! Different contexts the plugin can use to make callbacks to the host in different...contexts.
use std::fmt::Display;
pub mod gui;
pub mod init;
pub mod process;
/// The currently active plugin API. This may be useful to display in an about screen in the
/// plugin's GUI for debugging purposes.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum PluginApi {
Clap,
Standalone,
Vst3,
}
impl Display for PluginApi {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
PluginApi::Clap => write!(f, "CLAP"),
PluginApi::Standalone => write!(f, "standalone"),
PluginApi::Vst3 => write!(f, "VST3"),
}
}
}