diff --git a/crates/clap-host/src/ffi.rs b/crates/clap-host/src/ffi.rs index e1e79db1..f48f0df2 100644 --- a/crates/clap-host/src/ffi.rs +++ b/crates/clap-host/src/ffi.rs @@ -1447,32 +1447,8 @@ mod hostwin; /// Other platforms: embedded editors are not hosted (floating ones still are). #[cfg(not(windows))] -mod hostwin { - use std::ffi::c_void; - - pub const SUPPORTED: bool = false; - - pub struct HostWindow; - - impl HostWindow { - pub fn new(_title: &str, _w: f64, _h: f64) -> Result { - Err("embedded plugin editors are not hosted on this platform".into()) - } - pub fn raw(&self) -> *mut c_void { - std::ptr::null_mut() - } - pub fn parent(&self) -> *mut c_void { - std::ptr::null_mut() - } - pub fn raise(&self) {} - pub fn is_visible(&self) -> bool { - false - } - pub fn close(self) {} - } - - pub fn resize(_window: *mut c_void, _w: f64, _h: f64) {} -} +#[path = "ffi/hostwin/other.rs"] +mod hostwin; #[cfg(test)] mod tests { diff --git a/crates/clap-host/src/ffi/hostwin/other.rs b/crates/clap-host/src/ffi/hostwin/other.rs new file mode 100644 index 00000000..1feff528 --- /dev/null +++ b/crates/clap-host/src/ffi/hostwin/other.rs @@ -0,0 +1,24 @@ +use std::ffi::c_void; + +pub const SUPPORTED: bool = false; + +pub struct HostWindow; + +impl HostWindow { + pub fn new(_title: &str, _w: f64, _h: f64) -> Result { + Err("embedded plugin editors are not hosted on this platform".into()) + } + pub fn raw(&self) -> *mut c_void { + std::ptr::null_mut() + } + pub fn parent(&self) -> *mut c_void { + std::ptr::null_mut() + } + pub fn raise(&self) {} + pub fn is_visible(&self) -> bool { + false + } + pub fn close(self) {} +} + +pub fn resize(_window: *mut c_void, _w: f64, _h: f64) {}