{-# language CPP #-}
module 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
, BORDER_COLOR_INT_CUSTOM_EXT
, BORDER_COLOR_FLOAT_CUSTOM_EXT
, ..
)) 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 Vulkan.Zero (Zero)
newtype BorderColor = BorderColor Int32
deriving newtype (BorderColor -> BorderColor -> Bool
(BorderColor -> BorderColor -> Bool)
-> (BorderColor -> BorderColor -> Bool) -> Eq BorderColor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BorderColor -> BorderColor -> Bool
$c/= :: BorderColor -> BorderColor -> Bool
== :: BorderColor -> BorderColor -> Bool
$c== :: BorderColor -> BorderColor -> Bool
Eq, Eq BorderColor
Eq BorderColor =>
(BorderColor -> BorderColor -> Ordering)
-> (BorderColor -> BorderColor -> Bool)
-> (BorderColor -> BorderColor -> Bool)
-> (BorderColor -> BorderColor -> Bool)
-> (BorderColor -> BorderColor -> Bool)
-> (BorderColor -> BorderColor -> BorderColor)
-> (BorderColor -> BorderColor -> BorderColor)
-> Ord BorderColor
BorderColor -> BorderColor -> Bool
BorderColor -> BorderColor -> Ordering
BorderColor -> BorderColor -> BorderColor
forall a.
Eq a =>
(a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: BorderColor -> BorderColor -> BorderColor
$cmin :: BorderColor -> BorderColor -> BorderColor
max :: BorderColor -> BorderColor -> BorderColor
$cmax :: BorderColor -> BorderColor -> BorderColor
>= :: BorderColor -> BorderColor -> Bool
$c>= :: BorderColor -> BorderColor -> Bool
> :: BorderColor -> BorderColor -> Bool
$c> :: BorderColor -> BorderColor -> Bool
<= :: BorderColor -> BorderColor -> Bool
$c<= :: BorderColor -> BorderColor -> Bool
< :: BorderColor -> BorderColor -> Bool
$c< :: BorderColor -> BorderColor -> Bool
compare :: BorderColor -> BorderColor -> Ordering
$ccompare :: BorderColor -> BorderColor -> Ordering
$cp1Ord :: Eq BorderColor
Ord, Ptr b -> Int -> IO BorderColor
Ptr b -> Int -> BorderColor -> IO ()
Ptr BorderColor -> IO BorderColor
Ptr BorderColor -> Int -> IO BorderColor
Ptr BorderColor -> Int -> BorderColor -> IO ()
Ptr BorderColor -> BorderColor -> IO ()
BorderColor -> Int
(BorderColor -> Int)
-> (BorderColor -> Int)
-> (Ptr BorderColor -> Int -> IO BorderColor)
-> (Ptr BorderColor -> Int -> BorderColor -> IO ())
-> (forall b. Ptr b -> Int -> IO BorderColor)
-> (forall b. Ptr b -> Int -> BorderColor -> IO ())
-> (Ptr BorderColor -> IO BorderColor)
-> (Ptr BorderColor -> BorderColor -> IO ())
-> Storable BorderColor
forall b. Ptr b -> Int -> IO BorderColor
forall b. Ptr b -> Int -> BorderColor -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
poke :: Ptr BorderColor -> BorderColor -> IO ()
$cpoke :: Ptr BorderColor -> BorderColor -> IO ()
peek :: Ptr BorderColor -> IO BorderColor
$cpeek :: Ptr BorderColor -> IO BorderColor
pokeByteOff :: Ptr b -> Int -> BorderColor -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> BorderColor -> IO ()
peekByteOff :: Ptr b -> Int -> IO BorderColor
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BorderColor
pokeElemOff :: Ptr BorderColor -> Int -> BorderColor -> IO ()
$cpokeElemOff :: Ptr BorderColor -> Int -> BorderColor -> IO ()
peekElemOff :: Ptr BorderColor -> Int -> IO BorderColor
$cpeekElemOff :: Ptr BorderColor -> Int -> IO BorderColor
alignment :: BorderColor -> Int
$calignment :: BorderColor -> Int
sizeOf :: BorderColor -> Int
$csizeOf :: BorderColor -> Int
Storable, BorderColor
BorderColor -> Zero BorderColor
forall a. a -> Zero a
zero :: BorderColor
$czero :: BorderColor
Zero)
pattern $bBORDER_COLOR_FLOAT_TRANSPARENT_BLACK :: BorderColor
$mBORDER_COLOR_FLOAT_TRANSPARENT_BLACK :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = BorderColor 0
pattern $bBORDER_COLOR_INT_TRANSPARENT_BLACK :: BorderColor
$mBORDER_COLOR_INT_TRANSPARENT_BLACK :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_INT_TRANSPARENT_BLACK = BorderColor 1
pattern $bBORDER_COLOR_FLOAT_OPAQUE_BLACK :: BorderColor
$mBORDER_COLOR_FLOAT_OPAQUE_BLACK :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_FLOAT_OPAQUE_BLACK = BorderColor 2
pattern $bBORDER_COLOR_INT_OPAQUE_BLACK :: BorderColor
$mBORDER_COLOR_INT_OPAQUE_BLACK :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_INT_OPAQUE_BLACK = BorderColor 3
pattern $bBORDER_COLOR_FLOAT_OPAQUE_WHITE :: BorderColor
$mBORDER_COLOR_FLOAT_OPAQUE_WHITE :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_FLOAT_OPAQUE_WHITE = BorderColor 4
pattern $bBORDER_COLOR_INT_OPAQUE_WHITE :: BorderColor
$mBORDER_COLOR_INT_OPAQUE_WHITE :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_INT_OPAQUE_WHITE = BorderColor 5
pattern $bBORDER_COLOR_INT_CUSTOM_EXT :: BorderColor
$mBORDER_COLOR_INT_CUSTOM_EXT :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_INT_CUSTOM_EXT = BorderColor 1000287004
pattern $bBORDER_COLOR_FLOAT_CUSTOM_EXT :: BorderColor
$mBORDER_COLOR_FLOAT_CUSTOM_EXT :: forall r. BorderColor -> (Void# -> r) -> (Void# -> r) -> r
BORDER_COLOR_FLOAT_CUSTOM_EXT = BorderColor 1000287003
{-# 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,
BORDER_COLOR_INT_CUSTOM_EXT,
BORDER_COLOR_FLOAT_CUSTOM_EXT :: BorderColor #-}
instance Show BorderColor where
showsPrec :: Int -> BorderColor -> ShowS
showsPrec p :: Int
p = \case
BORDER_COLOR_FLOAT_TRANSPARENT_BLACK -> String -> ShowS
showString "BORDER_COLOR_FLOAT_TRANSPARENT_BLACK"
BORDER_COLOR_INT_TRANSPARENT_BLACK -> String -> ShowS
showString "BORDER_COLOR_INT_TRANSPARENT_BLACK"
BORDER_COLOR_FLOAT_OPAQUE_BLACK -> String -> ShowS
showString "BORDER_COLOR_FLOAT_OPAQUE_BLACK"
BORDER_COLOR_INT_OPAQUE_BLACK -> String -> ShowS
showString "BORDER_COLOR_INT_OPAQUE_BLACK"
BORDER_COLOR_FLOAT_OPAQUE_WHITE -> String -> ShowS
showString "BORDER_COLOR_FLOAT_OPAQUE_WHITE"
BORDER_COLOR_INT_OPAQUE_WHITE -> String -> ShowS
showString "BORDER_COLOR_INT_OPAQUE_WHITE"
BORDER_COLOR_INT_CUSTOM_EXT -> String -> ShowS
showString "BORDER_COLOR_INT_CUSTOM_EXT"
BORDER_COLOR_FLOAT_CUSTOM_EXT -> String -> ShowS
showString "BORDER_COLOR_FLOAT_CUSTOM_EXT"
BorderColor x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "BorderColor " ShowS -> ShowS -> ShowS
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> Int32 -> ShowS
forall a. Show a => Int -> a -> ShowS
showsPrec 11 Int32
x)
instance Read BorderColor where
readPrec :: ReadPrec BorderColor
readPrec = ReadPrec BorderColor -> ReadPrec BorderColor
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec BorderColor)] -> ReadPrec BorderColor
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("BORDER_COLOR_FLOAT_TRANSPARENT_BLACK", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_FLOAT_TRANSPARENT_BLACK)
, ("BORDER_COLOR_INT_TRANSPARENT_BLACK", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_INT_TRANSPARENT_BLACK)
, ("BORDER_COLOR_FLOAT_OPAQUE_BLACK", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_FLOAT_OPAQUE_BLACK)
, ("BORDER_COLOR_INT_OPAQUE_BLACK", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_INT_OPAQUE_BLACK)
, ("BORDER_COLOR_FLOAT_OPAQUE_WHITE", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_FLOAT_OPAQUE_WHITE)
, ("BORDER_COLOR_INT_OPAQUE_WHITE", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_INT_OPAQUE_WHITE)
, ("BORDER_COLOR_INT_CUSTOM_EXT", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_INT_CUSTOM_EXT)
, ("BORDER_COLOR_FLOAT_CUSTOM_EXT", BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure BorderColor
BORDER_COLOR_FLOAT_CUSTOM_EXT)]
ReadPrec BorderColor
-> ReadPrec BorderColor -> ReadPrec BorderColor
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec BorderColor -> ReadPrec BorderColor
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "BorderColor")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
BorderColor -> ReadPrec BorderColor
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> BorderColor
BorderColor Int32
v)))