diff --git a/coupler-reflector/src/lib.rs b/coupler-reflector/src/lib.rs index aa3b016..8475f5f 100644 --- a/coupler-reflector/src/lib.rs +++ b/coupler-reflector/src/lib.rs @@ -5,13 +5,13 @@ use reflector::platform::{ WindowOptions, }; -struct EditorState { +struct State { framebuffer: Vec, } -impl EditorState { - fn new() -> EditorState { - EditorState { +impl State { + fn new() -> State { + State { framebuffer: Vec::new(), } } @@ -34,14 +34,14 @@ impl EditorState { } } -pub struct EditorWindow { +pub struct PluginWindow { #[allow(unused)] app: App, window: Window, } -impl EditorWindow { - pub fn open(parent: &ParentWindow, size: Size) -> Result { +impl PluginWindow { + pub fn open(parent: &ParentWindow, size: Size) -> Result { let app = AppOptions::new().mode(AppMode::Guest).build()?; let mut options = WindowOptions::new(); @@ -54,16 +54,16 @@ impl EditorWindow { }; unsafe { options.raw_parent(raw_parent) }; - let mut state = EditorState::new(); + let mut state = State::new(); let window = options.open(app.handle(), move |cx, event| state.handle_event(cx, event))?; window.show(); - Ok(EditorWindow { app, window }) + Ok(PluginWindow { app, window }) } } -impl Editor for EditorWindow { +impl Editor for PluginWindow { fn size(&self) -> Size { let size = self.window.size(); diff --git a/examples/gain/src/lib.rs b/examples/gain/src/lib.rs index fcd8ae0..5dda506 100644 --- a/examples/gain/src/lib.rs +++ b/examples/gain/src/lib.rs @@ -6,7 +6,7 @@ use coupler::format::clap::*; use coupler::format::vst3::*; use coupler::{buffers::*, bus::*, editor::*, engine::*, events::*, host::*, params::*, plugin::*}; -use coupler_reflector::EditorWindow; +use coupler_reflector::PluginWindow; #[derive(Params, Serialize, Deserialize, Clone)] struct GainParams { @@ -26,7 +26,7 @@ pub struct Gain { impl Plugin for Gain { type Engine = GainEngine; - type Editor = EditorWindow; + type Editor = PluginWindow; fn info() -> PluginInfo { PluginInfo { @@ -90,7 +90,7 @@ impl Plugin for Gain { height: 512.0, }; - EditorWindow::open(parent, size).unwrap() + PluginWindow::open(parent, size).unwrap() } }