GLFW-b-0.0.1: GLFW bindingsSource codeContentsIndex
Graphics.UI.GLFW
Contents
Initialization and termination
Video mode information
Windows
Management
Information
Input
Keyboard
Mouse
Joystick
Time
Version information
Synopsis
initialize :: IO Bool
terminate :: IO ()
getVideoMode :: IO VideoMode
getVideoModes :: IO [VideoMode]
data VideoMode = VideoMode {
videoMode_width :: Int
videoMode_height :: Int
videoMode_numRedBits :: Int
videoMode_numGreenBits :: Int
videoMode_numBlueBits :: Int
}
openWindow :: DisplayOptions -> IO Bool
closeWindow :: IO ()
setWindowTitle :: String -> IO ()
setWindowDimensions :: Int -> Int -> IO ()
setWindowPosition :: Int -> Int -> IO ()
iconifyWindow :: IO ()
restoreWindow :: IO ()
swapBuffers :: IO ()
setWindowBufferSwapInterval :: Int -> IO ()
data DisplayMode
= Window
| Fullscreen
data DisplayOptions = DisplayOptions {
displayOptions_width :: Int
displayOptions_height :: Int
displayOptions_numRedBits :: Int
displayOptions_numGreenBits :: Int
displayOptions_numBlueBits :: Int
displayOptions_numAlphaBits :: Int
displayOptions_numDepthBits :: Int
displayOptions_numStencilBits :: Int
displayOptions_displayMode :: DisplayMode
displayOptions_refreshRate :: Maybe Int
displayOptions_accumNumRedBits :: Maybe Int
displayOptions_accumNumGreenBits :: Maybe Int
displayOptions_accumNumBlueBits :: Maybe Int
displayOptions_accumNumAlphaBits :: Maybe Int
displayOptions_numAuxiliaryBuffers :: Maybe Int
displayOptions_numFsaaSamples :: Maybe Int
displayOptions_windowIsResizable :: Bool
displayOptions_stereoRendering :: Bool
}
defaultDisplayOptions :: DisplayOptions
windowIsOpen :: IO Bool
windowIsActive :: IO Bool
windowIsIconified :: IO Bool
windowIsResizable :: IO Bool
windowIsHardwareAccelerated :: IO Bool
windowSupportsStereoRendering :: IO Bool
getWindowRefreshRate :: IO Int
getWindowDimensions :: IO (Int, Int)
getWindowValue :: WindowValue -> IO Int
setWindowCloseCallback :: WindowCloseCallback -> IO ()
setWindowSizeCallback :: WindowSizeCallback -> IO ()
setWindowRefreshCallback :: WindowRefreshCallback -> IO ()
data WindowValue
= NumRedBits
| NumGreenBits
| NumBlueBits
| NumAlphaBits
| NumDepthBits
| NumStencilBits
| NumAccumRedBits
| NumAccumGreenBits
| NumAccumBlueBits
| NumAccumAlphaBits
| NumAuxBuffers
| NumFsaaSamples
type WindowCloseCallback = IO Bool
type WindowSizeCallback = Int -> Int -> IO ()
type WindowRefreshCallback = IO ()
pollEvents :: IO ()
waitEvents :: IO ()
keyIsPressed :: Key -> IO Bool
setCharCallback :: CharCallback -> IO ()
setKeyCallback :: KeyCallback -> IO ()
data Key
= CharKey Char
| KeyUnknown
| KeySpace
| KeySpecial
| 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
| KeyLeftShift
| KeyRightShift
| KeyLeftCtrl
| KeyRightCtrl
| KeyLeftAlt
| KeyRightAlt
| KeyTab
| KeyEnter
| KeyBackspace
| KeyInsert
| KeyDel
| KeyPageup
| KeyPagedown
| KeyHome
| KeyEnd
| KeyPad0
| KeyPad1
| KeyPad2
| KeyPad3
| KeyPad4
| KeyPad5
| KeyPad6
| KeyPad7
| KeyPad8
| KeyPad9
| KeyPadDivide
| KeyPadMultiply
| KeyPadSubtract
| KeyPadAdd
| KeyPadDecimal
| KeyPadEqual
| KeyPadEnter
type CharCallback = Char -> Bool -> IO ()
type KeyCallback = Key -> Bool -> IO ()
mouseButtonIsPressed :: MouseButton -> IO Bool
getMousePosition :: IO (Int, Int)
getMouseWheel :: IO Int
setMousePosition :: Int -> Int -> IO ()
setMouseWheel :: Int -> IO ()
setMouseButtonCallback :: MouseButtonCallback -> IO ()
setMousePositionCallback :: MousePositionCallback -> IO ()
setMouseWheelCallback :: MouseWheelCallback -> IO ()
data MouseButton
= MouseButton0
| MouseButton1
| MouseButton2
| MouseButton3
| MouseButton4
| MouseButton5
| MouseButton6
| MouseButton7
type MouseButtonCallback = MouseButton -> Bool -> IO ()
type MousePositionCallback = Int -> Int -> IO ()
type MouseWheelCallback = Int -> IO ()
joystickIsPresent :: Joystick -> IO Bool
getJoystickPosition :: Joystick -> Int -> IO [Float]
getNumJoystickAxes :: Joystick -> IO Int
getNumJoystickButtons :: Joystick -> IO Int
joystickButtonsArePressed :: Joystick -> Int -> IO [Bool]
data Joystick
= Joystick0
| Joystick1
| Joystick2
| Joystick3
| Joystick4
| Joystick5
| Joystick6
| Joystick7
| Joystick8
| Joystick9
| Joystick10
| Joystick11
| Joystick12
| Joystick13
| Joystick14
| Joystick15
getTime :: IO Double
setTime :: Double -> IO ()
resetTime :: IO ()
sleep :: Double -> IO ()
getGlfwVersion :: IO Version
getGlVersion :: IO Version
Initialization and termination
initialize :: IO BoolSource
terminate :: IO ()Source
Video mode information
getVideoMode :: IO VideoModeSource
getVideoModes :: IO [VideoMode]Source
data VideoMode Source
Constructors
VideoMode
videoMode_width :: Int
videoMode_height :: Int
videoMode_numRedBits :: Int
videoMode_numGreenBits :: Int
videoMode_numBlueBits :: Int
show/hide Instances
Windows
Management
openWindow :: DisplayOptions -> IO BoolSource
closeWindow :: IO ()Source
setWindowTitle :: String -> IO ()Source
setWindowDimensions :: Int -> Int -> IO ()Source
setWindowPosition :: Int -> Int -> IO ()Source
iconifyWindow :: IO ()Source
restoreWindow :: IO ()Source
swapBuffers :: IO ()Source
setWindowBufferSwapInterval :: Int -> IO ()Source
data DisplayMode Source
Constructors
Window
Fullscreen
show/hide Instances
data DisplayOptions Source
Constructors
DisplayOptions
displayOptions_width :: Int
displayOptions_height :: Int
displayOptions_numRedBits :: Int
displayOptions_numGreenBits :: Int
displayOptions_numBlueBits :: Int
displayOptions_numAlphaBits :: Int
displayOptions_numDepthBits :: Int
displayOptions_numStencilBits :: Int
displayOptions_displayMode :: DisplayMode
displayOptions_refreshRate :: Maybe Int
displayOptions_accumNumRedBits :: Maybe Int
displayOptions_accumNumGreenBits :: Maybe Int
displayOptions_accumNumBlueBits :: Maybe Int
displayOptions_accumNumAlphaBits :: Maybe Int
displayOptions_numAuxiliaryBuffers :: Maybe Int
displayOptions_numFsaaSamples :: Maybe Int
displayOptions_windowIsResizable :: Bool
displayOptions_stereoRendering :: Bool
show/hide Instances
defaultDisplayOptions :: DisplayOptionsSource
Information
windowIsOpen :: IO BoolSource
windowIsActive :: IO BoolSource
windowIsIconified :: IO BoolSource
windowIsResizable :: IO BoolSource
windowIsHardwareAccelerated :: IO BoolSource
windowSupportsStereoRendering :: IO BoolSource
getWindowRefreshRate :: IO IntSource
getWindowDimensions :: IO (Int, Int)Source
getWindowValue :: WindowValue -> IO IntSource
setWindowCloseCallback :: WindowCloseCallback -> IO ()Source
setWindowSizeCallback :: WindowSizeCallback -> IO ()Source
setWindowRefreshCallback :: WindowRefreshCallback -> IO ()Source
data WindowValue Source
Constructors
NumRedBits
NumGreenBits
NumBlueBits
NumAlphaBits
NumDepthBits
NumStencilBits
NumAccumRedBits
NumAccumGreenBits
NumAccumBlueBits
NumAccumAlphaBits
NumAuxBuffers
NumFsaaSamples
show/hide Instances
type WindowCloseCallback = IO BoolSource
type WindowSizeCallback = Int -> Int -> IO ()Source
type WindowRefreshCallback = IO ()Source
Input
pollEvents :: IO ()Source
waitEvents :: IO ()Source
Keyboard
keyIsPressed :: Key -> IO BoolSource
setCharCallback :: CharCallback -> IO ()Source
setKeyCallback :: KeyCallback -> IO ()Source
data Key Source
Constructors
CharKey Char
KeyUnknown
KeySpace
KeySpecial
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
KeyLeftShift
KeyRightShift
KeyLeftCtrl
KeyRightCtrl
KeyLeftAlt
KeyRightAlt
KeyTab
KeyEnter
KeyBackspace
KeyInsert
KeyDel
KeyPageup
KeyPagedown
KeyHome
KeyEnd
KeyPad0
KeyPad1
KeyPad2
KeyPad3
KeyPad4
KeyPad5
KeyPad6
KeyPad7
KeyPad8
KeyPad9
KeyPadDivide
KeyPadMultiply
KeyPadSubtract
KeyPadAdd
KeyPadDecimal
KeyPadEqual
KeyPadEnter
show/hide Instances
type CharCallback = Char -> Bool -> IO ()Source
type KeyCallback = Key -> Bool -> IO ()Source
Mouse
mouseButtonIsPressed :: MouseButton -> IO BoolSource
getMousePosition :: IO (Int, Int)Source
getMouseWheel :: IO IntSource
setMousePosition :: Int -> Int -> IO ()Source
setMouseWheel :: Int -> IO ()Source
setMouseButtonCallback :: MouseButtonCallback -> IO ()Source
setMousePositionCallback :: MousePositionCallback -> IO ()Source
setMouseWheelCallback :: MouseWheelCallback -> IO ()Source
data MouseButton Source
Constructors
MouseButton0
MouseButton1
MouseButton2
MouseButton3
MouseButton4
MouseButton5
MouseButton6
MouseButton7
show/hide Instances
type MouseButtonCallback = MouseButton -> Bool -> IO ()Source
type MousePositionCallback = Int -> Int -> IO ()Source
type MouseWheelCallback = Int -> IO ()Source
Joystick
joystickIsPresent :: Joystick -> IO BoolSource
getJoystickPosition :: Joystick -> Int -> IO [Float]Source
getNumJoystickAxes :: Joystick -> IO IntSource
getNumJoystickButtons :: Joystick -> IO IntSource
joystickButtonsArePressed :: Joystick -> Int -> IO [Bool]Source
data Joystick Source
Constructors
Joystick0
Joystick1
Joystick2
Joystick3
Joystick4
Joystick5
Joystick6
Joystick7
Joystick8
Joystick9
Joystick10
Joystick11
Joystick12
Joystick13
Joystick14
Joystick15
show/hide Instances
Time
getTime :: IO DoubleSource
setTime :: Double -> IO ()Source
resetTime :: IO ()Source
sleep :: Double -> IO ()Source
Version information
getGlfwVersion :: IO VersionSource
getGlVersion :: IO VersionSource
Produced by Haddock version 2.7.2