avyos.dev/pkg/graphics/backend/framebuffer
package framebuffer
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 represents the Linux framebuffer backend.
Functions
New
func New() *BackendNew creates a new framebuffer backend.
Methods
Buffer
func (b *Backend) Buffer() *core.BufferBuffer returns the back buffer for drawing.
Close
func (b *Backend) Close() errorClose closes the framebuffer device and restores text mode.
Flush
func (b *Backend) Flush() errorFlush copies the entire back buffer to the screen.
FlushRect
func (b *Backend) FlushRect(r image.Rectangle) errorFlushRect copies only the given rectangle from the back buffer to the screen.
FlushRects
func (b *Backend) FlushRects(rects []image.Rectangle) errorFlushRects copies multiple rectangles from the back buffer to the screen.
HasSystemCursor
func (b *Backend) HasSystemCursor() boolHasSystemCursor returns false since the framebuffer has no system cursor.
Info
func (b *Backend) Info() stringInfo returns information about the framebuffer.
Open
func (b *Backend) Open() errorOpen opens the framebuffer device.
OpenDevice
func (b *Backend) OpenDevice(device string) errorOpenDevice opens a specific framebuffer device.
PixelFormat
func (b *Backend) PixelFormat() core.PixelFormatPixelFormat 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.