i2vnc

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 20 Imported by: 0

README

//todo readme

Documentation

Index

Constants

View Source
const (
	X11WindowSystem         = iota
	LoggerFieldRemote       = "remote"
	LoggerFieldInput        = "input"
	LoggerFieldSource       = "source"
	LoggerFieldEvent        = "event"
	LoggerFieldEventKey     = "key"
	LoggerFieldEventButton  = "button"
	LoggerFieldName         = "name"
	LoggerFieldEventIsPress = "isPress"
	LoggerFieldEventCoords  = "coords"
	LoggerFieldEventX11     = "x11"
)

Variables

This section is empty.

Functions

func DebugEvent

func DebugEvent(l *logrus.Entry, source string, isKey bool, name string, x, y uint16, isPress bool)

func DebugX11Event

func DebugX11Event(l *logrus.Entry, source string, state uint16, keycode xproto.Keycode, button uint8, x, y int16, isPress bool)

func StringInSlice

func StringInSlice(s string, slice []string) bool

Types

type Config

type Config map[string]configItem

func LoadConfig

func LoadConfig(path string) (Config, error)

type EventDef

type EventDef struct {
	Name    string
	Key     uint32
	Button  uint8
	IsKey   bool
	IsPress bool
}

type Input

type Input interface {
	Grab() error
	Ungrab() error
	Screen() Screen
}

type MockRemote

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

func NewMockRemote

func NewMockRemote(l *logrus.Entry) *MockRemote

func (MockRemote) ScreenH

func (r MockRemote) ScreenH() uint16

func (MockRemote) ScreenW

func (r MockRemote) ScreenW() uint16

func (MockRemote) SendKeyEvent

func (r MockRemote) SendKeyEvent(name string, key uint32, isPress bool) error

func (MockRemote) SendPointerEvent

func (r MockRemote) SendPointerEvent(name string, button uint8, x, y uint16, isPress bool) error

type Remote

type Remote interface {
	IsConnected() bool
	Connect(cname string, timeout time.Duration) error
	Disconnect() error
	Screen() Screen
	SendKeyEvent(name string, key uint32, isPress bool) error
	SendPointerEvent(name string, button uint8, x, y uint16, isPress bool) error
}

type Screen

type Screen struct {
	X uint16
	Y uint16
}

type VncRemote

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

func NewVncRemote

func NewVncRemote(logger *logrus.Logger, config Config) *VncRemote

func (*VncRemote) Connect

func (r *VncRemote) Connect(cname string, timeout time.Duration) error

func (*VncRemote) Disconnect

func (r *VncRemote) Disconnect() error

func (*VncRemote) IsConnected

func (r *VncRemote) IsConnected() bool

func (*VncRemote) Screen

func (r *VncRemote) Screen() Screen

func (*VncRemote) SendKeyEvent

func (r *VncRemote) SendKeyEvent(name string, key uint32, isPress bool) error

func (*VncRemote) SendPointerEvent

func (r *VncRemote) SendPointerEvent(name string, button uint8, x, y uint16, isPress bool) error

type WindowSystem

type WindowSystem uint8

type X11Input

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

func NewX11Input

func NewX11Input(logger *logrus.Logger, r Remote, c Config, forever bool) (*X11Input, error)

func (*X11Input) Grab

func (i *X11Input) Grab() error

func (*X11Input) Screen

func (i *X11Input) Screen() Screen

func (*X11Input) Ungrab

func (i *X11Input) Ungrab() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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