headless

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package headless is a backend with virtual outputs rendered in software and synthetic input devices, for tests and the compositor-in-the-loop harness.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

func New

func New(l *loop.Loop) *Backend

func NewGLES

func NewGLES(l *loop.Loop, paths gpu.Paths) (*Backend, error)

func NewVulkan

func NewVulkan(l *loop.Loop) (*Backend, error)

func (*Backend) AddNamedOutput

func (b *Backend) AddNamedOutput(name string, modes ...backend.Mode) (*Output, error)

func (*Backend) AddOutput

func (b *Backend) AddOutput(modes ...backend.Mode) (*Output, error)

func (*Backend) Close

func (b *Backend) Close() error

func (*Backend) EnableAdaptiveSync

func (b *Backend) EnableAdaptiveSync()

func (*Backend) InheritFrames

func (b *Backend) InheritFrames()

func (*Backend) Keyboard

func (b *Backend) Keyboard() *Keyboard

func (*Backend) Outputs

func (b *Backend) Outputs() []*Output

func (*Backend) PlugKeyboard

func (b *Backend) PlugKeyboard(name string) (*Keyboard, error)

func (*Backend) Pointer

func (b *Backend) Pointer() *Pointer

func (*Backend) RefuseDepth10

func (b *Backend) RefuseDepth10()

func (*Backend) RefuseHDR

func (b *Backend) RefuseHDR()

func (*Backend) RefuseOverlayFlips

func (b *Backend) RefuseOverlayFlips(refuse bool)

func (*Backend) RefuseWorkingSpace

func (b *Backend) RefuseWorkingSpace()

func (*Backend) RemoveOutput

func (b *Backend) RemoveOutput(o *Output) error

func (*Backend) Renderer

func (b *Backend) Renderer() render.Renderer

func (*Backend) SetCursorPlanes

func (b *Backend) SetCursorPlanes(size image.Point) error

func (*Backend) SetOverlayPlanes

func (b *Backend) SetOverlayPlanes(n int, t gpu.ScanoutTarget) error

func (*Backend) Start

func (b *Backend) Start(h backend.Handler) error

func (*Backend) Switches

func (b *Backend) Switches() *Switches

func (*Backend) Touch

func (b *Backend) Touch() *Touch

type ColorSets

type ColorSets struct {
	Gamma, Degamma, CTM int
}

type Cursor

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

func (*Cursor) BeginCursor

func (c *Cursor) BeginCursor() (backend.Frame, error)

func (*Cursor) Commits

func (c *Cursor) Commits() uint64

func (*Cursor) Copies

func (c *Cursor) Copies() uint64

func (*Cursor) CursorSize

func (c *Cursor) CursorSize() image.Point

func (*Cursor) HideCursor

func (c *Cursor) HideCursor() error

func (*Cursor) Images

func (c *Cursor) Images() uint64

func (*Cursor) LoadCursor

func (c *Cursor) LoadCursor(pix []byte, stride int, size, hotspot image.Point) error

func (*Cursor) MoveCursor

func (c *Cursor) MoveCursor(at image.Point) error

func (*Cursor) Moves

func (c *Cursor) Moves() uint64

func (*Cursor) Pixels

func (c *Cursor) Pixels() []byte

func (*Cursor) Position

func (c *Cursor) Position() image.Point

func (*Cursor) ReadsBack

func (c *Cursor) ReadsBack()

func (*Cursor) Refuse

func (c *Cursor) Refuse(err error)

func (*Cursor) SetCursor

func (c *Cursor) SetCursor(hotspot image.Point) error

func (*Cursor) Visible

func (c *Cursor) Visible() bool

type Keyboard

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

func (*Keyboard) Capabilities

func (d *Keyboard) Capabilities() backend.Capability

func (*Keyboard) Key

func (k *Keyboard) Key(code uint32, pressed bool) error

func (*Keyboard) LEDs

func (k *Keyboard) LEDs() xkb.Locks

func (*Keyboard) Name

func (d *Keyboard) Name() string

func (*Keyboard) SetLEDs

func (k *Keyboard) SetLEDs(l xkb.Locks)

type Output

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

func (*Output) AbortFrame

