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
ClipboardBackendkeeps, 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§
- Clipboard
Image - An encoded image on the clipboard: what a screenshot tool or an image viewer copied.
- InProcess
Clipboard - A clipboard private to this process, for hosts that offer no shared one.
- Rich
Text Offer - 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.
- Wayland
Clipboard wl_data_device+zwp_primary_selection_device_v1on the app’s own Wayland connection.
Enums§
- Availability
- Whether a feature can be used on a target.
- Clipboard
Target - Which selection a clipboard operation refers to.
- Feature
- One capability of this crate, for
availabilityandUnsupported.
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§
- Clipboard
Backend - A source of clipboard content for this process.
Functions§
- attach_
wayland_ display - Route
systemthrough the app’s own Wayland connection, so copies go through the connection that owns the focused surface — the compositor only acceptsset_selectionfrom that one. - availability
- Whether
featurecan be used on this target. - available
- Whether
featurecan 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.