#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Handy.Enums
(
ArrowsDirection(..) ,
Fold(..) ,
LeafletChildTransitionType(..) ,
LeafletModeTransitionType(..) ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
data LeafletModeTransitionType =
LeafletModeTransitionTypeNone
| LeafletModeTransitionTypeSlide
| AnotherLeafletModeTransitionType Int
deriving (Show, Eq)
instance P.Enum LeafletModeTransitionType where
fromEnum LeafletModeTransitionTypeNone = 0
fromEnum LeafletModeTransitionTypeSlide = 1
fromEnum (AnotherLeafletModeTransitionType k) = k
toEnum 0 = LeafletModeTransitionTypeNone
toEnum 1 = LeafletModeTransitionTypeSlide
toEnum k = AnotherLeafletModeTransitionType k
instance P.Ord LeafletModeTransitionType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "hdy_leaflet_mode_transition_type_get_type" c_hdy_leaflet_mode_transition_type_get_type ::
IO GType
instance BoxedEnum LeafletModeTransitionType where
boxedEnumType _ = c_hdy_leaflet_mode_transition_type_get_type
data LeafletChildTransitionType =
LeafletChildTransitionTypeNone
| LeafletChildTransitionTypeCrossfade
| LeafletChildTransitionTypeSlide
| LeafletChildTransitionTypeOver
| LeafletChildTransitionTypeUnder
| AnotherLeafletChildTransitionType Int
deriving (Show, Eq)
instance P.Enum LeafletChildTransitionType where
fromEnum LeafletChildTransitionTypeNone = 0
fromEnum LeafletChildTransitionTypeCrossfade = 1
fromEnum LeafletChildTransitionTypeSlide = 2
fromEnum LeafletChildTransitionTypeOver = 3
fromEnum LeafletChildTransitionTypeUnder = 4
fromEnum (AnotherLeafletChildTransitionType k) = k
toEnum 0 = LeafletChildTransitionTypeNone
toEnum 1 = LeafletChildTransitionTypeCrossfade
toEnum 2 = LeafletChildTransitionTypeSlide
toEnum 3 = LeafletChildTransitionTypeOver
toEnum 4 = LeafletChildTransitionTypeUnder
toEnum k = AnotherLeafletChildTransitionType k
instance P.Ord LeafletChildTransitionType where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "hdy_leaflet_child_transition_type_get_type" c_hdy_leaflet_child_transition_type_get_type ::
IO GType
instance BoxedEnum LeafletChildTransitionType where
boxedEnumType _ = c_hdy_leaflet_child_transition_type_get_type
data Fold =
FoldUnfolded
| FoldFolded
| AnotherFold Int
deriving (Show, Eq)
instance P.Enum Fold where
fromEnum FoldUnfolded = 0
fromEnum FoldFolded = 1
fromEnum (AnotherFold k) = k
toEnum 0 = FoldUnfolded
toEnum 1 = FoldFolded
toEnum k = AnotherFold k
instance P.Ord Fold where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "hdy_fold_get_type" c_hdy_fold_get_type ::
IO GType
instance BoxedEnum Fold where
boxedEnumType _ = c_hdy_fold_get_type
data ArrowsDirection =
ArrowsDirectionUp
| ArrowsDirectionDown
| ArrowsDirectionLeft
| ArrowsDirectionRight
| AnotherArrowsDirection Int
deriving (Show, Eq)
instance P.Enum ArrowsDirection where
fromEnum ArrowsDirectionUp = 0
fromEnum ArrowsDirectionDown = 1
fromEnum ArrowsDirectionLeft = 2
fromEnum ArrowsDirectionRight = 3
fromEnum (AnotherArrowsDirection k) = k
toEnum 0 = ArrowsDirectionUp
toEnum 1 = ArrowsDirectionDown
toEnum 2 = ArrowsDirectionLeft
toEnum 3 = ArrowsDirectionRight
toEnum k = AnotherArrowsDirection k
instance P.Ord ArrowsDirection where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "hdy_arrows_direction_get_type" c_hdy_arrows_direction_get_type ::
IO GType
instance BoxedEnum ArrowsDirection where
boxedEnumType _ = c_hdy_arrows_direction_get_type