Clipboard
The system clipboard. It can stall, so it works off the caller’s thread.
Clipboard
Section titled “Clipboard”Get it with Api.clipboard().
text(): Promise<string>setText(text: string): Promise<void>text(): salamander.PromisesetText(text: string): salamander.PromiseSystem.Threading.Tasks.Task<string> TextAsync(System.Threading.CancellationToken cancel = default)System.Threading.Tasks.Task SetTextAsync(string text, System.Threading.CancellationToken cancel = default)sal::Future<sal::String, Wraith::ClipboardError> text() constsal::Future<void, Wraith::ClipboardError> setText(std::string_view text) constpub fn text(&self) -> salamander::Future<salamander::Str, wraith::ClipboardError>pub fn set_text(&self, text: &str) -> salamander::Future<(), wraith::ClipboardError>fn text(self: Wraith.Clipboard) rt.Promise((Wraith.ClipboardError || rt.Failure)![]const u8, Wraith.ClipboardErrorCode)fn setText(self: Wraith.Clipboard, text: []const u8) rt.Promise((Wraith.ClipboardError || rt.Failure)!void, Wraith.ClipboardErrorCode)sal_Promise Wraith_Clipboard_text(Wraith_Clipboard self)sal_Promise Wraith_Clipboard_setText(Wraith_Clipboard self, sal_string text)UTF-8, empty if there’s no text. Good till the taking thread takes another.
Async. Fails with ClipboardError.
setText
Section titled “setText”Async. Fails with ClipboardError.
ClipboardError
Section titled “ClipboardError”What can go wrong, besides Cancelled, Unsupported and Gone.
| Code | Error | |
|---|---|---|
| 1 | Failed |
|
| 2 | NotDeclared |
Its wraith.json doesn’t list “clipboard” in “permissions” |
wraith.io · Mods on the Hub · Get Wraith
Made with ♥ by Asgard
