UISF-0.3.0.2: Library for Arrowized Graphical User Interfaces.

Safe HaskellNone
LanguageHaskell98

FRP.UISF.SOE

Contents

Synopsis

Window Functions

runGraphics :: IO () -> IO () Source

type Size = (Int, Int) Source

setGraphic :: Window -> Graphic -> IO () Source

setGraphic set the given Graphic over empty (black) background for display in current Window.

Drawing Functions

data Graphic Source

Graphic is just a wrapper for OpenGL IO

rgb :: (Integral r, Integral g, Integral b) => r -> g -> b -> RGB Source

rgba :: (Integral r, Integral g, Integral b, Integral a) => r -> g -> b -> a -> RGBA Source

type Point = (Int, Int) Source

Event Handling Functions

data Key :: *

Key is represented by either a character key or a special key.

Instances

data SpecialKey :: *

Special key is a key not represented in the 32 - 127 printable ASCII range.

data UIEvent Source

Constructors

Key 

Fields

char :: Char
 
modifiers :: ([Char], [SpecialKey])
 
isDown :: Bool
 
SKey 

Fields

skey :: SpecialKey
 
modifiers :: ([Char], [SpecialKey])
 
isDown :: Bool
 
Button 

Fields

pt :: Point
 
isLeft :: Bool
 
isDown :: Bool
 
MouseMove 

Fields

pt :: Point
 
Resize Size 
Refresh 
Closed 
NoUIEvent 

Instances

getWindowEvent :: Double -> Window -> IO UIEvent Source

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.

timeGetTime :: IO Double Source

use GLFW's high resolution timer

isKeyPressed :: Enum a => a -> IO Bool Source

Designed to be used with Key, CharKey, or SpecialKey