From cc1a6093a3107be015724f8648cc382148d4b784 Mon Sep 17 00:00:00 2001 From: Micah Johnston Date: Thu, 28 Nov 2024 18:42:51 -0600 Subject: [PATCH] vst3: rename View to PlugView --- src/format/vst3/component.rs | 4 ++-- src/format/vst3/view.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/format/vst3/component.rs b/src/format/vst3/component.rs index 64cc6af..e91dc50 100644 --- a/src/format/vst3/component.rs +++ b/src/format/vst3/component.rs @@ -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}; @@ -719,7 +719,7 @@ impl IEditControllerTrait for Component

{ 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::().unwrap().into_raw() } } diff --git a/src/format/vst3/view.rs b/src/format/vst3/view.rs index aeb5ba8..4623a84 100644 --- a/src/format/vst3/view.rs +++ b/src/format/vst3/view.rs @@ -51,23 +51,23 @@ impl EditorHostInner for Vst3EditorHost { } } -pub struct View { +pub struct PlugView { main_thread_state: Arc>>, } -impl View

{ - pub fn new(main_thread_state: &Arc>>) -> View

{ - View { +impl PlugView

{ + pub fn new(main_thread_state: &Arc>>) -> PlugView

{ + PlugView { main_thread_state: main_thread_state.clone(), } } } -impl Class for View

{ +impl Class for PlugView

{ type Interfaces = (IPlugView,); } -impl IPlugViewTrait for View

{ +impl IPlugViewTrait for PlugView

{ unsafe fn isPlatformTypeSupported(&self, type_: FIDString) -> tresult { #[cfg(target_os = "windows")] if CStr::from_ptr(type_) == CStr::from_ptr(kPlatformTypeHWND) {