public sealed class DesktopClipboardThe system clipboard, which SDL 2 supports for text and nothing else.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Images and application-defined formats need the platform's own clipboard API — Win32 registered formats, NSPasteboard UTIs, X11 atoms — and belong to the per-OS assemblies docs/plan/02 reserves for exactly this kind of gap. Until those exist the methods report that they did nothing, which is the truth and is a case every caller already handles.
Fields and properties (2)
public bool HasTextWhether the clipboard currently holds text.
public bool HasImageAlways : SDL 2 cannot read images from the clipboard.
Methods (8)
public DesktopClipboard(Sdl sdl)The system clipboard, which SDL 2 supports for text and nothing else.
public bool TryGetText(out string? text)Reads the clipboard's text.
public bool SetText(string text)Puts text on the clipboard.
public bool TryGetImage(out ClipboardImage image)Always : SDL 2 cannot read images from the clipboard.
public bool SetImage(in ClipboardImage image)Always : SDL 2 cannot write images to the clipboard.
public bool TryGetData(string format, out ReadOnlyMemory<byte> data)Always : SDL 2 has no custom clipboard formats.
public bool SetData(string format, ReadOnlySpan<byte> data)Always : SDL 2 has no custom clipboard formats.
public void Clear()Empties the clipboard, if the platform allows it.
Used by (2)
- DesktopPlatformVixen.Platform.Desktop
- DesktopSupplementTestsVixen.Platform.Desktop.Tests