{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.Handy.Enums
    (

 -- * Enumerations
-- ** ArrowsDirection #enum:ArrowsDirection#

    ArrowsDirection(..)                     ,


-- ** Fold #enum:Fold#

    Fold(..)                                ,


-- ** LeafletChildTransitionType #enum:LeafletChildTransitionType#

    LeafletChildTransitionType(..)          ,


-- ** LeafletModeTransitionType #enum:LeafletModeTransitionType#

    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


-- Enum LeafletModeTransitionType
{- |
These enumeration values describe the possible transitions between pages in a
'GI.Handy.Objects.Leaflet.Leaflet' widget.

New values may be added to this enumeration over time.
-}
data LeafletModeTransitionType =
      LeafletModeTransitionTypeNone
    {- ^
    No transition
    -}
    | LeafletModeTransitionTypeSlide
    {- ^
    Slide from left, right, up or down according to the orientation, text direction and the children order
    -}
    | AnotherLeafletModeTransitionType Int
    -- ^ Catch-all for unknown values
    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

-- Enum LeafletChildTransitionType
{- |
These enumeration values describe the possible transitions between pages in a
'GI.Handy.Objects.Leaflet.Leaflet' widget.

New values may be added to this enumeration over time.
-}
data LeafletChildTransitionType =
      LeafletChildTransitionTypeNone
    {- ^
    No transition
    -}
    | LeafletChildTransitionTypeCrossfade
    {- ^
    A cross-fade
    -}
    | LeafletChildTransitionTypeSlide
    {- ^
    Slide from left, right, up or down according to the orientation, text direction and the children order
    -}
    | LeafletChildTransitionTypeOver
    {- ^
    Cover the old page or uncover the new page, sliding from or towards the end according to orientation, text direction and children order
    -}
    | LeafletChildTransitionTypeUnder
    {- ^
    Uncover the new page or cover the old page, sliding from or towards the start according to orientation, text direction and children order
    -}
    | AnotherLeafletChildTransitionType Int
    -- ^ Catch-all for unknown values
    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

-- Enum Fold
{- |
Represents the fold of widgets and other objects which can be switched
between folded and unfolded state on the fly, like HdyLeaflet.
-}
data Fold =
      FoldUnfolded
    {- ^
    The element isn\'t folded
    -}
    | FoldFolded
    {- ^
    The element is folded
    -}
    | AnotherFold Int
    -- ^ Catch-all for unknown values
    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

-- Enum ArrowsDirection
{- |
/No description available in the introspection data./
-}
data ArrowsDirection =
      ArrowsDirectionUp
    {- ^
    Arrows point upwards.
    -}
    | ArrowsDirectionDown
    {- ^
    Arrows point to the left.
    -}
    | ArrowsDirectionLeft
    {- ^
    Arrows point to the right.
    -}
    | ArrowsDirectionRight
    {- ^
    Arrows point downwards
    -}
    | AnotherArrowsDirection Int
    -- ^ Catch-all for unknown values
    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