-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

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

module GI.Gsk.Enums
    ( 

 -- * Enumerations
-- ** BlendMode #enum:BlendMode#

    BlendMode(..)                           ,


-- ** Corner #enum:Corner#

    Corner(..)                              ,


-- ** RenderNodeType #enum:RenderNodeType#

    RenderNodeType(..)                      ,


-- ** ScalingFilter #enum:ScalingFilter#

    ScalingFilter(..)                       ,


-- ** SerializationError #enum:SerializationError#

    SerializationError(..)                  ,
    catchSerializationError                 ,
    handleSerializationError                ,


-- ** TransformCategory #enum:TransformCategory#

    TransformCategory(..)                   ,




    ) 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.GI.Base.Signals as B.Signals
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 TransformCategory
-- | The categories of matrices relevant for GSK and GTK. Note that any
-- category includes matrices of all later categories. So if you want
-- to for example check if a matrix is a 2D matrix,
-- @category >= GSK_TRANSFORM_CATEGORY_2D@ is the way to do this.
-- 
-- Also keep in mind that rounding errors may cause matrices to not
-- conform to their categories. Otherwise, matrix operations done via
-- mutliplication will not worsen categories. So for the matrix
-- multiplication @C = A * B@, @category(C) = MIN (category(A), category(B))@.
data TransformCategory = 
      TransformCategoryUnknown
    -- ^ The category of the matrix has not been
    --     determined.
    | TransformCategoryAny
    -- ^ Analyzing the matrix concluded that it does
    --     not fit in any other category.
    | TransformCategory3d
    -- ^ The matrix is a 3D matrix. This means that
    --     the w column (the last column) has the values (0, 0, 0, 1).
    | TransformCategory2d
    -- ^ The matrix is a 2D matrix. This is equivalent
    --     to 'GI.Graphene.Structs.Matrix.matrixIs2d' returning 'P.True'. In particular, this
    --     means that Cairo can deal with the matrix.
    | TransformCategory2dAffine
    -- ^ The matrix is a combination of 2D scale
    --     and 2D translation operations. In particular, this means that any
    --     rectangle can be transformed exactly using this matrix.
    | TransformCategory2dTranslate
    -- ^ The matrix is a 2D translation.
    | TransformCategoryIdentity
    -- ^ The matrix is the identity matrix.
    | AnotherTransformCategory Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TransformCategory -> ShowS
[TransformCategory] -> ShowS
TransformCategory -> String
(Int -> TransformCategory -> ShowS)
-> (TransformCategory -> String)
-> ([TransformCategory] -> ShowS)
-> Show TransformCategory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransformCategory] -> ShowS
$cshowList :: [TransformCategory] -> ShowS
show :: TransformCategory -> String
$cshow :: TransformCategory -> String
showsPrec :: Int -> TransformCategory -> ShowS
$cshowsPrec :: Int -> TransformCategory -> ShowS
Show, TransformCategory -> TransformCategory -> Bool
(TransformCategory -> TransformCategory -> Bool)
-> (TransformCategory -> TransformCategory -> Bool)
-> Eq TransformCategory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransformCategory -> TransformCategory -> Bool
$c/= :: TransformCategory -> TransformCategory -> Bool
== :: TransformCategory -> TransformCategory -> Bool
$c== :: TransformCategory -> TransformCategory -> Bool
Eq)

instance P.Enum TransformCategory where
    fromEnum :: TransformCategory -> Int
fromEnum TransformCategoryUnknown = 0
    fromEnum TransformCategoryAny = 1
    fromEnum TransformCategory3d = 2
    fromEnum TransformCategory2d = 3
    fromEnum TransformCategory2dAffine = 4
    fromEnum TransformCategory2dTranslate = 5
    fromEnum TransformCategoryIdentity = 6
    fromEnum (AnotherTransformCategory k :: Int
k) = Int
k

    toEnum :: Int -> TransformCategory
toEnum 0 = TransformCategory
TransformCategoryUnknown
    toEnum 1 = TransformCategory
TransformCategoryAny
    toEnum 2 = TransformCategory
TransformCategory3d
    toEnum 3 = TransformCategory
TransformCategory2d
    toEnum 4 = TransformCategory
TransformCategory2dAffine
    toEnum 5 = TransformCategory
TransformCategory2dTranslate
    toEnum 6 = TransformCategory
TransformCategoryIdentity
    toEnum k :: Int
