Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FbBitField ¶
<linux/fb.h> struct fb_bitfield
Interpretation of offset for color fields: All offsets are from the right, inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you can use the offset as right argument to <<). A pixel afterwards is a bit stream and is written to video memory as that unmodified.
For pseudocolor: offset and length should be the same for all color components. Offset specifies the position of the least significant bit of the palette index in a pixel value. Length indicates the number of available palette entries (i.e. # of entries = 1 << length).
type FbFixScreenInfo ¶
type FbFixScreenInfo struct { // Screen ID, e.g. "TT Builtin" ID [16]byte // Frame buffer mem (physical address) SMemStart uintptr SMemLen uint32 // Framebuffer type (see FB_TYPE_*) Type uint32 // "Interleave for interleaved Planes" TypeAux uint32 // ??? (see FB_VISUAL_) Visual uint32 XPanStep uint16 YPanStep uint16 YWrapStep uint16 // Length of a line in bytes LineLength uint32 // Memory mapped I/O (physical address) MmioStart uintptr MmioLen uint32 // "Indicate to driver which specific chip/card we have" Accel uint32 // Capabilities (see FB_CAP_*) Capabilities uint16 // contains filtered or unexported fields }
<linux/fb.h> struct fb_fix_screeninfo
Fixed parameters of a screen
type FbVarScreenInfo ¶
type FbVarScreenInfo struct {
// Visible resolution
XRes, YRes uint32
// Virtual resolution
XResVirtual, YResVirtual uint32
// Offset from virtual to visible resolution
XOffset, YOffset uint32
// Number of bits per pixel in the buffer
BitsPerPixel uint32
// 0 = color, 1 = grayscale, >1 = FOURCC
Grayscale uint32
// Pixel format
Red, Green, Blue, Alpha FbBitField
// A value other than zero indicates a non-standard pixel format
NonStd uint32
// ??? (see FB_ACTIVATE_*)
Activate uint32
// Dimensions of picture in mm
Height, Width uint32
// Pixel clock in pico seconds
PixelClock uint32
// Time from sync to picture
LeftMargin uint32
// Time from picture to sync
RightMargin uint32
UpperMargin uint32
LowerMargin uint32
// Length of horizontal sync
HSyncLen uint32
// Length of vertical sync
VSyncLen uint32
// ??? (see FB_SYNC_*)
Sync uint32
// ??? (see FB_VMODE_*)
VMode uint32
// Angle we rotate counter clockwise
Rotate uint32
// Color space for FOURCC-based modes
ColorSpace uint32
// contains filtered or unexported fields
}
<linux/fb.h> struct fb_fix_screeninfo
Variable parameters of a screen
type FrameBuffer ¶
FrameBuffer is a wrapper around os.File that provides convenience methods for interacting with a frame buffer device.
func OpenFrameBuffer ¶
func OpenFrameBuffer(name string, flags int) (*FrameBuffer, error)
OpenFrameBuffer opens a frame buffer device.
func (*FrameBuffer) File ¶
func (fb *FrameBuffer) File() *os.File
File converts the frame buffer back to a file.
func (*FrameBuffer) FixScreenInfo ¶
func (fb *FrameBuffer) FixScreenInfo() (FbFixScreenInfo, error)
FixScreenInfo returns the fixed properties of the screen.
func (*FrameBuffer) Pixels ¶
func (fb *FrameBuffer) Pixels() ([]byte, error)
Pixels returns a byte slice memory mapped to the frame buffer.
func (*FrameBuffer) VarScreenInfo ¶
func (fb *FrameBuffer) VarScreenInfo() (FbVarScreenInfo, error)
VarScreenInfo returns the variable properties of the screen.
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
func (*Image) ColorModel ¶
ColorModel returns the color model of the frame buffer.
type TTY ¶
TTY is a wrapper around os.File that provides convenience methods for interacting with a TTY.
func (*TTY) GraphicsMode ¶
GraphicsMode puts the TTY in graphics mode.