| Copyright | (C) 2016-2025 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Subscription.Window
Contents
Description
Synopsis
- windowSub :: MisoString -> Decoder r -> (r -> action) -> Sub action
- windowCoordsSub :: (Coord -> action) -> Sub action
- windowPointerMoveSub :: (PointerEvent -> action) -> Sub action
- windowSubWithOptions :: Options -> MisoString -> Decoder result -> (result -> action) -> Sub action
- type Coord = (Double, Double)
Subscription
windowSub :: MisoString -> Decoder r -> (r -> action) -> Sub action Source #
windowSub eventName decoder toAction provides a subscription
to listen to window level events.
windowCoordsSub :: (Coord -> action) -> Sub action Source #
Captures window coordinates changes as they occur and writes them to an event sink
windowPointerMoveSub :: (PointerEvent -> action) -> Sub action Source #
window.addEventListener ("pointermove", (event) => handle(event))
A Sub to handle PointerEvents on window
windowSubWithOptions :: Options -> MisoString -> Decoder result -> (result -> action) -> Sub action Source #
windowSubWithOptions options eventName decoder toAction provides a
subscription to listen to window level events.