console

package
v0.0.0-...-4d8ea05 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package console allows working with Linux consoles in graphics mode, typically for using the Linux frame buffer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handle

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

A Handle represents an active Linux console.

func LeaseForGraphics

func LeaseForGraphics() (*Handle, error)

LeaseForGraphics opens the next free Linux console in graphics mode. You must call Cleanup() when done to switch back to the previous Linux console.

func (*Handle) Cleanup

func (h *Handle) Cleanup() error

Cleanup switches the current console from graphics mode back to text mode, then switches to the previous console, and finally disallocates the console.

func (*Handle) Redraw

func (h *Handle) Redraw() <-chan struct{}

Redraw returns a channel that signals a redraw to the frame buffer is necessary because the user switched away and then returned to this Linux console.

func (*Handle) Visible

func (h *Handle) Visible() bool

Visible returns whether this Linux console is currently visible.

Jump to

Keyboard shortcuts

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