sdl2-2.5.2.0: Both high- and low-level bindings to the SDL library (version 2.0.6+).

Safe Haskell | Safe
Language | Haskell2010

SDL.Raw.Event

Contents

- Event Handling
- Keyboard Support
- Mouse Support
- Joystick Support
- Game Controller Support

Synopsis

- addEventWatch :: MonadIO m => EventFilter -> Ptr () -> m ()
- delEventWatch :: MonadIO m => EventFilter -> Ptr () -> m ()
- eventState :: MonadIO m => Word32 -> CInt -> m Word8
- filterEvents :: MonadIO m => EventFilter -> Ptr () -> m ()
- flushEvent :: MonadIO m => Word32 -> m ()
- flushEvents :: MonadIO m => Word32 -> Word32 -> m ()
- getEventFilter :: MonadIO m => Ptr EventFilter -> Ptr (Ptr ()) -> m Bool
- getNumTouchDevices :: MonadIO m => m CInt
- getNumTouchFingers :: MonadIO m => TouchID -> m CInt
- getTouchDevice :: MonadIO m => CInt -> m TouchID
- getTouchFinger :: MonadIO m => TouchID -> CInt -> m (Ptr Finger)
- hasEvent :: MonadIO m => Word32 -> m Bool
- hasEvents :: MonadIO m => Word32 -> Word32 -> m Bool
- loadDollarTemplates :: MonadIO m => TouchID -> Ptr RWops -> m CInt
- peepEvents :: MonadIO m => Ptr Event -> CInt -> EventAction -> Word32 -> Word32 -> m CInt
- pollEvent :: MonadIO m => Ptr Event -> m CInt
- pumpEvents :: MonadIO m => m ()
- pushEvent :: MonadIO m => Ptr Event -> m CInt
- quitRequested :: MonadIO m => m Bool
- recordGesture :: MonadIO m => TouchID -> m CInt
- registerEvents :: MonadIO m => CInt -> m Word32
- saveAllDollarTemplates :: MonadIO m => Ptr RWops -> m CInt
- saveDollarTemplate :: MonadIO m => GestureID -> Ptr RWops -> m CInt
- setEventFilter :: MonadIO m => EventFilter -> Ptr () -> m ()
- waitEvent :: MonadIO m => Ptr Event -> m CInt
- waitEventTimeout :: MonadIO m => Ptr Event -> CInt -> m CInt
- getKeyFromName :: MonadIO m => CString -> m Keycode
- getKeyFromScancode :: MonadIO m => Scancode -> m Keycode
- getKeyName :: MonadIO m => Keycode -> m CString
- getKeyboardFocus :: MonadIO m => m Window
- getKeyboardState :: MonadIO m => Ptr CInt -> m (Ptr Word8)
- getModState :: MonadIO m => m Keymod
- getScancodeFromKey :: MonadIO m => Keycode -> m Scancode
- getScancodeFromName :: MonadIO m => CString -> m Scancode
- getScancodeName :: MonadIO m => Scancode -> m CString
- hasScreenKeyboardSupport :: MonadIO m => m Bool
- isScreenKeyboardShown :: MonadIO m => Window -> m Bool
- isTextInputActive :: MonadIO m => m Bool
- setModState :: MonadIO m => Keymod -> m ()
- setTextInputRect :: MonadIO m => Ptr Rect -> m ()
- startTextInput :: MonadIO m => m ()
- stopTextInput :: MonadIO m => m ()
- captureMouse :: MonadIO m => Bool -> m CInt
- createColorCursor :: MonadIO m => Ptr Surface -> CInt -> CInt -> m Cursor
- createCursor :: MonadIO m => Ptr Word8 -> Ptr Word8 -> CInt -> CInt -> CInt -> CInt -> m Cursor
- createSystemCursor :: MonadIO m => SystemCursor -> m Cursor
- freeCursor :: MonadIO m => Cursor -> m ()
- getCursor :: MonadIO m => m Cursor
- getDefaultCursor :: MonadIO m => m Cursor
- getGlobalMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
- getMouseFocus :: MonadIO m => m Window
- getMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
- getRelativeMouseMode :: MonadIO m => m Bool
- getRelativeMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32
- setCursor :: MonadIO m => Cursor -> m ()
- setRelativeMouseMode :: MonadIO m => Bool -> m CInt
- showCursor :: MonadIO m => CInt -> m CInt
- warpMouseGlobal :: MonadIO m => CInt -> CInt -> m CInt
- warpMouseInWindow :: MonadIO m => Window -> CInt -> CInt -> m ()
- joystickClose :: MonadIO m => Joystick -> m ()
- joystickCurrentPowerLevel :: MonadIO m => Joystick -> m JoystickPowerLevel
- joystickEventState :: MonadIO m => CInt -> m CInt
- joystickFromInstanceID :: MonadIO m => JoystickID -> m Joystick
- joystickGetAttached :: MonadIO m => Joystick -> m Bool
- joystickGetAxis :: MonadIO m => Joystick -> CInt -> m Int16
- joystickGetBall :: MonadIO m => Joystick -> CInt -> Ptr CInt -> Ptr CInt -> m CInt
- joystickGetButton :: MonadIO m => Joystick -> CInt -> m Word8
- joystickGetDeviceGUID :: MonadIO m => CInt -> m JoystickGUID
- joystickGetGUID :: MonadIO m => Joystick -> m JoystickGUID
- joystickGetGUIDFromString :: MonadIO m => CString -> m JoystickGUID
- joystickGetGUIDString :: MonadIO m => JoystickGUID -> CString -> CInt -> m ()
- joystickGetHat :: MonadIO m => Joystick -> CInt -> m Word8
- joystickInstanceID :: MonadIO m => Joystick -> m JoystickID
- joystickName :: MonadIO m => Joystick -> m CString
- joystickNameForIndex :: MonadIO m => CInt -> m CString
- joystickNumAxes :: MonadIO m => Joystick -> m CInt
- joystickNumBalls :: MonadIO m => Joystick -> m CInt
- joystickNumButtons :: MonadIO m => Joystick -> m CInt
- joystickNumHats :: MonadIO m => Joystick -> m CInt
- joystickOpen :: MonadIO m => CInt -> m Joystick
- joystickUpdate :: MonadIO m => m ()
- numJoysticks :: MonadIO m => m CInt
- gameControllerAddMapping :: MonadIO m => CString -> m CInt
- gameControllerAddMappingsFromFile :: MonadIO m => CString -> m CInt
- gameControllerAddMappingsFromRW :: MonadIO m => Ptr RWops -> CInt -> m CInt
- gameControllerClose :: MonadIO m => GameController -> m ()
- gameControllerEventState :: MonadIO m => CInt -> m CInt
- gameControllerFromInstanceID :: MonadIO m => JoystickID -> m GameController
- gameControllerGetAttached :: MonadIO m => GameController -> m Bool
- gameControllerGetAxis :: MonadIO m => GameController -> GameControllerAxis -> m Int16
- gameControllerGetAxisFromString :: MonadIO m => CString -> m GameControllerAxis
- gameControllerGetBindForAxis :: MonadIO m => GameController -> GameControllerAxis -> m GameControllerButtonBind
- gameControllerGetBindForButton :: MonadIO m => GameController -> GameControllerButton -> m GameControllerButtonBind
- gameControllerGetButton :: MonadIO m => GameController -> GameControllerButton -> m Word8
- gameControllerGetButtonFromString :: MonadIO m => CString -> m GameControllerButton
- gameControllerGetJoystick :: MonadIO m => GameController -> m Joystick
- gameControllerGetStringForAxis :: MonadIO m => GameControllerAxis -> m CString
- gameControllerGetStringForButton :: MonadIO m => GameControllerButton -> m CString
- gameControllerMapping :: MonadIO m => GameController -> m CString
- gameControllerMappingForGUID :: MonadIO m => JoystickGUID -> m CString
- gameControllerName :: MonadIO m => GameController -> m CString
- gameControllerNameForIndex :: MonadIO m => CInt -> m CString
- gameControllerOpen :: MonadIO m => CInt -> m GameController
- gameControllerUpdate :: MonadIO m => m ()
- isGameController :: MonadIO m => CInt -> m Bool

