Safe Haskell | None |
---|---|
Language | Haskell2010 |
Display mode is for drawing a static picture.
Synopsis
- module Graphics.Gloss.Data.Display
- module Graphics.Gloss.Data.Picture
- module Graphics.Gloss.Data.Color
- interactIO :: Display -> Color -> world -> (world -> IO Picture) -> (Event -> world -> IO world) -> (Controller -> IO ()) -> IO ()
- data Controller = Controller {
- controllerSetRedraw :: IO ()
- controllerModifyViewPort :: (ViewPort -> IO ViewPort) -> IO ()
- data Event
- data Key
- data SpecialKey
- = KeyUnknown
- | KeySpace
- | KeyEsc
- | KeyF1
- | KeyF2
- | KeyF3
- | KeyF4
- | KeyF5
- | KeyF6
- | KeyF7
- | KeyF8
- | KeyF9
- | KeyF10
- | KeyF11
- | KeyF12
- | KeyF13
- | KeyF14
- | KeyF15
- | KeyF16
- | KeyF17
- | KeyF18
- | KeyF19
- | KeyF20
- | KeyF21
- | KeyF22
- | KeyF23
- | KeyF24
- | KeyF25
- | KeyUp
- | KeyDown
- | KeyLeft
- | KeyRight
- | KeyTab
- | KeyEnter
- | KeyBackspace
- | KeyInsert
- | KeyNumLock
- | KeyBegin
- | KeyDelete
- | KeyPageUp
- | KeyPageDown
- | KeyHome
- | KeyEnd
- | KeyShiftL
- | KeyShiftR
- | KeyCtrlL
- | KeyCtrlR
- | KeyAltL
- | KeyAltR
- | KeyPad0
- | KeyPad1
- | KeyPad2
- | KeyPad3
- | KeyPad4
- | KeyPad5
- | KeyPad6
- | KeyPad7
- | KeyPad8
- | KeyPad9
- | KeyPadDivide
- | KeyPadMultiply
- | KeyPadSubtract
- | KeyPadAdd
- | KeyPadDecimal
- | KeyPadEqual
- | KeyPadEnter
- data MouseButton
- data KeyState
- data Modifiers = Modifiers {}
Documentation
module Graphics.Gloss.Data.Display
module Graphics.Gloss.Data.Picture
module Graphics.Gloss.Data.Color
:: 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.
Controller | |
|
Possible input events.
Instances
data SpecialKey Source #
Instances
Eq SpecialKey Source # | |
Defined in Graphics.Gloss.Internals.Interface.Backend.Types (==) :: SpecialKey -> SpecialKey -> Bool # (/=) :: SpecialKey -> SpecialKey -> Bool # | |
Ord SpecialKey Source # | |
Defined in Graphics.Gloss.Internals.Interface.Backend.Types compare :: SpecialKey -> SpecialKey -> Ordering # (<) :: SpecialKey -> SpecialKey -> Bool # (<=) :: SpecialKey -> SpecialKey -> Bool # (>) :: SpecialKey -> SpecialKey -> Bool # (>=) :: SpecialKey -> SpecialKey -> Bool # max :: SpecialKey -> SpecialKey -> SpecialKey # min :: SpecialKey -> SpecialKey -> SpecialKey # | |
Show SpecialKey Source # | |
Defined in Graphics.Gloss.Internals.Interface.Backend.Types showsPrec :: Int -> SpecialKey -> ShowS # show :: SpecialKey -> String # showList :: [SpecialKey] -> ShowS # |
data MouseButton Source #
Instances
Eq MouseButton Source # | |
Defined in Graphics.Gloss.Internals.Interface.Backend.Types (==) :: MouseButton -> MouseButton -> Bool # (/=) :: MouseButton -> MouseButton -> Bool # | |
Ord MouseButton Source # | |
Defined in Graphics.Gloss.Internals.Interface.Backend.Types compare :: MouseButton -> MouseButton -> Ordering # (<) :: MouseButton -> MouseButton -> Bool # (<=) :: MouseButton -> MouseButton -> Bool # (>) :: MouseButton -> MouseButton -> Bool # (>=) :: MouseButton -> MouseButton -> Bool # max :: MouseButton -> MouseButton -> MouseButton # min :: MouseButton -> MouseButton -> MouseButton # | |
Show MouseButton Source # | |
Defined in Graphics.Gloss.Internals.Interface.Backend.Types showsPrec :: Int -> MouseButton -> ShowS # show :: MouseButton -> String # showList :: [MouseButton] -> ShowS # |