{-# language CPP #-}
module Vulkan.Core10.Enums.SamplerAddressMode (SamplerAddressMode( SAMPLER_ADDRESS_MODE_REPEAT
, SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
, SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
, SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
, SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
, ..
)) 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 SamplerAddressMode = SamplerAddressMode Int32
deriving newtype (SamplerAddressMode -> SamplerAddressMode -> Bool
(SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> Eq SamplerAddressMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c/= :: SamplerAddressMode -> SamplerAddressMode -> Bool
== :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c== :: SamplerAddressMode -> SamplerAddressMode -> Bool
Eq, Eq SamplerAddressMode
Eq SamplerAddressMode =>
(SamplerAddressMode -> SamplerAddressMode -> Ordering)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> Bool)
-> (SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode)
-> (SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode)
-> Ord SamplerAddressMode
SamplerAddressMode -> SamplerAddressMode -> Bool
SamplerAddressMode -> SamplerAddressMode -> Ordering
SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
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 :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
$cmin :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
max :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
$cmax :: SamplerAddressMode -> SamplerAddressMode -> SamplerAddressMode
>= :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c>= :: SamplerAddressMode -> SamplerAddressMode -> Bool
> :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c> :: SamplerAddressMode -> SamplerAddressMode -> Bool
<= :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c<= :: SamplerAddressMode -> SamplerAddressMode -> Bool
< :: SamplerAddressMode -> SamplerAddressMode -> Bool
$c< :: SamplerAddressMode -> SamplerAddressMode -> Bool
compare :: SamplerAddressMode -> SamplerAddressMode -> Ordering
$ccompare :: SamplerAddressMode -> SamplerAddressMode -> Ordering
$cp1Ord :: Eq SamplerAddressMode
Ord, Ptr b -> Int -> IO SamplerAddressMode
Ptr b -> Int -> SamplerAddressMode -> IO ()
Ptr SamplerAddressMode -> IO SamplerAddressMode
Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
Ptr SamplerAddressMode -> SamplerAddressMode -> IO ()
SamplerAddressMode -> Int
(SamplerAddressMode -> Int)
-> (SamplerAddressMode -> Int)
-> (Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode)
-> (Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ())
-> (forall b. Ptr b -> Int -> IO SamplerAddressMode)
-> (forall b. Ptr b -> Int -> SamplerAddressMode -> IO ())
-> (Ptr SamplerAddressMode -> IO SamplerAddressMode)
-> (Ptr SamplerAddressMode -> SamplerAddressMode -> IO ())
-> Storable SamplerAddressMode
forall b. Ptr b -> Int -> IO SamplerAddressMode
forall b. Ptr b -> Int -> SamplerAddressMode -> 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 SamplerAddressMode -> SamplerAddressMode -> IO ()
$cpoke :: Ptr SamplerAddressMode -> SamplerAddressMode -> IO ()
peek :: Ptr SamplerAddressMode -> IO SamplerAddressMode
$cpeek :: Ptr SamplerAddressMode -> IO SamplerAddressMode
pokeByteOff :: Ptr b -> Int -> SamplerAddressMode -> IO ()
$cpokeByteOff :: forall b. Ptr b -> Int -> SamplerAddressMode -> IO ()
peekByteOff :: Ptr b -> Int -> IO SamplerAddressMode
$cpeekByteOff :: forall b. Ptr b -> Int -> IO SamplerAddressMode
pokeElemOff :: Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
$cpokeElemOff :: Ptr SamplerAddressMode -> Int -> SamplerAddressMode -> IO ()
peekElemOff :: Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
$cpeekElemOff :: Ptr SamplerAddressMode -> Int -> IO SamplerAddressMode
alignment :: SamplerAddressMode -> Int
$calignment :: SamplerAddressMode -> Int
sizeOf :: SamplerAddressMode -> Int
$csizeOf :: SamplerAddressMode -> Int
Storable, SamplerAddressMode
SamplerAddressMode -> Zero SamplerAddressMode
forall a. a -> Zero a
zero :: SamplerAddressMode
$czero :: SamplerAddressMode
Zero)
pattern $bSAMPLER_ADDRESS_MODE_REPEAT :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_REPEAT :: forall r. SamplerAddressMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_ADDRESS_MODE_REPEAT = SamplerAddressMode 0
pattern $bSAMPLER_ADDRESS_MODE_MIRRORED_REPEAT :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_MIRRORED_REPEAT :: forall r. SamplerAddressMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = SamplerAddressMode 1
pattern $bSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE :: forall r. SamplerAddressMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = SamplerAddressMode 2
pattern $bSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER :: forall r. SamplerAddressMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = SamplerAddressMode 3
pattern $bSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE :: SamplerAddressMode
$mSAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE :: forall r. SamplerAddressMode -> (Void# -> r) -> (Void# -> r) -> r
SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = SamplerAddressMode 4
{-# complete SAMPLER_ADDRESS_MODE_REPEAT,
SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE,
SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE :: SamplerAddressMode #-}
instance Show SamplerAddressMode where
showsPrec :: Int -> SamplerAddressMode -> ShowS
showsPrec p :: Int
p = \case
SAMPLER_ADDRESS_MODE_REPEAT -> String -> ShowS
showString "SAMPLER_ADDRESS_MODE_REPEAT"
SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT -> String -> ShowS
showString "SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT"
SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE -> String -> ShowS
showString "SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE"
SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER -> String -> ShowS
showString "SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER"
SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE -> String -> ShowS
showString "SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE"
SamplerAddressMode x :: Int32
x -> Bool -> ShowS -> ShowS
showParen (Int
p Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
>= 11) (String -> ShowS
showString "SamplerAddressMode " 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 SamplerAddressMode where
readPrec :: ReadPrec SamplerAddressMode
readPrec = ReadPrec SamplerAddressMode -> ReadPrec SamplerAddressMode
forall a. ReadPrec a -> ReadPrec a
parens ([(String, ReadPrec SamplerAddressMode)]
-> ReadPrec SamplerAddressMode
forall a. [(String, ReadPrec a)] -> ReadPrec a
choose [("SAMPLER_ADDRESS_MODE_REPEAT", SamplerAddressMode -> ReadPrec SamplerAddressMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure SamplerAddressMode
SAMPLER_ADDRESS_MODE_REPEAT)
, ("SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT", SamplerAddressMode -> ReadPrec SamplerAddressMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure SamplerAddressMode
SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT)
, ("SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE", SamplerAddressMode -> ReadPrec SamplerAddressMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure SamplerAddressMode
SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE)
, ("SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER", SamplerAddressMode -> ReadPrec SamplerAddressMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure SamplerAddressMode
SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER)
, ("SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE", SamplerAddressMode -> ReadPrec SamplerAddressMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure SamplerAddressMode
SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE)]
ReadPrec SamplerAddressMode
-> ReadPrec SamplerAddressMode -> ReadPrec SamplerAddressMode
forall a. ReadPrec a -> ReadPrec a -> ReadPrec a
+++
Int -> ReadPrec SamplerAddressMode -> ReadPrec SamplerAddressMode
forall a. Int -> ReadPrec a -> ReadPrec a
prec 10 (do
Lexeme -> ReadPrec ()
expectP (String -> Lexeme
Ident "SamplerAddressMode")
Int32
v <- ReadPrec Int32 -> ReadPrec Int32
forall a. ReadPrec a -> ReadPrec a
step ReadPrec Int32
forall a. Read a => ReadPrec a
readPrec
SamplerAddressMode -> ReadPrec SamplerAddressMode
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Int32 -> SamplerAddressMode
SamplerAddressMode Int32
v)))