Skip to content

Commit

Permalink
vst3: rename View to PlugView
Browse files Browse the repository at this point in the history
  • Loading branch information
micahrj committed Nov 29, 2024
1 parent 5f9fb4c commit cc1a609
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/format/vst3/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use vst3::{Class, ComRef, ComWrapper, Steinberg::Vst::*, Steinberg::*};
use super::buffers::ScratchBuffers;
use super::host::Vst3Host;
use super::util::{copy_wstring, utf16_from_ptr};
use super::view::{View, Vst3EditorHost};
use super::view::{PlugView, Vst3EditorHost};
use crate::bus::{BusDir, Format, Layout};
use crate::editor::Editor;
use crate::engine::{Config, Engine};
Expand Down Expand Up @@ -719,7 +719,7 @@ impl<P: Plugin> IEditControllerTrait for Component<P> {
return ptr::null_mut();
}

let view = ComWrapper::new(View::new(&self.main_thread_state));
let view = ComWrapper::new(PlugView::new(&self.main_thread_state));
view.to_com_ptr::<IPlugView>().unwrap().into_raw()
}
}
12 changes: 6 additions & 6 deletions src/format/vst3/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,23 @@ impl EditorHostInner for Vst3EditorHost {
}
}

pub struct View<P: Plugin> {
pub struct PlugView<P: Plugin> {
main_thread_state: Arc<UnsafeCell<MainThreadState<P>>>,
}

impl<P: Plugin> View<P> {
pub fn new(main_thread_state: &Arc<UnsafeCell<MainThreadState<P>>>) -> View<P> {
View {
impl<P: Plugin> PlugView<P> {
pub fn new(main_thread_state: &Arc<UnsafeCell<MainThreadState<P>>>) -> PlugView<P> {
PlugView {
main_thread_state: main_thread_state.clone(),
}
}
}

impl<P: Plugin> Class for View<P> {
impl<P: Plugin> Class for PlugView<P> {
type Interfaces = (IPlugView,);
}

impl<P: Plugin> IPlugViewTrait for View<P> {
impl<P: Plugin> IPlugViewTrait for PlugView<P> {
unsafe fn isPlatformTypeSupported(&self, type_: FIDString) -> tresult {
#[cfg(target_os = "windows")]
if CStr::from_ptr(type_) == CStr::from_ptr(kPlatformTypeHWND) {
Expand Down

0 comments on commit cc1a609

Please sign in to comment.