| Copyright | (C) 2016-2026 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.Native.X.Element.Overlay.Event
Description
Synopsis
- onDismissOverlay :: action -> Attribute model action
- onDismissOverlayWith :: (DOMRef -> action) -> Attribute model action
- onDismissOverlayMain :: action -> EventHandler model action
- onDismissOverlayMainWith :: (model -> DOMRef -> action) -> EventHandler model action
- onError :: (OverlayErrorEvent -> action) -> Attribute model action
- onErrorWith :: (OverlayErrorEvent -> DOMRef -> action) -> Attribute model action
- onErrorMain :: (OverlayErrorEvent -> action) -> EventHandler model action
- onErrorMainWith :: (OverlayErrorEvent -> model -> DOMRef -> action) -> EventHandler model action
- onOverlayTouch :: (OverlayTouchEvent -> action) -> Attribute model action
- onOverlayTouchWith :: (OverlayTouchEvent -> DOMRef -> action) -> Attribute model action
- onOverlayTouchMain :: (OverlayTouchEvent -> action) -> EventHandler model action
- onOverlayTouchMainWith :: (OverlayTouchEvent -> model -> DOMRef -> action) -> EventHandler model action
- onRequestClose :: action -> Attribute model action
- onRequestCloseWith :: (DOMRef -> action) -> Attribute model action
- onRequestCloseMain :: action -> EventHandler model action
- onRequestCloseMainWith :: (model -> DOMRef -> action) -> EventHandler model action
- onShowOverlay :: action -> Attribute model action
- onShowOverlayWith :: (DOMRef -> action) -> Attribute model action
- onShowOverlayMain :: action -> EventHandler model action
- onShowOverlayMainWith :: (model -> DOMRef -> action) -> EventHandler model action
- data OverlayErrorEvent = OverlayErrorEvent {}
- data OverlayTouchEvent = OverlayTouchEvent {
- touchState :: MisoString
- touchX :: Double
- touchY :: Double
- overlayErrorDecoder :: Decoder OverlayErrorEvent
- overlayTouchDecoder :: Decoder OverlayTouchEvent
- overlayEvents :: Events
Events
onDismissOverlay :: action -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/overlay.html#binddismissoverlay
Triggered when the overlay is hidden.
onDismissOverlayWith :: (DOMRef -> action) -> Attribute model action Source #
Like onDismissOverlay, but the handler also receives the target element's DOMRef.
Use for main-thread (MTS) handlers that imperatively mutate the element.
onDismissOverlayMain :: action -> EventHandler model action Source #
Like onDismissOverlay, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Dismissed view_ [ event (static (onDismissOverlayMain Dismissed)) ] [ "some view" ]
onDismissOverlayMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #
Like onDismissOverlayMain, but the handler also receives read-only access
to the model and the target element's DOMRef (for imperative MTS mutation).
data Action = Dismissed Model DOMRef view_ [ event (static (onDismissOverlayMainWith Dismissed)) ] [ "some view" ]
onError :: (OverlayErrorEvent -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/overlay.html#binderror
- Android 2.18+*. Triggered on an overlay error.
onErrorWith :: (OverlayErrorEvent -> DOMRef -> action) -> Attribute model action Source #
onErrorMain :: (OverlayErrorEvent -> action) -> EventHandler model action Source #
Like onError, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Errored OverlayErrorEvent view_ [ event (static (onErrorMain Errored)) ] [ "some view" ]
onErrorMainWith :: (OverlayErrorEvent -> model -> DOMRef -> action) -> EventHandler model action Source #
Like onErrorMain, but the handler also receives read-only access to the
model and the target element's DOMRef (for imperative MTS mutation).
data Action = Errored OverlayErrorEvent Model DOMRef view_ [ event (static (onErrorMainWith Errored)) ] [ "some view" ]
onOverlayTouch :: (OverlayTouchEvent -> action) -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/overlay.html#bindoverlaytouch
Triggered when the overlay is touched.
onOverlayTouchWith :: (OverlayTouchEvent -> DOMRef -> action) -> Attribute model action Source #
Like onOverlayTouch, but the handler also receives the target element's DOMRef.
Use for main-thread (MTS) handlers that imperatively mutate the element.
onOverlayTouchMain :: (OverlayTouchEvent -> action) -> EventHandler model action Source #
Like onOverlayTouch, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Touched OverlayTouchEvent view_ [ event (static (onOverlayTouchMain Touched)) ] [ "some view" ]
onOverlayTouchMainWith :: (OverlayTouchEvent -> model -> DOMRef -> action) -> EventHandler model action Source #
Like onOverlayTouchMain, but the handler also receives read-only access to
the model and the target element's DOMRef (for imperative MTS mutation).
data Action = Touched OverlayTouchEvent Model DOMRef view_ [ event (static (onOverlayTouchMainWith Touched)) ] [ "some view" ]
onRequestClose :: action -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/overlay.html#bindrequestclose
Triggered when the back button is clicked.
onRequestCloseWith :: (DOMRef -> action) -> Attribute model action Source #
Like onRequestClose, but the handler also receives the target element's DOMRef.
Use for main-thread (MTS) handlers that imperatively mutate the element.
onRequestCloseMain :: action -> EventHandler model action Source #
Like onRequestClose, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = RequestedClose view_ [ event (static (onRequestCloseMain RequestedClose)) ] [ "some view" ]
onRequestCloseMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #
Like onRequestCloseMain, but the handler also receives read-only access to
the model and the target element's DOMRef (for imperative MTS mutation).
data Action = RequestedClose Model DOMRef view_ [ event (static (onRequestCloseMainWith RequestedClose)) ] [ "some view" ]
onShowOverlay :: action -> Attribute model action Source #
https://lynxjs.org/api/elements/built-in/overlay.html#bindshowoverlay
Triggered when the overlay is displayed.
onShowOverlayWith :: (DOMRef -> action) -> Attribute model action Source #
Like onShowOverlay, but the handler also receives the target element's DOMRef.
Use for main-thread (MTS) handlers that imperatively mutate the element.
onShowOverlayMain :: action -> EventHandler model action Source #
Like onShowOverlay, but dispatched on the Lynx main thread (MTS).
Runs imperatively on the MTS (no VDOM diff). Meant to be used with
-XStaticPointers.
data Action = Shown view_ [ event (static (onShowOverlayMain Shown)) ] [ "some view" ]
onShowOverlayMainWith :: (model -> DOMRef -> action) -> EventHandler model action Source #
Like onShowOverlayMain, but the handler also receives read-only access to
the model and the target element's DOMRef (for imperative MTS mutation).
data Action = Shown Model DOMRef view_ [ event (static (onShowOverlayMainWith Shown)) ] [ "some view" ]
Types
data OverlayErrorEvent Source #
Payload of the binderror event.
Constructors
| OverlayErrorEvent | |
Fields
| |
Instances
| Show OverlayErrorEvent Source # | |
Defined in Miso.Native.X.Element.Overlay.Event Methods showsPrec :: Int -> OverlayErrorEvent -> ShowS # show :: OverlayErrorEvent -> String # showList :: [OverlayErrorEvent] -> ShowS # | |
| Eq OverlayErrorEvent Source # | |
Defined in Miso.Native.X.Element.Overlay.Event Methods (==) :: OverlayErrorEvent -> OverlayErrorEvent -> Bool # (/=) :: OverlayErrorEvent -> OverlayErrorEvent -> Bool # | |
data OverlayTouchEvent Source #
Payload of the bindoverlaytouch event.
Constructors
| OverlayTouchEvent | |
Fields
| |
Instances
| Show OverlayTouchEvent Source # | |
Defined in Miso.Native.X.Element.Overlay.Event Methods showsPrec :: Int -> OverlayTouchEvent -> ShowS # show :: OverlayTouchEvent -> String # showList :: [OverlayTouchEvent] -> ShowS # | |
| Eq OverlayTouchEvent Source # | |
Defined in Miso.Native.X.Element.Overlay.Event Methods (==) :: OverlayTouchEvent -> OverlayTouchEvent -> Bool # (/=) :: OverlayTouchEvent -> OverlayTouchEvent -> Bool # | |