avyos.dev/pkg/graphics/backend/wayland
package wayland
Package Overview
No package-level documentation is provided.
| Export Group | Count |
|---|---|
| Constants | 0 |
| Variables | 0 |
| Functions | 0 |
| Types | 1 |
Types
Backend
type Backend struct {
// contains filtered or unexported fields
}Backend implements graphics.Backend and graphics.InputHandler for Wayland.
Functions
func New() *BackendNew creates a new Wayland backend.
Methods
func (b *Backend) Buffer() *graphics.BufferBuffer returns the back buffer for drawing.
func (b *Backend) Close() errorClose cleans up the Wayland connection.
func (b *Backend) Flush() errorFlush copies the entire back buffer to the Wayland surface.
func (b *Backend) FlushRect(r graphics.Rect) errorFlushRect commits a damaged region to the Wayland surface.
func (b *Backend) HasSystemCursor() boolHasSystemCursor returns true since Wayland compositors provide cursors.
func (b *Backend) Info() stringInfo returns information about the Wayland backend.
func (b *Backend) MousePosition() (int, int)MousePosition returns the last known mouse position.
func (b *Backend) Open() errorOpen connects to the Wayland compositor and creates a window.
func (b *Backend) Poll() *graphics.EventPoll 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.