mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
9dec9605ed
* feat(clipboard): support `read_image` & `write_image` * fix plugin name * platform specific bahavior * remove unnecessary BufWriter * improvement * update example * update example * format * header, fix change file * use image from tauri * fix ci * update tauri, fix read * image crate only on desktop [skip ci] * Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci] Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> * Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci] Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> * update deps, address code review * fix mobile [skip ci] --------- Co-authored-by: Lucas Nogueira <lucas@tauri.studio> Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
37 lines
767 B
Rust
37 lines
767 B
Rust
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Deserialize)]
|
|
#[cfg_attr(mobile, derive(Serialize))]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub enum ClipKind {
|
|
PlainText {
|
|
label: Option<String>,
|
|
text: String,
|
|
},
|
|
#[cfg(desktop)]
|
|
Image {
|
|
image: tauri::image::JsImage,
|
|
},
|
|
Html {
|
|
html: String,
|
|
alt_html: Option<String>,
|
|
},
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub enum ClipboardContents {
|
|
PlainText {
|
|
text: String,
|
|
},
|
|
Image {
|
|
bytes: Vec<u8>,
|
|
width: usize,
|
|
height: usize,
|
|
},
|
|
}
|