Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module provides everything relating to input in the scope of spice.
- data Sinks = Sinks {
- mousePositionSinks :: Vector Float -> IO ()
- keyboardSinks :: Map Key (Bool -> IO ())
- mouseSinks :: Map MouseButton (Bool -> IO ())
- data Input = Input {}
- data InputContainer = InputContainer {}
- makeInputContainer :: IO InputContainer
- makeMousePositionCallback :: InputContainer -> MousePosCallback
- makeKeyboardCallback :: InputContainer -> KeyCallback
- makeMouseCallback :: InputContainer -> MouseButtonCallback
Documentation
A wrapper around the sinks for the mouse position, the key states, and the mouse button states.
Sinks | |
|
A container for all of the states themselves. It is used as a Signal
in the Input
(which is necessary to use it within
Elerea's FRP network).InputContainer
data InputContainer Source
makeInputContainer :: IO InputContainer Source
Making an
filled with all necessary externals.InputContainer
makeMousePositionCallback :: InputContainer -> MousePosCallback Source
Creating a callback to update the mouse position's state.
makeKeyboardCallback :: InputContainer -> KeyCallback Source
Creating a callback to update the keyboard's states.
makeMouseCallback :: InputContainer -> MouseButtonCallback Source
Creating a callback to update the mouse buttons' states.