FunGEn-1.0.1: A lightweight, cross-platform, OpenGL/GLUT-based game engine.

Safe HaskellNone
LanguageHaskell98

Graphics.UI.GLUT.Input

Description

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.

Synopsis

Documentation

data Key :: * #

A generalized view of keys

Instances

Eq Key 

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Ord Key 

Methods

compare :: Key -> Key -> Ordering #

(<) :: Key -> Key -> Bool #

(<=) :: Key -> Key -> Bool #

(>) :: Key -> Key -> Bool #

(>=) :: Key -> Key -> Bool #

max :: Key -> Key -> Key #

min :: Key -> Key -> Key #

Show Key 

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

data KeyEvent Source #

Constructors

Press 
StillDown 
Release 

Instances

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.