{-|
Module      : Monomer.Widgets.Animation.Types
Copyright   : (c) 2018 Francisco Vallarino
License     : BSD-3-Clause (see the LICENSE file)
Maintainer  : fjvallarino@gmail.com
Stability   : experimental
Portability : non-portable

Common types for animation widgets.
-}
module Monomer.Widgets.Animation.Types where

-- | Message animation widgets usually support. Controls animation state.
data AnimationMsg
  -- | Starts the animation from the beginning, even if it's running.
  = AnimationStart
  -- | Stops the animation if it's currently running.
  | AnimationStop
  {-|
  Indicates the animation has finished. This is usually generated by the widget
  itself for clean up.
  -}
  | AnimationFinished
  deriving (AnimationMsg -> AnimationMsg -> Bool
(AnimationMsg -> AnimationMsg -> Bool)
-> (AnimationMsg -> AnimationMsg -> Bool) -> Eq AnimationMsg
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AnimationMsg -> AnimationMsg -> Bool
$c/= :: AnimationMsg -> AnimationMsg -> Bool
== :: AnimationMsg -> AnimationMsg -> Bool
$c== :: AnimationMsg -> AnimationMsg -> Bool
Eq, Int -> AnimationMsg -> ShowS
[AnimationMsg] -> ShowS
AnimationMsg -> String
(Int -> AnimationMsg -> ShowS)
-> (AnimationMsg -> String)
-> ([AnimationMsg] -> ShowS)
-> Show AnimationMsg
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AnimationMsg] -> ShowS
$cshowList :: [AnimationMsg] -> ShowS
show :: AnimationMsg -> String
$cshow :: AnimationMsg -> String
showsPrec :: Int -> AnimationMsg -> ShowS
$cshowsPrec :: Int -> AnimationMsg -> ShowS
Show)