k = Int -> TransformCategory
AnotherTransformCategory Int
k

instance P.Ord TransformCategory where
    compare :: TransformCategory -> TransformCategory -> Ordering
compare a :: TransformCategory
a b :: TransformCategory
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (TransformCategory -> Int
forall a. Enum a => a -> Int
P.fromEnum TransformCategory
a) (TransformCategory -> Int
forall a. Enum a => a -> Int
P.fromEnum TransformCategory
b)

foreign import ccall "gsk_transform_category_get_type" c_gsk_transform_category_get_type :: 
    IO GType

instance BoxedEnum TransformCategory where
    boxedEnumType :: TransformCategory -> IO GType
boxedEnumType _ = IO GType
c_gsk_transform_category_get_type

-- Enum SerializationError
-- | Errors that can happen during (de)serialization.
data SerializationError = 
      SerializationErrorUnsupportedFormat
    -- ^ The format can not be
    --     identified
    | SerializationErrorUnsupportedVersion
    -- ^ The version of the data
    --     is not understood
    | SerializationErrorInvalidData
    -- ^ The given data may not exist in
    --     a proper serialization
    | AnotherSerializationError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SerializationError -> ShowS
[SerializationError] -> ShowS
SerializationError -> String
(Int -> SerializationError -> ShowS)
-> (SerializationError -> String)
-> ([SerializationError] -> ShowS)
-> Show SerializationError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SerializationError] -> ShowS
$cshowList :: [SerializationError] -> ShowS
show :: SerializationError -> String
$cshow :: SerializationError -> String
showsPrec :: Int -> SerializationError -> ShowS
$cshowsPrec :: Int -> SerializationError -> ShowS
Show, SerializationError -> SerializationError -> Bool
(SerializationError -> SerializationError -> Bool)
-> (SerializationError -> SerializationError -> Bool)
-> Eq SerializationError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SerializationError -> SerializationError -> Bool
$c/= :: SerializationError -> SerializationError -> Bool
== :: SerializationError -> SerializationError -> Bool
$c== :: SerializationError -> SerializationError -> Bool
Eq)

instance P.Enum SerializationError where
    fromEnum :: SerializationError -> Int
fromEnum SerializationErrorUnsupportedFormat = 0
    fromEnum SerializationErrorUnsupportedVersion = 1
    fromEnum SerializationErrorInvalidData = 2
    fromEnum (AnotherSerializationError k :: Int
k) = Int
k

    toEnum :: Int -> SerializationError
toEnum 0 = SerializationError
SerializationErrorUnsupportedFormat
    toEnum 1 = SerializationError
SerializationErrorUnsupportedVersion
    toEnum 2 = SerializationError
SerializationErrorInvalidData
    toEnum k :: Int
k = Int -> SerializationError
AnotherSerializationError Int
k

instance P.Ord SerializationError where
    compare :: SerializationError -> SerializationError -> Ordering
compare a :: SerializationError
a b :: SerializationError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SerializationError -> Int
forall a. Enum a => a -> Int
P.fromEnum SerializationError
a) (SerializationError -> Int
forall a. Enum a => a -> Int
P.fromEnum SerializationError
b)

instance GErrorClass SerializationError where
    gerrorClassDomain :: SerializationError -> Text
gerrorClassDomain _ = "gsk-serialization-error-quark"

