diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-01 23:34:26 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-01 23:34:26 -0400 |
| commit | 370649ec51fabbd3f68c680b65551a3225abcd49 (patch) | |
| tree | 8b82d2452c794b81c3f99ed02717a58df3597df3 | |
| parent | 7e5a810e51d8d39dc20e8f94d55ca24de79214e8 (diff) | |
Decided to drop the whole handled thing with Area events and just continue the event chain if needed. Same for MousEvent; will have to document that. This is just the test program for now.
| -rw-r--r-- | test/kbtest.go | 6 | ||||
| -rw-r--r-- | test/main.go | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/kbtest.go b/test/kbtest.go index 120a5fc..6765c49 100644 --- a/test/kbtest.go +++ b/test/kbtest.go @@ -44,7 +44,7 @@ func markkey(dest *image.RGBA, keypt image.Point, m Modifiers) { draw.Draw(dest, xr, xi, image.ZP, draw.Over) } -func (a *keyboardArea) Key(e KeyEvent) (handled bool, repaint bool) { +func (a *keyboardArea) Key(e KeyEvent) (repaint bool) { a.lock.Lock() defer a.lock.Unlock() @@ -68,9 +68,9 @@ func (a *keyboardArea) Key(e KeyEvent) (handled bool, repaint bool) { markkey(a.kbd, modpoints[Super], m &^ Super) } default: - return false, false + return false } - return true, true + return true } var doKeyboard = flag.Bool("kb", false, "run keyboard test (overrides -areabounds)") diff --git a/test/main.go b/test/main.go index 340c56f..674e7dc 100644 --- a/test/main.go +++ b/test/main.go @@ -164,9 +164,9 @@ func (a *areaHandler) Mouse(e MouseEvent) bool { fmt.Printf("%#v\n", e) return false } -func (a *areaHandler) Key(e KeyEvent) (bool, bool) { +func (a *areaHandler) Key(e KeyEvent) bool { fmt.Printf("%#v %q\n", e, e.Key) - return false, false + return false } var doArea = flag.Bool("area", false, "run area test instead (overrides -kb and -areabounds)") |
