Class ClipboardComponent
Inherited Members
Namespace: OpenTK.Platform.Native.Windows
Assembly: OpenTK.Platform.dll
Syntax
public class ClipboardComponent : IClipboardComponent, IPalComponent
Properties
CanIncludeInClipboardHistory
If this property is not null when setting the clipboard CanIncludeInClipboardHistory
will be added to the clipboard format
to either disable clipboard history or explicitly request the clipboard to be included in the histroy.
See documentation: https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats#cloud-clipboard-and-clipboard-history-formats
Declaration
public bool? CanIncludeInClipboardHistory { get; set; }
Property Value
Type | Description |
---|---|
bool? |
CanUploadToCloudClipboard
If this property is not null when setting the clipboard CanUploadToCloudClipboard
will be added to the clipboard format
to either disable the value set in the clipboard from syncing to the users devices, or request that it be syncronized with the users other devices.
See documentation: https://learn.microsoft.com/en-us/windows/win32/dataxchg/clipboard-formats#cloud-clipboard-and-clipboard-history-formats
Declaration
public bool? CanUploadToCloudClipboard { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Logger
Provides a logger for this component.
Declaration
public ILogger? Logger { get; set; }
Property Value
Type | Description |
---|---|
ILogger |
Name
Name of the abstraction layer component.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Provides
Specifies which PAL components this object provides.
Declaration
public PalComponents Provides { get; }
Property Value
Type | Description |
---|---|
PalComponents |
SupportedFormats
A list of formats that this clipboard component supports.
Declaration
public IReadOnlyList<ClipboardFormat> SupportedFormats { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<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
public AudioData? GetClipboardAudio()
Returns
Type | Description |
---|---|
AudioData | The audio data currently in the clipboard. |
GetClipboardBitmap()
Gets the bitmap currently in the clipboard. This function returns null if the current clipboard data doesn't have the Bitmap format.
Declaration
public Bitmap? GetClipboardBitmap()
Returns
Type | Description |
---|---|
Bitmap | The bitmap currently in the clipboard. |
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
public List<string>? GetClipboardFiles()
Returns
Type | Description |
---|---|
List<string> | The list of files and directories currently in the clipboard. |
GetClipboardFormat()
Gets the format of the data currently in the clipboard.
Declaration
public ClipboardFormat GetClipboardFormat()
Returns
Type | Description |
---|---|
ClipboardFormat | The format of the data currently in the clipboard. |
GetClipboardText()
Returns the string currently in the clipboard. This function returns null if the current clipboard data doesn't have the Text format.
Declaration
public string? GetClipboardText()
Returns
Type | Description |
---|---|
string | The string currently in the clipboard, or null. |
Initialize(ToolkitOptions)
Initialize the component.
Declaration
public void Initialize(ToolkitOptions options)
Parameters
Type | Name | Description |
---|---|---|
ToolkitOptions | options | The options to initialize the component with. |
SetClipboardAudio(AudioData)
Declaration
public void SetClipboardAudio(AudioData data)
Parameters
Type | Name | Description |
---|---|---|
AudioData | data |
SetClipboardBitmap(Bitmap)
Declaration
public void SetClipboardBitmap(Bitmap bitmap)
Parameters
Type | Name | Description |
---|---|---|
Bitmap | bitmap |
SetClipboardText(string)
Sets the string currently in the clipboard.
Declaration
public void SetClipboardText(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | The text to put on the clipboard. |