gymvnc

package
v0.4.17-0...-3974de3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: MIT Imports: 8 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLogging

func ConfigureLogging()

func NewSessionMgr

func NewSessionMgr() *sessionMgr

Types

type KeyEvent

type KeyEvent struct {
	Keysym uint32
	Down   bool
}

func (KeyEvent) Execute

func (k KeyEvent) Execute(c *vncclient.ClientConn) error

type PointerEvent

type PointerEvent struct {
	Mask vncclient.ButtonMask
	X, Y uint16
}

func (PointerEvent) Execute

func (k PointerEvent) Execute(c *vncclient.ClientConn) error

type Region

type Region struct {
	X, Y, Width, Height uint16
}

type Renderer

type Renderer interface {
	Init(width, height uint16, name string, screen []vncclient.Color) error
	Apply(colors []*vncclient.FramebufferUpdateMessage)
	Render()
	Close() error
}

type Screen

type Screen struct {
	Data   []vncclient.Color
	Width  uint16
	Height uint16
}

func NewScreen

func NewScreen(width, height uint16) *Screen

type VNCBatch

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

func NewVNCBatch

func NewVNCBatch() *VNCBatch

func (*VNCBatch) Close

func (v *VNCBatch) Close(name string) error

func (*VNCBatch) Flip

func (v *VNCBatch) Flip() (screens []*Screen, updates [][]*vncclient.FramebufferUpdateMessage)

func (*VNCBatch) Open

func (v *VNCBatch) Open(name string, config VNCSessionConfig) error

func (*VNCBatch) Peek

func (v *VNCBatch) Peek() (screens []*Screen)

func (*VNCBatch) PeekBack

func (v *VNCBatch) PeekBack() (screens []*Screen)

func (*VNCBatch) Render

func (v *VNCBatch) Render(name string, close bool) error

func (*VNCBatch) SetRenderer

func (v *VNCBatch) SetRenderer(name string, renderer Renderer) error

func (*VNCBatch) SetSubscription

func (v *VNCBatch) SetSubscription(name string, subs []Region) error

func (*VNCBatch) Step

func (v *VNCBatch) Step(actions map[string][]VNCEvent) (map[string]*Screen, map[string][]*vncclient.FramebufferUpdateMessage, map[string]error)

type VNCEvent

type VNCEvent interface {
	Execute(c *vncclient.ClientConn) error
}

type VNCSession

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

func NewVNCSession

func NewVNCSession(name string, c VNCSessionConfig) *VNCSession

func (*VNCSession) Close

func (c *VNCSession) Close() error

func (*VNCSession) Flip

If rendering, must call from main thread

func (*VNCSession) Render

func (c *VNCSession) Render(close bool) error

Must call from main thread

func (*VNCSession) SetRenderer

func (c *VNCSession) SetRenderer(renderer Renderer) error

func (*VNCSession) SetSubscription

func (c *VNCSession) SetSubscription(subs []Region)

func (*VNCSession) Step

type VNCSessionConfig

type VNCSessionConfig struct {
	Address  string
	Password string
	Encoding string

	QualityLevel     int // 0-9, 9 being top quality. Not orthogonal to FineQualityLevel/SubsampleLevel, see https://github.com/TurboVNC/turbovnc/blob/master/unix/Xvnc/programs/Xserver/hw/vnc/rfbserver.c#L1103-L1112
	CompressLevel    int // 0-9, 9 being highest compression
	FineQualityLevel int // 0-100, 100 being top quality
	SubsampleLevel   int // 0-3, 3 being grayscale; 0 being full color

	StartTimeout time.Duration
	Subscription []Region
}

Jump to

Keyboard shortcuts

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