avyos.dev/pkg/graphics/backend/framebuffer

package framebuffer

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 represents the Linux framebuffer backend.

Functions

func New() *Backend

New creates a new framebuffer backend.

Methods

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

Buffer returns the back buffer for drawing.

func (b *Backend) Close() error

Close closes the framebuffer device and restores text mode.

func (b *Backend) Flush() error

Flush copies the entire back buffer to the screen.

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

FlushRect copies only the given rectangle from the back buffer to the screen.

func (b *Backend) FlushRects(rects []graphics.Rect) error

FlushRects copies multiple rectangles from the back buffer to the screen.

func (b *Backend) HasSystemCursor() bool

HasSystemCursor returns false since the framebuffer has no system cursor.

func (b *Backend) Info() string

Info returns information about the framebuffer.

func (b *Backend) Open() error

Open opens the framebuffer device.

func (b *Backend) OpenDevice(device string) error

OpenDevice opens a specific framebuffer device.

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

PixelFormat returns the detected pixel format.

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

Size returns the screen dimensions.

func (b *Backend) Start()

Start is a no-op for the framebuffer backend.