broadcast cursor position via WebSockets.

This commit is contained in:
Miroslav Šedivý
2021-02-11 18:36:27 +01:00
parent e8286dec96
commit f22922191a
5 changed files with 61 additions and 1 deletions

View File

@ -48,6 +48,7 @@ type DesktopManager interface {
// xorg
Move(x, y int)
GetMousePositon() (x, y int)
Scroll(x, y int)
ButtonDown(code int) error
KeyDown(code uint64) error

View File

@ -47,7 +47,8 @@ const (
)
const (
CURSOR_IMAGE = "cursor/image"
CURSOR_IMAGE = "cursor/image"
CURSOR_POSITION = "cursor/position"
)
const (

View File

@ -172,6 +172,13 @@ type CursorImage struct {
Y uint16 `json:"y"`
}
type CursorPosition struct {
Event string `json:"event,omitempty"`
MemberId string `json:"member_id"`
X uint16 `json:"x"`
Y uint16 `json:"y"`
}
/////////////////////////////
// Broadcast
/////////////////////////////