fb_visual

package
v0.0.0-...-062ff42 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fb_visual provides Go equivalents, for the following in the C based API to the Frame Buffer Device:

• FB_VISUAL_MONO01

• FB_VISUAL_MONO10

• FB_VISUAL_TRUECOLOR

• FB_VISUAL_PSEUDOCOLOR

• FB_VISUAL_DIRECTCOLOR

• FB_VISUAL_STATIC_PSEUDOCOLOR

• FB_VISUAL_FOURCC

It also provides a type to help working with this type of information easier.

Example Usage

var visual fb_visual.Type

// ...

switch visual {
case fb_visual.CodeMono01:
	//@TODO

case fb_visual.CodeMono10:
	//@TODO

case fb_visual.CodeTrueColor:
	//@TODO

case fb_visual.CodePseudoColor:
	//@TODO

case fb_visual.CodeDirectColor:
	//@TODO

case fb_visual.CodeStaticPseudoColor:
	//@TODO

case fb_visual.CodeFourCC:
	//@TODO

default:
	//@TODO

}

Compatibility

Note that this will work seamlessly with "database/sql", and anything that is compatibile with encoding.TextMarshaler & encoding.TextUnmarshaler, such as "encoding/json".

Index

Constants

View Source
const (
	CodeMono01            = uint32(0) // Monochr. 1=Black 0=White.           In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_MONO01.
	CodeMono10            = uint32(1) // Monochr. 1=White 0=Black.           In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_MONO10.
	CodeTrueColor         = uint32(2) // True color.                         In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_TRUECOLOR.
	CodePseudoColor       = uint32(3) // Pseudo color (like atari).          In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_PSEUDOCOLOR.
	CodeDirectColor       = uint32(4) // Direct color.                       In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_DIRECTCOLOR.
	CodeStaticPseudoColor = uint32(5) // Pseudo color readonly.              In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_STATIC_PSEUDOCOLOR.
	CodeFourCC            = uint32(6) // Visual identified by a V4L2 FOURCC. In the C based API to the Frame Buffer Device, this is equivalent to FB_VISUAL_FOURCC.
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

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

func (Type) Code

func (receiver Type) Code() uint32

Code returns the uint32 value.

func (Type) MarshalText

func (receiver Type) MarshalText() (text []byte, err error)

func (*Type) Scan

func (receiver *Type) Scan(value interface{}) error

func (Type) String

func (receiver Type) String() string

String returns a text representation of the value.

func (*Type) UnmarshalText

func (receiver *Type) UnmarshalText(text []byte) error

func (Type) Value

func (receiver Type) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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