Safe Haskell | None |
---|
Functions on events
- addHandler :: EventSource a -> AddHandler a
- fire :: EventSource a -> a -> IO ()
- sdlEvent :: Frameworks t => SDLEventSource -> Moment t (WrappedEvent t)
- tickEvent :: Frameworks t => SDLEventSource -> Moment t (TickEvent t)
- tickDiffEvent :: Frameworks t => SDLEventSource -> Moment t (TickEvent t)
- keyEvent :: WrappedEvent t -> WrappedEvent t
- keyDownEvent :: WrappedEvent t -> Event t Keysym
- keyUpEvent :: WrappedEvent t -> Event t Keysym
- mouseEvent :: WrappedEvent t -> WrappedEvent t
- mouseButtonEvent :: WrappedEvent t -> WrappedEvent t
- filterEq :: Eq a => Event t a -> Event t a
- keyFilter :: SDLKey -> Event -> Bool
- keyUpFilter :: SDLKey -> Event -> Bool
- mouseEventWithin :: Rect -> WrappedEvent t -> WrappedEvent t
- keyPressed :: SDLKey -> WrappedEvent t -> WrappedEvent t
- buttonClick :: MouseButton -> WrappedEvent t -> WrappedEvent t
- whileM :: IO Bool -> IO ()
- successive :: (a -> a -> Maybe b) -> Event t a -> Event t b
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
sdlEvent :: Frameworks t => SDLEventSource -> Moment t (WrappedEvent t)Source
SDL event
tickEvent :: Frameworks t => SDLEventSource -> Moment t (TickEvent t)Source
SDL tick
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
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)
successive :: (a -> a -> Maybe b) -> Event t a -> Event t bSource
filter if the function on two successive a
s return a Just value