Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Error
- setErrorCallback :: Maybe ErrorCallback -> IO ()
- type ErrorCallback = Error -> String -> IO ()
- data Version = Version {
- versionMajor :: Int
- versionMinor :: Int
- versionRevision :: Int
- init :: IO Bool
- terminate :: IO ()
- getVersion :: IO Version
- getVersionString :: IO (Maybe String)
- data Monitor
- data MonitorState
- data VideoMode = VideoMode {}
- data GammaRamp
- makeGammaRamp :: [Int] -> [Int] -> [Int] -> Maybe GammaRamp
- getMonitors :: IO (Maybe [Monitor])
- getPrimaryMonitor :: IO (Maybe Monitor)
- getMonitorPos :: Monitor -> IO (Int, Int)
- getMonitorPhysicalSize :: Monitor -> IO (Int, Int)
- getMonitorName :: Monitor -> IO (Maybe String)
- setMonitorCallback :: Maybe MonitorCallback -> IO ()
- type MonitorCallback = Monitor -> MonitorState -> IO ()
- getVideoModes :: Monitor -> IO (Maybe [VideoMode])
- getVideoMode :: Monitor -> IO (Maybe VideoMode)
- setGamma :: Monitor -> Double -> IO ()
- getGammaRamp :: Monitor -> IO (Maybe GammaRamp)
- setGammaRamp :: Monitor -> GammaRamp -> IO ()
- data Window
- data WindowHint
- = WindowHint'Resizable Bool
- | WindowHint'Visible Bool
- | WindowHint'Decorated Bool
- | WindowHint'RedBits Int
- | WindowHint'GreenBits Int
- | WindowHint'BlueBits Int
- | WindowHint'AlphaBits Int
- | WindowHint'DepthBits Int
- | WindowHint'StencilBits Int
- | WindowHint'AccumRedBits Int
- | WindowHint'AccumGreenBits Int
- | WindowHint'AccumBlueBits Int
- | WindowHint'AccumAlphaBits Int
- | WindowHint'AuxBuffers Int
- | WindowHint'Samples Int
- | WindowHint'RefreshRate Int
- | WindowHint'Stereo Bool
- | WindowHint'sRGBCapable Bool
- | WindowHint'ClientAPI ClientAPI
- | WindowHint'ContextVersionMajor Int
- | WindowHint'ContextVersionMinor Int
- | WindowHint'ContextRobustness ContextRobustness
- | WindowHint'OpenGLForwardCompat Bool
- | WindowHint'OpenGLDebugContext Bool
- | WindowHint'OpenGLProfile OpenGLProfile
- data FocusState
- data IconifyState
- data ContextRobustness
- data OpenGLProfile
- data ClientAPI
- defaultWindowHints :: IO ()
- windowHint :: WindowHint -> IO ()
- createWindow :: Int -> Int -> String -> Maybe Monitor -> Maybe Window -> IO (Maybe Window)
- destroyWindow :: Window -> IO ()
- windowShouldClose :: Window -> IO Bool
- setWindowShouldClose :: Window -> Bool -> IO ()
- setWindowTitle :: Window -> String -> IO ()
- getWindowPos :: Window -> IO (Int, Int)
- setWindowPos :: Window -> Int -> Int -> IO ()
- getWindowSize :: Window -> IO (Int, Int)
- setWindowSize :: Window -> Int -> Int -> IO ()
- getFramebufferSize :: Window -> IO (Int, Int)
- iconifyWindow :: Window -> IO ()
- restoreWindow :: Window -> IO ()
- showWindow :: Window -> IO ()
- hideWindow :: Window -> IO ()
- getWindowMonitor :: Window -> IO (Maybe Monitor)
- setCursorPos :: Window -> Double -> Double -> IO ()
- getWindowFocused :: Window -> IO FocusState
- getWindowIconified :: Window -> IO IconifyState
- getWindowResizable :: Window -> IO Bool
- getWindowDecorated :: Window -> IO Bool
- getWindowVisible :: Window -> IO Bool
- getWindowClientAPI :: Window -> IO ClientAPI
- getWindowContextVersionMajor :: Window -> IO Int
- getWindowContextVersionMinor :: Window -> IO Int
- getWindowContextVersionRevision :: Window -> IO Int
- getWindowContextRobustness :: Window -> IO ContextRobustness
- getWindowOpenGLForwardCompat :: Window -> IO Bool
- getWindowOpenGLDebugContext :: Window -> IO Bool
- getWindowOpenGLProfile :: Window -> IO OpenGLProfile
- setWindowPosCallback :: Window -> Maybe WindowPosCallback -> IO ()
- type WindowPosCallback = Window -> Int -> Int -> IO ()
- setWindowSizeCallback :: Window -> Maybe WindowSizeCallback -> IO ()
- type WindowSizeCallback = Window -> Int -> Int -> IO ()
- setWindowCloseCallback :: Window -> Maybe WindowCloseCallback -> IO ()
- type WindowCloseCallback = Window -> IO ()
- setWindowRefreshCallback :: Window -> Maybe WindowRefreshCallback -> IO ()
- type WindowRefreshCallback = Window -> IO ()
- setWindowFocusCallback :: Window -> Maybe WindowFocusCallback -> IO ()
- type WindowFocusCallback = Window -> FocusState -> IO ()
- setWindowIconifyCallback :: Window -> Maybe WindowIconifyCallback -> IO ()
- type WindowIconifyCallback = Window -> IconifyState -> IO ()
- setFramebufferSizeCallback :: Window -> Maybe FramebufferSizeCallback -> IO ()
- type FramebufferSizeCallback = Window -> Int -> Int -> IO ()
- pollEvents :: IO ()
- waitEvents :: IO ()
- postEmptyEvent :: IO ()
- data Key
- = Key'Unknown
- | Key'Space
- | Key'Apostrophe
- | Key'Comma
- | Key'Minus
- | Key'Period
- | Key'Slash
- | Key'0
- | Key'1
- | Key'2
- | Key'3
- | Key'4
- | Key'5
- | Key'6
- | Key'7
- | Key'8
- | Key'9
- | Key'Semicolon
- | Key'Equal
- | Key'A
- | Key'B
- | Key'C
- | Key'D
- | Key'E
- | Key'F
- | Key'G
- | Key'H
- | Key'I
- | Key'J
- | Key'K
- | Key'L
- | Key'M
- | Key'N
- | Key'O
- | Key'P
- | Key'Q
- | Key'R
- | Key'S
- | Key'T
- | Key'U
- | Key'V
- | Key'W
- | Key'X
- | Key'Y
- | Key'Z
- | Key'LeftBracket
- | Key'Backslash
- | Key'RightBracket
- | Key'GraveAccent
- | Key'World1
- | Key'World2
- | Key'Escape
- | Key'Enter
- | Key'Tab
- | Key'Backspace
- | Key'Insert
- | Key'Delete
- | Key'Right
- | Key'Left
- | Key'Down
- | Key'Up
- | Key'PageUp
- | Key'PageDown
- | Key'Home
- | Key'End
- | Key'CapsLock
- | Key'ScrollLock
- | Key'NumLock
- | Key'PrintScreen
- | Key'Pause
- | Key'F1
- | Key'F2
- | Key'F3
- | Key'F4
- | Key'F5
- | Key'F6
- | Key'F7
- | Key'F8
- | Key'F9
- | Key'F10
- | Key'F11
- | Key'F12
- | Key'F13
- | Key'F14
- | Key'F15
- | Key'F16
- | Key'F17
- | Key'F18
- | Key'F19
- | Key'F20
- | Key'F21
- | Key'F22
- | Key'F23
- | Key'F24
- | Key'F25
- | Key'Pad0
- | Key'Pad1
- | Key'Pad2
- | Key'Pad3
- | Key'Pad4
- | Key'Pad5
- | Key'Pad6
- | Key'Pad7
- | Key'Pad8
- | Key'Pad9
- | Key'PadDecimal
- | Key'PadDivide
- | Key'PadMultiply
- | Key'PadSubtract
- | Key'PadAdd
- | Key'PadEnter
- | Key'PadEqual
- | Key'LeftShift
- | Key'LeftControl
- | Key'LeftAlt
- | Key'LeftSuper
- | Key'RightShift
- | Key'RightControl
- | Key'RightAlt
- | Key'RightSuper
- | Key'Menu
- data KeyState
- data Joystick
- data JoystickButtonState
- data MouseButton
- data MouseButtonState
- data CursorState
- data CursorInputMode
- data StickyKeysInputMode
- data StickyMouseButtonsInputMode
- data ModifierKeys = ModifierKeys {}
- data Image = Image {
- imageWidth :: Int
- imageHeight :: Int
- imagePixels :: [CUChar]
- newtype Cursor = Cursor {}
- data StandardCursorShape
- getCursorInputMode :: Window -> IO CursorInputMode
- setCursorInputMode :: Window -> CursorInputMode -> IO ()
- getStickyKeysInputMode :: Window -> IO StickyKeysInputMode
- setStickyKeysInputMode :: Window -> StickyKeysInputMode -> IO ()
- getStickyMouseButtonsInputMode :: Window -> IO StickyMouseButtonsInputMode
- setStickyMouseButtonsInputMode :: Window -> StickyMouseButtonsInputMode -> IO ()
- getKey :: Window -> Key -> IO KeyState
- getMouseButton :: Window -> MouseButton -> IO MouseButtonState
- getCursorPos :: Window -> IO (Double, Double)
- setKeyCallback :: Window -> Maybe KeyCallback -> IO ()
- type KeyCallback = Window -> Key -> Int -> KeyState -> ModifierKeys -> IO ()
- setCharCallback :: Window -> Maybe CharCallback -> IO ()
- type CharCallback = Window -> Char -> IO ()
- setMouseButtonCallback :: Window -> Maybe MouseButtonCallback -> IO ()
- type MouseButtonCallback = Window -> MouseButton -> MouseButtonState -> ModifierKeys -> IO ()
- setCursorPosCallback :: Window -> Maybe CursorPosCallback -> IO ()
- type CursorPosCallback = Window -> Double -> Double -> IO ()
- setCursorEnterCallback :: Window -> Maybe CursorEnterCallback -> IO ()
- type CursorEnterCallback = Window -> CursorState -> IO ()
- createCursor :: Image -> Int -> Int -> IO Cursor
- createStandardCursor :: StandardCursorShape -> IO Cursor
- setCursor :: Window -> Cursor -> IO ()
- destroyCursor :: Cursor -> IO ()
- setScrollCallback :: Window -> Maybe ScrollCallback -> IO ()
- type ScrollCallback = Window -> Double -> Double -> IO ()
- setDropCallback :: Window -> Maybe DropCallback -> IO ()
- type DropCallback = Window -> [String] -> IO ()
- joystickPresent :: Joystick -> IO Bool
- getJoystickAxes :: Joystick -> IO (Maybe [Double])
- getJoystickButtons :: Joystick -> IO (Maybe [JoystickButtonState])
- getJoystickName :: Joystick -> IO (Maybe String)
- getTime :: IO (Maybe Double)
- setTime :: Double -> IO ()
- makeContextCurrent :: Maybe Window -> IO ()
- getCurrentContext :: IO (Maybe Window)
- swapBuffers :: Window -> IO ()
- swapInterval :: Int -> IO ()
- extensionSupported :: String -> IO Bool
- getClipboardString :: Window -> IO (Maybe String)
- setClipboardString :: Window -> String -> IO ()
Error handling
setErrorCallback :: Maybe ErrorCallback -> IO () Source #
Initialization and version information
Version | |
|
getVersion :: IO Version Source #
Monitor handling
data MonitorState Source #
setMonitorCallback :: Maybe MonitorCallback -> IO () Source #
type MonitorCallback = Monitor -> MonitorState -> IO () Source #
Window handling
data WindowHint Source #
data FocusState Source #
data IconifyState Source #
data ContextRobustness Source #
data OpenGLProfile Source #
defaultWindowHints :: IO () Source #
windowHint :: WindowHint -> IO () Source #
:: Int | Desired width for the window. |
-> Int | Desired height for the window. |
-> String | Desired title for the window. |
-> Maybe Monitor | Monitor to use in fullscreen mode. |
-> Maybe Window | Window for context object sharing, see here. |
-> IO (Maybe Window) |
Creates a new window. Note: If running in GHCI don't forget to `:set -fno-ghci-sandbox` or you may run into an assertion failure, segfault or other nasty crash.
destroyWindow :: Window -> IO () Source #
iconifyWindow :: Window -> IO () Source #
restoreWindow :: Window -> IO () Source #
showWindow :: Window -> IO () Source #
hideWindow :: Window -> IO () Source #
getWindowFocused :: Window -> IO FocusState Source #
setWindowPosCallback :: Window -> Maybe WindowPosCallback -> IO () Source #
setWindowSizeCallback :: Window -> Maybe WindowSizeCallback -> IO () Source #
setWindowCloseCallback :: Window -> Maybe WindowCloseCallback -> IO () Source #
type WindowCloseCallback = Window -> IO () Source #
setWindowRefreshCallback :: Window -> Maybe WindowRefreshCallback -> IO () Source #
type WindowRefreshCallback = Window -> IO () Source #
setWindowFocusCallback :: Window -> Maybe WindowFocusCallback -> IO () Source #
type WindowFocusCallback = Window -> FocusState -> IO () Source #
setWindowIconifyCallback :: Window -> Maybe WindowIconifyCallback -> IO () Source #
type WindowIconifyCallback = Window -> IconifyState -> IO () Source #
setFramebufferSizeCallback :: Window -> Maybe FramebufferSizeCallback -> IO () Source #
pollEvents :: IO () Source #
waitEvents :: IO () Source #
postEmptyEvent :: IO () Source #
Input handling
data JoystickButtonState Source #
data MouseButton Source #
data MouseButtonState Source #
data CursorState Source #
data CursorInputMode Source #
data StickyKeysInputMode Source #
data StickyMouseButtonsInputMode Source #
Image | |
|
data StandardCursorShape Source #
setCursorInputMode :: Window -> CursorInputMode -> IO () Source #
setStickyKeysInputMode :: Window -> StickyKeysInputMode -> IO () Source #
getMouseButton :: Window -> MouseButton -> IO MouseButtonState Source #
setKeyCallback :: Window -> Maybe KeyCallback -> IO () Source #
type KeyCallback = Window -> Key -> Int -> KeyState -> ModifierKeys -> IO () Source #
setCharCallback :: Window -> Maybe CharCallback -> IO () Source #
setMouseButtonCallback :: Window -> Maybe MouseButtonCallback -> IO () Source #
type MouseButtonCallback = Window -> MouseButton -> MouseButtonState -> ModifierKeys -> IO () Source #
setCursorPosCallback :: Window -> Maybe CursorPosCallback -> IO () Source #
setCursorEnterCallback :: Window -> Maybe CursorEnterCallback -> IO () Source #
type CursorEnterCallback = Window -> CursorState -> IO () Source #
:: Image | The desired cursor image. |
-> Int | The desired x-coordinate, in pixels, of the cursor hotspot. |
-> Int | The desired y-coordinate, in pixels, of the cursor hotspot. |
-> IO Cursor |
Creates a new cursor.
createStandardCursor :: StandardCursorShape -> IO Cursor Source #
Creates a cursor with a standard shape that can be set for a window with setCursor.
setCursor :: Window -> Cursor -> IO () Source #
Sets the cursor image to be used when the cursor is over the client area of the specified window. The set cursor will only be visible when the cursor mode of the window is GLFW_CURSOR_NORMAL.
destroyCursor :: Cursor -> IO () Source #
Destroys a cursor previously created with createCursor
. Any remaining
cursors will be destroyed by terminate
.
setScrollCallback :: Window -> Maybe ScrollCallback -> IO () Source #
setDropCallback :: Window -> Maybe DropCallback -> IO () Source #
Sets the file drop callback of the specified window, which is called when one or more dragged files are dropped on the window.
type DropCallback Source #
getJoystickButtons :: Joystick -> IO (Maybe [JoystickButtonState]) Source #
Time
Context
swapBuffers :: Window -> IO () Source #
swapInterval :: Int -> IO () Source #