# Event Handling

addEventWatch :: MonadIO m => EventFilter -> Ptr () -> m () Source #

delEventWatch :: MonadIO m => EventFilter -> Ptr () -> m () Source #

eventState :: MonadIO m => Word32 -> CInt -> m Word8 Source #

filterEvents :: MonadIO m => EventFilter -> Ptr () -> m () Source #

flushEvent :: MonadIO m => Word32 -> m () Source #

flushEvents :: MonadIO m => Word32 -> Word32 -> m () Source #

getEventFilter :: MonadIO m => Ptr EventFilter -> Ptr (Ptr ()) -> m Bool Source #

getNumTouchDevices :: MonadIO m => m CInt Source #

getNumTouchFingers :: MonadIO m => TouchID -> m CInt Source #

getTouchDevice :: MonadIO m => CInt -> m TouchID Source #

getTouchFinger :: MonadIO m => TouchID -> CInt -> m (Ptr Finger) Source #

hasEvent :: MonadIO m => Word32 -> m Bool Source #

hasEvents :: MonadIO m => Word32 -> Word32 -> m Bool Source #

loadDollarTemplates :: MonadIO m => TouchID -> Ptr RWops -> m CInt Source #

peepEvents :: MonadIO m => Ptr Event -> CInt -> EventAction -> Word32 -> Word32 -> m CInt Source #

