screen

package
v0.703.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package screen implements the cross-platform screen capture layer of the Pando Desktop Controller, used by Manager.Screenshot (internal/uiauto/manager.go). Each platform-specific file (screen_windows.go, screen_linux.go, screen_darwin.go, screen_other.go) provides its own Capture/Displays/Capabilities implementation, selected at compile time by //go:build tags. No file in this package uses cgo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capabilities

func Capabilities() core.Capabilities

Capabilities probes what this session can actually capture.

func Capture

func Capture(ctx context.Context, target Target) (image.Image, error)

Capture captures target according to the current session's protocol.

Types

type DisplayInfo

type DisplayInfo struct {
	Index   int
	Name    string
	Bounds  core.Bounds
	Primary bool
}

DisplayInfo describes one physical/logical display.

func Displays

func Displays() ([]DisplayInfo, error)

Displays enumerates displays according to the current session's protocol.

type Target

type Target struct {
	Display  int
	Region   *core.Bounds
	WindowID string
}

Target selects what to capture: the whole of Display (0 = primary/first display when Region and WindowID are both unset), a specific pixel Region (screen coordinates), or a specific WindowID (backend-defined identifier, as returned by core.WindowInfo.ID). At most one of Region / WindowID should be set; when both are empty, the whole Display is captured.

Jump to

Keyboard shortcuts

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