1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
use crate;
use crateTransferError;
/// Platform extension allowing access to the primary selection, where available.
///
/// The primary selection is a separate clipboard on Wayland and X11, usually holding the most
/// recently selected text and pasted with a middle click.
///
/// Access via [`ActiveEventLoop::primary_selection_ext`].
///
/// # Example
///
/// ```ignore
/// if let Some(ext) = event_loop.primary_selection_ext() {
/// if let Some(data_transfer_id) = ext.primary_selection()? {
/// event_loop.fetch_data_transfer(data_transfer_id, &TypeHint::Plaintext)?;
/// }
/// }
/// ```
///
/// [`ActiveEventLoop::primary_selection_ext`]: crate::event_loop::ActiveEventLoop::primary_selection_ext