{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE CPP #-}
module Miso.Native.Element.View.Event
(
onTouchStart
, onTouchStartWith
, onTouchStartMain
, onTouchStartMainWith
, onTouchMove
, onTouchMoveWith
, onTouchMoveMain
, onTouchMoveMainWith
, onTouchEnd
, onTouchEndWith
, onTouchEndMain
, onTouchEndMainWith
, onTouchCancel
, onTouchCancelWith
, onTouchCancelMain
, onTouchCancelMainWith
, onTap
, onTapMain
, onTapWith
, onTapMainWith
, onTapMainModel
, onLongPress
, onLongPressWith
, onLongPressMain
, onLongPressMainWith
, onLayoutChange
, onLayoutChangeWith
, onLayoutChangeMain
, onLayoutChangeMainWith
, onAppear
, onAppearWith
, onAppearMain
, onAppearMainWith
, onDisappear
, onDisappearWith
, onDisappearMain
, onDisappearMainWith
, onAnimationStart
, onAnimationStartWith
, onAnimationStartMain
, onAnimationStartMainWith
, onAnimationEnd
, onAnimationEndWith
, onAnimationEndMain
, onAnimationEndMainWith
, onAnimationCancel
, onAnimationCancelWith
, onAnimationCancelMain
, onAnimationCancelMainWith
, onAnimationIteration
, onAnimationIterationWith
, onAnimationIterationMain
, onAnimationIterationMainWith
, onTransitionStart
, onTransitionStartWith
, onTransitionStartMain
, onTransitionStartMainWith
, onTransitionEnd
, onTransitionEndWith
, onTransitionEndMain
, onTransitionEndMainWith
, onTransitionCancel
, onTransitionCancelWith
, onTransitionCancelMain
, onTransitionCancelMainWith
, TouchEvent (..)
, AnimationEvent (..)
, LayoutChangeDetailEvent (..)
, UIAppearanceDetailEvent (..)
, touchDecoder
, animationDecoder
, layoutChangeDetailDecoder
, uiAppearanceDetailDecoder
, viewEvents
) where
#if __GLASGOW_HASKELL__ <= 881
import Control.Applicative (liftA2)
#endif
import qualified Data.Map as M
import Miso.Event (on, onMain, Decoder(..), DecodeTarget(..), Events, emptyDecoder, Phase(BUBBLE))
import Miso.JSON
import Miso.String (MisoString)
import Miso.Types (Attribute, EventHandler, DOMRef)
viewEvents :: Events
viewEvents :: Events
viewEvents = [(MisoString, Phase)] -> Events
forall k a. Ord k => [(k, a)] -> Map k a
M.fromList
[ (MisoString
"touchstart", Phase
BUBBLE)
, (MisoString
"touchmove", Phase
BUBBLE)
, (MisoString
"touchend", Phase
BUBBLE)
, (MisoString
"touchcancel", Phase
BUBBLE)
, (MisoString
"tap", Phase
BUBBLE)
, (MisoString
"longpress", Phase
BUBBLE)
, (MisoString
"layoutchange", Phase
BUBBLE)
, (MisoString
"uiappear", Phase
BUBBLE)
, (MisoString
"uidisappear", Phase
BUBBLE)
, (MisoString
"animationstart", Phase
BUBBLE)
, (MisoString
"animationend", Phase
BUBBLE)
, (MisoString
"animationcancel", Phase
BUBBLE)
, (MisoString
"animationiteration", Phase
BUBBLE)
, (MisoString
"transitionstart", Phase
BUBBLE)
, (MisoString
"transitionend", Phase
BUBBLE)
, (MisoString
"transitioncancel", Phase
BUBBLE)
]
data TouchEvent
= TouchEvent
{ TouchEvent -> Double
identifier :: Double
, TouchEvent -> (Double, Double)
xy :: (Double, Double)
, TouchEvent -> (Double, Double)
page :: (Double, Double)
, TouchEvent -> (Double, Double)
client :: (Double, Double)
} deriving (Int -> TouchEvent -> ShowS
[TouchEvent] -> ShowS
TouchEvent -> String
(Int -> TouchEvent -> ShowS)
-> (TouchEvent -> String)
-> ([TouchEvent] -> ShowS)
-> Show TouchEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TouchEvent -> ShowS
showsPrec :: Int -> TouchEvent -> ShowS
$cshow :: TouchEvent -> String
show :: TouchEvent -> String
$cshowList :: [TouchEvent] -> ShowS
showList :: [TouchEvent] -> ShowS
Show, TouchEvent -> TouchEvent -> Bool
(TouchEvent -> TouchEvent -> Bool)
-> (TouchEvent -> TouchEvent -> Bool) -> Eq TouchEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TouchEvent -> TouchEvent -> Bool
== :: TouchEvent -> TouchEvent -> Bool
$c/= :: TouchEvent -> TouchEvent -> Bool
/= :: TouchEvent -> TouchEvent -> Bool
Eq)
touchDecoder :: Decoder TouchEvent
touchDecoder :: Decoder TouchEvent
touchDecoder = Decoder {DecodeTarget
Value -> Parser TouchEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser TouchEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser TouchEvent
..}
where
pair :: Object -> MisoString -> MisoString -> Parser (a, b)
pair Object
o MisoString
x MisoString
y = (a -> b -> (a, b)) -> Parser a -> Parser b -> Parser (a, b)
forall a b c. (a -> b -> c) -> Parser a -> Parser b -> Parser c
forall (f :: * -> *) a b c.
Applicative f =>
(a -> b -> c) -> f a -> f b -> f c
liftA2 (,) (Object
o Object -> MisoString -> Parser a
forall a. FromJSON a => Object -> MisoString -> Parser a
.: MisoString
x) (Object
o Object -> MisoString -> Parser b
forall a. FromJSON a => Object -> MisoString -> Parser a
.: MisoString
y)
decodeAt :: DecodeTarget
decodeAt = [MisoString] -> DecodeTarget
DecodeTarget [MisoString
"changedTouches", MisoString
"0"]
decoder :: Value -> Parser TouchEvent
decoder = MisoString
-> (Object -> Parser TouchEvent) -> Value -> Parser TouchEvent
forall a. MisoString -> (Object -> Parser a) -> Value -> Parser a
withObject MisoString
"touchDecoder" ((Object -> Parser TouchEvent) -> Value -> Parser TouchEvent)
-> (Object -> Parser TouchEvent) -> Value -> Parser TouchEvent
forall a b. (a -> b) -> a -> b
$ \Object
o ->
Double
-> (Double, Double)
-> (Double, Double)
-> (Double, Double)
-> TouchEvent
TouchEvent
(Double
-> (Double, Double)
-> (Double, Double)
-> (Double, Double)
-> TouchEvent)
-> Parser Double
-> Parser
((Double, Double)
-> (Double, Double) -> (Double, Double) -> TouchEvent)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Object
o Object -> MisoString -> Parser Double
forall a. FromJSON a => Object -> MisoString -> Parser a
.: MisoString
"identifier"
Parser
((Double, Double)
-> (Double, Double) -> (Double, Double) -> TouchEvent)
-> Parser (Double, Double)
-> Parser ((Double, Double) -> (Double, Double) -> TouchEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object -> MisoString -> MisoString -> Parser (Double, Double)
forall {a} {b}.
(FromJSON a, FromJSON b) =>
Object -> MisoString -> MisoString -> Parser (a, b)
pair Object
o MisoString
"x" MisoString
"y"
Parser ((Double, Double) -> (Double, Double) -> TouchEvent)
-> Parser (Double, Double)
-> Parser ((Double, Double) -> TouchEvent)
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object -> MisoString -> MisoString -> Parser (Double, Double)
forall {a} {b}.
(FromJSON a, FromJSON b) =>
Object -> MisoString -> MisoString -> Parser (a, b)
pair Object
o MisoString
"pageX" MisoString
"pageY"
Parser ((Double, Double) -> TouchEvent)
-> Parser (Double, Double) -> Parser TouchEvent
forall a b. Parser (a -> b) -> Parser a -> Parser b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
<*> Object -> MisoString -> MisoString -> Parser (Double, Double)
forall {a} {b}.
(FromJSON a, FromJSON b) =>
Object -> MisoString -> MisoString -> Parser (a, b)
pair Object
o MisoString
"clientX" MisoString
"clientY"
data AnimationEvent
= AnimationEvent
{ AnimationEvent -> AnimationType
animationType :: AnimationType
, AnimationEvent -> MisoString
animationName :: MisoString
, AnimationEvent -> Bool
newAnimator :: Bool
} deriving (Int -> AnimationEvent -> ShowS
[AnimationEvent] -> ShowS
AnimationEvent -> String
(Int -> AnimationEvent -> ShowS)
-> (AnimationEvent -> String)
-> ([AnimationEvent] -> ShowS)
-> Show AnimationEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnimationEvent -> ShowS
showsPrec :: Int -> AnimationEvent -> ShowS
$cshow :: AnimationEvent -> String
show :: AnimationEvent -> String
$cshowList :: [AnimationEvent] -> ShowS
showList :: [AnimationEvent] -> ShowS
Show, AnimationEvent -> AnimationEvent -> Bool
(AnimationEvent -> AnimationEvent -> Bool)
-> (AnimationEvent -> AnimationEvent -> Bool) -> Eq AnimationEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnimationEvent -> AnimationEvent -> Bool
== :: AnimationEvent -> AnimationEvent -> Bool
$c/= :: AnimationEvent -> AnimationEvent -> Bool
/= :: AnimationEvent -> AnimationEvent -> Bool
Eq)
data AnimationType
= KeyFrameAnimation
| TransitionAnimation
deriving (Int -> AnimationType -> ShowS
[AnimationType] -> ShowS
AnimationType -> String
(Int -> AnimationType -> ShowS)
-> (AnimationType -> String)
-> ([AnimationType] -> ShowS)
-> Show AnimationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AnimationType -> ShowS
showsPrec :: Int -> AnimationType -> ShowS
$cshow :: AnimationType -> String
show :: AnimationType -> String
$cshowList :: [AnimationType] -> ShowS
showList :: [AnimationType] -> ShowS
Show, AnimationType -> AnimationType -> Bool
(AnimationType -> AnimationType -> Bool)
-> (AnimationType -> AnimationType -> Bool) -> Eq AnimationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: AnimationType -> AnimationType -> Bool
== :: AnimationType -> AnimationType -> Bool
$c/= :: AnimationType -> AnimationType -> Bool
/= :: AnimationType -> AnimationType -> Bool
Eq)
instance FromJSON AnimationType where
parseJSON :: Value -> Parser AnimationType
parseJSON = MisoString
-> (MisoString -> Parser AnimationType)
-> Value
-> Parser AnimationType
forall a.
MisoString -> (MisoString -> Parser a) -> Value -> Parser a
withText MisoString
"animation-type" ((MisoString -> Parser AnimationType)
-> Value -> Parser AnimationType)
-> (MisoString -> Parser AnimationType)
-> Value
-> Parser AnimationType
forall a b. (a -> b) -> a -> b
$ \case
MisoString
"keyframe-animation" -> AnimationType -> Parser AnimationType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure AnimationType
KeyFrameAnimation
MisoString
"transition-animation" -> AnimationType -> Parser AnimationType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure AnimationType
TransitionAnimation
MisoString
x -> MisoString -> Value -> Parser AnimationType
forall a. MisoString -> Value -> Parser a
typeMismatch MisoString
"animation-type" (MisoString -> Value
String MisoString
x)
animationDecoder :: Decoder AnimationEvent
animationDecoder :: Decoder AnimationEvent
animationDecoder = Decoder {DecodeTarget
Value -> Parser AnimationEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser AnimationEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser AnimationEvent
..}
where
decodeAt :: DecodeTarget
decodeAt = [MisoString] -> DecodeTarget
DecodeTarget [MisoString]
forall a. Monoid a => a
mempty
decoder :: Value -> Parser AnimationEvent
decoder = MisoString
-> (Object -> Parser AnimationEvent)
-> Value
-> Parser AnimationEvent
forall a. MisoString -> (Object -> Parser a) -> Value -> Parser a
withObject MisoString
"animationDecoder" ((Object -> Parser AnimationEvent)
-> Value -> Parser AnimationEvent)
-> (Object -> Parser AnimationEvent)
-> Value
-> Parser AnimationEvent
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
d <- Object
o Object -> MisoString -> Parser Object
forall a. FromJSON a => Object -> MisoString -> Parser a
.: MisoString
"detail"
AnimationEvent
<$> d .: "animation_type"
<*> d .: "animation_name"
<*> d .: "new_animator"
data LayoutChangeDetailEvent
= LayoutChangeDetailEvent
{ LayoutChangeDetailEvent -> MisoString
layoutChangeDetailEventId :: MisoString
, LayoutChangeDetailEvent -> Double
layoutChangeDetailEventWidth :: Double
, LayoutChangeDetailEvent -> Double
layoutChangeDetailEventHeight :: Double
, LayoutChangeDetailEvent -> Double
layoutChangeDetailEventTop :: Double
, LayoutChangeDetailEvent -> Double
layoutChangeDetailEventRight :: Double
, LayoutChangeDetailEvent -> Double
layoutChangeDetailEventBottom :: Double
, LayoutChangeDetailEvent -> Double
layoutChangeDetailEventLeft :: Double
, LayoutChangeDetailEvent -> Object
layoutChangeDetailEventDataset :: Object
} deriving (Int -> LayoutChangeDetailEvent -> ShowS
[LayoutChangeDetailEvent] -> ShowS
LayoutChangeDetailEvent -> String
(Int -> LayoutChangeDetailEvent -> ShowS)
-> (LayoutChangeDetailEvent -> String)
-> ([LayoutChangeDetailEvent] -> ShowS)
-> Show LayoutChangeDetailEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LayoutChangeDetailEvent -> ShowS
showsPrec :: Int -> LayoutChangeDetailEvent -> ShowS
$cshow :: LayoutChangeDetailEvent -> String
show :: LayoutChangeDetailEvent -> String
$cshowList :: [LayoutChangeDetailEvent] -> ShowS
showList :: [LayoutChangeDetailEvent] -> ShowS
Show, LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool
(LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool)
-> (LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool)
-> Eq LayoutChangeDetailEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool
== :: LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool
$c/= :: LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool
/= :: LayoutChangeDetailEvent -> LayoutChangeDetailEvent -> Bool
Eq)
layoutChangeDetailDecoder :: Decoder LayoutChangeDetailEvent
layoutChangeDetailDecoder :: Decoder LayoutChangeDetailEvent
layoutChangeDetailDecoder = Decoder {DecodeTarget
Value -> Parser LayoutChangeDetailEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser LayoutChangeDetailEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser LayoutChangeDetailEvent
..}
where
decodeAt :: DecodeTarget
decodeAt = [MisoString] -> DecodeTarget
DecodeTarget [MisoString]
forall a. Monoid a => a
mempty
decoder :: Value -> Parser LayoutChangeDetailEvent
decoder = MisoString
-> (Object -> Parser LayoutChangeDetailEvent)
-> Value
-> Parser LayoutChangeDetailEvent
forall a. MisoString -> (Object -> Parser a) -> Value -> Parser a
withObject MisoString
"LayoutChangeDetailEvent" ((Object -> Parser LayoutChangeDetailEvent)
-> Value -> Parser LayoutChangeDetailEvent)
-> (Object -> Parser LayoutChangeDetailEvent)
-> Value
-> Parser LayoutChangeDetailEvent
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
d <- Object
o Object -> MisoString -> Parser Object
forall a. FromJSON a => Object -> MisoString -> Parser a
.: MisoString
"detail"
LayoutChangeDetailEvent
<$> d .: "id"
<*> d .: "width"
<*> d .: "height"
<*> d .: "top"
<*> d .: "right"
<*> d .: "bottom"
<*> d .: "left"
<*> d .: "dataset"
data UIAppearanceDetailEventType
= UIAppear
| UIDisappear
deriving (Int -> UIAppearanceDetailEventType -> ShowS
[UIAppearanceDetailEventType] -> ShowS
UIAppearanceDetailEventType -> String
(Int -> UIAppearanceDetailEventType -> ShowS)
-> (UIAppearanceDetailEventType -> String)
-> ([UIAppearanceDetailEventType] -> ShowS)
-> Show UIAppearanceDetailEventType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UIAppearanceDetailEventType -> ShowS
showsPrec :: Int -> UIAppearanceDetailEventType -> ShowS
$cshow :: UIAppearanceDetailEventType -> String
show :: UIAppearanceDetailEventType -> String
$cshowList :: [UIAppearanceDetailEventType] -> ShowS
showList :: [UIAppearanceDetailEventType] -> ShowS
Show, UIAppearanceDetailEventType -> UIAppearanceDetailEventType -> Bool
(UIAppearanceDetailEventType
-> UIAppearanceDetailEventType -> Bool)
-> (UIAppearanceDetailEventType
-> UIAppearanceDetailEventType -> Bool)
-> Eq UIAppearanceDetailEventType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UIAppearanceDetailEventType -> UIAppearanceDetailEventType -> Bool
== :: UIAppearanceDetailEventType -> UIAppearanceDetailEventType -> Bool
$c/= :: UIAppearanceDetailEventType -> UIAppearanceDetailEventType -> Bool
/= :: UIAppearanceDetailEventType -> UIAppearanceDetailEventType -> Bool
Eq)
instance FromJSON UIAppearanceDetailEventType where
parseJSON :: Value -> Parser UIAppearanceDetailEventType
parseJSON = MisoString
-> (MisoString -> Parser UIAppearanceDetailEventType)
-> Value
-> Parser UIAppearanceDetailEventType
forall a.
MisoString -> (MisoString -> Parser a) -> Value -> Parser a
withText MisoString
"UIAppearanceDetailEventType" ((MisoString -> Parser UIAppearanceDetailEventType)
-> Value -> Parser UIAppearanceDetailEventType)
-> (MisoString -> Parser UIAppearanceDetailEventType)
-> Value
-> Parser UIAppearanceDetailEventType
forall a b. (a -> b) -> a -> b
$ \case
MisoString
"uiappear" -> UIAppearanceDetailEventType -> Parser UIAppearanceDetailEventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure UIAppearanceDetailEventType
UIAppear
MisoString
"uidisappear" -> UIAppearanceDetailEventType -> Parser UIAppearanceDetailEventType
forall a. a -> Parser a
forall (f :: * -> *) a. Applicative f => a -> f a
pure UIAppearanceDetailEventType
UIDisappear
MisoString
x -> MisoString -> Value -> Parser UIAppearanceDetailEventType
forall a. MisoString -> Value -> Parser a
typeMismatch MisoString
"UIAppearanceDetailEventType" (MisoString -> Value
String MisoString
x)
data UIAppearanceDetailEvent
= UIAppearanceDetailEvent
{ UIAppearanceDetailEvent -> UIAppearanceDetailEventType
uiAppearanceDetailEventType :: UIAppearanceDetailEventType
, UIAppearanceDetailEvent -> MisoString
uiAppearanceDetailEventExposureId :: MisoString
, UIAppearanceDetailEvent -> MisoString
uiAppearanceDetailEventExposureScene :: MisoString
, UIAppearanceDetailEvent -> MisoString
uiAppearanceDetailEventUniqueId :: MisoString
, UIAppearanceDetailEvent -> Object
uiAppearanceDetailEventDataset :: Object
} deriving (Int -> UIAppearanceDetailEvent -> ShowS
[UIAppearanceDetailEvent] -> ShowS
UIAppearanceDetailEvent -> String
(Int -> UIAppearanceDetailEvent -> ShowS)
-> (UIAppearanceDetailEvent -> String)
-> ([UIAppearanceDetailEvent] -> ShowS)
-> Show UIAppearanceDetailEvent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> UIAppearanceDetailEvent -> ShowS
showsPrec :: Int -> UIAppearanceDetailEvent -> ShowS
$cshow :: UIAppearanceDetailEvent -> String
show :: UIAppearanceDetailEvent -> String
$cshowList :: [UIAppearanceDetailEvent] -> ShowS
showList :: [UIAppearanceDetailEvent] -> ShowS
Show, UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool
(UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool)
-> (UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool)
-> Eq UIAppearanceDetailEvent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool
== :: UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool
$c/= :: UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool
/= :: UIAppearanceDetailEvent -> UIAppearanceDetailEvent -> Bool
Eq)
uiAppearanceDetailDecoder :: Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder :: Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder = Decoder {DecodeTarget
Value -> Parser UIAppearanceDetailEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser UIAppearanceDetailEvent
decodeAt :: DecodeTarget
decoder :: Value -> Parser UIAppearanceDetailEvent
..}
where
decodeAt :: DecodeTarget
decodeAt = [MisoString] -> DecodeTarget
DecodeTarget [MisoString]
forall a. Monoid a => a
mempty
decoder :: Value -> Parser UIAppearanceDetailEvent
decoder = MisoString
-> (Object -> Parser UIAppearanceDetailEvent)
-> Value
-> Parser UIAppearanceDetailEvent
forall a. MisoString -> (Object -> Parser a) -> Value -> Parser a
withObject MisoString
"UIAppearanceDetailEvent" ((Object -> Parser UIAppearanceDetailEvent)
-> Value -> Parser UIAppearanceDetailEvent)
-> (Object -> Parser UIAppearanceDetailEvent)
-> Value
-> Parser UIAppearanceDetailEvent
forall a b. (a -> b) -> a -> b
$ \Object
o -> do
d <- Object
o Object -> MisoString -> Parser Object
forall a. FromJSON a => Object -> MisoString -> Parser a
.: MisoString
"detail"
UIAppearanceDetailEvent
<$> o .: "type"
<*> d .: "exposure-id"
<*> d .: "exposure-scene"
<*> d .: "unique-id"
<*> d .: "dataset"
onTouchStart :: (TouchEvent -> action) -> Attribute model action
onTouchStart :: forall action model.
(TouchEvent -> action) -> Attribute model action
onTouchStart TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchstart" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchMove :: (TouchEvent -> action) -> Attribute model action
onTouchMove :: forall action model.
(TouchEvent -> action) -> Attribute model action
onTouchMove TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchmove" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchEnd :: (TouchEvent -> action) -> Attribute model action
onTouchEnd :: forall action model.
(TouchEvent -> action) -> Attribute model action
onTouchEnd TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchend" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchCancel :: (TouchEvent -> action) -> Attribute model action
onTouchCancel :: forall action model.
(TouchEvent -> action) -> Attribute model action
onTouchCancel TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchcancel" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTap :: action -> Attribute model action
onTap :: forall action model. action -> Attribute model action
onTap action
action = MisoString
-> Decoder ()
-> (() -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"tap" Decoder ()
emptyDecoder (\() model
_ DOMRef
_ -> action
action)
onTapMain :: action -> EventHandler model action
onTapMain :: forall action model. action -> EventHandler model action
onTapMain action
action = MisoString
-> Decoder ()
-> (() -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"tap" Decoder ()
emptyDecoder (\() model
_ DOMRef
_ -> action
action)
onTapMainWith :: (DOMRef -> action) -> EventHandler model action
onTapMainWith :: forall action model.
(DOMRef -> action) -> EventHandler model action
onTapMainWith DOMRef -> action
action = MisoString
-> Decoder ()
-> (() -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"tap" Decoder ()
emptyDecoder (\() model
_ -> DOMRef -> action
action)
onTapMainModel :: (model -> action) -> EventHandler model action
onTapMainModel :: forall model action. (model -> action) -> EventHandler model action
onTapMainModel model -> action
action = MisoString
-> Decoder ()
-> (() -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"tap" Decoder ()
emptyDecoder (\() model
m DOMRef
_ -> model -> action
action model
m)
onLongPress :: (TouchEvent -> action) -> Attribute model action
onLongPress :: forall action model.
(TouchEvent -> action) -> Attribute model action
onLongPress TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"longpress" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onLayoutChange :: (LayoutChangeDetailEvent -> action) -> Attribute model action
onLayoutChange :: forall action model.
(LayoutChangeDetailEvent -> action) -> Attribute model action
onLayoutChange LayoutChangeDetailEvent -> action
action = MisoString
-> Decoder LayoutChangeDetailEvent
-> (LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"layoutchange" Decoder LayoutChangeDetailEvent
layoutChangeDetailDecoder (\LayoutChangeDetailEvent
x model
_ DOMRef
_ -> LayoutChangeDetailEvent -> action
action LayoutChangeDetailEvent
x)
onAppear :: (UIAppearanceDetailEvent -> action) -> Attribute model action
onAppear :: forall action model.
(UIAppearanceDetailEvent -> action) -> Attribute model action
onAppear UIAppearanceDetailEvent -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"uiappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder (\UIAppearanceDetailEvent
x model
_ DOMRef
_ -> UIAppearanceDetailEvent -> action
action UIAppearanceDetailEvent
x)
onDisappear :: (UIAppearanceDetailEvent -> action) -> Attribute model action
onDisappear :: forall action model.
(UIAppearanceDetailEvent -> action) -> Attribute model action
onDisappear UIAppearanceDetailEvent -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"uidisappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder (\UIAppearanceDetailEvent
x model
_ DOMRef
_ -> UIAppearanceDetailEvent -> action
action UIAppearanceDetailEvent
x)
onAnimationStart :: (AnimationEvent -> action) -> Attribute model action
onAnimationStart :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onAnimationStart AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationstart" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationEnd :: (AnimationEvent -> action) -> Attribute model action
onAnimationEnd :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onAnimationEnd AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationend" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationCancel :: (AnimationEvent -> action) -> Attribute model action
onAnimationCancel :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onAnimationCancel AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationcancel" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationIteration :: (AnimationEvent -> action) -> Attribute model action
onAnimationIteration :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onAnimationIteration AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationiteration" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTransitionStart :: (AnimationEvent -> action) -> Attribute model action
onTransitionStart :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onTransitionStart AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"transitionstart" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTransitionEnd :: (AnimationEvent -> action) -> Attribute model action
onTransitionEnd :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onTransitionEnd AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"transitionend" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTransitionCancel :: (AnimationEvent -> action) -> Attribute model action
onTransitionCancel :: forall action model.
(AnimationEvent -> action) -> Attribute model action
onTransitionCancel AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"transitioncancel" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTouchStartWith :: (TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchStartWith :: forall action model.
(TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchStartWith TouchEvent -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchstart" Decoder TouchEvent
touchDecoder ((TouchEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \TouchEvent
t model
_ DOMRef
d -> TouchEvent -> DOMRef -> action
action TouchEvent
t DOMRef
d
onTouchMoveWith :: (TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchMoveWith :: forall action model.
(TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchMoveWith TouchEvent -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchmove" Decoder TouchEvent
touchDecoder ((TouchEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \TouchEvent
t model
_ DOMRef
d -> TouchEvent -> DOMRef -> action
action TouchEvent
t DOMRef
d
onTouchEndWith :: (TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchEndWith :: forall action model.
(TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchEndWith TouchEvent -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchend" Decoder TouchEvent
touchDecoder ((TouchEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \TouchEvent
t model
_ DOMRef
d -> TouchEvent -> DOMRef -> action
action TouchEvent
t DOMRef
d
onTouchCancelWith :: (TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchCancelWith :: forall action model.
(TouchEvent -> DOMRef -> action) -> Attribute model action
onTouchCancelWith TouchEvent -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"touchcancel" Decoder TouchEvent
touchDecoder ((TouchEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \TouchEvent
t model
_ DOMRef
d -> TouchEvent -> DOMRef -> action
action TouchEvent
t DOMRef
d
onTapWith :: (DOMRef -> action) -> Attribute model action
onTapWith :: forall action model. (DOMRef -> action) -> Attribute model action
onTapWith DOMRef -> action
action = MisoString
-> Decoder ()
-> (() -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"tap" Decoder ()
emptyDecoder (\() model
_ DOMRef
ref -> DOMRef -> action
action DOMRef
ref)
onLongPressWith :: (TouchEvent -> DOMRef -> action) -> Attribute model action
onLongPressWith :: forall action model.
(TouchEvent -> DOMRef -> action) -> Attribute model action
onLongPressWith TouchEvent -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"longpress" Decoder TouchEvent
touchDecoder ((TouchEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (TouchEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \TouchEvent
t model
_ DOMRef
d -> TouchEvent -> DOMRef -> action
action TouchEvent
t DOMRef
d
onLayoutChangeWith :: (LayoutChangeDetailEvent -> DOMRef -> action) -> Attribute model action
onLayoutChangeWith :: forall action model.
(LayoutChangeDetailEvent -> DOMRef -> action)
-> Attribute model action
onLayoutChangeWith LayoutChangeDetailEvent -> DOMRef -> action
action = MisoString
-> Decoder LayoutChangeDetailEvent
-> (LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"layoutchange" Decoder LayoutChangeDetailEvent
layoutChangeDetailDecoder ((LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \LayoutChangeDetailEvent
lcde model
_ DOMRef
domRef -> LayoutChangeDetailEvent -> DOMRef -> action
action LayoutChangeDetailEvent
lcde DOMRef
domRef
onAppearWith :: (UIAppearanceDetailEvent -> DOMRef -> action) -> Attribute model action
onAppearWith :: forall action model.
(UIAppearanceDetailEvent -> DOMRef -> action)
-> Attribute model action
onAppearWith UIAppearanceDetailEvent -> DOMRef -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"uiappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder ((UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \UIAppearanceDetailEvent
ui model
_ DOMRef
domRef -> UIAppearanceDetailEvent -> DOMRef -> action
action UIAppearanceDetailEvent
ui DOMRef
domRef
onDisappearWith :: (UIAppearanceDetailEvent -> DOMRef -> action) -> Attribute model action
onDisappearWith :: forall action model.
(UIAppearanceDetailEvent -> DOMRef -> action)
-> Attribute model action
onDisappearWith UIAppearanceDetailEvent -> DOMRef -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"uidisappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder ((UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \UIAppearanceDetailEvent
ui model
_ DOMRef
domRef -> UIAppearanceDetailEvent -> DOMRef -> action
action UIAppearanceDetailEvent
ui DOMRef
domRef
onAnimationStartWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationStartWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationStartWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationstart" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onAnimationEndWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationEndWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationEndWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationend" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onAnimationCancelWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationCancelWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationCancelWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationcancel" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onAnimationIterationWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationIterationWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onAnimationIterationWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"animationiteration" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onTransitionStartWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onTransitionStartWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onTransitionStartWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"transitionstart" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onTransitionEndWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onTransitionEndWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onTransitionEndWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"transitionend" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onTransitionCancelWith :: (AnimationEvent -> DOMRef -> action) -> Attribute model action
onTransitionCancelWith :: forall action model.
(AnimationEvent -> DOMRef -> action) -> Attribute model action
onTransitionCancelWith AnimationEvent -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> Attribute model action
on MisoString
"transitioncancel" Decoder AnimationEvent
animationDecoder ((AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action)
-> (AnimationEvent -> model -> DOMRef -> action)
-> Attribute model action
forall a b. (a -> b) -> a -> b
$ \AnimationEvent
ui model
_ DOMRef
domRef -> AnimationEvent -> DOMRef -> action
action AnimationEvent
ui DOMRef
domRef
onTouchStartMain :: (TouchEvent -> action) -> EventHandler model action
onTouchStartMain :: forall action model.
(TouchEvent -> action) -> EventHandler model action
onTouchStartMain TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchstart" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchStartMainWith :: (TouchEvent -> model -> DOMRef -> action) -> EventHandler model action
onTouchStartMainWith :: forall model action.
(TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTouchStartMainWith TouchEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchstart" Decoder TouchEvent
touchDecoder TouchEvent -> model -> DOMRef -> action
action
onTouchMoveMain :: (TouchEvent -> action) -> EventHandler model action
onTouchMoveMain :: forall action model.
(TouchEvent -> action) -> EventHandler model action
onTouchMoveMain TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchmove" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchMoveMainWith :: (TouchEvent -> model -> DOMRef -> action) -> EventHandler model action
onTouchMoveMainWith :: forall model action.
(TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTouchMoveMainWith TouchEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchmove" Decoder TouchEvent
touchDecoder TouchEvent -> model -> DOMRef -> action
action
onTouchEndMain :: (TouchEvent -> action) -> EventHandler model action
onTouchEndMain :: forall action model.
(TouchEvent -> action) -> EventHandler model action
onTouchEndMain TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchend" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchEndMainWith :: (TouchEvent -> model -> DOMRef -> action) -> EventHandler model action
onTouchEndMainWith :: forall model action.
(TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTouchEndMainWith TouchEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchend" Decoder TouchEvent
touchDecoder TouchEvent -> model -> DOMRef -> action
action
onTouchCancelMain :: (TouchEvent -> action) -> EventHandler model action
onTouchCancelMain :: forall action model.
(TouchEvent -> action) -> EventHandler model action
onTouchCancelMain TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchcancel" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onTouchCancelMainWith :: (TouchEvent -> model -> DOMRef -> action) -> EventHandler model action
onTouchCancelMainWith :: forall model action.
(TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTouchCancelMainWith TouchEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"touchcancel" Decoder TouchEvent
touchDecoder TouchEvent -> model -> DOMRef -> action
action
onLongPressMain :: (TouchEvent -> action) -> EventHandler model action
onLongPressMain :: forall action model.
(TouchEvent -> action) -> EventHandler model action
onLongPressMain TouchEvent -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"longpress" Decoder TouchEvent
touchDecoder (\TouchEvent
x model
_ DOMRef
_ -> TouchEvent -> action
action TouchEvent
x)
onLongPressMainWith :: (TouchEvent -> model -> DOMRef -> action) -> EventHandler model action
onLongPressMainWith :: forall model action.
(TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
onLongPressMainWith TouchEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder TouchEvent
-> (TouchEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"longpress" Decoder TouchEvent
touchDecoder TouchEvent -> model -> DOMRef -> action
action
onLayoutChangeMain :: (LayoutChangeDetailEvent -> action) -> EventHandler model action
onLayoutChangeMain :: forall action model.
(LayoutChangeDetailEvent -> action) -> EventHandler model action
onLayoutChangeMain LayoutChangeDetailEvent -> action
action = MisoString
-> Decoder LayoutChangeDetailEvent
-> (LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"layoutchange" Decoder LayoutChangeDetailEvent
layoutChangeDetailDecoder (\LayoutChangeDetailEvent
x model
_ DOMRef
_ -> LayoutChangeDetailEvent -> action
action LayoutChangeDetailEvent
x)
onLayoutChangeMainWith :: (LayoutChangeDetailEvent -> model -> DOMRef -> action) -> EventHandler model action
onLayoutChangeMainWith :: forall model action.
(LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
onLayoutChangeMainWith LayoutChangeDetailEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder LayoutChangeDetailEvent
-> (LayoutChangeDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"layoutchange" Decoder LayoutChangeDetailEvent
layoutChangeDetailDecoder LayoutChangeDetailEvent -> model -> DOMRef -> action
action
onAppearMain :: (UIAppearanceDetailEvent -> action) -> EventHandler model action
onAppearMain :: forall action model.
(UIAppearanceDetailEvent -> action) -> EventHandler model action
onAppearMain UIAppearanceDetailEvent -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"uiappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder (\UIAppearanceDetailEvent
x model
_ DOMRef
_ -> UIAppearanceDetailEvent -> action
action UIAppearanceDetailEvent
x)
onAppearMainWith :: (UIAppearanceDetailEvent -> model -> DOMRef -> action) -> EventHandler model action
onAppearMainWith :: forall model action.
(UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
onAppearMainWith UIAppearanceDetailEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"uiappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder UIAppearanceDetailEvent -> model -> DOMRef -> action
action
onDisappearMain :: (UIAppearanceDetailEvent -> action) -> EventHandler model action
onDisappearMain :: forall action model.
(UIAppearanceDetailEvent -> action) -> EventHandler model action
onDisappearMain UIAppearanceDetailEvent -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"uidisappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder (\UIAppearanceDetailEvent
x model
_ DOMRef
_ -> UIAppearanceDetailEvent -> action
action UIAppearanceDetailEvent
x)
onDisappearMainWith :: (UIAppearanceDetailEvent -> model -> DOMRef -> action) -> EventHandler model action
onDisappearMainWith :: forall model action.
(UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
onDisappearMainWith UIAppearanceDetailEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder UIAppearanceDetailEvent
-> (UIAppearanceDetailEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"uidisappear" Decoder UIAppearanceDetailEvent
uiAppearanceDetailDecoder UIAppearanceDetailEvent -> model -> DOMRef -> action
action
onAnimationStartMain :: (AnimationEvent -> action) -> EventHandler model action
onAnimationStartMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onAnimationStartMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationstart" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationStartMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onAnimationStartMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onAnimationStartMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationstart" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action
onAnimationEndMain :: (AnimationEvent -> action) -> EventHandler model action
onAnimationEndMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onAnimationEndMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationend" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationEndMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onAnimationEndMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onAnimationEndMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationend" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action
onAnimationCancelMain :: (AnimationEvent -> action) -> EventHandler model action
onAnimationCancelMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onAnimationCancelMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationcancel" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationCancelMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onAnimationCancelMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onAnimationCancelMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationcancel" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action
onAnimationIterationMain :: (AnimationEvent -> action) -> EventHandler model action
onAnimationIterationMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onAnimationIterationMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationiteration" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onAnimationIterationMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onAnimationIterationMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onAnimationIterationMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"animationiteration" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action
onTransitionStartMain :: (AnimationEvent -> action) -> EventHandler model action
onTransitionStartMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onTransitionStartMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"transitionstart" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTransitionStartMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onTransitionStartMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTransitionStartMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"transitionstart" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action
onTransitionEndMain :: (AnimationEvent -> action) -> EventHandler model action
onTransitionEndMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onTransitionEndMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"transitionend" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTransitionEndMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onTransitionEndMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTransitionEndMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"transitionend" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action
onTransitionCancelMain :: (AnimationEvent -> action) -> EventHandler model action
onTransitionCancelMain :: forall action model.
(AnimationEvent -> action) -> EventHandler model action
onTransitionCancelMain AnimationEvent -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"transitioncancel" Decoder AnimationEvent
animationDecoder (\AnimationEvent
x model
_ DOMRef
_ -> AnimationEvent -> action
action AnimationEvent
x)
onTransitionCancelMainWith :: (AnimationEvent -> model -> DOMRef -> action) -> EventHandler model action
onTransitionCancelMainWith :: forall model action.
(AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
onTransitionCancelMainWith AnimationEvent -> model -> DOMRef -> action
action = MisoString
-> Decoder AnimationEvent
-> (AnimationEvent -> model -> DOMRef -> action)
-> EventHandler model action
forall result model action.
MisoString
-> Decoder result
-> (result -> model -> DOMRef -> action)
-> EventHandler model action
onMain MisoString
"transitioncancel" Decoder AnimationEvent
animationDecoder AnimationEvent -> model -> DOMRef -> action
action