summaryrefslogtreecommitdiff
path: root/usr/rsc/draw/event.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-14 17:15:56 -0700
committerRuss Cox <rsc@golang.org>2009-10-14 17:15:56 -0700
commit77d381a6c6fe98996bc2bb7b3fdf6da7f44e29b0 (patch)
treec2144600709b1c369824b1e1a22ee16a993f2f0f /usr/rsc/draw/event.go
parente43c21da3797116918539a5ad33aa92e8fb1e244 (diff)
downloadgolang-77d381a6c6fe98996bc2bb7b3fdf6da7f44e29b0.tar.gz
move draw to exp
R=r DELTA=942 (471 added, 471 deleted, 0 changed) OCL=35733 CL=35740
Diffstat (limited to 'usr/rsc/draw/event.go')
-rw-r--r--usr/rsc/draw/event.go47
1 files changed, 0 insertions, 47 deletions
diff --git a/usr/rsc/draw/event.go b/usr/rsc/draw/event.go
deleted file mode 100644
index b5bce5078..000000000
--- a/usr/rsc/draw/event.go
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package draw
-
-// A Context represents a single graphics window.
-type Context interface {
- // Screen returns an editable Image of window.
- Screen() Image;
-
- // FlushImage flushes changes made to Screen() back to screen.
- FlushImage();
-
- // KeyboardChan returns a channel carrying keystrokes.
- // An event is sent each time a key is pressed or released.
- // The value k represents key k being pressed.
- // The value -k represents key k being released.
- // The specific set of key values is not specified,
- // but ordinary character represent themselves.
- KeyboardChan() <-chan int;
-
- // MouseChan returns a channel carrying mouse events.
- // A new event is sent each time the mouse moves or a
- // button is pressed or released.
- MouseChan() <-chan Mouse;
-
- // ResizeChan returns a channel carrying resize events.
- // An event is sent each time the window is resized;
- // the client should respond by calling Screen() to obtain
- // the new screen image.
- // The value sent on the channel is always ``true'' and can be ignored.
- ResizeChan() <-chan bool;
-
- // QuitChan returns a channel carrying quit requests.
- // After reading a value from the quit channel, the application
- // should exit.
- QuitChan() <-chan bool;
-}
-
-// A Mouse represents the state of the mouse.
-type Mouse struct {
- Buttons int; // bit mask of buttons: 1<<0 is left, 1<<1 middle, 1<<2 right
- Point; // location of cursor
- Nsec int64; // time stamp
-}
-