Package limn.backend.lwjgl.transfer
Class ClipboardTypes
java.lang.Object
limn.backend.lwjgl.transfer.ClipboardTypes
The canonical names a
NativeClipboard speaks, and their spellings on the two Linux
windowing systems, where a type is a string any program may write its own way.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringFiles, as an RFC 2483 URI list.static final StringAn HTML fragment, as UTF-8 bytes.static final StringA picture, as the bytes of an image file: PNG when written, any decodable kind when read.static final StringA picture as its pixels: the width and the height as two little-endian integers, then the rows of straight-alpha RGBA, top first.static final StringPlain text, as UTF-8 bytes. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringWhat another program offers, as canonical types: one text and one image however many spellings it wrote, every other type as it is.static @Nullable StringspellingIn(String canonical, List<String> offered) The spelling to ask another program for.The spellings to announce for a canonical type on X11 and Wayland, so that a program that knows only an older one still finds it.
-
Field Details
-
TEXT
Plain text, as UTF-8 bytes.- See Also:
-
HTML
An HTML fragment, as UTF-8 bytes.- See Also:
-
IMAGE
A picture, as the bytes of an image file: PNG when written, any decodable kind when read.- See Also:
-
FILES
Files, as an RFC 2483 URI list.- See Also:
-
PIXELS
A picture as its pixels: the width and the height as two little-endian integers, then the rows of straight-alpha RGBA, top first. Never announced to another program; it is what a system's clipboard asks this one for when its own picture format is made of pixels.- See Also:
-
-
Method Details
-
spellings
The spellings to announce for a canonical type on X11 and Wayland, so that a program that knows only an older one still finds it.- Parameters:
canonical- a canonical type- Returns:
- what to offer, the canonical name first
-
canonical
- Parameters:
spelling- a type another program asked for- Returns:
- the canonical type it is a spelling of, or itself
-
canonical
What another program offers, as canonical types: one text and one image however many spellings it wrote, every other type as it is.- Parameters:
offered- the type names as offered- Returns:
- the canonical types, in the order first met
-
spellingIn
The spelling to ask another program for.- Parameters:
canonical- the canonical type wantedoffered- the type names as offered- Returns:
- the best spelling on offer, or null when there is none
-