mirror of
https://github.com/storytold/soundcraft.git
synced 2026-11-01 14:36:50 -06:00
refactor(clap-host): move the non-Windows hostwin module to ffi/hostwin/other.rs
This commit is contained in:
@@ -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<HostWindow, String> {
|
||||
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 {
|
||||
|
||||
@@ -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<HostWindow, String> {
|
||||
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) {}
|
||||
Reference in New Issue
Block a user