func (o *Output) AbortFrame()

func (*Output) AdaptiveSync

func (o *Output) AdaptiveSync() bool

func (*Output) AdaptiveSyncCapable

func (o *Output) AdaptiveSyncCapable() bool

func (*Output) AllowScanout

func (o *Output) AllowScanout(t gpu.ScanoutTarget)

func (*Output) BeginFrame

func (o *Output) BeginFrame() (backend.Frame, error)

func (*Output) CapFrameRate

func (o *Output) CapFrameRate(hz int)

func (*Output) ColorSets

func (o *Output) ColorSets() ColorSets

func (*Output) ColorTransform

func (o *Output) ColorTransform() backend.Matrix

func (*Output) Commit

func (o *Output) Commit(s backend.OutputState) error

func (*Output) ContentType

func (o *Output) ContentType() wm.ContentType

func (*Output) Cursor

func (o *Output) Cursor() *Cursor

func (*Output) CursorPlane

func (o *Output) CursorPlane() (backend.CursorPlane, error)

func (*Output) Degamma

func (o *Output) Degamma() []uint16

func (*Output) DegammaSize

func (o *Output) DegammaSize() int

func (*Output) Description

func (o *Output) Description() string

func (*Output) EnableColorTransform

func (o *Output) EnableColorTransform()

func (*Output) EnableHardwareClock

func (o *Output) EnableHardwareClock()

func (*Output) ExpectFrameWork

func (o *Output) ExpectFrameWork(pixels int)

func (*Output) FailCommits

func (o *Output) FailCommits(err error)

func (*Output) FailPresents

func (o *Output) FailPresents(err error)

func (*Output) FillFrame

func (o *Output) FillFrame(filled bool)

func (*Output) FillsFrame

func (o *Output) FillsFrame() bool

func (*Output) FlipOverlays

func (o *Output) FlipOverlays() (backend.OverlayFlip, error)

func (*Output) ForgetScanout

func (o *Output) ForgetScanout(backend.ScanoutKey) error

func (*Output) FrameOwed

func (o *Output) FrameOwed() bool

func (*Output) Frames

func (o *Output) Frames() uint64

func (*Output) Gamma

func (o *Output) Gamma() []uint16

func (*Output) GammaSize

func (o *Output) GammaSize() int

func (*Output) HDRCapabilities

func (o *Output) HDRCapabilities() (edid.HDR, error)

func (*Output) HDRCommits

func (o *Output) HDRCommits() uint64

func (*Output) HasColorTransform

func (o *Output) HasColorTransform() bool

func (*Output) Identity

func (*Output) Identity() edid.Info

func (*Output) Inherited

func (o *Output) Inherited() bool

func (*Output) LastDamage

func (o *Output) LastDamage() render.Region

func (*Output) LoseDeviceInFrame

func (o *Output) LoseDeviceInFrame()

func (*Output) Modes

func (o *Output) Modes() []backend.Mode

func (*Output) Name

func (o *Output) Name() string

func (*Output) OverlayFlips

func (o *Output) OverlayFlips() uint64

func (*Output) OverlayPlanes

func (o *Output) OverlayPlanes() int

func (*Output) OverlayTarget

func (o *Output) OverlayTarget() gpu.ScanoutTarget

func (*Output) PhysicalSize

func (o *Output) PhysicalSize() image.Point

func (*Output) Present

func (o *Output) Present(damage render.Region) error

func (*Output) Presents

func (o *Output) Presents() uint64

func (*Output) Primary

func (o *Output) Primary() (*soft.Buffer, error)

func (*Output) ScannedAt

func (o *Output) ScannedAt() backend.Placement

func (*Output) Scanout

func (o *Output) Scanout(_ backend.ScanoutKey, d gpu.DMABUF, at backend.Placement, release func() error, tear bool) (bool, error)

func (*Output) ScanoutFormats

func (o *Output) ScanoutFormats() gpu.ScanoutTarget

func (*Output) Scanouts

func (o *Output) Scanouts() uint64

func (*Output) ScheduleFrame

func (o *Output) ScheduleFrame() error

func (*Output) SetAdaptiveSync

func (o *Output) SetAdaptiveSync(on bool) error

