Safe Haskell | None |
---|---|
Language | Haskell98 |
Examples is meant to contain examples of using events which are too small to go into their own module.
Synopsis
- data EventSet a
- emptyEventSet :: EventSet a
- addToEventSet :: EventSet a -> Event a -> EventSet a
- fromEventSet :: EventSet a -> Event (a, EventSet a)
- isEmptyEventSet :: EventSet a -> Bool
- watch :: Event a -> IO (Event a, IO ())
- spawnRepeatedEvent :: Event () -> IO (IO ())
Documentation
emptyEventSet :: EventSet a Source #
isEmptyEventSet :: EventSet a -> Bool Source #
watch :: Event a -> IO (Event a, IO ()) Source #
watch is used for events like mouse motion events where if we can't find time we don't want them queued. The event returned waits until the original event next happens and returns it. A worker thread is needed to run this; the attached action should be used to stop that thread when we are no longer interested.