UISF-0.1.0.0: Library for Arrowized Graphical User Interfaces.

Safe HaskellNone

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 -> RGBSource

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

type Point = (Int, Int)Source

Event Handling Functions

data Key

Instances

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 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.

timeGetTime :: IO DoubleSource

use GLFW's high resolution timer

isKeyPressed :: Enum a => a -> IO BoolSource

Designed to be used with Key, CharKey, or SpecialKey