Inactive cursors - multiple positions.

This commit is contained in:
Miroslav Šedivý
2021-11-12 15:27:05 +00:00
parent 8dbe0d1d2d
commit 097e8d2a87
4 changed files with 26 additions and 22 deletions

View File

@ -88,10 +88,9 @@ type SessionData struct {
State types.SessionState `json:"state"`
}
type SessionCursor struct {
ID string `json:"id"`
X uint16 `json:"x"`
Y uint16 `json:"y"`
type SessionCursors struct {
ID string `json:"id"`
Cursors []types.Cursor `json:"cursors"`
}
/////////////////////////////

View File

@ -13,8 +13,8 @@ var (
)
type Cursor struct {
X int
Y int
X int `json:"x"`
Y int `json:"y"`
}
type SessionState struct {
@ -56,7 +56,7 @@ type SessionManager interface {
ClearHost()
SetCursor(cursor Cursor, session Session)
PopCursors() map[Session]Cursor
PopCursors() map[Session][]Cursor
Broadcast(event string, payload interface{}, exclude interface{})
AdminBroadcast(event string, payload interface{}, exclude interface{})