-- | Catch exceptions of type `SerializationError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchSerializationError ::
    IO a ->
    (SerializationError -> GErrorMessage -> IO a) ->
    IO a
catchSerializationError :: IO a -> (SerializationError -> Text -> IO a) -> IO a
catchSerializationError = IO a -> (SerializationError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `SerializationError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleSerializationError ::
    (SerializationError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleSerializationError :: (SerializationError -> Text -> IO a) -> IO a -> IO a
handleSerializationError = (SerializationError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

foreign import ccall "gsk_serialization_error_get_type" c_gsk_serialization_error_get_type :: 
    IO GType

instance BoxedEnum SerializationError where
    boxedEnumType :: SerializationError -> IO GType
boxedEnumType _ = IO GType
c_gsk_serialization_error_get_type

-- Enum ScalingFilter
-- | The filters used when scaling texture data.
-- 
-- The actual implementation of each filter is deferred to the
-- rendering pipeline.
data ScalingFilter = 
      ScalingFilterLinear
    -- ^ linear interpolation filter
    | ScalingFilterNearest
    -- ^ nearest neighbor interpolation filter
    | ScalingFilterTrilinear
    -- ^ linear interpolation along each axis,
    --   plus mipmap generation, with linear interpolation along the mipmap
    --   levels
    | AnotherScalingFilter Int
    -- ^ Catch-all for unknown values
    deriving (Int -> ScalingFilter -> ShowS
[ScalingFilter] -> ShowS
ScalingFilter -> String
(Int -> ScalingFilter -> ShowS)
-> (ScalingFilter -> String)
-> ([ScalingFilter] -> ShowS)
-> Show ScalingFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ScalingFilter] -> ShowS
$cshowList :: [ScalingFilter] -> ShowS
show :: ScalingFilter -> String
$cshow :: ScalingFilter -> String
showsPrec :: Int -> ScalingFilter -> ShowS
$cshowsPrec :: Int -> ScalingFilter -> ShowS
Show, ScalingFilter -> ScalingFilter -> Bool
(ScalingFilter -> ScalingFilter -> Bool)
-> (ScalingFilter -> ScalingFilter -> Bool) -> Eq ScalingFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ScalingFilter -> ScalingFilter -> Bool
$c/= :: ScalingFilter -> ScalingFilter -> Bool
== :: ScalingFilter -> ScalingFilter -> Bool
$c== :: ScalingFilter -> ScalingFilter -> Bool
Eq)

instance P.Enum ScalingFilter where
    fromEnum :: ScalingFilter -> Int
fromEnum ScalingFilterLinear = 0
    fromEnum ScalingFilterNearest = 1
    fromEnum ScalingFilterTrilinear = 2
    fromEnum (AnotherScalingFilter k :: Int
k) = Int
k

    toEnum :: Int -> ScalingFilter
toEnum 0 = ScalingFilter
ScalingFilterLinear
    toEnum 1 = ScalingFilter
ScalingFilterNearest
    toEnum 2 = ScalingFilter
ScalingFilterTrilinear
    toEnum k :: Int
k = Int -> ScalingFilter
AnotherScalingFilter Int
k

instance P.Ord ScalingFilter where
    compare :: ScalingFilter -> ScalingFilter -> Ordering
compare a :: ScalingFilter
a b :: ScalingFilter
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ScalingFilter -> Int
forall a. Enum a => a -> Int
P.fromEnum ScalingFilter
a) (ScalingFilter -> Int
forall a. Enum a => a -> Int
P.fromEnum ScalingFilter
b)

foreign import ccall "gsk_scaling_filter_get_type" c_gsk_scaling_filter_get_type :: 
    IO GType

instance BoxedEnum ScalingFilter where
    boxedEnumType :: ScalingFilter -> IO GType
boxedEnumType _ = IO GType
c_gsk_scaling_filter_get_type

-- Enum RenderNodeType
-- | The type of a node determines what the node is rendering.
data RenderNodeType = 
      RenderNodeTypeNotARenderNode
    -- ^ Error type. No node will ever have this type.
    | RenderNodeTypeContainerNode
    -- ^ A node containing a stack of children
    | RenderNodeTypeCairoNode
    -- ^ A node drawing a t'GI.Cairo.Structs.Surface.Surface'
    | RenderNodeTypeColorNode
    -- ^ A node drawing a single color rectangle
    | RenderNodeTypeLinearGradientNode
    -- ^ A node drawing a linear gradient
    | RenderNodeTypeRepeatingLinearGradientNode
    -- ^ A node drawing a repeating linear gradient
    | RenderNodeTypeBorderNode
    -- ^ A node stroking a border around an area
    | RenderNodeTypeTextureNode
    -- ^ A node drawing a t'GI.Gdk.Objects.Texture.Texture'
    | RenderNodeTypeInsetShadowNode
    -- ^ A node drawing an inset shadow
    | RenderNodeTypeOutsetShadowNode
    -- ^ A node drawing an outset shadow
    | RenderNodeTypeTransformNode
    -- ^ A node that renders its child after applying a matrix transform
    | RenderNodeTypeOpacityNode
    -- ^ A node that changes the opacity of its child
    | RenderNodeTypeColorMatrixNode
    -- ^ A node that applies a color matrix to every pixel
    | RenderNodeTypeRepeatNode
    -- ^ A node that repeats the child\'s contents
    | RenderNodeTypeClipNode
    -- ^ A node that clips its child to a rectangular area
    | RenderNodeTypeRoundedClipNode
    -- ^ A node that clips its child to a rounded rectangle
    | RenderNodeTypeShadowNode
    -- ^ A node that draws a shadow below its child
    | RenderNodeTypeBlendNode
    -- ^ A node that blends two children together
    | RenderNodeTypeCrossFadeNode
    -- ^ A node that cross-fades between two children
    | RenderNodeTypeTextNode
    -- ^ A node containing a glyph string
    | RenderNodeTypeBlurNode
    -- ^ A node that applies a blur
    | RenderNodeTypeDebugNode
    -- ^ /No description available in the introspection data./
    | AnotherRenderNodeType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> RenderNodeType -> ShowS
