clipboard

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 0 Imported by: 3

Documentation

Index

Constants

View Source
const (
	UnknowType int = 0 // UnknowType represents an unknown clipboard content type
	TextType   int = 1 // TextType represents a text clipboard content type
)

Clipboard content types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clipboarder

type Clipboarder interface {
	Type() int    // Type returns the type of clipboard content
	Data() []byte // Data returns the raw data of the clipboard content
}

Clipboarder is the interface that groups clipboard contents.

func Parse

func Parse(typeID int, data []byte) Clipboarder

Parse decodes the clipboard content based on the typeID and returns the appropriate Clipboarder.

type Text

type Text string

Text represents the text content of the clipboard.

func (Text) Data

func (c Text) Data() []byte

Data returns the raw data of the text clipboard content.

func (Text) Type

func (c Text) Type() int

Type returns the clipboard content type for text.

Jump to

Keyboard shortcuts

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