wayland

package
v0.0.0-...-ba0b20d Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

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
}

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

func New

func New() *Backend

New creates a new Wayland backend.

func (*Backend) Buffer

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

Buffer returns the back buffer for drawing.

func (*Backend) Close

func (b *Backend) Close() error

Close cleans up the Wayland connection.

func (*Backend) Flush

func (b *Backend) Flush() error

Flush copies the entire back buffer to the Wayland surface.

func (*Backend) FlushRect

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

FlushRect commits a damaged region to the Wayland surface.

func (*Backend) HasSystemCursor

func (b *Backend) HasSystemCursor() bool

HasSystemCursor returns true since Wayland compositors provide cursors.

func (*Backend) Info

func (b *Backend) Info() string

Info returns information about the Wayland backend.

func (*Backend) MousePosition

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

MousePosition returns the last known mouse position.

func (*Backend) Open

func (b *Backend) Open() error

Open connects to the Wayland compositor and creates a window.

func (*Backend) Poll

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

Poll returns the next event or nil.

func (*Backend) SetScreenSize

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

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

func (*Backend) SetTitle

func (b *Backend) SetTitle(title string)

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

func (*Backend) Size

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

Size returns the window dimensions.

func (*Backend) Start

func (b *Backend) Start()

Start begins the event dispatch goroutine.

Jump to

Keyboard shortcuts

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