refactor(clap-host): move the non-Windows hostwin module to ffi/hostwin/other.rs

This commit is contained in:
aiongg
2026-10-26 18:16:35 +00:00
parent db6e7ed1cc
commit 19b3f5ec9f
2 changed files with 26 additions and 26 deletions
+2 -26
View File
@@ -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 {
+24
View File
@@ -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) {}