Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions on events
- addHandler :: EventSource a -> AddHandler a
- fire :: EventSource a -> a -> IO ()
- sdlEvent :: SDLEventSource -> MomentIO WrappedEvent
- tickEvent :: SDLEventSource -> MomentIO TickEvent
- keyEvent :: WrappedEvent -> WrappedEvent
- keyDownEvent :: WrappedEvent -> Event Keysym
- keyUpEvent :: WrappedEvent -> Event Keysym
- mouseEvent :: WrappedEvent -> WrappedEvent
- mouseButtonEvent :: WrappedEvent -> WrappedEvent
- keyFilter :: Keycode -> EventPayload -> Bool
- keyUpFilter :: Keycode -> EventPayload -> Bool
- mouseEventWithin :: Rect -> WrappedEvent -> WrappedEvent
- tickDiffEvent :: SDLEventSource -> MomentIO TickEvent
- whileM :: IO Bool -> IO ()
- successive :: (a -> a -> Maybe b) -> Event a -> MomentIO (Event b)
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
sdlEvent :: SDLEventSource -> MomentIO WrappedEvent Source #
SDL event
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)
mouseButtonEvent :: WrappedEvent -> WrappedEvent Source #
Mouse button event
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.