This is a stub of the iOS clipboard logic.
This commit is contained in:
parent
22c6dd6c04
commit
958a9386c6
2 changed files with 26 additions and 0 deletions
|
|
@ -15,6 +15,11 @@ pub fn new_clipboard<W: HasRawWindowHandle>(
|
|||
{
|
||||
Ok(Box::new(clipboard_macos::Clipboard::new()?))
|
||||
}
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
{
|
||||
Ok(Box::new(clipboard_ios::Clipboard::new()?))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
|
|
@ -30,3 +35,22 @@ impl ClipboardProvider for clipboard_macos::Clipboard {
|
|||
self.read()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
mod clipboard_ios {
|
||||
use std::error::Error;
|
||||
pub struct Clipboard;
|
||||
impl Clipboard {
|
||||
pub fn new() -> Result<Clipboard, Box<dyn Error>> {
|
||||
Ok(Self)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "ios")]
|
||||
impl ClipboardProvider for clipboard_ios::Clipboard {
|
||||
fn read(&self) -> Result<String, Box<dyn Error>> {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue