Documentation
¶
Overview ¶
AT-SPI2 client: enough of the D-Bus accessibility protocol to walk an app's accessible object tree and pull text + screen-space bounding boxes out of it, for overlaying real characters onto the bridge's raster capture (see docs/gui-bridge.md). Hand-rolled directly on godbus rather than a wrapper library — there's no mature Go AT-SPI client to depend on.
Spec references: GNOME devel-docs "AT-SPI2 D-Bus API", specifically the org.a11y.Bus, org.a11y.atspi.Accessible, org.a11y.atspi.Component, and org.a11y.atspi.Text interfaces.
Package bridge implements the GUI-TUI App Bridge's DisplayNest backend: arbitrary X11 GUI applications, nested in an off-screen Xvfb, captured and encoded into the same half-block cell representation every other graphical surface uses (see internal/gfx), with input remapped back in via XTest. See docs/gui-bridge.md.
Index ¶
- type BridgeSurface
- func (b *BridgeSurface) Close() error
- func (b *BridgeSurface) HandleInput(ev surface.InputEvent) error
- func (b *BridgeSurface) ID() string
- func (b *BridgeSurface) Kind() string
- func (b *BridgeSurface) MouseMode() int
- func (b *BridgeSurface) ProduceDiff() cell.Diff
- func (b *BridgeSurface) Resize(cols, rows int)
- func (b *BridgeSurface) Size() (cols, rows int)
- func (b *BridgeSurface) Snapshot() []cell.Cell
- func (b *BridgeSurface) Title() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeSurface ¶
type BridgeSurface struct {
// contains filtered or unexported fields
}
BridgeSurface hosts one bridged GUI app. Implements surface.Surface.
func New ¶
func New(id, command string, cols, rows int) (*BridgeSurface, error)
New spawns Xvfb, launches command against it, and starts capturing. cols/rows are the window's current content size.
func (*BridgeSurface) Close ¶
func (b *BridgeSurface) Close() error
func (*BridgeSurface) HandleInput ¶
func (b *BridgeSurface) HandleInput(ev surface.InputEvent) error
func (*BridgeSurface) ID ¶
func (b *BridgeSurface) ID() string
func (*BridgeSurface) Kind ¶
func (b *BridgeSurface) Kind() string
func (*BridgeSurface) MouseMode ¶
func (b *BridgeSurface) MouseMode() int
func (*BridgeSurface) ProduceDiff ¶
func (b *BridgeSurface) ProduceDiff() cell.Diff
func (*BridgeSurface) Resize ¶
func (b *BridgeSurface) Resize(cols, rows int)
Resize updates the cell grid the next capture resamples into. It never relaunches Xvfb or the guest process — relaunching on every window resize would kill the guest app's state for no real benefit, since EncodeHalfBlockFit already rescales the captured frame to whatever cols/rows the window has. When the new size would exceed the current (overscan-padded) capture buffer, it schedules a debounced live RANDR resize (growScreen, run from captureLoop) instead of leaving the guest painting at its original resolution forever.
func (*BridgeSurface) Size ¶
func (b *BridgeSurface) Size() (cols, rows int)
func (*BridgeSurface) Snapshot ¶
func (b *BridgeSurface) Snapshot() []cell.Cell
func (*BridgeSurface) Title ¶
func (b *BridgeSurface) Title() string