func (*Output) SetColorTransform

func (o *Output) SetColorTransform(m backend.Matrix) error

func (*Output) SetContentType

func (o *Output) SetContentType(t wm.ContentType)

func (*Output) SetDegamma

func (o *Output) SetDegamma(ramps []uint16) error

func (*Output) SetDegammaSize

func (o *Output) SetDegammaSize(n int)

func (*Output) SetGamma

func (o *Output) SetGamma(ramps []uint16) error

func (*Output) SetGammaSize

func (o *Output) SetGammaSize(n int)

func (*Output) SetOverlays

func (o *Output) SetOverlays(layers []backend.Overlay) error

func (*Output) ShownOverlays

func (o *Output) ShownOverlays() []backend.Placement

func (*Output) ShowsClientBuffer

func (o *Output) ShowsClientBuffer() bool

func (*Output) Snapshot

func (o *Output) Snapshot() (*soft.Buffer, error)

func (*Output) Stalled

func (o *Output) Stalled() bool

func (*Output) State

func (o *Output) State() backend.OutputState

func (*Output) TakePresents

func (o *Output) TakePresents(n int)

func (*Output) Takeover

func (o *Output) Takeover() *soft.Buffer

func (*Output) TearFrame

func (o *Output) TearFrame(tear bool)

func (*Output) TearsFrames

func (o *Output) TearsFrames() bool

func (*Output) TestOverlays

func (o *Output) TestOverlays(layers []backend.Overlay) uint

func (*Output) Torn

func (o *Output) Torn() uint64

type Pointer

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

func (*Pointer) Axis

func (p *Pointer) Axis(orientation backend.Orientation, source backend.AxisSource, value float64, value120 int32) error

func (*Pointer) Button

func (p *Pointer) Button(button uint32, pressed bool) error

func (*Pointer) Capabilities

func (d *Pointer) Capabilities() backend.Capability

func (*Pointer) Frame

func (p *Pointer) Frame() error

func (*Pointer) GestureBegin

func (p *Pointer) GestureBegin(g backend.Gesture, fingers uint32) error

func (*Pointer) GestureEnd

func (p *Pointer) GestureEnd(g backend.Gesture, cancelled bool) error

func (*Pointer) GestureEndAt

func (p *Pointer) GestureEndAt(at time.Duration, g backend.Gesture, cancelled bool) error

func (*Pointer) Move

func (p *Pointer) Move(dx, dy float64) error

func (*Pointer) MoveTo

func (p *Pointer) MoveTo(o backend.Output, x, y float64) error

func (*Pointer) Name

func (d *Pointer) Name() string

func (*Pointer) Pinch

func (p *Pointer) Pinch(dx, dy, scale, rotation float64) error

func (*Pointer) Swipe

func (p *Pointer) Swipe(dx, dy float64) error

func (*Pointer) SwipeAt

func (p *Pointer) SwipeAt(at time.Duration, dx, dy float64) error

type Switches

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

func (*Switches) Capabilities

func (d *Switches) Capabilities() backend.Capability

func (*Switches) Name

func (d *Switches) Name() string

func (*Switches) Toggle

func (s *Switches) Toggle(kind backend.SwitchKind, on bool) error

type Touch

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

func (*Touch) Cancel

func (t *Touch) Cancel(id int32) error

func (*Touch) Capabilities

func (d *Touch) Capabilities() backend.Capability

func (*Touch) Down

func (t *Touch) Down(id int32, o backend.Output, x, y float64) error

func (*Touch) DownAt

func (t *Touch) DownAt(at time.Duration, id int32, o backend.Output, x, y float64) error

func (*Touch) Frame

func (t *Touch) Frame() error

func (*Touch) Motion

func (t *Touch) Motion(id int32, x, y float64) error

func (*Touch) MotionAt

func (t *Touch) MotionAt(at time.Duration, id int32, x, y float64) error

func (*Touch) Name

func (d *Touch) Name() string

func (*Touch) Up

func (t *Touch) Up(id int32) error

func (*Touch) UpAt

func (t *Touch) UpAt(at time.Duration, id int32) error

Jump to

Keyboard shortcuts

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