clipboard

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clipboard

type Clipboard struct {
	IsImage bool
	Data    []byte
	Size    uint32
	Time    time.Time
	Device  *device.Device
}

Clipboard struct for clipboard

func FromProtobuf

func FromProtobuf(cd *protobuf.ClipboardData, dv *device.Device) Clipboard

FromProtobuf convert protobuf.ClipboardData to Clipboard struct

func (Clipboard) ToProtobuf

func (c Clipboard) ToProtobuf() *protobuf.ClipboardData

ToProtobuf convert Clipboard to protocol buffer ClipboardData

type ClipboardManager

type ClipboardManager struct {
	ReadTextChannel          <-chan []byte
	ReadImageChannel         <-chan []byte
	ClipboardsHistory        []*Clipboard
	ClipboardsHistoryUpdated chan struct{}
	// contains filtered or unexported fields
}

ClipboardManager struct for clipbaord manager

func NewClipboardManager

func NewClipboardManager(cfg *config.Config) *ClipboardManager

NewClipboardManager create new clipbaord manager

func (*ClipboardManager) AddClipboardToHistory

func (c *ClipboardManager) AddClipboardToHistory(newClipboard *Clipboard)

AddClipboardToHistory add clipbaord to clipbaord history

func (*ClipboardManager) IsReceivedClipboard

func (c *ClipboardManager) IsReceivedClipboard(clipboardData []byte) bool

IsReceivedClipboard returns true if it's same clipboard data with the received clipboard

func (*ClipboardManager) IsReceivedDevice

func (c *ClipboardManager) IsReceivedDevice(dv *device.Device) bool

IsReceivedDevice returns true if it's the same device with the received clipboard

func (*ClipboardManager) WriteClipboard

func (c *ClipboardManager) WriteClipboard(newClipboard Clipboard)

WriteClipboard write os clipbaord

Jump to

Keyboard shortcuts

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