reactive-banana-sdl2-0.1.0.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 #