clipboard.x11 #

fn new_clipboard #

fn new_clipboard() &Clipboard

fn new_primary #

fn new_primary() &Clipboard

create a new PRIMARY clipboard (only supported on Linux)

struct Clipboard #

struct Clipboard {
	display &C.Display
mut:
	selection C.Atom
	window    C.Window
	atoms     []C.Atom
	mutex     &sync.Mutex
	text      string
	got_text  bool
	is_owner  bool
}

fn (Clipboard) set_text #

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