pollEvent :: MonadIO m => Ptr Event -> m CInt Source #

pumpEvents :: MonadIO m => m () Source #

pushEvent :: MonadIO m => Ptr Event -> m CInt Source #

quitRequested :: MonadIO m => m Bool Source #

recordGesture :: MonadIO m => TouchID -> m CInt Source #

registerEvents :: MonadIO m => CInt -> m Word32 Source #

saveAllDollarTemplates :: MonadIO m => Ptr RWops -> m CInt Source #

saveDollarTemplate :: MonadIO m => GestureID -> Ptr RWops -> m CInt Source #

setEventFilter :: MonadIO m => EventFilter -> Ptr () -> m () Source #

waitEvent :: MonadIO m => Ptr Event -> m CInt Source #

waitEventTimeout :: MonadIO m => Ptr Event -> CInt -> m CInt Source #

# Keyboard Support

getKeyFromName :: MonadIO m => CString -> m Keycode Source #

getKeyFromScancode :: MonadIO m => Scancode -> m Keycode Source #

getKeyName :: MonadIO m => Keycode -> m CString Source #

getKeyboardFocus :: MonadIO m => m Window Source #

getKeyboardState :: MonadIO m => Ptr CInt -> m (Ptr Word8) Source #

getModState :: MonadIO m => m Keymod Source #

getScancodeFromKey :: MonadIO m => Keycode -> m Scancode Source #

getScancodeFromName :: MonadIO m => CString -> m Scancode Source #

getScancodeName :: MonadIO m => Scancode -> m CString Source #

hasScreenKeyboardSupport :: MonadIO m => m Bool Source #

isScreenKeyboardShown :: MonadIO m => Window -> m Bool Source #

isTextInputActive :: MonadIO m => m Bool Source #

setModState :: MonadIO m => Keymod -> m () Source #

setTextInputRect :: MonadIO m => Ptr Rect -> m () Source #

startTextInput :: MonadIO m => m () Source #

stopTextInput :: MonadIO m => m () Source #

# Mouse Support

captureMouse :: MonadIO m => Bool -> m CInt Source #

createColorCursor :: MonadIO m => Ptr Surface -> CInt -> CInt -> m Cursor Source #

createCursor :: MonadIO m => Ptr Word8 -> Ptr Word8 -> CInt -> CInt -> CInt -> CInt -> m Cursor Source #

createSystemCursor :: MonadIO m => SystemCursor -> m Cursor Source #

freeCursor :: MonadIO m => Cursor -> m () Source #

getCursor :: MonadIO m => m Cursor Source #

getDefaultCursor :: MonadIO m => m Cursor Source #

getGlobalMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32 Source #

getMouseFocus :: MonadIO m => m Window Source #

getMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32 Source #

getRelativeMouseMode :: MonadIO m => m Bool Source #

getRelativeMouseState :: MonadIO m => Ptr CInt -> Ptr CInt -> m Word32 Source #

setCursor :: MonadIO m => Cursor -> m () Source #

setRelativeMouseMode :: MonadIO m => Bool -> m CInt Source #

