Clipboard
classin packageklyn.gui
public class Clipboard
Clipboard

On-demand OS clipboard access without creating a GUI window. Linux requires wl-paste (Wayland) or xclip (X11) and a PNG clipboard target. Windows converts the clipboard bitmap with the installed .NET image encoder. No helper is started until explicitly requested by the user. Example: Clipboard.saveImagePNG(Path("screenshot.png")).

Methods
Modifier and Type Member Description
public static native getFiles
getFiles() as ArrayList<String>
Reads files explicitly copied by the user without opening their contents.
public static getText
getText() as String
Reads plain text from the operating system clipboard.
public static saveImagePNG
saveImagePNG(destination as Path) as Void
Exports an image to a new PNG file, never replacing an existing file.
public static setText
setText(text as String) as Void
Copies plain text to the operating system clipboard.