{-# language CPP #-}
module Graphics.Vulkan.Core11.Enums.SamplerYcbcrRange (SamplerYcbcrRange( SAMPLER_YCBCR_RANGE_ITU_FULL
, SAMPLER_YCBCR_RANGE_ITU_NARROW
, ..
)) 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 SamplerYcbcrRange = SamplerYcbcrRange Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern SAMPLER_YCBCR_RANGE_ITU_FULL = SamplerYcbcrRange 0
pattern SAMPLER_YCBCR_RANGE_ITU_NARROW = SamplerYcbcrRange 1
{-# complete SAMPLER_YCBCR_RANGE_ITU_FULL,
SAMPLER_YCBCR_RANGE_ITU_NARROW :: SamplerYcbcrRange #-}
instance Show SamplerYcbcrRange where
showsPrec p = \case
SAMPLER_YCBCR_RANGE_ITU_FULL -> showString "SAMPLER_YCBCR_RANGE_ITU_FULL"
SAMPLER_YCBCR_RANGE_ITU_NARROW -> showString "SAMPLER_YCBCR_RANGE_ITU_NARROW"
SamplerYcbcrRange x -> showParen (p >= 11) (showString "SamplerYcbcrRange " . showsPrec 11 x)
instance Read SamplerYcbcrRange where
readPrec = parens (choose [("SAMPLER_YCBCR_RANGE_ITU_FULL", pure SAMPLER_YCBCR_RANGE_ITU_FULL)
, ("SAMPLER_YCBCR_RANGE_ITU_NARROW", pure SAMPLER_YCBCR_RANGE_ITU_NARROW)]
+++
prec 10 (do
expectP (Ident "SamplerYcbcrRange")
v <- step readPrec
pure (SamplerYcbcrRange v)))