Safe Haskell | None |
---|
- runGraphics :: IO () -> IO ()
- type Title = String
- type Size = (Int, Int)
- data Window
- openWindow :: Title -> Size -> IO Window
- getMainWindowSize :: IO Size
- clearWindow :: Window -> IO ()
- drawInWindow :: Window -> Graphic -> IO ()
- drawInWindowNow :: Window -> Graphic -> IO ()
- setGraphic :: Window -> Graphic -> IO ()
- setGraphic' :: Window -> Graphic -> IO ()
- setDirty :: Window -> IO ()
- closeWindow :: Window -> IO ()
- openWindowEx :: Title -> Maybe Point -> Maybe Size -> RedrawMode -> IO Window
- data RedrawMode
- drawGraphic :: RedrawMode
- drawBufferedGraphic :: RedrawMode
- data Graphic
- nullGraphic :: Graphic
- emptyGraphic :: Graphic
- overGraphic :: Graphic -> Graphic -> Graphic
- overGraphics :: [Graphic] -> Graphic
- translateGraphic :: (Int, Int) -> Graphic -> Graphic
- data Color
- type RGB = Color3 GLfloat
- type RGBA = Color4 GLfloat
- rgb :: (Integral r, Integral g, Integral b) => r -> g -> b -> RGB
- rgba :: (Integral r, Integral g, Integral b, Integral a) => r -> g -> b -> a -> RGBA
- withColor :: Color -> Graphic -> Graphic
- withColor' :: Color a => a -> Graphic -> Graphic
- text :: Point -> String -> Graphic
- type Point = (Int, Int)
- ellipse :: Point -> Point -> Graphic
- shearEllipse :: Point -> Point -> Point -> Graphic
- line :: Point -> Point -> Graphic
- polygon :: [Point] -> Graphic
- polyline :: [Point] -> Graphic
- polyBezier :: [Point] -> Graphic
- type Angle = GLfloat
- arc :: Point -> Point -> Angle -> Angle -> Graphic
- scissorGraphic :: (Point, Size) -> Graphic -> Graphic
- data Key
- data SpecialKey
- = UNKNOWN
- | ESC
- | F1
- | F2
- | F3
- | F4
- | F5
- | F6
- | F7
- | F8
- | F9
- | F10
- | F11
- | F12
- | F13
- | F14
- | F15
- | F16
- | F17
- | F18
- | F19
- | F20
- | F21
- | F22
- | F23
- | F24
- | F25
- | UP
- | DOWN
- | LEFT
- | RIGHT
- | LSHIFT
- | RSHIFT
- | LCTRL
- | RCTRL
- | LALT
- | RALT
- | TAB
- | ENTER
- | BACKSPACE
- | INSERT
- | DEL
- | PAGEUP
- | PAGEDOWN
- | HOME
- | END
- | KP_0
- | KP_1
- | KP_2
- | KP_3
- | KP_4
- | KP_5
- | KP_6
- | KP_7
- | KP_8
- | KP_9
- | KP_DIVIDE
- | KP_MULTIPLY
- | KP_SUBTRACT
- | KP_ADD
- | KP_DECIMAL
- | KP_EQUAL
- | KP_ENTER
- data UIEvent
- maybeGetWindowEvent :: Double -> Window -> IO (Maybe UIEvent)
- getWindowEvent :: Double -> Window -> IO UIEvent
- data Word32
- timeGetTime :: IO Double
- word32ToInt :: Word32 -> Int
- isKeyPressed :: Enum a => a -> IO Bool
Window Functions
runGraphics :: IO () -> IO ()Source
clearWindow :: Window -> IO ()Source
drawInWindow :: Window -> Graphic -> IO ()Source
drawInWindowNow :: Window -> Graphic -> IO ()Source
setGraphic :: Window -> Graphic -> IO ()Source
setGraphic set the given Graphic over empty (black) background for display in current Window.
setGraphic' :: Window -> Graphic -> IO ()Source
closeWindow :: Window -> IO ()Source
openWindowEx :: Title -> Maybe Point -> Maybe Size -> RedrawMode -> IO WindowSource
Drawing Functions
data RedrawMode Source
overGraphic :: Graphic -> Graphic -> GraphicSource
overGraphics :: [Graphic] -> GraphicSource
withColor' :: Color a => a -> Graphic -> GraphicSource
polyBezier :: [Point] -> GraphicSource
Event Handling Functions
data SpecialKey
getWindowEvent :: Double -> Window -> IO UIEventSource
getWindowEvent and maybeGetWindowEvent both take an additional argument sleepTime that tells how long to sleep in the case where there are no window events to return. This is used to allow the cpu to take other tasks at these times rather than needlessly spinning. The sleepTime parameter used to be fixed at 0.01.
data Word32
32-bit unsigned integer type
timeGetTime :: IO DoubleSource
use GLFW's high resolution timer
word32ToInt :: Word32 -> IntSource
isKeyPressed :: Enum a => a -> IO BoolSource
Designed to be used with Key, CharKey, or SpecialKey