{-# language CPP #-}
module Graphics.Vulkan.Core10.Enums.BorderColor (BorderColor( BORDER_COLOR_FLOAT_TRANSPARENT_BLACK
, BORDER_COLOR_INT_TRANSPARENT_BLACK
, BORDER_COLOR_FLOAT_OPAQUE_BLACK
, BORDER_COLOR_INT_OPAQUE_BLACK
, BORDER_COLOR_FLOAT_OPAQUE_WHITE
, BORDER_COLOR_INT_OPAQUE_WHITE
, ..
)) 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 BorderColor = BorderColor Int32
deriving newtype (Eq, Ord, Storable, Zero)
pattern BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = BorderColor 0
pattern BORDER_COLOR_INT_TRANSPARENT_BLACK = BorderColor 1
pattern BORDER_COLOR_FLOAT_OPAQUE_BLACK = BorderColor 2
pattern BORDER_COLOR_INT_OPAQUE_BLACK = BorderColor 3
pattern BORDER_COLOR_FLOAT_OPAQUE_WHITE = BorderColor 4
pattern BORDER_COLOR_INT_OPAQUE_WHITE = BorderColor 5
{-# complete BORDER_COLOR_FLOAT_TRANSPARENT_BLACK,
BORDER_COLOR_INT_TRANSPARENT_BLACK,
BORDER_COLOR_FLOAT_OPAQUE_BLACK,
BORDER_COLOR_INT_OPAQUE_BLACK,
BORDER_COLOR_FLOAT_OPAQUE_WHITE,
BORDER_COLOR_INT_OPAQUE_WHITE :: BorderColor #-}
instance Show BorderColor where
showsPrec p = \case
BORDER_COLOR_FLOAT_TRANSPARENT_BLACK -> showString "BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"
BORDER_COLOR_INT_TRANSPARENT_BLACK -> showString "BORDER_COLOR_INT_TRANSPARENT_BLACK"
BORDER_COLOR_FLOAT_OPAQUE_BLACK -> showString "BORDER_COLOR_FLOAT_OPAQUE_BLACK"
BORDER_COLOR_INT_OPAQUE_BLACK -> showString "BORDER_COLOR_INT_OPAQUE_BLACK"
BORDER_COLOR_FLOAT_OPAQUE_WHITE -> showString "BORDER_COLOR_FLOAT_OPAQUE_WHITE"
BORDER_COLOR_INT_OPAQUE_WHITE -> showString "BORDER_COLOR_INT_OPAQUE_WHITE"
BorderColor x -> showParen (p >= 11) (showString "BorderColor " . showsPrec 11 x)
instance Read BorderColor where
readPrec = parens (choose [("BORDER_COLOR_FLOAT_TRANSPARENT_BLACK", pure BORDER_COLOR_FLOAT_TRANSPARENT_BLACK)
, ("BORDER_COLOR_INT_TRANSPARENT_BLACK", pure BORDER_COLOR_INT_TRANSPARENT_BLACK)
, ("BORDER_COLOR_FLOAT_OPAQUE_BLACK", pure BORDER_COLOR_FLOAT_OPAQUE_BLACK)
, ("BORDER_COLOR_INT_OPAQUE_BLACK", pure BORDER_COLOR_INT_OPAQUE_BLACK)
, ("BORDER_COLOR_FLOAT_OPAQUE_WHITE", pure BORDER_COLOR_FLOAT_OPAQUE_WHITE)
, ("BORDER_COLOR_INT_OPAQUE_WHITE", pure BORDER_COLOR_INT_OPAQUE_WHITE)]
+++
prec 10 (do
expectP (Ident "BorderColor")
v <- step readPrec
pure (BorderColor v)))