File: raw.go

package info (click to toggle)
golang-github-zyedidia-tcell 2.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 716 kB
  • sloc: sh: 16; makefile: 2
file content (27 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package tcell

import "time"

// EventRaw is an event where tcell was not able to
// parse the escape sequence, so the escape sequence is
// sent directly to the application
type EventRaw struct {
	t   time.Time
	esc string // The escape code
}

// When returns the time when this EventMouse was created.
func (ev *EventRaw) When() time.Time {
	return ev.t
}

func (ev *EventRaw) EscSeq() string {
	return ev.esc
}

func NewEventRaw(code string) *EventRaw {
	return &EventRaw{
		t:   time.Now(),
		esc: code,
	}
}