refactor: rename clipboard plugin to clipboard-manager (#400)

This commit is contained in:
Lucas Fernandes Nogueira authored and GitHub committed 2023-05-24 12:06:07 -03:00
1 parent 26d993cfea
commit b259baa17e
45 files changed
+44 -44

No files matched your search

+24
View File
@@ -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()
}