Skip to main content

Module clipboard

Module clipboard 

Expand description

Clipboard backends — how a ui process accesses the selection: tilo_clipboard under the toolkit’s module path.

ui::text_selection’s verbs resolve to the clipboard of the current crate::host::HostServices: a host-installed one (the compositor hosts several apps in-process and mirrors its own selection for them), this target’s system clipboard, or an InProcessClipboard when the host offers none.

Modules§

conformance
The contract every ClipboardBackend keeps, as checks a backend’s tests (and a host’s own backend’s tests) run.
events
Clipboard events a host dispatches to the app.

Structs§

ClipboardImage
An encoded image on the clipboard: what a screenshot tool or an image viewer copied.
InProcessClipboard
A clipboard private to this process, for hosts that offer no shared one.
RichTextOffer
HTML and its optional plain fallback captured from the same clipboard offer. Adapters must bound payloads before copying them into this value. Decoders may use this fallback after rejecting HTML, without rereading the clipboard.
WaylandClipboard
wl_data_device + zwp_primary_selection_device_v1 on the app’s own Wayland connection.

Enums§

Availability
Whether a feature can be used on a target.
ClipboardTarget
Which selection a clipboard operation refers to.
Feature
One capability of this crate, for availability and Unsupported.

Constants§

MAX_CLIPBOARD_HTML_BYTES
Largest HTML payload accepted from a clipboard offer.
MAX_CLIPBOARD_IMAGE_BYTES
Largest PNG a clipboard image may encode to.
MAX_CLIPBOARD_IMAGE_INPUT_BYTES
Largest RGBA buffer accepted for a clipboard image.
MAX_CLIPBOARD_PLAIN_FALLBACK_BYTES
Largest plain-text fallback captured with a rich clipboard offer.
MAX_PASTED_IMAGE_BYTES
Largest encoded image read from another app’s clipboard. A larger one is not read at all.
PASTED_IMAGE_TYPES
Encoded image types read from the clipboard, most preferred first.

Traits§

ClipboardBackend
A source of clipboard content for this process.

Functions§

attach_wayland_display
Route system through the app’s own Wayland connection, so copies go through the connection that owns the focused surface — the compositor only accepts set_selection from that one.
availability
Whether feature can be used on this target.
available
Whether feature can be used on this target without a prompt.
preferred_image_type
The most preferred image type among offered, if any.
system
This target’s clipboard, shared by every caller in the process.
warn_fallback_once
Emit the “this clipboard does not leave the process” warning exactly once.

Type Aliases§

Unsupported
A feature this target, or this particular host, cannot provide.