Module clipboard.dummy stdlib

clipboard.dummy
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
0
Imported by:
1
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

This section is empty.

Imported by

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn new_primary

fn new_primary() &Clipboard

new_primary returns a new X11 PRIMARY type Clipboard instance allocated on the heap.

Please note: new_primary only works on X11 based systems.

Structs

#struct Clipboard

heap
pub struct Clipboard {
mut:
	text     string // text data sent or received
	got_text bool   // used to confirm that we have got the text
	is_owner bool   // to save selection owner state
}

Clipboard represents a system clipboard.

System "copy" and "paste" actions utilize the clipboard for temporary storage.

#fn new_clipboard

fn new_clipboard() &Clipboard

new_clipboard returns a new Clipboard instance allocated on the heap.

The Clipboard resources can be released with free

#fn (&Clipboard) set_text

fn (mut cb &Clipboard) set_text(text string) bool

set_text transfers text to the system clipboard.

This is often associated with a copy action (Ctrl + C).

#fn (&Clipboard) get_text

fn (mut cb &Clipboard) get_text() string

get_text retrieves the contents of the system clipboard as a string.

This is often associated with a paste action (Ctrl + V).

#fn (&Clipboard) clear

fn (mut cb &Clipboard) clear()

clear empties the clipboard contents.

#fn (&Clipboard) free

fn (mut cb &Clipboard) free()

free releases all memory associated with the clipboard instance.

#fn (&Clipboard) has_ownership

fn (cb &Clipboard) has_ownership() bool

has_ownership returns true if the contents of the clipboard were created by this clipboard instance.

#fn (&Clipboard) check_availability

fn (cb &Clipboard) check_availability() bool

check_availability returns true if the clipboard is ready to be used.

Interfaces

This section is empty.

Enums

This section is empty.