avyos.dev/pkg/graphics/backend/framebuffer

package framebuffer

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

New

func New() *Backend

New creates a new framebuffer backend.

Methods

Buffer

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

Buffer returns the back buffer for drawing.

Close

func (b *Backend) Close() error

Close closes the framebuffer device and restores text mode.

Flush

func (b *Backend) Flush() error

Flush copies the entire back buffer to the screen.

FlushRect

func (b *Backend) FlushRect(r image.Rectangle) error

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

FlushRects

func (b *Backend) FlushRects(rects []image.Rectangle) error

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

HasSystemCursor

func (b *Backend) HasSystemCursor() bool

HasSystemCursor returns false since the framebuffer has no system cursor.

Info

func (b *Backend) Info() string

Info returns information about the framebuffer.

Open

func (b *Backend) Open() error

Open opens the framebuffer device.

OpenDevice

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

OpenDevice opens a specific framebuffer device.

PixelFormat

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

PixelFormat returns the detected pixel format.

Size

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

Size returns the screen dimensions.

Start

func (b *Backend) Start()

Start is a no-op for the framebuffer backend.