clipboard

package
v0.0.0-...-dbc7887 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package clipboard provides access to a copy/paste clipboard. If available it uses the system clipboard, but if unavailable it falls back to a simple, memory buffer.

It is a wrapper on top of github.com/atotto/clipboard.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clipboard

type Clipboard interface {
	// Store stores the text ot the clipboard.
	Store(rope.Rope) error
	// Fetch returns the text from the clipboard.
	Fetch() (rope.Rope, error)
}

A Clipboard provides means to store and fetch text. Implementations should support concurrent access.

func New

func New() Clipboard

New returns a new clipboard.

If the system clipboard is available, then the returned Clipboard uses the system clipboard.

If the system clipboard is unavailable, then a empty, memory-based clipboard is returned.

func NewMem

func NewMem() Clipboard

NewMem returns a new, empty, memory-based clipboard. This method is useful for tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL