moto

package module
v0.0.0-...-2e419bb Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 9 Imported by: 0

README

moto

moto is a wlroots-inspired Go module for creating Wayland compositors. It attempts to be in as pure Go as possible, but some pieces, such as various backend, will likely be written in C. moto is still in very early development and is not yet ready for use.

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
}

func AutocreateBackend

func AutocreateBackend(display *Display) (*Backend, error)

type Compositor

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

func CreateCompositor

func CreateCompositor(display *Display, renderer *Renderer) *Compositor

type Display

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

Display is a Wayland display for clients to connect to. It handles running a socket, listening for connections, and dispatching events to the right places.

func NewDisplay

func NewDisplay() (*Display, error)

func (*Display) AddGlobal

func (d *Display) AddGlobal(inter string, version uint32, create func(state wire.State, id wire.NewID)) (name uint32)

func (*Display) NextSerial

func (d *Display) NextSerial() uint32

NextSerial increments the internal event serial count and returns the old value.

func (*Display) RemoveGlobal

func (d *Display) RemoveGlobal(name uint32)

func (*Display) Run

func (d *Display) Run(ctx context.Context)

Run runs the display's event loop. It blocks until the display exits either as a result of ctx being cancelled or the Display being closed. The Display should not be reused after this method has returned.

func (*Display) Serial

func (d *Display) Serial() uint32

Serial returns the current event serial.

type Renderer

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

func AutocreateRenderer

func AutocreateRenderer(backend *Backend) (*Renderer, error)

func (*Renderer) InitDisplay

func (r *Renderer) InitDisplay(display *Display)

Directories

Path Synopsis
cmd
internal
set

Jump to

Keyboard shortcuts

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