avyos.dev/pkg/graphics/backend/wayland

package wayland

Package Overview

No package-level documentation is provided.

Export GroupCount
Constants0
Variables0
Functions0
Types1

Types

Backend

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

Backend implements graphics.Backend and graphics.InputHandler for Wayland.

Functions

func New() *Backend

New creates a new Wayland backend.

Methods

func (b *Backend) Buffer() *graphics.Buffer

Buffer returns the back buffer for drawing.

func (b *Backend) Close() error

Close cleans up the Wayland connection.

func (b *Backend) Flush() error

Flush copies the entire back buffer to the Wayland surface.

func (b *Backend) FlushRect(r graphics.Rect) error

FlushRect commits a damaged region to the Wayland surface.

func (b *Backend) HasSystemCursor() bool

HasSystemCursor returns true since Wayland compositors provide cursors.

func (b *Backend) Info() string

Info returns information about the Wayland backend.

func (b *Backend) MousePosition() (int, int)

MousePosition returns the last known mouse position.

func (b *Backend) Open() error

Open connects to the Wayland compositor and creates a window.

func (b *Backend) Poll() *graphics.Event

Poll returns the next event or nil.

func (b *Backend) SetScreenSize(_, _ int)

SetScreenSize is a no-op for Wayland (window-based, not screen-based).

func (b *Backend) SetTitle(title string)

SetTitle sets the window title (must be called before Open).

func (b *Backend) Size() (int, int)

Size returns the window dimensions.

func (b *Backend) Start()

Start begins the event dispatch goroutine.