summaryrefslogtreecommitdiff
path: root/redo/zz_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'redo/zz_test.go')
-rw-r--r--redo/zz_test.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/redo/zz_test.go b/redo/zz_test.go
index 2c1a044..c54c614 100644
--- a/redo/zz_test.go
+++ b/redo/zz_test.go
@@ -10,6 +10,8 @@ import (
"reflect"
"testing"
"image"
+ "image/color"
+ "image/draw"
)
var closeOnClick = flag.Bool("close", false, "close on click")
@@ -43,10 +45,12 @@ type testwin struct {
type areaHandler struct{}
func (a *areaHandler) Paint(r image.Rectangle) *image.RGBA {
- return image.NewRGBA(r)
+ i := image.NewRGBA(r)
+ draw.Draw(i, r, &image.Uniform{color.RGBA{128,0,128,255}}, image.ZP, draw.Src)
+ return i
}
-func (a *areaHandler) Mouse(me MouseEvent) bool { return false }
-func (a *areaHandler) Key(ke KeyEvent) bool { return false }
+func (a *areaHandler) Mouse(me MouseEvent) bool { fmt.Printf("%#v\n", me); return false }
+func (a *areaHandler) Key(ke KeyEvent) bool { fmt.Printf("%#v\n", ke); return false }
func (tw *testwin) make(done chan struct{}) {
tw.t = NewTab()