reactive-banana-sdl-0.2.0: Reactive Banana bindings for SDL

Safe HaskellNone

Reactive.Banana.SDL.Util

Description

Functions on events

Synopsis

Documentation

addHandler :: EventSource a -> AddHandler aSource

get the AddHandler from a EventSource

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

fire the event from an Event Source

tickDiffEvent :: Frameworks t => SDLEventSource -> Moment t (TickEvent t)Source

event carrying the difference between the last two SDL ticks

keyEvent :: WrappedEvent t -> WrappedEvent tSource

filter any key events

keyDownEvent :: WrappedEvent t -> Event t KeysymSource

event carrying the key pressed down

keyUpEvent :: WrappedEvent t -> Event t KeysymSource

event carrying the key pressed up

mouseEvent :: WrappedEvent t -> WrappedEvent tSource

filter any mouse event (button or move)

mouseButtonEvent :: WrappedEvent t -> WrappedEvent tSource

mouse button event

filterEq :: Eq a => Event t a -> Event t aSource

keyFilter :: SDLKey -> Event -> BoolSource

filter an event on a particular key being held down

keyUpFilter :: SDLKey -> Event -> BoolSource

filter an event on a particular key being released

mouseEventWithin :: Rect -> WrappedEvent t -> WrappedEvent tSource

mouse event occuring inside a given area

keyPressed :: SDLKey -> WrappedEvent t -> WrappedEvent tSource

fires when the given key is pressed (down + up)

buttonClick :: MouseButton -> WrappedEvent t -> WrappedEvent tSource

fires when the specific button if clicked (down and up)

whileM :: IO Bool -> IO ()Source

run while the given computation returns True

successive :: (a -> a -> Maybe b) -> Event t a -> Event t bSource

filter if the function on two successive as return a Just value