File: GraphicsEvent.hs

package info (click to toggle)
hugs 1.4.199801-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 7,220 kB
  • ctags: 5,609
  • sloc: ansic: 32,083; haskell: 12,143; yacc: 949; perl: 823; sh: 602; makefile: 236
file content (23 lines) | stat: -rw-r--r-- 627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
module GraphicsEvent(
	Event(..)
	) where
import GraphicsTypes( Point )

-- We probably need a lot more info about the event 
-- but this will do for now.

----------------------------------------------------------------
-- The interface
----------------------------------------------------------------

data Event 
  = Key       { char :: Char, isDown :: Bool }
  | Button    { pt :: Point, isLeft, isDown :: Bool }
  | MouseMove { pt :: Point }
  | Resize
  | Closed
 deriving Show 

----------------------------------------------------------------
-- The end
----------------------------------------------------------------