Show / Hide Table of Contents

Interface IClipboardComponent

Interface for drivers which provide the clipboard component of the platform abstraction layer.

Inherited Members
IPalComponent.Name
IPalComponent.Provides
IPalComponent.Logger
IPalComponent.Initialize(ToolkitOptions)
IPalComponent.Uninitialize()
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public interface IClipboardComponent : IPalComponent

Properties

SupportedFormats

A list of formats that this clipboard component supports.

Declaration
IReadOnlyList<ClipboardFormat> SupportedFormats { get; }
Property Value
Type Description
IReadOnlyList<ClipboardFormat>
See Also
GetClipboardFormat()
ClipboardFormat

Methods

GetClipboardAudio()

Gets the audio data currently in the clipboard. This function returns null if the current clipboard data doesn't have the Audio format.

Declaration
AudioData? GetClipboardAudio()
Returns
Type Description
AudioData

The audio data currently in the clipboard, or null.

See Also
GetClipboardFormat()

GetClipboardBitmap()

Gets the bitmap currently in the clipboard. This function returns null if the current clipboard data doesn't have the Bitmap format.

Declaration
Bitmap? GetClipboardBitmap()
Returns
Type Description
Bitmap

The bitmap currently in the clipboard, or null.

Remarks

On linux clipboard bitmaps are defacto transferred as PNG data, as such a PNG encoder/decoder is needed to read and write bitmaps from the clipboard. To enable this SetPngCodec(IPngCodec?) must be called with an object that implements the X11ClipboardComponent.IPngCodec interface. If this is not done, SetClipboardBitmap(Bitmap) and GetClipboardBitmap() will both throw an exception.

See Also
GetClipboardFormat()
SetPngCodec(IPngCodec)
X11ClipboardComponent.IPngCodec

GetClipboardFiles()

Gets a list of files and directories currently in the clipboard. This function returns null if the current clipboard data doesn't have the Files format.

Declaration
List<string>? GetClipboardFiles()
Returns
Type Description
List<string>

The list of files and directories currently in the clipboard, or null.

See Also
GetClipboardFormat()

GetClipboardFormat()

Gets the format of the data currently in the clipboard.

Declaration
ClipboardFormat GetClipboardFormat()
Returns
Type Description
ClipboardFormat

The format of the data currently in the clipboard.

See Also
ClipboardFormat

GetClipboardText()

Gets the string currently in the clipboard. This function returns null if the current clipboard data doesn't have the Text format.

Declaration
string? GetClipboardText()
Returns
Type Description
string

The string currently in the clipboard, or null.

See Also
GetClipboardFormat()

SetClipboardBitmap(Bitmap)

Writes a bitmap to the clipboard.

Declaration
void SetClipboardBitmap(Bitmap bitmap)
Parameters
Type Name Description
Bitmap bitmap

The bitmap to write to the clipboard.

Remarks

On linux clipboard bitmaps are defacto transferred as PNG data, as such a PNG encoder/decoder is needed to read and write bitmaps from the clipboard. To enable this SetPngCodec(IPngCodec?) must be called with an object that implements the X11ClipboardComponent.IPngCodec interface. If this is not done, SetClipboardBitmap(Bitmap) and GetClipboardBitmap() will both throw an exception.

See Also
GetClipboardFormat()
SetPngCodec(IPngCodec)
X11ClipboardComponent.IPngCodec

SetClipboardText(string)

Sets the string currently in the clipboard.

Declaration
void SetClipboardText(string text)
Parameters
Type Name Description
string text

The text to write to the clipboard.

See Also
GetClipboardFormat()

See Also

Clipboard
In this article
Back to top Generated by DocFX