-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Bindings to GLFW OpenGL library
--   
--   Bindings to GLFW (<a>http://www.glfw.org/</a>), an open source,
--   multi-platform library for creating windows with OpenGL contexts and
--   managing input and events.
--   
--   GLFW-b depends on bindings-GLFW
--   (<a>http://hackage.haskell.org/package/bindings-GLFW</a>), which, as
--   of the time of this writing, binds to GLFW 3.2.1, released 2016-08-18
--   (<a>http://www.glfw.org/Version-3.2.1-released.html</a>
--   <a>http://www.glfw.org/changelog.html</a>).
--   
--   If you've used GLFW &lt; 3 before, you should read the transition
--   guide (<a>http://www.glfw.org/docs/3.0/moving.html</a>).
@package GLFW-b
@version 3.2.1.0


-- | Threading restrictions which apply to the C version of GLFW still
--   apply when writing <tt>GLFW-b</tt> programs. See <a>GLFW thread safety
--   documentation</a> (applies here).
--   
--   Current context restructions which apply to the C version of GLFW
--   still apply. See <a>GLFW current context documentation</a> (applies
--   here).
--   
--   <tt>GLFW-b</tt> wraps callbacks and schedules them to be run after
--   <a>pollEvents</a> and <a>waitEvents</a> in the normal GHC runtime
--   where they aren't subject to the usual GLFW reentrancy restrictions.
--   See <a>GLFW reentrancy documentation</a> (does not apply here).
module Graphics.UI.GLFW

-- | An enum for one of the <a>GLFW error codes</a>.
data Error

-- | <a>doc</a>
Error'NotInitialized :: Error

-- | <a>doc</a>
Error'NoCurrentContext :: Error

-- | <a>doc</a>
Error'InvalidEnum :: Error

-- | <a>doc</a>
Error'InvalidValue :: Error

-- | <a>doc</a>
Error'OutOfMemory :: Error

-- | <a>doc</a>
Error'ApiUnavailable :: Error

-- | <a>doc</a>
Error'VersionUnavailable :: Error

-- | <a>doc</a>
Error'PlatformError :: Error

-- | <a>doc</a>
Error'FormatUnavailable :: Error

-- | Can (and probably should) be used before GLFW initialization. See
--   <a>glfwSetErrorCallback</a>
setErrorCallback :: Maybe ErrorCallback -> IO ()

-- | The error code and also a human-readable error message.
type ErrorCallback = Error -> String -> IO ()

-- | The library version of the GLFW implementation in use. See <a>Version
--   Management</a>
data Version
Version :: Int -> Int -> Int -> Version
[versionMajor] :: Version -> Int
[versionMinor] :: Version -> Int
[versionRevision] :: Version -> Int

-- | Attempts to initialize the GLFW library. When the library is not
--   initialized, the only allowed functions to call are <a>getVersion</a>,
--   <a>getVersionString</a>, <a>setErrorCallback</a>, <a>init</a>, and
--   <a>terminate</a>. Returns if the initialization was successful or not.
--   See <a>glfwInit</a> and <a>Initialization and Termination</a>
init :: IO Bool

-- | Cleans up GLFW and puts the library into an uninitialized state. Once
--   you call this, you must initilize the library again. Warning: No
--   window's context may be current in another thread when this is called.
--   See <a>glfwTerminate</a> and <a>Initialization and Termination</a>
terminate :: IO ()

-- | Gets the version of the GLFW library that's being used with the
--   current program. See <a>glfwGetVersion</a>
getVersion :: IO Version

-- | Gets the compile-time version string of the GLFW library binary. Gives
--   extra info like platform and compile time options used, but you should
--   not attempt to parse this to get the GLFW version number. Use
--   <a>getVersion</a> instead. See <a>glfwGetVersionString</a>
getVersionString :: IO (Maybe String)

-- | Represents a physical monitor that's currently connected. See the
--   <a>Monitor Guide</a>
data Monitor

-- | Part of the <tt>MonitorCallback</tt>, for when a monitor gets
--   connected or disconnected.
data MonitorState
MonitorState'Connected :: MonitorState
MonitorState'Disconnected :: MonitorState

-- | See <a>Video Modes</a>
data VideoMode
VideoMode :: Int -> Int -> Int -> Int -> Int -> Int -> VideoMode
[videoModeWidth] :: VideoMode -> Int
[videoModeHeight] :: VideoMode -> Int
[videoModeRedBits] :: VideoMode -> Int
[videoModeGreenBits] :: VideoMode -> Int
[videoModeBlueBits] :: VideoMode -> Int
[videoModeRefreshRate] :: VideoMode -> Int

-- | Lets you adjust the gamma of a monitor. To ensure that only valid
--   values are created, use <a>makeGammaRamp</a>. See <a>Gamma Ramp</a>.
data GammaRamp

-- | Smart constructor for a <a>GammaRamp</a>.
makeGammaRamp :: [Int] -> [Int] -> [Int] -> Maybe GammaRamp

-- | Gets the list of available monitors, if possible. See
--   <a>glfwGetMonitors</a>
getMonitors :: IO (Maybe [Monitor])

-- | Gets the primary monitor. See <a>glfwGetPrimaryMonitor</a>
getPrimaryMonitor :: IO (Maybe Monitor)

-- | Gets the position of the specified monitor within the coordinate
--   space. See <a>glfwGetMonitorPos</a>
getMonitorPos :: Monitor -> IO (Int, Int)

-- | The physical width and height of the monitor. See
--   <a>glfwGetMonitorPhysicalSize</a>
getMonitorPhysicalSize :: Monitor -> IO (Int, Int)

-- | A human-readable name for the monitor specified. See
--   <a>getMonitorName</a>
getMonitorName :: Monitor -> IO (Maybe String)

-- | Sets a callback for when a monitor is connected or disconnected. See
--   <a>glfwSetMonitorCallback</a>
setMonitorCallback :: Maybe MonitorCallback -> IO ()

-- | Fires when a monitor is connected or disconnected.
type MonitorCallback = Monitor -> MonitorState -> IO ()

-- | Obtains the possible video modes of the monitor. See
--   <a>glfwGetVideoModes</a>
getVideoModes :: Monitor -> IO (Maybe [VideoMode])

-- | Gets the active video mode of the monitor. See <a>glfwGetVideoMode</a>
getVideoMode :: Monitor -> IO (Maybe VideoMode)

-- | Sets the gamma of a monitor. See <a>glfwSetGamma</a>
setGamma :: Monitor -> Double -> IO ()

-- | Gets the gamma ramp in use with the monitor. See
--   <a>glfwGetGammaRamp</a>
getGammaRamp :: Monitor -> IO (Maybe GammaRamp)

-- | Assigns a gamma ramp to use with the given monitor. See
--   <a>glfwSetGammaRamp</a>
setGammaRamp :: Monitor -> GammaRamp -> IO ()

-- | Reprisents a GLFW window value. See the <a>Window Guide</a>
data Window

-- | Lets you set various window hints before creating a <a>Window</a>. See
--   <a>Window Hints</a>, particularly <a>Supported and Default Values</a>.
data WindowHint
WindowHint'Resizable :: Bool -> WindowHint
WindowHint'Visible :: Bool -> WindowHint
WindowHint'Decorated :: Bool -> WindowHint
WindowHint'RedBits :: Maybe Int -> WindowHint
WindowHint'GreenBits :: Maybe Int -> WindowHint
WindowHint'BlueBits :: Maybe Int -> WindowHint
WindowHint'AlphaBits :: Maybe Int -> WindowHint
WindowHint'DepthBits :: Maybe Int -> WindowHint
WindowHint'StencilBits :: Maybe Int -> WindowHint
WindowHint'AccumRedBits :: Maybe Int -> WindowHint
WindowHint'AccumGreenBits :: Maybe Int -> WindowHint
WindowHint'AccumBlueBits :: Maybe Int -> WindowHint
WindowHint'AccumAlphaBits :: Maybe Int -> WindowHint
WindowHint'AuxBuffers :: Maybe Int -> WindowHint
WindowHint'Samples :: Maybe Int -> WindowHint
WindowHint'RefreshRate :: Maybe Int -> WindowHint
WindowHint'DoubleBuffer :: Bool -> WindowHint
WindowHint'Stereo :: Bool -> WindowHint
WindowHint'sRGBCapable :: Bool -> WindowHint
WindowHint'Floating :: Bool -> WindowHint
WindowHint'Focused :: Bool -> WindowHint
WindowHint'Maximized :: Bool -> WindowHint
WindowHint'AutoIconify :: Bool -> WindowHint
WindowHint'ClientAPI :: ClientAPI -> WindowHint
WindowHint'ContextCreationAPI :: ContextCreationAPI -> WindowHint
WindowHint'ContextVersionMajor :: Int -> WindowHint
WindowHint'ContextVersionMinor :: Int -> WindowHint
WindowHint'ContextRobustness :: ContextRobustness -> WindowHint
WindowHint'ContextReleaseBehavior :: ContextReleaseBehavior -> WindowHint
WindowHint'ContextNoError :: Bool -> WindowHint
WindowHint'OpenGLForwardCompat :: Bool -> WindowHint
WindowHint'OpenGLDebugContext :: Bool -> WindowHint
WindowHint'OpenGLProfile :: OpenGLProfile -> WindowHint

-- | The OpenGL robustness strategy.
data ContextRobustness
ContextRobustness'NoRobustness :: ContextRobustness
ContextRobustness'NoResetNotification :: ContextRobustness
ContextRobustness'LoseContextOnReset :: ContextRobustness

-- | The OpenGL profile.
data OpenGLProfile
OpenGLProfile'Any :: OpenGLProfile
OpenGLProfile'Compat :: OpenGLProfile
OpenGLProfile'Core :: OpenGLProfile

-- | The type of OpenGL to create a context for.
data ClientAPI
ClientAPI'NoAPI :: ClientAPI
ClientAPI'OpenGL :: ClientAPI
ClientAPI'OpenGLES :: ClientAPI

-- | The type of API to use for context creation. See the <a>Window
--   Guide</a> for more information.
--   
--   This is a hard constraint. If no client API is requested, this hint is
--   ignored. Best practice is to stick to one API or the other, otherwise
--   may segfault on Linux. OS X does not support the EGL API and will fail
--   if this hint is used.
data ContextCreationAPI
ContextCreationAPI'Native :: ContextCreationAPI
ContextCreationAPI'EGL :: ContextCreationAPI

-- | The context release behavior. See the <a>Window Guide</a> for more
--   information.
--   
--   Context release behaviors are described in detail by the
--   <a>KHR_context_flush_control</a> extension.
data ContextReleaseBehavior
ContextReleaseBehavior'Any :: ContextReleaseBehavior
ContextReleaseBehavior'None :: ContextReleaseBehavior
ContextReleaseBehavior'Flush :: ContextReleaseBehavior

-- | Sets all the window hints to default. See
--   <a>glfwDefaultWindowHints</a>
defaultWindowHints :: IO ()

-- | Hints something to the GLFW windowing system. See
--   <a>glfwWindowHint</a>
windowHint :: WindowHint -> IO ()

-- | 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. See <a>glfwCreateWindow</a>
createWindow :: Int -> Int -> String -> Maybe Monitor -> Maybe Window -> IO (Maybe Window)

-- | Cleans up a window and all associated resources See
--   <a>glfwDestroyWindow</a>
destroyWindow :: Window -> IO ()

-- | If the window should close or not. See <a>glfwWindowShouldClose</a>
windowShouldClose :: Window -> IO Bool

-- | Sets if the window should close or not. See
--   <a>glfwSetWindowShouldClose</a>
setWindowShouldClose :: Window -> Bool -> IO ()

-- | Sets the Title string of the window. See <a>glfwSetWindowTitle</a>
setWindowTitle :: Window -> String -> IO ()

-- | Gets the window's position (in Screen Coordinates). See
--   <a>glfwGetWindowPos</a>
getWindowPos :: Window -> IO (Int, Int)

-- | Sets the window's position (in Screen Coordinates). See
--   <a>glfwSetWindowPos</a>
setWindowPos :: Window -> Int -> Int -> IO ()

-- | Gets the size of the window (in Screen Coordinates). See
--   <a>glfwGetWindowSize</a>
getWindowSize :: Window -> IO (Int, Int)

-- | Sets the size of the client area for the window (in Screen
--   Coordinates). See <a>glfwSetWindowSize</a>
setWindowSize :: Window -> Int -> Int -> IO ()

-- | Sets the size limits of the client area of the specified window. If
--   the window is full screen, the size limits only take effect once it is
--   made windowed. If the window is not resizable this function does
--   nothing. Pass <a>Nothing</a> in any argument to disable the limit. See
--   <a>glfwSetWindowSizeLimits</a>
setWindowSizeLimits :: Window -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> IO ()

-- | Sets the required aspect ratio of the client area of the specified
--   window. Pass Nothing to disable the limit. See
--   <a>glfwSetWindowAspectRatio</a>
setWindowAspectRatio :: Window -> Maybe (Int, Int) -> IO ()

-- | Gets the size of the frame around the window (in Screen Coordinates).
--   This size includes the title bar, if the window has one. Not to be
--   confused with <a>getFramebufferSize</a>, which gets the size of the
--   rendering area. See <a>glfwGetWindowFrameSize</a>
getWindowFrameSize :: Window -> IO (Int, Int, Int, Int)

-- | The size of the framebuffer (in Pixels) See
--   <a>glfwGetFramebufferSize</a>
getFramebufferSize :: Window -> IO (Int, Int)

-- | Sets the icon of the specified window. The system will try to find the
--   image with the dimensions closest to the ones required by the
--   platform. This image is then scaled and used as the icon for that
--   size. Good sizes are 16x16, 32x32, and 48x48. Pass the empty list to
--   reset to the default icon. Has no effect on OS X (See the <a>Bundle
--   Programming Guide</a>)
setWindowIcon :: Window -> [Image] -> IO ()

-- | Iconifies (minimizes) the window. See <a>glfwIconifyWindow</a>
iconifyWindow :: Window -> IO ()

-- | Restores the window from an iconified/minimized state. See
--   <a>glfwRestoreWindow</a>
restoreWindow :: Window -> IO ()

-- | Brings the specified window to front and sets input focus. The window
--   should already be visible and not iconified. See
--   <a>glfwFocusWindow</a>
focusWindow :: Window -> IO ()

-- | Maximizes the specified window if it was not already maximized. See
--   <a>glfwMaximizeWindow</a>
maximizeWindow :: Window -> IO ()

-- | Shows the window. See <a>glfwShowWindow</a>
showWindow :: Window -> IO ()

-- | Hides the window. See <a>glfwHideWindow</a>
hideWindow :: Window -> IO ()

-- | Gets the monitor that this window is running on, provided the window
--   is fullscreen. See <a>glfwGetWindowMonitor</a>
getWindowMonitor :: Window -> IO (Maybe Monitor)

-- | Sets the position of the cursor within the window. See
--   <a>glfwSetCursorPos</a>
setCursorPos :: Window -> Double -> Double -> IO ()

-- | Makes a window fullscreen on the given monitor. The number of red,
--   green, and blue bits is ignored. Note, this shouldn't be used to
--   update the resolution of a fullscreen window. Use <a>setWindowSize</a>
--   instead. See <a>glfwSetWindowMonitor</a>
setFullscreen :: Window -> Monitor -> VideoMode -> IO ()

-- | Updates a window to be windowed instead of fullscreen. Note, this
--   shouldn't be used to update the position or size of a window. Use
--   <a>setWindowPos</a> and <a>setWindowSize</a> instead. See
--   <a>glfwSetWindowMonitor</a>
setWindowed :: Window -> Int -> Int -> Int -> Int -> IO ()

-- | If the window has focus or not. See <a>glfwGetWindowAttrib</a>
getWindowFocused :: Window -> IO Bool

-- | If the window is maximized or not. See <a>glfwGetWindowAttrib</a>
getWindowMaximized :: Window -> IO Bool

-- | If the window has been set to be 'always on top' or not. See
--   <a>glfwGetWindowAttrib</a>
getWindowFloating :: Window -> IO Bool

-- | If the window is iconified (minimized) or not. See
--   <a>glfwGetWindowAttrib</a>
getWindowIconified :: Window -> IO Bool

-- | If the window is resizable or not. See <a>glfwGetWindowAttrib</a>
getWindowResizable :: Window -> IO Bool

-- | If the window is decorated or not. See <a>glfwGetWindowAttrib</a>
getWindowDecorated :: Window -> IO Bool

-- | If the window is visible or not. See <a>glfwGetWindowAttrib</a>
getWindowVisible :: Window -> IO Bool

-- | The client api for this window. See <a>glfwGetWindowAttrib</a>
getWindowClientAPI :: Window -> IO ClientAPI

-- | Returns the context creation API used to create the specified window.
--   See <a>glfwGetWindowAttrib</a>
getWindowContextCreationAPI :: Window -> IO ContextCreationAPI

-- | The context's "major" version, x.0.0 See <a>glfwGetWindowAttrib</a>
getWindowContextVersionMajor :: Window -> IO Int

-- | The context's "minor" version, 0.y.0 See <a>glfwGetWindowAttrib</a>
getWindowContextVersionMinor :: Window -> IO Int

-- | The context's "revision" version, 0.0.z See <a>glfwGetWindowAttrib</a>
getWindowContextVersionRevision :: Window -> IO Int

-- | The context robustness of this window. See <a>glfwGetWindowAttrib</a>
getWindowContextRobustness :: Window -> IO ContextRobustness

-- | Returns the context release behavior. See <a>glfwGetWindowAttrib</a>
getWindowContextReleaseBehavior :: Window -> IO ContextReleaseBehavior

-- | Returns true if the window is set to NO_ERROR (see the
--   <a>KHR_no_error</a> extension.
getWindowContextNoError :: Window -> IO Bool

-- | If this window is set for opengl to be forward compatible. See
--   <a>glfwGetWindowAttrib</a>
getWindowOpenGLForwardCompat :: Window -> IO Bool

-- | If the window has an opengl debug context See
--   <a>glfwGetWindowAttrib</a>
getWindowOpenGLDebugContext :: Window -> IO Bool

-- | Obtains the current opengl profile. See <a>glfwGetWindowAttrib</a>
getWindowOpenGLProfile :: Window -> IO OpenGLProfile

-- | Sets the callback to use when the window position changes. See
--   <a>glfwSetWindowPosCallback</a>
setWindowPosCallback :: Window -> Maybe WindowPosCallback -> IO ()

-- | Fires when the window position changes.
type WindowPosCallback = Window -> Int -> Int -> IO ()

-- | Sets the callback to use when the window's size changes. See
--   <a>glfwSetWindowSizeCallback</a>
setWindowSizeCallback :: Window -> Maybe WindowSizeCallback -> IO ()

-- | Fires when the window is resized (in Screen Coordinates, which might
--   not map 1:1 with pixels).
type WindowSizeCallback = Window -> Int -> Int -> IO ()

-- | Sets the callback to use when the user attempts to close the window.
--   See <a>glfwSetWindowCloseCallback</a>
setWindowCloseCallback :: Window -> Maybe WindowCloseCallback -> IO ()

-- | Fires when the user is attempting to close the window
type WindowCloseCallback = Window -> IO ()

-- | Sets the callback to use when the window's data is partly dead and it
--   should refresh. See <a>glfwSetWindowRefreshCallback</a>
setWindowRefreshCallback :: Window -> Maybe WindowRefreshCallback -> IO ()

-- | Fires when the contents of the window are damaged and they must be
--   refreshed.
type WindowRefreshCallback = Window -> IO ()

-- | Sets the callback to use when the window gains or loses focus. See
--   <a>glfwSetWindowFocusCallback</a>
setWindowFocusCallback :: Window -> Maybe WindowFocusCallback -> IO ()

-- | Fires when the window gains or loses input focus.
type WindowFocusCallback = Window -> Bool -> IO ()

-- | Sets the callback to use when the window is iconified or not (aka,
--   minimized or not). See <a>glfwSetWindowIconifyCallback</a>
setWindowIconifyCallback :: Window -> Maybe WindowIconifyCallback -> IO ()

-- | Fires when the window is iconified (minimized) or not.
type WindowIconifyCallback = Window -> Bool -> IO ()

-- | Sets the callback to use when the framebuffer's size changes. See
--   <a>glfwSetFramebufferSizeCallback</a>
setFramebufferSizeCallback :: Window -> Maybe FramebufferSizeCallback -> IO ()

-- | Fires when the size of the framebuffer for the window changes (in
--   Pixels).
type FramebufferSizeCallback = Window -> Int -> Int -> IO ()

-- | Checks for any pending events, processes them, and then immediately
--   returns. This is most useful for continual rendering, such as games.
--   See the <a>Event Processing Guide</a>
pollEvents :: IO ()

-- | Waits until at least one event is in the queue then processes the
--   queue and returns. Requires at least one window to be active for it to
--   sleep. This saves a lot of CPU, and is better if you're doing only
--   periodic rendering, such as with an editor program. See the <a>Event
--   Processing Guide</a>
waitEvents :: IO ()

-- | Same as <a>waitEvents</a>, with a timeout after which the function
--   returns. See the <a>Event Processing Guide</a>
waitEventsTimeout :: Double -> IO ()

-- | Creates an empty event within the event queue. Can be called from any
--   thread, so you can use this to wake up the main thread that's using
--   <a>waitEvents</a> from a secondary thread. See the <a>Event Processing
--   Guide</a>
postEmptyEvent :: IO ()

-- | Part of the <a>Keyboard Input</a> system.
data Key
Key'Unknown :: Key
Key'Space :: Key
Key'Apostrophe :: Key
Key'Comma :: Key
Key'Minus :: Key
Key'Period :: Key
Key'Slash :: Key
Key'0 :: Key
Key'1 :: Key
Key'2 :: Key
Key'3 :: Key
Key'4 :: Key
Key'5 :: Key
Key'6 :: Key
Key'7 :: Key
Key'8 :: Key
Key'9 :: Key
Key'Semicolon :: Key
Key'Equal :: Key
Key'A :: Key
Key'B :: Key
Key'C :: Key
Key'D :: Key
Key'E :: Key
Key'F :: Key
Key'G :: Key
Key'H :: Key
Key'I :: Key
Key'J :: Key
Key'K :: Key
Key'L :: Key
Key'M :: Key
Key'N :: Key
Key'O :: Key
Key'P :: Key
Key'Q :: Key
Key'R :: Key
Key'S :: Key
Key'T :: Key
Key'U :: Key
Key'V :: Key
Key'W :: Key
Key'X :: Key
Key'Y :: Key
Key'Z :: Key
Key'LeftBracket :: Key
Key'Backslash :: Key
Key'RightBracket :: Key
Key'GraveAccent :: Key
Key'World1 :: Key
Key'World2 :: Key
Key'Escape :: Key
Key'Enter :: Key
Key'Tab :: Key
Key'Backspace :: Key
Key'Insert :: Key
Key'Delete :: Key
Key'Right :: Key
Key'Left :: Key
Key'Down :: Key
Key'Up :: Key
Key'PageUp :: Key
Key'PageDown :: Key
Key'Home :: Key
Key'End :: Key
Key'CapsLock :: Key
Key'ScrollLock :: Key
Key'NumLock :: Key
Key'PrintScreen :: Key
Key'Pause :: Key
Key'F1 :: Key
Key'F2 :: Key
Key'F3 :: Key
Key'F4 :: Key
Key'F5 :: Key
Key'F6 :: Key
Key'F7 :: Key
Key'F8 :: Key
Key'F9 :: Key
Key'F10 :: Key
Key'F11 :: Key
Key'F12 :: Key
Key'F13 :: Key
Key'F14 :: Key
Key'F15 :: Key
Key'F16 :: Key
Key'F17 :: Key
Key'F18 :: Key
Key'F19 :: Key
Key'F20 :: Key
Key'F21 :: Key
Key'F22 :: Key
Key'F23 :: Key
Key'F24 :: Key
Key'F25 :: Key
Key'Pad0 :: Key
Key'Pad1 :: Key
Key'Pad2 :: Key
Key'Pad3 :: Key
Key'Pad4 :: Key
Key'Pad5 :: Key
Key'Pad6 :: Key
Key'Pad7 :: Key
Key'Pad8 :: Key
Key'Pad9 :: Key
Key'PadDecimal :: Key
Key'PadDivide :: Key
Key'PadMultiply :: Key
Key'PadSubtract :: Key
Key'PadAdd :: Key
Key'PadEnter :: Key
Key'PadEqual :: Key
Key'LeftShift :: Key
Key'LeftControl :: Key
Key'LeftAlt :: Key
Key'LeftSuper :: Key
Key'RightShift :: Key
Key'RightControl :: Key
Key'RightAlt :: Key
Key'RightSuper :: Key
Key'Menu :: Key

-- | The state of an individual key when <tt>getKey</tt> is called.
data KeyState
KeyState'Pressed :: KeyState
KeyState'Released :: KeyState
KeyState'Repeating :: KeyState

-- | For use with the <a>Joystick Input</a> system.
data Joystick
Joystick'1 :: Joystick
Joystick'2 :: Joystick
Joystick'3 :: Joystick
Joystick'4 :: Joystick
Joystick'5 :: Joystick
Joystick'6 :: Joystick
Joystick'7 :: Joystick
Joystick'8 :: Joystick
Joystick'9 :: Joystick
Joystick'10 :: Joystick
Joystick'11 :: Joystick
Joystick'12 :: Joystick
Joystick'13 :: Joystick
Joystick'14 :: Joystick
Joystick'15 :: Joystick
Joystick'16 :: Joystick

-- | Part of the <tt>JoystickCallback</tt>, for when a monitor gets
--   connected or disconnected.
data JoystickState
JoystickState'Connected :: JoystickState
JoystickState'Disconnected :: JoystickState

-- | If a given joystick button is pressed or not when
--   <tt>getJoystickButtons</tt> is called.
data JoystickButtonState
JoystickButtonState'Pressed :: JoystickButtonState
JoystickButtonState'Released :: JoystickButtonState

-- | Part of the <a>Mouse Input</a> system.
data MouseButton
MouseButton'1 :: MouseButton
MouseButton'2 :: MouseButton
MouseButton'3 :: MouseButton
MouseButton'4 :: MouseButton
MouseButton'5 :: MouseButton
MouseButton'6 :: MouseButton
MouseButton'7 :: MouseButton
MouseButton'8 :: MouseButton

-- | If the mouse button is pressed or not when <tt>getMouseButton</tt> is
--   called.
data MouseButtonState
MouseButtonState'Pressed :: MouseButtonState
MouseButtonState'Released :: MouseButtonState

-- | If the mouse's cursor is in the window or not.
data CursorState
CursorState'InWindow :: CursorState
CursorState'NotInWindow :: CursorState

-- | Allows for special forms of mouse input. See <a>Cursor Modes</a>
data CursorInputMode
CursorInputMode'Normal :: CursorInputMode
CursorInputMode'Hidden :: CursorInputMode
CursorInputMode'Disabled :: CursorInputMode

-- | When sticky keys is enabled, once a key is pressed it will remain
--   pressed at least until the state is polled with <tt>getKey</tt>. After
--   that, if the key has been released it will switch back to released.
--   This helps prevent problems with low-resolution polling missing key
--   pressed. Note that use of the callbacks to avoid this problem the the
--   recommended route, and this is just for a fallback.
data StickyKeysInputMode
StickyKeysInputMode'Enabled :: StickyKeysInputMode
StickyKeysInputMode'Disabled :: StickyKeysInputMode

-- | This is the mouse version of <a>StickyKeysInputMode</a>.
data StickyMouseButtonsInputMode
StickyMouseButtonsInputMode'Enabled :: StickyMouseButtonsInputMode
StickyMouseButtonsInputMode'Disabled :: StickyMouseButtonsInputMode

-- | Modifier keys that were pressed as part of another keypress event.
data ModifierKeys
ModifierKeys :: Bool -> Bool -> Bool -> Bool -> ModifierKeys
[modifierKeysShift] :: ModifierKeys -> Bool
[modifierKeysControl] :: ModifierKeys -> Bool
[modifierKeysAlt] :: ModifierKeys -> Bool
[modifierKeysSuper] :: ModifierKeys -> Bool

-- | GLFW image data, for setting up custom mouse cursor appearnaces.
data Image

-- | Create an image given the function to generate 8-bit RGBA values based
--   on the pixel location.
mkImage :: Int -> Int -> (Int -> Int -> (Word8, Word8, Word8, Word8)) -> Image

-- | Reprisents a GLFW cursor.
newtype Cursor
Cursor :: Ptr C'GLFWcursor -> Cursor
[unCursor] :: Cursor -> Ptr C'GLFWcursor

-- | Lets you use one of the standard cursor appearnaces that the local
--   system theme provides for. See <a>Standard Cursor Creation</a>.
data StandardCursorShape
StandardCursorShape'Arrow :: StandardCursorShape
StandardCursorShape'IBeam :: StandardCursorShape
StandardCursorShape'Crosshair :: StandardCursorShape
StandardCursorShape'Hand :: StandardCursorShape
StandardCursorShape'HResize :: StandardCursorShape
StandardCursorShape'VResize :: StandardCursorShape

-- | Gets the current cursor input mode. See <a>glfwSetInputMode</a>
getCursorInputMode :: Window -> IO CursorInputMode

-- | Set the cursor input mode. See <a>glfwSetInputMode</a>
setCursorInputMode :: Window -> CursorInputMode -> IO ()

-- | Gets the current sticky keys mode. See <a>glfwSetInputMode</a>
getStickyKeysInputMode :: Window -> IO StickyKeysInputMode

-- | Sets if sticky keys should be used or not. See <a>glfwSetInputMode</a>
setStickyKeysInputMode :: Window -> StickyKeysInputMode -> IO ()

-- | Gets if sticky mouse buttons are on or not. See
--   <a>glfwSetInputMode</a>
getStickyMouseButtonsInputMode :: Window -> IO StickyMouseButtonsInputMode

-- | Sets if sticky mouse buttons should be used or not. See
--   <a>glfwSetInputMode</a>
setStickyMouseButtonsInputMode :: Window -> StickyMouseButtonsInputMode -> IO ()

-- | Gets the state of the specified key. If Stickey Keys isn't enabled
--   then it's possible for keyboard polling to miss individual key
--   presses. Use the callback to avoid this. See <a>glfwGetKey</a>
getKey :: Window -> Key -> IO KeyState

-- | Returns the localized name of the specified printable key. This is
--   intended for displaying key bindings to the user. The scancode is used
--   if the provided <a>Key</a> isn't printable. If the scancode maps to a
--   non-printable key as well, then <a>Nothing</a> is returned. See
--   <a>glfwGetKeyName</a>
getKeyName :: Key -> Int -> IO (Maybe String)

-- | Gets the state of a single specified mouse button. If sticky mouse
--   button mode isn't enabled it's possible for mouse polling to miss
--   individual mouse events. Use the call back to avoid this. See
--   <a>glfwGetMouseButton</a>
getMouseButton :: Window -> MouseButton -> IO MouseButtonState

-- | Returns the position, in screen coodinates, relative to the upper
--   left. If the <a>CursorInputMode</a> is "disabled", then results are
--   unbounded by the window size. See <a>glfwGetCursorPos</a>
getCursorPos :: Window -> IO (Double, Double)

-- | Assigns the given callback to use for all keyboard presses and
--   repeats. See <a>glfwSetKeyCallback</a>
setKeyCallback :: Window -> Maybe KeyCallback -> IO ()

-- | Fires for each press or repeat of keyboard keys (regardless of if it
--   has textual meaning or not, eg Shift)
type KeyCallback = Window -> Key -> Int -> KeyState -> ModifierKeys -> IO ()

-- | Sets the callback to use when the user types a character See
--   <a>glfwSetCharCallback</a>
setCharCallback :: Window -> Maybe CharCallback -> IO ()

-- | Fires when a complete character codepoint is typed by the user, Shift
--   then <tt>b</tt> generates <a>B</a>.
type CharCallback = Window -> Char -> IO ()

-- | Sets the callback to use with Unicode characters regardless of what
--   modifier keys are used. See <a>glfwSetCharModsCallback</a>
setCharModsCallback :: Window -> Maybe CharModsCallback -> IO ()

-- | Similar to <a>CharCallback</a>, fires when a complete unicode
--   codepoint is typed by the user.
type CharModsCallback = Window -> Char -> ModifierKeys -> IO ()

-- | Assigns the callback to run whenver a mouse button is clicked. See
--   <a>glfwSetMouseButtonCallback</a>
setMouseButtonCallback :: Window -> Maybe MouseButtonCallback -> IO ()

-- | Fires whenever a mouse button is clicked.
type MouseButtonCallback = Window -> MouseButton -> MouseButtonState -> ModifierKeys -> IO ()

-- | Assigns the callback to run whenver the cursor position changes. See
--   <a>glfwSetCursorPosCallback</a>
setCursorPosCallback :: Window -> Maybe CursorPosCallback -> IO ()

-- | Fires every time the cursor position changes. Sub-pixel accuracy is
--   used, when available.
type CursorPosCallback = Window -> Double -> Double -> IO ()

-- | Sets the callback for when the cursor enters or leaves the client
--   area. See <a>Cursor Enter/Leave Events</a>
setCursorEnterCallback :: Window -> Maybe CursorEnterCallback -> IO ()

-- | Fires when the cursor enters or exits the client area of the window.
type CursorEnterCallback = Window -> CursorState -> IO ()

-- | Creates a new cursor.
createCursor :: Image -> Int -> Int -> IO Cursor

-- | Creates a cursor with a standard shape that can be set for a window
--   with setCursor.
createStandardCursor :: StandardCursorShape -> IO Cursor

-- | 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.
setCursor :: Window -> Cursor -> IO ()

-- | Destroys a cursor previously created with <a>createCursor</a>. Any
--   remaining cursors will be destroyed by <a>terminate</a>.
destroyCursor :: Cursor -> IO ()

-- | Sets the callback to run when the user scrolls with the mouse wheel or
--   a touch gesture. See <a>Scroll Input</a>
setScrollCallback :: Window -> Maybe ScrollCallback -> IO ()

-- | Fires when the user scrolls the mouse wheel or via touch gesture.
type ScrollCallback = Window -> Double -> Double -> IO ()

-- | Sets the file drop callback of the specified window, which is called
--   when one or more dragged files are dropped on the window.
setDropCallback :: Window -> Maybe DropCallback -> IO ()

-- | A callback that allows for drag and drop support.
type DropCallback = Window " The window that received the event." -> [String] " The file and/or directory path names" -> IO ()

-- | Tests if the joystick is present at all See <a>glfwJoystickPresent</a>
joystickPresent :: Joystick -> IO Bool

-- | Returns the values of all axes of the specified joystick, normalized
--   to between -1.0 and 1.0 See <a>glfwGetJoystickAxes</a>
getJoystickAxes :: Joystick -> IO (Maybe [Double])

-- | Returns a list of all joystick button states for the specified
--   joystick. See <a>glfwGetJoystickButtons</a>
getJoystickButtons :: Joystick -> IO (Maybe [JoystickButtonState])

-- | A human-readable name for a Joystick. Not guranteed to be unique. See
--   <a>glfwGetJoystickName</a>
getJoystickName :: Joystick -> IO (Maybe String)

-- | Sets a callback for when a joystick is connected or disconnected. See
--   <a>glfwSetJoystickCallback</a>
setJoystickCallback :: Maybe JoystickCallback -> IO ()

-- | Fires when a joystick is connected or disconnected.
type JoystickCallback = Joystick -> JoystickState -> IO ()

-- | Returns the time (in seconds) of the GLFW timer. This is the amount of
--   time since GLFW was initialized, unless <a>setTime</a> was used. The
--   exact resolution is system dependent. See <a>glfwGetTime</a>
getTime :: IO (Maybe Double)

-- | Sets the GLFW timer to the specified value, which is measured in
--   seconds, and must be positive. The value must also be less than ~584
--   years in seconds (18446744073.0). After this the timer begins to count
--   upward at the normal rate. See <a>glfwSetTime</a>
setTime :: Double -> IO ()

-- | Returns the current value of the raw timer, measured in 1 / frequency
--   seconds. The frequency can be queried using getTimerFrequency. See
--   <a>Timer input</a>
getTimerValue :: IO Word64

-- | Returns the frequency, in Hz, of the raw timer. See <a>Timer input</a>
getTimerFrequency :: IO Word64

-- | Makes the context of the specified window the current one for the
--   calling thread. A context can only be made current on a single thread
--   at a time, and each thread can have only a single current context at a
--   time. See <a>glfwMakeContextCurrent</a>
makeContextCurrent :: Maybe Window -> IO ()

-- | Obtains which window owns the current context of the calling thread.
--   See <a>glfwGetCurrentContext</a>
getCurrentContext :: IO (Maybe Window)

-- | Swaps the front and back buffers of the window. See
--   <a>glfwSwapBuffers</a>
swapBuffers :: Window -> IO ()

-- | Sets the number of screen updates that the GPU should wait after
--   <a>swapBuffers</a> before actually swapping the buffers. Generates
--   <a>Error'NoCurrentContext</a> if no context is current. See
--   <a>glfwSwapInterval</a>
swapInterval :: Int -> IO ()

-- | If the current OpenGL or OpenGL ES context supports the extension
--   specified. Generates <a>Error'NoCurrentContext</a> if no context is
--   current. See <a>glfwExtensionSupported</a>
extensionSupported :: String -> IO Bool

-- | Obtains the contents of the system keyboard, if possible. Generates
--   <a>Error'FormatUnavailable</a> if the system clipboard is empty or if
--   it's not a UTF-8 string. See <a>glfwGetClipboardString</a>
getClipboardString :: Window -> IO (Maybe String)

-- | The window that will own the clipboard contents, and also the
--   clipboard string. See <a>glfwSetClipboardString</a>
setClipboardString :: Window -> String -> IO ()

-- | This function returns whether the Vulkan loader has been found. This
--   check is performed by <a>init</a>.
vulkanSupported :: IO Bool

-- | Get required vulkan extensions; Pointer memory is managed by GLFW,
--   destroyed by <a>terminate</a> call.
--   
--   The returned extension names are kept in <a>CString</a> type, because
--   they are expected to be consumed by vulkan device initialization
--   functions.
getRequiredInstanceExtensions :: IO [CString]

-- | Returns the address of the specified Vulkan instance function.
getInstanceProcAddress :: Ptr vkInstance -> String -> IO (FunPtr vkProc)

-- | Returns whether the specified queue family can present images.
getPhysicalDevicePresentationSupport :: Ptr vkInstance -> Ptr vkPhysicalDevice -> Word32 -> IO Bool

-- | Creates a Vulkan surface for the specified window
createWindowSurface :: Enum vkResult => Ptr vkInstance -> Window -> Ptr vkAllocationCallbacks -> Ptr vkSurfaceKHR -> IO vkResult

-- | See <a>glfwGetWin32Adapter</a>
getWin32Adapter :: Window -> IO CString

-- | See <a>glfwGetWin32Monitor</a>
getWin32Monitor :: Window -> IO CString

-- | See <a>glfwGetWin32Window</a>
getWin32Window :: Window -> IO (Ptr ())

-- | See <a>glfwGetWGLContext</a>
getWGLContext :: Window -> IO (Ptr ())

-- | See <a>glfwGetCocoaMonitor</a>
getCocoaMonitor :: Window -> IO (Ptr Word32)

-- | See <a>glfwGetCocoaWindow</a>
getCocoaWindow :: Window -> IO (Ptr ())

-- | See <a>glfwGetNSGLContext</a>
getNSGLContext :: Window -> IO (Ptr ())

-- | See <a>glfwGetX11Display</a>
getX11Display :: Window -> IO (Ptr display)

-- | See <a>glfwGetX11Adapter</a>
getX11Adapter :: Window -> IO Word64

-- | See <a>glfwGetX11Monitor</a>
getX11Monitor :: Window -> IO Word64

-- | See <a>glfwGetX11Window</a>
getX11Window :: Window -> IO Word64

-- | See <a>glfwGetGLXContext</a>
getGLXContext :: Window -> IO (Ptr ())

-- | See <a>glfwGetGLXWindow</a>
getGLXWindow :: Window -> IO Word64

-- | See <a>glfwGetWaylandDisplay</a>
getWaylandDisplay :: IO (Ptr wl_display)

-- | See <a>glfwGetWaylandMonitor</a>
getWaylandMonitor :: Window -> IO (Ptr wl_output)

-- | See <a>glfwGetWaylandWindow</a>
getWaylandWindow :: Window -> IO (Ptr wl_surface)

-- | See <a>glfwGetMirDisplay</a>
getMirDisplay :: IO (Ptr mir_connection)

-- | See <a>glfwGetMirMonitor</a>
getMirMonitor :: Window -> IO Int

-- | See <a>glfwGetMirWindow</a>
getMirWindow :: Window -> IO (Ptr mir_surface)

-- | See <a>glfwGetEGLDisplay</a>
getEGLDisplay :: IO (Ptr ())

-- | See <a>glfwGetEGLContext</a>
getEGLContext :: Window -> IO (Ptr ())

-- | See <a>glfwGetEGLSurface</a>
getEGLSurface :: Window -> IO (Ptr ())
