{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.BlendFactor (BlendFactor( BLEND_FACTOR_ZERO
, BLEND_FACTOR_ONE
, BLEND_FACTOR_SRC_COLOR
, BLEND_FACTOR_ONE_MINUS_SRC_COLOR
, BLEND_FACTOR_DST_COLOR
, BLEND_FACTOR_ONE_MINUS_DST_COLOR
, BLEND_FACTOR_SRC_ALPHA
, BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
, BLEND_FACTOR_DST_ALPHA
, BLEND_FACTOR_ONE_MINUS_DST_ALPHA
, BLEND_FACTOR_CONSTANT_COLOR
, BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR
, BLEND_FACTOR_CONSTANT_ALPHA
, BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA
, BLEND_FACTOR_SRC_ALPHA_SATURATE
, BLEND_FACTOR_SRC1_COLOR
, BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
, BLEND_FACTOR_SRC1_ALPHA
, BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
, ..
)) where
import GHC.Read (choose)
import GHC.Read (expectP)
import GHC.Read (parens)
import GHC.Show (showParen)
import GHC.Show (showString)
import GHC.Show (showsPrec)
import Text.ParserCombinators.ReadPrec ((+++))
import Text.ParserCombinators.ReadPrec (prec)
import Text.ParserCombinators.ReadPrec (step)
import Foreign.Storable (Storable)
import Data.Int (Int32)
import GHC.Read (Read(readPrec))
import Text.Read.Lex (Lexeme(Ident))
import Graphics.Vulkan.Zero (Zero)
newtype BlendFactor = BlendFactor Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern BLEND_FACTOR_ZERO = BlendFactor 0
pattern BLEND_FACTOR_ONE = BlendFactor 1
pattern BLEND_FACTOR_SRC_COLOR = BlendFactor 2
pattern BLEND_FACTOR_ONE_MINUS_SRC_COLOR = BlendFactor 3
pattern BLEND_FACTOR_DST_COLOR = BlendFactor 4
pattern BLEND_FACTOR_ONE_MINUS_DST_COLOR = BlendFactor 5
pattern BLEND_FACTOR_SRC_ALPHA = BlendFactor 6
pattern BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = BlendFactor 7
pattern BLEND_FACTOR_DST_ALPHA = BlendFactor 8
pattern BLEND_FACTOR_ONE_MINUS_DST_ALPHA = BlendFactor 9
pattern BLEND_FACTOR_CONSTANT_COLOR = BlendFactor 10
pattern BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = BlendFactor 11
pattern BLEND_FACTOR_CONSTANT_ALPHA = BlendFactor 12
pattern BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = BlendFactor 13
pattern BLEND_FACTOR_SRC_ALPHA_SATURATE = BlendFactor 14
pattern BLEND_FACTOR_SRC1_COLOR = BlendFactor 15
pattern BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = BlendFactor 16
pattern BLEND_FACTOR_SRC1_ALPHA = BlendFactor 17
pattern BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = BlendFactor 18
{-# complete BLEND_FACTOR_ZERO,
BLEND_FACTOR_ONE,
BLEND_FACTOR_SRC_COLOR,
BLEND_FACTOR_ONE_MINUS_SRC_COLOR,
BLEND_FACTOR_DST_COLOR,
BLEND_FACTOR_ONE_MINUS_DST_COLOR,
BLEND_FACTOR_SRC_ALPHA,
BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
BLEND_FACTOR_DST_ALPHA,
BLEND_FACTOR_ONE_MINUS_DST_ALPHA,
BLEND_FACTOR_CONSTANT_COLOR,
BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR,
BLEND_FACTOR_CONSTANT_ALPHA,
BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA,
BLEND_FACTOR_SRC_ALPHA_SATURATE,
BLEND_FACTOR_SRC1_COLOR,
BLEND_FACTOR_ONE_MINUS_SRC1_COLOR,
BLEND_FACTOR_SRC1_ALPHA,
BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA :: BlendFactor #-}
instance Show BlendFactor where
showsPrec p = \case
BLEND_FACTOR_ZERO -> showString "BLEND_FACTOR_ZERO"
BLEND_FACTOR_ONE -> showString "BLEND_FACTOR_ONE"
BLEND_FACTOR_SRC_COLOR -> showString "BLEND_FACTOR_SRC_COLOR"
BLEND_FACTOR_ONE_MINUS_SRC_COLOR -> showString "BLEND_FACTOR_ONE_MINUS_SRC_COLOR"
BLEND_FACTOR_DST_COLOR -> showString "BLEND_FACTOR_DST_COLOR"
BLEND_FACTOR_ONE_MINUS_DST_COLOR -> showString "BLEND_FACTOR_ONE_MINUS_DST_COLOR"
BLEND_FACTOR_SRC_ALPHA -> showString "BLEND_FACTOR_SRC_ALPHA"
BLEND_FACTOR_ONE_MINUS_SRC_ALPHA -> showString "BLEND_FACTOR_ONE_MINUS_SRC_ALPHA"
BLEND_FACTOR_DST_ALPHA -> showString "BLEND_FACTOR_DST_ALPHA"
BLEND_FACTOR_ONE_MINUS_DST_ALPHA -> showString "BLEND_FACTOR_ONE_MINUS_DST_ALPHA"
BLEND_FACTOR_CONSTANT_COLOR -> showString "BLEND_FACTOR_CONSTANT_COLOR"
BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR -> showString "BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR"
BLEND_FACTOR_CONSTANT_ALPHA -> showString "BLEND_FACTOR_CONSTANT_ALPHA"
BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA -> showString "BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA"
BLEND_FACTOR_SRC_ALPHA_SATURATE -> showString "BLEND_FACTOR_SRC_ALPHA_SATURATE"
BLEND_FACTOR_SRC1_COLOR -> showString "BLEND_FACTOR_SRC1_COLOR"
BLEND_FACTOR_ONE_MINUS_SRC1_COLOR -> showString "BLEND_FACTOR_ONE_MINUS_SRC1_COLOR"
BLEND_FACTOR_SRC1_ALPHA -> showString "BLEND_FACTOR_SRC1_ALPHA"
BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA -> showString "BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA"
BlendFactor x -> showParen (p >= 11) (showString "BlendFactor " . showsPrec 11 x)
instance Read BlendFactor where
readPrec = parens (choose [("BLEND_FACTOR_ZERO", pure BLEND_FACTOR_ZERO)
, ("BLEND_FACTOR_ONE", pure BLEND_FACTOR_ONE)
, ("BLEND_FACTOR_SRC_COLOR", pure BLEND_FACTOR_SRC_COLOR)
, ("BLEND_FACTOR_ONE_MINUS_SRC_COLOR", pure BLEND_FACTOR_ONE_MINUS_SRC_COLOR)
, ("BLEND_FACTOR_DST_COLOR", pure BLEND_FACTOR_DST_COLOR)
, ("BLEND_FACTOR_ONE_MINUS_DST_COLOR", pure BLEND_FACTOR_ONE_MINUS_DST_COLOR)
, ("BLEND_FACTOR_SRC_ALPHA", pure BLEND_FACTOR_SRC_ALPHA)
, ("BLEND_FACTOR_ONE_MINUS_SRC_ALPHA", pure BLEND_FACTOR_ONE_MINUS_SRC_ALPHA)
, ("BLEND_FACTOR_DST_ALPHA", pure BLEND_FACTOR_DST_ALPHA)
, ("BLEND_FACTOR_ONE_MINUS_DST_ALPHA", pure BLEND_FACTOR_ONE_MINUS_DST_ALPHA)
, ("BLEND_FACTOR_CONSTANT_COLOR", pure BLEND_FACTOR_CONSTANT_COLOR)
, ("BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR", pure BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR)
, ("BLEND_FACTOR_CONSTANT_ALPHA", pure BLEND_FACTOR_CONSTANT_ALPHA)
, ("BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA", pure BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA)
, ("BLEND_FACTOR_SRC_ALPHA_SATURATE", pure BLEND_FACTOR_SRC_ALPHA_SATURATE)
, ("BLEND_FACTOR_SRC1_COLOR", pure BLEND_FACTOR_SRC1_COLOR)
, ("BLEND_FACTOR_ONE_MINUS_SRC1_COLOR", pure BLEND_FACTOR_ONE_MINUS_SRC1_COLOR)
, ("BLEND_FACTOR_SRC1_ALPHA", pure BLEND_FACTOR_SRC1_ALPHA)
, ("BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA", pure BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA)]
+++
prec 10 (do
expectP (Ident "BlendFactor")
v <- step readPrec
pure (BlendFactor v)))