[RenderNodeType] -> ShowS
RenderNodeType -> String
(Int -> RenderNodeType -> ShowS)
-> (RenderNodeType -> String)
-> ([RenderNodeType] -> ShowS)
-> Show RenderNodeType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RenderNodeType] -> ShowS
$cshowList :: [RenderNodeType] -> ShowS
show :: RenderNodeType -> String
$cshow :: RenderNodeType -> String
showsPrec :: Int -> RenderNodeType -> ShowS
$cshowsPrec :: Int -> RenderNodeType -> ShowS
Show, RenderNodeType -> RenderNodeType -> Bool
(RenderNodeType -> RenderNodeType -> Bool)
-> (RenderNodeType -> RenderNodeType -> Bool) -> Eq RenderNodeType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RenderNodeType -> RenderNodeType -> Bool
$c/= :: RenderNodeType -> RenderNodeType -> Bool
== :: RenderNodeType -> RenderNodeType -> Bool
$c== :: RenderNodeType -> RenderNodeType -> Bool
Eq)

instance P.Enum RenderNodeType where
    fromEnum :: RenderNodeType -> Int
fromEnum RenderNodeTypeNotARenderNode = 0
    fromEnum RenderNodeTypeContainerNode = 1
    fromEnum RenderNodeTypeCairoNode = 2
    fromEnum RenderNodeTypeColorNode = 3
    fromEnum RenderNodeTypeLinearGradientNode = 4
    fromEnum RenderNodeTypeRepeatingLinearGradientNode = 5
    fromEnum RenderNodeTypeBorderNode = 6
    fromEnum RenderNodeTypeTextureNode = 7
    fromEnum RenderNodeTypeInsetShadowNode = 8
    fromEnum RenderNodeTypeOutsetShadowNode = 9
    fromEnum RenderNodeTypeTransformNode = 10
    fromEnum RenderNodeTypeOpacityNode = 11
    fromEnum RenderNodeTypeColorMatrixNode = 12
    fromEnum RenderNodeTypeRepeatNode = 13
    fromEnum RenderNodeTypeClipNode = 14
    fromEnum RenderNodeTypeRoundedClipNode = 15
    fromEnum RenderNodeTypeShadowNode = 16
    fromEnum RenderNodeTypeBlendNode = 17
    fromEnum RenderNodeTypeCrossFadeNode = 18
    fromEnum RenderNodeTypeTextNode = 19
    fromEnum RenderNodeTypeBlurNode = 20
    fromEnum RenderNodeTypeDebugNode = 21
    fromEnum (AnotherRenderNodeType k :: Int
k) = Int
k

    toEnum :: Int -> RenderNodeType
toEnum 0 = RenderNodeType
RenderNodeTypeNotARenderNode
    toEnum 1 = RenderNodeType
RenderNodeTypeContainerNode
    toEnum 2 = RenderNodeType
RenderNodeTypeCairoNode
    toEnum 3 = RenderNodeType
RenderNodeTypeColorNode
    toEnum 4 = RenderNodeType
RenderNodeTypeLinearGradientNode
    toEnum 5 = RenderNodeType
RenderNodeTypeRepeatingLinearGradientNode
    toEnum 6 = RenderNodeType
RenderNodeTypeBorderNode
    toEnum 7 = RenderNodeType
RenderNodeTypeTextureNode
    toEnum 8 = RenderNodeType
RenderNodeTypeInsetShadowNode
    toEnum 9 = RenderNodeType
RenderNodeTypeOutsetShadowNode
    toEnum 10 = RenderNodeType
RenderNodeTypeTransformNode
    toEnum 11 = RenderNodeType
RenderNodeTypeOpacityNode
    toEnum 12 = RenderNodeType
