rfb

package
v0.0.0-...-8ac97a3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PixelFormatEncodingLength              = 16
	FramebufferUpdateRequestEncodingLength = 9
	KeyEventEncodingLength                 = 7
	PointerEventEncodingLength             = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FramebufferUpdate

type FramebufferUpdate struct {
	Rectangles []*FramebufferUpdateRect
}

func (*FramebufferUpdate) Write

func (u *FramebufferUpdate) Write(w io.Writer, bo binary.ByteOrder) error

type FramebufferUpdateRect

type FramebufferUpdateRect struct {
	X            uint16
	Y            uint16
	Width        uint16
	Height       uint16
	EncodingType uint32 // Unsigned per spec, but often interpreted signed
	PixelData    []byte
}

func (*FramebufferUpdateRect) Read

func (rect *FramebufferUpdateRect) Read(r io.Reader, bo binary.ByteOrder, pixelFormat PixelFormat) error

type FramebufferUpdateRequest

type FramebufferUpdateRequest struct {
	Incremental bool
	X           uint16
	Y           uint16
	Width       uint16
	Height      uint16
}

func (*FramebufferUpdateRequest) Read

func (r *FramebufferUpdateRequest) Read(buf []byte, bo binary.ByteOrder)

buf must contain at least FramebufferUpdateRequestEncodingLength bytes.

func (*FramebufferUpdateRequest) Write

func (r *FramebufferUpdateRequest) Write(buf []byte, bo binary.ByteOrder)

buf must contain at least FramebufferUpdateRequestEncodingLength bytes.

type KeyEvent

type KeyEvent struct {
	Pressed bool
	KeySym  uint32
}

func (*KeyEvent) Read

func (e *KeyEvent) Read(buf []byte, bo binary.ByteOrder)

buf must contain at least KeyEventEncodingLength bytes.

type PixelFormat

type PixelFormat struct {
	BitsPerPixel uint8
	BitDepth     uint8
	BigEndian    bool
	TrueColor    bool

	RedMax     uint16
	GreenMax   uint16
	BlueMax    uint16
	RedShift   uint8
	GreenShift uint8
	BlueShift  uint8
}

func (*PixelFormat) Read

func (pf *PixelFormat) Read(buf []byte, bo binary.ByteOrder)

buf must contain at least PixelFormatEncodingLength bytes.

func (*PixelFormat) Write

func (pf *PixelFormat) Write(buf []byte, bo binary.ByteOrder)

buf must contain at least PixelFormatEncodingLength bytes.

type PixelFormatImage

type PixelFormatImage struct {
	Pix         []uint8
	Rect        image.Rectangle
	PixelFormat PixelFormat
}

func NewPixelFormatImage

func NewPixelFormatImage(pixelFormat PixelFormat, bounds image.Rectangle) *PixelFormatImage

func (*PixelFormatImage) At

func (img *PixelFormatImage) At(x, y int) color.Color

func (*PixelFormatImage) Bounds

func (img *PixelFormatImage) Bounds() image.Rectangle

func (*PixelFormatImage) ColorModel

func (img *PixelFormatImage) ColorModel() color.Model

func (*PixelFormatImage) Set

func (img *PixelFormatImage) Set(x, y int, c color.Color)

type PointerEvent

type PointerEvent struct {
	ButtonMask uint8
	X          uint16
	Y          uint16
}

func (*PointerEvent) Read

func (e *PointerEvent) Read(buf []byte, bo binary.ByteOrder)

buf must contain at least PointerEventEncodingLength bytes.

Jump to

Keyboard shortcuts

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