clipboard

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package clipboard isolates desktop clipboard initialization and image reads from the Coding TUI.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnavailable means the host clipboard cannot be initialized or read.
	ErrUnavailable = errors.New("coding clipboard: unavailable")
	// ErrEmpty means the clipboard does not currently contain PNG image data.
	ErrEmpty = errors.New("coding clipboard: no image available")
)

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader provides copied image bytes from the host clipboard.

func New

func New() *Reader

New returns the production desktop clipboard reader. Initialization remains lazy until the first ReadImage call.

func (*Reader) ReadImage

func (r *Reader) ReadImage(ctx context.Context) (data []byte, returnErr error)

ReadImage initializes the backend, reads PNG image data, and returns a detached copy. Backend panics are translated without exposing panic values.

Jump to

Keyboard shortcuts

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