gloss-1.12.0.0: Painless 2D vector graphics, animations and simulations.

Safe HaskellNone
LanguageHaskell98

Graphics.Gloss.Interface.IO.Interact

Description

Display mode is for drawing a static picture.

Synopsis

Documentation

interactIO Source #

Arguments

:: Display

Display mode.

-> Color

Background color.

-> world

Initial world state.

-> (world -> IO Picture)

A function to produce the current picture.

-> (Event -> world -> IO world)

A function to handle input events.

-> (Controller -> IO ())

Callback to take the display controller.

-> IO () 

Open a new window and interact with an infrequently updated picture.

Similar to displayIO, except that you manage your own events.

data Controller Source #

Functions to asynchronously control a Gloss display.

Constructors

Controller 

Fields

data Event Source #

Possible input events.

Instances

Eq Event Source # 

Methods

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

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

Show Event Source # 

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

data Key Source #

Instances

Eq Key Source # 

Methods

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

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

Ord Key Source # 

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 Source # 

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #