diff options
Diffstat (limited to 'src/pkg/exp/draw/event.go')
| -rw-r--r-- | src/pkg/exp/draw/event.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pkg/exp/draw/event.go b/src/pkg/exp/draw/event.go index 8a148bd48..155922d1c 100644 --- a/src/pkg/exp/draw/event.go +++ b/src/pkg/exp/draw/event.go @@ -7,10 +7,10 @@ package draw // A Context represents a single graphics window. type Context interface { // Screen returns an editable Image of window. - Screen() Image; + Screen() Image // FlushImage flushes changes made to Screen() back to screen. - FlushImage(); + FlushImage() // KeyboardChan returns a channel carrying keystrokes. // An event is sent each time a key is pressed or released. @@ -18,29 +18,29 @@ type Context interface { // 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; + 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; + 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; + 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; + 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 + Buttons int // bit mask of buttons: 1<<0 is left, 1<<1 middle, 1<<2 right + Point // location of cursor + Nsec int64 // time stamp } |