RenderNodeTypeColorMatrixNode
    toEnum 13 = RenderNodeType
RenderNodeTypeRepeatNode
    toEnum 14 = RenderNodeType
RenderNodeTypeClipNode
    toEnum 15 = RenderNodeType
RenderNodeTypeRoundedClipNode
    toEnum 16 = RenderNodeType
RenderNodeTypeShadowNode
    toEnum 17 = RenderNodeType
RenderNodeTypeBlendNode
    toEnum 18 = RenderNodeType
RenderNodeTypeCrossFadeNode
    toEnum 19 = RenderNodeType
RenderNodeTypeTextNode
    toEnum 20 = RenderNodeType
RenderNodeTypeBlurNode
    toEnum 21 = RenderNodeType
RenderNodeTypeDebugNode
    toEnum k :: Int
k = Int -> RenderNodeType
AnotherRenderNodeType Int
k

instance P.Ord RenderNodeType where
    compare :: RenderNodeType -> RenderNodeType -> Ordering
compare a :: RenderNodeType
a b :: RenderNodeType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (RenderNodeType -> Int
forall a. Enum a => a -> Int
P.fromEnum RenderNodeType
a) (RenderNodeType -> Int
forall a. Enum a => a -> Int
P.fromEnum RenderNodeType
b)

foreign import ccall "gsk_render_node_type_get_type" c_gsk_render_node_type_get_type :: 
    IO GType

instance BoxedEnum RenderNodeType where
    boxedEnumType :: RenderNodeType -> IO GType
boxedEnumType _ = IO GType
c_gsk_render_node_type_get_type

-- Enum Corner
-- | The corner indices used by t'GI.Gsk.Structs.RoundedRect.RoundedRect'.
data Corner = 
      CornerTopLeft
    -- ^ The top left corner
    | CornerTopRight
    -- ^ The top right corner
    | CornerBottomRight
    -- ^ The bottom right corner
    | CornerBottomLeft
    -- ^ The bottom left corner
    | AnotherCorner Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Corner -> ShowS
[Corner] -> ShowS
Corner -> String
(Int -> Corner -> ShowS)
-> (Corner -> String) -> ([Corner] -> ShowS) -> Show Corner
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Corner] -> ShowS
$cshowList :: [Corner] -> ShowS
show :: Corner -> String
$cshow :: Corner -> String
showsPrec :: Int -> Corner -> ShowS
$cshowsPrec :: Int -> Corner -> ShowS
Show, Corner -> Corner -> Bool
(Corner -> Corner -> Bool)
-> (Corner -> Corner -> Bool) -> Eq Corner
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Corner -> Corner -> Bool
$c/= :: Corner -> Corner -> Bool
== :: Corner -> Corner -> Bool
$c== :: Corner -> Corner -> Bool
Eq)

instance P.Enum Corner where
    fromEnum :: Corner -> Int
fromEnum CornerTopLeft = 0
    fromEnum CornerTopRight = 1
    fromEnum CornerBottomRight = 2
    fromEnum CornerBottomLeft = 3
    fromEnum (AnotherCorner k :: Int
k) = Int
k

    toEnum :: Int -> Corner
toEnum 0 = Corner
CornerTopLeft
    toEnum 1 = Corner
CornerTopRight
    toEnum 2 = Corner
CornerBottomRight
    toEnum 3 = Corner
CornerBottomLeft
    toEnum k :: Int
k = Int -> Corner
AnotherCorner Int
k

instance P.Ord Corner where
    compare :: Corner -> Corner -> Ordering
compare a :: Corner
a b :: Corner
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Corner -> Int
forall a. Enum a => a -> Int
P.fromEnum Corner
a) (Corner -> Int
forall a. Enum a => a -> Int
P.fromEnum Corner
b)

foreign import ccall "gsk_corner_get_type" c_gsk_corner_get_type :: 
    IO GType

instance BoxedEnum Corner where
    boxedEnumType :: Corner -> IO GType
boxedEnumType _ = IO GType
c_gsk_corner_get_type

