mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-30 21:59:36 +02:00
refactor: rename clipboard plugin to clipboard-manager (#400)
This commit is contained in:
1 parent
26d993cfea
commit
b259baa17e
45 files changed
+44
-44
No files matched your search
@@ -0,0 +1,24 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use tauri::{command, AppHandle, Runtime, State};
|
||||
|
||||
use crate::{ClipKind, Clipboard, ClipboardContents, Result};
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn write<R: Runtime>(
|
||||
_app: AppHandle<R>,
|
||||
clipboard: State<'_, Clipboard<R>>,
|
||||
data: ClipKind,
|
||||
) -> Result<()> {
|
||||
clipboard.write(data)
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn read<R: Runtime>(
|
||||
_app: AppHandle<R>,
|
||||
clipboard: State<'_, Clipboard<R>>,
|
||||
) -> Result<ClipboardContents> {
|
||||
clipboard.read()
|
||||
}
|
||||
Reference in new issue
Block a user