showCursor :: MonadIO m => CInt -> m CInt Source #

warpMouseGlobal :: MonadIO m => CInt -> CInt -> m CInt Source #

warpMouseInWindow :: MonadIO m => Window -> CInt -> CInt -> m () Source #

# Joystick Support

joystickClose :: MonadIO m => Joystick -> m () Source #

joystickCurrentPowerLevel :: MonadIO m => Joystick -> m JoystickPowerLevel Source #

joystickEventState :: MonadIO m => CInt -> m CInt Source #

joystickFromInstanceID :: MonadIO m => JoystickID -> m Joystick Source #

joystickGetAttached :: MonadIO m => Joystick -> m Bool Source #

joystickGetAxis :: MonadIO m => Joystick -> CInt -> m Int16 Source #

joystickGetBall :: MonadIO m => Joystick -> CInt -> Ptr CInt -> Ptr CInt -> m CInt Source #

joystickGetButton :: MonadIO m => Joystick -> CInt -> m Word8 Source #

joystickGetDeviceGUID :: MonadIO m => CInt -> m JoystickGUID Source #

joystickGetGUID :: MonadIO m => Joystick -> m JoystickGUID Source #

joystickGetGUIDFromString :: MonadIO m => CString -> m JoystickGUID Source #

joystickGetGUIDString :: MonadIO m => JoystickGUID -> CString -> CInt -> m () Source #

joystickGetHat :: MonadIO m => Joystick -> CInt -> m Word8 Source #

joystickInstanceID :: MonadIO m => Joystick -> m JoystickID Source #

joystickName :: MonadIO m => Joystick -> m CString Source #

joystickNameForIndex :: MonadIO m => CInt -> m CString Source #

joystickNumAxes :: MonadIO m => Joystick -> m CInt Source #

joystickNumBalls :: MonadIO m => Joystick -> m CInt Source #

joystickNumButtons :: MonadIO m => Joystick -> m CInt Source #

joystickNumHats :: MonadIO m => Joystick -> m CInt Source #

joystickOpen :: MonadIO m => CInt -> m Joystick Source #

joystickUpdate :: MonadIO m => m () Source #

numJoysticks :: MonadIO m => m CInt Source #

# Game Controller Support

gameControllerAddMapping :: MonadIO m => CString -> m CInt Source #

gameControllerAddMappingsFromFile :: MonadIO m => CString -> m CInt Source #

gameControllerAddMappingsFromRW :: MonadIO m => Ptr RWops -> CInt -> m CInt Source #

gameControllerClose :: MonadIO m => GameController -> m () Source #

gameControllerEventState :: MonadIO m => CInt -> m CInt Source #

gameControllerFromInstanceID :: MonadIO m => JoystickID -> m GameController Source #

gameControllerGetAttached :: MonadIO m => GameController -> m Bool Source #

gameControllerGetAxis :: MonadIO m => GameController -> GameControllerAxis -> m Int16 Source #

gameControllerGetAxisFromString :: MonadIO m => CString -> m GameControllerAxis Source #

gameControllerGetBindForAxis :: MonadIO m => GameController -> GameControllerAxis -> m GameControllerButtonBind Source #

gameControllerGetBindForButton :: MonadIO m => GameController -> GameControllerButton -> m GameControllerButtonBind Source #

gameControllerGetButton :: MonadIO m => GameController -> GameControllerButton -> m Word8 Source #

gameControllerGetButtonFromString :: MonadIO m => CString -> m GameControllerButton Source #

gameControllerGetJoystick :: MonadIO m => GameController -> m Joystick Source #

gameControllerGetStringForAxis :: MonadIO m => GameControllerAxis -> m CString Source #

gameControllerGetStringForButton :: MonadIO m => GameControllerButton -> m CString Source #

gameControllerMapping :: MonadIO m => GameController -> m CString Source #

gameControllerMappingForGUID :: MonadIO m => JoystickGUID -> m CString Source #

gameControllerName :: MonadIO m => GameController -> m CString Source #

gameControllerNameForIndex :: MonadIO m => CInt -> m CString Source #

gameControllerOpen :: MonadIO m => CInt -> m GameController Source #

gameControllerUpdate :: MonadIO m => m () Source #

isGameController :: MonadIO m => CInt -> m Bool Source #