-- Enum BlendMode
-- | The blend modes available for render nodes.
-- 
-- The implementation of each blend mode is deferred to the
-- rendering pipeline.
data BlendMode = 
      BlendModeDefault
    -- ^ The default blend mode, which specifies no blending
    | BlendModeMultiply
    -- ^ The source color is multiplied by the destination
    --   and replaces the destination
    | BlendModeScreen
    -- ^ ...
    | BlendModeOverlay
    -- ^ ...
    | BlendModeDarken
    -- ^ ...
    | BlendModeLighten
    -- ^ ...
    | BlendModeColorDodge
    -- ^ ...
    | BlendModeColorBurn
    -- ^ ...
    | BlendModeHardLight
    -- ^ ...
    | BlendModeSoftLight
    -- ^ ...
    | BlendModeDifference
    -- ^ ...
    | BlendModeExclusion
    -- ^ ...
    | BlendModeColor
    -- ^ ...
    | BlendModeHue
    -- ^ ...
    | BlendModeSaturation
    -- ^ ...
    | BlendModeLuminosity
    -- ^ ...
    | AnotherBlendMode Int
    -- ^ Catch-all for unknown values
    deriving (Int -> BlendMode -> ShowS
[BlendMode] -> ShowS
BlendMode -> String
(Int -> BlendMode -> ShowS)
-> (BlendMode -> String)
-> ([BlendMode] -> ShowS)
-> Show BlendMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BlendMode] -> ShowS
$cshowList :: [BlendMode] -> ShowS
show :: BlendMode -> String
$cshow :: BlendMode -> String
showsPrec :: Int -> BlendMode -> ShowS
$cshowsPrec :: Int -> BlendMode -> ShowS
Show, BlendMode -> BlendMode -> Bool
(BlendMode -> BlendMode -> Bool)
-> (BlendMode -> BlendMode -> Bool) -> Eq BlendMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BlendMode -> BlendMode -> Bool
$c/= :: BlendMode -> BlendMode -> Bool
== :: BlendMode -> BlendMode -> Bool
$c== :: BlendMode -> BlendMode -> Bool
Eq)

instance P.Enum BlendMode where
    fromEnum :: BlendMode -> Int
fromEnum BlendModeDefault = 0
    fromEnum BlendModeMultiply = 1
    fromEnum BlendModeScreen = 2
    fromEnum BlendModeOverlay = 3
    fromEnum BlendModeDarken = 4
    fromEnum BlendModeLighten = 5
    fromEnum BlendModeColorDodge = 6
    fromEnum BlendModeColorBurn = 7
    fromEnum BlendModeHardLight = 8
    fromEnum BlendModeSoftLight = 9
    fromEnum BlendModeDifference = 10
    fromEnum BlendModeExclusion = 11
    fromEnum BlendModeColor = 12
    fromEnum BlendModeHue = 13
    fromEnum BlendModeSaturation = 14
    fromEnum BlendModeLuminosity = 15
    fromEnum (AnotherBlendMode k :: Int
k) = Int
k

    toEnum :: Int -> BlendMode
toEnum 0 = BlendMode
BlendModeDefault
    toEnum 1 = BlendMode
BlendModeMultiply
    toEnum 2 = BlendMode
BlendModeScreen
    toEnum 3 = BlendMode
BlendModeOverlay
    toEnum 4 = BlendMode
BlendModeDarken
    toEnum 5 = BlendMode
BlendModeLighten
    toEnum 6 = BlendMode
BlendModeColorDodge
    toEnum 7 = BlendMode
BlendModeColorBurn
    toEnum 8 = BlendMode
BlendModeHardLight
    toEnum 9 = BlendMode
BlendModeSoftLight
    toEnum 10 = BlendMode
BlendModeDifference
    toEnum 11 = BlendMode
BlendModeExclusion
    toEnum 12 = BlendMode
BlendModeColor
    toEnum 13 = BlendMode
BlendModeHue
    toEnum 14 = BlendMode
BlendModeSaturation
    toEnum 15 = BlendMode
BlendModeLuminosity
    toEnum k :: Int
k = Int -> BlendMode
AnotherBlendMode Int
k

instance P.Ord BlendMode where
    compare :: BlendMode -> BlendMode -> Ordering
compare a :: BlendMode
a b :: BlendMode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (BlendMode -> Int
forall a. Enum a => a -> Int
P.fromEnum BlendMode
a) (BlendMode -> Int
forall a. Enum a => a -> Int
P.fromEnum BlendMode
b)

foreign import ccall "gsk_blend_mode_get_type" c_gsk_blend_mode_get_type :: 
    IO GType

instance BoxedEnum BlendMode where
    boxedEnumType :: BlendMode -> IO GType
boxedEnumType _ = IO GType
c_gsk_blend_mode_get_type