Safe Haskell | None |
---|---|
Language | Haskell98 |
GLUT-based keyboard/mouse handling.
Sven Panne 2000 Sven.Panne@informatik.uni-muenchen.de
This provides a "still down" event in addition to GLUT's key/mouse button up/down events, and manages bindings from input events to actions.
- data Key :: *
- data KeyEvent
- type KeyBinder = Key -> KeyEvent -> Maybe InputHandler -> IO ()
- type InputHandler = Modifiers -> Position -> IO ()
- type StillDownHandler = IO ()
- glutInitInput :: IO (KeyBinder, StillDownHandler)
Documentation
data Key :: *
A generalized view of keys
type InputHandler = Modifiers -> Position -> IO () Source
type StillDownHandler = IO () Source
glutInitInput :: IO (KeyBinder, StillDownHandler) Source
Initialise the input system, which keeps a list of input event to action bindings and executes the the proper actions automatically. Returns a function for adding bindings, and another which should be called periodically (eg from refresh) to trigger still-down actions.