LinuxTextClipboard class

Namespace Runic.Platform.Linux · Runic.Platform.Linux 0.7.0-preview.5

public sealed class LinuxTextClipboard : ITextClipboard, IAsyncDisposable

Inherits or implements ITextClipboard, IAsyncDisposable.

GTK clipboard with presentation-thread ownership and asynchronous transfer draining.

Constructors

LinuxTextClipboard

public LinuxTextClipboard(INativePickerOwner owner)

GTK clipboard with presentation-thread ownership and asynchronous transfer draining.

Methods

DisposeAsync

public ValueTask DisposeAsync()

Drains reads and relinquishes owned clipboard data before the GTK dispatcher stops.

ReadTextAsync

public ValueTask<PlatformResult<string?>> ReadTextAsync(int maximumCharacters, CancellationToken cancellationToken = default)

Reads bounded text; successful null means no text format and an empty string means empty text.

Documentation from ITextClipboard.ReadTextAsync.

WriteTextAsync

public ValueTask<PlatformResult<PlatformUnit>> WriteTextAsync(string text, CancellationToken cancellationToken = default)

Writes text. Cancellation prevents queued work; an initiated native write returns its actual outcome.

Documentation from ITextClipboard.WriteTextAsync.