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
|
|
@ -2,6 +2,7 @@
|
||||||
unix,
|
unix,
|
||||||
not(any(
|
not(any(
|
||||||
target_os = "macos",
|
target_os = "macos",
|
||||||
|
target_os = "ios",
|
||||||
target_os = "android",
|
target_os = "android",
|
||||||
target_os = "emscripten"
|
target_os = "emscripten"
|
||||||
))
|
))
|
||||||
|
|
@ -12,6 +13,7 @@ mod platform;
|
||||||
#[cfg(not(all(
|
#[cfg(not(all(
|
||||||
unix,
|
unix,
|
||||||
not(any(
|
not(any(
|
||||||
|
target_os = "ios",
|
||||||
target_os = "macos",
|
target_os = "macos",
|
||||||
target_os = "android",
|
target_os = "android",
|
||||||
target_os = "emscripten"
|
target_os = "emscripten"
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,11 @@ pub fn new_clipboard<W: HasRawWindowHandle>(
|
||||||
{
|
{
|
||||||
Ok(Box::new(clipboard_macos::Clipboard::new()?))
|
Ok(Box::new(clipboard_macos::Clipboard::new()?))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_os = "ios")]
|
||||||
|
{
|
||||||
|
Ok(Box::new(clipboard_ios::Clipboard::new()?))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
|
|
@ -30,3 +35,22 @@ impl ClipboardProvider for clipboard_macos::Clipboard {
|
||||||
self.read()
|
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