payload

package
v1.6.18 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OP_MOVE     = 0x01
	OP_SCROLL   = 0x02
	OP_KEY_DOWN = 0x03
	OP_KEY_UP   = 0x04
	OP_BTN_DOWN = 0x05
	OP_BTN_UP   = 0x06
	OP_PING     = 0x07
	// touch events
	OP_TOUCH_BEGIN  = 0x08
	OP_TOUCH_UPDATE = 0x09
	OP_TOUCH_END    = 0x0a
)
View Source
const (
	OP_CURSOR_POSITION = 0x01
	OP_CURSOR_IMAGE    = 0x02
	OP_PONG            = 0x03
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorImage

type CursorImage struct {
	Width  uint16
	Height uint16
	Xhot   uint16
	Yhot   uint16
}

type CursorPosition

type CursorPosition struct {
	X uint16
	Y uint16
}
type Header struct {
	Event  uint8
	Length uint16
}

type Key

type Key struct {
	Key uint32
}

type Move

type Move struct {
	X uint16
	Y uint16
}

type Ping added in v1.6.7

type Ping struct {
	// client's timestamp split into two uint32
	ClientTs1 uint32
	ClientTs2 uint32
}

func (Ping) ClientTs added in v1.6.7

func (p Ping) ClientTs() uint64

type Pong added in v1.6.7

type Pong struct {
	Ping

	// server's timestamp split into two uint32
	ServerTs1 uint32
	ServerTs2 uint32
}

func (Pong) ServerTs added in v1.6.7

func (p Pong) ServerTs() uint64

type Scroll

type Scroll struct {
	DeltaX     int16
	DeltaY     int16
	ControlKey bool
}

type Scroll_Old added in v1.6.15

type Scroll_Old struct {
	X int16
	Y int16
}

TODO: remove this once the client is fixed

type Touch added in v1.6.14

type Touch struct {
	TouchId  uint32
	X        int32
	Y        int32
	Pressure uint8
}

Jump to

Keyboard shortcuts

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