-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathoverlay_mode.go
More file actions
27 lines (22 loc) · 791 Bytes
/
overlay_mode.go
File metadata and controls
27 lines (22 loc) · 791 Bytes
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 main
import (
"github.com/nsf/termbox-go"
)
//----------------------------------------------------------------------------
// overlay mode
//----------------------------------------------------------------------------
type overlay_mode interface {
needs_cursor() bool
cursor_position() (int, int)
exit()
draw()
on_resize(ev *termbox.Event)
on_key(ev *termbox.Event)
}
type stub_overlay_mode struct{}
func (stub_overlay_mode) needs_cursor() bool { return false }
func (stub_overlay_mode) cursor_position() (int, int) { return -1, -1 }
func (stub_overlay_mode) exit() {}
func (stub_overlay_mode) draw() {}
func (stub_overlay_mode) on_resize(ev *termbox.Event) {}
func (stub_overlay_mode) on_key(ev *termbox.Event) {}