reactive-banana-sdl2-0.1.1.0: Reactive Banana integration with SDL2

Safe HaskellNone
LanguageHaskell2010

Reactive.Banana.SDL2.Util

Description

Functions on events

Synopsis

Documentation

addHandler :: EventSource a -> AddHandler a Source #

Get the AddHandler from a EventSource

fire :: EventSource a -> a -> IO () Source #

Fire the event from an Event Source

keyEvent :: WrappedEvent -> WrappedEvent Source #

Filter any key events

keyDownEvent :: WrappedEvent -> Event Keysym Source #

Event carrying the key pressed down

keyUpEvent :: WrappedEvent -> Event Keysym Source #

Event carrying the key pressed up

mouseEvent :: WrappedEvent -> WrappedEvent Source #

Filter any mouse event (button or move)

keyFilter :: Keycode -> EventPayload -> Bool Source #

Filter an event on a particular key being held down

keyUpFilter :: Keycode -> EventPayload -> Bool Source #

Filter an event on a particular key being released

mouseEventWithin :: Rect -> WrappedEvent -> WrappedEvent Source #

Mouse event occuring inside a given area

tickDiffEvent :: SDLEventSource -> MomentIO TickEvent Source #

Event carrying the difference between the last two SDL ticks.

whileM :: IO Bool -> IO () Source #

Run while the given computation returns True

successive :: (a -> a -> Maybe b) -> Event a -> MomentIO (Event b) Source #

Filter and aggregate an event stream based on a function.