| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.GPipe.Context.GLFW.Input
Description
User input functions covering much of the GLFW Input guide: http://www.glfw.org/docs/latest/input_guide.html.
Actions are in the GPipe ContextT monad when a window handle is required,
otherwise they are bare reexported IO actions which can be lifted into the ContextT monad.
The Window taken by many of these functions is the window resource from GPipe.
Synopsis
- postEmptyEvent :: IO ()
- setKeyCallback :: MonadIO m => Window os c ds -> Maybe (Key -> Int -> KeyState -> ModifierKeys -> IO ()) -> ContextT Handle os m (Maybe ())
- getKey :: MonadIO m => Window os c ds -> Key -> ContextT Handle os m (Maybe KeyState)
- setStickyKeysInputMode :: MonadIO m => Window os c ds -> StickyKeysInputMode -> ContextT Handle os m (Maybe ())
- getStickyKeysInputMode :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe StickyKeysInputMode)
- setCharCallback :: MonadIO m => Window os c ds -> Maybe (Char -> IO ()) -> ContextT Handle os m (Maybe ())
- setCursorPosCallback :: MonadIO m => Window os c ds -> Maybe (Double -> Double -> IO ()) -> ContextT Handle os m (Maybe ())
- getCursorPos :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe (Double, Double))
- setCursorInputMode :: MonadIO m => Window os c ds -> CursorInputMode -> ContextT Handle os m (Maybe ())
- getCursorInputMode :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe CursorInputMode)
- createCursor :: Image -> Int -> Int -> IO Cursor
- createStandardCursor :: StandardCursorShape -> IO Cursor
- destroyCursor :: Cursor -> IO ()
- setCursor :: MonadIO m => Window os c ds -> Cursor -> ContextT Handle os m (Maybe ())
- setCursorEnterCallback :: MonadIO m => Window os c ds -> Maybe (CursorState -> IO ()) -> ContextT Handle os m (Maybe ())
- setMouseButtonCallback :: MonadIO m => Window os c ds -> Maybe (MouseButton -> MouseButtonState -> ModifierKeys -> IO ()) -> ContextT Handle os m (Maybe ())
- getMouseButton :: MonadIO m => Window os c ds -> MouseButton -> ContextT Handle os m (Maybe MouseButtonState)
- setStickyMouseButtonsInputMode :: MonadIO m => Window os c ds -> StickyMouseButtonsInputMode -> ContextT Handle os m (Maybe ())
- getStickyMouseButtonsInputMode :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe StickyMouseButtonsInputMode)
- setScrollCallback :: MonadIO m => Window os c ds -> Maybe (Double -> Double -> IO ()) -> ContextT Handle os m (Maybe ())
- 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 ()
- getClipboardString :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe (Maybe String))
- setClipboardString :: MonadIO m => Window os c ds -> String -> ContextT Handle os m (Maybe ())
- setDropCallback :: MonadIO m => Window os c ds -> Maybe ([String] -> IO ()) -> ContextT Handle os m (Maybe ())
- 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 ModifierKeys = ModifierKeys {}
- data StickyKeysInputMode
- data CursorInputMode
- data StandardCursorShape
- data CursorState
- data StickyMouseButtonsInputMode
- data MouseButton
- data MouseButtonState
- data Joystick
- data JoystickButtonState
Event processing
Learn more: http://www.glfw.org/docs/latest/input_guide.html#events
glfwPollEventsglfwWaitEvents
GLFW Events are processed after each buffer swap by default. To change
event processing construct a HandleConfig for runContextT. For greater
control use the mainloop and mainstep functions provided by
Graphics.GPipe.Context.GLFW.
postEmptyEvent :: 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
waitEvents from a secondary thread.
See the Event Processing Guide
Force wake from waitEvents with a dummy event.
Keyboard input
Key input
setKeyCallback :: MonadIO m => Window os c ds -> Maybe (Key -> Int -> KeyState -> ModifierKeys -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
setStickyKeysInputMode :: MonadIO m => Window os c ds -> StickyKeysInputMode -> ContextT Handle os m (Maybe ()) Source #
Polling a Key for KeyState may sometimes miss state transitions.
If you use cannot use a callback to receive KeyState changes,
use getKey in combination with GLFW's sticky-keys feature:
http://www.glfw.org/docs/latest/input_guide.html#input_key.
getStickyKeysInputMode :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe StickyKeysInputMode) Source #
Text input
setCharCallback :: MonadIO m => Window os c ds -> Maybe (Char -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
Register or unregister a callback to receive character input obeying keyboard layouts and modifier effects.
Mouse input
Cursor position
setCursorPosCallback :: MonadIO m => Window os c ds -> Maybe (Double -> Double -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
Register or unregister a callback to receive mouse location changes.
Callback receives x and y position measured in screen-coordinates relative to the top left of the GLFW window.
getCursorPos :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe (Double, Double)) Source #
Poll for the location of the mouse.
Cursor modes
setCursorInputMode :: MonadIO m => Window os c ds -> CursorInputMode -> ContextT Handle os m (Maybe ()) Source #
GLFW supports setting cursor mode to support mouselook and other advanced uses of the mouse: http://www.glfw.org/docs/latest/input_guide.html#cursor_mode.
getCursorInputMode :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe CursorInputMode) Source #
Cursor objects
Custom cursor creation
Arguments
| :: 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.
Standard cursor creation
createStandardCursor :: StandardCursorShape -> IO Cursor #
Creates a cursor with a standard shape that can be set for a window with setCursor.
Cursor destruction
destroyCursor :: Cursor -> IO () #
Destroys a cursor previously created with createCursor. Any remaining
cursors will be destroyed by terminate. This function is not
reentrant.
Cursor setting
setCursor :: MonadIO m => Window os c ds -> Cursor -> ContextT Handle os m (Maybe ()) Source #
Set the cursor to be displayed over the window while CursorInputMode is Normal.
Cursor enter/leave events
setCursorEnterCallback :: MonadIO m => Window os c ds -> Maybe (CursorState -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
Register or unregister a callback to receive CursorState changes when the cursor enters or exits the window.
Mouse button input
setMouseButtonCallback :: MonadIO m => Window os c ds -> Maybe (MouseButton -> MouseButtonState -> ModifierKeys -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
Register or unregister a callback to receive MouseButtonState changes to a MouseButton.
getMouseButton :: MonadIO m => Window os c ds -> MouseButton -> ContextT Handle os m (Maybe MouseButtonState) Source #
Poll for the MouseButtonState of a MouseButton.
setStickyMouseButtonsInputMode :: MonadIO m => Window os c ds -> StickyMouseButtonsInputMode -> ContextT Handle os m (Maybe ()) Source #
Polling a MouseButton for MouseButtonState may sometimes miss state transitions.
If you use cannot use a callback to receive MouseButtonState changes,
use getMouseButton in combination with GLFW's sticky-mouse-buttons feature:
http://www.glfw.org/docs/latest/input_guide.html#input_mouse_button.
getStickyMouseButtonsInputMode :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe StickyMouseButtonsInputMode) Source #
Scroll input
setScrollCallback :: MonadIO m => Window os c ds -> Maybe (Double -> Double -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
Register or unregister a callback to receive scroll offset changes.
Joystick input
joystickPresent :: Joystick -> IO Bool #
Tests if the joystick is present at all See glfwJoystickPresent
Is the specified Joystick currently connected?
Joystick axis states
getJoystickAxes :: Joystick -> IO (Maybe [Double]) #
Returns the values of all axes of the specified joystick, normalized to between -1.0 and 1.0 See glfwGetJoystickAxes
Poll for the positions of each axis on the Joystick. Positions are on the range `-1.0..1.0`.
Joystick button states
getJoystickButtons :: Joystick -> IO (Maybe [JoystickButtonState]) #
Returns a list of all joystick button states for the specified joystick. See glfwGetJoystickButtons
Poll for the JoystickButtonState of each button on the Joystick.
Joystick name
getJoystickName :: Joystick -> IO (Maybe String) #
A human-readable name for a Joystick. Not guranteed to be unique. See glfwGetJoystickName
Retrieve a non-unique string identifier for the Joystick.
This might be the make & model name of the device.
Time input
getTime :: IO (Maybe Double) #
Returns the time (in seconds) of the GLFW timer.
This is the amount of time since GLFW was initialized, unless setTime was used.
The exact resolution is system dependent.
See glfwGetTime
Poll for the number of seconds since GLFW was initialized by GPipe.
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 glfwSetTime
Manually set the timer to a specified value.
Clipboard input and output
getClipboardString :: MonadIO m => Window os c ds -> ContextT Handle os m (Maybe (Maybe String)) Source #
Poll the system clipboard for a UTF-8 encoded string, if one can be extracted.
setClipboardString :: MonadIO m => Window os c ds -> String -> ContextT Handle os m (Maybe ()) Source #
Store a UTF-8 encoded string in the system clipboard.
Path drop input
setDropCallback :: MonadIO m => Window os c ds -> Maybe ([String] -> IO ()) -> ContextT Handle os m (Maybe ()) Source #
Register or unregister a callback to receive file paths when files are dropped onto the window.
Reexported datatypes
Keyboard
Part of the Keyboard Input system.
Constructors
Instances
| Bounded Key | |
| Enum Key | |
| Eq Key | |
| Data Key | |
Defined in Graphics.UI.GLFW.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Key -> c Key # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Key # dataTypeOf :: Key -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Key) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Key) # gmapT :: (forall b. Data b => b -> b) -> Key -> Key # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r # gmapQ :: (forall d. Data d => d -> u) -> Key -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Key -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Key -> m Key # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key # | |
| Ord Key | |
| Read Key | |
| Show Key | |
| Generic Key | |
| NFData Key | |
Defined in Graphics.UI.GLFW.Types | |
| type Rep Key | |
Defined in Graphics.UI.GLFW.Types type Rep Key = D1 ('MetaData "Key" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.0.0-72a4a62ce9344b1d477911be5428439a7f0dde4015e86b2f16bc27b1f4e0b616" 'False) ((((((C1 ('MetaCons "Key'Unknown" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'Space" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Apostrophe" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'Comma" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Minus" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Period" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Slash" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'1" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'3" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'5" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'6" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'7" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Key'8" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'9" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Semicolon" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'Equal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'A" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'B" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'C" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'D" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'E" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'F" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'G" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'H" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'I" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'J" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'K" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "Key'L" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'M" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'N" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'O" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'P" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Q" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'R" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'S" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'T" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'U" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'V" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'W" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'X" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Y" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Z" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Key'LeftBracket" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'Backslash" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'RightBracket" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'GraveAccent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'World1" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'World2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Escape" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'Enter" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Tab" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Backspace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Insert" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'Delete" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Right" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Left" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Down" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "Key'Up" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'PageUp" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'PageDown" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'Home" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'End" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'CapsLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'ScrollLock" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'NumLock" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'PrintScreen" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Pause" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F1" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'F2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F3" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'F4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F5" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Key'F6" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'F7" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F8" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'F9" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F10" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'F11" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F12" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'F13" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F14" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'F15" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F16" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'F17" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F18" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'F19" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F20" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "Key'F21" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Key'F22" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F23" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'F24" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'F25" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Pad0" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Pad1" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'Pad2" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Pad3" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Pad4" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Pad5" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'Pad6" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Pad7" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'Pad8" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Pad9" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: ((((C1 ('MetaCons "Key'PadDecimal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'PadDivide" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'PadMultiply" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'PadSubtract" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'PadAdd" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'PadEnter" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'PadEqual" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'LeftShift" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Key'LeftControl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'LeftAlt" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'LeftSuper" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'RightShift" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Key'RightControl" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'RightAlt" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Key'RightSuper" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Key'Menu" 'PrefixI 'False) (U1 :: Type -> Type)))))))) | |
The state of an individual key when getKey is called.
Constructors
| KeyState'Pressed | |
| KeyState'Released | |
| KeyState'Repeating |
Instances
| Bounded KeyState | |
| Enum KeyState | |
Defined in Graphics.UI.GLFW.Types | |
| Eq KeyState | |
| Data KeyState | |
Defined in Graphics.UI.GLFW.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KeyState -> c KeyState # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c KeyState # toConstr :: KeyState -> Constr # dataTypeOf :: KeyState -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c KeyState) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KeyState) # gmapT :: (forall b. Data b => b -> b) -> KeyState -> KeyState # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KeyState -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KeyState -> r # gmapQ :: (forall d. Data d => d -> u) -> KeyState -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> KeyState -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> KeyState -> m KeyState # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyState -> m KeyState # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyState -> m KeyState # | |
| Ord KeyState | |
Defined in Graphics.UI.GLFW.Types | |
| Read KeyState | |
| Show KeyState | |
| Generic KeyState | |
| NFData KeyState | |
Defined in Graphics.UI.GLFW.Types | |
| type Rep KeyState | |
Defined in Graphics.UI.GLFW.Types type Rep KeyState = D1 ('MetaData "KeyState" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.0.0-72a4a62ce9344b1d477911be5428439a7f0dde4015e86b2f16bc27b1f4e0b616" 'False) (C1 ('MetaCons "KeyState'Pressed" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "KeyState'Released" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KeyState'Repeating" 'PrefixI 'False) (U1 :: Type -> Type))) | |
data ModifierKeys #
Modifier keys that were pressed as part of another keypress event.
Constructors
| ModifierKeys | |
Fields
| |
Instances
data StickyKeysInputMode #
When sticky keys is enabled, once a key is pressed it will remain pressed
at least until the state is polled with getKey. 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.
Instances
Mouse
data CursorInputMode #
Allows for special forms of mouse input. See Cursor Modes
Instances
data StandardCursorShape #
Lets you use one of the standard cursor appearnaces that the local system theme provides for. See Standard Cursor Creation.
Constructors
| StandardCursorShape'Arrow | |
| StandardCursorShape'IBeam | |
| StandardCursorShape'Crosshair | |
| StandardCursorShape'Hand | |
| StandardCursorShape'HResize | |
| StandardCursorShape'VResize |
Instances
data CursorState #
If the mouse's cursor is in the window or not.
Constructors
| CursorState'InWindow | |
| CursorState'NotInWindow |
Instances
data StickyMouseButtonsInputMode #
This is the mouse version of StickyKeysInputMode.
Instances
data MouseButton #
Part of the Mouse Input system.
Constructors
| MouseButton'1 | |
| MouseButton'2 | |
| MouseButton'3 | |
| MouseButton'4 | |
| MouseButton'5 | |
| MouseButton'6 | |
| MouseButton'7 | |
| MouseButton'8 |
Instances
data MouseButtonState #
If the mouse button is pressed or not when getMouseButton is
called.
Constructors
| MouseButtonState'Pressed | |
| MouseButtonState'Released |
Instances
Joystick
For use with the Joystick Input system.
Constructors
| Joystick'1 | |
| Joystick'2 | |
| Joystick'3 | |
| Joystick'4 | |
| Joystick'5 | |
| Joystick'6 | |
| Joystick'7 | |
| Joystick'8 | |
| Joystick'9 | |
| Joystick'10 | |
| Joystick'11 | |
| Joystick'12 | |
| Joystick'13 | |
| Joystick'14 | |
| Joystick'15 | |
| Joystick'16 |
Instances
| Bounded Joystick | |
| Enum Joystick | |
Defined in Graphics.UI.GLFW.Types | |
| Eq Joystick | |
| Data Joystick | |
Defined in Graphics.UI.GLFW.Types Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Joystick -> c Joystick # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Joystick # toConstr :: Joystick -> Constr # dataTypeOf :: Joystick -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Joystick) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Joystick) # gmapT :: (forall b. Data b => b -> b) -> Joystick -> Joystick # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Joystick -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Joystick -> r # gmapQ :: (forall d. Data d => d -> u) -> Joystick -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Joystick -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Joystick -> m Joystick # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Joystick -> m Joystick # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Joystick -> m Joystick # | |
| Ord Joystick | |
Defined in Graphics.UI.GLFW.Types | |
| Read Joystick | |
| Show Joystick | |
| Generic Joystick | |
| NFData Joystick | |
Defined in Graphics.UI.GLFW.Types | |
| type Rep Joystick | |
Defined in Graphics.UI.GLFW.Types type Rep Joystick = D1 ('MetaData "Joystick" "Graphics.UI.GLFW.Types" "GLFW-b-3.3.0.0-72a4a62ce9344b1d477911be5428439a7f0dde4015e86b2f16bc27b1f4e0b616" 'False) ((((C1 ('MetaCons "Joystick'1" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'2" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'3" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'4" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Joystick'5" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'6" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'7" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'8" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: (((C1 ('MetaCons "Joystick'9" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'10" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'11" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'12" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Joystick'13" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'14" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Joystick'15" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Joystick'16" 'PrefixI 'False) (U1 :: Type -> Type))))) | |
data JoystickButtonState #
If a given joystick button is pressed or not when
getJoystickButtons is called.
Instances
Not supported
Some GLFW functionality isn't currently exposed by Graphics.UI.GLFW.
glfwWaitEventsTimeoutglfwSetCharModsCallbackglfwGetKeyNameglfwSetJoystickCallbackglfwGetTimerValueglfwGetTimerFrequency