| Safe Haskell | None |
|---|
CanvasHs
Description
The CanvasHS module allows haskell programmers to easily create graphical programs using event diven IO. Using the installEventHandler function the user can register an event handler which will process incoming events and with the current state in mind, will result in a new state and output, which could be graphical, actions (IO, timers and others) or both.
Documentation
Arguments
| :: Callback userState | event handler on current state and incoming event, that produces a tuple of the new user state and ouput to process: (userState -> Event -> (userState, Output)) |
| -> userState | start state |
| -> IO () |
Registers an event handler and starts CanvasHs. This will start the needed servers (weboscket and http) and will open a browser window.