Skip to main content

nice_plug_core/
context.rs

1//! Different contexts the plugin can use to make callbacks to the host in different...contexts.
2
3use std::fmt::Display;
4
5pub mod gui;
6pub mod init;
7pub mod process;
8
9// Contexts for more plugin-API specific features
10pub mod remote_controls;
11
12/// The currently active plugin API. This may be useful to display in an about screen in the
13/// plugin's GUI for debugging purposes.
14#[derive(Debug, Clone, Copy, PartialEq, Eq)]
15pub enum PluginApi {
16    Clap,
17    Standalone,
18    Vst3,
19}
20
21impl Display for PluginApi {
22    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23        match self {
24            PluginApi::Clap => write!(f, "CLAP"),
25            PluginApi::Standalone => write!(f, "standalone"),
26            PluginApi::Vst3 => write!(f, "VST3"),
27        }
28    }
29}