avyos.dev/pkg/graphics/backend/wayland
package wayland
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 the display backend and input handler interfaces for Wayland.
Functions
New
func New() *BackendNew creates a new Wayland backend.
Methods
Buffer
func (b *Backend) Buffer() *core.BufferBuffer returns the back buffer for drawing.
Close
func (b *Backend) Close() errorClose cleans up the Wayland connection.
Flush
func (b *Backend) Flush() errorFlush copies the entire back buffer to the Wayland surface.
FlushRect
func (b *Backend) FlushRect(r image.Rectangle) errorFlushRect commits a damaged region to the Wayland surface.
HasSystemCursor
func (b *Backend) HasSystemCursor() boolHasSystemCursor returns true since Wayland compositors provide cursors.
Info
func (b *Backend) Info() stringInfo returns information about the Wayland backend.
MousePosition
func (b *Backend) MousePosition() (int, int)MousePosition returns the last known mouse position.
Open
func (b *Backend) Open() errorOpen connects to the Wayland compositor and creates a window.
Poll
func (b *Backend) Poll() *gfxinput.EventPoll returns the next event or nil.
SetScreenSize
func (b *Backend) SetScreenSize(_, _ int)SetScreenSize is a no-op for Wayland (window-based, not screen-based).
SetTitle
func (b *Backend) SetTitle(title string)SetTitle sets the window title (must be called before Open).
Size
func (b *Backend) Size() (int, int)Size returns the window dimensions.
Start
func (b *Backend) Start()Start begins the event dispatch goroutine.